| Server IP : 195.58.49.151 / Your IP : 216.73.217.39 Web Server : Apache/2.4.67 (Debian) mod_fcgid/2.3.9 OpenSSL/3.0.20 System : Linux hs.hsdns.ru 6.1.0-48-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.172-1 (2026-05-15) x86_64 User : antilam ( 1007) PHP Version : 8.4.22 Disable Function : system,passthru,popen MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /home/antilam/web/antilam.ru/public_html/wp-content/plugins/wp-recipe-maker/dist/ |
Upload File : |
var WPRecipeMakerAdmin;(self.webpackChunkWPRecipeMakerAdmin=self.webpackChunkWPRecipeMakerAdmin||[]).push([[305],{4791:(t,e,n)=>{"use strict";var i=n(2483),r=n(7810),o=n(5044),s=n(5826),a=n.n(s),l=n(6502);const c={dependencyMet(t,e){if(t.hasOwnProperty("dependency")){let n=t.dependency;Array.isArray(n)||(n=[n]);for(let t of n){let n=e[t.id];if(t.hasOwnProperty("type")&&"inverse"==t.type){if(n==t.value)return!1}else if(n!=t.value)return!1}}return!0},beforeSettingDisplay(t,e){let n=e[t];if("import_units"===t)n=n.join(wprm_admin.eol);else if("unit_conversion_units"===t){let t={};for(let e in n)t[e]={...n[e],aliases:n[e].aliases.join(";")};n=t}return n},beforeSettingSave(t,e,n){if("import_units"===e)t=t.split(wprm_admin.eol);else if("unit_conversion_units"===e){let e={};for(let n in t)e[n]={...t[n],aliases:t[n].aliases.split(";")};t=e}return t}};var u=n(5494);const h={arrows:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBmaWxsPSIjMTExMTExIj48cG9seWdvbiBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBwb2ludHM9IjEwLjUsMC41IDE1LjUsNC41IDEwLjUsOC41ICI+PC9wb2x5Z29uPiA8bGluZSBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiB4MT0iMC41IiB5MT0iNC41IiB4Mj0iMTAuNSIgeTI9IjQuNSI+PC9saW5lPiA8cG9seWdvbiBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBwb2ludHM9IjUuNSw3LjUgMC41LDExLjUgNS41LDE1LjUgIiBkYXRhLWNvbG9yPSJjb2xvci0yIj48L3BvbHlnb24+IDxsaW5lIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHgxPSIxNS41IiB5MT0iMTEuNSIgeDI9IjUuNSIgeTI9IjExLjUiIGRhdGEtY29sb3I9ImNvbG9yLTIiPjwvbGluZT48L2c+PC9zdmc+",book:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9IiMxMTExMTEiIHN0cm9rZT0iIzExMTExMSI+PHJlY3QgeD0iMS41IiB5PSIwLjUiIHdpZHRoPSIxMyIgaGVpZ2h0PSIxNSIgcng9IjEiIHJ5PSIxIiBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZGF0YS1jYXA9ImJ1dHQiPjwvcmVjdD4gPGNpcmNsZSBjeD0iNCIgY3k9IjQiIHI9IjEiIGRhdGEtY2FwPSJidXR0IiBkYXRhLWNvbG9yPSJjb2xvci0yIiBkYXRhLXN0cm9rZT0ibm9uZSIgc3Ryb2tlPSJub25lIj48L2NpcmNsZT4gPGNpcmNsZSBjeD0iNCIgY3k9IjEyIiByPSIxIiBkYXRhLWNhcD0iYnV0dCIgZGF0YS1jb2xvcj0iY29sb3ItMiIgZGF0YS1zdHJva2U9Im5vbmUiIHN0cm9rZT0ibm9uZSI+PC9jaXJjbGU+IDxjaXJjbGUgY3g9IjQiIGN5PSI4IiByPSIxIiBkYXRhLWNhcD0iYnV0dCIgZGF0YS1jb2xvcj0iY29sb3ItMiIgZGF0YS1zdHJva2U9Im5vbmUiIHN0cm9rZT0ibm9uZSI+PC9jaXJjbGU+IDxyZWN0IHg9IjcuNSIgeT0iNi41IiB3aWR0aD0iNCIgaGVpZ2h0PSIzIiBmaWxsPSJub25lIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGRhdGEtY2FwPSJidXR0IiBkYXRhLWNvbG9yPSJjb2xvci0yIj48L3JlY3Q+PC9nPjwvc3ZnPg==",brush:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBmaWxsPSIjMTExMTExIj48cGF0aCBkPSJNNy41LjUsMi4wODYsNS45MTRhMiwyLDAsMCwwLDAsMi44MjhsMS41ODYsMS41ODZMLjkxNCwxMy4wODZhMS40MTQsMS40MTQsMCwwLDAsMCwyaDBhMS40MTQsMS40MTQsMCwwLDAsMiwwbDIuNzU3LTIuNzU3LDEuNTg2LDEuNTg2YTIsMiwwLDAsMCwyLjgyOCwwTDE1LjUsOC41WiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMTExMTExIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGRhdGEtY2FwPSJidXR0Ij48L3BhdGg+IDxsaW5lIHgxPSI0LjUiIHkxPSI2LjUiIHgyPSI5LjUiIHkyPSIxMS41IiBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZGF0YS1jYXA9ImJ1dHQiIGRhdGEtY29sb3I9ImNvbG9yLTIiPjwvbGluZT48L2c+PC9zdmc+","button-click":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBmaWxsPSIjMTExMTExIj48cG9seWdvbiBwb2ludHM9IjUuNSA2LjUgMTMuNSA4LjUgMTAuNSA5LjUgMTQuNSAxMy41IDEyLjUgMTUuNSA4LjUgMTEuNSA3LjUgMTQuNSA1LjUgNi41IiBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZGF0YS1jYXA9ImJ1dHQiIGRhdGEtY29sb3I9ImNvbG9yLTIiPjwvcG9seWdvbj4gPHBhdGggZD0iTTMuNSw5LjVoLTJhMSwxLDAsMCwxLTEtMXYtN2ExLDEsMCwwLDEsMS0xaDEzYTEsMSwwLDAsMSwxLDF2NSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMTExMTExIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGRhdGEtY2FwPSJidXR0Ij48L3BhdGg+PC9nPjwvc3ZnPg==",chart:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9IiMxMTExMTEiIHN0cm9rZT0iIzExMTExMSI+PHJlY3QgeD0iNi41IiB5PSIwLjUiIHdpZHRoPSIzIiBoZWlnaHQ9IjE1IiBmaWxsPSJub25lIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGRhdGEtY29sb3I9ImNvbG9yLTIiLz4gPHJlY3QgeD0iMC41IiB5PSIxMC41IiB3aWR0aD0iMyIgaGVpZ2h0PSI1IiBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPiA8cmVjdCB4PSIxMi41IiB5PSI1LjUiIHdpZHRoPSIzIiBoZWlnaHQ9IjEwIiBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvZz48L3N2Zz4=",clock:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9IiMxMTExMTEiIHN0cm9rZT0iIzExMTExMSI+PGNpcmNsZSBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBjeD0iOC41IiBjeT0iOC41IiByPSI3Ij48L2NpcmNsZT4gPHBvbHlsaW5lIGRhdGEtY29sb3I9ImNvbG9yLTIiIGZpbGw9Im5vbmUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBwb2ludHM9IiA1LjUsNS41IDguNSw4LjUgMTMuNSw4LjUgIj48L3BvbHlsaW5lPiA8bGluZSBkYXRhLWNvbG9yPSJjb2xvci0yIiBmaWxsPSJub25lIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgeDE9IjguNSIgeTE9IjMuNSIgeDI9IjguNSIgeTI9IjQuNSI+PC9saW5lPiA8bGluZSBkYXRhLWNvbG9yPSJjb2xvci0yIiBmaWxsPSJub25lIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgeDE9IjguNSIgeTE9IjEzLjUiIHgyPSI4LjUiIHkyPSIxMi41Ij48L2xpbmU+IDxsaW5lIGRhdGEtY29sb3I9ImNvbG9yLTIiIGZpbGw9Im5vbmUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiB4MT0iMy41IiB5MT0iOC41IiB4Mj0iNC41IiB5Mj0iOC41Ij48L2xpbmU+IDwvZz48L3N2Zz4=",code:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBmaWxsPSIjMTExMTExIj48bGluZSB4MT0iMTAuNSIgeTE9IjEuNSIgeDI9IjUuNSIgeTI9IjE0LjUiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkYXRhLWNhcD0iYnV0dCIgZGF0YS1jb2xvcj0iY29sb3ItMiI+PC9saW5lPiA8cG9seWxpbmUgcG9pbnRzPSIzLjUgNC41IDAuNSA3LjUgMy41IDEwLjUiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkYXRhLWNhcD0iYnV0dCI+PC9wb2x5bGluZT4gPHBvbHlsaW5lIHBvaW50cz0iMTIuNSA0LjUgMTUuNSA3LjUgMTIuNSAxMC41IiBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZGF0YS1jYXA9ImJ1dHQiPjwvcG9seWxpbmU+PC9nPjwvc3ZnPg==",cog:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBmaWxsPSIjMTExMTExIj48Y2lyY2xlIGRhdGEtY29sb3I9ImNvbG9yLTIiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIGN4PSI4IiBjeT0iOCIgcj0iMi41Ij48L2NpcmNsZT4gPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMTExMTExIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgZD0iTTE1LjUsOVY3IGwtMi4xNzctMC4zNjNjLTAuMTMxLTAuNTEyLTAuMzMyLTAuOTk0LTAuNTk1LTEuNDM3bDEuMjgzLTEuNzk2TDEyLjU5NiwxLjk5TDEwLjgsMy4yNzJjLTAuNDQzLTAuMjYzLTAuOTI1LTAuNDY0LTEuNDM3LTAuNTk1IEw5LDAuNUg3TDYuNjM3LDIuNjc3QzYuMTI1LDIuODA4LDUuNjQzLDMuMDA5LDUuMiwzLjI3MkwzLjQwNCwxLjk5TDEuOTksMy40MDRMMy4yNzIsNS4yQzMuMDA5LDUuNjQzLDIuODA4LDYuMTI1LDIuNjc3LDYuNjM3IEwwLjUsN3YybDIuMTc3LDAuMzYzYzAuMTMxLDAuNTEyLDAuMzMyLDAuOTk0LDAuNTk1LDEuNDM3TDEuOTksMTIuNTk2bDEuNDE0LDEuNDE0TDUuMiwxMi43MjhjMC40NDMsMC4yNjMsMC45MjUsMC40NjQsMS40MzcsMC41OTUgTDcsMTUuNWgybDAuMzYzLTIuMTc3YzAuNTEyLTAuMTMxLDAuOTk0LTAuMzMyLDEuNDM3LTAuNTk1bDEuNzk2LDEuMjgzbDEuNDE0LTEuNDE0TDEyLjcyOCwxMC44IGMwLjI2My0wLjQ0MywwLjQ2NC0wLjkyNSwwLjU5NS0xLjQzN0wxNS41LDl6Ij48L3BhdGg+IDwvZz48L3N2Zz4=",crane:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9IiMxMTExMTEiIHN0cm9rZT0iIzExMTExMSI+PHJlY3QgeD0iMTEuNSIgeT0iMTAuNSIgd2lkdGg9IjQiIGhlaWdodD0iMyIgZmlsbD0ibm9uZSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkYXRhLWNvbG9yPSJjb2xvci0yIi8+PHBvbHlsaW5lIHBvaW50cz0iMi41IDE1LjUgMi41IDAuNSA1LjUgMC41IDUuNSAxNS41IiBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwb2x5bGluZSBwb2ludHM9IjIuNSA1LjUgMC41IDUuNSAwLjUgMyAyLjUgMi41IiBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwb2x5bGluZSBwb2ludHM9IjUuNSAyLjUgMTUuNSAzLjUgMTUuNSA1LjUgNS41IDUuNSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMTExMTExIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48bGluZSB4MT0iMC41IiB5MT0iMTUuNSIgeDI9IjcuNSIgeTI9IjE1LjUiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PGxpbmUgeDE9IjEzLjUiIHkxPSI3LjUwNCIgeDI9IjEzLjUiIHkyPSIxMC41IiBmaWxsPSJub25lIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGRhdGEtY29sb3I9ImNvbG9yLTIiLz48L2c+PC9zdmc+","doc-apple":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBmaWxsPSIjMTExMTExIj48cGF0aCBkPSJNMTEuNSwxNS4xNjNsLjg2Ny4yNjNhMS42MTIsMS42MTIsMCwwLDAsMS45ODktLjlsMS0yLjcyNGMuNy0xLjkwOS0xLjIzOS0zLjc1MS0zLjM2Ny0zLjJsLS40ODcuMTI2TDExLjAxMyw4LjZjLTIuMTI4LS41NTMtNC4wNjcsMS4yODktMy4zNjcsMy4ybDEsMi43MjRhMS42MTIsMS42MTIsMCwwLDAsMS45ODkuOVoiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkYXRhLWNvbG9yPSJjb2xvci0yIj48L3BhdGg+IDxwYXRoIGQ9Ik0xNSw0aDBhMywzLDAsMCwxLTMsM2gwQTMsMywwLDAsMSwxNSw0WiIgZmlsbD0iIzExMTExMSIgZGF0YS1jYXA9ImJ1dHQiIGRhdGEtY29sb3I9ImNvbG9yLTIiIGRhdGEtc3Ryb2tlPSJub25lIj48L3BhdGg+IDxwb2x5bGluZSBwb2ludHM9IjYuNSAxNS41IDAuNSAxNS41IDAuNSAwLjUgMTMuNSAwLjUgMTMuNSAyLjUiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48L3BvbHlsaW5lPiA8bGluZSB4MT0iMy41IiB5MT0iNC41IiB4Mj0iNy41IiB5Mj0iNC41IiBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PC9saW5lPiA8bGluZSB4MT0iMy41IiB5MT0iMTAuNSIgeDI9IjQuNSIgeTI9IjEwLjUiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48L2xpbmU+IDxsaW5lIHgxPSI5LjUiIHkxPSI0LjUiIHgyPSIxMC41IiB5Mj0iNC41IiBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PC9saW5lPiA8bGluZSB4MT0iMy41IiB5MT0iNy41IiB4Mj0iNi41IiB5Mj0iNy41IiBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PC9saW5lPjwvZz48L3N2Zz4=",doc:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBmaWxsPSIjMTExMTExIj48cmVjdCB4PSIxLjUiIHk9IjAuNSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMTExMTExIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgd2lkdGg9IjEzIiBoZWlnaHQ9IjE1Ij48L3JlY3Q+IDxsaW5lIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHgxPSI5LjUiIHkxPSIzLjUiIHgyPSIxMS41IiB5Mj0iMy41IiBkYXRhLWNvbG9yPSJjb2xvci0yIj48L2xpbmU+IDxsaW5lIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHgxPSI5LjUiIHkxPSI2LjUiIHgyPSIxMS41IiB5Mj0iNi41IiBkYXRhLWNvbG9yPSJjb2xvci0yIj48L2xpbmU+IDxsaW5lIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHgxPSI0LjUiIHkxPSI5LjUiIHgyPSIxMS41IiB5Mj0iOS41IiBkYXRhLWNvbG9yPSJjb2xvci0yIj48L2xpbmU+IDxsaW5lIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHgxPSI0LjUiIHkxPSIxMi41IiB4Mj0iMTEuNSIgeTI9IjEyLjUiIGRhdGEtY29sb3I9ImNvbG9yLTIiPjwvbGluZT4gPHJlY3QgeD0iNC41IiB5PSIzLjUiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHdpZHRoPSIzIiBoZWlnaHQ9IjMiIGRhdGEtY29sb3I9ImNvbG9yLTIiPjwvcmVjdD48L2c+PC9zdmc+",edit:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBmaWxsPSIjMTExMTExIj48cG9seWdvbiBkYXRhLWNvbG9yPSJjb2xvci0yIiBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBwb2ludHM9IiAxMywwLjUgMTUuNSwzIDcuNSwxMSA0LDEyIDUsOC41ICI+PC9wb2x5Z29uPiA8bGluZSBkYXRhLWNvbG9yPSJjb2xvci0yIiBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiB4MT0iMTEiIHkxPSIyLjUiIHgyPSIxMy41IiB5Mj0iNSI+PC9saW5lPiA8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBkPSJNMTMuNSw5LjV2NSBjMCwwLjU1Mi0wLjQ0OCwxLTEsMWgtMTFjLTAuNTUyLDAtMS0wLjQ0OC0xLTF2LTExYzAtMC41NTIsMC40NDgtMSwxLTFoNSI+PC9wYXRoPiA8L2c+PC9zdmc+",files:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9IiMxMTExMTEiIHN0cm9rZT0iIzExMTExMSI+PHJlY3QgeD0iMi41IiB5PSI0LjUiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHdpZHRoPSI5IiBoZWlnaHQ9IjExIi8+IDxwb2x5bGluZSBmaWxsPSJub25lIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgcG9pbnRzPSI0LjUsMi41IDEzLjUsMi41IDEzLjUsMTMuNSAiIGRhdGEtY29sb3I9ImNvbG9yLTIiLz4gPHBvbHlsaW5lIGZpbGw9Im5vbmUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBwb2ludHM9IjcuNSwwLjUgMTUuNSwwLjUgMTUuNSwxMC41ICIgZGF0YS1jb2xvcj0iY29sb3ItMiIvPjwvZz48L3N2Zz4=",health:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9IiMxMTExMTEiIHN0cm9rZT0iIzExMTExMSI+PHBvbHlnb24gcG9pbnRzPSIxNS41IDUuNSAxMC41IDUuNSAxMC41IDAuNSA1LjUgMC41IDUuNSA1LjUgMC41IDUuNSAwLjUgMTAuNSA1LjUgMTAuNSA1LjUgMTUuNSAxMC41IDE1LjUgMTAuNSAxMC41IDE1LjUgMTAuNSAxNS41IDUuNSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMTExMTExIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L2c+PC9zdmc+",import:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBmaWxsPSIjMTExMTExIj48cG9seWdvbiBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBwb2ludHM9IjMuNSw2LjUgOCwxMS41IDEyLjUsNi41IDkuNSw2LjUgOS41LDAuNSA2LjUsMC41IDYuNSw2LjUgIiBkYXRhLWNvbG9yPSJjb2xvci0yIj48L3BvbHlnb24+IDxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJNMTUuNSwxMC41djRjMCwwLjU1Mi0wLjQ0OCwxLTEsMWgtMTMgYy0wLjU1MiwwLTEtMC40NDgtMS0xdi00Ij48L3BhdGg+PC9nPjwvc3ZnPg==",key:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBmaWxsPSIjMTExMTExIj48Y2lyY2xlIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIGN4PSI1IiBjeT0iMTEiIHI9IjEuNSIgZGF0YS1jb2xvcj0iY29sb3ItMiI+PC9jaXJjbGU+IDxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIGQ9Ik0xNS41LDAuNWgtMyBMNi4yOSw2LjcxQzUuODc5LDYuNTg3LDUuNDUxLDYuNSw1LDYuNWMtMi40ODUsMC00LjUsMi4wMTUtNC41LDQuNXMyLjAxNSw0LjUsNC41LDQuNXM0LjUtMi4wMTUsNC41LTQuNSBjMC0wLjQ1MS0wLjA4Ny0wLjg3OS0wLjIxLTEuMjlMMTEuNSw3LjVsMC0zaDNsMS0xVjAuNXoiPjwvcGF0aD48L2c+PC9zdmc+",knife:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9IiMxMTExMTEiIHN0cm9rZT0iIzExMTExMSI+PHBhdGggZD0iTTQuOTE0LDEwLjEwNywyLjYzNiw3LjgyOCw4LjI5MywyLjE3MmE1LDUsMCwwLDEsNy4wNzEsMGgwbC0xMy4xLDEzLjEiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PC9nPjwvc3ZnPg==",letter:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBmaWxsPSIjMTExMTExIj48cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBkPSJNMTUuNSw2LjVsLTcuNSw0IGwtNy41LTR2OGMwLDAuNTUyLDAuNDQ4LDEsMSwxaDEzYzAuNTUyLDAsMS0wLjQ0OCwxLTFWNi41eiIgZGF0YS1jYXA9ImJ1dHQiPjwvcGF0aD4gPHBvbHlsaW5lIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHBvaW50cz0iMi41LDUgMi41LDAuNSAxMy41LDAuNSAxMy41LDUgIiBkYXRhLWNhcD0iYnV0dCIgZGF0YS1jb2xvcj0iY29sb3ItMiI+PC9wb2x5bGluZT4gPGxpbmUgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMTExMTExIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgeDE9IjUuNSIgeTE9IjMuNSIgeDI9IjEwLjUiIHkyPSIzLjUiIGRhdGEtY2FwPSJidXR0IiBkYXRhLWNvbG9yPSJjb2xvci0yIj48L2xpbmU+IDxsaW5lIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHgxPSI1LjUiIHkxPSI2LjUiIHgyPSIxMC41IiB5Mj0iNi41IiBkYXRhLWNhcD0iYnV0dCIgZGF0YS1jb2xvcj0iY29sb3ItMiI+PC9saW5lPjwvZz48L3N2Zz4=",link:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBmaWxsPSIjMTExMTExIj48cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBkPSJNOC45OTUsNy4wMDUgTDguOTk1LDcuMDA1YzEuMzc0LDEuMzc0LDEuMzc0LDMuNjAxLDAsNC45NzVsLTEuOTksMS45OWMtMS4zNzQsMS4zNzQtMy42MDEsMS4zNzQtNC45NzUsMGwwLDBjLTEuMzc0LTEuMzc0LTEuMzc0LTMuNjAxLDAtNC45NzUgbDEuNzQ4LTEuNjk4IiBkYXRhLWNhcD0iYnV0dCIgZGF0YS1jb2xvcj0iY29sb3ItMiI+PC9wYXRoPiA8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBkPSJNNy4wMDUsOC45OTUgTDcuMDA1LDguOTk1Yy0xLjM3NC0xLjM3NC0xLjM3NC0zLjYwMSwwLTQuOTc1bDEuOTktMS45OWMxLjM3NC0xLjM3NCwzLjYwMS0xLjM3NCw0Ljk3NSwwbDAsMGMxLjM3NCwxLjM3NCwxLjM3NCwzLjYwMSwwLDQuOTc1IGwtMS43NDgsMS42OTgiIGRhdGEtY2FwPSJidXR0Ij48L3BhdGg+IDwvZz48L3N2Zz4=",list:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9IiMxMTExMTEiIHN0cm9rZT0iIzExMTExMSI+PGxpbmUgeDE9IjYuNSIgeTE9IjMuNSIgeDI9IjE1LjUiIHkyPSIzLjUiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48L2xpbmU+IDxsaW5lIHgxPSI2LjUiIHkxPSI4LjUiIHgyPSIxNS41IiB5Mj0iOC41IiBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PC9saW5lPiA8bGluZSB4MT0iNi41IiB5MT0iMTMuNSIgeDI9IjE1LjUiIHkyPSIxMy41IiBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PC9saW5lPiA8Y2lyY2xlIGN4PSIyIiBjeT0iMyIgcj0iMS41IiBmaWxsPSJub25lIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGRhdGEtY29sb3I9ImNvbG9yLTIiPjwvY2lyY2xlPiA8Y2lyY2xlIGN4PSIyIiBjeT0iOCIgcj0iMS41IiBmaWxsPSJub25lIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGRhdGEtY29sb3I9ImNvbG9yLTIiPjwvY2lyY2xlPiA8Y2lyY2xlIGN4PSIyIiBjeT0iMTMiIHI9IjEuNSIgZmlsbD0ibm9uZSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkYXRhLWNvbG9yPSJjb2xvci0yIj48L2NpcmNsZT48L2c+PC9zdmc+",lock:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBmaWxsPSIjMTExMTExIj48cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBkPSJNMTMuNSwxNS41aC0xMSBjLTAuNTUyLDAtMS0wLjQ0OC0xLTF2LTdjMC0wLjU1MiwwLjQ0OC0xLDEtMWgxMWMwLjU1MiwwLDEsMC40NDgsMSwxdjdDMTQuNSwxNS4wNTIsMTQuMDUyLDE1LjUsMTMuNSwxNS41eiI+PC9wYXRoPiA8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBkPSJNNC41LDYuNVY0IGMwLTEuOTMzLDEuNTY3LTMuNSwzLjUtMy41aDBjMS45MzMsMCwzLjUsMS41NjcsMy41LDMuNXYyLjUiPjwvcGF0aD4gPGNpcmNsZSBkYXRhLWNvbG9yPSJjb2xvci0yIiBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBjeD0iOCIgY3k9IjExIiByPSIxLjUiPjwvY2lyY2xlPiA8L2c+PC9zdmc+","measure-apple":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9IiMxMTExMTEiIHN0cm9rZT0iIzExMTExMSI+PHBhdGggZD0iTTEwLjIzMywxLjFhMy42NjcsMy42NjcsMCwwLDEsMi42LS43LDMuODg0LDMuODg0LDAsMCwxLTEuMiwyLjUsMy43NDUsMy43NDUsMCwwLDEtMi42LjdBMy44ODQsMy44ODQsMCwwLDEsMTAuMjMzLDEuMVoiIGZpbGw9IiMxMTExMTEiIGRhdGEtY2FwPSJidXR0IiBkYXRhLXN0cm9rZT0ibm9uZSIgc3Ryb2tlPSJub25lIi8+IDxwYXRoIGQ9Ik0zLjQ0NywxMi41YTEwLjcwOCwxMC43MDgsMCwwLDAsMi40LDIuNjQzLDEsMSwwLDAsMCwuNy4yNjIsMy4xMTMsMy4xMTMsMCwwLDAsMS42NjgtLjc0N0w4LjUsMTQuNWwuMjkuMTU4YTMuMTI2LDMuMTI2LDAsMCwwLDEuNjY3Ljc0NywxLjAyMiwxLjAyMiwwLDAsMCwuNzEzLS4yNzRjMi44LTIuMjg5LDMuMzU2LTQuNCwzLjMyOC01Ljc2NWE0LjIzOSw0LjIzOSwwLDAsMC0xLjQ3MS0zLjIyNCwzLjUsMy41LDAsMCwwLTIuMjEtLjczNyw2Ljk1Myw2Ljk1MywwLDAsMC0yLjE4Mi40MTVMOC41LDUuODY3bC0uMTM5LS4wNDlBNi41Niw2LjU2LDAsMCwwLDYuMjIsNS40MDVhMy42MTcsMy42MTcsMCwwLDAtMi4yNTEuNzM4QTQuMDI4LDQuMDI4LDAsMCwwLDIuNjA2LDguNSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMTExMTExIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4gPHJlY3QgeD0iMC41IiB5PSI4LjUiIHdpZHRoPSIxMCIgaGVpZ2h0PSI0IiBmaWxsPSJub25lIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGRhdGEtY29sb3I9ImNvbG9yLTIiLz4gPGxpbmUgeDE9IjIuNSIgeTE9IjguNSIgeDI9IjIuNSIgeTI9IjEwLjUiIGZpbGw9Im5vbmUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZGF0YS1jb2xvcj0iY29sb3ItMiIvPiA8bGluZSB4MT0iNS41IiB5MT0iOC41IiB4Mj0iNS41IiB5Mj0iMTAuNSIgZmlsbD0ibm9uZSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkYXRhLWNvbG9yPSJjb2xvci0yIi8+IDxsaW5lIHgxPSI4LjUiIHkxPSI4LjUiIHgyPSI4LjUiIHkyPSIxMC41IiBmaWxsPSJub25lIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGRhdGEtY29sb3I9ImNvbG9yLTIiLz48L2c+PC9zdmc+",modal:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48cmVjdCB4PSIuNSIgeT0iMS41IiB3aWR0aD0iMTUiIGhlaWdodD0iMTMiIHJ4PSIxLjUiIHJ5PSIxLjUiPjwvcmVjdD48bGluZSB4MT0iLjUiIHkxPSI1LjUiIHgyPSIxNS41IiB5Mj0iNS41Ij48L2xpbmU+PGxpbmUgeDE9IjIuNSIgeTE9IjMuNSIgeDI9IjUuNSIgeTI9IjMuNSIgc3Ryb2tlPSIjMTExMTExIj48L2xpbmU+PC9nPjwvc3ZnPg==",painting:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9IiMxMTExMTEiIHN0cm9rZT0iIzExMTExMSI+PHJlY3QgeD0iMS41IiB5PSIzLjUiIHdpZHRoPSIxMyIgaGVpZ2h0PSIxMSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMTExMTExIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjwvcmVjdD4gPGxpbmUgeDE9IjQuNSIgeTE9IjAuNSIgeDI9IjExLjUiIHkyPSIwLjUiIGZpbGw9Im5vbmUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZGF0YS1jb2xvcj0iY29sb3ItMiI+PC9saW5lPiA8cG9seWdvbiBwb2ludHM9IjMuNSAxMi41IDkuNSA3LjUgMTIuNSAxMi41IDMuNSAxMi41IiBmaWxsPSJub25lIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGRhdGEtY29sb3I9ImNvbG9yLTIiPjwvcG9seWdvbj4gPGNpcmNsZSBjeD0iNSIgY3k9IjciIHI9IjEiIGRhdGEtY2FwPSJidXR0IiBkYXRhLWNvbG9yPSJjb2xvci0yIiBkYXRhLXN0cm9rZT0ibm9uZSIgc3Ryb2tlPSJub25lIj48L2NpcmNsZT48L2c+PC9zdmc+",plug:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9IiMxMTExMTEiIHN0cm9rZT0iIzExMTExMSI+PGxpbmUgeDE9IjQuNSIgeTE9IjMuNSIgeDI9IjE0LjUiIHkyPSIzLjUiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+IDxsaW5lIHgxPSI2LjUiIHkxPSIzLjUiIHgyPSI2LjUiIHkyPSIwLjUiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+IDxsaW5lIHgxPSIxMi41IiB5MT0iMy41IiB4Mj0iMTIuNSIgeTI9IjAuNSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMTExMTExIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4gPHBhdGggZD0iTTUuNSwzLjV2M2E0LDQsMCwwLDAsNCw0aDBhNCw0LDAsMCwwLDQtNHYtMyIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMTExMTExIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4gPHBvbHlsaW5lIHBvaW50cz0iOS41IDEyLjUgOS41IDE1LjUgMC41IDE1LjUgMC41IDExLjUiIGZpbGw9Im5vbmUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZGF0YS1jb2xvcj0iY29sb3ItMiIvPjwvZz48L3N2Zz4=",printer:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBmaWxsPSIjMTExMTExIj48cG9seWxpbmUgcG9pbnRzPSIzLjUgMy41IDMuNSAwLjUgMTIuNSAwLjUgMTIuNSAzLjUiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkYXRhLWNvbG9yPSJjb2xvci0yIj48L3BvbHlsaW5lPiA8cGF0aCBkPSJNMy41LDEyLjVILjV2LTRhMywzLDAsMCwxLDMtM2g5YTMsMywwLDAsMSwzLDN2NGgtMyIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMTExMTExIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjwvcGF0aD4gPHJlY3QgeD0iMy41IiB5PSI5LjUiIHdpZHRoPSI5IiBoZWlnaHQ9IjYiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48L3JlY3Q+PC9nPjwvc3ZnPg==",question:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9IiMxMTExMTEiIHN0cm9rZT0iIzExMTExMSI+PGNpcmNsZSBkYXRhLWNvbG9yPSJjb2xvci0yIiBkYXRhLXN0cm9rZT0ibm9uZSIgY3g9IjgiIGN5PSIxNSIgcj0iMSIgc3Ryb2tlPSJub25lIj48L2NpcmNsZT4gPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMTExMTExIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgZD0iTTUuNSwyLjM5NyBjMS41LTEuMzU0LDQuNzUyLTEuMzMsNS4zOSwxQzExLjcxOSw2LjQyMiw4LDYuNSw4LDExIj48L3BhdGg+IDwvZz48L3N2Zz4=","question-box":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48Y2lyY2xlIGN4PSI4IiBjeT0iMTIiIHI9IjEiIHN0cm9rZT0ibm9uZSIgZmlsbD0iIzExMTExMSI+PC9jaXJjbGU+PHBhdGggZD0iTTYuNSw0LjA3N2MuOTUzLS44NiwzLjAxOC0uODQ1LDMuNDIzLjYzNUMxMC40NSw2LjYzNCw4LDYuNjQyLDgsOS41IiBzdHJva2U9IiMxMTExMTEiPjwvcGF0aD48cmVjdCB4PSIwLjUiIHk9IjAuNSIgd2lkdGg9IjE1IiBoZWlnaHQ9IjE1IiByeD0iMS41Ij48L3JlY3Q+PC9nPjwvc3ZnPg==",search:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9IiMxMTExMTEiIHN0cm9rZT0iIzExMTExMSI+PGNpcmNsZSBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBjeD0iNy41IiBjeT0iNy41IiByPSI2Ij48L2NpcmNsZT4gPGxpbmUgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMTExMTExIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgeDE9IjE1LjUiIHkxPSIxNS41IiB4Mj0iMTEuNzQyIiB5Mj0iMTEuNzQyIj48L2xpbmU+IDwvZz48L3N2Zz4=",share:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9IiMxMTExMTEiIHN0cm9rZT0iIzExMTExMSI+PGxpbmUgZGF0YS1jb2xvcj0iY29sb3ItMiIgZmlsbD0ibm9uZSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHgxPSI3IiB5MT0iNS45MDUiIHgyPSI5Ljk4NCIgeTI9IjQuMzQyIj48L2xpbmU+IDxsaW5lIGRhdGEtY29sb3I9ImNvbG9yLTIiIGZpbGw9Im5vbmUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiB4MT0iNyIgeTE9IjEwLjA5NSIgeDI9IjkuOTg0IiB5Mj0iMTEuNjU4Ij48L2xpbmU+IDxjaXJjbGUgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMTExMTExIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgY3g9IjEzLjUiIGN5PSIyLjUiIHI9IjIiPjwvY2lyY2xlPiA8Y2lyY2xlIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIGN4PSIxMy41IiBjeT0iMTMuNSIgcj0iMiI+PC9jaXJjbGU+IDxjaXJjbGUgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMTExMTExIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgY3g9IjMiIGN5PSI4IiByPSIyLjUiPjwvY2lyY2xlPiA8L2c+PC9zdmc+","shopping-cart":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48cGF0aCBkPSJNLjUsLjVIMy41djcuNWMwLC44MjgsLjY3MiwxLjUsMS41LDEuNWg3LjQxOWMuNjQ2LDAsMS4yMTktLjQxMywxLjQyMy0xLjAyNmwxLjY1OC00Ljk3NEgzLjUiPjwvcGF0aD48Y2lyY2xlIGN4PSI0IiBjeT0iMTQiIHI9IjEuNSIgc3Ryb2tlPSIjMTExMTExIj48L2NpcmNsZT48Y2lyY2xlIGN4PSIxMyIgY3k9IjE0IiByPSIxLjUiIHN0cm9rZT0iIzExMTExMSI+PC9jaXJjbGU+PC9nPjwvc3ZnPg==",sliders:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBmaWxsPSIjMTExMTExIj48bGluZSBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiB4MT0iMTIuNSIgeTE9IjEyLjUiIHgyPSIxNS41IiB5Mj0iMTIuNSI+PC9saW5lPiA8bGluZSBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiB4MT0iMC41IiB5MT0iMy41IiB4Mj0iMy41IiB5Mj0iMy41Ij48L2xpbmU+IDxsaW5lIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHgxPSI5LjUiIHkxPSIzLjUiIHgyPSIxNS41IiB5Mj0iMy41Ij48L2xpbmU+IDxyZWN0IGRhdGEtY29sb3I9ImNvbG9yLTIiIHg9IjMuNSIgeT0iMC41IiBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiB3aWR0aD0iMyIgaGVpZ2h0PSI2Ij48L3JlY3Q+IDxyZWN0IGRhdGEtY29sb3I9ImNvbG9yLTIiIHg9IjkuNSIgeT0iOS41IiBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiB3aWR0aD0iMyIgaGVpZ2h0PSI2Ij48L3JlY3Q+IDxsaW5lIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHgxPSIwLjUiIHkxPSIxMi41IiB4Mj0iNi41IiB5Mj0iMTIuNSI+PC9saW5lPiA8L2c+PC9zdmc+",speed:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9IiMxMTExMTEiIHN0cm9rZT0iIzExMTExMSI+PGxpbmUgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMTExMTExIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgeDE9IjkuNSIgeTE9IjYuNSIgeDI9IjExLjY5MiIgeTI9IjQuMzA4Ij48L2xpbmU+IDxjaXJjbGUgZGF0YS1jb2xvcj0iY29sb3ItMiIgZmlsbD0ibm9uZSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIGN4PSIyLjUiIGN5PSIxMy41IiByPSIyIj48L2NpcmNsZT4gPGxpbmUgZGF0YS1jb2xvcj0iY29sb3ItMiIgZmlsbD0ibm9uZSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHgxPSI2LjUiIHkxPSI5LjUiIHgyPSIzLjkxNCIgeTI9IjEyLjA4NiI+PC9saW5lPiA8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBkPSJNMi41LDMuNXYtMyBjNy4xOCwwLDEzLDUuODIsMTMsMTNoLTMiPjwvcGF0aD4gPC9nPjwvc3ZnPg==",star:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBmaWxsPSIjMTExMTExIj48cG9seWdvbiBwb2ludHM9IjggMC44NjcgMTAuMzE4IDUuNTYzIDE1LjUgNi4zMTYgMTEuNzUgOS45NzEgMTIuNjM1IDE1LjEzMyA4IDEyLjY5NiAzLjM2NSAxNS4xMzMgNC4yNSA5Ljk3MSAwLjUgNi4zMTYgNS42ODIgNS41NjMgOCAwLjg2NyIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMTExMTExIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGRhdGEtY2FwPSJidXR0Ij48L3BvbHlnb24+PC9nPjwvc3ZnPg==",support:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9IiMxMTExMTEiIHN0cm9rZT0iIzExMTExMSI+PGNpcmNsZSBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBjeD0iOCIgY3k9IjgiIHI9IjcuNSI+PC9jaXJjbGU+IDxjaXJjbGUgZmlsbD0ibm9uZSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIGN4PSI4IiBjeT0iOCIgcj0iMy41IiBkYXRhLWNvbG9yPSJjb2xvci0yIj48L2NpcmNsZT4gPGxpbmUgZmlsbD0ibm9uZSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHgxPSIxMC40NzQiIHkxPSI1LjUyNiIgeDI9IjEzLjMwMyIgeTI9IjIuNjk3IiBkYXRhLWNvbG9yPSJjb2xvci0yIj48L2xpbmU+IDxsaW5lIGZpbGw9Im5vbmUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiB4MT0iMTAuNDc0IiB5MT0iMTAuNDc0IiB4Mj0iMTMuMzAzIiB5Mj0iMTMuMzAzIiBkYXRhLWNvbG9yPSJjb2xvci0yIj48L2xpbmU+IDxsaW5lIGZpbGw9Im5vbmUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiB4MT0iNS41MjYiIHkxPSIxMC40NzQiIHgyPSIyLjY5NyIgeTI9IjEzLjMwMyIgZGF0YS1jb2xvcj0iY29sb3ItMiI+PC9saW5lPiA8bGluZSBmaWxsPSJub25lIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgeDE9IjUuNTI2IiB5MT0iNS41MjYiIHgyPSIyLjY5NyIgeTI9IjIuNjk3IiBkYXRhLWNvbG9yPSJjb2xvci0yIj48L2xpbmU+PC9nPjwvc3ZnPg==",text:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBmaWxsPSIjMTExMTExIj48cmVjdCB4PSIwLjUiIHk9IjAuNSIgd2lkdGg9IjE1IiBoZWlnaHQ9IjE1IiByeD0iMSIgcnk9IjEiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48L3JlY3Q+IDxwb2x5bGluZSBwb2ludHM9IjExLjUgMTIuNSA4LjUgMy41IDcuNSAzLjUgNC41IDEyLjUiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkYXRhLWNvbG9yPSJjb2xvci0yIj48L3BvbHlsaW5lPiA8bGluZSB4MT0iMy41IiB5MT0iMTIuNSIgeDI9IjYuNSIgeTI9IjEyLjUiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkYXRhLWNvbG9yPSJjb2xvci0yIj48L2xpbmU+IDxsaW5lIHgxPSI5LjUiIHkxPSIxMi41IiB4Mj0iMTIuNSIgeTI9IjEyLjUiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkYXRhLWNvbG9yPSJjb2xvci0yIj48L2xpbmU+IDxsaW5lIHgxPSI1LjgzMyIgeTE9IjguNSIgeDI9IjEwLjE2NyIgeTI9IjguNSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMTExMTExIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGRhdGEtY29sb3I9ImNvbG9yLTIiPjwvbGluZT48L2c+PC9zdmc+",timeline:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj4gPGxpbmUgeDE9IjgiIHkxPSIwLjUiIHgyPSI4IiB5Mj0iMTUuNSIgZGF0YS1jYXA9ImJ1dHQiIHN0cm9rZT0iIzExMTExMSI+PC9saW5lPiA8cmVjdCB4PSIxMS41IiB5PSIxLjUiIHdpZHRoPSI0IiBoZWlnaHQ9IjQiIGRhdGEtY2FwPSJidXR0Ij48L3JlY3Q+IDxsaW5lIHgxPSI4IiB5MT0iMy41IiB4Mj0iOS41IiB5Mj0iMy41IiBkYXRhLWNhcD0iYnV0dCIgc3Ryb2tlPSIjMTExMTExIj48L2xpbmU+IDxyZWN0IHg9IjExLjUiIHk9IjEwLjUiIHdpZHRoPSI0IiBoZWlnaHQ9IjQiIGRhdGEtY2FwPSJidXR0Ij48L3JlY3Q+IDxsaW5lIHgxPSI4IiB5MT0iMTIuNSIgeDI9IjkuNSIgeTI9IjEyLjUiIGRhdGEtY2FwPSJidXR0IiBzdHJva2U9IiMxMTExMTEiPjwvbGluZT4gPHJlY3QgeD0iMC41IiB5PSI2IiB3aWR0aD0iNCIgaGVpZ2h0PSI0IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg1IDE2KSByb3RhdGUoLTE4MCkiIGRhdGEtY2FwPSJidXR0Ij48L3JlY3Q+IDxsaW5lIHgxPSI4IiB5MT0iOCIgeDI9IjYuNSIgeTI9IjgiIGRhdGEtY2FwPSJidXR0IiBzdHJva2U9IiMxMTExMTEiPjwvbGluZT4gPC9nPjwvc3ZnPg==",undo:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9IiMxMTExMTEiIHN0cm9rZT0iIzExMTExMSI+PHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIGQ9Ik04LjUsMTUuNSBjMS4xMywwLDIuMTk4LTAuMjY4LDMuMTQ0LTAuNzQ0IiBkYXRhLWNvbG9yPSJjb2xvci0yIi8+IDxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBkPSJNMy4zMDYsMTMuMTkzIGMwLjYxNiwwLjY4MiwxLjM2NSwxLjI0MiwyLjIwNiwxLjYzOSIgZGF0YS1jb2xvcj0iY29sb3ItMiIvPiA8cGF0aCBmaWxsPSJub25lIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgZD0iTTEuNSw4LjUgYzAsMC44ODEsMC4xNjMsMS43MjQsMC40NiwyLjUiIGRhdGEtY29sb3I9ImNvbG9yLTIiLz4gPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMTExMTExIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgZD0iTTEzLjc5NywxMy4wNzYgQzE0Ljg1OCwxMS44NDksMTUuNSwxMC4yNSwxNS41LDguNWMwLTMuODY2LTMuMTM0LTctNy03Yy0yLjYzNiwwLTQuODI4LDEuNjQxLTYsNCIvPiA8cG9seWxpbmUgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMTExMTExIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgcG9pbnRzPSIyLjUsMC41IDIuNSw1LjUgNy41LDUuNSAiLz48L2c+PC9zdmc+",up:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBmaWxsPSIjMTExMTExIj48cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiMxMTExMTEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBkPSJNMTQuNSw4LjVMOCwwLjUgbC02LjUsOGg0VjEzYzAsMS4zODEsMS4xMTksMi41LDIuNSwyLjVoMGMxLjM4MSwwLDIuNS0xLjExOSwyLjUtMi41VjguNUgxNC41eiI+PC9wYXRoPjwvZz48L3N2Zz4=",warning:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48ZyBjbGFzcz0ibmMtaWNvbi13cmFwcGVyIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9IiMxMTExMTEiIHN0cm9rZT0iIzExMTExMSI+PGNpcmNsZSBkYXRhLWNvbG9yPSJjb2xvci0yIiBkYXRhLXN0cm9rZT0ibm9uZSIgY3g9IjguNSIgY3k9IjEyIiByPSIxIiBzdHJva2U9Im5vbmUiLz4gPGxpbmUgZGF0YS1jb2xvcj0iY29sb3ItMiIgZmlsbD0ibm9uZSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHgxPSI4LjUiIHkxPSI2IiB4Mj0iOC41IiB5Mj0iOS41Ii8+IDxwb2x5Z29uIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzExMTExMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHBvaW50cz0iMS41LDE0LjUgOC41LDEuNSAxNS41LDE0LjUgIi8+IDwvZz48L3N2Zz4="},f=t=>{let e=!!h.hasOwnProperty(t.type)&&h[t.type];return e?r.createElement("span",{className:"wprm-settings-icon"},r.createElement(u.A,{src:e})):r.createElement("span",{className:"wprm-settings-noicon"}," ")},d=t=>{let e=[];for(let n of t.structure)c.dependencyMet(n,t.settings)&&(n.hasOwnProperty("header")?e.push({header:n.header}):e.push({id:n.id,name:n.name,icon:!!n.hasOwnProperty("icon")&&n.icon}));return r.createElement("div",{id:"wprm-settings-sidebar"},r.createElement("div",{id:"wprm-settings-buttons"},r.createElement("button",{className:"button button-primary",disabled:t.savingChanges||!t.settingsChanged,onClick:t.onSaveChanges},t.savingChanges?"...":"Save Changes"),r.createElement("button",{className:"button",disabled:t.savingChanges||!t.settingsChanged,onClick:t.onCancelChanges},"Cancel Changes")),r.createElement("div",{id:"wprm-settings-menu"},e.map(((t,e)=>t.hasOwnProperty("header")?r.createElement("div",{className:"wprm-settings-menu-header",key:e},t.header):r.createElement(l.N_,{to:`wprm-settings-group-${t.id}`,className:"wprm-settings-menu-group",activeClass:"active",spy:!0,offset:-42,smooth:!0,duration:400,key:e},t.icon&&r.createElement(f,{type:t.icon})," ",t.name)))))};d.propTypes={structure:a().array.isRequired,settingsChanged:a().bool.isRequired,savingChanges:a().bool.isRequired,onSaveChanges:a().func.isRequired,onCancelChanges:a().func.isRequired};const p=d,g=t=>{if(!t.object.hasOwnProperty("required"))return null;if(wprm_admin.addons.hasOwnProperty(t.object.required)&&wprm_admin.addons[t.object.required])return null;let e="Premium Only";if("premium"!==t.object.required){e=`${t.object.required[0].toUpperCase()+t.object.required.substring(1)} Bundle Only`}return r.createElement("a",{href:"https://bootstrapped.ventures/wp-recipe-maker/get-the-plugin/",target:"_blank",className:"wprm-setting-required"},e)};g.propTypes={object:a().object.isRequired};const m=g;var b=n(3297),v=n(4406),y=n(9257);class x extends r.Component{constructor(t){super(t),this.state={initialValue:t.value,value:t.value,indicatedChange:!1},this.onChange=this.onChange.bind(this),this.updateParent=this.updateParent.bind(this)}shouldComponentUpdate(t){return!1}onChange(t){let e={value:t},n=!1;t!==this.state.initialValue?(n=!0,e.indicatedChange=!0):this.state.indicatedChange&&(n=!0,e.indicatedChange=!1),this.setState(e,(()=>{n&&this.updateParent()}))}updateParent(){this.props.onValueChange(this.state.value)}render(){return r.createElement(b.Ay,{className:"wprm-setting-input",value:this.state.value,onChange:this.onChange,extensions:[(0,y.AH)(),v.Qs({blur:()=>{this.updateParent()}})]})}}var w=n(9325),S=n(8482);class O extends r.Component{constructor(t){super(t),this.state={displayColorPicker:!1}}handleClick(){this.setState({displayColorPicker:!this.state.displayColorPicker})}handleClose(){this.setState({displayColorPicker:!1})}handleChange(t){this.props.onValueChange(t.hex)}render(){const t=(0,w.Ay)({default:{color:{width:"36px",height:"14px",borderRadius:"2px",background:`${this.props.value}`},swatch:{padding:"5px",background:"#fff",borderRadius:"1px",boxShadow:"0 0 0 1px rgba(0,0,0,.1)",display:"inline-block",cursor:"pointer"},popover:{position:"absolute",zIndex:"2"},cover:{position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}}});return r.createElement("div",{className:"wprm-setting-input"},r.createElement("div",{style:t.swatch,onClick:this.handleClick.bind(this)},r.createElement("div",{style:t.color})),this.state.displayColorPicker?r.createElement("div",{style:t.popover},r.createElement("div",{style:t.cover,onClick:this.handleClose.bind(this)}),r.createElement(S.Xq,{color:this.props.value,onChange:this.handleChange.bind(this),disableAlpha:!0})):null)}}O.propTypes={setting:a().object.isRequired,value:a().any.isRequired,onValueChange:a().func.isRequired};var I=n(4901);const k=t=>{let e=[];for(let n in t.setting.options)e.push({value:n,label:t.setting.options[n]});return r.createElement(I.Ay,{className:"wprm-setting-input",value:e.filter((({value:e})=>e===t.value)),onChange:e=>t.onValueChange(e.value),options:e,clearable:!1})};k.propTypes={setting:a().object.isRequired,value:a().any.isRequired,onValueChange:a().func.isRequired};const E=k,M=t=>{let e=[];for(let n in t.setting.options)e.push({value:n,label:t.setting.options[n]});return r.createElement(I.Ay,{className:"wprm-setting-input",value:e.filter((({value:e})=>t.value.includes(e))),isMulti:!0,onChange:e=>{const n=Array.isArray(e)?e:[e];return t.onValueChange(n.map((t=>t.value)))},options:e})};M.propTypes={setting:a().object.isRequired,value:a().any.isRequired,onValueChange:a().func.isRequired};const C=M;var A=n(7466);class j extends r.Component{getOptions(t){return t?fetch(wprm_admin.ajax_url,{method:"POST",credentials:"same-origin",body:"action=wprm_search_recipes&security="+wprm_admin.nonce+"&search="+encodeURIComponent(t),headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/x-www-form-urlencoded; charset=utf-8"}}).then((t=>t.json())).then((t=>t.data.recipes_with_id)):Promise.resolve({options:[]})}render(){let t=JSON.parse(JSON.stringify(wprm_admin.latest_recipes));if(this.props.setting.hasOwnProperty("options"))for(let n in this.props.setting.options)t.unshift({id:n,text:this.props.setting.options[n]});const e="demo"===this.props.value||"demo"===this.props.value.id;return r.createElement("div",{className:"wprm-main-container-preview-recipe"},r.createElement(A.Ay,{placeholder:"Select or search a recipe",value:e?t[0]:this.props.value,onChange:this.props.onValueChange,getOptionValue:({id:t})=>t,getOptionLabel:({text:t})=>t,defaultOptions:t,loadOptions:this.getOptions.bind(this),noOptionsMessage:()=>"Create a recipe on the Manage page",clearable:!1}))}}const P=t=>{let e=[];const n=wprm_admin.recipe_templates.legacy;for(let i in n)e.push({value:i,label:n[i].name});return r.createElement(I.Ay,{className:"wprm-setting-input",value:e.filter((({value:e})=>e===t.value)),onChange:e=>t.onValueChange(e.value),options:e,clearable:!1})};P.propTypes={setting:a().object.isRequired,value:a().any.isRequired,onValueChange:a().func.isRequired};const T=P,N=t=>{const e=wprm_admin.recipe_templates.modern;let n=[],i={recipe:[],snippet:[],roundup:[]};Object.entries(e).forEach((([t,e])=>{if(!e.premium||wprm_admin.addons.premium){const r={value:t,label:e.name};"snippet"===e.type?i.snippet.push(r):"roundup"===e.type?i.roundup.push(r):i.recipe.push(r),n.push(r)}}));let o={general:!1,recipe:{label:"Full Recipe Templates",options:i.recipe},snippet:{label:"Snippet Templates",options:i.snippet},roundup:{label:"Roundup Templates",options:i.roundup}};if(t.setting.hasOwnProperty("options")){let e=[];for(let i in t.setting.options){let r={value:i,label:t.setting.options[i]};e.push(r),n.push(r)}o.general={label:"General",options:e}}let s=[];const a=!!(t.setting.hasOwnProperty("priority")&&t.setting.priority&&o.hasOwnProperty(t.setting.priority))&&t.setting.priority;return a&&s.push(o[a]),Object.entries(o).forEach((([t,e])=>{t!==a&&!1!==e&&s.push(e)})),r.createElement(I.Ay,{className:"wprm-setting-input",value:n.filter((({value:e})=>e===t.value)),onChange:e=>t.onValueChange(e.value),options:s,clearable:!1})};N.propTypes={setting:a().object.isRequired,value:a().any.isRequired,onValueChange:a().func.isRequired};const _=N,L=t=>r.createElement("input",{className:"wprm-setting-input",type:"email",value:t.value,onChange:e=>t.onValueChange(e.target.value)});L.propTypes={setting:a().object.isRequired,value:a().any.isRequired,onValueChange:a().func.isRequired};const D=L,R=t=>r.createElement(r.Fragment,null,r.createElement("input",{className:"wprm-setting-input",type:"number",value:t.value,onChange:e=>t.onValueChange(e.target.value)}),t.setting.hasOwnProperty("suffix")?r.createElement("span",{className:"wprm-setting-number-suffix"}," ",t.setting.suffix):null);R.propTypes={setting:a().object.isRequired,value:a().any.isRequired,onValueChange:a().func.isRequired};const B=R;var H=n(6698),z=n.n(H);const W=t=>r.createElement(z(),{className:"wprm-setting-input",theme:"snow",value:t.value,onChange:(e,n,i)=>{"<p></p>"!==e&&"<p><br></p>"!==e&&"<p><br/></p>"!==e||(e=""),t.onValueChange(e)},modules:{toolbar:[[{header:[1,2,!1]}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"}],["link"]]}});W.propTypes={setting:a().object.isRequired,value:a().any.isRequired,onValueChange:a().func.isRequired};const U=W,F=t=>r.createElement("input",{className:"wprm-setting-input",type:"text",value:t.value,onChange:e=>t.onValueChange(e.target.value)});F.propTypes={setting:a().object.isRequired,value:a().any.isRequired,onValueChange:a().func.isRequired};const G=F,Z=t=>{const e=t.setting.hasOwnProperty("rows")?t.setting.rows:5;return r.createElement("textarea",{className:"wprm-setting-input",value:t.value,rows:e,onChange:e=>t.onValueChange(e.target.value)})};Z.propTypes={setting:a().object.isRequired,value:a().any.isRequired,onValueChange:a().func.isRequired};const V=Z;var q=n(8058);const Y=t=>r.createElement(q.A,{className:"wprm-setting-input",checked:t.value,"aria-label":t.setting.name,onChange:e=>t.onValueChange(e.target.checked)});Y.propTypes={setting:a().object.isRequired,value:a().any.isRequired,onValueChange:a().func.isRequired};const J=Y,Q=t=>{const e=t.value,n=(e,n,i)=>{let r=t.value[e];r[n]=i;let o=t.value;o[e]=r,t.onValueChange(o)};return r.createElement(l.Hg,{className:"wprm-setting-container",name:t.setting.id},r.createElement("table",{className:"wprm-setting-unit-conversion-units"},r.createElement("thead",null,r.createElement("tr",null,r.createElement("th",null," "),r.createElement("th",null,"Aliases"),r.createElement("th",null,"Singular"),r.createElement("th",null,"Plural"))),r.createElement("tbody",null,Object.keys(e).map(((t,i)=>r.createElement("tr",{key:i},r.createElement("th",{scope:"row"},e[t].label),r.createElement("td",null,r.createElement("input",{className:"wprm-setting-unit-conversion-units-aliases",type:"text",value:e[t].aliases,onChange:e=>n(t,"aliases",e.target.value)})),r.createElement("td",null,r.createElement("input",{className:"wprm-setting-unit-conversion-units-singular",type:"text",value:e[t].singular,onChange:e=>n(t,"singular",e.target.value)})),r.createElement("td",null,r.createElement("input",{className:"wprm-setting-unit-conversion-units-plural",type:"text",value:e[t].plural,onChange:e=>n(t,"plural",e.target.value)}))))))))};Q.propTypes={setting:a().object.isRequired,value:a().any.isRequired,onValueChange:a().func.isRequired};const X=Q,$=t=>r.createElement("button",{className:"button",onClick:e=>{e.preventDefault(),t.settingsChanged?alert("You will be leaving the settings page. Please save or cancel your changes first."):window.location=t.setting.link}},t.setting.button);$.propTypes={setting:a().object.isRequired,settingsChanged:a().bool.isRequired};const K={code:x,color:O,dropdown:E,dropdownMultiselect:C,dropdownRecipe:j,dropdownTemplateLegacy:T,dropdownTemplateModern:_,email:D,number:B,richTextarea:U,text:G,textarea:V,toggle:J,unitConversionUnits:X},tt={button:$},et=t=>{const e=!!K.hasOwnProperty(t.setting.type)&&K[t.setting.type],n=!!tt.hasOwnProperty(t.setting.type)&&tt[t.setting.type],i=!!e&&c.beforeSettingDisplay(t.setting.id,t.settings);return"unitConversionUnits"===t.setting.type?r.createElement(e,{setting:t.setting,settingsChanged:t.settingsChanged,onValueChange:e=>{const n=c.beforeSettingSave(e,t.setting.id,t.settings);return t.onSettingChange(t.setting.id,n)},value:i}):r.createElement(l.Hg,{className:"wprm-setting-container",name:t.setting.id},r.createElement("div",{className:"wprm-setting-label-container"},r.createElement("span",{className:"wprm-setting-label"},r.createElement(m,{object:t.setting}),t.setting.name),r.createElement("span",{className:"wprm-setting-description"},t.setting.description),t.setting.hasOwnProperty("documentation")?r.createElement("a",{href:t.setting.documentation,target:"_blank",className:"wprm-setting-documentation"},t.setting.hasOwnProperty("documentation_text")?t.setting.documentation_text:"Learn More"):null),r.createElement("div",{className:"wprm-setting-input-container"},e?r.createElement(e,{setting:t.setting,settingsChanged:t.settingsChanged,onValueChange:e=>{const n=c.beforeSettingSave(e,t.setting.id,t.settings);return t.onSettingChange(t.setting.id,n)},value:i}):null,n?r.createElement(n,{setting:t.setting,settingsChanged:t.settingsChanged}):null))};et.propTypes={settings:a().object.isRequired,setting:a().object.isRequired,onSettingChange:a().func.isRequired,settingsChanged:a().bool.isRequired};const nt=et;class it extends r.Component{constructor(t){super(t),this.state={hasError:!1}}componentDidCatch(t,e){this.setState({hasError:!0})}render(){return r.createElement(r.Fragment,null,this.state.hasError?r.createElement("div",{className:"wprm-settings-error"},"Something went wrong with this setting. Please contact support."):this.props.children)}}const rt=t=>r.createElement("div",{className:"wprm-settings-group-container"},t.outputSettings.map(((e,n)=>c.dependencyMet(e,t.settings)?r.createElement(it,{key:n},r.createElement(nt,{settings:t.settings,setting:e,settingsChanged:t.settingsChanged,onSettingChange:t.onSettingChange,value:t.settings[e.id],key:n})):null)));rt.propTypes={settings:a().object.isRequired,outputSettings:a().array.isRequired,onSettingChange:a().func.isRequired,settingsChanged:a().bool.isRequired};const ot=rt,st=t=>r.createElement("div",{className:"wprm-settings-subgroup"},r.createElement("h3",{className:"wprm-settings-subgroup-name"},r.createElement(m,{object:t.subgroup}),t.subgroup.name),t.subgroup.hasOwnProperty("description")?r.createElement("div",{className:"wprm-settings-subgroup-description"},t.subgroup.description):null,t.subgroup.hasOwnProperty("documentation")?r.createElement("a",{href:t.subgroup.documentation,target:"_blank",className:"wprm-setting-documentation"},t.subgroup.hasOwnProperty("documentation_text")?t.subgroup.documentation_text:"Learn More"):null,t.subgroup.hasOwnProperty("settings")?r.createElement(ot,{outputSettings:t.subgroup.settings,settings:t.settings,onSettingChange:t.onSettingChange,settingsChanged:t.settingsChanged}):null);st.propTypes={subgroup:a().object.isRequired,settings:a().object.isRequired,onSettingChange:a().func.isRequired,settingsChanged:a().bool.isRequired};const at=st,lt=t=>r.createElement("div",{id:`wprm-settings-group-${t.group.id}`,className:"wprm-settings-group"},r.createElement(m,{object:t.group}),r.createElement("h2",{className:"wprm-settings-group-name"},t.group.name),t.group.hasOwnProperty("description")?r.createElement("div",{className:"wprm-settings-group-description"},t.group.description):null,t.group.hasOwnProperty("documentation")?r.createElement("a",{href:t.group.documentation,target:"_blank",className:"wprm-setting-documentation"},t.group.hasOwnProperty("documentation_text")?t.group.documentation_text:"Learn More"):null,t.group.hasOwnProperty("settings")?r.createElement(ot,{outputSettings:t.group.settings,settings:t.settings,onSettingChange:t.onSettingChange,settingsChanged:t.settingsChanged}):null,t.group.hasOwnProperty("subGroups")?t.group.subGroups.map(((e,n)=>c.dependencyMet(e,t.settings)?r.createElement(at,{settings:t.settings,onSettingChange:t.onSettingChange,settingsChanged:t.settingsChanged,subgroup:e,key:n}):null)):null);lt.propTypes={group:a().object.isRequired,settings:a().object.isRequired,settingsChanged:a().bool.isRequired,onSettingChange:a().func.isRequired};const ct=lt,ut=t=>r.createElement("div",{id:`wprm-settings-group-${t.group.id}`,className:"wprm-settings-group"},r.createElement("h2",{className:"wprm-settings-group-name"},t.group.name),r.createElement("div",{className:"wprm-settings-group-container"},r.createElement("div",{className:"wprm-setting-container"},r.createElement("div",{className:"wprm-setting-label-container"},r.createElement("span",{className:"wprm-setting-label"},"Reset to defaults"),r.createElement("span",{className:"wprm-setting-description"},"Reset all settings to their default values.")),r.createElement("div",{className:"wprm-setting-input-container"},r.createElement("button",{className:"button",onClick:t.onResetDefaults},"Reset to Defaults")))));ut.propTypes={group:a().object.isRequired,settings:a().object.isRequired,onResetDefaults:a().func.isRequired};const ht=ut,ft=t=>{let e=0;if(t.structure.length>0){const n=t.structure[t.structure.length-1],i=document.getElementById(`wprm-settings-group-${n.id}`);if(i){const t=i.getBoundingClientRect().top+window.scrollY,n=document.body.scrollHeight-t;e=window.innerHeight+42-n}}return r.createElement("div",{id:"wprm-settings-container"},t.structure.map(((e,n)=>e.hasOwnProperty("description")||e.hasOwnProperty("subGroups")||e.hasOwnProperty("settings")?c.dependencyMet(e,t.settings)?r.createElement(ct,{settings:t.settings,onSettingChange:t.onSettingChange,settingsChanged:t.settingsChanged,group:e,key:n}):null:"settingsTools"===e.id?r.createElement(ht,{settings:t.settings,onResetDefaults:t.onResetDefaults,group:e,key:n}):void 0)),r.createElement("div",{className:"wprm-settings-spacer",style:{height:e}}))};ft.propTypes={structure:a().array.isRequired,settings:a().object.isRequired,settingsChanged:a().bool.isRequired,onSettingChange:a().func.isRequired,onResetDefaults:a().func.isRequired};const dt=ft;class pt extends r.Component{constructor(t){super(t),this.state={savedSettings:{...wprm_settings.settings},currentSettings:{...wprm_settings.settings},savingChanges:!1}}onSettingChange(t,e){let n=this.state.currentSettings;n[t]=e,this.setState({currentSettings:n},(()=>{"features_custom_style"===t&&l.XG.scrollTo(t,{smooth:!0,duration:400,offset:-110})}))}onSaveChanges(){this.setState({savingChanges:!0}),o.A.settings.save(this.state.currentSettings).then((t=>{t?this.setState({savingChanges:!1,savedSettings:{...t},currentSettings:{...t}}):this.setState({savingChanges:!1})}))}onCancelChanges(){confirm("Are you sure you want to cancel the changes you made?")&&this.setState({currentSettings:{...this.state.savedSettings}})}onResetDefaults(){confirm("Are you sure you want to reset the settings to their default values? This will not save them yet.")&&this.setState({currentSettings:{...this.state.savedSettings,...wprm_settings.defaults}})}scrollToTop(){l.Nk.scrollToTop()}componentDidMount(){window.addEventListener("beforeunload",this.beforeWindowClose.bind(this))}componentWillUnmount(){window.removeEventListener("beforeunload",this.beforeWindowClose.bind(this))}beforeWindowClose(t){if(this.settingsChanged())return!1}settingsChanged(){return JSON.stringify(this.state.savedSettings)!==JSON.stringify(this.state.currentSettings)}render(){return r.createElement("div",null,r.createElement(p,{structure:wprm_settings.structure,settings:this.state.currentSettings,settingsChanged:this.settingsChanged(),savingChanges:this.state.savingChanges,onSaveChanges:this.onSaveChanges.bind(this),onCancelChanges:this.onCancelChanges.bind(this)}),r.createElement(dt,{structure:wprm_settings.structure,settings:this.state.currentSettings,settingsChanged:this.settingsChanged(),onSettingChange:this.onSettingChange.bind(this),onResetDefaults:this.onResetDefaults.bind(this)}),r.createElement("a",{href:"#",className:"wprm-settings-scroll-to-top",onClick:this.scrollToTop},r.createElement(f,{type:"up"})))}}i.render(r.createElement(pt,null),document.getElementById("wprm-settings"))},5044:(t,e,n)=>{"use strict";n.d(e,{A:()=>U});var i=n(409);const r=wprm_admin.endpoints.analytics,o={delete:t=>i.A.call(`${r}/${t}`,"DELETE")},s=wprm_admin.endpoints.custom_taxonomies,a={save(t,e){const n={...e},r=t?"PUT":"POST";return i.A.call(s,r,n)}},l=wprm_admin.endpoints.dashboard,c={getAnalytics:()=>i.A.call(`${l}/analytics`)},u=wprm_admin.endpoints.notices,h={dismissNotice(t){const e={id:t};return i.A.call(u,"DELETE",e)}},f=wprm_admin.endpoints.modal,d={parseIngredients(t){const e={ingredients:t};return i.A.call(`${f}/ingredient/parse`,"POST",e)}},p=wprm_admin.endpoints.list,g={get:t=>i.A.call(`${p}/${t}?t=${Date.now()}`),save(t){const e={list:t};let n=p,r="POST";const o=!!t.id&&parseInt(t.id);return o&&(n+=`/${o}`,r="PUT"),i.A.call(n,r,e)},updateStatus(t,e){const n={status:e};return i.A.call(`${p}/${t}`,"PUT",n)},delete(t,e=!1){let n=`${p}/${t}`;return e&&(n+="?force=true"),i.A.call(n,"DELETE")}},m=wprm_admin.endpoints.manage,b=wprm_admin.endpoints.rating,v=wprm_admin.endpoints.taxonomy;let y=!1,x=!1;const w={getData(t){return y?(x=t,new Promise((t=>t(!1)))):this.getDataDebounced(t)},getDataDebounced(t){return y=!0,i.A.call(`${m}/${t.route}`,"POST",t).then((t=>{if(x){const t=x;return x=!1,this.getDataDebounced(t)}return y=!1,t}))},deleteUserRatings:t=>i.A.call(`${b}/recipe/${t}`,"DELETE"),getTerm:(t,e)=>i.A.call(`${v}${t}/${e}`),createTerm(t,e){const n={name:e};return i.A.call(`${v}${t}`,"POST",n)},cloneTerm(t,e,n){const r={type:t,id:e,name:n};return i.A.call(`${m}/taxonomy/clone`,"POST",r)},deleteTerm:(t,e)=>i.A.call(`${v}${t}/${e}?force=true`,"DELETE"),renameTerm(t,e,n){const r={name:n};return i.A.call(`${v}${t}/${e}`,"POST",r)},changeTermSlug(t,e,n){const r={slug:n};return i.A.call(`${v}${t}/${e}`,"POST",r)},changeTermDescription(t,e,n){const r={description:n};return i.A.call(`${v}${t}/${e}`,"POST",r)},renameTermLabel(t,e,n){const r={type:t,id:e,label:n};return i.A.call(`${m}/taxonomy/label`,"POST",r)},mergeTerm(t,e,n){const r={type:t,oldId:e,newId:n};return i.A.call(`${m}/taxonomy/merge`,"POST",r)},updateTaxonomyMeta(t,e,n){let r={};return r[t]=n,i.A.call(`${v}${t}/${e}`,"POST",r)},bulkEdit(t,e,n,r){const o={type:e,ids:n,action:r};return i.A.call(`${m}/${t}/bulk`,"POST",o)}},S=wprm_admin.endpoints.modal;let O=!1,I=!1,k=!1;const E={getSuggestions(t){return O?(k=t,new Promise((t=>t(!1)))):this.getSuggestionsDebounced(t)},getSuggestionsDebounced(t){O=!0;const e=Date.now();return!1!==I&&500>e-I?new Promise((n=>{setTimeout((()=>{n(this.getSuggestionsDebounced(t))}),e-I)})):(I=e,i.A.call(`${S}/suggest`,"POST",t).then((t=>{if(k){const t=k;return k=!1,this.getSuggestionsDebounced(t)}return O=!1,t})))}},M=wprm_admin.endpoints.rating,C={update(t){const e={rating:t};return i.A.call(`${M}`,"POST",e)},updateComment(t,e){const n={rating:e};return i.A.call(`${M}/comment/${t}`,"POST",n)},delete:t=>i.A.call(`${M}/${t}`,"DELETE")},A=wprm_admin.endpoints.recipe,j=wprm_admin.endpoints.manage,P={get:t=>i.A.call(`${A}/${t}?t=${Date.now()}`),getFrontend:t=>i.A.call(`${A}/${t}?t=${Date.now()}`),save(t){const e={recipe:t};let n=A,r="POST";const o=!!t.id&&parseInt(t.id);return o&&(n+=`/${o}`,r="PUT"),i.A.call(n,r,e)},updateStatus(t,e){const n={status:e};return i.A.call(`${A}/${t}`,"PUT",n)},delete(t,e=!1){let n=`${A}/${t}`;return e&&(n+="?force=true"),i.A.call(n,"DELETE")},deleteRevision:t=>i.A.call(`${j}/revision/${t}`,"DELETE")},T=wprm_admin.endpoints.setting,N={save(t){let e={settings:t};return i.A.call(T,"POST",e)}},_=wprm_admin.endpoints.template;let L=[],D={},R=null;const B={previewShortcode(t,e,n){return D[t]=e,clearTimeout(R),R=setTimeout((()=>{this.previewShortcodes(n)}),500),new Promise((t=>L.push(t)))},previewShortcodes(t){const e=L,n=D;L=[],D={};const i={recipeId:t,shortcodes:n};fetch(`${_}/preview`,{method:"POST",headers:{"X-WP-Nonce":wprm_admin.api_nonce,Accept:"application/json","Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(i)}).then((t=>t.json().then((n=>{let i=t.ok?n.preview:{};e.forEach((t=>t(i)))}))))},searchRecipes:t=>fetch(wprm_admin.ajax_url,{method:"POST",credentials:"same-origin",body:"action=wprm_search_recipes&security="+wprm_admin.nonce+"&search="+encodeURIComponent(t),headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/x-www-form-urlencoded; charset=utf-8"}}).then((t=>t.json())),save(t){const e={template:t};return i.A.call(_,"POST",e)},delete(t){const e={slug:t};return i.A.call(_,"DELETE",e)}},H=wprm_admin.endpoints.utilities,z={saveImage(t){const e={url:t};return i.A.call(`${H}/save_image`,"POST",e)},giveFeedback(t){const e={feedback:t};return i.A.call(`${H}/feedback`,"POST",e)},getPostSummary:t=>i.A.call(`${H}/post_summary/${t}`),previewRecipe(t){const e={json:t};return i.A.call(`${H}/preview`,"POST",e)}},{hooks:W}=WPRecipeMakerAdmin["wp-recipe-maker/dist/shared"],U=W.applyFilters("api",{analytics:o,customTaxonomy:a,dashboard:c,general:h,import:d,list:g,manage:w,modal:E,rating:C,recipe:P,settings:N,template:B,utilities:z})},409:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});const i={call(t,e="GET",n=!1){let i=wprm_admin.api_nonce;"object"==typeof window.wpApiSettings&&window.wpApiSettings.nonce&&(i=window.wpApiSettings.nonce);let r={method:e,headers:{"X-WP-Nonce":i,Accept:"application/json","Cache-Control":"no-cache, no-store, must-revalidate",Pragma:"no-cache",Expires:0},credentials:"same-origin"};"PUT"!==e&&"DELETE"!==e||(r.method="POST",r.headers["X-HTTP-Method-Override"]=e),n&&(r.headers["Content-Type"]="application/json",r.body=JSON.stringify(n));let o=0;return t=t.replace(/\?/g,(function(t){return o++,2<=o?"&":t})),fetch(t,r).then((function(e){return e.ok?e.json():(async function(t,e,n){console.log(t,e),console.log(n);let i="";const r=parseInt(n.status);let o=!1;300<=r&&r<=399?o="A redirection is breaking the API endpoint. Are any redirections set up in the .htaccess file or using a plugin?":401===r||403===r?o="Something is blocking access. Are you or your webhost using a firewall like Cloudflare WAF or Sucuri? Try whitelisting your own IP address or this specific action.":404===r?o="The rest API endpoint could not be found. Are your permalinks set up correctly?":500<=r&&r<=599&&(o="The server is throwing an error. It could be hitting a memory or execution limit. Check with your webhost what the exact error is in the logs.");o&&(i+=`${o}\r\n\r\n`);i+="Press OK to contact support@bootstrapped.ventures for support (opens an email popup).";const s=`${n.url} ${n.redirected?"(redirected)":""}- ${n.status} - ${n.statusText}`;i+=`\r\n\r\n${s}`;let a=!0;try{await n.text().then((t=>{console.log(t),-1!==t.indexOf("rest_cookie_invalid_nonce")?(alert("You got logged out or your session expired. Please try logging out of WordPress and back in again."),a=!1):i+=`\r\n\r\n${t}`}))}catch(l){console.log(l),i+=`\r\n\r\n${l}`}if(a&&confirm(i)){const t="support@bootstrapped.ventures",e="WP Recipe Maker Error Message",n=`I received the error message below at ${window.location.href}\r\n\r\n${i}`;window.open(`mailto:${encodeURIComponent(t)}?subject=${encodeURIComponent(e)}&body=${encodeURIComponent(n)}`)}}(t,r,e),!1)}))}}},7161:(t,e,n)=>{"use strict";n.d(e,{A:()=>u});var i=n(7475),r=n(5349),o="/*|*/",s=o+"}";function a(t){t&&l.current.insert(t+"}")}var l={current:null},c=function(t,e,n,i,r,c,u,h,f,d){switch(t){case 1:switch(e.charCodeAt(0)){case 64:return l.current.insert(e+";"),"";case 108:if(98===e.charCodeAt(2))return""}break;case 2:if(0===h)return e+o;break;case 3:switch(h){case 102:case 112:return l.current.insert(n[0]+e),"";default:return e+(0===d?o:"")}case-2:e.split(s).forEach(a)}};const u=function(t){void 0===t&&(t={});var e,n=t.key||"css";void 0!==t.prefix&&(e={prefix:t.prefix});var o=new r.A(e);var s,a={};s=t.container||document.head;var u,h=document.querySelectorAll("style[data-emotion-"+n+"]");Array.prototype.forEach.call(h,(function(t){t.getAttribute("data-emotion-"+n).split(" ").forEach((function(t){a[t]=!0})),t.parentNode!==s&&s.appendChild(t)})),o.use(t.stylisPlugins)(c),u=function(t,e,n,i){var r=e.name;l.current=n,o(t,e.styles),i&&(f.inserted[r]=!0)};var f={key:n,sheet:new i.v({key:n,container:s,nonce:t.nonce,speedy:t.speedy}),nonce:t.nonce,inserted:a,registered:{},insert:u};return f}},4313:(t,e,n)=>{"use strict";n.d(e,{Y:()=>l,Z2:()=>f,i7:()=>c});var i=n(7810),r=(n(7161),n(320)),o=n(9511),s=n(4221),a=n(9959),l=function(t,e){var n=arguments;if(null==e||!r.h.call(e,"css"))return i.createElement.apply(void 0,n);var o=n.length,s=new Array(o);s[0]=r.E,s[1]=(0,r.c)(t,e);for(var a=2;a<o;a++)s[a]=n[a];return i.createElement.apply(null,s)},c=function(){var t=a.A.apply(void 0,arguments),e="animation-"+t.name;return{name:e,styles:"@keyframes "+e+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},u=function t(e){for(var n=e.length,i=0,r="";i<n;i++){var o=e[i];if(null!=o){var s=void 0;switch(typeof o){case"boolean":break;case"object":if(Array.isArray(o))s=t(o);else for(var a in s="",o)o[a]&&a&&(s&&(s+=" "),s+=a);break;default:s=o}s&&(r&&(r+=" "),r+=s)}}return r};var h=function(){return null},f=(0,r.w)((function(t,e){return(0,i.createElement)(r.T.Consumer,null,(function(n){var r=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];var r=(0,s.J)(n,e.registered);return(0,o.s)(e,r,!1),e.key+"-"+r.name},a={css:r,cx:function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return function(t,e,n){var i=[],r=(0,o.R)(t,i,n);return i.length<2?n:r+e(i)}(e.registered,r,u(n))},theme:n},l=t.children(a);var c=(0,i.createElement)(h,null);return(0,i.createElement)(i.Fragment,null,c,l)}))}))},320:(t,e,n)=>{"use strict";n.d(e,{E:()=>g,T:()=>c,c:()=>f,h:()=>a,w:()=>u});var i=n(7810),r=n(7161),o=n(9511),s=n(4221),a=Object.prototype.hasOwnProperty,l=(0,i.createContext)("undefined"!=typeof HTMLElement?(0,r.A)():null),c=(0,i.createContext)({}),u=(l.Provider,function(t){var e=function(e,n){return(0,i.createElement)(l.Consumer,null,(function(i){return t(e,i,n)}))};return(0,i.forwardRef)(e)}),h="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",f=function(t,e){var n={};for(var i in e)a.call(e,i)&&(n[i]=e[i]);return n[h]=t,n},d=function(){return null},p=function(t,e,n,r){var l=null===n?e.css:e.css(n);"string"==typeof l&&void 0!==t.registered[l]&&(l=t.registered[l]);var c=e[h],u=[l],f="";"string"==typeof e.className?f=(0,o.R)(t.registered,u,e.className):null!=e.className&&(f=e.className+" ");var p=(0,s.J)(u);(0,o.s)(t,p,"string"==typeof c);f+=t.key+"-"+p.name;var g={};for(var m in e)a.call(e,m)&&"css"!==m&&m!==h&&(g[m]=e[m]);g.ref=r,g.className=f;var b=(0,i.createElement)(c,g),v=(0,i.createElement)(d,null);return(0,i.createElement)(i.Fragment,null,v,b)},g=u((function(t,e,n){return"function"==typeof t.css?(0,i.createElement)(c.Consumer,null,(function(i){return p(e,t,i,n)})):p(e,t,null,n)}))},9959:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});var i=n(4221);const r=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return(0,i.J)(e)}},2433:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});const i=function(t){for(var e,n=0,i=0,r=t.length;r>=4;++i,r-=4)e=1540483477*(65535&(e=255&t.charCodeAt(i)|(255&t.charCodeAt(++i))<<8|(255&t.charCodeAt(++i))<<16|(255&t.charCodeAt(++i))<<24))+(59797*(e>>>16)<<16),n=1540483477*(65535&(e^=e>>>24))+(59797*(e>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(r){case 3:n^=(255&t.charCodeAt(i+2))<<16;case 2:n^=(255&t.charCodeAt(i+1))<<8;case 1:n=1540483477*(65535&(n^=255&t.charCodeAt(i)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}},3613:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});const i=function(t){var e={};return function(n){return void 0===e[n]&&(e[n]=t(n)),e[n]}}},4221:(t,e,n)=>{"use strict";n.d(e,{J:()=>g});var i=n(2433),r=n(1037),o=n(3613),s=/[A-Z]|^ms/g,a=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=function(t){return 45===t.charCodeAt(1)},c=function(t){return null!=t&&"boolean"!=typeof t},u=(0,o.A)((function(t){return l(t)?t:t.replace(s,"-$&").toLowerCase()})),h=function(t,e){switch(t){case"animation":case"animationName":if("string"==typeof e)return e.replace(a,(function(t,e,n){return d={name:e,styles:n,next:d},e}))}return 1===r.A[t]||l(t)||"number"!=typeof e||0===e?e:e+"px"};function f(t,e,n,i){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return d={name:n.name,styles:n.styles,next:d},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)d={name:r.name,styles:r.styles,next:d},r=r.next;return n.styles+";"}return function(t,e,n){var i="";if(Array.isArray(n))for(var r=0;r<n.length;r++)i+=f(t,e,n[r],!1);else for(var o in n){var s=n[o];if("object"!=typeof s)null!=e&&void 0!==e[s]?i+=o+"{"+e[s]+"}":c(s)&&(i+=u(o)+":"+h(o,s)+";");else if(!Array.isArray(s)||"string"!=typeof s[0]||null!=e&&void 0!==e[s[0]]){var a=f(t,e,s,!1);switch(o){case"animation":case"animationName":i+=u(o)+":"+a+";";break;default:i+=o+"{"+a+"}"}}else for(var l=0;l<s.length;l++)c(s[l])&&(i+=u(o)+":"+h(o,s[l])+";")}return i}(t,e,n);case"function":if(void 0!==t){var o=d,s=n(t);return d=o,f(t,e,s,i)}}if(null==e)return n;var a=e[n];return void 0===a||i?n:a}var d,p=/label:\s*([^\s;\n{]+)\s*;/g;var g=function(t,e,n){if(1===t.length&&"object"==typeof t[0]&&null!==t[0]&&void 0!==t[0].styles)return t[0];var r=!0,o="";d=void 0;var s=t[0];null==s||void 0===s.raw?(r=!1,o+=f(n,e,s,!1)):o+=s[0];for(var a=1;a<t.length;a++)o+=f(n,e,t[a],46===o.charCodeAt(o.length-1)),r&&(o+=s[a]);p.lastIndex=0;for(var l,c="";null!==(l=p.exec(o));)c+="-"+l[1];return{name:(0,i.A)(o)+c,styles:o,next:d}}},7475:(t,e,n)=>{"use strict";n.d(e,{v:()=>i});var i=function(){function t(t){this.isSpeedy=void 0===t.speedy||t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.before=null}var e=t.prototype;return e.insert=function(t){if(this.ctr%(this.isSpeedy?65e3:1)==0){var e,n=function(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),void 0!==t.nonce&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e}(this);e=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(n,e),this.tags.push(n)}var i=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}(i);try{var o=105===t.charCodeAt(1)&&64===t.charCodeAt(0);r.insertRule(t,o?0:r.cssRules.length)}catch(s){0}}else i.appendChild(document.createTextNode(t));this.ctr++},e.flush=function(){this.tags.forEach((function(t){return t.parentNode.removeChild(t)})),this.tags=[],this.ctr=0},t}()},5349:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});const i=function(t){function e(t,i,l,c,f){for(var d,p,g,m,x,S=0,O=0,I=0,k=0,E=0,T=0,_=g=d=0,D=0,R=0,B=0,H=0,z=l.length,W=z-1,U="",F="",G="",Z="";D<z;){if(p=l.charCodeAt(D),D===W&&0!==O+k+I+S&&(0!==O&&(p=47===O?10:47),k=I=S=0,z++,W++),0===O+k+I+S){if(D===W&&(0<R&&(U=U.replace(h,"")),0<U.trim().length)){switch(p){case 32:case 9:case 59:case 13:case 10:break;default:U+=l.charAt(D)}p=59}switch(p){case 123:for(d=(U=U.trim()).charCodeAt(0),g=1,H=++D;D<z;){switch(p=l.charCodeAt(D)){case 123:g++;break;case 125:g--;break;case 47:switch(p=l.charCodeAt(D+1)){case 42:case 47:t:{for(_=D+1;_<W;++_)switch(l.charCodeAt(_)){case 47:if(42===p&&42===l.charCodeAt(_-1)&&D+2!==_){D=_+1;break t}break;case 10:if(47===p){D=_+1;break t}}D=_}}break;case 91:p++;case 40:p++;case 34:case 39:for(;D++<W&&l.charCodeAt(D)!==p;);}if(0===g)break;D++}if(g=l.substring(H,D),0===d&&(d=(U=U.replace(u,"").trim()).charCodeAt(0)),64===d){switch(0<R&&(U=U.replace(h,"")),p=U.charCodeAt(1)){case 100:case 109:case 115:case 45:R=i;break;default:R=P}if(H=(g=e(i,R,g,p,f+1)).length,0<N&&(x=a(3,g,R=n(P,U,B),i,C,M,H,p,f,c),U=R.join(""),void 0!==x&&0===(H=(g=x.trim()).length)&&(p=0,g="")),0<H)switch(p){case 115:U=U.replace(w,s);case 100:case 109:case 45:g=U+"{"+g+"}";break;case 107:g=(U=U.replace(b,"$1 $2"))+"{"+g+"}",g=1===j||2===j&&o("@"+g,3)?"@-webkit-"+g+"@"+g:"@"+g;break;default:g=U+g,112===c&&(F+=g,g="")}else g=""}else g=e(i,n(i,U,B),g,c,f+1);G+=g,g=B=R=_=d=0,U="",p=l.charCodeAt(++D);break;case 125:case 59:if(1<(H=(U=(0<R?U.replace(h,""):U).trim()).length))switch(0===_&&(d=U.charCodeAt(0),45===d||96<d&&123>d)&&(H=(U=U.replace(" ",":")).length),0<N&&void 0!==(x=a(1,U,i,t,C,M,F.length,c,f,c))&&0===(H=(U=x.trim()).length)&&(U="\0\0"),d=U.charCodeAt(0),p=U.charCodeAt(1),d){case 0:break;case 64:if(105===p||99===p){Z+=U+l.charAt(D);break}default:58!==U.charCodeAt(H-1)&&(F+=r(U,d,p,U.charCodeAt(2)))}B=R=_=d=0,U="",p=l.charCodeAt(++D)}}switch(p){case 13:case 10:47===O?O=0:0===1+d&&107!==c&&0<U.length&&(R=1,U+="\0"),0<N*L&&a(0,U,i,t,C,M,F.length,c,f,c),M=1,C++;break;case 59:case 125:if(0===O+k+I+S){M++;break}default:switch(M++,m=l.charAt(D),p){case 9:case 32:if(0===k+S+O)switch(E){case 44:case 58:case 9:case 32:m="";break;default:32!==p&&(m=" ")}break;case 0:m="\\0";break;case 12:m="\\f";break;case 11:m="\\v";break;case 38:0===k+O+S&&(R=B=1,m="\f"+m);break;case 108:if(0===k+O+S+A&&0<_)switch(D-_){case 2:112===E&&58===l.charCodeAt(D-3)&&(A=E);case 8:111===T&&(A=T)}break;case 58:0===k+O+S&&(_=D);break;case 44:0===O+I+k+S&&(R=1,m+="\r");break;case 34:case 39:0===O&&(k=k===p?0:0===k?p:k);break;case 91:0===k+O+I&&S++;break;case 93:0===k+O+I&&S--;break;case 41:0===k+O+S&&I--;break;case 40:if(0===k+O+S){if(0===d)if(2*E+3*T==533);else d=1;I++}break;case 64:0===O+I+k+S+_+g&&(g=1);break;case 42:case 47:if(!(0<k+S+I))switch(O){case 0:switch(2*p+3*l.charCodeAt(D+1)){case 235:O=47;break;case 220:H=D,O=42}break;case 42:47===p&&42===E&&H+2!==D&&(33===l.charCodeAt(H+2)&&(F+=l.substring(H,D+1)),m="",O=0)}}0===O&&(U+=m)}T=E,E=p,D++}if(0<(H=F.length)){if(R=i,0<N&&(void 0!==(x=a(2,F,R,t,C,M,H,c,f,c))&&0===(F=x).length))return Z+F+G;if(F=R.join(",")+"{"+F+"}",0!=j*A){switch(2!==j||o(F,2)||(A=0),A){case 111:F=F.replace(y,":-moz-$1")+F;break;case 112:F=F.replace(v,"::-webkit-input-$1")+F.replace(v,"::-moz-$1")+F.replace(v,":-ms-input-$1")+F}A=0}}return Z+F+G}function n(t,e,n){var r=e.trim().split(g);e=r;var o=r.length,s=t.length;switch(s){case 0:case 1:var a=0;for(t=0===s?"":t[0]+" ";a<o;++a)e[a]=i(t,e[a],n).trim();break;default:var l=a=0;for(e=[];a<o;++a)for(var c=0;c<s;++c)e[l++]=i(t[c]+" ",r[a],n).trim()}return e}function i(t,e,n){var i=e.charCodeAt(0);switch(33>i&&(i=(e=e.trim()).charCodeAt(0)),i){case 38:return e.replace(m,"$1"+t.trim());case 58:return t.trim()+e.replace(m,"$1"+t.trim());default:if(0<1*n&&0<e.indexOf("\f"))return e.replace(m,(58===t.charCodeAt(0)?"":"$1")+t.trim())}return t+e}function r(t,e,n,i){var s=t+";",a=2*e+3*n+4*i;if(944===a){t=s.indexOf(":",9)+1;var l=s.substring(t,s.length-1).trim();return l=s.substring(0,t).trim()+l+";",1===j||2===j&&o(l,1)?"-webkit-"+l+l:l}if(0===j||2===j&&!o(s,1))return s;switch(a){case 1015:return 97===s.charCodeAt(10)?"-webkit-"+s+s:s;case 951:return 116===s.charCodeAt(3)?"-webkit-"+s+s:s;case 963:return 110===s.charCodeAt(5)?"-webkit-"+s+s:s;case 1009:if(100!==s.charCodeAt(4))break;case 969:case 942:return"-webkit-"+s+s;case 978:return"-webkit-"+s+"-moz-"+s+s;case 1019:case 983:return"-webkit-"+s+"-moz-"+s+"-ms-"+s+s;case 883:if(45===s.charCodeAt(8))return"-webkit-"+s+s;if(0<s.indexOf("image-set(",11))return s.replace(E,"$1-webkit-$2")+s;break;case 932:if(45===s.charCodeAt(4))switch(s.charCodeAt(5)){case 103:return"-webkit-box-"+s.replace("-grow","")+"-webkit-"+s+"-ms-"+s.replace("grow","positive")+s;case 115:return"-webkit-"+s+"-ms-"+s.replace("shrink","negative")+s;case 98:return"-webkit-"+s+"-ms-"+s.replace("basis","preferred-size")+s}return"-webkit-"+s+"-ms-"+s+s;case 964:return"-webkit-"+s+"-ms-flex-"+s+s;case 1023:if(99!==s.charCodeAt(8))break;return"-webkit-box-pack"+(l=s.substring(s.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+s+"-ms-flex-pack"+l+s;case 1005:return d.test(s)?s.replace(f,":-webkit-")+s.replace(f,":-moz-")+s:s;case 1e3:switch(e=(l=s.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(e)){case 226:l=s.replace(x,"tb");break;case 232:l=s.replace(x,"tb-rl");break;case 220:l=s.replace(x,"lr");break;default:return s}return"-webkit-"+s+"-ms-"+l+s;case 1017:if(-1===s.indexOf("sticky",9))break;case 975:switch(e=(s=t).length-10,a=(l=(33===s.charCodeAt(e)?s.substring(0,e):s).substring(t.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(111>l.charCodeAt(8))break;case 115:s=s.replace(l,"-webkit-"+l)+";"+s;break;case 207:case 102:s=s.replace(l,"-webkit-"+(102<a?"inline-":"")+"box")+";"+s.replace(l,"-webkit-"+l)+";"+s.replace(l,"-ms-"+l+"box")+";"+s}return s+";";case 938:if(45===s.charCodeAt(5))switch(s.charCodeAt(6)){case 105:return l=s.replace("-items",""),"-webkit-"+s+"-webkit-box-"+l+"-ms-flex-"+l+s;case 115:return"-webkit-"+s+"-ms-flex-item-"+s.replace(O,"")+s;default:return"-webkit-"+s+"-ms-flex-line-pack"+s.replace("align-content","").replace(O,"")+s}break;case 973:case 989:if(45!==s.charCodeAt(3)||122===s.charCodeAt(4))break;case 931:case 953:if(!0===k.test(t))return 115===(l=t.substring(t.indexOf(":")+1)).charCodeAt(0)?r(t.replace("stretch","fill-available"),e,n,i).replace(":fill-available",":stretch"):s.replace(l,"-webkit-"+l)+s.replace(l,"-moz-"+l.replace("fill-",""))+s;break;case 962:if(s="-webkit-"+s+(102===s.charCodeAt(5)?"-ms-"+s:"")+s,211===n+i&&105===s.charCodeAt(13)&&0<s.indexOf("transform",10))return s.substring(0,s.indexOf(";",27)+1).replace(p,"$1-webkit-$2")+s}return s}function o(t,e){var n=t.indexOf(1===e?":":"{"),i=t.substring(0,3!==e?n:10);return n=t.substring(n+1,t.length-1),_(2!==e?i:i.replace(I,"$1"),n,e)}function s(t,e){var n=r(e,e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2));return n!==e+";"?n.replace(S," or ($1)").substring(4):"("+e+")"}function a(t,e,n,i,r,o,s,a,l,u){for(var h,f=0,d=e;f<N;++f)switch(h=T[f].call(c,t,d,n,i,r,o,s,a,l,u)){case void 0:case!1:case!0:case null:break;default:d=h}if(d!==e)return d}function l(t){return void 0!==(t=t.prefix)&&(_=null,t?"function"!=typeof t?j=1:(j=2,_=t):j=0),l}function c(t,n){var i=t;if(33>i.charCodeAt(0)&&(i=i.trim()),i=[i],0<N){var r=a(-1,n,i,i,C,M,0,0,0,0);void 0!==r&&"string"==typeof r&&(n=r)}var o=e(P,i,n,0,0);return 0<N&&(void 0!==(r=a(-2,o,i,i,C,M,o.length,0,0,0))&&(o=r)),A=0,M=C=1,o}var u=/^\0+/g,h=/[\0\r\f]/g,f=/: */g,d=/zoo|gra/,p=/([,: ])(transform)/g,g=/,\r+?/g,m=/([\t\r\n ])*\f?&/g,b=/@(k\w+)\s*(\S*)\s*/,v=/::(place)/g,y=/:(read-only)/g,x=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,S=/([\s\S]*?);/g,O=/-self|flex-/g,I=/[^]*?(:[rp][el]a[\w-]+)[^]*/,k=/stretch|:\s*\w+\-(?:conte|avail)/,E=/([^-])(image-set\()/,M=1,C=1,A=0,j=1,P=[],T=[],N=0,_=null,L=0;return c.use=function t(e){switch(e){case void 0:case null:N=T.length=0;break;default:if("function"==typeof e)T[N++]=e;else if("object"==typeof e)for(var n=0,i=e.length;n<i;++n)t(e[n]);else L=0|!!e}return t},c.set=l,void 0!==t&&l(t),c}},1037:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});const i={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},9511:(t,e,n)=>{"use strict";n.d(e,{R:()=>i,s:()=>r});function i(t,e,n){var i="";return n.split(" ").forEach((function(n){void 0!==t[n]?e.push(t[n]):i+=n+" "})),i}var r=function(t,e,n){var i=t.key+"-"+e.name;if(!1===n&&void 0===t.registered[i]&&(t.registered[i]=e.styles),void 0===t.inserted[e.name]){var r=e;do{t.insert("."+i,r,t.sheet,!0);r=r.next}while(void 0!==r)}}},4694:(t,e,n)=>{"use strict";var i,r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},o=n(7810),s=(i=o)&&i.__esModule?i:{default:i};e.A=function(t){var e=t.fill,n=void 0===e?"currentColor":e,i=t.width,o=void 0===i?24:i,a=t.height,l=void 0===a?24:a,c=t.style,u=void 0===c?{}:c,h=function(t,e){var n={};for(var i in t)e.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(t,["fill","width","height","style"]);return s.default.createElement("svg",r({viewBox:"0 0 24 24",style:r({fill:n,width:o,height:l},u)},h),s.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}},3499:(t,e,n)=>{"use strict";var i,r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},o=n(7810),s=(i=o)&&i.__esModule?i:{default:i};e.A=function(t){var e=t.fill,n=void 0===e?"currentColor":e,i=t.width,o=void 0===i?24:i,a=t.height,l=void 0===a?24:a,c=t.style,u=void 0===c?{}:c,h=function(t,e){var n={};for(var i in t)e.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(t,["fill","width","height","style"]);return s.default.createElement("svg",r({viewBox:"0 0 24 24",style:r({fill:n,width:o,height:l},u)},h),s.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))}},4406:(t,e,n)=>{"use strict";n.d(e,{Qs:()=>o});var i=n(6896);function r(t){var{type:e="scroll",events:n,props:r}=t;return i.Z9.fromClass(class{constructor(t){(this.dom=void 0,this.view=void 0,this.view=t,this.dom="dom"===e?t.dom:"content"===e?t.contentDOM:t.scrollDOM,this.dom&&r)&&Object.keys(r).forEach((t=>{this.dom[t]=r[t]}));Object.keys(n||{}).forEach((t=>{n&&n[t]&&this.dom&&this.dom.addEventListener(t,n[t])}))}destroy(){Object.keys(n||{}).forEach((t=>{n&&n[t]&&this.dom&&this.dom.removeEventListener(t,n[t])}))}})}function o(t){return r({type:"content",events:t})}},3297:(t,e,n)=>{"use strict";function i(){return i=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},i.apply(null,arguments)}n.d(e,{Ay:()=>Fn});var r=n(7810),o=n(5284),s=n(6896),a=n(1174),l=n(9249);function c(t,e){return({state:n,dispatch:i})=>{if(n.readOnly)return!1;let r=t(e,n);return!!r&&(i(n.update(r)),!0)}}const u=c(m,0),h=c(g,0),f=c(((t,e)=>g(t,e,function(t){let e=[];for(let n of t.selection.ranges){let i=t.doc.lineAt(n.from),r=n.to<=i.to?i:t.doc.lineAt(n.to);r.from>i.from&&r.from==n.to&&(r=n.to==i.to+1?i:t.doc.lineAt(n.to-1));let o=e.length-1;o>=0&&e[o].to>i.from?e[o].to=r.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:r.to})}return e}(e))),0);function d(t,e){let n=t.languageDataAt("commentTokens",e);return n.length?n[0]:{}}const p=50;function g(t,e,n=e.selection.ranges){let i=n.map((t=>d(e,t.from).block));if(!i.every((t=>t)))return null;let r=n.map(((t,n)=>function(t,{open:e,close:n},i,r){let o,s,a=t.sliceDoc(i-p,i),l=t.sliceDoc(r,r+p),c=/\s*$/.exec(a)[0].length,u=/^\s*/.exec(l)[0].length,h=a.length-c;if(a.slice(h-e.length,h)==e&&l.slice(u,u+n.length)==n)return{open:{pos:i-c,margin:c&&1},close:{pos:r+u,margin:u&&1}};r-i<=2*p?o=s=t.sliceDoc(i,r):(o=t.sliceDoc(i,i+p),s=t.sliceDoc(r-p,r));let f=/^\s*/.exec(o)[0].length,d=/\s*$/.exec(s)[0].length,g=s.length-d-n.length;return o.slice(f,f+e.length)==e&&s.slice(g,g+n.length)==n?{open:{pos:i+f+e.length,margin:/\s/.test(o.charAt(f+e.length))?1:0},close:{pos:r-d-n.length,margin:/\s/.test(s.charAt(g-1))?1:0}}:null}(e,i[n],t.from,t.to)));if(2!=t&&!r.every((t=>t)))return{changes:e.changes(n.map(((t,e)=>r[e]?[]:[{from:t.from,insert:i[e].open+" "},{from:t.to,insert:" "+i[e].close}])))};if(1!=t&&r.some((t=>t))){let t=[];for(let e,n=0;n<r.length;n++)if(e=r[n]){let r=i[n],{open:o,close:s}=e;t.push({from:o.pos-r.open.length,to:o.pos+o.margin},{from:s.pos-s.margin,to:s.pos+r.close.length})}return{changes:t}}return null}function m(t,e,n=e.selection.ranges){let i=[],r=-1;for(let{from:o,to:s}of n){let t=i.length,n=1e9,a=d(e,o).line;if(a){for(let t=o;t<=s;){let l=e.doc.lineAt(t);if(l.from>r&&(o==s||s>l.from)){r=l.from;let t=/^\s*/.exec(l.text)[0].length,e=t==l.length,o=l.text.slice(t,t+a.length)==a?t:-1;t<l.text.length&&t<n&&(n=t),i.push({line:l,comment:o,token:a,indent:t,empty:e,single:!1})}t=l.to+1}if(n<1e9)for(let e=t;e<i.length;e++)i[e].indent<i[e].line.text.length&&(i[e].indent=n);i.length==t+1&&(i[t].single=!0)}}if(2!=t&&i.some((t=>t.comment<0&&(!t.empty||t.single)))){let t=[];for(let{line:e,token:r,indent:o,empty:s,single:a}of i)!a&&s||t.push({from:e.from+o,insert:r+" "});let n=e.changes(t);return{changes:n,selection:e.selection.map(n,1)}}if(1!=t&&i.some((t=>t.comment>=0))){let t=[];for(let{line:e,comment:n,token:r}of i)if(n>=0){let i=e.from+n,o=i+r.length;" "==e.text[o-e.from]&&o++,t.push({from:i,to:o})}return{changes:t}}return null}const b=o.YH.define(),v=o.YH.define(),y=o.sj.define(),x=o.sj.define({combine:t=>(0,o.QR)(t,{minDepth:100,newGroupDelay:500,joinToEvent:(t,e)=>e},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(t,e)=>(n,i)=>t(n,i)||e(n,i)})}),w=o.sU.define({create:()=>R.empty,update(t,e){let n=e.state.facet(x),i=e.annotation(b);if(i){let r=M.fromTransaction(e,i.selection),o=i.side,s=0==o?t.undone:t.done;return s=r?C(s,s.length,n.minDepth,r):T(s,e.startState.selection),new R(0==o?i.rest:s,0==o?s:i.rest)}let r=e.annotation(v);if("full"!=r&&"before"!=r||(t=t.isolate()),!1===e.annotation(o.ZX.addToHistory))return e.changes.empty?t:t.addMapping(e.changes.desc);let s=M.fromTransaction(e),a=e.annotation(o.ZX.time),l=e.annotation(o.ZX.userEvent);return s?t=t.addChanges(s,a,l,n,e):e.selection&&(t=t.addSelection(e.startState.selection,a,l,n.newGroupDelay)),"full"!=r&&"after"!=r||(t=t.isolate()),t},toJSON:t=>({done:t.done.map((t=>t.toJSON())),undone:t.undone.map((t=>t.toJSON()))}),fromJSON:t=>new R(t.done.map(M.fromJSON),t.undone.map(M.fromJSON))});function S(t,e){return function({state:n,dispatch:i}){if(!e&&n.readOnly)return!1;let r=n.field(w,!1);if(!r)return!1;let o=r.pop(t,n,e);return!!o&&(i(o),!0)}}const O=S(0,!1),I=S(1,!1),k=S(0,!0),E=S(1,!0);class M{constructor(t,e,n,i,r){this.changes=t,this.effects=e,this.mapped=n,this.startSelection=i,this.selectionsAfter=r}setSelAfter(t){return new M(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,e,n;return{changes:null===(t=this.changes)||void 0===t?void 0:t.toJSON(),mapped:null===(e=this.mapped)||void 0===e?void 0:e.toJSON(),startSelection:null===(n=this.startSelection)||void 0===n?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map((t=>t.toJSON()))}}static fromJSON(t){return new M(t.changes&&o.VR.fromJSON(t.changes),[],t.mapped&&o.Gu.fromJSON(t.mapped),t.startSelection&&o.OF.fromJSON(t.startSelection),t.selectionsAfter.map(o.OF.fromJSON))}static fromTransaction(t,e){let n=j;for(let i of t.startState.facet(y)){let e=i(t);e.length&&(n=n.concat(e))}return!n.length&&t.changes.empty?null:new M(t.changes.invert(t.startState.doc),n,void 0,e||t.startState.selection,j)}static selection(t){return new M(void 0,j,void 0,void 0,t)}}function C(t,e,n,i){let r=e+1>n+20?e-n-1:0,o=t.slice(r,e);return o.push(i),o}function A(t,e){return t.length?e.length?t.concat(e):t:e}const j=[],P=200;function T(t,e){if(t.length){let n=t[t.length-1],i=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-P));return i.length&&i[i.length-1].eq(e)?t:(i.push(e),C(t,t.length-1,1e9,n.setSelAfter(i)))}return[M.selection([e])]}function N(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function _(t,e){if(!t.length)return t;let n=t.length,i=j;for(;n;){let r=L(t[n-1],e,i);if(r.changes&&!r.changes.empty||r.effects.length){let e=t.slice(0,n);return e[n-1]=r,e}e=r.mapped,n--,i=r.selectionsAfter}return i.length?[M.selection(i)]:j}function L(t,e,n){let i=A(t.selectionsAfter.length?t.selectionsAfter.map((t=>t.map(e))):j,n);if(!t.changes)return M.selection(i);let r=t.changes.map(e),s=e.mapDesc(t.changes,!0),a=t.mapped?t.mapped.composeDesc(s):s;return new M(r,o.Pe.mapEffects(t.effects,e),a,t.startSelection.map(s),i)}const D=/^(input\.type|delete)($|\.)/;class R{constructor(t,e,n=0,i=void 0){this.done=t,this.undone=e,this.prevTime=n,this.prevUserEvent=i}isolate(){return this.prevTime?new R(this.done,this.undone):this}addChanges(t,e,n,i,r){let s=this.done,a=s[s.length-1];return s=a&&a.changes&&!a.changes.empty&&t.changes&&(!n||D.test(n))&&(!a.selectionsAfter.length&&e-this.prevTime<i.newGroupDelay&&i.joinToEvent(r,function(t,e){let n=[],i=!1;return t.iterChangedRanges(((t,e)=>n.push(t,e))),e.iterChangedRanges(((t,e,r,o)=>{for(let s=0;s<n.length;){let t=n[s++],e=n[s++];o>=t&&r<=e&&(i=!0)}})),i}(a.changes,t.changes))||"input.type.compose"==n)?C(s,s.length-1,i.minDepth,new M(t.changes.compose(a.changes),A(o.Pe.mapEffects(t.effects,a.changes),a.effects),a.mapped,a.startSelection,j)):C(s,s.length,i.minDepth,t),new R(s,j,e,n)}addSelection(t,e,n,i){let r=this.done.length?this.done[this.done.length-1].selectionsAfter:j;return r.length>0&&e-this.prevTime<i&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&(o=r[r.length-1],s=t,o.ranges.length==s.ranges.length&&0===o.ranges.filter(((t,e)=>t.empty!=s.ranges[e].empty)).length)?this:new R(T(this.done,t),this.undone,e,n);var o,s}addMapping(t){return new R(_(this.done,t),_(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,e,n){let i=0==t?this.done:this.undone;if(0==i.length)return null;let r=i[i.length-1],o=r.selectionsAfter[0]||e.selection;if(n&&r.selectionsAfter.length)return e.update({selection:r.selectionsAfter[r.selectionsAfter.length-1],annotations:b.of({side:t,rest:N(i),selection:o}),userEvent:0==t?"select.undo":"select.redo",scrollIntoView:!0});if(r.changes){let n=1==i.length?j:i.slice(0,i.length-1);return r.mapped&&(n=_(n,r.mapped)),e.update({changes:r.changes,selection:r.startSelection,effects:r.effects,annotations:b.of({side:t,rest:n,selection:o}),filter:!1,userEvent:0==t?"undo":"redo",scrollIntoView:!0})}return null}}R.empty=new R(j,j);const B=[{key:"Mod-z",run:O,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:I,preventDefault:!0},{linux:"Ctrl-Shift-z",run:I,preventDefault:!0},{key:"Mod-u",run:k,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:E,preventDefault:!0}];function H(t,e){return o.OF.create(t.ranges.map(e),t.mainIndex)}function z(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function W({state:t,dispatch:e},n){let i=H(t.selection,n);return!i.eq(t.selection,!0)&&(e(z(t,i)),!0)}function U(t,e){return o.OF.cursor(e?t.to:t.from)}function F(t,e){return W(t,(n=>n.empty?t.moveByChar(n,e):U(n,e)))}function G(t){return t.textDirectionAt(t.state.selection.main.head)==s.OP.LTR}const Z=t=>F(t,!G(t)),V=t=>F(t,G(t));function q(t,e){return W(t,(n=>n.empty?t.moveByGroup(n,e):U(n,e)))}"undefined"!=typeof Intl&&Intl.Segmenter;function Y(t,e,n){if(e.type.prop(n))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function J(t,e,n){let i,r,s=(0,a.mv)(t).resolveInner(e.head),c=n?l.uY.closedBy:l.uY.openedBy;for(let o=e.head;;){let e=n?s.childAfter(o):s.childBefore(o);if(!e)break;Y(t,e,c)?s=e:o=n?e.to:e.from}return r=s.type.prop(c)&&(i=n?(0,a.jU)(t,s.from,1):(0,a.jU)(t,s.to,-1))&&i.matched?n?i.end.to:i.end.from:n?s.to:s.from,o.OF.cursor(r,n?-1:1)}function Q(t,e){return W(t,(n=>{if(!n.empty)return U(n,e);let i=t.moveVertically(n,e);return i.head!=n.head?i:t.moveToLineBoundary(n,e)}))}const X=t=>Q(t,!1),$=t=>Q(t,!0);function K(t){let e,n=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,i=0,r=0;if(n){for(let e of t.state.facet(s.Lz.scrollMargins)){let n=e(t);(null==n?void 0:n.top)&&(i=Math.max(null==n?void 0:n.top,i)),(null==n?void 0:n.bottom)&&(r=Math.max(null==n?void 0:n.bottom,r))}e=t.scrollDOM.clientHeight-i-r}else e=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:i,marginBottom:r,selfScroll:n,height:Math.max(t.defaultLineHeight,e-5)}}function tt(t,e){let n,i=K(t),{state:r}=t,o=H(r.selection,(n=>n.empty?t.moveVertically(n,e,i.height):U(n,e)));if(o.eq(r.selection))return!1;if(i.selfScroll){let e=t.coordsAtPos(r.selection.main.head),a=t.scrollDOM.getBoundingClientRect(),l=a.top+i.marginTop,c=a.bottom-i.marginBottom;e&&e.top>l&&e.bottom<c&&(n=s.Lz.scrollIntoView(o.main.head,{y:"start",yMargin:e.top-l}))}return t.dispatch(z(r,o),{effects:n}),!0}const et=t=>tt(t,!1),nt=t=>tt(t,!0);function it(t,e,n){let i=t.lineBlockAt(e.head),r=t.moveToLineBoundary(e,n);if(r.head==e.head&&r.head!=(n?i.to:i.from)&&(r=t.moveToLineBoundary(e,n,!1)),!n&&r.head==i.from&&i.length){let n=/^\s*/.exec(t.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;n&&e.head!=i.from+n&&(r=o.OF.cursor(i.from+n))}return r}function rt(t,e,n){let i=!1,r=H(t.selection,(e=>{let r=(0,a.jU)(t,e.head,-1)||(0,a.jU)(t,e.head,1)||e.head>0&&(0,a.jU)(t,e.head-1,1)||e.head<t.doc.length&&(0,a.jU)(t,e.head+1,-1);if(!r||!r.end)return e;i=!0;let s=r.start.from==e.head?r.end.to:r.end.from;return n?o.OF.range(e.anchor,s):o.OF.cursor(s)}));return!!i&&(e(z(t,r)),!0)}function ot(t,e){let n=H(t.state.selection,(t=>{let n=e(t);return o.OF.range(t.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)}));return!n.eq(t.state.selection)&&(t.dispatch(z(t.state,n)),!0)}function st(t,e){return ot(t,(n=>t.moveByChar(n,e)))}const at=t=>st(t,!G(t)),lt=t=>st(t,G(t));function ct(t,e){return ot(t,(n=>t.moveByGroup(n,e)))}function ut(t,e){return ot(t,(n=>t.moveVertically(n,e)))}const ht=t=>ut(t,!1),ft=t=>ut(t,!0);function dt(t,e){return ot(t,(n=>t.moveVertically(n,e,K(t).height)))}const pt=t=>dt(t,!1),gt=t=>dt(t,!0),mt=({state:t,dispatch:e})=>(e(z(t,{anchor:0})),!0),bt=({state:t,dispatch:e})=>(e(z(t,{anchor:t.doc.length})),!0),vt=({state:t,dispatch:e})=>(e(z(t,{anchor:t.selection.main.anchor,head:0})),!0),yt=({state:t,dispatch:e})=>(e(z(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0);function xt(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:i}=t,r=i.changeByRange((i=>{let{from:r,to:s}=i;if(r==s){let o=e(i);o<r?(n="delete.backward",o=wt(t,o,!1)):o>r&&(n="delete.forward",o=wt(t,o,!0)),r=Math.min(r,o),s=Math.max(s,o)}else r=wt(t,r,!1),s=wt(t,s,!0);return r==s?{range:i}:{changes:{from:r,to:s},range:o.OF.cursor(r,r<i.head?-1:1)}}));return!r.changes.empty&&(t.dispatch(i.update(r,{scrollIntoView:!0,userEvent:n,effects:"delete.selection"==n?s.Lz.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function wt(t,e,n){if(t instanceof s.Lz)for(let i of t.state.facet(s.Lz.atomicRanges).map((e=>e(t))))i.between(e,e,((t,i)=>{t<e&&i>e&&(e=n?i:t)}));return e}const St=(t,e,n)=>xt(t,(i=>{let r,s,l=i.from,{state:c}=t,u=c.doc.lineAt(l);if(n&&!e&&l>u.from&&l<u.from+200&&!/[^ \t]/.test(r=u.text.slice(0,l-u.from))){if("\t"==r[r.length-1])return l-1;let t=(0,o.y$)(r,c.tabSize)%(0,a.tp)(c)||(0,a.tp)(c);for(let e=0;e<t&&" "==r[r.length-1-e];e++)l--;s=l}else s=(0,o.zK)(u.text,l-u.from,e,e)+u.from,s==l&&u.number!=(e?c.doc.lines:1)?s+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(u.text.slice(s-u.from,l-u.from))&&(s=(0,o.zK)(u.text,s-u.from,!1,!1)+u.from);return s})),Ot=t=>St(t,!1,!0),It=t=>St(t,!0,!1),kt=(t,e)=>xt(t,(n=>{let i=n.head,{state:r}=t,s=r.doc.lineAt(i),a=r.charCategorizer(i);for(let t=null;;){if(i==(e?s.to:s.from)){i==n.head&&s.number!=(e?r.doc.lines:1)&&(i+=e?1:-1);break}let l=(0,o.zK)(s.text,i-s.from,e)+s.from,c=s.text.slice(Math.min(i,l)-s.from,Math.max(i,l)-s.from),u=a(c);if(null!=t&&u!=t)break;" "==c&&i==n.head||(t=u),i=l}return i})),Et=t=>kt(t,!1);function Mt(t){let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.from),o=t.doc.lineAt(i.to);if(i.empty||i.to!=o.from||(o=t.doc.lineAt(i.to-1)),n>=r.number){let t=e[e.length-1];t.to=o.to,t.ranges.push(i)}else e.push({from:r.from,to:o.to,ranges:[i]});n=o.number+1}return e}function Ct(t,e,n){if(t.readOnly)return!1;let i=[],r=[];for(let s of Mt(t)){if(n?s.to==t.doc.length:0==s.from)continue;let e=t.doc.lineAt(n?s.to+1:s.from-1),a=e.length+1;if(n){i.push({from:s.to,to:e.to},{from:s.from,insert:e.text+t.lineBreak});for(let e of s.ranges)r.push(o.OF.range(Math.min(t.doc.length,e.anchor+a),Math.min(t.doc.length,e.head+a)))}else{i.push({from:e.from,to:s.from},{from:s.to,insert:t.lineBreak+e.text});for(let t of s.ranges)r.push(o.OF.range(t.anchor-a,t.head-a))}}return!!i.length&&(e(t.update({changes:i,scrollIntoView:!0,selection:o.OF.create(r,t.selection.mainIndex),userEvent:"move.line"})),!0)}function At(t,e,n){if(t.readOnly)return!1;let i=[];for(let r of Mt(t))n?i.push({from:r.from,insert:t.doc.slice(r.from,r.to)+t.lineBreak}):i.push({from:r.to,insert:t.lineBreak+t.doc.slice(r.from,r.to)});return e(t.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const jt=Pt(!1);function Pt(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let i=e.changeByRange((n=>{let{from:i,to:r}=n,s=e.doc.lineAt(i),c=!t&&i==r&&function(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n,i=(0,a.mv)(t).resolveInner(e),r=i.childBefore(e),o=i.childAfter(e);return r&&o&&r.to<=e&&o.from>=e&&(n=r.type.prop(l.uY.closedBy))&&n.indexOf(o.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(o.from).from&&!/\S/.test(t.sliceDoc(r.to,o.from))?{from:r.to,to:o.from}:null}(e,i);t&&(i=r=(r<=s.to?s:e.doc.lineAt(r)).to);let u=new a.KB(e,{simulateBreak:i,simulateDoubleBreak:!!c}),h=(0,a._v)(u,i);for(null==h&&(h=(0,o.y$)(/^\s*/.exec(e.doc.lineAt(i).text)[0],e.tabSize));r<s.to&&/\s/.test(s.text[r-s.from]);)r++;c?({from:i,to:r}=c):i>s.from&&i<s.from+100&&!/\S/.test(s.text.slice(0,i))&&(i=s.from);let f=["",(0,a.EI)(e,h)];return c&&f.push((0,a.EI)(e,u.lineIndent(s.from,-1))),{changes:{from:i,to:r,insert:o.EY.of(f)},range:o.OF.cursor(i+1+f[1].length)}}));return n(e.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}}function Tt(t,e){let n=-1;return t.changeByRange((i=>{let r=[];for(let o=i.from;o<=i.to;){let s=t.doc.lineAt(o);s.number>n&&(i.empty||i.to>s.from)&&(e(s,r,i),n=s.number),o=s.to+1}let s=t.changes(r);return{changes:r,range:o.OF.range(s.mapPos(i.anchor,1),s.mapPos(i.head,1))}}))}const Nt=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(Tt(t,((e,n)=>{n.push({from:e.from,insert:t.facet(a.Xt)})})),{userEvent:"input.indent"})),!0),_t=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(Tt(t,((e,n)=>{let i=/^\s*/.exec(e.text)[0];if(!i)return;let r=(0,o.y$)(i,t.tabSize),s=0,l=(0,a.EI)(t,Math.max(0,r-(0,a.tp)(t)));for(;s<i.length&&s<l.length&&i.charCodeAt(s)==l.charCodeAt(s);)s++;n.push({from:e.from+s,to:e.from+i.length,insert:l.slice(s)})})),{userEvent:"delete.dedent"})),!0),Lt=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:t=>W(t,(e=>J(t.state,e,!G(t)))),shift:t=>ot(t,(e=>J(t.state,e,!G(t))))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:t=>W(t,(e=>J(t.state,e,G(t)))),shift:t=>ot(t,(e=>J(t.state,e,G(t))))},{key:"Alt-ArrowUp",run:({state:t,dispatch:e})=>Ct(t,e,!1)},{key:"Shift-Alt-ArrowUp",run:({state:t,dispatch:e})=>At(t,e,!1)},{key:"Alt-ArrowDown",run:({state:t,dispatch:e})=>Ct(t,e,!0)},{key:"Shift-Alt-ArrowDown",run:({state:t,dispatch:e})=>At(t,e,!0)},{key:"Escape",run:({state:t,dispatch:e})=>{let n=t.selection,i=null;return n.ranges.length>1?i=o.OF.create([n.main]):n.main.empty||(i=o.OF.create([o.OF.cursor(n.main.head)])),!!i&&(e(z(t,i)),!0)}},{key:"Mod-Enter",run:Pt(!0)},{key:"Alt-l",mac:"Ctrl-l",run:({state:t,dispatch:e})=>{let n=Mt(t).map((({from:e,to:n})=>o.OF.range(e,Math.min(n+1,t.doc.length))));return e(t.update({selection:o.OF.create(n),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:t,dispatch:e})=>{let n=H(t.selection,(e=>{let n=(0,a.mv)(t),i=n.resolveStack(e.from,1);if(e.empty){let t=n.resolveStack(e.from,-1);t.node.from>=i.node.from&&t.node.to<=i.node.to&&(i=t)}for(let t=i;t;t=t.next){let{node:n}=t;if((n.from<e.from&&n.to>=e.to||n.to>e.to&&n.from<=e.from)&&t.next)return o.OF.range(n.to,n.from)}return e}));return!n.eq(t.selection)&&(e(z(t,n)),!0)},preventDefault:!0},{key:"Mod-[",run:_t},{key:"Mod-]",run:Nt},{key:"Mod-Alt-\\",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),i=new a.KB(t,{overrideIndentation:t=>{let e=n[t];return null==e?-1:e}}),r=Tt(t,((e,r,o)=>{let s=(0,a._v)(i,e.from);if(null==s)return;/\S/.test(e.text)||(s=0);let l=/^\s*/.exec(e.text)[0],c=(0,a.EI)(t,s);(l!=c||o.from<e.from+l.length)&&(n[e.from]=s,r.push({from:e.from,to:e.from+l.length,insert:c}))}));return r.changes.empty||e(t.update(r,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(Mt(e).map((({from:t,to:n})=>(t>0?t--:n<e.doc.length&&n++,{from:t,to:n})))),i=H(e.selection,(e=>{let n;if(t.lineWrapping){let i=t.lineBlockAt(e.head),r=t.coordsAtPos(e.head,e.assoc||1);r&&(n=i.bottom+t.documentTop-r.bottom+t.defaultLineHeight/2)}return t.moveVertically(e,!0,n)})).map(n);return t.dispatch({changes:n,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:t,dispatch:e})=>rt(t,e,!1)},{key:"Mod-/",run:t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),i=d(t.state,n.from);return i.line?u(t):!!i.block&&f(t)}},{key:"Alt-A",run:h},{key:"Ctrl-m",mac:"Shift-Alt-m",run:t=>(t.setTabFocusMode(),!0)}].concat([{key:"ArrowLeft",run:Z,shift:at,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:t=>q(t,!G(t)),shift:t=>ct(t,!G(t)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:t=>W(t,(e=>it(t,e,!G(t)))),shift:t=>ot(t,(e=>it(t,e,!G(t)))),preventDefault:!0},{key:"ArrowRight",run:V,shift:lt,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:t=>q(t,G(t)),shift:t=>ct(t,G(t)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:t=>W(t,(e=>it(t,e,G(t)))),shift:t=>ot(t,(e=>it(t,e,G(t)))),preventDefault:!0},{key:"ArrowUp",run:X,shift:ht,preventDefault:!0},{mac:"Cmd-ArrowUp",run:mt,shift:vt},{mac:"Ctrl-ArrowUp",run:et,shift:pt},{key:"ArrowDown",run:$,shift:ft,preventDefault:!0},{mac:"Cmd-ArrowDown",run:bt,shift:yt},{mac:"Ctrl-ArrowDown",run:nt,shift:gt},{key:"PageUp",run:et,shift:pt},{key:"PageDown",run:nt,shift:gt},{key:"Home",run:t=>W(t,(e=>it(t,e,!1))),shift:t=>ot(t,(e=>it(t,e,!1))),preventDefault:!0},{key:"Mod-Home",run:mt,shift:vt},{key:"End",run:t=>W(t,(e=>it(t,e,!0))),shift:t=>ot(t,(e=>it(t,e,!0))),preventDefault:!0},{key:"Mod-End",run:bt,shift:yt},{key:"Enter",run:jt,shift:jt},{key:"Mod-a",run:({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:Ot,shift:Ot},{key:"Delete",run:It},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Et},{key:"Mod-Delete",mac:"Alt-Delete",run:t=>kt(t,!0)},{mac:"Mod-Backspace",run:t=>xt(t,(e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}))},{mac:"Mod-Delete",run:t=>xt(t,(e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}))}].concat([{key:"Ctrl-b",run:Z,shift:at,preventDefault:!0},{key:"Ctrl-f",run:V,shift:lt},{key:"Ctrl-p",run:X,shift:ht},{key:"Ctrl-n",run:$,shift:ft},{key:"Ctrl-a",run:t=>W(t,(e=>o.OF.cursor(t.lineBlockAt(e.head).from,1))),shift:t=>ot(t,(e=>o.OF.cursor(t.lineBlockAt(e.head).from)))},{key:"Ctrl-e",run:t=>W(t,(e=>o.OF.cursor(t.lineBlockAt(e.head).to,-1))),shift:t=>ot(t,(e=>o.OF.cursor(t.lineBlockAt(e.head).to)))},{key:"Ctrl-d",run:It},{key:"Ctrl-h",run:Ot},{key:"Ctrl-k",run:t=>xt(t,(e=>{let n=t.lineBlockAt(e.head).to;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}))},{key:"Ctrl-Alt-h",run:Et},{key:"Ctrl-o",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange((t=>({changes:{from:t.from,to:t.to,insert:o.EY.of(["",""])},range:o.OF.cursor(t.from)})));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange((e=>{if(!e.empty||0==e.from||e.from==t.doc.length)return{range:e};let n=e.from,i=t.doc.lineAt(n),r=n==i.from?n-1:(0,o.zK)(i.text,n-i.from,!1)+i.from,s=n==i.to?n+1:(0,o.zK)(i.text,n-i.from,!0)+i.from;return{changes:{from:r,to:s,insert:t.doc.slice(n,s).append(t.doc.slice(r,n))},range:o.OF.cursor(s)}}));return!n.changes.empty&&(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:nt}].map((t=>({mac:t.key,run:t.run,shift:t.shift}))))),Dt={key:"Tab",run:Nt,shift:_t};function Rt(){var t=arguments[0];"string"==typeof t&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&"object"==typeof n&&null==n.nodeType&&!Array.isArray(n)){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i];"string"==typeof r?t.setAttribute(i,r):null!=r&&(t[i]=r)}e++}for(;e<arguments.length;e++)Bt(t,arguments[e]);return t}function Bt(t,e){if("string"==typeof e)t.appendChild(document.createTextNode(e));else if(null==e);else if(null!=e.nodeType)t.appendChild(e);else{if(!Array.isArray(e))throw new RangeError("Unsupported child node: "+e);for(var n=0;n<e.length;n++)Bt(t,e[n])}}const Ht="function"==typeof String.prototype.normalize?t=>t.normalize("NFKD"):t=>t;class zt{constructor(t,e,n=0,i=t.length,r,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(n,i),this.bufferStart=n,this.normalize=r?t=>r(Ht(t)):Ht,this.query=this.normalize(e)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return(0,o.vS)(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let t=this.peek();if(t<0)return this.done=!0,this;let e=(0,o.MK)(t),n=this.bufferStart+this.bufferPos;this.bufferPos+=(0,o.Fh)(t);let i=this.normalize(e);if(i.length)for(let r=0,o=n;;r++){let t=i.charCodeAt(r),s=this.match(t,o,this.bufferPos+this.bufferStart);if(r==i.length-1){if(s)return this.value=s,this;break}o==n&&r<e.length&&e.charCodeAt(r)==t&&o++}}}match(t,e,n){let i=null;for(let r=0;r<this.matches.length;r+=2){let e=this.matches[r],o=!1;this.query.charCodeAt(e)==t&&(e==this.query.length-1?i={from:this.matches[r+1],to:n}:(this.matches[r]++,o=!0)),o||(this.matches.splice(r,2),r-=2)}return this.query.charCodeAt(0)==t&&(1==this.query.length?i={from:e,to:n}:this.matches.push(1,e)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferStart)&&(i=null),i}}"undefined"!=typeof Symbol&&(zt.prototype[Symbol.iterator]=function(){return this});const Wt={from:-1,to:-1,match:/.*/.exec("")},Ut="gm"+(null==/x/.unicode?"":"u");class Ft{constructor(t,e,n,i=0,r=t.length){if(this.text=t,this.to=r,this.curLine="",this.done=!1,this.value=Wt,/\\[sWDnr]|\n|\r|\[\^/.test(e))return new Vt(t,e,n,i,r);this.re=new RegExp(e,Ut+((null==n?void 0:n.ignoreCase)?"i":"")),this.test=null==n?void 0:n.test,this.iter=t.iter();let o=t.lineAt(i);this.curLineStart=o.from,this.matchPos=qt(t,i),this.getLine(this.curLineStart)}getLine(t){this.iter.next(t),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){let n=this.curLineStart+e.index,i=n+e[0].length;if(this.matchPos=qt(this.text,i+(n==i?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<i||n>this.value.to)&&(!this.test||this.test(n,i,e)))return this.value={from:n,to:i,match:e},this;t=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length<this.to))return this.done=!0,this;this.nextLine(),t=0}}}}const Gt=new WeakMap;class Zt{constructor(t,e){this.from=t,this.text=e}get to(){return this.from+this.text.length}static get(t,e,n){let i=Gt.get(t);if(!i||i.from>=n||i.to<=e){let i=new Zt(e,t.sliceString(e,n));return Gt.set(t,i),i}if(i.from==e&&i.to==n)return i;let{text:r,from:o}=i;return o>e&&(r=t.sliceString(e,o)+r,o=e),i.to<n&&(r+=t.sliceString(i.to,n)),Gt.set(t,new Zt(o,r)),new Zt(e,r.slice(e-o,n-o))}}class Vt{constructor(t,e,n,i,r){this.text=t,this.to=r,this.done=!1,this.value=Wt,this.matchPos=qt(t,i),this.re=new RegExp(e,Ut+((null==n?void 0:n.ignoreCase)?"i":"")),this.test=null==n?void 0:n.test,this.flat=Zt.get(t,i,this.chunkEnd(i+5e3))}chunkEnd(t){return t>=this.to?this.to:this.text.lineAt(t).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==t&&(this.re.lastIndex=t+1,e=this.re.exec(this.flat.text)),e){let t=this.flat.from+e.index,n=t+e[0].length;if((this.flat.to>=this.to||e.index+e[0].length<=this.flat.text.length-10)&&(!this.test||this.test(t,n,e)))return this.value={from:t,to:n,match:e},this.matchPos=qt(this.text,n+(t==n?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Zt.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function qt(t,e){if(e>=t.length)return e;let n,i=t.lineAt(e);for(;e<i.to&&(n=i.text.charCodeAt(e-i.from))>=56320&&n<57344;)e++;return e}function Yt(t){let e=Rt("input",{class:"cm-textfield",name:"line",value:String(t.state.doc.lineAt(t.state.selection.main.head).number)});function n(){let n=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);if(!n)return;let{state:i}=t,r=i.doc.lineAt(i.selection.main.head),[,a,l,c,u]=n,h=c?+c.slice(1):0,f=l?+l:r.number;if(l&&u){let t=f/100;a&&(t=t*("-"==a?-1:1)+r.number/i.doc.lines),f=Math.round(i.doc.lines*t)}else l&&a&&(f=f*("-"==a?-1:1)+r.number);let d=i.doc.line(Math.max(1,Math.min(i.doc.lines,f))),p=o.OF.cursor(d.from+Math.max(0,Math.min(h,d.length)));t.dispatch({effects:[Jt.of(!1),s.Lz.scrollIntoView(p.from,{y:"center"})],selection:p}),t.focus()}return{dom:Rt("form",{class:"cm-gotoLine",onkeydown:e=>{27==e.keyCode?(e.preventDefault(),t.dispatch({effects:Jt.of(!1)}),t.focus()):13==e.keyCode&&(e.preventDefault(),n())},onsubmit:t=>{t.preventDefault(),n()}},Rt("label",t.state.phrase("Go to line"),": ",e)," ",Rt("button",{class:"cm-button",type:"submit"},t.state.phrase("go")))}}"undefined"!=typeof Symbol&&(Ft.prototype[Symbol.iterator]=Vt.prototype[Symbol.iterator]=function(){return this});const Jt=o.Pe.define(),Qt=o.sU.define({create:()=>!0,update(t,e){for(let n of e.effects)n.is(Jt)&&(t=n.value);return t},provide:t=>s.S7.from(t,(t=>t?Yt:null))}),Xt=s.Lz.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),$t={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Kt=o.sj.define({combine:t=>(0,o.QR)(t,$t,{highlightWordAroundCursor:(t,e)=>t||e,minSelectionLength:Math.min,maxMatches:Math.min})});const te=s.NZ.mark({class:"cm-selectionMatch"}),ee=s.NZ.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function ne(t,e,n,i){return!(0!=n&&t(e.sliceDoc(n-1,n))==o.Je.Word||i!=e.doc.length&&t(e.sliceDoc(i,i+1))==o.Je.Word)}const ie=s.Z9.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(Kt),{state:n}=t,i=n.selection;if(i.ranges.length>1)return s.NZ.none;let r,a=i.main,l=null;if(a.empty){if(!e.highlightWordAroundCursor)return s.NZ.none;let t=n.wordAt(a.head);if(!t)return s.NZ.none;l=n.charCategorizer(a.head),r=n.sliceDoc(t.from,t.to)}else{let t=a.to-a.from;if(t<e.minSelectionLength||t>200)return s.NZ.none;if(e.wholeWords){if(r=n.sliceDoc(a.from,a.to),l=n.charCategorizer(a.head),!ne(l,n,a.from,a.to)||!function(t,e,n,i){return t(e.sliceDoc(n,n+1))==o.Je.Word&&t(e.sliceDoc(i-1,i))==o.Je.Word}(l,n,a.from,a.to))return s.NZ.none}else if(r=n.sliceDoc(a.from,a.to),!r)return s.NZ.none}let c=[];for(let o of t.visibleRanges){let t=new zt(n.doc,r,o.from,o.to);for(;!t.next().done;){let{from:i,to:r}=t.value;if((!l||ne(l,n,i,r))&&(a.empty&&i<=a.from&&r>=a.to?c.push(ee.range(i,r)):(i>=a.to||r<=a.from)&&c.push(te.range(i,r)),c.length>e.maxMatches))return s.NZ.none}}return s.NZ.set(c)}},{decorations:t=>t.decorations}),re=s.Lz.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}});const oe=o.sj.define({combine:t=>(0,o.QR)(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:t=>new _e(t),scrollToMatch:t=>s.Lz.scrollIntoView(t)})});class se{constructor(t){this.search=t.search,this.caseSensitive=!!t.caseSensitive,this.literal=!!t.literal,this.regexp=!!t.regexp,this.replace=t.replace||"",this.valid=!!this.search&&(!this.regexp||function(t){try{return new RegExp(t,Ut),!0}catch(e){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!t.wholeWord}unquote(t){return this.literal?t:t.replace(/\\([nrt\\])/g,((t,e)=>"n"==e?"\n":"r"==e?"\r":"t"==e?"\t":"\\"))}eq(t){return this.search==t.search&&this.replace==t.replace&&this.caseSensitive==t.caseSensitive&&this.regexp==t.regexp&&this.wholeWord==t.wholeWord}create(){return this.regexp?new de(this):new ce(this)}getCursor(t,e=0,n){let i=t.doc?t:o.$t.create({doc:t});return null==n&&(n=i.doc.length),this.regexp?ue(this,i,e,n):le(this,i,e,n)}}class ae{constructor(t){this.spec=t}}function le(t,e,n,i){return new zt(e.doc,t.unquoted,n,i,t.caseSensitive?void 0:t=>t.toLowerCase(),t.wholeWord?(r=e.doc,s=e.charCategorizer(e.selection.main.head),(t,e,n,i)=>((i>t||i+n.length<e)&&(i=Math.max(0,t-2),n=r.sliceString(i,Math.min(r.length,e+2))),!(s(he(n,t-i))==o.Je.Word&&s(fe(n,t-i))==o.Je.Word||s(fe(n,e-i))==o.Je.Word&&s(he(n,e-i))==o.Je.Word))):void 0);var r,s}class ce extends ae{constructor(t){super(t)}nextMatch(t,e,n){let i=le(this.spec,t,n,t.doc.length).nextOverlapping();if(i.done){let n=Math.min(t.doc.length,e+this.spec.unquoted.length);i=le(this.spec,t,0,n).nextOverlapping()}return i.done||i.value.from==e&&i.value.to==n?null:i.value}prevMatchInRange(t,e,n){for(let i=n;;){let n=Math.max(e,i-1e4-this.spec.unquoted.length),r=le(this.spec,t,n,i),o=null;for(;!r.nextOverlapping().done;)o=r.value;if(o)return o;if(n==e)return null;i-=1e4}}prevMatch(t,e,n){let i=this.prevMatchInRange(t,0,e);return i||(i=this.prevMatchInRange(t,Math.max(0,n-this.spec.unquoted.length),t.doc.length)),!i||i.from==e&&i.to==n?null:i}getReplacement(t){return this.spec.unquote(this.spec.replace)}matchAll(t,e){let n=le(this.spec,t,0,t.doc.length),i=[];for(;!n.next().done;){if(i.length>=e)return null;i.push(n.value)}return i}highlight(t,e,n,i){let r=le(this.spec,t,Math.max(0,e-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,t.doc.length));for(;!r.next().done;)i(r.value.from,r.value.to)}}function ue(t,e,n,i){return new Ft(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?(r=e.charCategorizer(e.selection.main.head),(t,e,n)=>!n[0].length||(r(he(n.input,n.index))!=o.Je.Word||r(fe(n.input,n.index))!=o.Je.Word)&&(r(fe(n.input,n.index+n[0].length))!=o.Je.Word||r(he(n.input,n.index+n[0].length))!=o.Je.Word)):void 0},n,i);var r}function he(t,e){return t.slice((0,o.zK)(t,e,!1),e)}function fe(t,e){return t.slice(e,(0,o.zK)(t,e))}class de extends ae{nextMatch(t,e,n){let i=ue(this.spec,t,n,t.doc.length).next();return i.done&&(i=ue(this.spec,t,0,e).next()),i.done?null:i.value}prevMatchInRange(t,e,n){for(let i=1;;i++){let r=Math.max(e,n-1e4*i),o=ue(this.spec,t,r,n),s=null;for(;!o.next().done;)s=o.value;if(s&&(r==e||s.from>r+10))return s;if(r==e)return null}}prevMatch(t,e,n){return this.prevMatchInRange(t,0,e)||this.prevMatchInRange(t,n,t.doc.length)}getReplacement(t){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,((e,n)=>"$"==n?"$":"&"==n?t.match[0]:"0"!=n&&+n<t.match.length?t.match[n]:e))}matchAll(t,e){let n=ue(this.spec,t,0,t.doc.length),i=[];for(;!n.next().done;){if(i.length>=e)return null;i.push(n.value)}return i}highlight(t,e,n,i){let r=ue(this.spec,t,Math.max(0,e-250),Math.min(n+250,t.doc.length));for(;!r.next().done;)i(r.value.from,r.value.to)}}const pe=o.Pe.define(),ge=o.Pe.define(),me=o.sU.define({create:t=>new be(Ce(t).create(),null),update(t,e){for(let n of e.effects)n.is(pe)?t=new be(n.value.create(),t.panel):n.is(ge)&&(t=new be(t.query,n.value?Me:null));return t},provide:t=>s.S7.from(t,(t=>t.panel))});class be{constructor(t,e){this.query=t,this.panel=e}}const ve=s.NZ.mark({class:"cm-searchMatch"}),ye=s.NZ.mark({class:"cm-searchMatch cm-searchMatch-selected"}),xe=s.Z9.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(me))}update(t){let e=t.state.field(me);(e!=t.startState.field(me)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return s.NZ.none;let{view:n}=this,i=new o.vB;for(let r=0,o=n.visibleRanges,s=o.length;r<s;r++){let{from:e,to:a}=o[r];for(;r<s-1&&a>o[r+1].from-500;)a=o[++r].to;t.highlight(n.state,e,a,((t,e)=>{let r=n.state.selection.ranges.some((n=>n.from==t&&n.to==e));i.add(t,e,r?ye:ve)}))}return i.finish()}},{decorations:t=>t.decorations});function we(t){return e=>{let n=e.state.field(me,!1);return n&&n.query.spec.valid?t(e,n):Pe(e)}}const Se=we(((t,{query:e})=>{let{to:n}=t.state.selection.main,i=e.nextMatch(t.state,n,n);if(!i)return!1;let r=o.OF.single(i.from,i.to),s=t.state.facet(oe);return t.dispatch({selection:r,effects:[Be(t,i),s.scrollToMatch(r.main,t)],userEvent:"select.search"}),je(t),!0})),Oe=we(((t,{query:e})=>{let{state:n}=t,{from:i}=n.selection.main,r=e.prevMatch(n,i,i);if(!r)return!1;let s=o.OF.single(r.from,r.to),a=t.state.facet(oe);return t.dispatch({selection:s,effects:[Be(t,r),a.scrollToMatch(s.main,t)],userEvent:"select.search"}),je(t),!0})),Ie=we(((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!(!n||!n.length)&&(t.dispatch({selection:o.OF.create(n.map((t=>o.OF.range(t.from,t.to)))),userEvent:"select.search.matches"}),!0)})),ke=we(((t,{query:e})=>{let{state:n}=t,{from:i,to:r}=n.selection.main;if(n.readOnly)return!1;let a=e.nextMatch(n,i,i);if(!a)return!1;let l,c,u=a,h=[],f=[];if(u.from==i&&u.to==r&&(c=n.toText(e.getReplacement(u)),h.push({from:u.from,to:u.to,insert:c}),u=e.nextMatch(n,u.from,u.to),f.push(s.Lz.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(i).number)+"."))),u){let e=0==h.length||h[0].from>=a.to?0:a.to-a.from-c.length;l=o.OF.single(u.from-e,u.to-e),f.push(Be(t,u)),f.push(n.facet(oe).scrollToMatch(l.main,t))}return t.dispatch({changes:h,selection:l,effects:f,userEvent:"input.replace"}),!0})),Ee=we(((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map((t=>{let{from:n,to:i}=t;return{from:n,to:i,insert:e.getReplacement(t)}}));if(!n.length)return!1;let i=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:s.Lz.announce.of(i),userEvent:"input.replace.all"}),!0}));function Me(t){return t.state.facet(oe).createPanel(t)}function Ce(t,e){var n,i,r,o,s;let a=t.selection.main,l=a.empty||a.to>a.from+100?"":t.sliceDoc(a.from,a.to);if(e&&!l)return e;let c=t.facet(oe);return new se({search:(null!==(n=null==e?void 0:e.literal)&&void 0!==n?n:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:null!==(i=null==e?void 0:e.caseSensitive)&&void 0!==i?i:c.caseSensitive,literal:null!==(r=null==e?void 0:e.literal)&&void 0!==r?r:c.literal,regexp:null!==(o=null==e?void 0:e.regexp)&&void 0!==o?o:c.regexp,wholeWord:null!==(s=null==e?void 0:e.wholeWord)&&void 0!==s?s:c.wholeWord})}function Ae(t){let e=(0,s.ld)(t,Me);return e&&e.dom.querySelector("[main-field]")}function je(t){let e=Ae(t);e&&e==t.root.activeElement&&e.select()}const Pe=t=>{let e=t.state.field(me,!1);if(e&&e.panel){let n=Ae(t);if(n&&n!=t.root.activeElement){let i=Ce(t.state,e.query.spec);i.valid&&t.dispatch({effects:pe.of(i)}),n.focus(),n.select()}}else t.dispatch({effects:[ge.of(!0),e?pe.of(Ce(t.state,e.query.spec)):o.Pe.appendConfig.of(ze)]});return!0},Te=t=>{let e=t.state.field(me,!1);if(!e||!e.panel)return!1;let n=(0,s.ld)(t,Me);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:ge.of(!1)}),!0},Ne=[{key:"Mod-f",run:Pe,scope:"editor search-panel"},{key:"F3",run:Se,shift:Oe,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Se,shift:Oe,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Te,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:i,to:r}=n.main,s=[],a=0;for(let l=new zt(t.doc,t.sliceDoc(i,r));!l.next().done;){if(s.length>1e3)return!1;l.value.from==i&&(a=s.length),s.push(o.OF.range(l.value.from,l.value.to))}return e(t.update({selection:o.OF.create(s,a),userEvent:"select.search.matches"})),!0}},{key:"Mod-Alt-g",run:t=>{let e=(0,s.ld)(t,Yt);if(!e){let n=[Jt.of(!0)];null==t.state.field(Qt,!1)&&n.push(o.Pe.appendConfig.of([Qt,Xt])),t.dispatch({effects:n}),e=(0,s.ld)(t,Yt)}return e&&e.dom.querySelector("input").select(),!0}},{key:"Mod-d",run:({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some((t=>t.from===t.to)))return(({state:t,dispatch:e})=>{let{selection:n}=t,i=o.OF.create(n.ranges.map((e=>t.wordAt(e.head)||o.OF.cursor(e.head))),n.mainIndex);return!i.eq(n)&&(e(t.update({selection:i})),!0)})({state:t,dispatch:e});let i=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some((e=>t.sliceDoc(e.from,e.to)!=i)))return!1;let r=function(t,e){let{main:n,ranges:i}=t.selection,r=t.wordAt(n.head),o=r&&r.from==n.from&&r.to==n.to;for(let s=!1,a=new zt(t.doc,e,i[i.length-1].to);;){if(a.next(),!a.done){if(s&&i.some((t=>t.from==a.value.from)))continue;if(o){let e=t.wordAt(a.value.from);if(!e||e.from!=a.value.from||e.to!=a.value.to)continue}return a.value}if(s)return null;a=new zt(t.doc,e,0,Math.max(0,i[i.length-1].from-1)),s=!0}}(t,i);return!!r&&(e(t.update({selection:t.selection.addRange(o.OF.range(r.from,r.to),!1),effects:s.Lz.scrollIntoView(r.to)})),!0)},preventDefault:!0}];class _e{constructor(t){this.view=t;let e=this.query=t.state.field(me).query.spec;function n(t,e,n){return Rt("button",{class:"cm-button",name:t,onclick:e,type:"button"},n)}this.commit=this.commit.bind(this),this.searchField=Rt("input",{value:e.search,placeholder:Le(t,"Find"),"aria-label":Le(t,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Rt("input",{value:e.replace,placeholder:Le(t,"Replace"),"aria-label":Le(t,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Rt("input",{type:"checkbox",name:"case",form:"",checked:e.caseSensitive,onchange:this.commit}),this.reField=Rt("input",{type:"checkbox",name:"re",form:"",checked:e.regexp,onchange:this.commit}),this.wordField=Rt("input",{type:"checkbox",name:"word",form:"",checked:e.wholeWord,onchange:this.commit}),this.dom=Rt("div",{onkeydown:t=>this.keydown(t),class:"cm-search"},[this.searchField,n("next",(()=>Se(t)),[Le(t,"next")]),n("prev",(()=>Oe(t)),[Le(t,"previous")]),n("select",(()=>Ie(t)),[Le(t,"all")]),Rt("label",null,[this.caseField,Le(t,"match case")]),Rt("label",null,[this.reField,Le(t,"regexp")]),Rt("label",null,[this.wordField,Le(t,"by word")]),...t.state.readOnly?[]:[Rt("br"),this.replaceField,n("replace",(()=>ke(t)),[Le(t,"replace")]),n("replaceAll",(()=>Ee(t)),[Le(t,"replace all")])],Rt("button",{name:"close",onclick:()=>Te(t),"aria-label":Le(t,"close"),type:"button"},["×"])])}commit(){let t=new se({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});t.eq(this.query)||(this.query=t,this.view.dispatch({effects:pe.of(t)}))}keydown(t){(0,s.TS)(this.view,t,"search-panel")?t.preventDefault():13==t.keyCode&&t.target==this.searchField?(t.preventDefault(),(t.shiftKey?Oe:Se)(this.view)):13==t.keyCode&&t.target==this.replaceField&&(t.preventDefault(),ke(this.view))}update(t){for(let e of t.transactions)for(let t of e.effects)t.is(pe)&&!t.value.eq(this.query)&&this.setQuery(t.value)}setQuery(t){this.query=t,this.searchField.value=t.search,this.replaceField.value=t.replace,this.caseField.checked=t.caseSensitive,this.reField.checked=t.regexp,this.wordField.checked=t.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(oe).top}}function Le(t,e){return t.state.phrase(e)}const De=30,Re=/[\s\.,:;?!]/;function Be(t,{from:e,to:n}){let i=t.state.doc.lineAt(e),r=t.state.doc.lineAt(n).to,o=Math.max(i.from,e-De),a=Math.min(r,n+De),l=t.state.sliceDoc(o,a);if(o!=i.from)for(let s=0;s<De;s++)if(!Re.test(l[s+1])&&Re.test(l[s])){l=l.slice(s);break}if(a!=r)for(let s=l.length-1;s>l.length-De;s--)if(!Re.test(l[s-1])&&Re.test(l[s])){l=l.slice(0,s);break}return s.Lz.announce.of(`${t.state.phrase("current match")}. ${l} ${t.state.phrase("on line")} ${i.number}.`)}const He=s.Lz.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),ze=[me,o.Nb.low(xe),He];var We=n(9256);class Ue{constructor(t,e,n){this.from=t,this.to=e,this.diagnostic=n}}class Fe{constructor(t,e,n){this.diagnostics=t,this.panel=e,this.selected=n}static init(t,e,n){let i=t,r=n.facet(nn).markerFilter;r&&(i=r(i,n));let a=t.slice().sort(((t,e)=>t.from-e.from||t.to-e.to)),l=new o.vB,c=[],u=0;for(let o=0;;){let t,e,i=o==a.length?null:a[o];if(!i&&!c.length)break;for(c.length?(t=u,e=c.reduce(((t,e)=>Math.min(t,e.to)),i&&i.from>t?i.from:1e8)):(t=i.from,e=i.to,c.push(i),o++);o<a.length;){let n=a[o];if(n.from!=t||!(n.to>n.from||n.to==t)){e=Math.min(n.from,e);break}c.push(n),o++,e=Math.min(n.to,e)}let r=dn(c);if(c.some((t=>t.from==t.to||t.from==t.to-1&&n.doc.lineAt(t.from).to==t.from)))l.add(t,t,s.NZ.widget({widget:new sn(r),diagnostics:c.slice()}));else{let n=c.reduce(((t,e)=>e.markClass?t+" "+e.markClass:t),"");l.add(t,e,s.NZ.mark({class:"cm-lintRange cm-lintRange-"+r+n,diagnostics:c.slice(),inclusiveEnd:c.some((t=>t.to>e))}))}u=e;for(let n=0;n<c.length;n++)c[n].to<=u&&c.splice(n--,1)}let h=l.finish();return new Fe(h,e,Ge(h))}}function Ge(t,e=null,n=0){let i=null;return t.between(n,1e9,((t,n,{spec:r})=>{if(!(e&&r.diagnostics.indexOf(e)<0))if(i){if(r.diagnostics.indexOf(i.diagnostic)<0)return!1;i=new Ue(i.from,n,i.diagnostic)}else i=new Ue(t,n,e||r.diagnostics[0])})),i}function Ze(t,e){let n=e.pos,i=e.end||n,r=t.state.facet(nn).hideOn(t,n,i);if(null!=r)return r;let o=t.startState.doc.lineAt(e.pos);return!(!t.effects.some((t=>t.is(qe)))&&!t.changes.touchesRange(o.from,Math.max(o.to,i)))}function Ve(t,e){return t.field(Qe,!1)?e:e.concat(o.Pe.appendConfig.of(pn))}const qe=o.Pe.define(),Ye=o.Pe.define(),Je=o.Pe.define(),Qe=o.sU.define({create:()=>new Fe(s.NZ.none,null,null),update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),i=null,r=t.panel;if(t.selected){let r=e.changes.mapPos(t.selected.from,1);i=Ge(n,t.selected.diagnostic,r)||Ge(n,null,r)}!n.size&&r&&e.state.facet(nn).autoPanel&&(r=null),t=new Fe(n,r,i)}for(let n of e.effects)if(n.is(qe)){let i=e.state.facet(nn).autoPanel?n.value.length?ln.open:null:t.panel;t=Fe.init(n.value,i,e.state)}else n.is(Ye)?t=new Fe(t.diagnostics,n.value?ln.open:null,t.selected):n.is(Je)&&(t=new Fe(t.diagnostics,t.panel,n.value));return t},provide:t=>[s.S7.from(t,(t=>t.panel)),s.Lz.decorations.from(t,(t=>t.diagnostics))]});const Xe=s.NZ.mark({class:"cm-lintRange cm-lintRange-active"});function $e(t,e,n){let i,{diagnostics:r}=t.state.field(Qe),o=-1,s=-1;r.between(e-(n<0?1:0),e+(n>0?1:0),((t,r,{spec:a})=>{if(e>=t&&e<=r&&(t==r||(e>t||n>0)&&(e<r||n<0)))return i=a.diagnostics,o=t,s=r,!1}));let a=t.state.facet(nn).tooltipFilter;return i&&a&&(i=a(i,t.state)),i?{pos:o,end:s,above:t.state.doc.lineAt(o).to<s,create:()=>({dom:Ke(t,i)})}:null}function Ke(t,e){return Rt("ul",{class:"cm-tooltip-lint"},e.map((e=>on(t,e,!1))))}const tn=t=>{let e=t.state.field(Qe,!1);return!(!e||!e.panel)&&(t.dispatch({effects:Ye.of(!1)}),!0)},en=[{key:"Mod-Shift-m",run:t=>{let e=t.state.field(Qe,!1);e&&e.panel||t.dispatch({effects:Ve(t.state,[Ye.of(!0)])});let n=(0,s.ld)(t,ln.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:t=>{let e=t.state.field(Qe,!1);if(!e)return!1;let n=t.state.selection.main,i=e.diagnostics.iter(n.to+1);return!(!i.value&&(i=e.diagnostics.iter(0),!i.value||i.from==n.from&&i.to==n.to))&&(t.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)}}];const nn=o.sj.define({combine:t=>Object.assign({sources:t.map((t=>t.source)).filter((t=>null!=t))},(0,o.QR)(t.map((t=>t.config)),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(t,e)=>t?e?n=>t(n)||e(n):t:e}))});function rn(t){let e=[];if(t)t:for(let{name:n}of t){for(let t=0;t<n.length;t++){let i=n[t];if(/[a-zA-Z]/.test(i)&&!e.some((t=>t.toLowerCase()==i.toLowerCase()))){e.push(i);continue t}}e.push("")}return e}function on(t,e,n){var i;let r=n?rn(e.actions):[];return Rt("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Rt("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),null===(i=e.actions)||void 0===i?void 0:i.map(((n,i)=>{let o=!1,s=i=>{if(i.preventDefault(),o)return;o=!0;let r=Ge(t.state.field(Qe).diagnostics,e);r&&n.apply(t,r.from,r.to)},{name:a}=n,l=r[i]?a.indexOf(r[i]):-1,c=l<0?a:[a.slice(0,l),Rt("u",a.slice(l,l+1)),a.slice(l+1)];return Rt("button",{type:"button",class:"cm-diagnosticAction",onclick:s,onmousedown:s,"aria-label":` Action: ${a}${l<0?"":` (access key "${r[i]})"`}.`},c)})),e.source&&Rt("div",{class:"cm-diagnosticSource"},e.source))}class sn extends s.xO{constructor(t){super(),this.sev=t}eq(t){return t.sev==this.sev}toDOM(){return Rt("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class an{constructor(t,e){this.diagnostic=e,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=on(t,e,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class ln{constructor(t){this.view=t,this.items=[];this.list=Rt("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:e=>{if(27==e.keyCode)tn(this.view),this.view.focus();else if(38==e.keyCode||33==e.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==e.keyCode||34==e.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==e.keyCode)this.moveSelection(0);else if(35==e.keyCode)this.moveSelection(this.items.length-1);else if(13==e.keyCode)this.view.focus();else{if(!(e.keyCode>=65&&e.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:n}=this.items[this.selectedIndex],i=rn(n.actions);for(let r=0;r<i.length;r++)if(i[r].toUpperCase().charCodeAt(0)==e.keyCode){let e=Ge(this.view.state.field(Qe).diagnostics,n);e&&n.actions[r].apply(t,e.from,e.to)}}}e.preventDefault()},onclick:t=>{for(let e=0;e<this.items.length;e++)this.items[e].dom.contains(t.target)&&this.moveSelection(e)}}),this.dom=Rt("div",{class:"cm-panel-lint"},this.list,Rt("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>tn(this.view)},"×")),this.update()}get selectedIndex(){let t=this.view.state.field(Qe).selected;if(!t)return-1;for(let e=0;e<this.items.length;e++)if(this.items[e].diagnostic==t.diagnostic)return e;return-1}update(){let{diagnostics:t,selected:e}=this.view.state.field(Qe),n=0,i=!1,r=null,o=new Set;for(t.between(0,this.view.state.doc.length,((t,s,{spec:a})=>{for(let l of a.diagnostics){if(o.has(l))continue;o.add(l);let t,s=-1;for(let e=n;e<this.items.length;e++)if(this.items[e].diagnostic==l){s=e;break}s<0?(t=new an(this.view,l),this.items.splice(n,0,t),i=!0):(t=this.items[s],s>n&&(this.items.splice(n,s-n),i=!0)),e&&t.diagnostic==e.diagnostic?t.dom.hasAttribute("aria-selected")||(t.dom.setAttribute("aria-selected","true"),r=t):t.dom.hasAttribute("aria-selected")&&t.dom.removeAttribute("aria-selected"),n++}}));n<this.items.length&&!(1==this.items.length&&this.items[0].diagnostic.from<0);)i=!0,this.items.pop();0==this.items.length&&(this.items.push(new an(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),i=!0),r?(this.list.setAttribute("aria-activedescendant",r.id),this.view.requestMeasure({key:this,read:()=>({sel:r.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:t,panel:e})=>{let n=e.height/this.list.offsetHeight;t.top<e.top?this.list.scrollTop-=(e.top-t.top)/n:t.bottom>e.bottom&&(this.list.scrollTop+=(t.bottom-e.bottom)/n)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let t=this.list.firstChild;function e(){let e=t;t=e.nextSibling,e.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;t!=n.dom;)e();t=n.dom.nextSibling}else this.list.insertBefore(n.dom,t);for(;t;)e()}moveSelection(t){if(this.selectedIndex<0)return;let e=Ge(this.view.state.field(Qe).diagnostics,this.items[t].diagnostic);e&&this.view.dispatch({selection:{anchor:e.from,head:e.to},scrollIntoView:!0,effects:Je.of(e)})}static open(t){return new ln(t)}}function cn(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}function un(t){return cn(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const hn=s.Lz.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:un("#d11")},".cm-lintRange-warning":{backgroundImage:un("orange")},".cm-lintRange-info":{backgroundImage:un("#999")},".cm-lintRange-hint":{backgroundImage:un("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function fn(t){return"error"==t?4:"warning"==t?3:"info"==t?2:1}function dn(t){let e="hint",n=1;for(let i of t){let t=fn(i.severity);t>n&&(n=t,e=i.severity)}return e}s.wJ;const pn=[Qe,s.Lz.decorations.compute([Qe],(t=>{let{selected:e,panel:n}=t.field(Qe);return e&&n&&e.from!=e.to?s.NZ.set([Xe.range(e.from,e.to)]):s.NZ.none})),(0,s.Ux)($e,{hideOn:Ze}),hn];var gn=function(t){void 0===t&&(t={});var{crosshairCursor:e=!1}=t,n=[];!1!==t.closeBracketsKeymap&&(n=n.concat(We.Bc)),!1!==t.defaultKeymap&&(n=n.concat(Lt)),!1!==t.searchKeymap&&(n=n.concat(Ne)),!1!==t.historyKeymap&&(n=n.concat(B)),!1!==t.foldKeymap&&(n=n.concat(a.f7)),!1!==t.completionKeymap&&(n=n.concat(We.OO)),!1!==t.lintKeymap&&(n=n.concat(en));var i=[];return!1!==t.lineNumbers&&i.push((0,s.$K)()),!1!==t.highlightActiveLineGutter&&i.push((0,s.Wu)()),!1!==t.highlightSpecialChars&&i.push((0,s.N$)()),!1!==t.history&&i.push(function(t={}){return[w,x.of(t),s.Lz.domEventHandlers({beforeinput(t,e){let n="historyUndo"==t.inputType?O:"historyRedo"==t.inputType?I:null;return!!n&&(t.preventDefault(),n(e))}})]}()),!1!==t.foldGutter&&i.push((0,a.Lv)()),!1!==t.drawSelection&&i.push((0,s.VH)()),!1!==t.dropCursor&&i.push((0,s.A)()),!1!==t.allowMultipleSelections&&i.push(o.$t.allowMultipleSelections.of(!0)),!1!==t.indentOnInput&&i.push((0,a.WD)()),!1!==t.syntaxHighlighting&&i.push((0,a.y9)(a.Zt,{fallback:!0})),!1!==t.bracketMatching&&i.push((0,a.SG)()),!1!==t.closeBrackets&&i.push((0,We.wm)()),!1!==t.autocompletion&&i.push((0,We.yU)()),!1!==t.rectangularSelection&&i.push((0,s.D4)()),!1!==e&&i.push((0,s.HJ)()),!1!==t.highlightActiveLine&&i.push((0,s.dz)()),!1!==t.highlightSelectionMatches&&i.push(function(t){let e=[re,ie];return t&&e.push(Kt.of(t)),e}()),t.tabSize&&"number"==typeof t.tabSize&&i.push(a.Xt.of(" ".repeat(t.tabSize))),i.concat([s.w4.of(n.flat())]).filter(Boolean)},mn=n(9756);const bn="#e5c07b",vn="#e06c75",yn="#56b6c2",xn="#ffffff",wn="#abb2bf",Sn="#7d8799",On="#61afef",In="#98c379",kn="#d19a66",En="#c678dd",Mn="#21252b",Cn="#2c313a",An="#282c34",jn="#353a42",Pn="#3E4451",Tn="#528bff",Nn=s.Lz.theme({"&":{color:wn,backgroundColor:An},".cm-content":{caretColor:Tn},".cm-cursor, .cm-dropCursor":{borderLeftColor:Tn},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Pn},".cm-panels":{backgroundColor:Mn,color:wn},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:An,color:Sn,border:"none"},".cm-activeLineGutter":{backgroundColor:Cn},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:jn},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:jn,borderBottomColor:jn},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Cn,color:wn}}},{dark:!0}),_n=a.cr.define([{tag:mn._A.keyword,color:En},{tag:[mn._A.name,mn._A.deleted,mn._A.character,mn._A.propertyName,mn._A.macroName],color:vn},{tag:[mn._A.function(mn._A.variableName),mn._A.labelName],color:On},{tag:[mn._A.color,mn._A.constant(mn._A.name),mn._A.standard(mn._A.name)],color:kn},{tag:[mn._A.definition(mn._A.name),mn._A.separator],color:wn},{tag:[mn._A.typeName,mn._A.className,mn._A.number,mn._A.changed,mn._A.annotation,mn._A.modifier,mn._A.self,mn._A.namespace],color:bn},{tag:[mn._A.operator,mn._A.operatorKeyword,mn._A.url,mn._A.escape,mn._A.regexp,mn._A.link,mn._A.special(mn._A.string)],color:yn},{tag:[mn._A.meta,mn._A.comment],color:Sn},{tag:mn._A.strong,fontWeight:"bold"},{tag:mn._A.emphasis,fontStyle:"italic"},{tag:mn._A.strikethrough,textDecoration:"line-through"},{tag:mn._A.link,color:Sn,textDecoration:"underline"},{tag:mn._A.heading,fontWeight:"bold",color:vn},{tag:[mn._A.atom,mn._A.bool,mn._A.special(mn._A.variableName)],color:kn},{tag:[mn._A.processingInstruction,mn._A.string,mn._A.inserted],color:In},{tag:mn._A.invalid,color:xn}]),Ln=[Nn,(0,a.y9)(_n)];var Dn=s.Lz.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),Rn=o.YH.define(),Bn=[];function Hn(t){var{value:e,selection:n,onChange:i,onStatistics:a,onCreateEditor:l,onUpdate:c,extensions:u=Bn,autoFocus:h,theme:f="light",height:d=null,minHeight:p=null,maxHeight:g=null,width:m=null,minWidth:b=null,maxWidth:v=null,placeholder:y="",editable:x=!0,readOnly:w=!1,indentWithTab:S=!0,basicSetup:O=!0,root:I,initialState:k}=t,[E,M]=(0,r.useState)(),[C,A]=(0,r.useState)(),[j,P]=(0,r.useState)(),T=s.Lz.theme({"&":{height:d,minHeight:p,maxHeight:g,width:m,minWidth:b,maxWidth:v},"& .cm-scroller":{height:"100% !important"}}),N=s.Lz.updateListener.of((t=>{if(t.docChanged&&"function"==typeof i&&!t.transactions.some((t=>t.annotation(Rn)))){var e=t.state.doc.toString();i(e,t)}a&&a((t=>({line:t.state.doc.lineAt(t.state.selection.main.from),lineCount:t.state.doc.lines,lineBreak:t.state.lineBreak,length:t.state.doc.length,readOnly:t.state.readOnly,tabSize:t.state.tabSize,selection:t.state.selection,selectionAsSingle:t.state.selection.asSingle().main,ranges:t.state.selection.ranges,selectionCode:t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to),selections:t.state.selection.ranges.map((e=>t.state.sliceDoc(e.from,e.to))),selectedText:t.state.selection.ranges.some((t=>!t.empty))}))(t))})),_=function(t){void 0===t&&(t={});var{indentWithTab:e=!0,editable:n=!0,readOnly:i=!1,theme:r="light",placeholder:a="",basicSetup:l=!0}=t,c=[];switch(e&&c.unshift(s.w4.of([Dt])),l&&("boolean"==typeof l?c.unshift(gn()):c.unshift(gn(l))),a&&c.unshift((0,s.qf)(a)),r){case"light":c.push(Dn);break;case"dark":c.push(Ln);break;case"none":break;default:c.push(r)}return!1===n&&c.push(s.Lz.editable.of(!1)),i&&c.push(o.$t.readOnly.of(!0)),[...c]}({theme:f,editable:x,readOnly:w,placeholder:y,indentWithTab:S,basicSetup:O}),L=[N,T,..._];return c&&"function"==typeof c&&L.push(s.Lz.updateListener.of(c)),L=L.concat(u),(0,r.useEffect)((()=>{if(E&&!j){var t={doc:e,selection:n,extensions:L},i=k?o.$t.fromJSON(k.json,t,k.fields):o.$t.create(t);if(P(i),!C){var r=new s.Lz({state:i,parent:E,root:I});A(r),l&&l(r,i)}}return()=>{C&&(P(void 0),A(void 0))}}),[E,j]),(0,r.useEffect)((()=>M(t.container)),[t.container]),(0,r.useEffect)((()=>()=>{C&&(C.destroy(),A(void 0))}),[C]),(0,r.useEffect)((()=>{h&&C&&C.focus()}),[h,C]),(0,r.useEffect)((()=>{C&&C.dispatch({effects:o.Pe.reconfigure.of(L)})}),[f,u,d,p,g,m,b,v,y,x,w,S,O,i,c]),(0,r.useEffect)((()=>{if(void 0!==e){var t=C?C.state.doc.toString():"";C&&e!==t&&C.dispatch({changes:{from:0,to:t.length,insert:e||""},annotations:[Rn.of(!0)]})}}),[e,C]),{state:j,setState:P,view:C,setView:A,container:E,setContainer:M}}var zn=n(4922),Wn=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],Un=(0,r.forwardRef)(((t,e)=>{var{className:n,value:o="",selection:s,extensions:a=[],onChange:l,onStatistics:c,onCreateEditor:u,onUpdate:h,autoFocus:f,theme:d="light",height:p,minHeight:g,maxHeight:m,width:b,minWidth:v,maxWidth:y,basicSetup:x,placeholder:w,indentWithTab:S,editable:O,readOnly:I,root:k,initialState:E}=t,M=function(t,e){if(null==t)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.includes(i))continue;n[i]=t[i]}return n}(t,Wn),C=(0,r.useRef)(null),{state:A,view:j,container:P}=Hn({container:C.current,root:k,value:o,autoFocus:f,theme:d,height:p,minHeight:g,maxHeight:m,width:b,minWidth:v,maxWidth:y,basicSetup:x,placeholder:w,indentWithTab:S,editable:O,readOnly:I,selection:s,onChange:l,onStatistics:c,onCreateEditor:u,onUpdate:h,extensions:a,initialState:E});if((0,r.useImperativeHandle)(e,(()=>({editor:C.current,state:A,view:j})),[C,P,A,j]),"string"!=typeof o)throw new Error("value must be typeof string but got "+typeof o);var T="string"==typeof d?"cm-theme-"+d:"cm-theme";return(0,zn.jsx)("div",i({ref:C,className:T+(n?" "+n:"")},M))}));Un.displayName="CodeMirror";const Fn=Un},5755:(t,e)=>{var n;
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/!function(){"use strict";var i={}.hasOwnProperty;function r(){for(var t=[],e=0;e<arguments.length;e++){var n=arguments[e];if(n){var o=typeof n;if("string"===o||"number"===o)t.push(n);else if(Array.isArray(n)){if(n.length){var s=r.apply(null,n);s&&t.push(s)}}else if("object"===o)if(n.toString===Object.prototype.toString)for(var a in n)i.call(n,a)&&n[a]&&t.push(a);else t.push(n.toString())}}return t.join(" ")}t.exports?(r.default=r,t.exports=r):void 0===(n=function(){return r}.apply(e,[]))||(t.exports=n)}()},9572:(t,e,n)=>{var i="Expected a function",r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,a=/^0o[0-7]+$/i,l=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,h=c||u||Function("return this")(),f=Object.prototype.toString,d=Math.max,p=Math.min,g=function(){return h.Date.now()};function m(t,e,n){var r,o,s,a,l,c,u=0,h=!1,f=!1,m=!0;if("function"!=typeof t)throw new TypeError(i);function y(e){var n=r,i=o;return r=o=void 0,u=e,a=t.apply(i,n)}function x(t){var n=t-c;return void 0===c||n>=e||n<0||f&&t-u>=s}function w(){var t=g();if(x(t))return S(t);l=setTimeout(w,function(t){var n=e-(t-c);return f?p(n,s-(t-u)):n}(t))}function S(t){return l=void 0,m&&r?y(t):(r=o=void 0,a)}function O(){var t=g(),n=x(t);if(r=arguments,o=this,c=t,n){if(void 0===l)return function(t){return u=t,l=setTimeout(w,e),h?y(t):a}(c);if(f)return l=setTimeout(w,e),y(c)}return void 0===l&&(l=setTimeout(w,e)),a}return e=v(e)||0,b(n)&&(h=!!n.leading,s=(f="maxWait"in n)?d(v(n.maxWait)||0,e):s,m="trailing"in n?!!n.trailing:m),O.cancel=function(){void 0!==l&&clearTimeout(l),u=0,r=c=o=l=void 0},O.flush=function(){return void 0===l?a:S(g())},O}function b(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function v(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==f.call(t)}(t))return NaN;if(b(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(r,"");var n=s.test(t);return n||a.test(t)?l(t.slice(2),n?2:8):o.test(t)?NaN:+t}t.exports=function(t,e,n){var r=!0,o=!0;if("function"!=typeof t)throw new TypeError(i);return b(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),m(t,e,{leading:r,maxWait:e,trailing:o})}},7230:(t,e,n)=>{var i=n(3984)(n(9107),"DataView");t.exports=i},3435:(t,e,n)=>{var i=n(6890),r=n(9484),o=n(7215),s=n(7811),a=n(747);function l(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=r,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,t.exports=l},5217:(t,e,n)=>{var i=n(4412),r=n(8522),o=n(469),s=n(1161),a=n(1441);function l(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=r,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,t.exports=l},5661:(t,e,n)=>{var i=n(3984)(n(9107),"Map");t.exports=i},3287:(t,e,n)=>{var i=n(8206),r=n(9768),o=n(6827),s=n(663),a=n(5135);function l(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=r,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,t.exports=l},9102:(t,e,n)=>{var i=n(3984)(n(9107),"Promise");t.exports=i},5963:(t,e,n)=>{var i=n(3984)(n(9107),"Set");t.exports=i},1641:(t,e,n)=>{var i=n(3287),r=n(2486),o=n(9361);function s(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new i;++e<n;)this.add(t[e])}s.prototype.add=s.prototype.push=r,s.prototype.has=o,t.exports=s},6435:(t,e,n)=>{var i=n(5217),r=n(8658),o=n(3844),s=n(6503),a=n(1563),l=n(259);function c(t){var e=this.__data__=new i(t);this.size=e.size}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=s,c.prototype.has=a,c.prototype.set=l,t.exports=c},6711:(t,e,n)=>{var i=n(9107).Symbol;t.exports=i},9282:(t,e,n)=>{var i=n(9107).Uint8Array;t.exports=i},2850:(t,e,n)=>{var i=n(3984)(n(9107),"WeakMap");t.exports=i},3643:t=>{t.exports=function(t,e){for(var n=-1,i=null==t?0:t.length;++n<i&&!1!==e(t[n],n,t););return t}},3928:t=>{t.exports=function(t,e){for(var n=-1,i=null==t?0:t.length,r=0,o=[];++n<i;){var s=t[n];e(s,n,t)&&(o[r++]=s)}return o}},7137:(t,e,n)=>{var i=n(5410),r=n(2382),o=n(2003),s=n(1262),a=n(2615),l=n(9221),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=o(t),u=!n&&r(t),h=!n&&!u&&s(t),f=!n&&!u&&!h&&l(t),d=n||u||h||f,p=d?i(t.length,String):[],g=p.length;for(var m in t)!e&&!c.call(t,m)||d&&("length"==m||h&&("offset"==m||"parent"==m)||f&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||a(m,g))||p.push(m);return p}},14:t=>{t.exports=function(t,e){for(var n=-1,i=null==t?0:t.length,r=Array(i);++n<i;)r[n]=e(t[n],n,t);return r}},562:t=>{t.exports=function(t,e){for(var n=-1,i=e.length,r=t.length;++n<i;)t[r+n]=e[n];return t}},9854:t=>{t.exports=function(t,e){for(var n=-1,i=null==t?0:t.length;++n<i;)if(e(t[n],n,t))return!0;return!1}},6645:(t,e,n)=>{var i=n(9330),r=n(8330),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var s=t[e];o.call(t,e)&&r(s,n)&&(void 0!==n||e in t)||i(t,e,n)}},4767:(t,e,n)=>{var i=n(8330);t.exports=function(t,e){for(var n=t.length;n--;)if(i(t[n][0],e))return n;return-1}},383:(t,e,n)=>{var i=n(8113),r=n(5304);t.exports=function(t,e){return t&&i(e,r(e),t)}},7844:(t,e,n)=>{var i=n(8113),r=n(7495);t.exports=function(t,e){return t&&i(e,r(e),t)}},9330:(t,e,n)=>{var i=n(5390);t.exports=function(t,e,n){"__proto__"==e&&i?i(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},1937:(t,e,n)=>{var i=n(6435),r=n(3643),o=n(6645),s=n(383),a=n(7844),l=n(2932),c=n(9061),u=n(709),h=n(8038),f=n(5760),d=n(3183),p=n(695),g=n(9303),m=n(5385),b=n(3991),v=n(2003),y=n(1262),x=n(5652),w=n(5603),S=n(9318),O=n(5304),I=n(7495),k="[object Arguments]",E="[object Function]",M="[object Object]",C={};C[k]=C["[object Array]"]=C["[object ArrayBuffer]"]=C["[object DataView]"]=C["[object Boolean]"]=C["[object Date]"]=C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Map]"]=C["[object Number]"]=C[M]=C["[object RegExp]"]=C["[object Set]"]=C["[object String]"]=C["[object Symbol]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C["[object Error]"]=C[E]=C["[object WeakMap]"]=!1,t.exports=function t(e,n,A,j,P,T){var N,_=1&n,L=2&n,D=4&n;if(A&&(N=P?A(e,j,P,T):A(e)),void 0!==N)return N;if(!w(e))return e;var R=v(e);if(R){if(N=g(e),!_)return c(e,N)}else{var B=p(e),H=B==E||"[object GeneratorFunction]"==B;if(y(e))return l(e,_);if(B==M||B==k||H&&!P){if(N=L||H?{}:b(e),!_)return L?h(e,a(N,e)):u(e,s(N,e))}else{if(!C[B])return P?e:{};N=m(e,B,_)}}T||(T=new i);var z=T.get(e);if(z)return z;T.set(e,N),S(e)?e.forEach((function(i){N.add(t(i,n,A,i,e,T))})):x(e)&&e.forEach((function(i,r){N.set(r,t(i,n,A,r,e,T))}));var W=R?void 0:(D?L?d:f:L?I:O)(e);return r(W||e,(function(i,r){W&&(i=e[r=i]),o(N,r,t(i,n,A,r,e,T))})),N}},3962:(t,e,n)=>{var i=n(5603),r=Object.create,o=function(){function t(){}return function(e){if(!i(e))return{};if(r)return r(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=o},7587:(t,e,n)=>{var i=n(427),r=n(3679)(i);t.exports=r},1595:(t,e,n)=>{var i=n(951)();t.exports=i},427:(t,e,n)=>{var i=n(1595),r=n(5304);t.exports=function(t,e){return t&&i(t,e,r)}},384:(t,e,n)=>{var i=n(4275),r=n(8059);t.exports=function(t,e){for(var n=0,o=(e=i(e,t)).length;null!=t&&n<o;)t=t[r(e[n++])];return n&&n==o?t:void 0}},8821:(t,e,n)=>{var i=n(562),r=n(2003);t.exports=function(t,e,n){var o=e(t);return r(t)?o:i(o,n(t))}},6522:(t,e,n)=>{var i=n(6711),r=n(905),o=n(2588),s=i?i.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?r(t):o(t)}},6571:t=>{t.exports=function(t,e){return null!=t&&e in Object(t)}},2744:(t,e,n)=>{var i=n(6522),r=n(2620);t.exports=function(t){return r(t)&&"[object Arguments]"==i(t)}},9336:(t,e,n)=>{var i=n(1894),r=n(2620);t.exports=function t(e,n,o,s,a){return e===n||(null==e||null==n||!r(e)&&!r(n)?e!=e&&n!=n:i(e,n,o,s,t,a))}},1894:(t,e,n)=>{var i=n(6435),r=n(1505),o=n(9620),s=n(439),a=n(695),l=n(2003),c=n(1262),u=n(9221),h="[object Arguments]",f="[object Array]",d="[object Object]",p=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,g,m,b){var v=l(t),y=l(e),x=v?f:a(t),w=y?f:a(e),S=(x=x==h?d:x)==d,O=(w=w==h?d:w)==d,I=x==w;if(I&&c(t)){if(!c(e))return!1;v=!0,S=!1}if(I&&!S)return b||(b=new i),v||u(t)?r(t,e,n,g,m,b):o(t,e,x,n,g,m,b);if(!(1&n)){var k=S&&p.call(t,"__wrapped__"),E=O&&p.call(e,"__wrapped__");if(k||E){var M=k?t.value():t,C=E?e.value():e;return b||(b=new i),m(M,C,n,g,b)}}return!!I&&(b||(b=new i),s(t,e,n,g,m,b))}},8742:(t,e,n)=>{var i=n(695),r=n(2620);t.exports=function(t){return r(t)&&"[object Map]"==i(t)}},4253:(t,e,n)=>{var i=n(6435),r=n(9336);t.exports=function(t,e,n,o){var s=n.length,a=s,l=!o;if(null==t)return!a;for(t=Object(t);s--;){var c=n[s];if(l&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++s<a;){var u=(c=n[s])[0],h=t[u],f=c[1];if(l&&c[2]){if(void 0===h&&!(u in t))return!1}else{var d=new i;if(o)var p=o(h,f,u,t,e,d);if(!(void 0===p?r(f,h,3,o,d):p))return!1}}return!0}},2249:(t,e,n)=>{var i=n(8148),r=n(1398),o=n(5603),s=n(1543),a=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,h=c.hasOwnProperty,f=RegExp("^"+u.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||r(t))&&(i(t)?f:a).test(s(t))}},5476:(t,e,n)=>{var i=n(695),r=n(2620);t.exports=function(t){return r(t)&&"[object Set]"==i(t)}},5387:(t,e,n)=>{var i=n(6522),r=n(7164),o=n(2620),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&r(t.length)&&!!s[i(t)]}},7675:(t,e,n)=>{var i=n(5141),r=n(8476),o=n(1686),s=n(2003),a=n(7093);t.exports=function(t){return"function"==typeof t?t:null==t?o:"object"==typeof t?s(t)?r(t[0],t[1]):i(t):a(t)}},6794:(t,e,n)=>{var i=n(6165),r=n(6132),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!i(t))return r(t);var e=[];for(var n in Object(t))o.call(t,n)&&"constructor"!=n&&e.push(n);return e}},8157:(t,e,n)=>{var i=n(5603),r=n(6165),o=n(4555),s=Object.prototype.hasOwnProperty;t.exports=function(t){if(!i(t))return o(t);var e=r(t),n=[];for(var a in t)("constructor"!=a||!e&&s.call(t,a))&&n.push(a);return n}},5718:(t,e,n)=>{var i=n(7587),r=n(6316);t.exports=function(t,e){var n=-1,o=r(t)?Array(t.length):[];return i(t,(function(t,i,r){o[++n]=e(t,i,r)})),o}},5141:(t,e,n)=>{var i=n(4253),r=n(8418),o=n(3591);t.exports=function(t){var e=r(t);return 1==e.length&&e[0][2]?o(e[0][0],e[0][1]):function(n){return n===t||i(n,t,e)}}},8476:(t,e,n)=>{var i=n(9336),r=n(1214),o=n(8765),s=n(5456),a=n(7030),l=n(3591),c=n(8059);t.exports=function(t,e){return s(t)&&a(e)?l(c(t),e):function(n){var s=r(n,t);return void 0===s&&s===e?o(n,t):i(e,s,3)}}},1171:t=>{t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},4589:(t,e,n)=>{var i=n(384);t.exports=function(t){return function(e){return i(e,t)}}},5410:t=>{t.exports=function(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}},8354:(t,e,n)=>{var i=n(6711),r=n(14),o=n(2003),s=n(6596),a=i?i.prototype:void 0,l=a?a.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(o(e))return r(e,t)+"";if(s(e))return l?l.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}},2347:t=>{t.exports=function(t){return function(e){return t(e)}}},7585:t=>{t.exports=function(t,e){return t.has(e)}},2072:(t,e,n)=>{var i=n(1686);t.exports=function(t){return"function"==typeof t?t:i}},4275:(t,e,n)=>{var i=n(2003),r=n(5456),o=n(5240),s=n(7060);t.exports=function(t,e){return i(t)?t:r(t,e)?[t]:o(s(t))}},1987:(t,e,n)=>{var i=n(9282);t.exports=function(t){var e=new t.constructor(t.byteLength);return new i(e).set(new i(t)),e}},2932:(t,e,n)=>{t=n.nmd(t);var i=n(9107),r=e&&!e.nodeType&&e,o=r&&t&&!t.nodeType&&t,s=o&&o.exports===r?i.Buffer:void 0,a=s?s.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,i=a?a(n):new t.constructor(n);return t.copy(i),i}},3931:(t,e,n)=>{var i=n(1987);t.exports=function(t,e){var n=e?i(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},1259:t=>{var e=/\w*$/;t.exports=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}},6878:(t,e,n)=>{var i=n(6711),r=i?i.prototype:void 0,o=r?r.valueOf:void 0;t.exports=function(t){return o?Object(o.call(t)):{}}},3859:(t,e,n)=>{var i=n(1987);t.exports=function(t,e){var n=e?i(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},9061:t=>{t.exports=function(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e}},8113:(t,e,n)=>{var i=n(6645),r=n(9330);t.exports=function(t,e,n,o){var s=!n;n||(n={});for(var a=-1,l=e.length;++a<l;){var c=e[a],u=o?o(n[c],t[c],c,n,t):void 0;void 0===u&&(u=t[c]),s?r(n,c,u):i(n,c,u)}return n}},709:(t,e,n)=>{var i=n(8113),r=n(6806);t.exports=function(t,e){return i(t,r(t),e)}},8038:(t,e,n)=>{var i=n(8113),r=n(6337);t.exports=function(t,e){return i(t,r(t),e)}},3887:(t,e,n)=>{var i=n(9107)["__core-js_shared__"];t.exports=i},3679:(t,e,n)=>{var i=n(6316);t.exports=function(t,e){return function(n,r){if(null==n)return n;if(!i(n))return t(n,r);for(var o=n.length,s=e?o:-1,a=Object(n);(e?s--:++s<o)&&!1!==r(a[s],s,a););return n}}},951:t=>{t.exports=function(t){return function(e,n,i){for(var r=-1,o=Object(e),s=i(e),a=s.length;a--;){var l=s[t?a:++r];if(!1===n(o[l],l,o))break}return e}}},5390:(t,e,n)=>{var i=n(3984),r=function(){try{var t=i(Object,"defineProperty");return t({},"",{}),t}catch(e){}}();t.exports=r},1505:(t,e,n)=>{var i=n(1641),r=n(9854),o=n(7585);t.exports=function(t,e,n,s,a,l){var c=1&n,u=t.length,h=e.length;if(u!=h&&!(c&&h>u))return!1;var f=l.get(t),d=l.get(e);if(f&&d)return f==e&&d==t;var p=-1,g=!0,m=2&n?new i:void 0;for(l.set(t,e),l.set(e,t);++p<u;){var b=t[p],v=e[p];if(s)var y=c?s(v,b,p,e,t,l):s(b,v,p,t,e,l);if(void 0!==y){if(y)continue;g=!1;break}if(m){if(!r(e,(function(t,e){if(!o(m,e)&&(b===t||a(b,t,n,s,l)))return m.push(e)}))){g=!1;break}}else if(b!==v&&!a(b,v,n,s,l)){g=!1;break}}return l.delete(t),l.delete(e),g}},9620:(t,e,n)=>{var i=n(6711),r=n(9282),o=n(8330),s=n(1505),a=n(5483),l=n(5841),c=i?i.prototype:void 0,u=c?c.valueOf:void 0;t.exports=function(t,e,n,i,c,h,f){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!h(new r(t),new r(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var d=a;case"[object Set]":var p=1&i;if(d||(d=l),t.size!=e.size&&!p)return!1;var g=f.get(t);if(g)return g==e;i|=2,f.set(t,e);var m=s(d(t),d(e),i,c,h,f);return f.delete(t),m;case"[object Symbol]":if(u)return u.call(t)==u.call(e)}return!1}},439:(t,e,n)=>{var i=n(5760),r=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,o,s,a){var l=1&n,c=i(t),u=c.length;if(u!=i(e).length&&!l)return!1;for(var h=u;h--;){var f=c[h];if(!(l?f in e:r.call(e,f)))return!1}var d=a.get(t),p=a.get(e);if(d&&p)return d==e&&p==t;var g=!0;a.set(t,e),a.set(e,t);for(var m=l;++h<u;){var b=t[f=c[h]],v=e[f];if(o)var y=l?o(v,b,f,e,t,a):o(b,v,f,t,e,a);if(!(void 0===y?b===v||s(b,v,n,o,a):y)){g=!1;break}m||(m="constructor"==f)}if(g&&!m){var x=t.constructor,w=e.constructor;x==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof x&&x instanceof x&&"function"==typeof w&&w instanceof w||(g=!1)}return a.delete(t),a.delete(e),g}},2718:(t,e,n)=>{var i="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=i},5760:(t,e,n)=>{var i=n(8821),r=n(6806),o=n(5304);t.exports=function(t){return i(t,o,r)}},3183:(t,e,n)=>{var i=n(8821),r=n(6337),o=n(7495);t.exports=function(t){return i(t,o,r)}},6929:(t,e,n)=>{var i=n(9732);t.exports=function(t,e){var n=t.__data__;return i(e)?n["string"==typeof e?"string":"hash"]:n.map}},8418:(t,e,n)=>{var i=n(7030),r=n(5304);t.exports=function(t){for(var e=r(t),n=e.length;n--;){var o=e[n],s=t[o];e[n]=[o,s,i(s)]}return e}},3984:(t,e,n)=>{var i=n(2249),r=n(1074);t.exports=function(t,e){var n=r(t,e);return i(n)?n:void 0}},5425:(t,e,n)=>{var i=n(889)(Object.getPrototypeOf,Object);t.exports=i},905:(t,e,n)=>{var i=n(6711),r=Object.prototype,o=r.hasOwnProperty,s=r.toString,a=i?i.toStringTag:void 0;t.exports=function(t){var e=o.call(t,a),n=t[a];try{t[a]=void 0;var i=!0}catch(l){}var r=s.call(t);return i&&(e?t[a]=n:delete t[a]),r}},6806:(t,e,n)=>{var i=n(3928),r=n(119),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(t){return null==t?[]:(t=Object(t),i(s(t),(function(e){return o.call(t,e)})))}:r;t.exports=a},6337:(t,e,n)=>{var i=n(562),r=n(5425),o=n(6806),s=n(119),a=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)i(e,o(t)),t=r(t);return e}:s;t.exports=a},695:(t,e,n)=>{var i=n(7230),r=n(5661),o=n(9102),s=n(5963),a=n(2850),l=n(6522),c=n(1543),u="[object Map]",h="[object Promise]",f="[object Set]",d="[object WeakMap]",p="[object DataView]",g=c(i),m=c(r),b=c(o),v=c(s),y=c(a),x=l;(i&&x(new i(new ArrayBuffer(1)))!=p||r&&x(new r)!=u||o&&x(o.resolve())!=h||s&&x(new s)!=f||a&&x(new a)!=d)&&(x=function(t){var e=l(t),n="[object Object]"==e?t.constructor:void 0,i=n?c(n):"";if(i)switch(i){case g:return p;case m:return u;case b:return h;case v:return f;case y:return d}return e}),t.exports=x},1074:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},2248:(t,e,n)=>{var i=n(4275),r=n(2382),o=n(2003),s=n(2615),a=n(7164),l=n(8059);t.exports=function(t,e,n){for(var c=-1,u=(e=i(e,t)).length,h=!1;++c<u;){var f=l(e[c]);if(!(h=null!=t&&n(t,f)))break;t=t[f]}return h||++c!=u?h:!!(u=null==t?0:t.length)&&a(u)&&s(f,u)&&(o(t)||r(t))}},6890:(t,e,n)=>{var i=n(6060);t.exports=function(){this.__data__=i?i(null):{},this.size=0}},9484:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},7215:(t,e,n)=>{var i=n(6060),r=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(i){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return r.call(e,t)?e[t]:void 0}},7811:(t,e,n)=>{var i=n(6060),r=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return i?void 0!==e[t]:r.call(e,t)}},747:(t,e,n)=>{var i=n(6060);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=i&&void 0===e?"__lodash_hash_undefined__":e,this}},9303:t=>{var e=Object.prototype.hasOwnProperty;t.exports=function(t){var n=t.length,i=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(i.index=t.index,i.input=t.input),i}},5385:(t,e,n)=>{var i=n(1987),r=n(3931),o=n(1259),s=n(6878),a=n(3859);t.exports=function(t,e,n){var l=t.constructor;switch(e){case"[object ArrayBuffer]":return i(t);case"[object Boolean]":case"[object Date]":return new l(+t);case"[object DataView]":return r(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(t,n);case"[object Map]":case"[object Set]":return new l;case"[object Number]":case"[object String]":return new l(t);case"[object RegExp]":return o(t);case"[object Symbol]":return s(t)}}},3991:(t,e,n)=>{var i=n(3962),r=n(5425),o=n(6165);t.exports=function(t){return"function"!=typeof t.constructor||o(t)?{}:i(r(t))}},2615:t=>{var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var i=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==i||"symbol"!=i&&e.test(t))&&t>-1&&t%1==0&&t<n}},5456:(t,e,n)=>{var i=n(2003),r=n(6596),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;t.exports=function(t,e){if(i(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!r(t))||(s.test(t)||!o.test(t)||null!=e&&t in Object(e))}},9732:t=>{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},1398:(t,e,n)=>{var i,r=n(3887),o=(i=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";t.exports=function(t){return!!o&&o in t}},6165:t=>{var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},7030:(t,e,n)=>{var i=n(5603);t.exports=function(t){return t==t&&!i(t)}},4412:t=>{t.exports=function(){this.__data__=[],this.size=0}},8522:(t,e,n)=>{var i=n(4767),r=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=i(e,t);return!(n<0)&&(n==e.length-1?e.pop():r.call(e,n,1),--this.size,!0)}},469:(t,e,n)=>{var i=n(4767);t.exports=function(t){var e=this.__data__,n=i(e,t);return n<0?void 0:e[n][1]}},1161:(t,e,n)=>{var i=n(4767);t.exports=function(t){return i(this.__data__,t)>-1}},1441:(t,e,n)=>{var i=n(4767);t.exports=function(t,e){var n=this.__data__,r=i(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}},8206:(t,e,n)=>{var i=n(3435),r=n(5217),o=n(5661);t.exports=function(){this.size=0,this.__data__={hash:new i,map:new(o||r),string:new i}}},9768:(t,e,n)=>{var i=n(6929);t.exports=function(t){var e=i(this,t).delete(t);return this.size-=e?1:0,e}},6827:(t,e,n)=>{var i=n(6929);t.exports=function(t){return i(this,t).get(t)}},663:(t,e,n)=>{var i=n(6929);t.exports=function(t){return i(this,t).has(t)}},5135:(t,e,n)=>{var i=n(6929);t.exports=function(t,e){var n=i(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}},5483:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,i){n[++e]=[i,t]})),n}},3591:t=>{t.exports=function(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}},874:(t,e,n)=>{var i=n(9513);t.exports=function(t){var e=i(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},6060:(t,e,n)=>{var i=n(3984)(Object,"create");t.exports=i},6132:(t,e,n)=>{var i=n(889)(Object.keys,Object);t.exports=i},4555:t=>{t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},8315:(t,e,n)=>{t=n.nmd(t);var i=n(2718),r=e&&!e.nodeType&&e,o=r&&t&&!t.nodeType&&t,s=o&&o.exports===r&&i.process,a=function(){try{var t=o&&o.require&&o.require("util").types;return t||s&&s.binding&&s.binding("util")}catch(e){}}();t.exports=a},2588:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},889:t=>{t.exports=function(t,e){return function(n){return t(e(n))}}},9107:(t,e,n)=>{var i=n(2718),r="object"==typeof self&&self&&self.Object===Object&&self,o=i||r||Function("return this")();t.exports=o},2486:t=>{t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},9361:t=>{t.exports=function(t){return this.__data__.has(t)}},5841:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},8658:(t,e,n)=>{var i=n(5217);t.exports=function(){this.__data__=new i,this.size=0}},3844:t=>{t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},6503:t=>{t.exports=function(t){return this.__data__.get(t)}},1563:t=>{t.exports=function(t){return this.__data__.has(t)}},259:(t,e,n)=>{var i=n(5217),r=n(5661),o=n(3287);t.exports=function(t,e){var n=this.__data__;if(n instanceof i){var s=n.__data__;if(!r||s.length<199)return s.push([t,e]),this.size=++n.size,this;n=this.__data__=new o(s)}return n.set(t,e),this.size=n.size,this}},5240:(t,e,n)=>{var i=n(874),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,s=i((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(r,(function(t,n,i,r){e.push(i?r.replace(o,"$1"):n||t)})),e}));t.exports=s},8059:(t,e,n)=>{var i=n(6596);t.exports=function(t){if("string"==typeof t||i(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},1543:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(n){}try{return t+""}catch(n){}}return""}},3009:(t,e,n)=>{var i=n(1937);t.exports=function(t){return i(t,5)}},8330:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},1633:(t,e,n)=>{var i=n(427),r=n(2072);t.exports=function(t,e){return t&&i(t,r(e))}},1214:(t,e,n)=>{var i=n(384);t.exports=function(t,e,n){var r=null==t?void 0:i(t,e);return void 0===r?n:r}},8765:(t,e,n)=>{var i=n(6571),r=n(2248);t.exports=function(t,e){return null!=t&&r(t,e,i)}},1686:t=>{t.exports=function(t){return t}},2382:(t,e,n)=>{var i=n(2744),r=n(2620),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,l=i(function(){return arguments}())?i:function(t){return r(t)&&s.call(t,"callee")&&!a.call(t,"callee")};t.exports=l},2003:t=>{var e=Array.isArray;t.exports=e},6316:(t,e,n)=>{var i=n(8148),r=n(7164);t.exports=function(t){return null!=t&&r(t.length)&&!i(t)}},1262:(t,e,n)=>{t=n.nmd(t);var i=n(9107),r=n(2125),o=e&&!e.nodeType&&e,s=o&&t&&!t.nodeType&&t,a=s&&s.exports===o?i.Buffer:void 0,l=(a?a.isBuffer:void 0)||r;t.exports=l},1470:(t,e,n)=>{var i=n(9336);t.exports=function(t,e){return i(t,e)}},8148:(t,e,n)=>{var i=n(6522),r=n(5603);t.exports=function(t){if(!r(t))return!1;var e=i(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},7164:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},5652:(t,e,n)=>{var i=n(8742),r=n(2347),o=n(8315),s=o&&o.isMap,a=s?r(s):i;t.exports=a},5603:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},2620:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},1449:(t,e,n)=>{var i=n(6522),r=n(5425),o=n(2620),s=Function.prototype,a=Object.prototype,l=s.toString,c=a.hasOwnProperty,u=l.call(Object);t.exports=function(t){if(!o(t)||"[object Object]"!=i(t))return!1;var e=r(t);if(null===e)return!0;var n=c.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==u}},9318:(t,e,n)=>{var i=n(5476),r=n(2347),o=n(8315),s=o&&o.isSet,a=s?r(s):i;t.exports=a},3085:(t,e,n)=>{var i=n(6522),r=n(2003),o=n(2620);t.exports=function(t){return"string"==typeof t||!r(t)&&o(t)&&"[object String]"==i(t)}},6596:(t,e,n)=>{var i=n(6522),r=n(2620);t.exports=function(t){return"symbol"==typeof t||r(t)&&"[object Symbol]"==i(t)}},9221:(t,e,n)=>{var i=n(5387),r=n(2347),o=n(8315),s=o&&o.isTypedArray,a=s?r(s):i;t.exports=a},5304:(t,e,n)=>{var i=n(7137),r=n(6794),o=n(6316);t.exports=function(t){return o(t)?i(t):r(t)}},7495:(t,e,n)=>{var i=n(7137),r=n(8157),o=n(6316);t.exports=function(t){return o(t)?i(t,!0):r(t)}},7528:(t,e,n)=>{var i=n(14),r=n(7675),o=n(5718),s=n(2003);t.exports=function(t,e){return(s(t)?i:o)(t,r(e,3))}},9513:(t,e,n)=>{var i=n(3287);function r(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var s=t.apply(this,i);return n.cache=o.set(r,s)||o,s};return n.cache=new(r.Cache||i),n}r.Cache=i,t.exports=r},7093:(t,e,n)=>{var i=n(1171),r=n(4589),o=n(5456),s=n(8059);t.exports=function(t){return o(t)?i(s(t)):r(t)}},119:t=>{t.exports=function(){return[]}},2125:t=>{t.exports=function(){return!1}},7060:(t,e,n)=>{var i=n(8354);t.exports=function(t){return null==t?"":i(t)}},9529:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var i=Number.isNaN||function(t){return"number"==typeof t&&t!=t};function r(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(r=t[n],o=e[n],!(r===o||i(r)&&i(o)))return!1;var r,o;return!0}const o=function(t,e){var n;void 0===e&&(e=r);var i,o=[],s=!1;return function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return s&&n===this&&e(r,o)||(i=t.apply(this,r),s=!0,n=this,o=r),i}}},628:(t,e,n)=>{"use strict";var i=n(4067);function r(){}function o(){}o.resetWarningCache=r,t.exports=function(){function t(t,e,n,r,o,s){if(s!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function e(){return t}t.isRequired=t;var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:o,resetWarningCache:r};return n.PropTypes=n,n}},5826:(t,e,n)=>{t.exports=n(628)()},4067:t=>{"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},3948:function(t){
/*!
* Quill Editor v1.3.7
* https://quilljs.com/
* Copyright (c) 2014, Jason Chen
* Copyright (c) 2013, salesforce.com
*/
var e;"undefined"!=typeof self&&self,e=function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=109)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(17),r=n(18),o=n(19),s=n(45),a=n(46),l=n(47),c=n(48),u=n(49),h=n(12),f=n(32),d=n(33),p=n(31),g=n(1),m={Scope:g.Scope,create:g.create,find:g.find,query:g.query,register:g.register,Container:i.default,Format:r.default,Leaf:o.default,Embed:c.default,Scroll:s.default,Block:l.default,Inline:a.default,Text:u.default,Attributor:{Attribute:h.default,Class:f.default,Style:d.default,Store:p.default}};e.default=m},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(e){var n=this;return e="[Parchment] "+e,(n=t.call(this,e)||this).message=e,n.name=n.constructor.name,n}return r(e,t),e}(Error);e.ParchmentError=o;var s,a={},l={},c={},u={};function h(t,e){var n;if(void 0===e&&(e=s.ANY),"string"==typeof t)n=u[t]||a[t];else if(t instanceof Text||t.nodeType===Node.TEXT_NODE)n=u.text;else if("number"==typeof t)t&s.LEVEL&s.BLOCK?n=u.block:t&s.LEVEL&s.INLINE&&(n=u.inline);else if(t instanceof HTMLElement){var i=(t.getAttribute("class")||"").split(/\s+/);for(var r in i)if(n=l[i[r]])break;n=n||c[t.tagName]}return null==n?null:e&s.LEVEL&n.scope&&e&s.TYPE&n.scope?n:null}e.DATA_KEY="__blot",function(t){t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY"}(s=e.Scope||(e.Scope={})),e.create=function(t,e){var n=h(t);if(null==n)throw new o("Unable to create "+t+" blot");var i=n,r=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:i.create(e);return new i(r,e)},e.find=function t(n,i){return void 0===i&&(i=!1),null==n?null:null!=n[e.DATA_KEY]?n[e.DATA_KEY].blot:i?t(n.parentNode,i):null},e.query=h,e.register=function t(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(e.length>1)return e.map((function(e){return t(e)}));var i=e[0];if("string"!=typeof i.blotName&&"string"!=typeof i.attrName)throw new o("Invalid definition");if("abstract"===i.blotName)throw new o("Cannot register abstract class");return u[i.blotName||i.attrName]=i,"string"==typeof i.keyName?a[i.keyName]=i:(null!=i.className&&(l[i.className]=i),null!=i.tagName&&(Array.isArray(i.tagName)?i.tagName=i.tagName.map((function(t){return t.toUpperCase()})):i.tagName=i.tagName.toUpperCase(),(Array.isArray(i.tagName)?i.tagName:[i.tagName]).forEach((function(t){null!=c[t]&&null!=i.className||(c[t]=i)})))),i}},function(t,e,n){var i=n(51),r=n(11),o=n(3),s=n(20),a=String.fromCharCode(0),l=function(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]};l.prototype.insert=function(t,e){var n={};return 0===t.length?this:(n.insert=t,null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))},l.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},l.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},l.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=o(!0,{},t),"object"==typeof n){if("number"==typeof t.delete&&"number"==typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"==typeof n.delete&&null!=t.insert&&(e-=1,"object"!=typeof(n=this.ops[e-1])))return this.ops.unshift(t),this;if(r(t.attributes,n.attributes)){if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},l.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},l.prototype.filter=function(t){return this.ops.filter(t)},l.prototype.forEach=function(t){this.ops.forEach(t)},l.prototype.map=function(t){return this.ops.map(t)},l.prototype.partition=function(t){var e=[],n=[];return this.forEach((function(i){(t(i)?e:n).push(i)})),[e,n]},l.prototype.reduce=function(t,e){return this.ops.reduce(t,e)},l.prototype.changeLength=function(){return this.reduce((function(t,e){return e.insert?t+s.length(e):e.delete?t-e.delete:t}),0)},l.prototype.length=function(){return this.reduce((function(t,e){return t+s.length(e)}),0)},l.prototype.slice=function(t,e){t=t||0,"number"!=typeof e&&(e=1/0);for(var n=[],i=s.iterator(this.ops),r=0;r<e&&i.hasNext();){var o;r<t?o=i.next(t-r):(o=i.next(e-r),n.push(o)),r+=s.length(o)}return new l(n)},l.prototype.compose=function(t){var e=s.iterator(this.ops),n=s.iterator(t.ops),i=[],o=n.peek();if(null!=o&&"number"==typeof o.retain&&null==o.attributes){for(var a=o.retain;"insert"===e.peekType()&&e.peekLength()<=a;)a-=e.peekLength(),i.push(e.next());o.retain-a>0&&n.next(o.retain-a)}for(var c=new l(i);e.hasNext()||n.hasNext();)if("insert"===n.peekType())c.push(n.next());else if("delete"===e.peekType())c.push(e.next());else{var u=Math.min(e.peekLength(),n.peekLength()),h=e.next(u),f=n.next(u);if("number"==typeof f.retain){var d={};"number"==typeof h.retain?d.retain=u:d.insert=h.insert;var p=s.attributes.compose(h.attributes,f.attributes,"number"==typeof h.retain);if(p&&(d.attributes=p),c.push(d),!n.hasNext()&&r(c.ops[c.ops.length-1],d)){var g=new l(e.rest());return c.concat(g).chop()}}else"number"==typeof f.delete&&"number"==typeof h.retain&&c.push(f)}return c.chop()},l.prototype.concat=function(t){var e=new l(this.ops.slice());return t.ops.length>0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},l.prototype.diff=function(t,e){if(this.ops===t.ops)return new l;var n=[this,t].map((function(e){return e.map((function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:a;throw new Error("diff() called "+(e===t?"on":"with")+" non-document")})).join("")})),o=new l,c=i(n[0],n[1],e),u=s.iterator(this.ops),h=s.iterator(t.ops);return c.forEach((function(t){for(var e=t[1].length;e>0;){var n=0;switch(t[0]){case i.INSERT:n=Math.min(h.peekLength(),e),o.push(h.next(n));break;case i.DELETE:n=Math.min(e,u.peekLength()),u.next(n),o.delete(n);break;case i.EQUAL:n=Math.min(u.peekLength(),h.peekLength(),e);var a=u.next(n),l=h.next(n);r(a.insert,l.insert)?o.retain(n,s.attributes.diff(a.attributes,l.attributes)):o.push(l).delete(n)}e-=n}})),o.chop()},l.prototype.eachLine=function(t,e){e=e||"\n";for(var n=s.iterator(this.ops),i=new l,r=0;n.hasNext();){if("insert"!==n.peekType())return;var o=n.peek(),a=s.length(o)-n.peekLength(),c="string"==typeof o.insert?o.insert.indexOf(e,a)-a:-1;if(c<0)i.push(n.next());else if(c>0)i.push(n.next(c));else{if(!1===t(i,n.next(1).attributes||{},r))return;r+=1,i=new l}}i.length()>0&&t(i,{},r)},l.prototype.transform=function(t,e){if(e=!!e,"number"==typeof t)return this.transformPosition(t,e);for(var n=s.iterator(this.ops),i=s.iterator(t.ops),r=new l;n.hasNext()||i.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===i.peekType())if("insert"===i.peekType())r.push(i.next());else{var o=Math.min(n.peekLength(),i.peekLength()),a=n.next(o),c=i.next(o);if(a.delete)continue;c.delete?r.push(c):r.retain(o,s.attributes.transform(a.attributes,c.attributes,e))}else r.retain(s.length(n.next()));return r.chop()},l.prototype.transformPosition=function(t,e){e=!!e;for(var n=s.iterator(this.ops),i=0;n.hasNext()&&i<=t;){var r=n.peekLength(),o=n.peekType();n.next(),"delete"!==o?("insert"===o&&(i<t||!e)&&(t+=r),i+=r):t-=Math.min(r,t-i)}return t},t.exports=l},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,i=Object.prototype.toString,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===i.call(t)},a=function(t){if(!t||"[object Object]"!==i.call(t))return!1;var e,r=n.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!o)return!1;for(e in t);return void 0===e||n.call(t,e)},l=function(t,e){r&&"__proto__"===e.name?r(t,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):t[e.name]=e.newValue},c=function(t,e){if("__proto__"===e){if(!n.call(t,e))return;if(o)return o(t,e).value}return t[e]};t.exports=function t(){var e,n,i,r,o,u,h=arguments[0],f=1,d=arguments.length,p=!1;for("boolean"==typeof h&&(p=h,h=arguments[1]||{},f=2),(null==h||"object"!=typeof h&&"function"!=typeof h)&&(h={});f<d;++f)if(null!=(e=arguments[f]))for(n in e)i=c(h,n),h!==(r=c(e,n))&&(p&&r&&(a(r)||(o=s(r)))?(o?(o=!1,u=i&&s(i)?i:[]):u=i&&a(i)?i:{},l(h,{name:n,newValue:t(p,u,r)})):void 0!==r&&l(h,{name:n,newValue:r}));return h}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BlockEmbed=e.bubbleFormats=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},o=h(n(3)),s=h(n(2)),a=h(n(0)),l=h(n(16)),c=h(n(6)),u=h(n(7));function h(t){return t&&t.__esModule?t:{default:t}}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function p(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var g=function(t){function e(){return f(this,e),d(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return p(e,t),i(e,[{key:"attach",value:function(){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"attach",this).call(this),this.attributes=new a.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return(new s.default).insert(this.value(),(0,o.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(t,e){var n=a.default.query(t,a.default.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,e)}},{key:"formatAt",value:function(t,e,n,i){this.format(n,i)}},{key:"insertAt",value:function(t,n,i){if("string"==typeof n&&n.endsWith("\n")){var o=a.default.create(m.blotName);this.parent.insertBefore(o,0===t?this:this.next),o.insertAt(0,n.slice(0,-1))}else r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,i)}}]),e}(a.default.Embed);g.scope=a.default.Scope.BLOCK_BLOT;var m=function(t){function e(t){f(this,e);var n=d(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.cache={},n}return p(e,t),i(e,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(a.default.Leaf).reduce((function(t,e){return 0===e.length()?t:t.insert(e.value(),b(e))}),new s.default).insert("\n",b(this))),this.cache.delta}},{key:"deleteAt",value:function(t,n){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"deleteAt",this).call(this,t,n),this.cache={}}},{key:"formatAt",value:function(t,n,i,o){n<=0||(a.default.query(i,a.default.Scope.BLOCK)?t+n===this.length()&&this.format(i,o):r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,Math.min(n,this.length()-t-1),i,o),this.cache={})}},{key:"insertAt",value:function(t,n,i){if(null!=i)return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,i);if(0!==n.length){var o=n.split("\n"),s=o.shift();s.length>0&&(t<this.length()-1||null==this.children.tail?r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,Math.min(t,this.length()-1),s):this.children.tail.insertAt(this.children.tail.length(),s),this.cache={});var a=this;o.reduce((function(t,e){return(a=a.split(t,!0)).insertAt(0,e),e.length}),t+s.length)}}},{key:"insertBefore",value:function(t,n){var i=this.children.head;r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n),i instanceof l.default&&i.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"length",this).call(this)+1),this.cache.length}},{key:"moveChildren",value:function(t,n){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"moveChildren",this).call(this,t,n),this.cache={}}},{key:"optimize",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.cache={}}},{key:"path",value:function(t){return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t,!0)}},{key:"removeChild",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"removeChild",this).call(this,t),this.cache={}}},{key:"split",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===t||t>=this.length()-1)){var i=this.clone();return 0===t?(this.parent.insertBefore(i,this),this):(this.parent.insertBefore(i,this.next),i)}var o=r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"split",this).call(this,t,n);return this.cache={},o}}]),e}(a.default.Block);function b(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==t?e:("function"==typeof t.formats&&(e=(0,o.default)(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:b(t.parent,e))}m.blotName="block",m.tagName="P",m.defaultChild="break",m.allowedChildren=[c.default,a.default.Embed,u.default],e.bubbleFormats=b,e.BlockEmbed=g,e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.overload=e.expandConfig=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(l){r=!0,o=l}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();n(50);var s=m(n(2)),a=m(n(14)),l=m(n(8)),c=m(n(9)),u=m(n(0)),h=n(15),f=m(h),d=m(n(3)),p=m(n(10)),g=m(n(34));function m(t){return t&&t.__esModule?t:{default:t}}function b(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var v=(0,p.default)("quill"),y=function(){function t(e){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=x(e,i),this.container=this.options.container,null==this.container)return v.error("Invalid Quill container",e);this.options.debug&&t.debug(this.options.debug);var r=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new l.default,this.scroll=u.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new a.default(this.scroll),this.selection=new f.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(l.default.events.EDITOR_CHANGE,(function(t){t===l.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())})),this.emitter.on(l.default.events.SCROLL_UPDATE,(function(t,e){var i=n.selection.lastRange,r=i&&0===i.length?i.index:void 0;w.call(n,(function(){return n.editor.update(null,e,r)}),t)}));var o=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+r+"<p><br></p></div>");this.setContents(o),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return o(t,null,[{key:"debug",value:function(t){!0===t&&(t="log"),p.default.level(t)}},{key:"find",value:function(t){return t.__quill||u.default.find(t)}},{key:"import",value:function(t){return null==this.imports[t]&&v.error("Cannot import "+t+". Are you sure it was registered?"),this.imports[t]}},{key:"register",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof t){var r=t.attrName||t.blotName;"string"==typeof r?this.register("formats/"+r,t,e):Object.keys(t).forEach((function(i){n.register(i,t[i],e)}))}else null==this.imports[t]||i||v.warn("Overwriting "+t+" with",e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName?u.default.register(e):t.startsWith("modules")&&"function"==typeof e.register&&e.register()}}]),o(t,[{key:"addContainer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof t){var n=t;(t=document.createElement("div")).classList.add(n)}return this.container.insertBefore(t,e),t}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(t,e,n){var i=this,o=S(t,e,n),s=r(o,4);return t=s[0],e=s[1],n=s[3],w.call(this,(function(){return i.editor.deleteText(t,e)}),n,t,-1*e)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}},{key:"focus",value:function(){var t=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=t,this.scrollIntoView()}},{key:"format",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;return w.call(this,(function(){var i=n.getSelection(!0),r=new s.default;if(null==i)return r;if(u.default.query(t,u.default.Scope.BLOCK))r=n.editor.formatLine(i.index,i.length,b({},t,e));else{if(0===i.length)return n.selection.format(t,e),r;r=n.editor.formatText(i.index,i.length,b({},t,e))}return n.setSelection(i,l.default.sources.SILENT),r}),i)}},{key:"formatLine",value:function(t,e,n,i,o){var s,a=this,l=S(t,e,n,i,o),c=r(l,4);return t=c[0],e=c[1],s=c[2],o=c[3],w.call(this,(function(){return a.editor.formatLine(t,e,s)}),o,t,0)}},{key:"formatText",value:function(t,e,n,i,o){var s,a=this,l=S(t,e,n,i,o),c=r(l,4);return t=c[0],e=c[1],s=c[2],o=c[3],w.call(this,(function(){return a.editor.formatText(t,e,s)}),o,t,0)}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"==typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length);var i=this.container.getBoundingClientRect();return{bottom:n.bottom-i.top,height:n.height,left:n.left-i.left,right:n.right-i.left,top:n.top-i.top,width:n.width}}},{key:"getContents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=S(t,e),i=r(n,2);return t=i[0],e=i[1],this.editor.getContents(t,e)}},{key:"getFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}},{key:"getIndex",value:function(t){return t.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(t){return this.scroll.leaf(t)}},{key:"getLine",value:function(t){return this.scroll.line(t)}},{key:"getLines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}},{key:"getModule",value:function(t){return this.theme.modules[t]}},{key:"getSelection",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=S(t,e),i=r(n,2);return t=i[0],e=i[1],this.editor.getText(t,e)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(e,n,i){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.sources.API;return w.call(this,(function(){return r.editor.insertEmbed(e,n,i)}),o,e)}},{key:"insertText",value:function(t,e,n,i,o){var s,a=this,l=S(t,0,n,i,o),c=r(l,4);return t=c[0],s=c[2],o=c[3],w.call(this,(function(){return a.editor.insertText(t,e,s)}),o,t,e.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(t,e,n){this.clipboard.dangerouslyPasteHTML(t,e,n)}},{key:"removeFormat",value:function(t,e,n){var i=this,o=S(t,e,n),s=r(o,4);return t=s[0],e=s[1],n=s[3],w.call(this,(function(){return i.editor.removeFormat(t,e)}),n,t)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return w.call(this,(function(){t=new s.default(t);var n=e.getLength(),i=e.editor.deleteText(0,n),r=e.editor.applyDelta(t),o=r.ops[r.ops.length-1];return null!=o&&"string"==typeof o.insert&&"\n"===o.insert[o.insert.length-1]&&(e.editor.deleteText(e.getLength()-1,1),r.delete(1)),i.compose(r)}),n)}},{key:"setSelection",value:function(e,n,i){if(null==e)this.selection.setRange(null,n||t.sources.API);else{var o=S(e,n,i),s=r(o,4);e=s[0],n=s[1],i=s[3],this.selection.setRange(new h.Range(e,n),i),i!==l.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API,n=(new s.default).insert(t);return this.setContents(n,e)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,e=this.scroll.update(t);return this.selection.update(t),e}},{key:"updateContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return w.call(this,(function(){return t=new s.default(t),e.editor.applyDelta(t,n)}),n,!0)}}]),t}();function x(t,e){if((e=(0,d.default)(!0,{container:t,modules:{clipboard:!0,keyboard:!0,history:!0}},e)).theme&&e.theme!==y.DEFAULTS.theme){if(e.theme=y.import("themes/"+e.theme),null==e.theme)throw new Error("Invalid theme "+e.theme+". Did you register it?")}else e.theme=g.default;var n=(0,d.default)(!0,{},e.theme.DEFAULTS);[n,e].forEach((function(t){t.modules=t.modules||{},Object.keys(t.modules).forEach((function(e){!0===t.modules[e]&&(t.modules[e]={})}))}));var i=Object.keys(n.modules).concat(Object.keys(e.modules)).reduce((function(t,e){var n=y.import("modules/"+e);return null==n?v.error("Cannot load "+e+" module. Are you sure you registered it?"):t[e]=n.DEFAULTS||{},t}),{});return null!=e.modules&&e.modules.toolbar&&e.modules.toolbar.constructor!==Object&&(e.modules.toolbar={container:e.modules.toolbar}),e=(0,d.default)(!0,{},y.DEFAULTS,{modules:i},n,e),["bounds","container","scrollingContainer"].forEach((function(t){"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))})),e.modules=Object.keys(e.modules).reduce((function(t,n){return e.modules[n]&&(t[n]=e.modules[n]),t}),{}),e}function w(t,e,n,i){if(this.options.strict&&!this.isEnabled()&&e===l.default.sources.USER)return new s.default;var r=null==n?null:this.getSelection(),o=this.editor.delta,a=t();if(null!=r&&(!0===n&&(n=r.index),null==i?r=O(r,a,e):0!==i&&(r=O(r,n,i,e)),this.setSelection(r,l.default.sources.SILENT)),a.length()>0){var c,u,h=[l.default.events.TEXT_CHANGE,a,o,e];(c=this.emitter).emit.apply(c,[l.default.events.EDITOR_CHANGE].concat(h)),e!==l.default.sources.SILENT&&(u=this.emitter).emit.apply(u,h)}return a}function S(t,e,n,r,o){var s={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(o=r,r=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(o=r,r=n,n=e,e=0),"object"===(void 0===n?"undefined":i(n))?(s=n,o=r):"string"==typeof n&&(null!=r?s[n]=r:o=n),[t,e,s,o=o||l.default.sources.API]}function O(t,e,n,i){if(null==t)return null;var o=void 0,a=void 0;if(e instanceof s.default){var c=[t.index,t.index+t.length].map((function(t){return e.transformPosition(t,i!==l.default.sources.USER)})),u=r(c,2);o=u[0],a=u[1]}else{var f=[t.index,t.index+t.length].map((function(t){return t<e||t===e&&i===l.default.sources.USER?t:n>=0?t+n:Math.max(e,t+n)})),d=r(f,2);o=d[0],a=d[1]}return new h.Range(o,a-o)}y.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},y.events=l.default.events,y.sources=l.default.sources,y.version="1.3.7",y.imports={delta:s.default,parchment:u.default,"core/module":c.default,"core/theme":g.default},e.expandConfig=x,e.overload=S,e.default=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},o=a(n(7)),s=a(n(0));function a(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"formatAt",value:function(t,n,i,o){if(e.compare(this.statics.blotName,i)<0&&s.default.query(i,s.default.Scope.BLOT)){var a=this.isolate(t,n);o&&a.wrap(i,o)}else r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,i,o)}},{key:"optimize",value:function(t){if(r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.parent instanceof e&&e.compare(this.statics.blotName,this.parent.statics.blotName)>0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(t,n){var i=e.order.indexOf(t),r=e.order.indexOf(n);return i>=0||r>=0?i-r:t===n?0:t<n?-1:1}}]),e}(s.default.Inline);l.allowedChildren=[l,s.default.Embed,o.default],l.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(0),o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((i=r)&&i.__esModule?i:{default:i}).default.Text);e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},o=s(n(54));function s(t){return t&&t.__esModule?t:{default:t}}var a=(0,s(n(10)).default)("quill:events");["selectionchange","mousedown","mouseup","click"].forEach((function(t){document.addEventListener(t,(function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];[].slice.call(document.querySelectorAll(".ql-container")).forEach((function(t){var n;t.__quill&&t.__quill.emitter&&(n=t.__quill.emitter).handleDOM.apply(n,e)}))}))}));var l=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var t=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.listeners={},t.on("error",a.error),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"emit",value:function(){a.log.apply(a,arguments),r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];(this.listeners[t.type]||[]).forEach((function(e){var i=e.node,r=e.handler;(t.target===i||i.contains(t.target))&&r.apply(void 0,[t].concat(n))}))}},{key:"listenDOM",value:function(t,e,n){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push({node:e,handler:n})}}]),e}(o.default);l.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},l.sources={API:"api",SILENT:"silent",USER:"user"},e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.options=n};i.DEFAULTS={},e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=["error","warn","log","info"],r="warn";function o(t){if(i.indexOf(t)<=i.indexOf(r)){for(var e,n=arguments.length,o=Array(n>1?n-1:0),s=1;s<n;s++)o[s-1]=arguments[s];(e=console)[t].apply(e,o)}}function s(t){return i.reduce((function(e,n){return e[n]=o.bind(console,n,t),e}),{})}o.level=s.level=function(t){r=t},e.default=s},function(t,e,n){var i=Array.prototype.slice,r=n(52),o=n(53),s=t.exports=function(t,e,n){return n||(n={}),t===e||(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():!t||!e||"object"!=typeof t&&"object"!=typeof e?n.strict?t===e:t==e:function(t,e,n){var c,u;if(a(t)||a(e))return!1;if(t.prototype!==e.prototype)return!1;if(o(t))return!!o(e)&&(t=i.call(t),e=i.call(e),s(t,e,n));if(l(t)){if(!l(e))return!1;if(t.length!==e.length)return!1;for(c=0;c<t.length;c++)if(t[c]!==e[c])return!1;return!0}try{var h=r(t),f=r(e)}catch(d){return!1}if(h.length!=f.length)return!1;for(h.sort(),f.sort(),c=h.length-1;c>=0;c--)if(h[c]!=f[c])return!1;for(c=h.length-1;c>=0;c--)if(u=h[c],!s(t[u],e[u],n))return!1;return typeof t==typeof e}(t,e,n))};function a(t){return null==t}function l(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length||"function"!=typeof t.copy||"function"!=typeof t.slice||t.length>0&&"number"!=typeof t[0])}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e;var r=i.Scope.TYPE&i.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&i.Scope.LEVEL|r:this.scope=i.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return t.keys=function(t){return[].map.call(t.attributes,(function(t){return t.name}))},t.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)},t.prototype.canAdd=function(t,e){return null!=i.query(t,i.Scope.BLOT&(this.scope|i.Scope.TYPE))&&(null==this.whitelist||("string"==typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1))},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""},t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Code=void 0;var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(l){r=!0,o=l}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},s=h(n(2)),a=h(n(0)),l=h(n(4)),c=h(n(6)),u=h(n(7));function h(t){return t&&t.__esModule?t:{default:t}}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function p(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var g=function(t){function e(){return f(this,e),d(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return p(e,t),e}(c.default);g.blotName="code",g.tagName="CODE";var m=function(t){function e(){return f(this,e),d(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return p(e,t),r(e,[{key:"delta",value:function(){var t=this,e=this.domNode.textContent;return e.endsWith("\n")&&(e=e.slice(0,-1)),e.split("\n").reduce((function(e,n){return e.insert(n).insert("\n",t.formats())}),new s.default)}},{key:"format",value:function(t,n){if(t!==this.statics.blotName||!n){var r=this.descendant(u.default,this.length()-1),s=i(r,1)[0];null!=s&&s.deleteAt(s.length()-1,1),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}},{key:"formatAt",value:function(t,n,i,r){if(0!==n&&null!=a.default.query(i,a.default.Scope.BLOCK)&&(i!==this.statics.blotName||r!==this.statics.formats(this.domNode))){var o=this.newlineIndex(t);if(!(o<0||o>=t+n)){var s=this.newlineIndex(t,!0)+1,l=o-s+1,c=this.isolate(s,l),u=c.next;c.format(i,r),u instanceof e&&u.formatAt(0,t-s+n-l,i,r)}}}},{key:"insertAt",value:function(t,e,n){if(null==n){var r=this.descendant(u.default,t),o=i(r,2),s=o[0],a=o[1];s.insertAt(a,e)}}},{key:"length",value:function(){var t=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?t:t+1}},{key:"newlineIndex",value:function(t){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return this.domNode.textContent.slice(0,t).lastIndexOf("\n");var e=this.domNode.textContent.slice(t).indexOf("\n");return e>-1?t+e:-1}},{key:"optimize",value:function(t){this.domNode.textContent.endsWith("\n")||this.appendChild(a.default.create("text","\n")),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(t),n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(t){var e=a.default.find(t);null==e?t.parentNode.removeChild(t):e instanceof a.default.Embed?e.remove():e.unwrap()}))}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),e}(l.default);m.blotName="code-block",m.tagName="PRE",m.TAB=" ",e.Code=g,e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(l){r=!0,o=l}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),s=b(n(2)),a=b(n(20)),l=b(n(0)),c=b(n(13)),u=b(n(24)),h=n(4),f=b(h),d=b(n(16)),p=b(n(21)),g=b(n(11)),m=b(n(3));function b(t){return t&&t.__esModule?t:{default:t}}var v=/^[ -~]*$/,y=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.scroll=e,this.delta=this.getDelta()}return o(t,[{key:"applyDelta",value:function(t){var e=this,n=!1;this.scroll.update();var o=this.scroll.length();return this.scroll.batchStart(),(t=function(t){return t.reduce((function(t,e){if(1===e.insert){var n=(0,p.default)(e.attributes);return delete n.image,t.insert({image:e.attributes.image},n)}if(null==e.attributes||!0!==e.attributes.list&&!0!==e.attributes.bullet||((e=(0,p.default)(e)).attributes.list?e.attributes.list="ordered":(e.attributes.list="bullet",delete e.attributes.bullet)),"string"==typeof e.insert){var i=e.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return t.insert(i,e.attributes)}return t.push(e)}),new s.default)}(t)).reduce((function(t,s){var c=s.retain||s.delete||s.insert.length||1,u=s.attributes||{};if(null!=s.insert){if("string"==typeof s.insert){var d=s.insert;d.endsWith("\n")&&n&&(n=!1,d=d.slice(0,-1)),t>=o&&!d.endsWith("\n")&&(n=!0),e.scroll.insertAt(t,d);var p=e.scroll.line(t),g=r(p,2),b=g[0],v=g[1],y=(0,m.default)({},(0,h.bubbleFormats)(b));if(b instanceof f.default){var x=b.descendant(l.default.Leaf,v),w=r(x,1)[0];y=(0,m.default)(y,(0,h.bubbleFormats)(w))}u=a.default.attributes.diff(y,u)||{}}else if("object"===i(s.insert)){var S=Object.keys(s.insert)[0];if(null==S)return t;e.scroll.insertAt(t,S,s.insert[S])}o+=c}return Object.keys(u).forEach((function(n){e.scroll.formatAt(t,c,n,u[n])})),t+c}),0),t.reduce((function(t,n){return"number"==typeof n.delete?(e.scroll.deleteAt(t,n.delete),t):t+(n.retain||n.insert.length||1)}),0),this.scroll.batchEnd(),this.update(t)}},{key:"deleteText",value:function(t,e){return this.scroll.deleteAt(t,e),this.update((new s.default).retain(t).delete(e))}},{key:"formatLine",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(i).forEach((function(r){if(null==n.scroll.whitelist||n.scroll.whitelist[r]){var o=n.scroll.lines(t,Math.max(e,1)),s=e;o.forEach((function(e){var o=e.length();if(e instanceof c.default){var a=t-e.offset(n.scroll),l=e.newlineIndex(a+s)-a+1;e.formatAt(a,l,r,i[r])}else e.format(r,i[r]);s-=o}))}})),this.scroll.optimize(),this.update((new s.default).retain(t).retain(e,(0,p.default)(i)))}},{key:"formatText",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(i).forEach((function(r){n.scroll.formatAt(t,e,r,i[r])})),this.update((new s.default).retain(t).retain(e,(0,p.default)(i)))}},{key:"getContents",value:function(t,e){return this.delta.slice(t,t+e)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce((function(t,e){return t.concat(e.delta())}),new s.default)}},{key:"getFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],i=[];0===e?this.scroll.path(t).forEach((function(t){var e=r(t,1)[0];e instanceof f.default?n.push(e):e instanceof l.default.Leaf&&i.push(e)})):(n=this.scroll.lines(t,e),i=this.scroll.descendants(l.default.Leaf,t,e));var o=[n,i].map((function(t){if(0===t.length)return{};for(var e=(0,h.bubbleFormats)(t.shift());Object.keys(e).length>0;){var n=t.shift();if(null==n)return e;e=x((0,h.bubbleFormats)(n),e)}return e}));return m.default.apply(m.default,o)}},{key:"getText",value:function(t,e){return this.getContents(t,e).filter((function(t){return"string"==typeof t.insert})).map((function(t){return t.insert})).join("")}},{key:"insertEmbed",value:function(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new s.default).retain(t).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},e,n)))}},{key:"insertText",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(i).forEach((function(r){n.scroll.formatAt(t,e.length,r,i[r])})),this.update((new s.default).retain(t).insert(e,(0,p.default)(i)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var t=this.scroll.children.head;return t.statics.blotName===f.default.blotName&&!(t.children.length>1)&&t.children.head instanceof d.default}},{key:"removeFormat",value:function(t,e){var n=this.getText(t,e),i=this.scroll.line(t+e),o=r(i,2),a=o[0],l=o[1],u=0,h=new s.default;null!=a&&(u=a instanceof c.default?a.newlineIndex(l)-l+1:a.length()-l,h=a.delta().slice(l,l+u-1).insert("\n"));var f=this.getContents(t,e+u).diff((new s.default).insert(n).concat(h)),d=(new s.default).retain(t).concat(f);return this.applyDelta(d)}},{key:"update",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(v)&&l.default.find(e[0].target)){var r=l.default.find(e[0].target),o=(0,h.bubbleFormats)(r),a=r.offset(this.scroll),c=e[0].oldValue.replace(u.default.CONTENTS,""),f=(new s.default).insert(c),d=(new s.default).insert(r.value());t=(new s.default).retain(a).concat(f.diff(d,n)).reduce((function(t,e){return e.insert?t.insert(e.insert,o):t.push(e)}),new s.default),this.delta=i.compose(t)}else this.delta=this.getDelta(),t&&(0,g.default)(i.compose(t),this.delta)||(t=i.diff(this.delta,n));return t}}]),t}();function x(t,e){return Object.keys(e).reduce((function(n,i){return null==t[i]||(e[i]===t[i]?n[i]=e[i]:Array.isArray(e[i])?e[i].indexOf(t[i])<0&&(n[i]=e[i].concat([t[i]])):n[i]=[e[i],t[i]]),n}),{})}e.default=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Range=void 0;var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(l){r=!0,o=l}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=c(n(0)),s=c(n(21)),a=c(n(11)),l=c(n(8));function c(t){return t&&t.__esModule?t:{default:t}}function u(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var f=(0,c(n(10)).default)("quill:selection"),d=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;h(this,t),this.index=e,this.length=n},p=function(){function t(e,n){var i=this;h(this,t),this.emitter=n,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=o.default.create("cursor",this),this.lastRange=this.savedRange=new d(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(function(){i.mouseDown||setTimeout(i.update.bind(i,l.default.sources.USER),1)})),this.emitter.on(l.default.events.EDITOR_CHANGE,(function(t,e){t===l.default.events.TEXT_CHANGE&&e.length()>0&&i.update(l.default.sources.SILENT)})),this.emitter.on(l.default.events.SCROLL_BEFORE_UPDATE,(function(){if(i.hasFocus()){var t=i.getNativeRange();null!=t&&t.start.node!==i.cursor.textNode&&i.emitter.once(l.default.events.SCROLL_UPDATE,(function(){try{i.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)}catch(e){}}))}})),this.emitter.on(l.default.events.SCROLL_OPTIMIZE,(function(t,e){if(e.range){var n=e.range,r=n.startNode,o=n.startOffset,s=n.endNode,a=n.endOffset;i.setNativeRange(r,o,s,a)}})),this.update(l.default.sources.SILENT)}return r(t,[{key:"handleComposition",value:function(){var t=this;this.root.addEventListener("compositionstart",(function(){t.composing=!0})),this.root.addEventListener("compositionend",(function(){if(t.composing=!1,t.cursor.parent){var e=t.cursor.restore();if(!e)return;setTimeout((function(){t.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)}),1)}}))}},{key:"handleDragging",value:function(){var t=this;this.emitter.listenDOM("mousedown",document.body,(function(){t.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(function(){t.mouseDown=!1,t.update(l.default.sources.USER)}))}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(t,e){if(null==this.scroll.whitelist||this.scroll.whitelist[t]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!o.default.query(t,o.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var i=o.default.find(n.start.node,!1);if(null==i)return;if(i instanceof o.default.Leaf){var r=i.split(n.start.offset);i.parent.insertBefore(this.cursor,r)}else i.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;var r=void 0,o=this.scroll.leaf(t),s=i(o,2),a=s[0],l=s[1];if(null==a)return null;var c=a.position(l,!0),u=i(c,2);r=u[0],l=u[1];var h=document.createRange();if(e>0){h.setStart(r,l);var f=this.scroll.leaf(t+e),d=i(f,2);if(a=d[0],l=d[1],null==a)return null;var p=a.position(l,!0),g=i(p,2);return r=g[0],l=g[1],h.setEnd(r,l),h.getBoundingClientRect()}var m="left",b=void 0;return r instanceof Text?(l<r.data.length?(h.setStart(r,l),h.setEnd(r,l+1)):(h.setStart(r,l-1),h.setEnd(r,l),m="right"),b=h.getBoundingClientRect()):(b=a.domNode.getBoundingClientRect(),l>0&&(m="right")),{bottom:b.top+b.height,height:b.height,left:b[m],right:b[m],top:b.top,width:0}}},{key:"getNativeRange",value:function(){var t=document.getSelection();if(null==t||t.rangeCount<=0)return null;var e=t.getRangeAt(0);if(null==e)return null;var n=this.normalizeNative(e);return f.info("getNativeRange",n),n}},{key:"getRange",value:function(){var t=this.getNativeRange();return null==t?[null,null]:[this.normalizedToRange(t),t]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(t){var e=this,n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);var r=n.map((function(t){var n=i(t,2),r=n[0],s=n[1],a=o.default.find(r,!0),l=a.offset(e.scroll);return 0===s?l:a instanceof o.default.Container?l+a.length():l+a.index(r,s)})),s=Math.min(Math.max.apply(Math,u(r)),this.scroll.length()-1),a=Math.min.apply(Math,[s].concat(u(r)));return new d(a,s-a)}},{key:"normalizeNative",value:function(t){if(!g(this.root,t.startContainer)||!t.collapsed&&!g(this.root,t.endContainer))return null;var e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach((function(t){for(var e=t.node,n=t.offset;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;n=(e=e.lastChild)instanceof Text?e.data.length:e.childNodes.length+1}t.node=e,t.offset=n})),e}},{key:"rangeToNative",value:function(t){var e=this,n=t.collapsed?[t.index]:[t.index,t.index+t.length],r=[],o=this.scroll.length();return n.forEach((function(t,n){t=Math.min(o-1,t);var s,a=e.scroll.leaf(t),l=i(a,2),c=l[0],u=l[1],h=c.position(u,0!==n),f=i(h,2);s=f[0],u=f[1],r.push(s,u)})),r.length<2&&(r=r.concat(r)),r}},{key:"scrollIntoView",value:function(t){var e=this.lastRange;if(null!=e){var n=this.getBounds(e.index,e.length);if(null!=n){var r=this.scroll.length()-1,o=this.scroll.line(Math.min(e.index,r)),s=i(o,1)[0],a=s;if(e.length>0){var l=this.scroll.line(Math.min(e.index+e.length,r));a=i(l,1)[0]}if(null!=s&&null!=a){var c=t.getBoundingClientRect();n.top<c.top?t.scrollTop-=c.top-n.top:n.bottom>c.bottom&&(t.scrollTop+=n.bottom-c.bottom)}}}}},{key:"setNativeRange",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(f.info("setNativeRange",t,e,n,i),null==t||null!=this.root.parentNode&&null!=t.parentNode&&null!=n.parentNode){var o=document.getSelection();if(null!=o)if(null!=t){this.hasFocus()||this.root.focus();var s=(this.getNativeRange()||{}).native;if(null==s||r||t!==s.startContainer||e!==s.startOffset||n!==s.endContainer||i!==s.endOffset){"BR"==t.tagName&&(e=[].indexOf.call(t.parentNode.childNodes,t),t=t.parentNode),"BR"==n.tagName&&(i=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var a=document.createRange();a.setStart(t,e),a.setEnd(n,i),o.removeAllRanges(),o.addRange(a)}}else o.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;if("string"==typeof e&&(n=e,e=!1),f.info("setRange",t),null!=t){var i=this.rangeToNative(t);this.setNativeRange.apply(this,u(i).concat([e]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,e=this.lastRange,n=this.getRange(),r=i(n,2),o=r[0],c=r[1];if(this.lastRange=o,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,a.default)(e,this.lastRange)){var u;!this.composing&&null!=c&&c.native.collapsed&&c.start.node!==this.cursor.textNode&&this.cursor.restore();var h,f=[l.default.events.SELECTION_CHANGE,(0,s.default)(this.lastRange),(0,s.default)(e),t];(u=this.emitter).emit.apply(u,[l.default.events.EDITOR_CHANGE].concat(f)),t!==l.default.sources.SILENT&&(h=this.emitter).emit.apply(h,f)}}}]),t}();function g(t,e){try{e.parentNode}catch(n){return!1}return e instanceof Text&&(e=e.parentNode),t.contains(e)}e.Range=d,e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},s=n(0),a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"insertInto",value:function(t,n){0===t.children.length?o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertInto",this).call(this,t,n):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),e}(((i=s)&&i.__esModule?i:{default:i}).default.Embed);a.blotName="break",a.tagName="BR",e.default=a},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(44),s=n(30),a=n(1),l=function(t){function e(e){var n=t.call(this,e)||this;return n.build(),n}return r(e,t),e.prototype.appendChild=function(t){this.insertBefore(t)},e.prototype.attach=function(){t.prototype.attach.call(this),this.children.forEach((function(t){t.attach()}))},e.prototype.build=function(){var t=this;this.children=new o.default,[].slice.call(this.domNode.childNodes).reverse().forEach((function(e){try{var n=c(e);t.insertBefore(n,t.children.head||void 0)}catch(i){if(i instanceof a.ParchmentError)return;throw i}}))},e.prototype.deleteAt=function(t,e){if(0===t&&e===this.length())return this.remove();this.children.forEachAt(t,e,(function(t,e,n){t.deleteAt(e,n)}))},e.prototype.descendant=function(t,n){var i=this.children.find(n),r=i[0],o=i[1];return null==t.blotName&&t(r)||null!=t.blotName&&r instanceof t?[r,o]:r instanceof e?r.descendant(t,o):[null,-1]},e.prototype.descendants=function(t,n,i){void 0===n&&(n=0),void 0===i&&(i=Number.MAX_VALUE);var r=[],o=i;return this.children.forEachAt(n,i,(function(n,i,s){(null==t.blotName&&t(n)||null!=t.blotName&&n instanceof t)&&r.push(n),n instanceof e&&(r=r.concat(n.descendants(t,i,o))),o-=s})),r},e.prototype.detach=function(){this.children.forEach((function(t){t.detach()})),t.prototype.detach.call(this)},e.prototype.formatAt=function(t,e,n,i){this.children.forEachAt(t,e,(function(t,e,r){t.formatAt(e,r,n,i)}))},e.prototype.insertAt=function(t,e,n){var i=this.children.find(t),r=i[0],o=i[1];if(r)r.insertAt(o,e,n);else{var s=null==n?a.create("text",e):a.create(e,n);this.appendChild(s)}},e.prototype.insertBefore=function(t,e){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some((function(e){return t instanceof e})))throw new a.ParchmentError("Cannot insert "+t.statics.blotName+" into "+this.statics.blotName);t.insertInto(this,e)},e.prototype.length=function(){return this.children.reduce((function(t,e){return t+e.length()}),0)},e.prototype.moveChildren=function(t,e){this.children.forEach((function(n){t.insertBefore(n,e)}))},e.prototype.optimize=function(e){if(t.prototype.optimize.call(this,e),0===this.children.length)if(null!=this.statics.defaultChild){var n=a.create(this.statics.defaultChild);this.appendChild(n),n.optimize(e)}else this.remove()},e.prototype.path=function(t,n){void 0===n&&(n=!1);var i=this.children.find(t,n),r=i[0],o=i[1],s=[[this,t]];return r instanceof e?s.concat(r.path(o,n)):(null!=r&&s.push([r,o]),s)},e.prototype.removeChild=function(t){this.children.remove(t)},e.prototype.replace=function(n){n instanceof e&&n.moveChildren(this),t.prototype.replace.call(this,n)},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(t,this.length(),(function(t,i,r){t=t.split(i,e),n.appendChild(t)})),n},e.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},e.prototype.update=function(t,e){var n=this,i=[],r=[];t.forEach((function(t){t.target===n.domNode&&"childList"===t.type&&(i.push.apply(i,t.addedNodes),r.push.apply(r,t.removedNodes))})),r.forEach((function(t){if(!(null!=t.parentNode&&"IFRAME"!==t.tagName&&document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var e=a.find(t);null!=e&&(null!=e.domNode.parentNode&&e.domNode.parentNode!==n.domNode||e.detach())}})),i.filter((function(t){return t.parentNode==n.domNode})).sort((function(t,e){return t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1})).forEach((function(t){var e=null;null!=t.nextSibling&&(e=a.find(t.nextSibling));var i=c(t);i.next==e&&null!=i.next||(null!=i.parent&&i.parent.removeChild(n),n.insertBefore(i,e||void 0))}))},e}(s.default);function c(t){var e=a.find(t);if(null==e)try{e=a.create(t)}catch(n){e=a.create(a.Scope.INLINE),[].slice.call(t.childNodes).forEach((function(t){e.domNode.appendChild(t)})),t.parentNode&&t.parentNode.replaceChild(e.domNode,t),e.attach()}return e}e.default=l},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(12),s=n(31),a=n(17),l=n(1),c=function(t){function e(e){var n=t.call(this,e)||this;return n.attributes=new s.default(n.domNode),n}return r(e,t),e.formats=function(t){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?t.tagName.toLowerCase():void 0)},e.prototype.format=function(t,e){var n=l.query(t);n instanceof o.default?this.attributes.attribute(n,e):e&&(null==n||t===this.statics.blotName&&this.formats()[t]===e||this.replaceWith(t,e))},e.prototype.formats=function(){var t=this.attributes.values(),e=this.statics.formats(this.domNode);return null!=e&&(t[this.statics.blotName]=e),t},e.prototype.replaceWith=function(e,n){var i=t.prototype.replaceWith.call(this,e,n);return this.attributes.copy(i),i},e.prototype.update=function(e,n){var i=this;t.prototype.update.call(this,e,n),e.some((function(t){return t.target===i.domNode&&"attributes"===t.type}))&&this.attributes.build()},e.prototype.wrap=function(n,i){var r=t.prototype.wrap.call(this,n,i);return r instanceof e&&r.statics.scope===this.statics.scope&&this.attributes.move(r),r},e}(a.default);e.default=c},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(30),s=n(1),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.value=function(t){return!0},e.prototype.index=function(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1},e.prototype.position=function(t,e){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return t>0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){var t;return(t={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,t},e.scope=s.Scope.INLINE_BLOT,e}(o.default);e.default=a},function(t,e,n){var i=n(11),r=n(3),o={attributes:{compose:function(t,e,n){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var i=r(!0,{},e);for(var o in n||(i=Object.keys(i).reduce((function(t,e){return null!=i[e]&&(t[e]=i[e]),t}),{})),t)void 0!==t[o]&&void 0===e[o]&&(i[o]=t[o]);return Object.keys(i).length>0?i:void 0},diff:function(t,e){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce((function(n,r){return i(t[r],e[r])||(n[r]=void 0===e[r]?null:e[r]),n}),{});return Object.keys(n).length>0?n:void 0},transform:function(t,e,n){if("object"!=typeof t)return e;if("object"==typeof e){if(!n)return e;var i=Object.keys(e).reduce((function(n,i){return void 0===t[i]&&(n[i]=e[i]),n}),{});return Object.keys(i).length>0?i:void 0}}},iterator:function(t){return new s(t)},length:function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"string"==typeof t.insert?t.insert.length:1}};function s(t){this.ops=t,this.index=0,this.offset=0}s.prototype.hasNext=function(){return this.peekLength()<1/0},s.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,i=o.length(e);if(t>=i-n?(t=i-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};var r={};return e.attributes&&(r.attributes=e.attributes),"number"==typeof e.retain?r.retain=t:"string"==typeof e.insert?r.insert=e.insert.substr(n,t):r.insert=e.insert,r}return{retain:1/0}},s.prototype.peek=function(){return this.ops[this.index]},s.prototype.peekLength=function(){return this.ops[this.index]?o.length(this.ops[this.index])-this.offset:1/0},s.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},s.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var t=this.offset,e=this.index,n=this.next(),i=this.ops.slice(this.index);return this.offset=t,this.index=e,[n].concat(i)}return[]},t.exports=o},function(t,e){var n=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}var e,n,i;try{e=Map}catch(a){e=function(){}}try{n=Set}catch(a){n=function(){}}try{i=Promise}catch(a){i=function(){}}function r(o,a,l,c,u){"object"==typeof a&&(l=a.depth,c=a.prototype,u=a.includeNonEnumerable,a=a.circular);var h=[],f=[],d="undefined"!=typeof Buffer;return void 0===a&&(a=!0),void 0===l&&(l=1/0),function o(l,p){if(null===l)return null;if(0===p)return l;var g,m;if("object"!=typeof l)return l;if(t(l,e))g=new e;else if(t(l,n))g=new n;else if(t(l,i))g=new i((function(t,e){l.then((function(e){t(o(e,p-1))}),(function(t){e(o(t,p-1))}))}));else if(r.__isArray(l))g=[];else if(r.__isRegExp(l))g=new RegExp(l.source,s(l)),l.lastIndex&&(g.lastIndex=l.lastIndex);else if(r.__isDate(l))g=new Date(l.getTime());else{if(d&&Buffer.isBuffer(l))return g=Buffer.allocUnsafe?Buffer.allocUnsafe(l.length):new Buffer(l.length),l.copy(g),g;t(l,Error)?g=Object.create(l):void 0===c?(m=Object.getPrototypeOf(l),g=Object.create(m)):(g=Object.create(c),m=c)}if(a){var b=h.indexOf(l);if(-1!=b)return f[b];h.push(l),f.push(g)}for(var v in t(l,e)&&l.forEach((function(t,e){var n=o(e,p-1),i=o(t,p-1);g.set(n,i)})),t(l,n)&&l.forEach((function(t){var e=o(t,p-1);g.add(e)})),l){var y;m&&(y=Object.getOwnPropertyDescriptor(m,v)),y&&null==y.set||(g[v]=o(l[v],p-1))}if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(l);for(v=0;v<x.length;v++){var w=x[v];(!(O=Object.getOwnPropertyDescriptor(l,w))||O.enumerable||u)&&(g[w]=o(l[w],p-1),O.enumerable||Object.defineProperty(g,w,{enumerable:!1}))}}if(u){var S=Object.getOwnPropertyNames(l);for(v=0;v<S.length;v++){var O,I=S[v];(O=Object.getOwnPropertyDescriptor(l,I))&&O.enumerable||(g[I]=o(l[I],p-1),Object.defineProperty(g,I,{enumerable:!1}))}}return g}(o,l)}function o(t){return Object.prototype.toString.call(t)}function s(t){var e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),e}return r.clonePrototype=function(t){if(null===t)return null;var e=function(){};return e.prototype=t,new e},r.__objToStr=o,r.__isDate=function(t){return"object"==typeof t&&"[object Date]"===o(t)},r.__isArray=function(t){return"object"==typeof t&&"[object Array]"===o(t)},r.__isRegExp=function(t){return"object"==typeof t&&"[object RegExp]"===o(t)},r.__getRegExpFlags=s,r}();"object"==typeof t&&t.exports&&(t.exports=n)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(l){r=!0,o=l}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},s=d(n(0)),a=d(n(8)),l=n(4),c=d(l),u=d(n(16)),h=d(n(13)),f=d(n(25));function d(t){return t&&t.__esModule?t:{default:t}}function p(t){return t instanceof c.default||t instanceof l.BlockEmbed}var g=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return i.emitter=n.emitter,Array.isArray(n.whitelist)&&(i.whitelist=n.whitelist.reduce((function(t,e){return t[e]=!0,t}),{})),i.domNode.addEventListener("DOMNodeInserted",(function(){})),i.optimize(),i.enable(),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(t,n){var r=this.line(t),s=i(r,2),a=s[0],c=s[1],f=this.line(t+n),d=i(f,1)[0];if(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"deleteAt",this).call(this,t,n),null!=d&&a!==d&&c>0){if(a instanceof l.BlockEmbed||d instanceof l.BlockEmbed)return void this.optimize();if(a instanceof h.default){var p=a.newlineIndex(a.length(),!0);if(p>-1&&(a=a.split(p+1))===d)return void this.optimize()}else if(d instanceof h.default){var g=d.newlineIndex(0);g>-1&&d.split(g+1)}var m=d.children.head instanceof u.default?null:d.children.head;a.moveChildren(d,m),a.remove()}this.optimize()}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t)}},{key:"formatAt",value:function(t,n,i,r){(null==this.whitelist||this.whitelist[i])&&(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,i,r),this.optimize())}},{key:"insertAt",value:function(t,n,i){if(null==i||null==this.whitelist||this.whitelist[n]){if(t>=this.length())if(null==i||null==s.default.query(n,s.default.Scope.BLOCK)){var r=s.default.create(this.statics.defaultChild);this.appendChild(r),null==i&&n.endsWith("\n")&&(n=n.slice(0,-1)),r.insertAt(0,n,i)}else{var a=s.default.create(n,i);this.appendChild(a)}else o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,i);this.optimize()}}},{key:"insertBefore",value:function(t,n){if(t.statics.scope===s.default.Scope.INLINE_BLOT){var i=s.default.create(this.statics.defaultChild);i.appendChild(t),t=i}o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n)}},{key:"leaf",value:function(t){return this.path(t).pop()||[null,-1]}},{key:"line",value:function(t){return t===this.length()?this.line(t-1):this.descendant(p,t)}},{key:"lines",value:function(){return function t(e,n,i){var r=[],o=i;return e.children.forEachAt(n,i,(function(e,n,i){p(e)?r.push(e):e instanceof s.default.Container&&(r=r.concat(t(e,n,o))),o-=i})),r}(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE)}},{key:"optimize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t,n),t.length>0&&this.emitter.emit(a.default.events.SCROLL_OPTIMIZE,t,n))}},{key:"path",value:function(t){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t).slice(1)}},{key:"update",value:function(t){if(!0!==this.batch){var n=a.default.sources.USER;"string"==typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(a.default.events.SCROLL_BEFORE_UPDATE,n,t),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"update",this).call(this,t.concat([])),t.length>0&&this.emitter.emit(a.default.events.SCROLL_UPDATE,n,t)}}}]),e}(s.default.Scroll);g.blotName="scroll",g.className="ql-editor",g.tagName="DIV",g.defaultChild="block",g.allowedChildren=[c.default,l.BlockEmbed,f.default],e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHORTKEY=e.default=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(l){r=!0,o=l}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),s=g(n(21)),a=g(n(11)),l=g(n(3)),c=g(n(2)),u=g(n(20)),h=g(n(0)),f=g(n(5)),d=g(n(10)),p=g(n(9));function g(t){return t&&t.__esModule?t:{default:t}}function m(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var b=(0,d.default)("quill:keyboard"),v=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",y=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.bindings={},Object.keys(i.options.bindings).forEach((function(e){("list autofill"!==e||null==t.scroll.whitelist||t.scroll.whitelist.list)&&i.options.bindings[e]&&i.addBinding(i.options.bindings[e])})),i.addBinding({key:e.keys.ENTER,shiftKey:null},I),i.addBinding({key:e.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},(function(){})),/Firefox/i.test(navigator.userAgent)?(i.addBinding({key:e.keys.BACKSPACE},{collapsed:!0},w),i.addBinding({key:e.keys.DELETE},{collapsed:!0},S)):(i.addBinding({key:e.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},w),i.addBinding({key:e.keys.DELETE},{collapsed:!0,suffix:/^.?$/},S)),i.addBinding({key:e.keys.BACKSPACE},{collapsed:!1},O),i.addBinding({key:e.keys.DELETE},{collapsed:!1},O),i.addBinding({key:e.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},w),i.listen(),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,null,[{key:"match",value:function(t,e){return e=M(e),!["altKey","ctrlKey","metaKey","shiftKey"].some((function(n){return!!e[n]!==t[n]&&null!==e[n]}))&&e.key===(t.which||t.keyCode)}}]),o(e,[{key:"addBinding",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=M(t);if(null==i||null==i.key)return b.warn("Attempted to add invalid keyboard binding",i);"function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n}),i=(0,l.default)(i,e,n),this.bindings[i.key]=this.bindings[i.key]||[],this.bindings[i.key].push(i)}},{key:"listen",value:function(){var t=this;this.quill.root.addEventListener("keydown",(function(n){if(!n.defaultPrevented){var o=n.which||n.keyCode,s=(t.bindings[o]||[]).filter((function(t){return e.match(n,t)}));if(0!==s.length){var l=t.quill.getSelection();if(null!=l&&t.quill.hasFocus()){var c=t.quill.getLine(l.index),u=r(c,2),f=u[0],d=u[1],p=t.quill.getLeaf(l.index),g=r(p,2),m=g[0],b=g[1],v=0===l.length?[m,b]:t.quill.getLeaf(l.index+l.length),y=r(v,2),x=y[0],w=y[1],S=m instanceof h.default.Text?m.value().slice(0,b):"",O=x instanceof h.default.Text?x.value().slice(w):"",I={collapsed:0===l.length,empty:0===l.length&&f.length()<=1,format:t.quill.getFormat(l),offset:d,prefix:S,suffix:O};s.some((function(e){if(null!=e.collapsed&&e.collapsed!==I.collapsed)return!1;if(null!=e.empty&&e.empty!==I.empty)return!1;if(null!=e.offset&&e.offset!==I.offset)return!1;if(Array.isArray(e.format)){if(e.format.every((function(t){return null==I.format[t]})))return!1}else if("object"===i(e.format)&&!Object.keys(e.format).every((function(t){return!0===e.format[t]?null!=I.format[t]:!1===e.format[t]?null==I.format[t]:(0,a.default)(e.format[t],I.format[t])})))return!1;return!(null!=e.prefix&&!e.prefix.test(I.prefix)||null!=e.suffix&&!e.suffix.test(I.suffix)||!0===e.handler.call(t,l,I))}))&&n.preventDefault()}}}}))}}]),e}(p.default);function x(t,e){var n,i=t===y.keys.LEFT?"prefix":"suffix";return m(n={key:t,shiftKey:e,altKey:null},i,/^$/),m(n,"handler",(function(n){var i=n.index;t===y.keys.RIGHT&&(i+=n.length+1);var o=this.quill.getLeaf(i);return!(r(o,1)[0]instanceof h.default.Embed&&(t===y.keys.LEFT?e?this.quill.setSelection(n.index-1,n.length+1,f.default.sources.USER):this.quill.setSelection(n.index-1,f.default.sources.USER):e?this.quill.setSelection(n.index,n.length+1,f.default.sources.USER):this.quill.setSelection(n.index+n.length+1,f.default.sources.USER),1))})),n}function w(t,e){if(!(0===t.index||this.quill.getLength()<=1)){var n=this.quill.getLine(t.index),i=r(n,1)[0],o={};if(0===e.offset){var s=this.quill.getLine(t.index-1),a=r(s,1)[0];if(null!=a&&a.length()>1){var l=i.formats(),c=this.quill.getFormat(t.index-1,1);o=u.default.attributes.diff(l,c)||{}}}var h=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;this.quill.deleteText(t.index-h,h,f.default.sources.USER),Object.keys(o).length>0&&this.quill.formatLine(t.index-h,h,o,f.default.sources.USER),this.quill.focus()}}function S(t,e){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(!(t.index>=this.quill.getLength()-n)){var i={},o=0,s=this.quill.getLine(t.index),a=r(s,1)[0];if(e.offset>=a.length()-1){var l=this.quill.getLine(t.index+1),c=r(l,1)[0];if(c){var h=a.formats(),d=this.quill.getFormat(t.index,1);i=u.default.attributes.diff(h,d)||{},o=c.length()}}this.quill.deleteText(t.index,n,f.default.sources.USER),Object.keys(i).length>0&&this.quill.formatLine(t.index+o-1,n,i,f.default.sources.USER)}}function O(t){var e=this.quill.getLines(t),n={};if(e.length>1){var i=e[0].formats(),r=e[e.length-1].formats();n=u.default.attributes.diff(r,i)||{}}this.quill.deleteText(t,f.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(t.index,1,n,f.default.sources.USER),this.quill.setSelection(t.index,f.default.sources.SILENT),this.quill.focus()}function I(t,e){var n=this;t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);var i=Object.keys(e.format).reduce((function(t,n){return h.default.query(n,h.default.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t}),{});this.quill.insertText(t.index,"\n",i,f.default.sources.USER),this.quill.setSelection(t.index+1,f.default.sources.SILENT),this.quill.focus(),Object.keys(e.format).forEach((function(t){null==i[t]&&(Array.isArray(e.format[t])||"link"!==t&&n.quill.format(t,e.format[t],f.default.sources.USER))}))}function k(t){return{key:y.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=h.default.query("code-block"),i=e.index,o=e.length,s=this.quill.scroll.descendant(n,i),a=r(s,2),l=a[0],c=a[1];if(null!=l){var u=this.quill.getIndex(l),d=l.newlineIndex(c,!0)+1,p=l.newlineIndex(u+c+o),g=l.domNode.textContent.slice(d,p).split("\n");c=0,g.forEach((function(e,r){t?(l.insertAt(d+c,n.TAB),c+=n.TAB.length,0===r?i+=n.TAB.length:o+=n.TAB.length):e.startsWith(n.TAB)&&(l.deleteAt(d+c,n.TAB.length),c-=n.TAB.length,0===r?i-=n.TAB.length:o-=n.TAB.length),c+=e.length+1})),this.quill.update(f.default.sources.USER),this.quill.setSelection(i,o,f.default.sources.SILENT)}}}}function E(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],f.default.sources.USER)}}}function M(t){if("string"==typeof t||"number"==typeof t)return M({key:t});if("object"===(void 0===t?"undefined":i(t))&&(t=(0,s.default)(t,!1)),"string"==typeof t.key)if(null!=y.keys[t.key.toUpperCase()])t.key=y.keys[t.key.toUpperCase()];else{if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}return t.shortKey&&(t[v]=t.shortKey,delete t.shortKey),t}y.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},y.DEFAULTS={bindings:{bold:E("bold"),italic:E("italic"),underline:E("underline"),indent:{key:y.keys.TAB,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","+1",f.default.sources.USER)}},outdent:{key:y.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","-1",f.default.sources.USER)}},"outdent backspace":{key:y.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(t,e){null!=e.format.indent?this.quill.format("indent","-1",f.default.sources.USER):null!=e.format.list&&this.quill.format("list",!1,f.default.sources.USER)}},"indent code-block":k(!0),"outdent code-block":k(!1),"remove tab":{key:y.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,f.default.sources.USER)}},tab:{key:y.keys.TAB,handler:function(t){this.quill.history.cutoff();var e=(new c.default).retain(t.index).delete(t.length).insert("\t");this.quill.updateContents(e,f.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,f.default.sources.SILENT)}},"list empty enter":{key:y.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(t,e){this.quill.format("list",!1,f.default.sources.USER),e.format.indent&&this.quill.format("indent",!1,f.default.sources.USER)}},"checklist enter":{key:y.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(t){var e=this.quill.getLine(t.index),n=r(e,2),i=n[0],o=n[1],s=(0,l.default)({},i.formats(),{list:"checked"}),a=(new c.default).retain(t.index).insert("\n",s).retain(i.length()-o-1).retain(1,{list:"unchecked"});this.quill.updateContents(a,f.default.sources.USER),this.quill.setSelection(t.index+1,f.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:y.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(t,e){var n=this.quill.getLine(t.index),i=r(n,2),o=i[0],s=i[1],a=(new c.default).retain(t.index).insert("\n",e.format).retain(o.length()-s-1).retain(1,{header:null});this.quill.updateContents(a,f.default.sources.USER),this.quill.setSelection(t.index+1,f.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(t,e){var n=e.prefix.length,i=this.quill.getLine(t.index),o=r(i,2),s=o[0],a=o[1];if(a>n)return!0;var l=void 0;switch(e.prefix.trim()){case"[]":case"[ ]":l="unchecked";break;case"[x]":l="checked";break;case"-":case"*":l="bullet";break;default:l="ordered"}this.quill.insertText(t.index," ",f.default.sources.USER),this.quill.history.cutoff();var u=(new c.default).retain(t.index-a).delete(n+1).retain(s.length()-2-a).retain(1,{list:l});this.quill.updateContents(u,f.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-n,f.default.sources.SILENT)}},"code exit":{key:y.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(t){var e=this.quill.getLine(t.index),n=r(e,2),i=n[0],o=n[1],s=(new c.default).retain(t.index+i.length()-o-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(s,f.default.sources.USER)}},"embed left":x(y.keys.LEFT,!1),"embed left shift":x(y.keys.LEFT,!0),"embed right":x(y.keys.RIGHT,!1),"embed right shift":x(y.keys.RIGHT,!0)}},e.default=y,e.SHORTKEY=v},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(l){r=!0,o=l}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),s=l(n(0)),a=l(n(7));function l(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return i.selection=n,i.textNode=document.createTextNode(e.CONTENTS),i.domNode.appendChild(i.textNode),i._length=0,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,null,[{key:"value",value:function(){}}]),o(e,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(t,n){if(0!==this._length)return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n);for(var i=this,o=0;null!=i&&i.statics.scope!==s.default.Scope.BLOCK_BLOT;)o+=i.offset(i.parent),i=i.parent;null!=i&&(this._length=e.CONTENTS.length,i.optimize(),i.formatAt(o,e.CONTENTS.length,t,n),this._length=0)}},{key:"index",value:function(t,n){return t===this.textNode?0:r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"index",this).call(this,t,n)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!this.selection.composing&&null!=this.parent){var t=this.textNode,n=this.selection.getNativeRange(),r=void 0,o=void 0,l=void 0;if(null!=n&&n.start.node===t&&n.end.node===t){var c=[t,n.start.offset,n.end.offset];r=c[0],o=c[1],l=c[2]}for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==e.CONTENTS){var u=this.textNode.data.split(e.CONTENTS).join("");this.next instanceof a.default?(r=this.next.domNode,this.next.insertAt(0,u),this.textNode.data=e.CONTENTS):(this.textNode.data=u,this.parent.insertBefore(s.default.create(this.textNode),this),this.textNode=document.createTextNode(e.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),null!=o){var h=[o,l].map((function(t){return Math.max(0,Math.min(r.data.length,t-1))})),f=i(h,2);return o=f[0],l=f[1],{startNode:r,startOffset:o,endNode:r,endOffset:l}}}}},{key:"update",value:function(t,e){var n=this;if(t.some((function(t){return"characterData"===t.type&&t.target===n.textNode}))){var i=this.restore();i&&(e.range=i)}}},{key:"value",value:function(){return""}}]),e}(s.default.Embed);c.blotName="cursor",c.className="ql-cursor",c.tagName="span",c.CONTENTS="\ufeff",e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=s(n(0)),r=n(4),o=s(r);function s(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(i.default.Container);a.allowedChildren=[o.default,r.BlockEmbed,a],e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorStyle=e.ColorClass=e.ColorAttributor=void 0;var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},s=n(0),a=(i=s)&&i.__esModule?i:{default:i},l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"value",value:function(t){var n=o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t);return n.startsWith("rgb(")?(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+n.split(",").map((function(t){return("00"+parseInt(t).toString(16)).slice(-2)})).join("")):n}}]),e}(a.default.Attributor.Style),c=new a.default.Attributor.Class("color","ql-color",{scope:a.default.Scope.INLINE}),u=new l("color","color",{scope:a.default.Scope.INLINE});e.ColorAttributor=l,e.ColorClass=c,e.ColorStyle=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitize=e.default=void 0;var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},s=n(6),a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"format",value:function(t,n){if(t!==this.statics.blotName||!n)return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n);n=this.constructor.sanitize(n),this.domNode.setAttribute("href",n)}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return t=this.sanitize(t),n.setAttribute("href",t),n.setAttribute("rel","noopener noreferrer"),n.setAttribute("target","_blank"),n}},{key:"formats",value:function(t){return t.getAttribute("href")}},{key:"sanitize",value:function(t){return l(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}}]),e}(((i=s)&&i.__esModule?i:{default:i}).default);function l(t,e){var n=document.createElement("a");n.href=t;var i=n.href.slice(0,n.href.indexOf(":"));return e.indexOf(i)>-1}a.blotName="link",a.tagName="A",a.SANITIZED_URL="about:blank",a.PROTOCOL_WHITELIST=["http","https","mailto","tel"],e.default=a,e.sanitize=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=a(n(23)),s=a(n(107));function a(t){return t&&t.__esModule?t:{default:t}}var l=0;function c(t,e){t.setAttribute(e,!("true"===t.getAttribute(e)))}var u=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",(function(){n.togglePicker()})),this.label.addEventListener("keydown",(function(t){switch(t.keyCode){case o.default.keys.ENTER:n.togglePicker();break;case o.default.keys.ESCAPE:n.escape(),t.preventDefault()}})),this.select.addEventListener("change",this.update.bind(this))}return r(t,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),c(this.label,"aria-expanded"),c(this.options,"aria-hidden")}},{key:"buildItem",value:function(t){var e=this,n=document.createElement("span");return n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item"),t.hasAttribute("value")&&n.setAttribute("data-value",t.getAttribute("value")),t.textContent&&n.setAttribute("data-label",t.textContent),n.addEventListener("click",(function(){e.selectItem(n,!0)})),n.addEventListener("keydown",(function(t){switch(t.keyCode){case o.default.keys.ENTER:e.selectItem(n,!0),t.preventDefault();break;case o.default.keys.ESCAPE:e.escape(),t.preventDefault()}})),n}},{key:"buildLabel",value:function(){var t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML=s.default,t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}},{key:"buildOptions",value:function(){var t=this,e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id="ql-picker-options-"+l,l+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,[].slice.call(this.select.options).forEach((function(n){var i=t.buildItem(n);e.appendChild(i),!0===n.selected&&t.selectItem(i)})),this.container.appendChild(e)}},{key:"buildPicker",value:function(){var t=this;[].slice.call(this.select.attributes).forEach((function(e){t.container.setAttribute(e.name,e.value)})),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var t=this;this.close(),setTimeout((function(){return t.label.focus()}),1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(t!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=t&&(t.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(t.parentNode.children,t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":i(Event))){var r=document.createEvent("Event");r.initEvent("change",!0,!0),this.select.dispatchEvent(r)}this.close()}}},{key:"update",value:function(){var t=void 0;if(this.select.selectedIndex>-1){var e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);var n=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),t}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=b(n(0)),r=b(n(5)),o=n(4),s=b(o),a=b(n(16)),l=b(n(25)),c=b(n(24)),u=b(n(35)),h=b(n(6)),f=b(n(22)),d=b(n(7)),p=b(n(55)),g=b(n(42)),m=b(n(23));function b(t){return t&&t.__esModule?t:{default:t}}r.default.register({"blots/block":s.default,"blots/block/embed":o.BlockEmbed,"blots/break":a.default,"blots/container":l.default,"blots/cursor":c.default,"blots/embed":u.default,"blots/inline":h.default,"blots/scroll":f.default,"blots/text":d.default,"modules/clipboard":p.default,"modules/history":g.default,"modules/keyboard":m.default}),i.default.register(s.default,a.default,c.default,h.default,f.default,d.default),e.default=r.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=function(){function t(t){this.domNode=t,this.domNode[i.DATA_KEY]={blot:this}}return Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){if(null==this.tagName)throw new i.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"==typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},t.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},t.prototype.clone=function(){var t=this.domNode.cloneNode(!1);return i.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[i.DATA_KEY]},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()},t.prototype.formatAt=function(t,e,n,r){var o=this.isolate(t,e);if(null!=i.query(n,i.Scope.BLOT)&&r)o.wrap(n,r);else if(null!=i.query(n,i.Scope.ATTRIBUTE)){var s=i.create(this.statics.scope);o.wrap(s),s.format(n,r)}},t.prototype.insertAt=function(t,e,n){var r=null==n?i.create("text",e):i.create(e,n),o=this.split(t);this.parent.insertBefore(r,o)},t.prototype.insertInto=function(t,e){void 0===e&&(e=null),null!=this.parent&&this.parent.children.remove(this);var n=null;t.children.insertBefore(this,e),null!=e&&(n=e.domNode),this.domNode.parentNode==t.domNode&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,n),this.parent=t,this.attach()},t.prototype.isolate=function(t,e){var n=this.split(t);return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(t){null!=this.domNode[i.DATA_KEY]&&delete this.domNode[i.DATA_KEY].mutations},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replace=function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())},t.prototype.replaceWith=function(t,e){var n="string"==typeof t?i.create(t,e):t;return n.replace(this),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t,e){},t.prototype.wrap=function(t,e){var n="string"==typeof t?i.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},t.blotName="abstract",t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(12),r=n(32),o=n(33),s=n(1),a=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=i.default.keys(this.domNode),n=r.default.keys(this.domNode),a=o.default.keys(this.domNode);e.concat(n).concat(a).forEach((function(e){var n=s.query(e,s.Scope.ATTRIBUTE);n instanceof i.default&&(t.attributes[n.attrName]=n)}))},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach((function(n){var i=e.attributes[n].value(e.domNode);t.format(n,i)}))},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach((function(t){e.attributes[t].remove(e.domNode)})),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce((function(e,n){return e[n]=t.attributes[n].value(t.domNode),e}),{})},t}();e.default=a},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function o(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter((function(t){return 0===t.indexOf(e+"-")}))}Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map((function(t){return t.split("-").slice(0,-1).join("-")}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){o(t,this.keyName).forEach((function(e){t.classList.remove(e)})),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=(o(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=s},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function o(t){var e=t.split("-"),n=e.slice(1).map((function(t){return t[0].toUpperCase()+t.slice(1)})).join("");return e[0]+n}Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map((function(t){return t.split(":")[0].trim()}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style[o(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[o(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style[o(this.keyName)];return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.options=n,this.modules={}}return i(t,[{key:"init",value:function(){var t=this;Object.keys(this.options.modules).forEach((function(e){null==t.modules[e]&&t.addModule(e)}))}},{key:"addModule",value:function(t){var e=this.quill.constructor.import("modules/"+t);return this.modules[t]=new e(this.quill,this.options.modules[t]||{}),this.modules[t]}}]),t}();r.DEFAULTS={modules:{}},r.themes={default:r},e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},o=a(n(0)),s=a(n(7));function a(t){return t&&t.__esModule?t:{default:t}}var l="\ufeff",c=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.contentNode=document.createElement("span"),n.contentNode.setAttribute("contenteditable",!1),[].slice.call(n.domNode.childNodes).forEach((function(t){n.contentNode.appendChild(t)})),n.leftGuard=document.createTextNode(l),n.rightGuard=document.createTextNode(l),n.domNode.appendChild(n.leftGuard),n.domNode.appendChild(n.contentNode),n.domNode.appendChild(n.rightGuard),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"index",value:function(t,n){return t===this.leftGuard?0:t===this.rightGuard?1:r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"index",this).call(this,t,n)}},{key:"restore",value:function(t){var e=void 0,n=void 0,i=t.data.split(l).join("");if(t===this.leftGuard)if(this.prev instanceof s.default){var r=this.prev.length();this.prev.insertAt(r,i),e={startNode:this.prev.domNode,startOffset:r+i.length}}else n=document.createTextNode(i),this.parent.insertBefore(o.default.create(n),this),e={startNode:n,startOffset:i.length};else t===this.rightGuard&&(this.next instanceof s.default?(this.next.insertAt(0,i),e={startNode:this.next.domNode,startOffset:i.length}):(n=document.createTextNode(i),this.parent.insertBefore(o.default.create(n),this.next),e={startNode:n,startOffset:i.length}));return t.data=l,e}},{key:"update",value:function(t,e){var n=this;t.forEach((function(t){if("characterData"===t.type&&(t.target===n.leftGuard||t.target===n.rightGuard)){var i=n.restore(t.target);i&&(e.range=i)}}))}}]),e}(o.default.Embed);e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlignStyle=e.AlignClass=e.AlignAttribute=void 0;var i,r=n(0),o=(i=r)&&i.__esModule?i:{default:i},s={scope:o.default.Scope.BLOCK,whitelist:["right","center","justify"]},a=new o.default.Attributor.Attribute("align","align",s),l=new o.default.Attributor.Class("align","ql-align",s),c=new o.default.Attributor.Style("align","text-align",s);e.AlignAttribute=a,e.AlignClass=l,e.AlignStyle=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BackgroundStyle=e.BackgroundClass=void 0;var i,r=n(0),o=(i=r)&&i.__esModule?i:{default:i},s=n(26),a=new o.default.Attributor.Class("background","ql-bg",{scope:o.default.Scope.INLINE}),l=new s.ColorAttributor("background","background-color",{scope:o.default.Scope.INLINE});e.BackgroundClass=a,e.BackgroundStyle=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DirectionStyle=e.DirectionClass=e.DirectionAttribute=void 0;var i,r=n(0),o=(i=r)&&i.__esModule?i:{default:i},s={scope:o.default.Scope.BLOCK,whitelist:["rtl"]},a=new o.default.Attributor.Attribute("direction","dir",s),l=new o.default.Attributor.Class("direction","ql-direction",s),c=new o.default.Attributor.Style("direction","direction",s);e.DirectionAttribute=a,e.DirectionClass=l,e.DirectionStyle=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontClass=e.FontStyle=void 0;var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},s=n(0),a=(i=s)&&i.__esModule?i:{default:i},l={scope:a.default.Scope.INLINE,whitelist:["serif","monospace"]},c=new a.default.Attributor.Class("font","ql-font",l),u=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"value",value:function(t){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t).replace(/["']/g,"")}}]),e}(a.default.Attributor.Style),h=new u("font","font-family",l);e.FontStyle=h,e.FontClass=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SizeStyle=e.SizeClass=void 0;var i,r=n(0),o=(i=r)&&i.__esModule?i:{default:i},s=new o.default.Attributor.Class("size","ql-size",{scope:o.default.Scope.INLINE,whitelist:["small","large","huge"]}),a=new o.default.Attributor.Style("size","font-size",{scope:o.default.Scope.INLINE,whitelist:["10px","18px","32px"]});e.SizeClass=s,e.SizeStyle=a},function(t,e,n){"use strict";t.exports={align:{"":n(76),center:n(77),right:n(78),justify:n(79)},background:n(80),blockquote:n(81),bold:n(82),clean:n(83),code:n(58),"code-block":n(58),color:n(84),direction:{"":n(85),rtl:n(86)},float:{center:n(87),full:n(88),left:n(89),right:n(90)},formula:n(91),header:{1:n(92),2:n(93)},italic:n(94),image:n(95),indent:{"+1":n(96),"-1":n(97)},link:n(98),list:{ordered:n(99),bullet:n(100),check:n(101)},script:{sub:n(102),super:n(103)},strike:n(104),underline:n(105),video:n(106)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLastChangeIndex=e.default=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=s(n(0)),o=s(n(5));function s(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.lastRecorded=0,i.ignoreChange=!1,i.clear(),i.quill.on(o.default.events.EDITOR_CHANGE,(function(t,e,n,r){t!==o.default.events.TEXT_CHANGE||i.ignoreChange||(i.options.userOnly&&r!==o.default.sources.USER?i.transform(e):i.record(e,n))})),i.quill.keyboard.addBinding({key:"Z",shortKey:!0},i.undo.bind(i)),i.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},i.redo.bind(i)),/Win/i.test(navigator.platform)&&i.quill.keyboard.addBinding({key:"Y",shortKey:!0},i.redo.bind(i)),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"change",value:function(t,e){if(0!==this.stack[t].length){var n=this.stack[t].pop();this.stack[e].push(n),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[t],o.default.sources.USER),this.ignoreChange=!1;var i=l(n[t]);this.quill.setSelection(i)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(t,e){if(0!==t.ops.length){this.stack.redo=[];var n=this.quill.getContents().diff(e),i=Date.now();if(this.lastRecorded+this.options.delay>i&&this.stack.undo.length>0){var r=this.stack.undo.pop();n=n.compose(r.undo),t=r.redo.compose(t)}else this.lastRecorded=i;this.stack.undo.push({redo:t,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(t){this.stack.undo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)})),this.stack.redo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)}))}},{key:"undo",value:function(){this.change("undo","redo")}}]),e}(s(n(9)).default);function l(t){var e=t.reduce((function(t,e){return t+=e.delete||0}),0),n=t.length()-e;return function(t){var e=t.ops[t.ops.length-1];return null!=e&&(null!=e.insert?"string"==typeof e.insert&&e.insert.endsWith("\n"):null!=e.attributes&&Object.keys(e.attributes).some((function(t){return null!=r.default.query(t,r.default.Scope.BLOCK)})))}(t)&&(n-=1),n}a.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},e.default=a,e.getLastChangeIndex=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BaseTooltip=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},o=p(n(3)),s=p(n(2)),a=p(n(8)),l=p(n(23)),c=p(n(34)),u=p(n(59)),h=p(n(60)),f=p(n(28)),d=p(n(61));function p(t){return t&&t.__esModule?t:{default:t}}function g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function b(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var v=[!1,"center","right","justify"],y=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],x=[!1,"serif","monospace"],w=["1","2","3",!1],S=["small",!1,"large","huge"],O=function(t){function e(t,n){g(this,e);var i=m(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return t.emitter.listenDOM("click",document.body,(function e(n){if(!document.body.contains(t.root))return document.body.removeEventListener("click",e);null==i.tooltip||i.tooltip.root.contains(n.target)||document.activeElement===i.tooltip.textbox||i.quill.hasFocus()||i.tooltip.hide(),null!=i.pickers&&i.pickers.forEach((function(t){t.container.contains(n.target)||t.close()}))})),i}return b(e,t),i(e,[{key:"addModule",value:function(t){var n=r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"addModule",this).call(this,t);return"toolbar"===t&&this.extendToolbar(n),n}},{key:"buildButtons",value:function(t,e){t.forEach((function(t){(t.getAttribute("class")||"").split(/\s+/).forEach((function(n){if(n.startsWith("ql-")&&(n=n.slice(3),null!=e[n]))if("direction"===n)t.innerHTML=e[n][""]+e[n].rtl;else if("string"==typeof e[n])t.innerHTML=e[n];else{var i=t.value||"";null!=i&&e[n][i]&&(t.innerHTML=e[n][i])}}))}))}},{key:"buildPickers",value:function(t,e){var n=this;this.pickers=t.map((function(t){if(t.classList.contains("ql-align"))return null==t.querySelector("option")&&k(t,v),new h.default(t,e.align);if(t.classList.contains("ql-background")||t.classList.contains("ql-color")){var n=t.classList.contains("ql-background")?"background":"color";return null==t.querySelector("option")&&k(t,y,"background"===n?"#ffffff":"#000000"),new u.default(t,e[n])}return null==t.querySelector("option")&&(t.classList.contains("ql-font")?k(t,x):t.classList.contains("ql-header")?k(t,w):t.classList.contains("ql-size")&&k(t,S)),new f.default(t)})),this.quill.on(a.default.events.EDITOR_CHANGE,(function(){n.pickers.forEach((function(t){t.update()}))}))}}]),e}(c.default);O.DEFAULTS=(0,o.default)(!0,{},c.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var t=this,e=this.container.querySelector("input.ql-image[type=file]");null==e&&((e=document.createElement("input")).setAttribute("type","file"),e.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),e.classList.add("ql-image"),e.addEventListener("change",(function(){if(null!=e.files&&null!=e.files[0]){var n=new FileReader;n.onload=function(n){var i=t.quill.getSelection(!0);t.quill.updateContents((new s.default).retain(i.index).delete(i.length).insert({image:n.target.result}),a.default.sources.USER),t.quill.setSelection(i.index+1,a.default.sources.SILENT),e.value=""},n.readAsDataURL(e.files[0])}})),this.container.appendChild(e)),e.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var I=function(t){function e(t,n){g(this,e);var i=m(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.textbox=i.root.querySelector('input[type="text"]'),i.listen(),i}return b(e,t),i(e,[{key:"listen",value:function(){var t=this;this.textbox.addEventListener("keydown",(function(e){l.default.match(e,"enter")?(t.save(),e.preventDefault()):l.default.match(e,"escape")&&(t.cancel(),e.preventDefault())}))}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=e?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+t)||""),this.root.setAttribute("data-mode",t)}},{key:"restoreFocus",value:function(){var t=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=t}},{key:"save",value:function(){var t,e,n=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var i=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",n,a.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",n,a.default.sources.USER)),this.quill.root.scrollTop=i;break;case"video":n=(e=(t=n).match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/))?(e[1]||"https")+"://www.youtube.com/embed/"+e[2]+"?showinfo=0":(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(e[1]||"https")+"://player.vimeo.com/video/"+e[2]+"/":t;case"formula":if(!n)break;var r=this.quill.getSelection(!0);if(null!=r){var o=r.index+r.length;this.quill.insertEmbed(o,this.root.getAttribute("data-mode"),n,a.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(o+1," ",a.default.sources.USER),this.quill.setSelection(o+2,a.default.sources.USER)}}this.textbox.value="",this.hide()}}]),e}(d.default);function k(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.forEach((function(e){var i=document.createElement("option");e===n?i.setAttribute("selected","selected"):i.setAttribute("value",e),t.appendChild(i)}))}e.BaseTooltip=I,e.default=O},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){this.head=this.tail=null,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.insertBefore(t[0],null),t.length>1&&this.append.apply(this,t.slice(1))},t.prototype.contains=function(t){for(var e,n=this.iterator();e=n();)if(e===t)return!0;return!1},t.prototype.insertBefore=function(t,e){t&&(t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var n,i=this.iterator();n=i();){var r=n.length();if(t<r||e&&t===r&&(null==n.next||0!==n.next.length()))return[n,t];t-=r}return[null,0]},t.prototype.forEach=function(t){for(var e,n=this.iterator();e=n();)t(e)},t.prototype.forEachAt=function(t,e,n){if(!(e<=0))for(var i,r=this.find(t),o=r[0],s=t-r[1],a=this.iterator(o);(i=a())&&s<t+e;){var l=i.length();t>s?n(i,t-s,Math.min(e,s+l-t)):n(i,0,Math.min(l,t+e-s)),s+=l}},t.prototype.map=function(t){return this.reduce((function(e,n){return e.push(t(n)),e}),[])},t.prototype.reduce=function(t,e){for(var n,i=this.iterator();n=i();)e=t(e,n);return e},t}();e.default=i},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(17),s=n(1),a={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},l=function(t){function e(e){var n=t.call(this,e)||this;return n.scroll=n,n.observer=new MutationObserver((function(t){n.update(t)})),n.observer.observe(n.domNode,a),n.attach(),n}return r(e,t),e.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(e,n){this.update(),0===e&&n===this.length()?this.children.forEach((function(t){t.remove()})):t.prototype.deleteAt.call(this,e,n)},e.prototype.formatAt=function(e,n,i,r){this.update(),t.prototype.formatAt.call(this,e,n,i,r)},e.prototype.insertAt=function(e,n,i){this.update(),t.prototype.insertAt.call(this,e,n,i)},e.prototype.optimize=function(e,n){var i=this;void 0===e&&(e=[]),void 0===n&&(n={}),t.prototype.optimize.call(this,n);for(var r=[].slice.call(this.observer.takeRecords());r.length>0;)e.push(r.pop());for(var a=function(t,e){void 0===e&&(e=!0),null!=t&&t!==i&&null!=t.domNode.parentNode&&(null==t.domNode[s.DATA_KEY].mutations&&(t.domNode[s.DATA_KEY].mutations=[]),e&&a(t.parent))},l=function(t){null!=t.domNode[s.DATA_KEY]&&null!=t.domNode[s.DATA_KEY].mutations&&(t instanceof o.default&&t.children.forEach(l),t.optimize(n))},c=e,u=0;c.length>0;u+=1){if(u>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(c.forEach((function(t){var e=s.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(a(s.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,(function(t){var e=s.find(t,!1);a(e,!1),e instanceof o.default&&e.children.forEach((function(t){a(t,!1)}))}))):"attributes"===t.type&&a(e.prev)),a(e))})),this.children.forEach(l),r=(c=[].slice.call(this.observer.takeRecords())).slice();r.length>0;)e.push(r.pop())}},e.prototype.update=function(e,n){var i=this;void 0===n&&(n={}),(e=e||this.observer.takeRecords()).map((function(t){var e=s.find(t.target,!0);return null==e?null:null==e.domNode[s.DATA_KEY].mutations?(e.domNode[s.DATA_KEY].mutations=[t],e):(e.domNode[s.DATA_KEY].mutations.push(t),null)})).forEach((function(t){null!=t&&t!==i&&null!=t.domNode[s.DATA_KEY]&&t.update(t.domNode[s.DATA_KEY].mutations||[],n)})),null!=this.domNode[s.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[s.DATA_KEY].mutations,n),this.optimize(e,n)},e.blotName="scroll",e.defaultChild="block",e.scope=s.Scope.BLOCK_BLOT,e.tagName="DIV",e}(o.default);e.default=l},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(18),s=n(1),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,i){var r=this;n!==this.statics.blotName||i?t.prototype.format.call(this,n,i):(this.children.forEach((function(t){t instanceof o.default||(t=t.wrap(e.blotName,!0)),r.attributes.copy(t)})),this.unwrap())},e.prototype.formatAt=function(e,n,i,r){null!=this.formats()[i]||s.query(i,s.Scope.ATTRIBUTE)?this.isolate(e,n).format(i,r):t.prototype.formatAt.call(this,e,n,i,r)},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n);var i=this.formats();if(0===Object.keys(i).length)return this.unwrap();var r=this.next;r instanceof e&&r.prev===this&&function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}(i,r.formats())&&(r.moveChildren(this),r.remove())},e.blotName="inline",e.scope=s.Scope.INLINE_BLOT,e.tagName="SPAN",e}(o.default);e.default=a},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(18),s=n(1),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(n){var i=s.query(e.blotName).tagName;if(n.tagName!==i)return t.formats.call(this,n)},e.prototype.format=function(n,i){null!=s.query(n,s.Scope.BLOCK)&&(n!==this.statics.blotName||i?t.prototype.format.call(this,n,i):this.replaceWith(e.blotName))},e.prototype.formatAt=function(e,n,i,r){null!=s.query(i,s.Scope.BLOCK)?this.format(i,r):t.prototype.formatAt.call(this,e,n,i,r)},e.prototype.insertAt=function(e,n,i){if(null==i||null!=s.query(n,s.Scope.INLINE))t.prototype.insertAt.call(this,e,n,i);else{var r=this.split(e),o=s.create(n,i);r.parent.insertBefore(o,r)}},e.prototype.update=function(e,n){navigator.userAgent.match(/Trident/)?this.build():t.prototype.update.call(this,e,n)},e.blotName="block",e.scope=s.Scope.BLOCK_BLOT,e.tagName="P",e}(o.default);e.default=a},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(t){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,i,r){0===e&&n===this.length()?this.format(i,r):t.prototype.formatAt.call(this,e,n,i,r)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(n(19).default);e.default=o},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(19),s=n(1),a=function(t){function e(e){var n=t.call(this,e)||this;return n.text=n.statics.value(n.domNode),n}return r(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){var e=t.data;return e.normalize&&(e=e.normalize()),e},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,i){null==i?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,i)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=s.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t,e){var n=this;t.some((function(t){return"characterData"===t.type&&t.target===n.domNode}))&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e.blotName="text",e.scope=s.Scope.INLINE_BLOT,e}(o.default);e.default=a},function(t,e,n){"use strict";var i=document.createElement("div");if(i.classList.toggle("test-class",!1),i.classList.contains("test-class")){var r=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return arguments.length>1&&!this.contains(t)==!e?e:r.call(this,t)}}String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var i=n.indexOf(t,e);return-1!==i&&i===e}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),i=n.length>>>0,r=arguments[1],o=0;o<i;o++)if(e=n[o],t.call(r,e,o,n))return e}}),document.addEventListener("DOMContentLoaded",(function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)}))},function(t,e){var n=-1;function i(t,e,l){if(t==e)return t?[[0,t]]:[];(l<0||t.length<l)&&(l=null);var u=o(t,e),h=t.substring(0,u);u=s(t=t.substring(u),e=e.substring(u));var f=t.substring(t.length-u),d=function(t,e){var a;if(!t)return[[1,e]];if(!e)return[[n,t]];var l=t.length>e.length?t:e,c=t.length>e.length?e:t,u=l.indexOf(c);if(-1!=u)return a=[[1,l.substring(0,u)],[0,c],[1,l.substring(u+c.length)]],t.length>e.length&&(a[0][0]=a[2][0]=n),a;if(1==c.length)return[[n,t],[1,e]];var h=function(t,e){var n=t.length>e.length?t:e,i=t.length>e.length?e:t;if(n.length<4||2*i.length<n.length)return null;function r(t,e,n){for(var i,r,a,l,c=t.substring(n,n+Math.floor(t.length/4)),u=-1,h="";-1!=(u=e.indexOf(c,u+1));){var f=o(t.substring(n),e.substring(u)),d=s(t.substring(0,n),e.substring(0,u));h.length<d+f&&(h=e.substring(u-d,u)+e.substring(u,u+f),i=t.substring(0,n-d),r=t.substring(n+f),a=e.substring(0,u-d),l=e.substring(u+f))}return 2*h.length>=t.length?[i,r,a,l,h]:null}var a,l,c,u,h,f=r(n,i,Math.ceil(n.length/4)),d=r(n,i,Math.ceil(n.length/2));if(!f&&!d)return null;a=d?f&&f[4].length>d[4].length?f:d:f,t.length>e.length?(l=a[0],c=a[1],u=a[2],h=a[3]):(u=a[0],h=a[1],l=a[2],c=a[3]);var p=a[4];return[l,c,u,h,p]}(t,e);if(h){var f=h[0],d=h[1],p=h[2],g=h[3],m=h[4],b=i(f,p),v=i(d,g);return b.concat([[0,m]],v)}return function(t,e){for(var i=t.length,o=e.length,s=Math.ceil((i+o)/2),a=s,l=2*s,c=new Array(l),u=new Array(l),h=0;h<l;h++)c[h]=-1,u[h]=-1;c[a+1]=0,u[a+1]=0;for(var f=i-o,d=f%2!=0,p=0,g=0,m=0,b=0,v=0;v<s;v++){for(var y=-v+p;y<=v-g;y+=2){for(var x=a+y,w=(E=y==-v||y!=v&&c[x-1]<c[x+1]?c[x+1]:c[x-1]+1)-y;E<i&&w<o&&t.charAt(E)==e.charAt(w);)E++,w++;if(c[x]=E,E>i)g+=2;else if(w>o)p+=2;else if(d&&(I=a+f-y)>=0&&I<l&&-1!=u[I]&&E>=(O=i-u[I]))return r(t,e,E,w)}for(var S=-v+m;S<=v-b;S+=2){for(var O,I=a+S,k=(O=S==-v||S!=v&&u[I-1]<u[I+1]?u[I+1]:u[I-1]+1)-S;O<i&&k<o&&t.charAt(i-O-1)==e.charAt(o-k-1);)O++,k++;if(u[I]=O,O>i)b+=2;else if(k>o)m+=2;else if(!d){var E;if((x=a+f-S)>=0&&x<l&&-1!=c[x])if(w=a+(E=c[x])-x,E>=(O=i-O))return r(t,e,E,w)}}}return[[n,t],[1,e]]}(t,e)}(t=t.substring(0,t.length-u),e=e.substring(0,e.length-u));return h&&d.unshift([0,h]),f&&d.push([0,f]),a(d),null!=l&&(d=function(t,e){var i=function(t,e){if(0===e)return[0,t];for(var i=0,r=0;r<t.length;r++){var o=t[r];if(o[0]===n||0===o[0]){var s=i+o[1].length;if(e===s)return[r+1,t];if(e<s){t=t.slice();var a=e-i,l=[o[0],o[1].slice(0,a)],c=[o[0],o[1].slice(a)];return t.splice(r,1,l,c),[r+1,t]}i=s}}throw new Error("cursor_pos is out of bounds!")}(t,e),r=i[1],o=i[0],s=r[o],a=r[o+1];if(null==s)return t;if(0!==s[0])return t;if(null!=a&&s[1]+a[1]===a[1]+s[1])return r.splice(o,2,a,s),c(r,o,2);if(null!=a&&0===a[1].indexOf(s[1])){r.splice(o,2,[a[0],s[1]],[0,s[1]]);var l=a[1].slice(s[1].length);return l.length>0&&r.splice(o+2,0,[a[0],l]),c(r,o,3)}return t}(d,l)),d=function(t){for(var e=!1,i=function(t){return t.charCodeAt(0)>=56320&&t.charCodeAt(0)<=57343},r=function(t){return t.charCodeAt(t.length-1)>=55296&&t.charCodeAt(t.length-1)<=56319},o=2;o<t.length;o+=1)0===t[o-2][0]&&r(t[o-2][1])&&t[o-1][0]===n&&i(t[o-1][1])&&1===t[o][0]&&i(t[o][1])&&(e=!0,t[o-1][1]=t[o-2][1].slice(-1)+t[o-1][1],t[o][1]=t[o-2][1].slice(-1)+t[o][1],t[o-2][1]=t[o-2][1].slice(0,-1));if(!e)return t;var s=[];for(o=0;o<t.length;o+=1)t[o][1].length>0&&s.push(t[o]);return s}(d)}function r(t,e,n,r){var o=t.substring(0,n),s=e.substring(0,r),a=t.substring(n),l=e.substring(r),c=i(o,s),u=i(a,l);return c.concat(u)}function o(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var n=0,i=Math.min(t.length,e.length),r=i,o=0;n<r;)t.substring(o,r)==e.substring(o,r)?o=n=r:i=r,r=Math.floor((i-n)/2+n);return r}function s(t,e){if(!t||!e||t.charAt(t.length-1)!=e.charAt(e.length-1))return 0;for(var n=0,i=Math.min(t.length,e.length),r=i,o=0;n<r;)t.substring(t.length-r,t.length-o)==e.substring(e.length-r,e.length-o)?o=n=r:i=r,r=Math.floor((i-n)/2+n);return r}function a(t){t.push([0,""]);for(var e,i=0,r=0,l=0,c="",u="";i<t.length;)switch(t[i][0]){case 1:l++,u+=t[i][1],i++;break;case n:r++,c+=t[i][1],i++;break;case 0:r+l>1?(0!==r&&0!==l&&(0!==(e=o(u,c))&&(i-r-l>0&&0==t[i-r-l-1][0]?t[i-r-l-1][1]+=u.substring(0,e):(t.splice(0,0,[0,u.substring(0,e)]),i++),u=u.substring(e),c=c.substring(e)),0!==(e=s(u,c))&&(t[i][1]=u.substring(u.length-e)+t[i][1],u=u.substring(0,u.length-e),c=c.substring(0,c.length-e))),0===r?t.splice(i-l,r+l,[1,u]):0===l?t.splice(i-r,r+l,[n,c]):t.splice(i-r-l,r+l,[n,c],[1,u]),i=i-r-l+(r?1:0)+(l?1:0)+1):0!==i&&0==t[i-1][0]?(t[i-1][1]+=t[i][1],t.splice(i,1)):i++,l=0,r=0,c="",u=""}""===t[t.length-1][1]&&t.pop();var h=!1;for(i=1;i<t.length-1;)0==t[i-1][0]&&0==t[i+1][0]&&(t[i][1].substring(t[i][1].length-t[i-1][1].length)==t[i-1][1]?(t[i][1]=t[i-1][1]+t[i][1].substring(0,t[i][1].length-t[i-1][1].length),t[i+1][1]=t[i-1][1]+t[i+1][1],t.splice(i-1,1),h=!0):t[i][1].substring(0,t[i+1][1].length)==t[i+1][1]&&(t[i-1][1]+=t[i+1][1],t[i][1]=t[i][1].substring(t[i+1][1].length)+t[i+1][1],t.splice(i+1,1),h=!0)),i++;h&&a(t)}var l=i;function c(t,e,n){for(var i=e+n-1;i>=0&&i>=e-1;i--)if(i+1<t.length){var r=t[i],o=t[i+1];r[0]===o[1]&&t.splice(i,2,[r[0],r[1]+o[1]])}return t}l.INSERT=1,l.DELETE=n,l.EQUAL=0,t.exports=l},function(t,e){function n(t){var e=[];for(var n in t)e.push(n);return e}(t.exports="function"==typeof Object.keys?Object.keys:n).shim=n},function(t,e){var n="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function i(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function r(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Object.prototype.hasOwnProperty.call(t,"callee")&&!Object.prototype.propertyIsEnumerable.call(t,"callee")||!1}(e=t.exports=n?i:r).supported=i,e.unsupported=r},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,i="~";function r(){}function o(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(i=!1)),s.prototype.eventNames=function(){var t,e,r=[];if(0===this._eventsCount)return r;for(e in t=this._events)n.call(t,e)&&r.push(i?e.slice(1):e);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},s.prototype.listeners=function(t,e){var n=i?i+t:t,r=this._events[n];if(e)return!!r;if(!r)return[];if(r.fn)return[r.fn];for(var o=0,s=r.length,a=new Array(s);o<s;o++)a[o]=r[o].fn;return a},s.prototype.emit=function(t,e,n,r,o,s){var a=i?i+t:t;if(!this._events[a])return!1;var l,c,u=this._events[a],h=arguments.length;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),h){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,e),!0;case 3:return u.fn.call(u.context,e,n),!0;case 4:return u.fn.call(u.context,e,n,r),!0;case 5:return u.fn.call(u.context,e,n,r,o),!0;case 6:return u.fn.call(u.context,e,n,r,o,s),!0}for(c=1,l=new Array(h-1);c<h;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var f,d=u.length;for(c=0;c<d;c++)switch(u[c].once&&this.removeListener(t,u[c].fn,void 0,!0),h){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,e);break;case 3:u[c].fn.call(u[c].context,e,n);break;case 4:u[c].fn.call(u[c].context,e,n,r);break;default:if(!l)for(f=1,l=new Array(h-1);f<h;f++)l[f-1]=arguments[f];u[c].fn.apply(u[c].context,l)}}return!0},s.prototype.on=function(t,e,n){var r=new o(e,n||this),s=i?i+t:t;return this._events[s]?this._events[s].fn?this._events[s]=[this._events[s],r]:this._events[s].push(r):(this._events[s]=r,this._eventsCount++),this},s.prototype.once=function(t,e,n){var r=new o(e,n||this,!0),s=i?i+t:t;return this._events[s]?this._events[s].fn?this._events[s]=[this._events[s],r]:this._events[s].push(r):(this._events[s]=r,this._eventsCount++),this},s.prototype.removeListener=function(t,e,n,o){var s=i?i+t:t;if(!this._events[s])return this;if(!e)return 0==--this._eventsCount?this._events=new r:delete this._events[s],this;var a=this._events[s];if(a.fn)a.fn!==e||o&&!a.once||n&&a.context!==n||(0==--this._eventsCount?this._events=new r:delete this._events[s]);else{for(var l=0,c=[],u=a.length;l<u;l++)(a[l].fn!==e||o&&!a[l].once||n&&a[l].context!==n)&&c.push(a[l]);c.length?this._events[s]=1===c.length?c[0]:c:0==--this._eventsCount?this._events=new r:delete this._events[s]}return this},s.prototype.removeAllListeners=function(t){var e;return t?(e=i?i+t:t,this._events[e]&&(0==--this._eventsCount?this._events=new r:delete this._events[e])):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prototype.setMaxListeners=function(){return this},s.prefixed=i,s.EventEmitter=s,void 0!==t&&(t.exports=s)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.matchText=e.matchSpacing=e.matchNewline=e.matchBlot=e.matchAttributor=e.default=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(l){r=!0,o=l}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),s=y(n(3)),a=y(n(2)),l=y(n(0)),c=y(n(5)),u=y(n(10)),h=y(n(9)),f=n(36),d=n(37),p=y(n(13)),g=n(26),m=n(38),b=n(39),v=n(40);function y(t){return t&&t.__esModule?t:{default:t}}function x(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var w=(0,u.default)("quill:clipboard"),S="__ql-matcher",O=[[Node.TEXT_NODE,R],[Node.TEXT_NODE,L],["br",function(t,e){return A(e,"\n")||e.insert("\n"),e}],[Node.ELEMENT_NODE,L],[Node.ELEMENT_NODE,_],[Node.ELEMENT_NODE,D],[Node.ELEMENT_NODE,N],[Node.ELEMENT_NODE,function(t,e){var n={},i=t.style||{};return i.fontStyle&&"italic"===C(t).fontStyle&&(n.italic=!0),i.fontWeight&&(C(t).fontWeight.startsWith("bold")||parseInt(C(t).fontWeight)>=700)&&(n.bold=!0),Object.keys(n).length>0&&(e=M(e,n)),parseFloat(i.textIndent||0)>0&&(e=(new a.default).insert("\t").concat(e)),e}],["li",function(t,e){var n=l.default.query(t);if(null==n||"list-item"!==n.blotName||!A(e,"\n"))return e;for(var i=-1,r=t.parentNode;!r.classList.contains("ql-clipboard");)"list"===(l.default.query(r)||{}).blotName&&(i+=1),r=r.parentNode;return i<=0?e:e.compose((new a.default).retain(e.length()-1).retain(1,{indent:i}))}],["b",T.bind(T,"bold")],["i",T.bind(T,"italic")],["style",function(){return new a.default}]],I=[f.AlignAttribute,m.DirectionAttribute].reduce((function(t,e){return t[e.keyName]=e,t}),{}),k=[f.AlignStyle,d.BackgroundStyle,g.ColorStyle,m.DirectionStyle,b.FontStyle,v.SizeStyle].reduce((function(t,e){return t[e.keyName]=e,t}),{}),E=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.quill.root.addEventListener("paste",i.onPaste.bind(i)),i.container=i.quill.addContainer("ql-clipboard"),i.container.setAttribute("contenteditable",!0),i.container.setAttribute("tabindex",-1),i.matchers=[],O.concat(i.options.matchers).forEach((function(t){var e=r(t,2),o=e[0],s=e[1];(n.matchVisual||s!==D)&&i.addMatcher(o,s)})),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"addMatcher",value:function(t,e){this.matchers.push([t,e])}},{key:"convert",value:function(t){if("string"==typeof t)return this.container.innerHTML=t.replace(/\>\r?\n +\</g,"><"),this.convert();var e=this.quill.getFormat(this.quill.selection.savedRange.index);if(e[p.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new a.default).insert(n,x({},p.default.blotName,e[p.default.blotName]))}var i=this.prepareMatching(),o=r(i,2),s=o[0],l=o[1],c=P(this.container,s,l);return A(c,"\n")&&null==c.ops[c.ops.length-1].attributes&&(c=c.compose((new a.default).retain(c.length()-1).delete(1))),w.log("convert",this.container.innerHTML,c),this.container.innerHTML="",c}},{key:"dangerouslyPasteHTML",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c.default.sources.API;if("string"==typeof t)this.quill.setContents(this.convert(t),e),this.quill.setSelection(0,c.default.sources.SILENT);else{var i=this.convert(e);this.quill.updateContents((new a.default).retain(t).concat(i),n),this.quill.setSelection(t+i.length(),c.default.sources.SILENT)}}},{key:"onPaste",value:function(t){var e=this;if(!t.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),i=(new a.default).retain(n.index),r=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(c.default.sources.SILENT),setTimeout((function(){i=i.concat(e.convert()).delete(n.length),e.quill.updateContents(i,c.default.sources.USER),e.quill.setSelection(i.length()-n.length,c.default.sources.SILENT),e.quill.scrollingContainer.scrollTop=r,e.quill.focus()}),1)}}},{key:"prepareMatching",value:function(){var t=this,e=[],n=[];return this.matchers.forEach((function(i){var o=r(i,2),s=o[0],a=o[1];switch(s){case Node.TEXT_NODE:n.push(a);break;case Node.ELEMENT_NODE:e.push(a);break;default:[].forEach.call(t.container.querySelectorAll(s),(function(t){t[S]=t[S]||[],t[S].push(a)}))}})),[e,n]}}]),e}(h.default);function M(t,e,n){return"object"===(void 0===e?"undefined":i(e))?Object.keys(e).reduce((function(t,n){return M(t,n,e[n])}),t):t.reduce((function(t,i){return i.attributes&&i.attributes[e]?t.push(i):t.insert(i.insert,(0,s.default)({},x({},e,n),i.attributes))}),new a.default)}function C(t){if(t.nodeType!==Node.ELEMENT_NODE)return{};var e="__ql-computed-style";return t[e]||(t[e]=window.getComputedStyle(t))}function A(t,e){for(var n="",i=t.ops.length-1;i>=0&&n.length<e.length;--i){var r=t.ops[i];if("string"!=typeof r.insert)break;n=r.insert+n}return n.slice(-1*e.length)===e}function j(t){if(0===t.childNodes.length)return!1;var e=C(t);return["block","list-item"].indexOf(e.display)>-1}function P(t,e,n){return t.nodeType===t.TEXT_NODE?n.reduce((function(e,n){return n(t,e)}),new a.default):t.nodeType===t.ELEMENT_NODE?[].reduce.call(t.childNodes||[],(function(i,r){var o=P(r,e,n);return r.nodeType===t.ELEMENT_NODE&&(o=e.reduce((function(t,e){return e(r,t)}),o),o=(r[S]||[]).reduce((function(t,e){return e(r,t)}),o)),i.concat(o)}),new a.default):new a.default}function T(t,e,n){return M(n,t,!0)}function N(t,e){var n=l.default.Attributor.Attribute.keys(t),i=l.default.Attributor.Class.keys(t),r=l.default.Attributor.Style.keys(t),o={};return n.concat(i).concat(r).forEach((function(e){var n=l.default.query(e,l.default.Scope.ATTRIBUTE);null!=n&&(o[n.attrName]=n.value(t),o[n.attrName])||(null==(n=I[e])||n.attrName!==e&&n.keyName!==e||(o[n.attrName]=n.value(t)||void 0),null==(n=k[e])||n.attrName!==e&&n.keyName!==e||(n=k[e],o[n.attrName]=n.value(t)||void 0))})),Object.keys(o).length>0&&(e=M(e,o)),e}function _(t,e){var n=l.default.query(t);if(null==n)return e;if(n.prototype instanceof l.default.Embed){var i={},r=n.value(t);null!=r&&(i[n.blotName]=r,e=(new a.default).insert(i,n.formats(t)))}else"function"==typeof n.formats&&(e=M(e,n.blotName,n.formats(t)));return e}function L(t,e){return A(e,"\n")||(j(t)||e.length()>0&&t.nextSibling&&j(t.nextSibling))&&e.insert("\n"),e}function D(t,e){if(j(t)&&null!=t.nextElementSibling&&!A(e,"\n\n")){var n=t.offsetHeight+parseFloat(C(t).marginTop)+parseFloat(C(t).marginBottom);t.nextElementSibling.offsetTop>t.offsetTop+1.5*n&&e.insert("\n")}return e}function R(t,e){var n=t.data;if("O:P"===t.parentNode.tagName)return e.insert(n.trim());if(0===n.trim().length&&t.parentNode.classList.contains("ql-clipboard"))return e;if(!C(t.parentNode).whiteSpace.startsWith("pre")){var i=function(t,e){return(e=e.replace(/[^\u00a0]/g,"")).length<1&&t?" ":e};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,i.bind(i,!0)),(null==t.previousSibling&&j(t.parentNode)||null!=t.previousSibling&&j(t.previousSibling))&&(n=n.replace(/^\s+/,i.bind(i,!1))),(null==t.nextSibling&&j(t.parentNode)||null!=t.nextSibling&&j(t.nextSibling))&&(n=n.replace(/\s+$/,i.bind(i,!1)))}return e.insert(n)}E.DEFAULTS={matchers:[],matchVisual:!0},e.default=E,e.matchAttributor=N,e.matchBlot=_,e.matchNewline=L,e.matchSpacing=D,e.matchText=R},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},s=n(6),a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"optimize",value:function(t){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),e}(((i=s)&&i.__esModule?i:{default:i}).default);a.blotName="bold",a.tagName=["STRONG","B"],e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addControls=e.default=void 0;var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(l){r=!0,o=l}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=u(n(2)),s=u(n(0)),a=u(n(5)),l=u(n(10)),c=u(n(9));function u(t){return t&&t.__esModule?t:{default:t}}function h(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var f=(0,l.default)("quill:toolbar"),d=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r,o=h(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if(Array.isArray(o.options.container)){var s=document.createElement("div");g(s,o.options.container),t.container.parentNode.insertBefore(s,t.container),o.container=s}else"string"==typeof o.options.container?o.container=document.querySelector(o.options.container):o.container=o.options.container;return o.container instanceof HTMLElement?(o.container.classList.add("ql-toolbar"),o.controls=[],o.handlers={},Object.keys(o.options.handlers).forEach((function(t){o.addHandler(t,o.options.handlers[t])})),[].forEach.call(o.container.querySelectorAll("button, select"),(function(t){o.attach(t)})),o.quill.on(a.default.events.EDITOR_CHANGE,(function(t,e){t===a.default.events.SELECTION_CHANGE&&o.update(e)})),o.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){var t=o.quill.selection.getRange(),e=i(t,1)[0];o.update(e)})),o):(r=f.error("Container required for toolbar",o.options),h(o,r))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"addHandler",value:function(t,e){this.handlers[t]=e}},{key:"attach",value:function(t){var e=this,n=[].find.call(t.classList,(function(t){return 0===t.indexOf("ql-")}));if(n){if(n=n.slice(3),"BUTTON"===t.tagName&&t.setAttribute("type","button"),null==this.handlers[n]){if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[n])return void f.warn("ignoring attaching to disabled format",n,t);if(null==s.default.query(n))return void f.warn("ignoring attaching to nonexistent format",n,t)}var r="SELECT"===t.tagName?"change":"click";t.addEventListener(r,(function(r){var l=void 0;if("SELECT"===t.tagName){if(t.selectedIndex<0)return;var c=t.options[t.selectedIndex];l=!c.hasAttribute("selected")&&(c.value||!1)}else l=!t.classList.contains("ql-active")&&(t.value||!t.hasAttribute("value")),r.preventDefault();e.quill.focus();var u=e.quill.selection.getRange(),h=i(u,1)[0];if(null!=e.handlers[n])e.handlers[n].call(e,l);else if(s.default.query(n).prototype instanceof s.default.Embed){if(!(l=prompt("Enter "+n)))return;e.quill.updateContents((new o.default).retain(h.index).delete(h.length).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},n,l)),a.default.sources.USER)}else e.quill.format(n,l,a.default.sources.USER);e.update(h)})),this.controls.push([n,t])}}},{key:"update",value:function(t){var e=null==t?{}:this.quill.getFormat(t);this.controls.forEach((function(n){var r=i(n,2),o=r[0],s=r[1];if("SELECT"===s.tagName){var a=void 0;if(null==t)a=null;else if(null==e[o])a=s.querySelector("option[selected]");else if(!Array.isArray(e[o])){var l=e[o];"string"==typeof l&&(l=l.replace(/\"/g,'\\"')),a=s.querySelector('option[value="'+l+'"]')}null==a?(s.value="",s.selectedIndex=-1):a.selected=!0}else if(null==t)s.classList.remove("ql-active");else if(s.hasAttribute("value")){var c=e[o]===s.getAttribute("value")||null!=e[o]&&e[o].toString()===s.getAttribute("value")||null==e[o]&&!s.getAttribute("value");s.classList.toggle("ql-active",c)}else s.classList.toggle("ql-active",null!=e[o])}))}}]),e}(c.default);function p(t,e,n){var i=document.createElement("button");i.setAttribute("type","button"),i.classList.add("ql-"+e),null!=n&&(i.value=n),t.appendChild(i)}function g(t,e){Array.isArray(e[0])||(e=[e]),e.forEach((function(e){var n=document.createElement("span");n.classList.add("ql-formats"),e.forEach((function(t){if("string"==typeof t)p(n,t);else{var e=Object.keys(t)[0],i=t[e];Array.isArray(i)?function(t,e,n){var i=document.createElement("select");i.classList.add("ql-"+e),n.forEach((function(t){var e=document.createElement("option");!1!==t?e.setAttribute("value",t):e.setAttribute("selected","selected"),i.appendChild(e)})),t.appendChild(i)}(n,e,i):p(n,e,i)}})),t.appendChild(n)}))}d.DEFAULTS={},d.DEFAULTS={container:null,handlers:{clean:function(){var t=this,e=this.quill.getSelection();if(null!=e)if(0==e.length){var n=this.quill.getFormat();Object.keys(n).forEach((function(e){null!=s.default.query(e,s.default.Scope.INLINE)&&t.quill.format(e,!1)}))}else this.quill.removeFormat(e,a.default.sources.USER)},direction:function(t){var e=this.quill.getFormat().align;"rtl"===t&&null==e?this.quill.format("align","right",a.default.sources.USER):t||"right"!==e||this.quill.format("align",!1,a.default.sources.USER),this.quill.format("direction",t,a.default.sources.USER)},indent:function(t){var e=this.quill.getSelection(),n=this.quill.getFormat(e),i=parseInt(n.indent||0);if("+1"===t||"-1"===t){var r="+1"===t?1:-1;"rtl"===n.direction&&(r*=-1),this.quill.format("indent",i+r,a.default.sources.USER)}},link:function(t){!0===t&&(t=prompt("Enter link URL:")),this.quill.format("link",t,a.default.sources.USER)},list:function(t){var e=this.quill.getSelection(),n=this.quill.getFormat(e);"check"===t?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,a.default.sources.USER):this.quill.format("list","unchecked",a.default.sources.USER):this.quill.format("list",t,a.default.sources.USER)}}},e.default=d,e.addControls=g},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},s=n(28),a=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return i.label.innerHTML=n,i.container.classList.add("ql-color-picker"),[].slice.call(i.container.querySelectorAll(".ql-picker-item"),0,7).forEach((function(t){t.classList.add("ql-primary")})),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"buildItem",value:function(t){var n=o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"buildItem",this).call(this,t);return n.style.backgroundColor=t.getAttribute("value")||"",n}},{key:"selectItem",value:function(t,n){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"selectItem",this).call(this,t,n);var i=this.label.querySelector(".ql-color-label"),r=t&&t.getAttribute("data-value")||"";i&&("line"===i.tagName?i.style.stroke=r:i.style.fill=r)}}]),e}(((i=s)&&i.__esModule?i:{default:i}).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},s=n(28),a=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return i.container.classList.add("ql-icon-picker"),[].forEach.call(i.container.querySelectorAll(".ql-picker-item"),(function(t){t.innerHTML=n[t.getAttribute("data-value")||""]})),i.defaultItem=i.container.querySelector(".ql-selected"),i.selectItem(i.defaultItem),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"selectItem",value:function(t,n){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"selectItem",this).call(this,t,n),t=t||this.defaultItem,this.label.innerHTML=t.innerHTML}}]),e}(((i=s)&&i.__esModule?i:{default:i}).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function(){function t(e,n){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.boundsContainer=n||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",(function(){i.root.style.marginTop=-1*i.quill.root.scrollTop+"px"})),this.hide()}return i(t,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(t){var e=t.left+t.width/2-this.root.offsetWidth/2,n=t.bottom+this.quill.root.scrollTop;this.root.style.left=e+"px",this.root.style.top=n+"px",this.root.classList.remove("ql-flip");var i=this.boundsContainer.getBoundingClientRect(),r=this.root.getBoundingClientRect(),o=0;if(r.right>i.right&&(o=i.right-r.right,this.root.style.left=e+o+"px"),r.left<i.left&&(o=i.left-r.left,this.root.style.left=e+o+"px"),r.bottom>i.bottom){var s=r.bottom-r.top,a=t.bottom-t.top+s;this.root.style.top=n-a+"px",this.root.classList.add("ql-flip")}return o}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(l){r=!0,o=l}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),s=d(n(3)),a=d(n(8)),l=n(43),c=d(l),u=d(n(27)),h=n(15),f=d(n(41));function d(t){return t&&t.__esModule?t:{default:t}}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function m(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var b=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],v=function(t){function e(t,n){p(this,e),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=b);var i=g(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.quill.container.classList.add("ql-snow"),i}return m(e,t),o(e,[{key:"extendToolbar",value:function(t){t.container.classList.add("ql-snow"),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),f.default),this.buildPickers([].slice.call(t.container.querySelectorAll("select")),f.default),this.tooltip=new y(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},(function(e,n){t.handlers.link.call(t,!n.format.link)}))}}]),e}(c.default);v.DEFAULTS=(0,s.default)(!0,{},c.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(t){if(t){var e=this.quill.getSelection();if(null==e||0==e.length)return;var n=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(n)&&0!==n.indexOf("mailto:")&&(n="mailto:"+n),this.quill.theme.tooltip.edit("link",n)}else this.quill.format("link",!1)}}}}});var y=function(t){function e(t,n){p(this,e);var i=g(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.preview=i.root.querySelector("a.ql-preview"),i}return m(e,t),o(e,[{key:"listen",value:function(){var t=this;r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",(function(e){t.root.classList.contains("ql-editing")?t.save():t.edit("link",t.preview.textContent),e.preventDefault()})),this.root.querySelector("a.ql-remove").addEventListener("click",(function(e){if(null!=t.linkRange){var n=t.linkRange;t.restoreFocus(),t.quill.formatText(n,"link",!1,a.default.sources.USER),delete t.linkRange}e.preventDefault(),t.hide()})),this.quill.on(a.default.events.SELECTION_CHANGE,(function(e,n,r){if(null!=e){if(0===e.length&&r===a.default.sources.USER){var o=t.quill.scroll.descendant(u.default,e.index),s=i(o,2),l=s[0],c=s[1];if(null!=l){t.linkRange=new h.Range(e.index-c,l.length());var f=u.default.formats(l.domNode);return t.preview.textContent=f,t.preview.setAttribute("href",f),t.show(),void t.position(t.quill.getBounds(t.linkRange))}}else delete t.linkRange;t.hide()}}))}},{key:"show",value:function(){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),e}(l.BaseTooltip);y.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),e.default=v},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=L(n(29)),r=n(36),o=n(38),s=n(64),a=L(n(65)),l=L(n(66)),c=n(67),u=L(c),h=n(37),f=n(26),d=n(39),p=n(40),g=L(n(56)),m=L(n(68)),b=L(n(27)),v=L(n(69)),y=L(n(70)),x=L(n(71)),w=L(n(72)),S=L(n(73)),O=n(13),I=L(O),k=L(n(74)),E=L(n(75)),M=L(n(57)),C=L(n(41)),A=L(n(28)),j=L(n(59)),P=L(n(60)),T=L(n(61)),N=L(n(108)),_=L(n(62));function L(t){return t&&t.__esModule?t:{default:t}}i.default.register({"attributors/attribute/direction":o.DirectionAttribute,"attributors/class/align":r.AlignClass,"attributors/class/background":h.BackgroundClass,"attributors/class/color":f.ColorClass,"attributors/class/direction":o.DirectionClass,"attributors/class/font":d.FontClass,"attributors/class/size":p.SizeClass,"attributors/style/align":r.AlignStyle,"attributors/style/background":h.BackgroundStyle,"attributors/style/color":f.ColorStyle,"attributors/style/direction":o.DirectionStyle,"attributors/style/font":d.FontStyle,"attributors/style/size":p.SizeStyle},!0),i.default.register({"formats/align":r.AlignClass,"formats/direction":o.DirectionClass,"formats/indent":s.IndentClass,"formats/background":h.BackgroundStyle,"formats/color":f.ColorStyle,"formats/font":d.FontClass,"formats/size":p.SizeClass,"formats/blockquote":a.default,"formats/code-block":I.default,"formats/header":l.default,"formats/list":u.default,"formats/bold":g.default,"formats/code":O.Code,"formats/italic":m.default,"formats/link":b.default,"formats/script":v.default,"formats/strike":y.default,"formats/underline":x.default,"formats/image":w.default,"formats/video":S.default,"formats/list/item":c.ListItem,"modules/formula":k.default,"modules/syntax":E.default,"modules/toolbar":M.default,"themes/bubble":N.default,"themes/snow":_.default,"ui/icons":C.default,"ui/picker":A.default,"ui/icon-picker":P.default,"ui/color-picker":j.default,"ui/tooltip":T.default},!0),e.default=i.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentClass=void 0;var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},s=n(0),a=(i=s)&&i.__esModule?i:{default:i},l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"add",value:function(t,n){if("+1"===n||"-1"===n){var i=this.value(t)||0;n="+1"===n?i+1:i-1}return 0===n?(this.remove(t),!0):o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"add",this).call(this,t,n)}},{key:"canAdd",value:function(t,n){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"canAdd",this).call(this,t,n)||o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"canAdd",this).call(this,t,parseInt(n))}},{key:"value",value:function(t){return parseInt(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t))||void 0}}]),e}(a.default.Attributor.Class),c=new l("indent","ql-indent",{scope:a.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});e.IndentClass=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(4),o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((i=r)&&i.__esModule?i:{default:i}).default);o.blotName="blockquote",o.tagName="blockquote",e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(4),s=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,null,[{key:"formats",value:function(t){return this.tagName.indexOf(t.tagName)+1}}]),e}(((i=o)&&i.__esModule?i:{default:i}).default);s.blotName="header",s.tagName=["H1","H2","H3","H4","H5","H6"],e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.ListItem=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},o=l(n(0)),s=l(n(4)),a=l(n(25));function l(t){return t&&t.__esModule?t:{default:t}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var f=function(t){function e(){return c(this,e),u(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return h(e,t),i(e,[{key:"format",value:function(t,n){t!==d.blotName||n?r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n):this.replaceWith(o.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(t,n){return this.parent.isolate(this.offset(this.parent),this.length()),t===this.parent.statics.blotName?(this.parent.replaceWith(t,n),this):(this.parent.unwrap(),r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replaceWith",this).call(this,t,n))}}],[{key:"formats",value:function(t){return t.tagName===this.tagName?void 0:r(e.__proto__||Object.getPrototypeOf(e),"formats",this).call(this,t)}}]),e}(s.default);f.blotName="list-item",f.tagName="LI";var d=function(t){function e(t){c(this,e);var n=u(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t)),i=function(e){if(e.target.parentNode===t){var i=n.statics.formats(t),r=o.default.find(e.target);"checked"===i?r.format("list","unchecked"):"unchecked"===i&&r.format("list","checked")}};return t.addEventListener("touchstart",i),t.addEventListener("mousedown",i),n}return h(e,t),i(e,null,[{key:"create",value:function(t){var n="ordered"===t?"OL":"UL",i=r(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,n);return"checked"!==t&&"unchecked"!==t||i.setAttribute("data-checked","checked"===t),i}},{key:"formats",value:function(t){return"OL"===t.tagName?"ordered":"UL"===t.tagName?t.hasAttribute("data-checked")?"true"===t.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0}}]),i(e,[{key:"format",value:function(t,e){this.children.length>0&&this.children.tail.format(t,e)}},{key:"formats",value:function(){return t={},e=this.statics.blotName,n=this.statics.formats(this.domNode),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t;var t,e,n}},{key:"insertBefore",value:function(t,n){if(t instanceof f)r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n);else{var i=null==n?this.length():n.offset(this),o=this.split(i);o.parent.insertBefore(t,o)}}},{key:"optimize",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){if(t.statics.blotName!==this.statics.blotName){var n=o.default.create(this.statics.defaultChild);t.moveChildren(n),this.appendChild(n)}r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t)}}]),e}(a.default);d.blotName="list",d.scope=o.default.Scope.BLOCK_BLOT,d.tagName=["OL","UL"],d.defaultChild="list-item",d.allowedChildren=[f],e.ListItem=f,e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(56),o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((i=r)&&i.__esModule?i:{default:i}).default);o.blotName="italic",o.tagName=["EM","I"],e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},s=n(6),a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,null,[{key:"create",value:function(t){return"super"===t?document.createElement("sup"):"sub"===t?document.createElement("sub"):o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t)}},{key:"formats",value:function(t){return"SUB"===t.tagName?"sub":"SUP"===t.tagName?"super":void 0}}]),e}(((i=s)&&i.__esModule?i:{default:i}).default);a.blotName="script",a.tagName=["SUB","SUP"],e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(6),o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((i=r)&&i.__esModule?i:{default:i}).default);o.blotName="strike",o.tagName="S",e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(6),o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((i=r)&&i.__esModule?i:{default:i}).default);o.blotName="underline",o.tagName="U",e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},s=n(0),a=(i=s)&&i.__esModule?i:{default:i},l=n(27),c=["alt","height","width"],u=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"format",value:function(t,n){c.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return c.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"match",value:function(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}},{key:"sanitize",value:function(t){return(0,l.sanitize)(t,["http","https","data"])?t:"//:0"}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(a.default.Embed);u.blotName="image",u.tagName="IMG",e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},s=n(4),a=n(27),l=(i=a)&&i.__esModule?i:{default:i},c=["height","width"],u=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"format",value:function(t,n){c.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return c.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"sanitize",value:function(t){return l.default.sanitize(t)}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(s.BlockEmbed);u.blotName="video",u.className="ql-video",u.tagName="IFRAME",e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.FormulaBlot=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},o=l(n(35)),s=l(n(5)),a=l(n(9));function l(t){return t&&t.__esModule?t:{default:t}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var f=function(t){function e(){return c(this,e),u(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return h(e,t),i(e,null,[{key:"create",value:function(t){var n=r(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&(window.katex.render(t,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",t)),n}},{key:"value",value:function(t){return t.getAttribute("data-value")}}]),e}(o.default);f.blotName="formula",f.className="ql-formula",f.tagName="SPAN";var d=function(t){function e(){c(this,e);var t=u(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));if(null==window.katex)throw new Error("Formula module requires KaTeX.");return t}return h(e,t),i(e,null,[{key:"register",value:function(){s.default.register(f,!0)}}]),e}(a.default);e.FormulaBlot=f,e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CodeToken=e.CodeBlock=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},o=l(n(0)),s=l(n(5)),a=l(n(9));function l(t){return t&&t.__esModule?t:{default:t}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var f=function(t){function e(){return c(this,e),u(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return h(e,t),i(e,[{key:"replaceWith",value:function(t){this.domNode.textContent=this.domNode.textContent,this.attach(),r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replaceWith",this).call(this,t)}},{key:"highlight",value:function(t){var e=this.domNode.textContent;this.cachedText!==e&&((e.trim().length>0||null==this.cachedText)&&(this.domNode.innerHTML=t(e),this.domNode.normalize(),this.attach()),this.cachedText=e)}}]),e}(l(n(13)).default);f.className="ql-syntax";var d=new o.default.Attributor.Class("token","hljs",{scope:o.default.Scope.INLINE}),p=function(t){function e(t,n){c(this,e);var i=u(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if("function"!=typeof i.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var r=null;return i.quill.on(s.default.events.SCROLL_OPTIMIZE,(function(){clearTimeout(r),r=setTimeout((function(){i.highlight(),r=null}),i.options.interval)})),i.highlight(),i}return h(e,t),i(e,null,[{key:"register",value:function(){s.default.register(d,!0),s.default.register(f,!0)}}]),i(e,[{key:"highlight",value:function(){var t=this;if(!this.quill.selection.composing){this.quill.update(s.default.sources.USER);var e=this.quill.getSelection();this.quill.scroll.descendants(f).forEach((function(e){e.highlight(t.options.highlight)})),this.quill.update(s.default.sources.SILENT),null!=e&&this.quill.setSelection(e,s.default.sources.SILENT)}}}]),e}(a.default);p.DEFAULTS={highlight:null==window.hljs?null:function(t){return window.hljs.highlightAuto(t).value},interval:1e3},e.CodeBlock=f,e.CodeToken=d,e.default=p},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(t,e){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(t,e){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(t,e){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(t,e){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BubbleTooltip=void 0;var i=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=h(n(3)),s=h(n(8)),a=n(43),l=h(a),c=n(15),u=h(n(41));function h(t){return t&&t.__esModule?t:{default:t}}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function p(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var g=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],m=function(t){function e(t,n){f(this,e),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=g);var i=d(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.quill.container.classList.add("ql-bubble"),i}return p(e,t),r(e,[{key:"extendToolbar",value:function(t){this.tooltip=new b(this.quill,this.options.bounds),this.tooltip.root.appendChild(t.container),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),u.default),this.buildPickers([].slice.call(t.container.querySelectorAll("select")),u.default)}}]),e}(l.default);m.DEFAULTS=(0,o.default)(!0,{},l.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(t){t?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var b=function(t){function e(t,n){f(this,e);var i=d(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.quill.on(s.default.events.EDITOR_CHANGE,(function(t,e,n,r){if(t===s.default.events.SELECTION_CHANGE)if(null!=e&&e.length>0&&r===s.default.sources.USER){i.show(),i.root.style.left="0px",i.root.style.width="",i.root.style.width=i.root.offsetWidth+"px";var o=i.quill.getLines(e.index,e.length);if(1===o.length)i.position(i.quill.getBounds(e));else{var a=o[o.length-1],l=i.quill.getIndex(a),u=Math.min(a.length()-1,e.index+e.length-l),h=i.quill.getBounds(new c.Range(l,u));i.position(h)}}else document.activeElement!==i.textbox&&i.quill.hasFocus()&&i.hide()})),i}return p(e,t),r(e,[{key:"listen",value:function(){var t=this;i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",(function(){t.root.classList.remove("ql-editing")})),this.quill.on(s.default.events.SCROLL_OPTIMIZE,(function(){setTimeout((function(){if(!t.root.classList.contains("ql-hidden")){var e=t.quill.getSelection();null!=e&&t.position(t.quill.getBounds(e))}}),1)}))}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(t){var n=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"position",this).call(this,t),r=this.root.querySelector(".ql-tooltip-arrow");if(r.style.marginLeft="",0===n)return n;r.style.marginLeft=-1*n-r.offsetWidth/2+"px"}}]),e}(a.BaseTooltip);b.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),e.BubbleTooltip=b,e.default=m},function(t,e,n){t.exports=n(63)}]).default},t.exports=e()},8482:(t,e,n)=>{"use strict";n.d(e,{Xq:()=>yo});var i=n(7810),r=n(9325),o={},s=function(t,e,n,i){var r=t+"-"+e+"-"+n+(i?"-server":"");if(o[r])return o[r];var s=function(t,e,n,i){if("undefined"==typeof document&&!i)return null;var r=i?new i:document.createElement("canvas");r.width=2*n,r.height=2*n;var o=r.getContext("2d");return o?(o.fillStyle=t,o.fillRect(0,0,r.width,r.height),o.fillStyle=e,o.fillRect(0,0,n,n),o.translate(n,n),o.fillRect(0,0,n,n),r.toDataURL()):null}(t,e,n,i);return o[r]=s,s},a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},l=function(t){var e=t.white,n=t.grey,o=t.size,l=t.renderers,c=t.borderRadius,u=t.boxShadow,h=t.children,f=(0,r.Ay)({default:{grid:{borderRadius:c,boxShadow:u,absolute:"0px 0px 0px 0px",background:"url("+s(e,n,o,l.canvas)+") center left"}}});return(0,i.isValidElement)(h)?i.cloneElement(h,a({},h.props,{style:a({},h.props.style,f.grid)})):i.createElement("div",{style:f.grid})};l.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};const c=l;var u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},h=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();function f(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}const d=function(t){function e(){var t,n,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];return n=i=f(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(o))),i.handleChange=function(t){var e=function(t,e,n,i,r){var o=r.clientWidth,s=r.clientHeight,a="number"==typeof t.pageX?t.pageX:t.touches[0].pageX,l="number"==typeof t.pageY?t.pageY:t.touches[0].pageY,c=a-(r.getBoundingClientRect().left+window.pageXOffset),u=l-(r.getBoundingClientRect().top+window.pageYOffset);if("vertical"===n){var h=void 0;if(h=u<0?0:u>s?1:Math.round(100*u/s)/100,e.a!==h)return{h:e.h,s:e.s,l:e.l,a:h,source:"rgb"}}else{var f=void 0;if(i!==(f=c<0?0:c>o?1:Math.round(100*c/o)/100))return{h:e.h,s:e.s,l:e.l,a:f,source:"rgb"}}return null}(t,i.props.hsl,i.props.direction,i.props.a,i.container);e&&"function"==typeof i.props.onChange&&i.props.onChange(e,t)},i.handleMouseDown=function(t){i.handleChange(t),window.addEventListener("mousemove",i.handleChange),window.addEventListener("mouseup",i.handleMouseUp)},i.handleMouseUp=function(){i.unbindEventListeners()},i.unbindEventListeners=function(){window.removeEventListener("mousemove",i.handleChange),window.removeEventListener("mouseup",i.handleMouseUp)},f(i,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),h(e,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var t=this,e=this.props.rgb,n=(0,r.Ay)({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+e.r+","+e.g+","+e.b+", 0) 0%,\n rgba("+e.r+","+e.g+","+e.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:100*e.a+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+e.r+","+e.g+","+e.b+", 0) 0%,\n rgba("+e.r+","+e.g+","+e.b+", 1) 100%)"},pointer:{left:0,top:100*e.a+"%"}},overwrite:u({},this.props.style)},{vertical:"vertical"===this.props.direction,overwrite:!0});return i.createElement("div",{style:n.alpha},i.createElement("div",{style:n.checkboard},i.createElement(c,{renderers:this.props.renderers})),i.createElement("div",{style:n.gradient}),i.createElement("div",{style:n.container,ref:function(e){return t.container=e},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},i.createElement("div",{style:n.pointer},this.props.pointer?i.createElement(this.props.pointer,this.props):i.createElement("div",{style:n.slider}))))}}]),e}(i.PureComponent||i.Component);var p=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();var g=[38,40],m=1;const b=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n.handleBlur=function(){n.state.blurValue&&n.setState({value:n.state.blurValue,blurValue:null})},n.handleChange=function(t){n.setUpdatedValue(t.target.value,t)},n.handleKeyDown=function(t){var e,i=function(t){return Number(String(t).replace(/%/g,""))}(t.target.value);if(!isNaN(i)&&(e=t.keyCode,g.indexOf(e)>-1)){var r=n.getArrowOffset(),o=38===t.keyCode?i+r:i-r;n.setUpdatedValue(o,t)}},n.handleDrag=function(t){if(n.props.dragLabel){var e=Math.round(n.props.value+t.movementX);e>=0&&e<=n.props.dragMax&&n.props.onChange&&n.props.onChange(n.getValueObjectWithLabel(e),t)}},n.handleMouseDown=function(t){n.props.dragLabel&&(t.preventDefault(),n.handleDrag(t),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(t.value).toUpperCase(),blurValue:String(t.value).toUpperCase()},n.inputId="rc-editable-input-"+m++,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),p(e,[{key:"componentDidUpdate",value:function(t,e){this.props.value===this.state.value||t.value===this.props.value&&e.value===this.state.value||(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(t){return function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},this.props.label,t)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(t,e){var n=this.props.label?this.getValueObjectWithLabel(t):t;this.props.onChange&&this.props.onChange(n,e),this.setState({value:t})}},{key:"render",value:function(){var t=this,e=(0,r.Ay)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return i.createElement("div",{style:e.wrap},i.createElement("input",{id:this.inputId,style:e.input,ref:function(e){return t.input=e},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?i.createElement("label",{htmlFor:this.inputId,style:e.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),e}(i.PureComponent||i.Component);var v=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();function y(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}const x=function(t){function e(){var t,n,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];return n=i=y(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(o))),i.handleChange=function(t){var e=function(t,e,n,i){var r=i.clientWidth,o=i.clientHeight,s="number"==typeof t.pageX?t.pageX:t.touches[0].pageX,a="number"==typeof t.pageY?t.pageY:t.touches[0].pageY,l=s-(i.getBoundingClientRect().left+window.pageXOffset),c=a-(i.getBoundingClientRect().top+window.pageYOffset);if("vertical"===e){var u=void 0;if(u=c<0?359:c>o?0:360*(-100*c/o+100)/100,n.h!==u)return{h:u,s:n.s,l:n.l,a:n.a,source:"hsl"}}else{var h=void 0;if(h=l<0?0:l>r?359:100*l/r*360/100,n.h!==h)return{h,s:n.s,l:n.l,a:n.a,source:"hsl"}}return null}(t,i.props.direction,i.props.hsl,i.container);e&&"function"==typeof i.props.onChange&&i.props.onChange(e,t)},i.handleMouseDown=function(t){i.handleChange(t),window.addEventListener("mousemove",i.handleChange),window.addEventListener("mouseup",i.handleMouseUp)},i.handleMouseUp=function(){i.unbindEventListeners()},y(i,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),v(e,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var t=this,e=this.props.direction,n=void 0===e?"horizontal":e,o=(0,r.Ay)({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:100*this.props.hsl.h/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-100*this.props.hsl.h/360+100+"%"}}},{vertical:"vertical"===n});return i.createElement("div",{style:o.hue},i.createElement("div",{className:"hue-"+n,style:o.container,ref:function(e){return t.container=e},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},i.createElement("style",null,"\n .hue-horizontal {\n background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0\n 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to right, #f00 0%, #ff0\n 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n\n .hue-vertical {\n background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\n #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,\n #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n "),i.createElement("div",{style:o.pointer},this.props.pointer?i.createElement(this.props.pointer,this.props):i.createElement("div",{style:o.slider}))))}}]),e}(i.PureComponent||i.Component);var w=n(5826),S=n.n(w);const O=function(){this.__data__=[],this.size=0};const I=function(t,e){return t===e||t!=t&&e!=e};const k=function(t,e){for(var n=t.length;n--;)if(I(t[n][0],e))return n;return-1};var E=Array.prototype.splice;const M=function(t){var e=this.__data__,n=k(e,t);return!(n<0)&&(n==e.length-1?e.pop():E.call(e,n,1),--this.size,!0)};const C=function(t){var e=this.__data__,n=k(e,t);return n<0?void 0:e[n][1]};const A=function(t){return k(this.__data__,t)>-1};const j=function(t,e){var n=this.__data__,i=k(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this};function P(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}P.prototype.clear=O,P.prototype.delete=M,P.prototype.get=C,P.prototype.has=A,P.prototype.set=j;const T=P;const N=function(){this.__data__=new T,this.size=0};const _=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n};const L=function(t){return this.__data__.get(t)};const D=function(t){return this.__data__.has(t)};const R="object"==typeof global&&global&&global.Object===Object&&global;var B="object"==typeof self&&self&&self.Object===Object&&self;const H=R||B||Function("return this")();const z=H.Symbol;var W=Object.prototype,U=W.hasOwnProperty,F=W.toString,G=z?z.toStringTag:void 0;const Z=function(t){var e=U.call(t,G),n=t[G];try{t[G]=void 0;var i=!0}catch(o){}var r=F.call(t);return i&&(e?t[G]=n:delete t[G]),r};var V=Object.prototype.toString;const q=function(t){return V.call(t)};var Y=z?z.toStringTag:void 0;const J=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Y&&Y in Object(t)?Z(t):q(t)};const Q=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};const X=function(t){if(!Q(t))return!1;var e=J(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e};const $=H["__core-js_shared__"];var K,tt=(K=/[^.]+$/.exec($&&$.keys&&$.keys.IE_PROTO||""))?"Symbol(src)_1."+K:"";const et=function(t){return!!tt&&tt in t};var nt=Function.prototype.toString;const it=function(t){if(null!=t){try{return nt.call(t)}catch(e){}try{return t+""}catch(e){}}return""};var rt=/^\[object .+?Constructor\]$/,ot=Function.prototype,st=Object.prototype,at=ot.toString,lt=st.hasOwnProperty,ct=RegExp("^"+at.call(lt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const ut=function(t){return!(!Q(t)||et(t))&&(X(t)?ct:rt).test(it(t))};const ht=function(t,e){return null==t?void 0:t[e]};const ft=function(t,e){var n=ht(t,e);return ut(n)?n:void 0};const dt=ft(H,"Map");const pt=ft(Object,"create");const gt=function(){this.__data__=pt?pt(null):{},this.size=0};const mt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e};var bt=Object.prototype.hasOwnProperty;const vt=function(t){var e=this.__data__;if(pt){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return bt.call(e,t)?e[t]:void 0};var yt=Object.prototype.hasOwnProperty;const xt=function(t){var e=this.__data__;return pt?void 0!==e[t]:yt.call(e,t)};const wt=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=pt&&void 0===e?"__lodash_hash_undefined__":e,this};function St(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}St.prototype.clear=gt,St.prototype.delete=mt,St.prototype.get=vt,St.prototype.has=xt,St.prototype.set=wt;const Ot=St;const It=function(){this.size=0,this.__data__={hash:new Ot,map:new(dt||T),string:new Ot}};const kt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};const Et=function(t,e){var n=t.__data__;return kt(e)?n["string"==typeof e?"string":"hash"]:n.map};const Mt=function(t){var e=Et(this,t).delete(t);return this.size-=e?1:0,e};const Ct=function(t){return Et(this,t).get(t)};const At=function(t){return Et(this,t).has(t)};const jt=function(t,e){var n=Et(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this};function Pt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}Pt.prototype.clear=It,Pt.prototype.delete=Mt,Pt.prototype.get=Ct,Pt.prototype.has=At,Pt.prototype.set=jt;const Tt=Pt;const Nt=function(t,e){var n=this.__data__;if(n instanceof T){var i=n.__data__;if(!dt||i.length<199)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new Tt(i)}return n.set(t,e),this.size=n.size,this};function _t(t){var e=this.__data__=new T(t);this.size=e.size}_t.prototype.clear=N,_t.prototype.delete=_,_t.prototype.get=L,_t.prototype.has=D,_t.prototype.set=Nt;const Lt=_t;const Dt=function(){try{var t=ft(Object,"defineProperty");return t({},"",{}),t}catch(e){}}();const Rt=function(t,e,n){"__proto__"==e&&Dt?Dt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n};const Bt=function(t,e,n){(void 0!==n&&!I(t[e],n)||void 0===n&&!(e in t))&&Rt(t,e,n)};const Ht=function(t){return function(e,n,i){for(var r=-1,o=Object(e),s=i(e),a=s.length;a--;){var l=s[t?a:++r];if(!1===n(o[l],l,o))break}return e}}();var zt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Wt=zt&&"object"==typeof module&&module&&!module.nodeType&&module,Ut=Wt&&Wt.exports===zt?H.Buffer:void 0,Ft=Ut?Ut.allocUnsafe:void 0;const Gt=function(t,e){if(e)return t.slice();var n=t.length,i=Ft?Ft(n):new t.constructor(n);return t.copy(i),i};const Zt=H.Uint8Array;const Vt=function(t){var e=new t.constructor(t.byteLength);return new Zt(e).set(new Zt(t)),e};const qt=function(t,e){var n=e?Vt(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)};const Yt=function(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e};var Jt=Object.create;const Qt=function(){function t(){}return function(e){if(!Q(e))return{};if(Jt)return Jt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();const Xt=function(t,e){return function(n){return t(e(n))}};const $t=Xt(Object.getPrototypeOf,Object);var Kt=Object.prototype;const te=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Kt)};const ee=function(t){return"function"!=typeof t.constructor||te(t)?{}:Qt($t(t))};const ne=function(t){return null!=t&&"object"==typeof t};const ie=function(t){return ne(t)&&"[object Arguments]"==J(t)};var re=Object.prototype,oe=re.hasOwnProperty,se=re.propertyIsEnumerable;const ae=ie(function(){return arguments}())?ie:function(t){return ne(t)&&oe.call(t,"callee")&&!se.call(t,"callee")};const le=Array.isArray;const ce=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991};const ue=function(t){return null!=t&&ce(t.length)&&!X(t)};const he=function(t){return ne(t)&&ue(t)};const fe=function(){return!1};var de="object"==typeof exports&&exports&&!exports.nodeType&&exports,pe=de&&"object"==typeof module&&module&&!module.nodeType&&module,ge=pe&&pe.exports===de?H.Buffer:void 0;const me=(ge?ge.isBuffer:void 0)||fe;var be=Function.prototype,ve=Object.prototype,ye=be.toString,xe=ve.hasOwnProperty,we=ye.call(Object);const Se=function(t){if(!ne(t)||"[object Object]"!=J(t))return!1;var e=$t(t);if(null===e)return!0;var n=xe.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ye.call(n)==we};var Oe={};Oe["[object Float32Array]"]=Oe["[object Float64Array]"]=Oe["[object Int8Array]"]=Oe["[object Int16Array]"]=Oe["[object Int32Array]"]=Oe["[object Uint8Array]"]=Oe["[object Uint8ClampedArray]"]=Oe["[object Uint16Array]"]=Oe["[object Uint32Array]"]=!0,Oe["[object Arguments]"]=Oe["[object Array]"]=Oe["[object ArrayBuffer]"]=Oe["[object Boolean]"]=Oe["[object DataView]"]=Oe["[object Date]"]=Oe["[object Error]"]=Oe["[object Function]"]=Oe["[object Map]"]=Oe["[object Number]"]=Oe["[object Object]"]=Oe["[object RegExp]"]=Oe["[object Set]"]=Oe["[object String]"]=Oe["[object WeakMap]"]=!1;const Ie=function(t){return ne(t)&&ce(t.length)&&!!Oe[J(t)]};const ke=function(t){return function(e){return t(e)}};var Ee="object"==typeof exports&&exports&&!exports.nodeType&&exports,Me=Ee&&"object"==typeof module&&module&&!module.nodeType&&module,Ce=Me&&Me.exports===Ee&&R.process,Ae=function(){try{var t=Me&&Me.require&&Me.require("util").types;return t||Ce&&Ce.binding&&Ce.binding("util")}catch(e){}}();var je=Ae&&Ae.isTypedArray;const Pe=je?ke(je):Ie;const Te=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var Ne=Object.prototype.hasOwnProperty;const _e=function(t,e,n){var i=t[e];Ne.call(t,e)&&I(i,n)&&(void 0!==n||e in t)||Rt(t,e,n)};const Le=function(t,e,n,i){var r=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var a=e[o],l=i?i(n[a],t[a],a,n,t):void 0;void 0===l&&(l=t[a]),r?Rt(n,a,l):_e(n,a,l)}return n};const De=function(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i};var Re=/^(?:0|[1-9]\d*)$/;const Be=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Re.test(t))&&t>-1&&t%1==0&&t<e};var He=Object.prototype.hasOwnProperty;const ze=function(t,e){var n=le(t),i=!n&&ae(t),r=!n&&!i&&me(t),o=!n&&!i&&!r&&Pe(t),s=n||i||r||o,a=s?De(t.length,String):[],l=a.length;for(var c in t)!e&&!He.call(t,c)||s&&("length"==c||r&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Be(c,l))||a.push(c);return a};const We=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e};var Ue=Object.prototype.hasOwnProperty;const Fe=function(t){if(!Q(t))return We(t);var e=te(t),n=[];for(var i in t)("constructor"!=i||!e&&Ue.call(t,i))&&n.push(i);return n};const Ge=function(t){return ue(t)?ze(t,!0):Fe(t)};const Ze=function(t){return Le(t,Ge(t))};const Ve=function(t,e,n,i,r,o,s){var a=Te(t,n),l=Te(e,n),c=s.get(l);if(c)Bt(t,n,c);else{var u=o?o(a,l,n+"",t,e,s):void 0,h=void 0===u;if(h){var f=le(l),d=!f&&me(l),p=!f&&!d&&Pe(l);u=l,f||d||p?le(a)?u=a:he(a)?u=Yt(a):d?(h=!1,u=Gt(l,!0)):p?(h=!1,u=qt(l,!0)):u=[]:Se(l)||ae(l)?(u=a,ae(a)?u=Ze(a):Q(a)&&!X(a)||(u=ee(l))):h=!1}h&&(s.set(l,u),r(u,l,i,o,s),s.delete(l)),Bt(t,n,u)}};const qe=function t(e,n,i,r,o){e!==n&&Ht(n,(function(s,a){if(o||(o=new Lt),Q(s))Ve(e,n,a,i,t,r,o);else{var l=r?r(Te(e,a),s,a+"",e,n,o):void 0;void 0===l&&(l=s),Bt(e,a,l)}}),Ge)};const Ye=function(t){return t};const Je=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)};var Qe=Math.max;const Xe=function(t,e,n){return e=Qe(void 0===e?t.length-1:e,0),function(){for(var i=arguments,r=-1,o=Qe(i.length-e,0),s=Array(o);++r<o;)s[r]=i[e+r];r=-1;for(var a=Array(e+1);++r<e;)a[r]=i[r];return a[e]=n(s),Je(t,this,a)}};const $e=function(t){return function(){return t}};const Ke=Dt?function(t,e){return Dt(t,"toString",{configurable:!0,enumerable:!1,value:$e(e),writable:!0})}:Ye;var tn=Date.now;const en=function(t){var e=0,n=0;return function(){var i=tn(),r=16-(i-n);if(n=i,r>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(Ke);const nn=function(t,e){return en(Xe(t,e,Ye),t+"")};const rn=function(t,e,n){if(!Q(n))return!1;var i=typeof e;return!!("number"==i?ue(n)&&Be(e,n.length):"string"==i&&e in n)&&I(n[e],t)};const on=function(t){return nn((function(e,n){var i=-1,r=n.length,o=r>1?n[r-1]:void 0,s=r>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(r--,o):void 0,s&&rn(n[0],n[1],s)&&(o=r<3?void 0:o,r=1),e=Object(e);++i<r;){var a=n[i];a&&t(e,a,i,o)}return e}))}((function(t,e,n){qe(t,e,n)}));var sn=function(t){var e=t.zDepth,n=t.radius,o=t.background,s=t.children,a=t.styles,l=void 0===a?{}:a,c=(0,r.Ay)(on({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+e+"px "+4*e+"px rgba(0,0,0,.24)",borderRadius:n,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},l),{"zDepth-1":1===e});return i.createElement("div",{style:c.wrap},i.createElement("div",{style:c.bg}),i.createElement("div",{style:c.content},s))};sn.propTypes={background:S().string,zDepth:S().oneOf([0,1,2,3,4,5]),radius:S().number,styles:S().object},sn.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};const an=sn;const ln=function(){return H.Date.now()};var cn=/\s/;const un=function(t){for(var e=t.length;e--&&cn.test(t.charAt(e)););return e};var hn=/^\s+/;const fn=function(t){return t?t.slice(0,un(t)+1).replace(hn,""):t};const dn=function(t){return"symbol"==typeof t||ne(t)&&"[object Symbol]"==J(t)};var pn=/^[-+]0x[0-9a-f]+$/i,gn=/^0b[01]+$/i,mn=/^0o[0-7]+$/i,bn=parseInt;const vn=function(t){if("number"==typeof t)return t;if(dn(t))return NaN;if(Q(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Q(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=fn(t);var n=gn.test(t);return n||mn.test(t)?bn(t.slice(2),n?2:8):pn.test(t)?NaN:+t};var yn=Math.max,xn=Math.min;const wn=function(t,e,n){var i,r,o,s,a,l,c=0,u=!1,h=!1,f=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function d(e){var n=i,o=r;return i=r=void 0,c=e,s=t.apply(o,n)}function p(t){var n=t-l;return void 0===l||n>=e||n<0||h&&t-c>=o}function g(){var t=ln();if(p(t))return m(t);a=setTimeout(g,function(t){var n=e-(t-l);return h?xn(n,o-(t-c)):n}(t))}function m(t){return a=void 0,f&&i?d(t):(i=r=void 0,s)}function b(){var t=ln(),n=p(t);if(i=arguments,r=this,l=t,n){if(void 0===a)return function(t){return c=t,a=setTimeout(g,e),u?d(t):s}(l);if(h)return clearTimeout(a),a=setTimeout(g,e),d(l)}return void 0===a&&(a=setTimeout(g,e)),s}return e=vn(e)||0,Q(n)&&(u=!!n.leading,o=(h="maxWait"in n)?yn(vn(n.maxWait)||0,e):o,f="trailing"in n?!!n.trailing:f),b.cancel=function(){void 0!==a&&clearTimeout(a),c=0,i=l=r=a=void 0},b.flush=function(){return void 0===a?s:m(ln())},b};const Sn=function(t,e,n){var i=!0,r=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return Q(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),wn(t,e,{leading:i,maxWait:e,trailing:r})};var On=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();var In=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.handleChange=function(t){"function"==typeof n.props.onChange&&n.throttle(n.props.onChange,function(t,e,n){var i=n.getBoundingClientRect(),r=i.width,o=i.height,s="number"==typeof t.pageX?t.pageX:t.touches[0].pageX,a="number"==typeof t.pageY?t.pageY:t.touches[0].pageY,l=s-(n.getBoundingClientRect().left+window.pageXOffset),c=a-(n.getBoundingClientRect().top+window.pageYOffset);l<0?l=0:l>r&&(l=r),c<0?c=0:c>o&&(c=o);var u=l/r,h=1-c/o;return{h:e.h,s:u,v:h,a:e.a,source:"hsv"}}(t,n.props.hsl,n.container),t)},n.handleMouseDown=function(t){n.handleChange(t);var e=n.getContainerRenderWindow();e.addEventListener("mousemove",n.handleChange),e.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.throttle=Sn((function(t,e,n){t(e,n)}),50),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),On(e,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var t=this.container,e=window;!e.document.contains(t)&&e.parent!==e;)e=e.parent;return e}},{key:"unbindEventListeners",value:function(){var t=this.getContainerRenderWindow();t.removeEventListener("mousemove",this.handleChange),t.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var t=this,e=this.props.style||{},n=e.color,o=e.white,s=e.black,a=e.pointer,l=e.circle,c=(0,r.Ay)({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-100*this.props.hsv.v+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:n,white:o,black:s,pointer:a,circle:l}},{custom:!!this.props.style});return i.createElement("div",{style:c.color,ref:function(e){return t.container=e},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},i.createElement("style",null,"\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n "),i.createElement("div",{style:c.white,className:"saturation-white"},i.createElement("div",{style:c.black,className:"saturation-black"}),i.createElement("div",{style:c.pointer},this.props.pointer?i.createElement(this.props.pointer,this.props):i.createElement("div",{style:c.circle}))))}}]),e}(i.PureComponent||i.Component);const kn=In;const En=function(t,e){for(var n=-1,i=null==t?0:t.length;++n<i&&!1!==e(t[n],n,t););return t};const Mn=Xt(Object.keys,Object);var Cn=Object.prototype.hasOwnProperty;const An=function(t){if(!te(t))return Mn(t);var e=[];for(var n in Object(t))Cn.call(t,n)&&"constructor"!=n&&e.push(n);return e};const jn=function(t){return ue(t)?ze(t):An(t)};const Pn=function(t,e){return function(n,i){if(null==n)return n;if(!ue(n))return t(n,i);for(var r=n.length,o=e?r:-1,s=Object(n);(e?o--:++o<r)&&!1!==i(s[o],o,s););return n}}((function(t,e){return t&&Ht(t,e,jn)}));const Tn=function(t){return"function"==typeof t?t:Ye};const Nn=function(t,e){return(le(t)?En:Pn)(t,Tn(e))};var _n=n(4519),Ln=n.n(_n),Dn=function(t){var e=0,n=0;return Nn(["r","g","b","a","h","s","l","v"],(function(i){if(t[i]&&(e+=1,isNaN(t[i])||(n+=1),"s"===i||"l"===i)){/^\d+%$/.test(t[i])&&(n+=1)}})),e===n&&t},Rn=function(t,e){var n=t.hex?Ln()(t.hex):Ln()(t),i=n.toHsl(),r=n.toHsv(),o=n.toRgb(),s=n.toHex();return 0===i.s&&(i.h=e||0,r.h=e||0),{hsl:i,hex:"000000"===s&&0===o.a?"transparent":"#"+s,rgb:o,hsv:r,oldHue:t.h||e||i.h,source:t.source}},Bn=function(t){if("transparent"===t)return!0;var e="#"===String(t).charAt(0)?1:0;return t.length!==4+e&&t.length<7+e&&Ln()(t).isValid()},Hn=function(t){if(!t)return"#fff";var e=Rn(t);return"transparent"===e.hex?"rgba(0,0,0,0.4)":(299*e.rgb.r+587*e.rgb.g+114*e.rgb.b)/1e3>=128?"#000":"#fff"},zn=function(t,e){var n=t.replace("°","");return Ln()(e+" ("+n+")")._ok},Wn=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Un=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();const Fn=function(t){var e=function(e){function n(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n);var e=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.handleChange=function(t,n){if(Dn(t)){var i=Rn(t,t.h||e.state.oldHue);e.setState(i),e.props.onChangeComplete&&e.debounce(e.props.onChangeComplete,i,n),e.props.onChange&&e.props.onChange(i,n)}},e.handleSwatchHover=function(t,n){if(Dn(t)){var i=Rn(t,t.h||e.state.oldHue);e.props.onSwatchHover&&e.props.onSwatchHover(i,n)}},e.state=Wn({},Rn(t.color,0)),e.debounce=wn((function(t,e,n){t(e,n)}),100),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,e),Un(n,[{key:"render",value:function(){var e={};return this.props.onSwatchHover&&(e.onSwatchHover=this.handleSwatchHover),i.createElement(t,Wn({},this.props,this.state,{onChange:this.handleChange},e))}}],[{key:"getDerivedStateFromProps",value:function(t,e){return Wn({},Rn(t.color,e.oldHue))}}]),n}(i.PureComponent||i.Component);return e.propTypes=Wn({},t.propTypes),e.defaultProps=Wn({},t.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),e};var Gn=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Zn=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();function Vn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var qn=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};const Yn=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var t,e,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r);for(var i=arguments.length,o=Array(i),s=0;s<i;s++)o[s]=arguments[s];return e=n=Vn(this,(t=r.__proto__||Object.getPrototypeOf(r)).call.apply(t,[this].concat(o))),n.state={focus:!1},n.handleFocus=function(){return n.setState({focus:!0})},n.handleBlur=function(){return n.setState({focus:!1})},Vn(n,e)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,n),Zn(r,[{key:"render",value:function(){return i.createElement(e,{onFocus:this.handleFocus,onBlur:this.handleBlur},i.createElement(t,Gn({},this.props,this.state)))}}]),r}(i.Component)}((function(t){var e=t.color,n=t.style,o=t.onClick,s=void 0===o?function(){}:o,a=t.onHover,l=t.title,u=void 0===l?e:l,h=t.children,f=t.focus,d=t.focusStyle,p=void 0===d?{}:d,g="transparent"===e,m=(0,r.Ay)({default:{swatch:qn({background:e,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},n,f?p:{})}}),b={};return a&&(b.onMouseOver=function(t){return a(e,t)}),i.createElement("div",qn({style:m.swatch,onClick:function(t){return s(e,t)},title:u,tabIndex:0,onKeyDown:function(t){return 13===t.keyCode&&s(e,t)}},b),h,g&&i.createElement(c,{borderRadius:m.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))}));const Jn=function(t){var e=t.direction,n=(0,r.Ay)({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===e});return i.createElement("div",{style:n.picker})};var Qn=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Xn=function(t){var e=t.rgb,n=t.hsl,o=t.width,s=t.height,a=t.onChange,l=t.direction,c=t.style,u=t.renderers,h=t.pointer,f=t.className,p=void 0===f?"":f,g=(0,r.Ay)({default:{picker:{position:"relative",width:o,height:s},alpha:{radius:"2px",style:c}}});return i.createElement("div",{style:g.picker,className:"alpha-picker "+p},i.createElement(d,Qn({},g.alpha,{rgb:e,hsl:n,pointer:h,renderers:u,onChange:a,direction:l})))};Xn.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:Jn};Fn(Xn);const $n=function(t,e){for(var n=-1,i=null==t?0:t.length,r=Array(i);++n<i;)r[n]=e(t[n],n,t);return r};const Kn=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};const ti=function(t){return this.__data__.has(t)};function ei(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Tt;++e<n;)this.add(t[e])}ei.prototype.add=ei.prototype.push=Kn,ei.prototype.has=ti;const ni=ei;const ii=function(t,e){for(var n=-1,i=null==t?0:t.length;++n<i;)if(e(t[n],n,t))return!0;return!1};const ri=function(t,e){return t.has(e)};const oi=function(t,e,n,i,r,o){var s=1&n,a=t.length,l=e.length;if(a!=l&&!(s&&l>a))return!1;var c=o.get(t),u=o.get(e);if(c&&u)return c==e&&u==t;var h=-1,f=!0,d=2&n?new ni:void 0;for(o.set(t,e),o.set(e,t);++h<a;){var p=t[h],g=e[h];if(i)var m=s?i(g,p,h,e,t,o):i(p,g,h,t,e,o);if(void 0!==m){if(m)continue;f=!1;break}if(d){if(!ii(e,(function(t,e){if(!ri(d,e)&&(p===t||r(p,t,n,i,o)))return d.push(e)}))){f=!1;break}}else if(p!==g&&!r(p,g,n,i,o)){f=!1;break}}return o.delete(t),o.delete(e),f};const si=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,i){n[++e]=[i,t]})),n};const ai=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n};var li=z?z.prototype:void 0,ci=li?li.valueOf:void 0;const ui=function(t,e,n,i,r,o,s){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new Zt(t),new Zt(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return I(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=si;case"[object Set]":var l=1&i;if(a||(a=ai),t.size!=e.size&&!l)return!1;var c=s.get(t);if(c)return c==e;i|=2,s.set(t,e);var u=oi(a(t),a(e),i,r,o,s);return s.delete(t),u;case"[object Symbol]":if(ci)return ci.call(t)==ci.call(e)}return!1};const hi=function(t,e){for(var n=-1,i=e.length,r=t.length;++n<i;)t[r+n]=e[n];return t};const fi=function(t,e,n){var i=e(t);return le(t)?i:hi(i,n(t))};const di=function(t,e){for(var n=-1,i=null==t?0:t.length,r=0,o=[];++n<i;){var s=t[n];e(s,n,t)&&(o[r++]=s)}return o};const pi=function(){return[]};var gi=Object.prototype.propertyIsEnumerable,mi=Object.getOwnPropertySymbols;const bi=mi?function(t){return null==t?[]:(t=Object(t),di(mi(t),(function(e){return gi.call(t,e)})))}:pi;const vi=function(t){return fi(t,jn,bi)};var yi=Object.prototype.hasOwnProperty;const xi=function(t,e,n,i,r,o){var s=1&n,a=vi(t),l=a.length;if(l!=vi(e).length&&!s)return!1;for(var c=l;c--;){var u=a[c];if(!(s?u in e:yi.call(e,u)))return!1}var h=o.get(t),f=o.get(e);if(h&&f)return h==e&&f==t;var d=!0;o.set(t,e),o.set(e,t);for(var p=s;++c<l;){var g=t[u=a[c]],m=e[u];if(i)var b=s?i(m,g,u,e,t,o):i(g,m,u,t,e,o);if(!(void 0===b?g===m||r(g,m,n,i,o):b)){d=!1;break}p||(p="constructor"==u)}if(d&&!p){var v=t.constructor,y=e.constructor;v==y||!("constructor"in t)||!("constructor"in e)||"function"==typeof v&&v instanceof v&&"function"==typeof y&&y instanceof y||(d=!1)}return o.delete(t),o.delete(e),d};const wi=ft(H,"DataView");const Si=ft(H,"Promise");const Oi=ft(H,"Set");const Ii=ft(H,"WeakMap");var ki="[object Map]",Ei="[object Promise]",Mi="[object Set]",Ci="[object WeakMap]",Ai="[object DataView]",ji=it(wi),Pi=it(dt),Ti=it(Si),Ni=it(Oi),_i=it(Ii),Li=J;(wi&&Li(new wi(new ArrayBuffer(1)))!=Ai||dt&&Li(new dt)!=ki||Si&&Li(Si.resolve())!=Ei||Oi&&Li(new Oi)!=Mi||Ii&&Li(new Ii)!=Ci)&&(Li=function(t){var e=J(t),n="[object Object]"==e?t.constructor:void 0,i=n?it(n):"";if(i)switch(i){case ji:return Ai;case Pi:return ki;case Ti:return Ei;case Ni:return Mi;case _i:return Ci}return e});const Di=Li;var Ri="[object Arguments]",Bi="[object Array]",Hi="[object Object]",zi=Object.prototype.hasOwnProperty;const Wi=function(t,e,n,i,r,o){var s=le(t),a=le(e),l=s?Bi:Di(t),c=a?Bi:Di(e),u=(l=l==Ri?Hi:l)==Hi,h=(c=c==Ri?Hi:c)==Hi,f=l==c;if(f&&me(t)){if(!me(e))return!1;s=!0,u=!1}if(f&&!u)return o||(o=new Lt),s||Pe(t)?oi(t,e,n,i,r,o):ui(t,e,l,n,i,r,o);if(!(1&n)){var d=u&&zi.call(t,"__wrapped__"),p=h&&zi.call(e,"__wrapped__");if(d||p){var g=d?t.value():t,m=p?e.value():e;return o||(o=new Lt),r(g,m,n,i,o)}}return!!f&&(o||(o=new Lt),xi(t,e,n,i,r,o))};const Ui=function t(e,n,i,r,o){return e===n||(null==e||null==n||!ne(e)&&!ne(n)?e!=e&&n!=n:Wi(e,n,i,r,t,o))};const Fi=function(t,e,n,i){var r=n.length,o=r,s=!i;if(null==t)return!o;for(t=Object(t);r--;){var a=n[r];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++r<o;){var l=(a=n[r])[0],c=t[l],u=a[1];if(s&&a[2]){if(void 0===c&&!(l in t))return!1}else{var h=new Lt;if(i)var f=i(c,u,l,t,e,h);if(!(void 0===f?Ui(u,c,3,i,h):f))return!1}}return!0};const Gi=function(t){return t==t&&!Q(t)};const Zi=function(t){for(var e=jn(t),n=e.length;n--;){var i=e[n],r=t[i];e[n]=[i,r,Gi(r)]}return e};const Vi=function(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}};const qi=function(t){var e=Zi(t);return 1==e.length&&e[0][2]?Vi(e[0][0],e[0][1]):function(n){return n===t||Fi(n,t,e)}};var Yi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ji=/^\w*$/;const Qi=function(t,e){if(le(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!dn(t))||(Ji.test(t)||!Yi.test(t)||null!=e&&t in Object(e))};function Xi(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var s=t.apply(this,i);return n.cache=o.set(r,s)||o,s};return n.cache=new(Xi.Cache||Tt),n}Xi.Cache=Tt;const $i=Xi;var Ki=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,tr=/\\(\\)?/g;const er=function(t){var e=$i(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Ki,(function(t,n,i,r){e.push(i?r.replace(tr,"$1"):n||t)})),e}));var nr=z?z.prototype:void 0,ir=nr?nr.toString:void 0;const rr=function t(e){if("string"==typeof e)return e;if(le(e))return $n(e,t)+"";if(dn(e))return ir?ir.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n};const or=function(t){return null==t?"":rr(t)};const sr=function(t,e){return le(t)?t:Qi(t,e)?[t]:er(or(t))};const ar=function(t){if("string"==typeof t||dn(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e};const lr=function(t,e){for(var n=0,i=(e=sr(e,t)).length;null!=t&&n<i;)t=t[ar(e[n++])];return n&&n==i?t:void 0};const cr=function(t,e,n){var i=null==t?void 0:lr(t,e);return void 0===i?n:i};const ur=function(t,e){return null!=t&&e in Object(t)};const hr=function(t,e,n){for(var i=-1,r=(e=sr(e,t)).length,o=!1;++i<r;){var s=ar(e[i]);if(!(o=null!=t&&n(t,s)))break;t=t[s]}return o||++i!=r?o:!!(r=null==t?0:t.length)&&ce(r)&&Be(s,r)&&(le(t)||ae(t))};const fr=function(t,e){return null!=t&&hr(t,e,ur)};const dr=function(t,e){return Qi(t)&&Gi(e)?Vi(ar(t),e):function(n){var i=cr(n,t);return void 0===i&&i===e?fr(n,t):Ui(e,i,3)}};const pr=function(t){return function(e){return null==e?void 0:e[t]}};const gr=function(t){return function(e){return lr(e,t)}};const mr=function(t){return Qi(t)?pr(ar(t)):gr(t)};const br=function(t){return"function"==typeof t?t:null==t?Ye:"object"==typeof t?le(t)?dr(t[0],t[1]):qi(t):mr(t)};const vr=function(t,e){var n=-1,i=ue(t)?Array(t.length):[];return Pn(t,(function(t,r,o){i[++n]=e(t,r,o)})),i};const yr=function(t,e){return(le(t)?$n:vr)(t,br(e,3))};const xr=function(t){var e=t.colors,n=t.onClick,o=t.onSwatchHover,s=(0,r.Ay)({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return i.createElement("div",{style:s.swatches},yr(e,(function(t){return i.createElement(Yn,{key:t,color:t,style:s.swatch,onClick:n,onHover:o,focusStyle:{boxShadow:"0 0 4px "+t}})})),i.createElement("div",{style:s.clear}))};var wr=function(t){var e=t.onChange,n=t.onSwatchHover,o=t.hex,s=t.colors,a=t.width,l=t.triangle,u=t.styles,h=void 0===u?{}:u,f=t.className,d=void 0===f?"":f,p="transparent"===o,g=function(t,n){Bn(t)&&e({hex:t,source:"hex"},n)},m=(0,r.Ay)(on({default:{card:{width:a,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:o,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:Hn(o),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+o+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},h),{"hide-triangle":"hide"===l});return i.createElement("div",{style:m.card,className:"block-picker "+d},i.createElement("div",{style:m.triangle}),i.createElement("div",{style:m.head},p&&i.createElement(c,{borderRadius:"6px 6px 0 0"}),i.createElement("div",{style:m.label},o)),i.createElement("div",{style:m.body},i.createElement(xr,{colors:s,onClick:g,onSwatchHover:n}),i.createElement(b,{style:{input:m.input},value:o,onChange:g})))};wr.propTypes={width:S().oneOfType([S().string,S().number]),colors:S().arrayOf(S().string),triangle:S().oneOf(["top","hide"]),styles:S().object},wr.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}};Fn(wr);var Sr={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",a100:"#ff8a80",a200:"#ff5252",a400:"#ff1744",a700:"#d50000"},Or={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",a100:"#ff80ab",a200:"#ff4081",a400:"#f50057",a700:"#c51162"},Ir={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",a100:"#ea80fc",a200:"#e040fb",a400:"#d500f9",a700:"#aa00ff"},kr={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",a100:"#b388ff",a200:"#7c4dff",a400:"#651fff",a700:"#6200ea"},Er={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",a100:"#8c9eff",a200:"#536dfe",a400:"#3d5afe",a700:"#304ffe"},Mr={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",a100:"#82b1ff",a200:"#448aff",a400:"#2979ff",a700:"#2962ff"},Cr={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",a100:"#80d8ff",a200:"#40c4ff",a400:"#00b0ff",a700:"#0091ea"},Ar={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",a100:"#84ffff",a200:"#18ffff",a400:"#00e5ff",a700:"#00b8d4"},jr={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",a100:"#a7ffeb",a200:"#64ffda",a400:"#1de9b6",a700:"#00bfa5"},Pr={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",a100:"#b9f6ca",a200:"#69f0ae",a400:"#00e676",a700:"#00c853"},Tr={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",a100:"#ccff90",a200:"#b2ff59",a400:"#76ff03",a700:"#64dd17"},Nr={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",a100:"#f4ff81",a200:"#eeff41",a400:"#c6ff00",a700:"#aeea00"},_r={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",a100:"#ffff8d",a200:"#ffff00",a400:"#ffea00",a700:"#ffd600"},Lr={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",a100:"#ffe57f",a200:"#ffd740",a400:"#ffc400",a700:"#ffab00"},Dr={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",a100:"#ffd180",a200:"#ffab40",a400:"#ff9100",a700:"#ff6d00"},Rr={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",a100:"#ff9e80",a200:"#ff6e40",a400:"#ff3d00",a700:"#dd2c00"},Br={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723"},Hr={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238"};var zr=function(t){var e=t.color,n=t.onClick,o=t.onSwatchHover,s=t.hover,a=t.active,l=t.circleSize,c=t.circleSpacing,u=(0,r.Ay)({default:{swatch:{width:l,height:l,marginRight:c,marginBottom:c,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(l/2+1)+"px "+e,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+e}}},{hover:s,active:a});return i.createElement("div",{style:u.swatch},i.createElement(Yn,{style:u.Swatch,color:e,onClick:n,onHover:o,focusStyle:{boxShadow:u.Swatch.boxShadow+", 0 0 5px "+e}}))};zr.defaultProps={circleSize:28,circleSpacing:14};const Wr=(0,r.H8)(zr);var Ur=function(t){var e=t.width,n=t.onChange,o=t.onSwatchHover,s=t.colors,a=t.hex,l=t.circleSize,c=t.styles,u=void 0===c?{}:c,h=t.circleSpacing,f=t.className,d=void 0===f?"":f,p=(0,r.Ay)(on({default:{card:{width:e,display:"flex",flexWrap:"wrap",marginRight:-h,marginBottom:-h}}},u)),g=function(t,e){return n({hex:t,source:"hex"},e)};return i.createElement("div",{style:p.card,className:"circle-picker "+d},yr(s,(function(t){return i.createElement(Wr,{key:t,color:t,onClick:g,onSwatchHover:o,active:a===t.toLowerCase(),circleSize:l,circleSpacing:h})})))};Ur.propTypes={width:S().oneOfType([S().string,S().number]),circleSize:S().number,circleSpacing:S().number,styles:S().object},Ur.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[Sr[500],Or[500],Ir[500],kr[500],Er[500],Mr[500],Cr[500],Ar[500],jr[500],Pr[500],Tr[500],Nr[500],_r[500],Lr[500],Dr[500],Rr[500],Br[500],Hr[500]],styles:{}};Fn(Ur);const Fr=function(t){return void 0===t};var Gr=n(3499),Zr=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();var Vr=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n.toggleViews=function(){"hex"===n.state.view?n.setState({view:"rgb"}):"rgb"===n.state.view?n.setState({view:"hsl"}):"hsl"===n.state.view&&(1===n.props.hsl.a?n.setState({view:"hex"}):n.setState({view:"rgb"}))},n.handleChange=function(t,e){t.hex?Bn(t.hex)&&n.props.onChange({hex:t.hex,source:"hex"},e):t.r||t.g||t.b?n.props.onChange({r:t.r||n.props.rgb.r,g:t.g||n.props.rgb.g,b:t.b||n.props.rgb.b,source:"rgb"},e):t.a?(t.a<0?t.a=0:t.a>1&&(t.a=1),n.props.onChange({h:n.props.hsl.h,s:n.props.hsl.s,l:n.props.hsl.l,a:Math.round(100*t.a)/100,source:"rgb"},e)):(t.h||t.s||t.l)&&("string"==typeof t.s&&t.s.includes("%")&&(t.s=t.s.replace("%","")),"string"==typeof t.l&&t.l.includes("%")&&(t.l=t.l.replace("%","")),1==t.s?t.s=.01:1==t.l&&(t.l=.01),n.props.onChange({h:t.h||n.props.hsl.h,s:Number(Fr(t.s)?n.props.hsl.s:t.s),l:Number(Fr(t.l)?n.props.hsl.l:t.l),source:"hsl"},e))},n.showHighlight=function(t){t.currentTarget.style.background="#eee"},n.hideHighlight=function(t){t.currentTarget.style.background="transparent"},1!==t.hsl.a&&"hex"===t.view?n.state={view:"rgb"}:n.state={view:t.view},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),Zr(e,[{key:"render",value:function(){var t=this,e=(0,r.Ay)({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),n=void 0;return"hex"===this.state.view?n=i.createElement("div",{style:e.fields,className:"flexbox-fix"},i.createElement("div",{style:e.field},i.createElement(b,{style:{input:e.input,label:e.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):"rgb"===this.state.view?n=i.createElement("div",{style:e.fields,className:"flexbox-fix"},i.createElement("div",{style:e.field},i.createElement(b,{style:{input:e.input,label:e.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),i.createElement("div",{style:e.field},i.createElement(b,{style:{input:e.input,label:e.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),i.createElement("div",{style:e.field},i.createElement(b,{style:{input:e.input,label:e.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),i.createElement("div",{style:e.alpha},i.createElement(b,{style:{input:e.input,label:e.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):"hsl"===this.state.view&&(n=i.createElement("div",{style:e.fields,className:"flexbox-fix"},i.createElement("div",{style:e.field},i.createElement(b,{style:{input:e.input,label:e.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),i.createElement("div",{style:e.field},i.createElement(b,{style:{input:e.input,label:e.label},label:"s",value:Math.round(100*this.props.hsl.s)+"%",onChange:this.handleChange})),i.createElement("div",{style:e.field},i.createElement(b,{style:{input:e.input,label:e.label},label:"l",value:Math.round(100*this.props.hsl.l)+"%",onChange:this.handleChange})),i.createElement("div",{style:e.alpha},i.createElement(b,{style:{input:e.input,label:e.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),i.createElement("div",{style:e.wrap,className:"flexbox-fix"},n,i.createElement("div",{style:e.toggle},i.createElement("div",{style:e.icon,onClick:this.toggleViews,ref:function(e){return t.icon=e}},i.createElement(Gr.A,{style:e.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(t,e){return 1!==t.hsl.a&&"hex"===e.view?{view:"rgb"}:null}}]),e}(i.Component);Vr.defaultProps={view:"hex"};const qr=Vr;const Yr=function(){var t=(0,r.Ay)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return i.createElement("div",{style:t.picker})};const Jr=function(){var t=(0,r.Ay)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return i.createElement("div",{style:t.picker})};var Qr=function(t){var e=t.width,n=t.onChange,o=t.disableAlpha,s=t.rgb,a=t.hsl,l=t.hsv,u=t.hex,h=t.renderers,f=t.styles,p=void 0===f?{}:f,g=t.className,m=void 0===g?"":g,b=t.defaultView,v=(0,r.Ay)(on({default:{picker:{width:e,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+s.r+", "+s.g+", "+s.b+", "+s.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},p),{disableAlpha:o});return i.createElement("div",{style:v.picker,className:"chrome-picker "+m},i.createElement("div",{style:v.saturation},i.createElement(kn,{style:v.Saturation,hsl:a,hsv:l,pointer:Jr,onChange:n})),i.createElement("div",{style:v.body},i.createElement("div",{style:v.controls,className:"flexbox-fix"},i.createElement("div",{style:v.color},i.createElement("div",{style:v.swatch},i.createElement("div",{style:v.active}),i.createElement(c,{renderers:h}))),i.createElement("div",{style:v.toggles},i.createElement("div",{style:v.hue},i.createElement(x,{style:v.Hue,hsl:a,pointer:Yr,onChange:n})),i.createElement("div",{style:v.alpha},i.createElement(d,{style:v.Alpha,rgb:s,hsl:a,pointer:Yr,renderers:h,onChange:n})))),i.createElement(qr,{rgb:s,hsl:a,hex:u,view:b,onChange:n,disableAlpha:o})))};Qr.propTypes={width:S().oneOfType([S().string,S().number]),disableAlpha:S().bool,styles:S().object,defaultView:S().oneOf(["hex","rgb","hsl"])},Qr.defaultProps={width:225,disableAlpha:!1,styles:{}};Fn(Qr);const Xr=function(t){var e=t.color,n=t.onClick,o=void 0===n?function(){}:n,s=t.onSwatchHover,a=t.active,l=(0,r.Ay)({default:{color:{background:e,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:Hn(e),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:a,"color-#FFFFFF":"#FFFFFF"===e,transparent:"transparent"===e});return i.createElement(Yn,{style:l.color,color:e,onClick:o,onHover:s,focusStyle:{boxShadow:"0 0 4px "+e}},i.createElement("div",{style:l.dot}))};const $r=function(t){var e=t.hex,n=t.rgb,o=t.onChange,s=(0,r.Ay)({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:e},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),a=function(t,e){t.r||t.g||t.b?o({r:t.r||n.r,g:t.g||n.g,b:t.b||n.b,source:"rgb"},e):o({hex:t.hex,source:"hex"},e)};return i.createElement("div",{style:s.fields,className:"flexbox-fix"},i.createElement("div",{style:s.active}),i.createElement(b,{style:{wrap:s.HEXwrap,input:s.HEXinput,label:s.HEXlabel},label:"hex",value:e,onChange:a}),i.createElement(b,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"r",value:n.r,onChange:a}),i.createElement(b,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"g",value:n.g,onChange:a}),i.createElement(b,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"b",value:n.b,onChange:a}))};var Kr=function(t){var e=t.onChange,n=t.onSwatchHover,o=t.colors,s=t.hex,a=t.rgb,l=t.styles,c=void 0===l?{}:l,u=t.className,h=void 0===u?"":u,f=(0,r.Ay)(on({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},c)),d=function(t,n){t.hex?Bn(t.hex)&&e({hex:t.hex,source:"hex"},n):e(t,n)};return i.createElement(an,{style:f.Compact,styles:c},i.createElement("div",{style:f.compact,className:"compact-picker "+h},i.createElement("div",null,yr(o,(function(t){return i.createElement(Xr,{key:t,color:t,active:t.toLowerCase()===s,onClick:d,onSwatchHover:n})})),i.createElement("div",{style:f.clear})),i.createElement($r,{hex:s,rgb:a,onChange:d})))};Kr.propTypes={colors:S().arrayOf(S().string),styles:S().object},Kr.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};Fn(Kr);const to=(0,r.H8)((function(t){var e=t.hover,n=t.color,o=t.onClick,s=t.onSwatchHover,a={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},l=(0,r.Ay)({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:a}},{hover:e});return i.createElement("div",{style:l.swatch},i.createElement(Yn,{color:n,onClick:o,onHover:s,focusStyle:a}))}));var eo=function(t){var e=t.width,n=t.colors,o=t.onChange,s=t.onSwatchHover,a=t.triangle,l=t.styles,c=void 0===l?{}:l,u=t.className,h=void 0===u?"":u,f=(0,r.Ay)(on({default:{card:{width:e,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},c),{"hide-triangle":"hide"===a,"top-left-triangle":"top-left"===a,"top-right-triangle":"top-right"===a,"bottom-left-triangle":"bottom-left"===a,"bottom-right-triangle":"bottom-right"===a}),d=function(t,e){return o({hex:t,source:"hex"},e)};return i.createElement("div",{style:f.card,className:"github-picker "+h},i.createElement("div",{style:f.triangleShadow}),i.createElement("div",{style:f.triangle}),yr(n,(function(t){return i.createElement(to,{color:t,key:t,onClick:d,onSwatchHover:s})})))};eo.propTypes={width:S().oneOfType([S().string,S().number]),colors:S().arrayOf(S().string),triangle:S().oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:S().object},eo.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};Fn(eo);const no=function(t){var e=t.direction,n=(0,r.Ay)({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===e});return i.createElement("div",{style:n.picker})};var io=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},ro=function(t){var e=t.width,n=t.height,o=t.onChange,s=t.hsl,a=t.direction,l=t.pointer,c=t.styles,u=void 0===c?{}:c,h=t.className,f=void 0===h?"":h,d=(0,r.Ay)(on({default:{picker:{position:"relative",width:e,height:n},hue:{radius:"2px"}}},u));return i.createElement("div",{style:d.picker,className:"hue-picker "+f},i.createElement(x,io({},d.hue,{hsl:s,pointer:l,onChange:function(t){return o({a:1,h:t.h,l:.5,s:1})},direction:a})))};ro.propTypes={styles:S().object},ro.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:no,styles:{}};Fn(ro);Fn((function(t){var e=t.onChange,n=t.hex,o=t.rgb,s=t.styles,a=void 0===s?{}:s,l=t.className,c=void 0===l?"":l,u=(0,r.Ay)(on({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+n,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},a)),h=function(t,n){t.hex?Bn(t.hex)&&e({hex:t.hex,source:"hex"},n):(t.r||t.g||t.b)&&e({r:t.r||o.r,g:t.g||o.g,b:t.b||o.b,source:"rgb"},n)};return i.createElement(an,{styles:a},i.createElement("div",{style:u.material,className:"material-picker "+c},i.createElement(b,{style:{wrap:u.HEXwrap,input:u.HEXinput,label:u.HEXlabel},label:"hex",value:n,onChange:h}),i.createElement("div",{style:u.split,className:"flexbox-fix"},i.createElement("div",{style:u.third},i.createElement(b,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"r",value:o.r,onChange:h})),i.createElement("div",{style:u.third},i.createElement(b,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"g",value:o.g,onChange:h})),i.createElement("div",{style:u.third},i.createElement(b,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"b",value:o.b,onChange:h})))))}));const oo=function(t){var e=t.onChange,n=t.rgb,o=t.hsv,s=t.hex,a=(0,r.Ay)({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",top:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),l=function(t,i){t["#"]?Bn(t["#"])&&e({hex:t["#"],source:"hex"},i):t.r||t.g||t.b?e({r:t.r||n.r,g:t.g||n.g,b:t.b||n.b,source:"rgb"},i):(t.h||t.s||t.v)&&e({h:t.h||o.h,s:t.s||o.s,v:t.v||o.v,source:"hsv"},i)};return i.createElement("div",{style:a.fields},i.createElement(b,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"h",value:Math.round(o.h),onChange:l}),i.createElement(b,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"s",value:Math.round(100*o.s),onChange:l}),i.createElement(b,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"v",value:Math.round(100*o.v),onChange:l}),i.createElement("div",{style:a.divider}),i.createElement(b,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"r",value:n.r,onChange:l}),i.createElement(b,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"g",value:n.g,onChange:l}),i.createElement(b,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"b",value:n.b,onChange:l}),i.createElement("div",{style:a.divider}),i.createElement(b,{style:{wrap:a.HEXwrap,input:a.HEXinput,label:a.HEXlabel},label:"#",value:s.replace("#",""),onChange:l}),i.createElement("div",{style:a.fieldSymbols},i.createElement("div",{style:a.symbol},"°"),i.createElement("div",{style:a.symbol},"%"),i.createElement("div",{style:a.symbol},"%")))};const so=function(t){var e=t.hsl,n=(0,r.Ay)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":e.l>.5});return i.createElement("div",{style:n.picker})};const ao=function(){var t=(0,r.Ay)({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return i.createElement("div",{style:t.pointer},i.createElement("div",{style:t.left},i.createElement("div",{style:t.leftInside})),i.createElement("div",{style:t.right},i.createElement("div",{style:t.rightInside})))};const lo=function(t){var e=t.onClick,n=t.label,o=t.children,s=t.active,a=(0,r.Ay)({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:s});return i.createElement("div",{style:a.button,onClick:e},n||o)};const co=function(t){var e=t.rgb,n=t.currentColor,o=(0,r.Ay)({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+e.r+","+e.g+", "+e.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:n,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return i.createElement("div",null,i.createElement("div",{style:o.label},"new"),i.createElement("div",{style:o.swatches},i.createElement("div",{style:o.new}),i.createElement("div",{style:o.current})),i.createElement("div",{style:o.label},"current"))};var uo=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();var ho=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n.state={currentColor:t.hex},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),uo(e,[{key:"render",value:function(){var t=this.props,e=t.styles,n=void 0===e?{}:e,o=t.className,s=void 0===o?"":o,a=(0,r.Ay)(on({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},n));return i.createElement("div",{style:a.picker,className:"photoshop-picker "+s},i.createElement("div",{style:a.head},this.props.header),i.createElement("div",{style:a.body,className:"flexbox-fix"},i.createElement("div",{style:a.saturation},i.createElement(kn,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:so,onChange:this.props.onChange})),i.createElement("div",{style:a.hue},i.createElement(x,{direction:"vertical",hsl:this.props.hsl,pointer:ao,onChange:this.props.onChange})),i.createElement("div",{style:a.controls},i.createElement("div",{style:a.top,className:"flexbox-fix"},i.createElement("div",{style:a.previews},i.createElement(co,{rgb:this.props.rgb,currentColor:this.state.currentColor})),i.createElement("div",{style:a.actions},i.createElement(lo,{label:"OK",onClick:this.props.onAccept,active:!0}),i.createElement(lo,{label:"Cancel",onClick:this.props.onCancel}),i.createElement(oo,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),e}(i.Component);ho.propTypes={header:S().string,styles:S().object},ho.defaultProps={header:"Color Picker",styles:{}};Fn(ho);const fo=function(t){var e=t.onChange,n=t.rgb,o=t.hsl,s=t.hex,a=t.disableAlpha,l=(0,r.Ay)({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:a}),c=function(t,i){t.hex?Bn(t.hex)&&e({hex:t.hex,source:"hex"},i):t.r||t.g||t.b?e({r:t.r||n.r,g:t.g||n.g,b:t.b||n.b,a:n.a,source:"rgb"},i):t.a&&(t.a<0?t.a=0:t.a>100&&(t.a=100),t.a/=100,e({h:o.h,s:o.s,l:o.l,a:t.a,source:"rgb"},i))};return i.createElement("div",{style:l.fields,className:"flexbox-fix"},i.createElement("div",{style:l.double},i.createElement(b,{style:{input:l.input,label:l.label},label:"hex",value:s.replace("#",""),onChange:c})),i.createElement("div",{style:l.single},i.createElement(b,{style:{input:l.input,label:l.label},label:"r",value:n.r,onChange:c,dragLabel:"true",dragMax:"255"})),i.createElement("div",{style:l.single},i.createElement(b,{style:{input:l.input,label:l.label},label:"g",value:n.g,onChange:c,dragLabel:"true",dragMax:"255"})),i.createElement("div",{style:l.single},i.createElement(b,{style:{input:l.input,label:l.label},label:"b",value:n.b,onChange:c,dragLabel:"true",dragMax:"255"})),i.createElement("div",{style:l.alpha},i.createElement(b,{style:{input:l.input,label:l.label},label:"a",value:Math.round(100*n.a),onChange:c,dragLabel:"true",dragMax:"100"})))};var po=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},go=function(t){var e=t.colors,n=t.onClick,o=void 0===n?function(){}:n,s=t.onSwatchHover,a=(0,r.Ay)({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!e||!e.length}),l=function(t,e){o({hex:t,source:"hex"},e)};return i.createElement("div",{style:a.colors,className:"flexbox-fix"},e.map((function(t){var e="string"==typeof t?{color:t}:t,n=""+e.color+(e.title||"");return i.createElement("div",{key:n,style:a.swatchWrap},i.createElement(Yn,po({},e,{style:a.swatch,onClick:l,onHover:s,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+e.color}})))})))};go.propTypes={colors:S().arrayOf(S().oneOfType([S().string,S().shape({color:S().string,title:S().string})])).isRequired};const mo=go;var bo=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},vo=function(t){var e=t.width,n=t.rgb,o=t.hex,s=t.hsv,a=t.hsl,l=t.onChange,u=t.onSwatchHover,h=t.disableAlpha,f=t.presetColors,p=t.renderers,g=t.styles,m=void 0===g?{}:g,b=t.className,v=void 0===b?"":b,y=(0,r.Ay)(on({default:bo({picker:{width:e,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},m),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},m),{disableAlpha:h});return i.createElement("div",{style:y.picker,className:"sketch-picker "+v},i.createElement("div",{style:y.saturation},i.createElement(kn,{style:y.Saturation,hsl:a,hsv:s,onChange:l})),i.createElement("div",{style:y.controls,className:"flexbox-fix"},i.createElement("div",{style:y.sliders},i.createElement("div",{style:y.hue},i.createElement(x,{style:y.Hue,hsl:a,onChange:l})),i.createElement("div",{style:y.alpha},i.createElement(d,{style:y.Alpha,rgb:n,hsl:a,renderers:p,onChange:l}))),i.createElement("div",{style:y.color},i.createElement(c,null),i.createElement("div",{style:y.activeColor}))),i.createElement(fo,{rgb:n,hsl:a,hex:o,onChange:l,disableAlpha:h}),i.createElement(mo,{colors:f,onClick:l,onSwatchHover:u}))};vo.propTypes={disableAlpha:S().bool,width:S().oneOfType([S().string,S().number]),styles:S().object},vo.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]};const yo=Fn(vo);const xo=function(t){var e=t.hsl,n=t.offset,o=t.onClick,s=void 0===o?function(){}:o,a=t.active,l=t.first,c=t.last,u=(0,r.Ay)({default:{swatch:{height:"12px",background:"hsl("+e.h+", 50%, "+100*n+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:a,first:l,last:c});return i.createElement("div",{style:u.swatch,onClick:function(t){return s({h:e.h,s:.5,l:n,source:"hsl"},t)}})};const wo=function(t){var e=t.onClick,n=t.hsl,o=(0,r.Ay)({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}}),s=.1;return i.createElement("div",{style:o.swatches},i.createElement("div",{style:o.swatch},i.createElement(xo,{hsl:n,offset:".80",active:Math.abs(n.l-.8)<s&&Math.abs(n.s-.5)<s,onClick:e,first:!0})),i.createElement("div",{style:o.swatch},i.createElement(xo,{hsl:n,offset:".65",active:Math.abs(n.l-.65)<s&&Math.abs(n.s-.5)<s,onClick:e})),i.createElement("div",{style:o.swatch},i.createElement(xo,{hsl:n,offset:".50",active:Math.abs(n.l-.5)<s&&Math.abs(n.s-.5)<s,onClick:e})),i.createElement("div",{style:o.swatch},i.createElement(xo,{hsl:n,offset:".35",active:Math.abs(n.l-.35)<s&&Math.abs(n.s-.5)<s,onClick:e})),i.createElement("div",{style:o.swatch},i.createElement(xo,{hsl:n,offset:".20",active:Math.abs(n.l-.2)<s&&Math.abs(n.s-.5)<s,onClick:e,last:!0})),i.createElement("div",{style:o.clear}))};const So=function(){var t=(0,r.Ay)({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return i.createElement("div",{style:t.picker})};var Oo=function(t){var e=t.hsl,n=t.onChange,o=t.pointer,s=t.styles,a=void 0===s?{}:s,l=t.className,c=void 0===l?"":l,u=(0,r.Ay)(on({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},a));return i.createElement("div",{style:u.wrap||{},className:"slider-picker "+c},i.createElement("div",{style:u.hue},i.createElement(x,{style:u.Hue,hsl:e,pointer:o,onChange:n})),i.createElement("div",{style:u.swatches},i.createElement(wo,{hsl:e,onClick:n})))};Oo.propTypes={styles:S().object},Oo.defaultProps={pointer:So,styles:{}};Fn(Oo);var Io=n(4694);const ko=function(t){var e=t.color,n=t.onClick,o=void 0===n?function(){}:n,s=t.onSwatchHover,a=t.first,l=t.last,c=t.active,u=(0,r.Ay)({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:e,marginBottom:"1px"},check:{color:Hn(e),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:a,last:l,active:c,"color-#FFFFFF":"#FFFFFF"===e,transparent:"transparent"===e});return i.createElement(Yn,{color:e,style:u.color,onClick:o,onHover:s,focusStyle:{boxShadow:"0 0 4px "+e}},i.createElement("div",{style:u.check},i.createElement(Io.A,null)))};const Eo=function(t){var e=t.onClick,n=t.onSwatchHover,o=t.group,s=t.active,a=(0,r.Ay)({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return i.createElement("div",{style:a.group},yr(o,(function(t,r){return i.createElement(ko,{key:t,color:t,active:t.toLowerCase()===s,first:0===r,last:r===o.length-1,onClick:e,onSwatchHover:n})})))};var Mo=function(t){var e=t.width,n=t.height,o=t.onChange,s=t.onSwatchHover,a=t.colors,l=t.hex,c=t.styles,u=void 0===c?{}:c,h=t.className,f=void 0===h?"":h,d=(0,r.Ay)(on({default:{picker:{width:e,height:n},overflow:{height:n,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},u)),p=function(t,e){return o({hex:t,source:"hex"},e)};return i.createElement("div",{style:d.picker,className:"swatches-picker "+f},i.createElement(an,null,i.createElement("div",{style:d.overflow},i.createElement("div",{style:d.body},yr(a,(function(t){return i.createElement(Eo,{key:t.toString(),group:t,active:l,onClick:p,onSwatchHover:s})})),i.createElement("div",{style:d.clear})))))};Mo.propTypes={width:S().oneOfType([S().string,S().number]),height:S().oneOfType([S().string,S().number]),colors:S().arrayOf(S().arrayOf(S().string)),styles:S().object},Mo.defaultProps={width:320,height:240,colors:[[Sr[900],Sr[700],Sr[500],Sr[300],Sr[100]],[Or[900],Or[700],Or[500],Or[300],Or[100]],[Ir[900],Ir[700],Ir[500],Ir[300],Ir[100]],[kr[900],kr[700],kr[500],kr[300],kr[100]],[Er[900],Er[700],Er[500],Er[300],Er[100]],[Mr[900],Mr[700],Mr[500],Mr[300],Mr[100]],[Cr[900],Cr[700],Cr[500],Cr[300],Cr[100]],[Ar[900],Ar[700],Ar[500],Ar[300],Ar[100]],[jr[900],jr[700],jr[500],jr[300],jr[100]],["#194D33",Pr[700],Pr[500],Pr[300],Pr[100]],[Tr[900],Tr[700],Tr[500],Tr[300],Tr[100]],[Nr[900],Nr[700],Nr[500],Nr[300],Nr[100]],[_r[900],_r[700],_r[500],_r[300],_r[100]],[Lr[900],Lr[700],Lr[500],Lr[300],Lr[100]],[Dr[900],Dr[700],Dr[500],Dr[300],Dr[100]],[Rr[900],Rr[700],Rr[500],Rr[300],Rr[100]],[Br[900],Br[700],Br[500],Br[300],Br[100]],[Hr[900],Hr[700],Hr[500],Hr[300],Hr[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};Fn(Mo);var Co=function(t){var e=t.onChange,n=t.onSwatchHover,o=t.hex,s=t.colors,a=t.width,l=t.triangle,c=t.styles,u=void 0===c?{}:c,h=t.className,f=void 0===h?"":h,d=(0,r.Ay)(on({default:{card:{width:a,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},u),{"hide-triangle":"hide"===l,"top-left-triangle":"top-left"===l,"top-right-triangle":"top-right"===l}),p=function(t,n){Bn(t)&&e({hex:t,source:"hex"},n)};return i.createElement("div",{style:d.card,className:"twitter-picker "+f},i.createElement("div",{style:d.triangleShadow}),i.createElement("div",{style:d.triangle}),i.createElement("div",{style:d.body},yr(s,(function(t,e){return i.createElement(Yn,{key:e,color:t,hex:t,style:d.swatch,onClick:p,onHover:n,focusStyle:{boxShadow:"0 0 4px "+t}})})),i.createElement("div",{style:d.hash},"#"),i.createElement(b,{label:null,style:{input:d.input},value:o.replace("#",""),onChange:p}),i.createElement("div",{style:d.clear})))};Co.propTypes={width:S().oneOfType([S().string,S().number]),triangle:S().oneOf(["hide","top-left","top-right"]),colors:S().arrayOf(S().string),styles:S().object},Co.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};Fn(Co);var Ao=function(t){var e=(0,r.Ay)({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(t.hsl.h)+", "+Math.round(100*t.hsl.s)+"%, "+Math.round(100*t.hsl.l)+"%)"}}});return i.createElement("div",{style:e.picker})};Ao.propTypes={hsl:S().shape({h:S().number,s:S().number,l:S().number,a:S().number})},Ao.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};const jo=Ao;var Po=function(t){var e=(0,r.Ay)({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(t.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return i.createElement("div",{style:e.picker})};Po.propTypes={hsl:S().shape({h:S().number,s:S().number,l:S().number,a:S().number})},Po.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};const To=Po;const No=function(t){var e=t.onChange,n=t.rgb,o=t.hsl,s=t.hex,a=t.hsv,l=function(t,n){if(t.hex)Bn(t.hex)&&e({hex:t.hex,source:"hex"},n);else if(t.rgb){var i=t.rgb.split(",");zn(t.rgb,"rgb")&&e({r:i[0],g:i[1],b:i[2],a:1,source:"rgb"},n)}else if(t.hsv){var r=t.hsv.split(",");zn(t.hsv,"hsv")&&(r[2]=r[2].replace("%",""),r[1]=r[1].replace("%",""),r[0]=r[0].replace("°",""),1==r[1]?r[1]=.01:1==r[2]&&(r[2]=.01),e({h:Number(r[0]),s:Number(r[1]),v:Number(r[2]),source:"hsv"},n))}else if(t.hsl){var o=t.hsl.split(",");zn(t.hsl,"hsl")&&(o[2]=o[2].replace("%",""),o[1]=o[1].replace("%",""),o[0]=o[0].replace("°",""),1==f[1]?f[1]=.01:1==f[2]&&(f[2]=.01),e({h:Number(o[0]),s:Number(o[1]),v:Number(o[2]),source:"hsl"},n))}},c=(0,r.Ay)({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),u=n.r+", "+n.g+", "+n.b,h=Math.round(o.h)+"°, "+Math.round(100*o.s)+"%, "+Math.round(100*o.l)+"%",f=Math.round(a.h)+"°, "+Math.round(100*a.s)+"%, "+Math.round(100*a.v)+"%";return i.createElement("div",{style:c.wrap,className:"flexbox-fix"},i.createElement("div",{style:c.fields},i.createElement("div",{style:c.double},i.createElement(b,{style:{input:c.input,label:c.label},label:"hex",value:s,onChange:l})),i.createElement("div",{style:c.column},i.createElement("div",{style:c.single},i.createElement(b,{style:{input:c.input2,label:c.label2},label:"rgb",value:u,onChange:l})),i.createElement("div",{style:c.single},i.createElement(b,{style:{input:c.input2,label:c.label2},label:"hsv",value:f,onChange:l})),i.createElement("div",{style:c.single},i.createElement(b,{style:{input:c.input2,label:c.label2},label:"hsl",value:h,onChange:l})))))};var _o=function(t){var e=t.width,n=t.onChange,o=t.rgb,s=t.hsl,a=t.hsv,l=t.hex,c=t.header,u=t.styles,h=void 0===u?{}:u,f=t.className,d=void 0===f?"":f,p=(0,r.Ay)(on({default:{picker:{width:e,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+o.r+", "+o.g+", "+o.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},h));return i.createElement("div",{style:p.picker,className:"google-picker "+d},i.createElement("div",{style:p.head},c),i.createElement("div",{style:p.swatch}),i.createElement("div",{style:p.saturation},i.createElement(kn,{hsl:s,hsv:a,pointer:jo,onChange:n})),i.createElement("div",{style:p.body},i.createElement("div",{style:p.controls,className:"flexbox-fix"},i.createElement("div",{style:p.hue},i.createElement(x,{style:p.Hue,hsl:s,radius:"4px",pointer:To,onChange:n}))),i.createElement(No,{rgb:o,hsl:s,hex:l,hsv:a,onChange:n})))};_o.propTypes={width:S().oneOfType([S().string,S().number]),styles:S().object,header:S().string},_o.defaultProps={width:652,styles:{},header:"Color picker"};Fn(_o)},5922:(t,e,n)=>{"use strict";var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(7810),s=l(o),a=l(n(5826));function l(t){return t&&t.__esModule?t:{default:t}}var c={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},u=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],h=function(t,e){e.style.fontSize=t.fontSize,e.style.fontFamily=t.fontFamily,e.style.fontWeight=t.fontWeight,e.style.fontStyle=t.fontStyle,e.style.letterSpacing=t.letterSpacing,e.style.textTransform=t.textTransform},f=!("undefined"==typeof window||!window.navigator)&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),d=function(){return f?"_"+Math.random().toString(36).substr(2,12):void 0},p=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.inputRef=function(t){n.input=t,"function"==typeof n.props.inputRef&&n.props.inputRef(t)},n.placeHolderSizerRef=function(t){n.placeHolderSizer=t},n.sizerRef=function(t){n.sizer=t},n.state={inputWidth:t.minWidth,inputId:t.id||d(),prevId:t.id},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,null,[{key:"getDerivedStateFromProps",value:function(t,e){var n=t.id;return n!==e.prevId?{inputId:n||d(),prevId:n}:null}}]),r(e,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"componentDidUpdate",value:function(t,e){e.inputWidth!==this.state.inputWidth&&"function"==typeof this.props.onAutosize&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(this.mounted&&window.getComputedStyle){var t=this.input&&window.getComputedStyle(this.input);t&&(h(t,this.sizer),this.placeHolderSizer&&h(t,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&void 0!==this.sizer.scrollWidth){var t=void 0;t=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:this.sizer.scrollWidth+2,(t+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0)<this.props.minWidth&&(t=this.props.minWidth),t!==this.state.inputWidth&&this.setState({inputWidth:t})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var t=this.props.injectStyles;return f&&t?s.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var t=[this.props.defaultValue,this.props.value,""].reduce((function(t,e){return null!=t?t:e})),e=i({},this.props.style);e.display||(e.display="inline-block");var n=i({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),r=function(t,e){var n={};for(var i in t)e.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(this.props,[]);return function(t){u.forEach((function(e){return delete t[e]}))}(r),r.className=this.props.inputClassName,r.id=this.state.inputId,r.style=n,s.default.createElement("div",{className:this.props.className,style:e},this.renderStyles(),s.default.createElement("input",i({},r,{ref:this.inputRef})),s.default.createElement("div",{ref:this.sizerRef,style:c},t),this.props.placeholder?s.default.createElement("div",{ref:this.placeHolderSizerRef,style:c},this.props.placeholder):null)}}]),e}(o.Component);p.propTypes={className:a.default.string,defaultValue:a.default.any,extraWidth:a.default.oneOfType([a.default.number,a.default.string]),id:a.default.string,injectStyles:a.default.bool,inputClassName:a.default.string,inputRef:a.default.func,inputStyle:a.default.object,minWidth:a.default.oneOfType([a.default.number,a.default.string]),onAutosize:a.default.func,onChange:a.default.func,placeholder:a.default.string,placeholderIsMinWidth:a.default.bool,style:a.default.object,value:a.default.any},p.defaultProps={minWidth:1,injectStyles:!0},e.A=p},6698:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},i(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},o.apply(this,arguments)},s=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var i=Array(t),r=0;for(e=0;e<n;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,r++)i[r]=o[s];return i},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},l=a(n(7810)),c=a(n(2483)),u=a(n(1470)),h=a(n(3948)),f=function(t){function e(e){var n=t.call(this,e)||this;n.dirtyProps=["modules","formats","bounds","theme","children"],n.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],n.state={generation:0},n.selection=null,n.onEditorChange=function(t,e,i,r){var o,s,a,l;"text-change"===t?null===(s=(o=n).onEditorChangeText)||void 0===s||s.call(o,n.editor.root.innerHTML,e,r,n.unprivilegedEditor):"selection-change"===t&&(null===(l=(a=n).onEditorChangeSelection)||void 0===l||l.call(a,e,r,n.unprivilegedEditor))};var i=n.isControlled()?e.value:e.defaultValue;return n.value=null!=i?i:"",n}return r(e,t),e.prototype.validateProps=function(t){var e;if(l.default.Children.count(t.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(l.default.Children.count(t.children)&&"textarea"===(null===(e=l.default.Children.only(t.children))||void 0===e?void 0:e.type))throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.");if(this.lastDeltaChangeSet&&t.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")},e.prototype.shouldComponentUpdate=function(t,e){var n,i=this;if(this.validateProps(t),!this.editor||this.state.generation!==e.generation)return!0;if("value"in t){var r=this.getEditorContents(),o=null!=(n=t.value)?n:"";this.isEqualValue(o,r)||this.setEditorContents(this.editor,o)}return t.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,t.readOnly),s(this.cleanProps,this.dirtyProps).some((function(e){return!u.default(t[e],i.props[e])}))},e.prototype.shouldComponentRegenerate=function(t){var e=this;return this.dirtyProps.some((function(n){return!u.default(t[n],e.props[n])}))},e.prototype.componentDidMount=function(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())},e.prototype.componentWillUnmount=function(){this.destroyEditor()},e.prototype.componentDidUpdate=function(t,e){var n=this;if(this.editor&&this.shouldComponentRegenerate(t)){var i=this.editor.getContents(),r=this.editor.getSelection();this.regenerationSnapshot={delta:i,selection:r},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==e.generation){var o=this.regenerationSnapshot,s=(i=o.delta,o.selection);delete this.regenerationSnapshot,this.instantiateEditor();var a=this.editor;a.setContents(i),d((function(){return n.setEditorSelection(a,s)}))}},e.prototype.instantiateEditor=function(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())},e.prototype.destroyEditor=function(){this.editor&&this.unhookEditor(this.editor)},e.prototype.isControlled=function(){return"value"in this.props},e.prototype.getEditorConfig=function(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,scrollingContainer:this.props.scrollingContainer,tabIndex:this.props.tabIndex,theme:this.props.theme}},e.prototype.getEditor=function(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor},e.prototype.createEditor=function(t,e){var n=new h.default(t,e);return null!=e.tabIndex&&this.setEditorTabIndex(n,e.tabIndex),this.hookEditor(n),n},e.prototype.hookEditor=function(t){this.unprivilegedEditor=this.makeUnprivilegedEditor(t),t.on("editor-change",this.onEditorChange)},e.prototype.unhookEditor=function(t){t.off("editor-change",this.onEditorChange)},e.prototype.getEditorContents=function(){return this.value},e.prototype.getEditorSelection=function(){return this.selection},e.prototype.isDelta=function(t){return t&&t.ops},e.prototype.isEqualValue=function(t,e){return this.isDelta(t)&&this.isDelta(e)?u.default(t.ops,e.ops):u.default(t,e)},e.prototype.setEditorContents=function(t,e){var n=this;this.value=e;var i=this.getEditorSelection();"string"==typeof e?t.setContents(t.clipboard.convert(e)):t.setContents(e),d((function(){return n.setEditorSelection(t,i)}))},e.prototype.setEditorSelection=function(t,e){if(this.selection=e,e){var n=t.getLength();e.index=Math.max(0,Math.min(e.index,n-1)),e.length=Math.max(0,Math.min(e.length,n-1-e.index)),t.setSelection(e)}},e.prototype.setEditorTabIndex=function(t,e){var n,i;(null===(i=null===(n=t)||void 0===n?void 0:n.scroll)||void 0===i?void 0:i.domNode)&&(t.scroll.domNode.tabIndex=e)},e.prototype.setEditorReadOnly=function(t,e){e?t.disable():t.enable()},e.prototype.makeUnprivilegedEditor=function(t){var e=t;return{getHTML:function(){return e.root.innerHTML},getLength:e.getLength.bind(e),getText:e.getText.bind(e),getContents:e.getContents.bind(e),getSelection:e.getSelection.bind(e),getBounds:e.getBounds.bind(e)}},e.prototype.getEditingArea=function(){if(!this.editingArea)throw new Error("Instantiating on missing editing area");var t=c.default.findDOMNode(this.editingArea);if(!t)throw new Error("Cannot find element for editing area");if(3===t.nodeType)throw new Error("Editing area cannot be a text node");return t},e.prototype.renderEditingArea=function(){var t=this,e=this.props,n=e.children,i=e.preserveWhitespace,r={key:this.state.generation,ref:function(e){t.editingArea=e}};return l.default.Children.count(n)?l.default.cloneElement(l.default.Children.only(n),r):i?l.default.createElement("pre",o({},r)):l.default.createElement("div",o({},r))},e.prototype.render=function(){var t;return l.default.createElement("div",{id:this.props.id,style:this.props.style,key:this.state.generation,className:"quill "+(t=this.props.className,null!=t?t:""),onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())},e.prototype.onEditorChangeText=function(t,e,n,i){var r,o;if(this.editor){var s=this.isDelta(this.value)?i.getContents():i.getHTML();s!==this.getEditorContents()&&(this.lastDeltaChangeSet=e,this.value=s,null===(o=(r=this.props).onChange)||void 0===o||o.call(r,t,e,n,i))}},e.prototype.onEditorChangeSelection=function(t,e,n){var i,r,o,s,a,l;if(this.editor){var c=this.getEditorSelection(),h=!c&&t,f=c&&!t;u.default(t,c)||(this.selection=t,null===(r=(i=this.props).onChangeSelection)||void 0===r||r.call(i,t,e,n),h?null===(s=(o=this.props).onFocus)||void 0===s||s.call(o,t,e,n):f&&(null===(l=(a=this.props).onBlur)||void 0===l||l.call(a,c,e,n)))}},e.prototype.focus=function(){this.editor&&this.editor.focus()},e.prototype.blur=function(){this.editor&&(this.selection=null,this.editor.blur())},e.displayName="React Quill",e.Quill=h.default,e.defaultProps={theme:"snow",modules:{},readOnly:!1},e}(l.default.Component);function d(t){Promise.resolve().then(t)}t.exports=f},5191:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=s(n(7810)),o=s(n(5489));function s(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"render",value:function(){return r.default.createElement("button",this.props,this.props.children)}}]),e}(r.default.Component);e.default=(0,o.default)(a)},675:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=l(n(7810)),s=l(n(2929)),a=l(n(5826));function l(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"render",value:function(){var t=this,e=i({},this.props);return delete e.name,e.parentBindings&&delete e.parentBindings,o.default.createElement("div",i({},e,{ref:function(e){t.props.parentBindings.domNode=e}}),this.props.children)}}]),e}(o.default.Component);c.propTypes={name:a.default.string,id:a.default.string},e.default=(0,s.default)(c)},7755:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(n(7810)),r=o(n(5489));function o(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var a=function(t){function e(){var t,n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var o=arguments.length,a=Array(o),l=0;l<o;l++)a[l]=arguments[l];return n=r=s(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(a))),r.render=function(){return i.default.createElement("a",r.props,r.props.children)},s(r,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(i.default.Component);e.default=(0,r.default)(a)},6502:(t,e,n)=>{"use strict";e.Nk=e.XG=e.Hg=e.N_=void 0;var i=d(n(7755)),r=d(n(5191)),o=d(n(675)),s=d(n(6203)),a=d(n(568)),l=d(n(6307)),c=d(n(7698)),u=d(n(5489)),h=d(n(2929)),f=d(n(7328));function d(t){return t&&t.__esModule?t:{default:t}}e.N_=i.default,r.default,e.Hg=o.default,e.XG=s.default,a.default,l.default,e.Nk=c.default,u.default,h.default,f.default,i.default,r.default,o.default,s.default,a.default,l.default,c.default,u.default,h.default,f.default},7328:(t,e,n)=>{"use strict";var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var l=n(7810),c=(n(2483),n(4768),n(6307)),u=n(6203),h=n(5826),f=n(2309),d={to:h.string.isRequired,containerId:h.string,container:h.object,activeClass:h.string,spy:h.bool,smooth:h.oneOfType([h.bool,h.string]),offset:h.number,delay:h.number,isDynamic:h.bool,onClick:h.func,duration:h.oneOfType([h.number,h.func]),absolute:h.bool,onSetActive:h.func,onSetInactive:h.func,ignoreCancelEvents:h.bool,hashSpy:h.bool,spyThrottle:h.number},p={Scroll:function(t,e){console.warn("Helpers.Scroll is deprecated since v1.7.0");var n=e||u,h=function(e){function u(t){o(this,u);var e=s(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,t));return p.call(e),e.state={active:!1},e}return a(u,e),r(u,[{key:"getScrollSpyContainer",value:function(){var t=this.props.containerId,e=this.props.container;return t?document.getElementById(t):e&&e.nodeType?e:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var t=this.getScrollSpyContainer();c.isMounted(t)||c.mount(t,this.props.spyThrottle),this.props.hashSpy&&(f.isMounted()||f.mount(n),f.mapContainer(this.props.to,t)),this.props.spy&&c.addStateHandler(this.stateHandler),c.addSpyHandler(this.spyHandler,t),this.setState({container:t})}}},{key:"componentWillUnmount",value:function(){c.unmount(this.stateHandler,this.spyHandler)}},{key:"render",value:function(){var e="";e=this.state&&this.state.active?((this.props.className||"")+" "+(this.props.activeClass||"active")).trim():this.props.className;var n=i({},this.props);for(var r in d)n.hasOwnProperty(r)&&delete n[r];return n.className=e,n.onClick=this.handleClick,l.createElement(t,n)}}]),u}(l.Component),p=function(){var t=this;this.scrollTo=function(e,r){n.scrollTo(e,i({},t.state,r))},this.handleClick=function(e){t.props.onClick&&t.props.onClick(e),e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),t.scrollTo(t.props.to,t.props)},this.stateHandler=function(){n.getActiveLink()!==t.props.to&&(null!==t.state&&t.state.active&&t.props.onSetInactive&&t.props.onSetInactive(),t.setState({active:!1}))},this.spyHandler=function(e){var i=t.getScrollSpyContainer();if(!f.isMounted()||f.isInitialized()){var r=t.props.to,o=null,s=0,a=0,l=0;if(i.getBoundingClientRect)l=i.getBoundingClientRect().top;if(!o||t.props.isDynamic){if(!(o=n.get(r)))return;var u=o.getBoundingClientRect();a=(s=u.top-l+e)+u.height}var h=e-t.props.offset,d=h>=Math.floor(s)&&h<Math.floor(a),p=h<Math.floor(s)||h>=Math.floor(a),g=n.getActiveLink();return p?(r===g&&n.setActiveLink(void 0),t.props.hashSpy&&f.getHash()===r&&f.changeHash(),t.props.spy&&t.state.active&&(t.setState({active:!1}),t.props.onSetInactive&&t.props.onSetInactive()),c.updateStates()):d&&g!==r?(n.setActiveLink(r),t.props.hashSpy&&f.changeHash(r),t.props.spy&&(t.setState({active:!0}),t.props.onSetActive&&t.props.onSetActive(r)),c.updateStates()):void 0}}};return h.propTypes=d,h.defaultProps={offset:0},h},Element:function(t){console.warn("Helpers.Element is deprecated since v1.7.0");var e=function(e){function n(t){o(this,n);var e=s(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t));return e.childBindings={domNode:null},e}return a(n,e),r(n,[{key:"componentDidMount",value:function(){if("undefined"==typeof window)return!1;this.registerElems(this.props.name)}},{key:"componentDidUpdate",value:function(t){this.props.name!==t.name&&this.registerElems(this.props.name)}},{key:"componentWillUnmount",value:function(){if("undefined"==typeof window)return!1;u.unregister(this.props.name)}},{key:"registerElems",value:function(t){u.register(t,this.childBindings.domNode)}},{key:"render",value:function(){return l.createElement(t,i({},this.props,{parentBindings:this.childBindings}))}}]),n}(l.Component);return e.propTypes={name:h.string,id:h.string},e}};t.exports=p},7698:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=(a(n(4768)),a(n(8887))),o=a(n(7385)),s=a(n(568));function a(t){return t&&t.__esModule?t:{default:t}}var l=function(t){return r.default[t.smooth]||r.default.defaultEasing},c=function(){if("undefined"!=typeof window)return window.requestAnimationFrame||window.webkitRequestAnimationFrame}()||function(t,e,n){window.setTimeout(t,n||1e3/60,(new Date).getTime())},u=function(t){var e=t.data.containerElement;if(e&&e!==document&&e!==document.body)return e.scrollLeft;var n=void 0!==window.pageXOffset,i="CSS1Compat"===(document.compatMode||"");return n?window.pageXOffset:i?document.documentElement.scrollLeft:document.body.scrollLeft},h=function(t){var e=t.data.containerElement;if(e&&e!==document&&e!==document.body)return e.scrollTop;var n=void 0!==window.pageXOffset,i="CSS1Compat"===(document.compatMode||"");return n?window.pageYOffset:i?document.documentElement.scrollTop:document.body.scrollTop},f=function t(e,n,i){var r=n.data;if(n.ignoreCancelEvents||!r.cancel)if(r.delta=Math.round(r.targetPosition-r.startPosition),null===r.start&&(r.start=i),r.progress=i-r.start,r.percent=r.progress>=r.duration?1:e(r.progress/r.duration),r.currentPosition=r.startPosition+Math.ceil(r.delta*r.percent),r.containerElement&&r.containerElement!==document&&r.containerElement!==document.body?n.horizontal?r.containerElement.scrollLeft=r.currentPosition:r.containerElement.scrollTop=r.currentPosition:n.horizontal?window.scrollTo(r.currentPosition,0):window.scrollTo(0,r.currentPosition),r.percent<1){var o=t.bind(null,e,n);c.call(window,o)}else s.default.registered.end&&s.default.registered.end(r.to,r.target,r.currentPosition);else s.default.registered.end&&s.default.registered.end(r.to,r.target,r.currentPositionY)},d=function(t){t.data.containerElement=t?t.containerId?document.getElementById(t.containerId):t.container&&t.container.nodeType?t.container:document:null},p=function(t,e,n,i){e.data=e.data||{currentPosition:0,startPosition:0,targetPosition:0,progress:0,duration:0,cancel:!1,target:null,containerElement:null,to:null,start:null,delta:null,percent:null,delayTimeout:null},window.clearTimeout(e.data.delayTimeout);if(o.default.subscribe((function(){e.data.cancel=!0})),d(e),e.data.start=null,e.data.cancel=!1,e.data.startPosition=e.horizontal?u(e):h(e),e.data.targetPosition=e.absolute?t:t+e.data.startPosition,e.data.startPosition!==e.data.targetPosition){var r;e.data.delta=Math.round(e.data.targetPosition-e.data.startPosition),e.data.duration=("function"==typeof(r=e.duration)?r:function(){return r})(e.data.delta),e.data.duration=isNaN(parseFloat(e.data.duration))?1e3:parseFloat(e.data.duration),e.data.to=n,e.data.target=i;var a=l(e),p=f.bind(null,a,e);e&&e.delay>0?e.data.delayTimeout=window.setTimeout((function(){s.default.registered.begin&&s.default.registered.begin(e.data.to,e.data.target),c.call(window,p)}),e.delay):(s.default.registered.begin&&s.default.registered.begin(e.data.to,e.data.target),c.call(window,p))}else s.default.registered.end&&s.default.registered.end(e.data.to,e.data.target,e.data.currentPosition)},g=function(t){return(t=i({},t)).data=t.data||{currentPosition:0,startPosition:0,targetPosition:0,progress:0,duration:0,cancel:!1,target:null,containerElement:null,to:null,start:null,delta:null,percent:null,delayTimeout:null},t.absolute=!0,t};e.default={animateTopScroll:p,getAnimationType:l,scrollToTop:function(t){p(0,g(t))},scrollToBottom:function(t){t=g(t),d(t),p(t.horizontal?function(t){var e=t.data.containerElement;if(e&&e!==document&&e!==document.body)return e.scrollWidth-e.offsetWidth;var n=document.body,i=document.documentElement;return Math.max(n.scrollWidth,n.offsetWidth,i.clientWidth,i.scrollWidth,i.offsetWidth)}(t):function(t){var e=t.data.containerElement;if(e&&e!==document&&e!==document.body)return e.scrollHeight-e.offsetHeight;var n=document.body,i=document.documentElement;return Math.max(n.scrollHeight,n.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight)}(t),t)},scrollTo:function(t,e){p(t,g(e))},scrollMore:function(t,e){e=g(e),d(e);var n=e.horizontal?u(e):h(e);p(t+n,e)}}},7385:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(6837),r=["mousedown","mousewheel","touchmove","keydown"];e.default={subscribe:function(t){return"undefined"!=typeof document&&r.forEach((function(e){return(0,i.addPassiveEventListener)(document,e,t)}))}}},6837:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.addPassiveEventListener=function(t,e,i){var r=i.name;r||(r=e,console.warn("Listener must be a named function.")),n.has(e)||n.set(e,new Set);var o=n.get(e);if(!o.has(r)){var s=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(n){}return t}();t.addEventListener(e,i,!!s&&{passive:!0}),o.add(r)}},e.removePassiveEventListener=function(t,e,i){t.removeEventListener(e,i),n.get(e).delete(i.name||e)};var n=new Map},2929:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=l(n(7810)),s=(l(n(2483)),l(n(6203))),a=l(n(5826));function l(t){return t&&t.__esModule?t:{default:t}}e.default=function(t){var e=function(e){function n(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n);var e=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t));return e.childBindings={domNode:null},e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,e),r(n,[{key:"componentDidMount",value:function(){if("undefined"==typeof window)return!1;this.registerElems(this.props.name)}},{key:"componentDidUpdate",value:function(t){this.props.name!==t.name&&this.registerElems(this.props.name)}},{key:"componentWillUnmount",value:function(){if("undefined"==typeof window)return!1;s.default.unregister(this.props.name)}},{key:"registerElems",value:function(t){s.default.register(t,this.childBindings.domNode)}},{key:"render",value:function(){return o.default.createElement(t,i({},this.props,{parentBindings:this.childBindings}))}}]),n}(o.default.Component);return e.propTypes={name:a.default.string,id:a.default.string},e}},568:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={registered:{},scrollEvent:{register:function(t,e){n.registered[t]=e},remove:function(t){n.registered[t]=null}}};e.default=n},2309:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});n(6837);var i,r=n(4768),o=(i=r)&&i.__esModule?i:{default:i};var s={mountFlag:!1,initialized:!1,scroller:null,containers:{},mount:function(t){this.scroller=t,this.handleHashChange=this.handleHashChange.bind(this),window.addEventListener("hashchange",this.handleHashChange),this.initStateFromHash(),this.mountFlag=!0},mapContainer:function(t,e){this.containers[t]=e},isMounted:function(){return this.mountFlag},isInitialized:function(){return this.initialized},initStateFromHash:function(){var t=this,e=this.getHash();e?window.setTimeout((function(){t.scrollTo(e,!0),t.initialized=!0}),10):this.initialized=!0},scrollTo:function(t,e){var n=this.scroller;if(n.get(t)&&(e||t!==n.getActiveLink())){var i=this.containers[t]||document;n.scrollTo(t,{container:i})}},getHash:function(){return o.default.getHash()},changeHash:function(t,e){this.isInitialized()&&o.default.getHash()!==t&&o.default.updateHash(t,e)},handleHashChange:function(){this.scrollTo(this.getHash())},unmount:function(){this.scroller=null,this.containers=null,window.removeEventListener("hashchange",this.handleHashChange)}};e.default=s},5489:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=u(n(7810)),s=u(n(6307)),a=u(n(6203)),l=u(n(5826)),c=u(n(2309));function u(t){return t&&t.__esModule?t:{default:t}}var h={to:l.default.string.isRequired,containerId:l.default.string,container:l.default.object,activeClass:l.default.string,activeStyle:l.default.object,spy:l.default.bool,horizontal:l.default.bool,smooth:l.default.oneOfType([l.default.bool,l.default.string]),offset:l.default.number,delay:l.default.number,isDynamic:l.default.bool,onClick:l.default.func,duration:l.default.oneOfType([l.default.number,l.default.func]),absolute:l.default.bool,onSetActive:l.default.func,onSetInactive:l.default.func,ignoreCancelEvents:l.default.bool,hashSpy:l.default.bool,saveHashHistory:l.default.bool,spyThrottle:l.default.number};e.default=function(t,e){var n=e||a.default,l=function(e){function a(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a);var e=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,t));return u.call(e),e.state={active:!1},e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(a,e),r(a,[{key:"getScrollSpyContainer",value:function(){var t=this.props.containerId,e=this.props.container;return t&&!e?document.getElementById(t):e&&e.nodeType?e:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var t=this.getScrollSpyContainer();s.default.isMounted(t)||s.default.mount(t,this.props.spyThrottle),this.props.hashSpy&&(c.default.isMounted()||c.default.mount(n),c.default.mapContainer(this.props.to,t)),s.default.addSpyHandler(this.spyHandler,t),this.setState({container:t})}}},{key:"componentWillUnmount",value:function(){s.default.unmount(this.stateHandler,this.spyHandler)}},{key:"render",value:function(){var e="";e=this.state&&this.state.active?((this.props.className||"")+" "+(this.props.activeClass||"active")).trim():this.props.className;var n={};n=this.state&&this.state.active?i({},this.props.style,this.props.activeStyle):i({},this.props.style);var r=i({},this.props);for(var s in h)r.hasOwnProperty(s)&&delete r[s];return r.className=e,r.style=n,r.onClick=this.handleClick,o.default.createElement(t,r)}}]),a}(o.default.PureComponent),u=function(){var t=this;this.scrollTo=function(e,r){n.scrollTo(e,i({},t.state,r))},this.handleClick=function(e){t.props.onClick&&t.props.onClick(e),e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),t.scrollTo(t.props.to,t.props)},this.spyHandler=function(e,i){var r=t.getScrollSpyContainer();if(!c.default.isMounted()||c.default.isInitialized()){var o=t.props.horizontal,s=t.props.to,a=null,l=void 0,u=void 0;if(o){var h=0,f=0,d=0;if(r.getBoundingClientRect)d=r.getBoundingClientRect().left;if(!a||t.props.isDynamic){if(!(a=n.get(s)))return;var p=a.getBoundingClientRect();f=(h=p.left-d+e)+p.width}var g=e-t.props.offset;l=g>=Math.floor(h)&&g<Math.floor(f),u=g<Math.floor(h)||g>=Math.floor(f)}else{var m=0,b=0,v=0;if(r.getBoundingClientRect)v=r.getBoundingClientRect().top;if(!a||t.props.isDynamic){if(!(a=n.get(s)))return;var y=a.getBoundingClientRect();b=(m=y.top-v+i)+y.height}var x=i-t.props.offset;l=x>=Math.floor(m)&&x<Math.floor(b),u=x<Math.floor(m)||x>=Math.floor(b)}var w=n.getActiveLink();if(u){if(s===w&&n.setActiveLink(void 0),t.props.hashSpy&&c.default.getHash()===s){var S=t.props.saveHashHistory,O=void 0!==S&&S;c.default.changeHash("",O)}t.props.spy&&t.state.active&&(t.setState({active:!1}),t.props.onSetInactive&&t.props.onSetInactive(s,a))}if(l&&(w!==s||!1===t.state.active)){n.setActiveLink(s);var I=t.props.saveHashHistory,k=void 0!==I&&I;t.props.hashSpy&&c.default.changeHash(s,k),t.props.spy&&(t.setState({active:!0}),t.props.onSetActive&&t.props.onSetActive(s,a))}}}};return l.propTypes=h,l.defaultProps={offset:0},l}},6307:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(9572),o=(i=r)&&i.__esModule?i:{default:i},s=n(6837);var a={spyCallbacks:[],spySetState:[],scrollSpyContainers:[],mount:function(t,e){if(t){var n=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:66;return(0,o.default)(t,e)}((function(e){a.scrollHandler(t)}),e);a.scrollSpyContainers.push(t),(0,s.addPassiveEventListener)(t,"scroll",n)}},isMounted:function(t){return-1!==a.scrollSpyContainers.indexOf(t)},currentPositionX:function(t){if(t===document){var e=void 0!==window.pageYOffset,n="CSS1Compat"===(document.compatMode||"");return e?window.pageXOffset:n?document.documentElement.scrollLeft:document.body.scrollLeft}return t.scrollLeft},currentPositionY:function(t){if(t===document){var e=void 0!==window.pageXOffset,n="CSS1Compat"===(document.compatMode||"");return e?window.pageYOffset:n?document.documentElement.scrollTop:document.body.scrollTop}return t.scrollTop},scrollHandler:function(t){(a.scrollSpyContainers[a.scrollSpyContainers.indexOf(t)].spyCallbacks||[]).forEach((function(e){return e(a.currentPositionX(t),a.currentPositionY(t))}))},addStateHandler:function(t){a.spySetState.push(t)},addSpyHandler:function(t,e){var n=a.scrollSpyContainers[a.scrollSpyContainers.indexOf(e)];n.spyCallbacks||(n.spyCallbacks=[]),n.spyCallbacks.push(t),t(a.currentPositionX(e),a.currentPositionY(e))},updateStates:function(){a.spySetState.forEach((function(t){return t()}))},unmount:function(t,e){a.scrollSpyContainers.forEach((function(t){return t.spyCallbacks&&t.spyCallbacks.length&&t.spyCallbacks.indexOf(e)>-1&&t.spyCallbacks.splice(t.spyCallbacks.indexOf(e),1)})),a.spySetState&&a.spySetState.length&&a.spySetState.indexOf(t)>-1&&a.spySetState.splice(a.spySetState.indexOf(t),1),document.removeEventListener("scroll",a.scrollHandler)},update:function(){return a.scrollSpyContainers.forEach((function(t){return a.scrollHandler(t)}))}};e.default=a},6203:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=a(n(4768)),o=a(n(7698)),s=a(n(568));function a(t){return t&&t.__esModule?t:{default:t}}var l={},c=void 0;e.default={unmount:function(){l={}},register:function(t,e){l[t]=e},unregister:function(t){delete l[t]},get:function(t){return l[t]||document.getElementById(t)||document.getElementsByName(t)[0]||document.getElementsByClassName(t)[0]},setActiveLink:function(t){return c=t},getActiveLink:function(){return c},scrollTo:function(t,e){var n=this.get(t);if(n){var a=(e=i({},e,{absolute:!1})).containerId,l=e.container,c=void 0;c=a?document.getElementById(a):l&&l.nodeType?l:document,e.absolute=!0;var u=e.horizontal,h=r.default.scrollOffset(c,n,u)+(e.offset||0);if(!e.smooth)return s.default.registered.begin&&s.default.registered.begin(t,n),c===document?e.horizontal?window.scrollTo(h,0):window.scrollTo(0,h):c.scrollTop=h,void(s.default.registered.end&&s.default.registered.end(t,n));o.default.animateTopScroll(h,e,t,n)}else console.warn("target Element not found")}}},8887:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={defaultEasing:function(t){return t<.5?Math.pow(2*t,2)/2:1-Math.pow(2*(1-t),2)/2},linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return t<.5?2*t*t:(4-2*t)*t-1},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t}}},4768:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(t,e){for(var n=t.offsetTop,i=t.offsetParent;i&&!e(i);)n+=i.offsetTop,i=i.offsetParent;return{offsetTop:n,offsetParent:i}};e.default={updateHash:function(t,e){var n=0===t.indexOf("#")?t.substring(1):t,i=n?"#"+n:"",r=window&&window.location,o=i?r.pathname+r.search+i:r.pathname+r.search;e?history.pushState(history.state,"",o):history.replaceState(history.state,"",o)},getHash:function(){return window.location.hash.replace(/^#/,"")},filterElementInContainer:function(t){return function(e){return t.contains?t!=e&&t.contains(e):!!(16&t.compareDocumentPosition(e))}},scrollOffset:function(t,e,i){if(i)return t===document?e.getBoundingClientRect().left+(window.scrollX||window.pageXOffset):"static"!==getComputedStyle(t).position?e.offsetLeft:e.offsetLeft-t.offsetLeft;if(t===document)return e.getBoundingClientRect().top+(window.scrollY||window.pageYOffset);if("static"!==getComputedStyle(t).position){if(e.offsetParent!==t){var r=n(e,(function(e){return e===t||e===document})),o=r.offsetTop;if(r.offsetParent!==t)throw new Error("Seems containerElement is not an ancestor of the Element");return o}return e.offsetTop}if(e.offsetParent===t.offsetParent)return e.offsetTop-t.offsetTop;var s=function(t){return t===document};return n(e,s).offsetTop-n(t,s).offsetTop}}},7466:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>x});var i=n(8801),r=n(4180),o=n(9121),s=n(2937),a=n(785),l=n(9906),c=n(8782),u=n(7810),h=(n(4313),n(2483),n(3702)),f=n(1620),d=(n(9959),n(5922),n(3497));function p(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=(0,c.A)(t);if(e){var r=(0,c.A)(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return(0,l.A)(this,n)}}var g,m,b,v={cacheOptions:!1,defaultOptions:!1,filterOption:null,isLoading:!1},y=(0,d.m)(f.S);const x=(g=y,b=m=function(t){(0,a.A)(n,t);var e=p(n);function n(t){var i;return(0,o.A)(this,n),(i=e.call(this)).select=void 0,i.lastRequest=void 0,i.mounted=!1,i.optionsCache={},i.handleInputChange=function(t,e){var n=i.props,r=n.cacheOptions,o=n.onInputChange,s=(0,h.G)(t,e,o);if(!s)return delete i.lastRequest,void i.setState({inputValue:"",loadedInputValue:"",loadedOptions:[],isLoading:!1,passEmptyOptions:!1});if(r&&i.optionsCache[s])i.setState({inputValue:s,loadedInputValue:s,loadedOptions:i.optionsCache[s],isLoading:!1,passEmptyOptions:!1});else{var a=i.lastRequest={};i.setState({inputValue:s,isLoading:!0,passEmptyOptions:!i.state.loadedInputValue},(function(){i.loadOptions(s,(function(t){i.mounted&&(t&&(i.optionsCache[s]=t),a===i.lastRequest&&(delete i.lastRequest,i.setState({isLoading:!1,loadedInputValue:s,loadedOptions:t||[],passEmptyOptions:!1})))}))}))}return s},i.state={defaultOptions:Array.isArray(t.defaultOptions)?t.defaultOptions:void 0,inputValue:void 0!==t.inputValue?t.inputValue:"",isLoading:!0===t.defaultOptions,loadedOptions:[],passEmptyOptions:!1},i}return(0,s.A)(n,[{key:"componentDidMount",value:function(){var t=this;this.mounted=!0;var e=this.props.defaultOptions,n=this.state.inputValue;!0===e&&this.loadOptions(n,(function(e){if(t.mounted){var n=!!t.lastRequest;t.setState({defaultOptions:e||[],isLoading:n})}}))}},{key:"UNSAFE_componentWillReceiveProps",value:function(t){t.cacheOptions!==this.props.cacheOptions&&(this.optionsCache={}),t.defaultOptions!==this.props.defaultOptions&&this.setState({defaultOptions:Array.isArray(t.defaultOptions)?t.defaultOptions:void 0})}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"loadOptions",value:function(t,e){var n=this.props.loadOptions;if(!n)return e();var i=n(t,e);i&&"function"==typeof i.then&&i.then(e,(function(){return e()}))}},{key:"render",value:function(){var t=this,e=this.props,n=(e.loadOptions,e.isLoading),o=(0,i.A)(e,["loadOptions","isLoading"]),s=this.state,a=s.defaultOptions,l=s.inputValue,c=s.isLoading,h=s.loadedInputValue,f=s.loadedOptions,d=s.passEmptyOptions?[]:l&&h?f:a||[];return u.createElement(g,(0,r.A)({},o,{ref:function(e){t.select=e},options:d,isLoading:c||n,onInputChange:this.handleInputChange}))}}]),n}(u.Component),m.defaultProps=v,b)},1620:(t,e,n)=>{"use strict";n.d(e,{S:()=>lt});for(var i=n(8801),r=n(4180),o=n(4553),s=n(2838),a=n(8175),l=n(9121),c=n(2937),u=n(9261),h=n(785),f=n(9906),d=n(8782),p=n(7810),g=n(9529),m=n(4313),b=n(2483),v=n(3702),y=n(9959),x=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],w=new RegExp("["+x.map((function(t){return t.letters})).join("")+"]","g"),S={},O=0;O<x.length;O++)for(var I=x[O],k=0;k<I.letters.length;k++)S[I.letters[k]]=I.base;var E=function(t){return t.replace(w,(function(t){return S[t]}))};function M(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}var C=function(t){return t.replace(/^\s+|\s+$/g,"")},A=function(t){return"".concat(t.label," ").concat(t.value)};var j={name:"1laao21-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;"},P=function(t){return(0,m.Y)("span",(0,r.A)({css:j},t))};function T(t){t.in,t.out,t.onExited,t.appear,t.enter,t.exit;var e=t.innerRef,n=(t.emotion,(0,i.A)(t,["in","out","onExited","appear","enter","exit","innerRef","emotion"]));return(0,m.Y)("input",(0,r.A)({ref:e},n,{css:(0,y.A)({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"},"")}))}function N(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=(0,d.A)(t);if(e){var r=(0,d.A)(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return(0,f.A)(this,n)}}var _=function(t){(0,h.A)(n,t);var e=N(n);function n(){return(0,l.A)(this,n),e.apply(this,arguments)}return(0,c.A)(n,[{key:"componentDidMount",value:function(){this.props.innerRef((0,b.findDOMNode)(this))}},{key:"componentWillUnmount",value:function(){this.props.innerRef(null)}},{key:"render",value:function(){return this.props.children}}]),n}(p.Component),L=["boxSizing","height","overflow","paddingRight","position"],D={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function R(t){t.preventDefault()}function B(t){t.stopPropagation()}function H(){var t=this.scrollTop,e=this.scrollHeight,n=t+this.offsetHeight;0===t?this.scrollTop=1:n===e&&(this.scrollTop=t-1)}function z(){return"ontouchstart"in window||navigator.maxTouchPoints}function W(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=(0,d.A)(t);if(e){var r=(0,d.A)(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return(0,f.A)(this,n)}}var U=!(!window.document||!window.document.createElement),F=0,G=function(t){(0,h.A)(n,t);var e=W(n);function n(){var t;(0,l.A)(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))).originalStyles={},t.listenerOptions={capture:!1,passive:!1},t}return(0,c.A)(n,[{key:"componentDidMount",value:function(){var t=this;if(U){var e=this.props,n=e.accountForScrollbars,i=e.touchScrollTarget,r=document.body,o=r&&r.style;if(n&&L.forEach((function(e){var n=o&&o[e];t.originalStyles[e]=n})),n&&F<1){var s=parseInt(this.originalStyles.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,l=window.innerWidth-a+s||0;Object.keys(D).forEach((function(t){var e=D[t];o&&(o[t]=e)})),o&&(o.paddingRight="".concat(l,"px"))}r&&z()&&(r.addEventListener("touchmove",R,this.listenerOptions),i&&(i.addEventListener("touchstart",H,this.listenerOptions),i.addEventListener("touchmove",B,this.listenerOptions))),F+=1}}},{key:"componentWillUnmount",value:function(){var t=this;if(U){var e=this.props,n=e.accountForScrollbars,i=e.touchScrollTarget,r=document.body,o=r&&r.style;F=Math.max(F-1,0),n&&F<1&&L.forEach((function(e){var n=t.originalStyles[e];o&&(o[e]=n)})),r&&z()&&(r.removeEventListener("touchmove",R,this.listenerOptions),i&&(i.removeEventListener("touchstart",H,this.listenerOptions),i.removeEventListener("touchmove",B,this.listenerOptions)))}}},{key:"render",value:function(){return null}}]),n}(p.Component);function Z(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=(0,d.A)(t);if(e){var r=(0,d.A)(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return(0,f.A)(this,n)}}G.defaultProps={accountForScrollbars:!0};var V={name:"1dsbpcp",styles:"position:fixed;left:0;bottom:0;right:0;top:0;"},q=function(t){(0,h.A)(n,t);var e=Z(n);function n(){var t;(0,l.A)(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))).state={touchScrollTarget:null},t.getScrollTarget=function(e){e!==t.state.touchScrollTarget&&t.setState({touchScrollTarget:e})},t.blurSelectInput=function(){document.activeElement&&document.activeElement.blur()},t}return(0,c.A)(n,[{key:"render",value:function(){var t=this.props,e=t.children,n=t.isEnabled,i=this.state.touchScrollTarget;return n?(0,m.Y)("div",null,(0,m.Y)("div",{onClick:this.blurSelectInput,css:V}),(0,m.Y)(_,{innerRef:this.getScrollTarget},e),i?(0,m.Y)(G,{touchScrollTarget:i}):null):e}}]),n}(p.PureComponent);function Y(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=(0,d.A)(t);if(e){var r=(0,d.A)(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return(0,f.A)(this,n)}}var J=function(t){(0,h.A)(n,t);var e=Y(n);function n(){var t;(0,l.A)(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))).isBottom=!1,t.isTop=!1,t.scrollTarget=void 0,t.touchStart=void 0,t.cancelScroll=function(t){t.preventDefault(),t.stopPropagation()},t.handleEventDelta=function(e,n){var i=t.props,r=i.onBottomArrive,o=i.onBottomLeave,s=i.onTopArrive,a=i.onTopLeave,l=t.scrollTarget,c=l.scrollTop,u=l.scrollHeight,h=l.clientHeight,f=t.scrollTarget,d=n>0,p=u-h-c,g=!1;p>n&&t.isBottom&&(o&&o(e),t.isBottom=!1),d&&t.isTop&&(a&&a(e),t.isTop=!1),d&&n>p?(r&&!t.isBottom&&r(e),f.scrollTop=u,g=!0,t.isBottom=!0):!d&&-n>c&&(s&&!t.isTop&&s(e),f.scrollTop=0,g=!0,t.isTop=!0),g&&t.cancelScroll(e)},t.onWheel=function(e){t.handleEventDelta(e,e.deltaY)},t.onTouchStart=function(e){t.touchStart=e.changedTouches[0].clientY},t.onTouchMove=function(e){var n=t.touchStart-e.changedTouches[0].clientY;t.handleEventDelta(e,n)},t.getScrollTarget=function(e){t.scrollTarget=e},t}return(0,c.A)(n,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(t){t&&("function"==typeof t.addEventListener&&t.addEventListener("wheel",this.onWheel,!1),"function"==typeof t.addEventListener&&t.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof t.addEventListener&&t.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(t){t&&("function"==typeof t.removeEventListener&&t.removeEventListener("wheel",this.onWheel,!1),"function"==typeof t.removeEventListener&&t.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof t.removeEventListener&&t.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return p.createElement(_,{innerRef:this.getScrollTarget},this.props.children)}}]),n}(p.Component);function Q(t){var e=t.isEnabled,n=void 0===e||e,r=(0,i.A)(t,["isEnabled"]);return n?p.createElement(J,r):r.children}var X=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.isSearchable,i=e.isMulti,r=e.label,o=e.isDisabled,s=e.tabSelectsValue;switch(t){case"menu":return"Use Up and Down to choose options".concat(o?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(s?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(r||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(i?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value"}},$=function(t,e){var n=e.value,i=e.isDisabled;if(n)switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(n,", deselected.");case"select-option":return"option ".concat(n,i?" is disabled. Select another option.":", selected.")}},K=function(t){return!!t.isDisabled};var tt={clearIndicator:v.c,container:v.a,control:v.b,dropdownIndicator:v.d,group:v.g,groupHeading:v.e,indicatorsContainer:v.i,indicatorSeparator:v.f,input:v.h,loadingIndicator:v.l,loadingMessage:v.j,menu:v.m,menuList:v.k,menuPortal:v.n,multiValue:v.o,multiValueLabel:v.p,multiValueRemove:v.q,noOptionsMessage:v.r,option:v.s,placeholder:v.t,singleValue:v.u,valueContainer:v.v};var et={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}};function nt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function it(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nt(Object(n),!0).forEach((function(e){(0,a.A)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function rt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=(0,d.A)(t);if(e){var r=(0,d.A)(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return(0,f.A)(this,n)}}var ot,st={backspaceRemovesValue:!0,blurInputOnSelect:(0,v.w)(),captureMenuScroll:!(0,v.w)(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(t,e){var n=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?M(Object(n),!0).forEach((function(e){(0,a.A)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({ignoreCase:!0,ignoreAccents:!0,stringify:A,trim:!0,matchFrom:"any"},ot),i=n.ignoreCase,r=n.ignoreAccents,o=n.stringify,s=n.trim,l=n.matchFrom,c=s?C(e):e,u=s?C(o(t)):o(t);return i&&(c=c.toLowerCase(),u=u.toLowerCase()),r&&(c=E(c),u=E(u)),"start"===l?u.substr(0,c.length)===c:u.indexOf(c)>-1},formatGroupLabel:function(t){return t.label},getOptionLabel:function(t){return t.label},getOptionValue:function(t){return t.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:K,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!(0,v.x)(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var e=t.count;return"".concat(e," result").concat(1!==e?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0},at=1,lt=function(t){(0,h.A)(n,t);var e=rt(n);function n(t){var i;(0,l.A)(this,n),(i=e.call(this,t)).state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},i.blockOptionHover=!1,i.isComposing=!1,i.clearFocusValueOnUpdate=!1,i.commonProps=void 0,i.components=void 0,i.hasGroups=!1,i.initialTouchX=0,i.initialTouchY=0,i.inputIsHiddenAfterUpdate=void 0,i.instancePrefix="",i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.controlRef=null,i.getControlRef=function(t){i.controlRef=t},i.focusedOptionRef=null,i.getFocusedOptionRef=function(t){i.focusedOptionRef=t},i.menuListRef=null,i.getMenuListRef=function(t){i.menuListRef=t},i.inputRef=null,i.getInputRef=function(t){i.inputRef=t},i.cacheComponents=function(t){i.components=(0,v.y)({components:t})},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(t,e){var n=i.props,r=n.onChange,o=n.name;r(t,it(it({},e),{},{name:o}))},i.setValue=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",n=arguments.length>2?arguments[2]:void 0,r=i.props,o=r.closeMenuOnSelect,s=r.isMulti;i.onInputChange("",{action:"set-value"}),o&&(i.inputIsHiddenAfterUpdate=!s,i.onMenuClose()),i.clearFocusValueOnUpdate=!0,i.onChange(t,{action:e,option:n})},i.selectOption=function(t){var e=i.props,n=e.blurInputOnSelect,r=e.isMulti,o=i.state.selectValue;if(r)if(i.isOptionSelected(t,o)){var a=i.getOptionValue(t);i.setValue(o.filter((function(t){return i.getOptionValue(t)!==a})),"deselect-option",t),i.announceAriaLiveSelection({event:"deselect-option",context:{value:i.getOptionLabel(t)}})}else i.isOptionDisabled(t,o)?i.announceAriaLiveSelection({event:"select-option",context:{value:i.getOptionLabel(t),isDisabled:!0}}):(i.setValue([].concat((0,s.A)(o),[t]),"select-option",t),i.announceAriaLiveSelection({event:"select-option",context:{value:i.getOptionLabel(t)}}));else i.isOptionDisabled(t,o)?i.announceAriaLiveSelection({event:"select-option",context:{value:i.getOptionLabel(t),isDisabled:!0}}):(i.setValue(t,"select-option"),i.announceAriaLiveSelection({event:"select-option",context:{value:i.getOptionLabel(t)}}));n&&i.blurInput()},i.removeValue=function(t){var e=i.state.selectValue,n=i.getOptionValue(t),r=e.filter((function(t){return i.getOptionValue(t)!==n}));i.onChange(r.length?r:null,{action:"remove-value",removedValue:t}),i.announceAriaLiveSelection({event:"remove-value",context:{value:t?i.getOptionLabel(t):""}}),i.focusInput()},i.clearValue=function(){i.onChange(null,{action:"clear"})},i.popValue=function(){var t=i.state.selectValue,e=t[t.length-1],n=t.slice(0,t.length-1);i.announceAriaLiveSelection({event:"pop-value",context:{value:e?i.getOptionLabel(e):""}}),i.onChange(n.length?n:null,{action:"pop-value",removedValue:e})},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return v.z.apply(void 0,[i.props.classNamePrefix].concat(e))},i.getOptionLabel=function(t){return i.props.getOptionLabel(t)},i.getOptionValue=function(t){return i.props.getOptionValue(t)},i.getStyles=function(t,e){var n=tt[t](e);n.boxSizing="border-box";var r=i.props.styles[t];return r?r(n,e):n},i.getElementId=function(t){return"".concat(i.instancePrefix,"-").concat(t)},i.getActiveDescendentId=function(){var t=i.props.menuIsOpen,e=i.state,n=e.menuOptions,r=e.focusedOption;if(r&&t){var o=n.focusable.indexOf(r),s=n.render[o];return s&&s.key}},i.announceAriaLiveSelection=function(t){var e=t.event,n=t.context;i.setState({ariaLiveSelection:$(e,n)})},i.announceAriaLiveContext=function(t){var e=t.event,n=t.context;i.setState({ariaLiveContext:X(e,it(it({},n),{},{label:i.props["aria-label"]}))})},i.onMenuMouseDown=function(t){0===t.button&&(t.stopPropagation(),t.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(t){i.blockOptionHover=!1},i.onControlMouseDown=function(t){var e=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?"INPUT"!==t.target.tagName&&"TEXTAREA"!==t.target.tagName&&i.onMenuClose():e&&i.openMenu("first"):(e&&(i.openAfterFocus=!0),i.focusInput()),"INPUT"!==t.target.tagName&&"TEXTAREA"!==t.target.tagName&&t.preventDefault()},i.onDropdownIndicatorMouseDown=function(t){if(!(t&&"mousedown"===t.type&&0!==t.button||i.props.isDisabled)){var e=i.props,n=e.isMulti,r=e.menuIsOpen;i.focusInput(),r?(i.inputIsHiddenAfterUpdate=!n,i.onMenuClose()):i.openMenu("first"),t.preventDefault(),t.stopPropagation()}},i.onClearIndicatorMouseDown=function(t){t&&"mousedown"===t.type&&0!==t.button||(i.clearValue(),t.stopPropagation(),i.openAfterFocus=!1,"touchend"===t.type?i.focusInput():setTimeout((function(){return i.focusInput()})))},i.onScroll=function(t){"boolean"==typeof i.props.closeMenuOnScroll?t.target instanceof HTMLElement&&(0,v.A)(t.target)&&i.props.onMenuClose():"function"==typeof i.props.closeMenuOnScroll&&i.props.closeMenuOnScroll(t)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(t){var e=t.touches,n=e&&e.item(0);n&&(i.initialTouchX=n.clientX,i.initialTouchY=n.clientY,i.userIsDragging=!1)},i.onTouchMove=function(t){var e=t.touches,n=e&&e.item(0);if(n){var r=Math.abs(n.clientX-i.initialTouchX),o=Math.abs(n.clientY-i.initialTouchY);i.userIsDragging=r>5||o>5}},i.onTouchEnd=function(t){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(t.target)&&i.menuListRef&&!i.menuListRef.contains(t.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(t){i.userIsDragging||i.onControlMouseDown(t)},i.onClearIndicatorTouchEnd=function(t){i.userIsDragging||i.onClearIndicatorMouseDown(t)},i.onDropdownIndicatorTouchEnd=function(t){i.userIsDragging||i.onDropdownIndicatorMouseDown(t)},i.handleInputChange=function(t){var e=t.currentTarget.value;i.inputIsHiddenAfterUpdate=!1,i.onInputChange(e,{action:"input-change"}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(t){var e=i.props,n=e.isSearchable,r=e.isMulti;i.props.onFocus&&i.props.onFocus(t),i.inputIsHiddenAfterUpdate=!1,i.announceAriaLiveContext({event:"input",context:{isSearchable:n,isMulti:r}}),i.setState({isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(t){i.menuListRef&&i.menuListRef.contains(document.activeElement)?i.inputRef.focus():(i.props.onBlur&&i.props.onBlur(t),i.onInputChange("",{action:"input-blur"}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1}))},i.onOptionHover=function(t){i.blockOptionHover||i.state.focusedOption===t||i.setState({focusedOption:t})},i.shouldHideSelectedOptions=function(){var t=i.props,e=t.hideSelectedOptions,n=t.isMulti;return void 0===e?n:e},i.onKeyDown=function(t){var e=i.props,n=e.isMulti,r=e.backspaceRemovesValue,o=e.escapeClearsValue,s=e.inputValue,a=e.isClearable,l=e.isDisabled,c=e.menuIsOpen,u=e.onKeyDown,h=e.tabSelectsValue,f=e.openMenuOnFocus,d=i.state,p=d.focusedOption,g=d.focusedValue,m=d.selectValue;if(!(l||"function"==typeof u&&(u(t),t.defaultPrevented))){switch(i.blockOptionHover=!0,t.key){case"ArrowLeft":if(!n||s)return;i.focusValue("previous");break;case"ArrowRight":if(!n||s)return;i.focusValue("next");break;case"Delete":case"Backspace":if(s)return;if(g)i.removeValue(g);else{if(!r)return;n?i.popValue():a&&i.clearValue()}break;case"Tab":if(i.isComposing)return;if(t.shiftKey||!c||!h||!p||f&&i.isOptionSelected(p,m))return;i.selectOption(p);break;case"Enter":if(229===t.keyCode)break;if(c){if(!p)return;if(i.isComposing)return;i.selectOption(p);break}return;case"Escape":c?(i.inputIsHiddenAfterUpdate=!1,i.onInputChange("",{action:"menu-close"}),i.onMenuClose()):a&&o&&i.clearValue();break;case" ":if(s)return;if(!c){i.openMenu("first");break}if(!p)return;i.selectOption(p);break;case"ArrowUp":c?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":c?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!c)return;i.focusOption("pageup");break;case"PageDown":if(!c)return;i.focusOption("pagedown");break;case"Home":if(!c)return;i.focusOption("first");break;case"End":if(!c)return;i.focusOption("last");break;default:return}t.preventDefault()}},i.buildMenuOptions=function(t,e){var n=t.inputValue,r=void 0===n?"":n,o=t.options,s=function(t,n){var o=i.isOptionDisabled(t,e),s=i.isOptionSelected(t,e),a=i.getOptionLabel(t),l=i.getOptionValue(t);if(!(i.shouldHideSelectedOptions()&&s||!i.filterOption({label:a,value:l,data:t},r))){var c=o?void 0:function(){return i.onOptionHover(t)},u=o?void 0:function(){return i.selectOption(t)},h="".concat(i.getElementId("option"),"-").concat(n);return{innerProps:{id:h,onClick:u,onMouseMove:c,onMouseOver:c,tabIndex:-1},data:t,isDisabled:o,isSelected:s,key:h,label:a,type:"option",value:l}}};return o.reduce((function(t,e,n){if(e.options){i.hasGroups||(i.hasGroups=!0);var r=e.options.map((function(e,i){var r=s(e,"".concat(n,"-").concat(i));return r&&t.focusable.push(e),r})).filter(Boolean);if(r.length){var o="".concat(i.getElementId("group"),"-").concat(n);t.render.push({type:"group",key:o,data:e,options:r})}}else{var a=s(e,"".concat(n));a&&(t.render.push(a),t.focusable.push(e))}return t}),{render:[],focusable:[]})};var r=t.value;i.cacheComponents=(0,g.A)(i.cacheComponents,v.B).bind((0,u.A)(i)),i.cacheComponents(t.components),i.instancePrefix="react-select-"+(i.props.instanceId||++at);var a=(0,v.C)(r);i.buildMenuOptions=(0,g.A)(i.buildMenuOptions,(function(t,e){var n=t,i=(0,o.A)(n,2),r=i[0],s=i[1],a=e,l=(0,o.A)(a,2),c=l[0];return s===l[1]&&r.inputValue===c.inputValue&&r.options===c.options})).bind((0,u.A)(i));var c=t.menuIsOpen?i.buildMenuOptions(t,a):{render:[],focusable:[]};return i.state.menuOptions=c,i.state.selectValue=a,i}return(0,c.A)(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"UNSAFE_componentWillReceiveProps",value:function(t){var e=this.props,n=e.options,i=e.value,r=e.menuIsOpen,o=e.inputValue;if(this.cacheComponents(t.components),t.value!==i||t.options!==n||t.menuIsOpen!==r||t.inputValue!==o){var s=(0,v.C)(t.value),a=t.menuIsOpen?this.buildMenuOptions(t,s):{render:[],focusable:[]},l=this.getNextFocusedValue(s),c=this.getNextFocusedOption(a.focusable);this.setState({menuOptions:a,selectValue:s,focusedOption:c,focusedValue:l})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(t){var e=this.props,n=e.isDisabled,i=e.menuIsOpen,r=this.state.isFocused;(r&&!n&&t.isDisabled||r&&i&&!t.menuIsOpen)&&this.focusInput(),r&&n&&!t.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&((0,v.D)(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){var t=this.props,e=t.isSearchable,n=t.isMulti;this.announceAriaLiveContext({event:"input",context:{isSearchable:e,isMulti:n}}),this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(t,e){this.props.onInputChange(t,e)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(t){var e=this,n=this.state,i=n.selectValue,r=n.isFocused,o=this.buildMenuOptions(this.props,i),s=this.props,a=s.isMulti,l=s.tabSelectsValue,c="first"===t?0:o.focusable.length-1;if(!a){var u=o.focusable.indexOf(i[0]);u>-1&&(c=u)}this.scrollToFocusedOptionOnUpdate=!(r&&this.menuListRef),this.inputIsHiddenAfterUpdate=!1,this.setState({menuOptions:o,focusedValue:null,focusedOption:o.focusable[c]},(function(){e.onMenuOpen(),e.announceAriaLiveContext({event:"menu",context:{tabSelectsValue:l}})}))}},{key:"focusValue",value:function(t){var e=this.props,n=e.isMulti,i=e.isSearchable,r=this.state,o=r.selectValue,s=r.focusedValue;if(n){this.setState({focusedOption:null});var a=o.indexOf(s);s||(a=-1,this.announceAriaLiveContext({event:"value"}));var l=o.length-1,c=-1;if(o.length){switch(t){case"previous":c=0===a?0:-1===a?l:a-1;break;case"next":a>-1&&a<l&&(c=a+1)}-1===c&&this.announceAriaLiveContext({event:"input",context:{isSearchable:i,isMulti:n}}),this.setState({inputIsHidden:-1!==c,focusedValue:o[c]})}}}},{key:"focusOption",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",e=this.props,n=e.pageSize,i=e.tabSelectsValue,r=this.state,o=r.focusedOption,s=r.menuOptions.focusable;if(s.length){var a=0,l=s.indexOf(o);o||(l=-1,this.announceAriaLiveContext({event:"menu",context:{tabSelectsValue:i}})),"up"===t?a=l>0?l-1:s.length-1:"down"===t?a=(l+1)%s.length:"pageup"===t?(a=l-n)<0&&(a=0):"pagedown"===t?(a=l+n)>s.length-1&&(a=s.length-1):"last"===t&&(a=s.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:s[a],focusedValue:null}),this.announceAriaLiveContext({event:"menu",context:{isDisabled:K(s[a]),tabSelectsValue:i}})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(et):it(it({},et),this.props.theme):et}},{key:"getCommonProps",value:function(){var t=this.clearValue,e=this.cx,n=this.getStyles,i=this.getValue,r=this.setValue,o=this.selectOption,s=this.props,a=s.isMulti,l=s.isRtl,c=s.options;return{cx:e,clearValue:t,getStyles:n,getValue:i,hasValue:this.hasValue(),isMulti:a,isRtl:l,options:c,selectOption:o,setValue:r,selectProps:s,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(t){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var e=this.state,n=e.focusedValue,i=e.selectValue.indexOf(n);if(i>-1){if(t.indexOf(n)>-1)return n;if(i<t.length)return t[i]}return null}},{key:"getNextFocusedOption",value:function(t){var e=this.state.focusedOption;return e&&t.indexOf(e)>-1?e:t[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var t=this.props,e=t.isClearable,n=t.isMulti;return void 0===e?n:e}},{key:"isOptionDisabled",value:function(t,e){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(t,e)}},{key:"isOptionSelected",value:function(t,e){var n=this;if(e.indexOf(t)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(t,e);var i=this.getOptionValue(t);return e.some((function(t){return n.getOptionValue(t)===i}))}},{key:"filterOption",value:function(t,e){return!this.props.filterOption||this.props.filterOption(t,e)}},{key:"formatOptionLabel",value:function(t,e){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,i=this.state.selectValue;return this.props.formatOptionLabel(t,{context:e,inputValue:n,selectValue:i})}return this.getOptionLabel(t)}},{key:"formatGroupLabel",value:function(t){return this.props.formatGroupLabel(t)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"constructAriaLiveMessage",value:function(){var t=this.state,e=t.ariaLiveContext,n=t.selectValue,i=t.focusedValue,r=t.focusedOption,o=this.props,s=o.options,a=o.menuIsOpen,l=o.inputValue,c=o.screenReaderStatus,u=i?function(t){var e=t.focusedValue,n=t.getOptionLabel,i=t.selectValue;return"value ".concat(n(e)," focused, ").concat(i.indexOf(e)+1," of ").concat(i.length,".")}({focusedValue:i,getOptionLabel:this.getOptionLabel,selectValue:n}):"",h=r&&a?function(t){var e=t.focusedOption,n=t.getOptionLabel,i=t.options;return"option ".concat(n(e)," focused").concat(e.isDisabled?" disabled":"",", ").concat(i.indexOf(e)+1," of ").concat(i.length,".")}({focusedOption:r,getOptionLabel:this.getOptionLabel,options:s}):"",f=function(t){var e=t.inputValue,n=t.screenReaderMessage;return"".concat(n).concat(e?" for search term "+e:"",".")}({inputValue:l,screenReaderMessage:c({count:this.countOptions()})});return"".concat(u," ").concat(h," ").concat(f," ").concat(e)}},{key:"renderInput",value:function(){var t=this.props,e=t.isDisabled,n=t.isSearchable,i=t.inputId,o=t.inputValue,s=t.tabIndex,a=t.form,l=this.components.Input,c=this.state.inputIsHidden,u=i||this.getElementId("input"),h={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};if(!n)return p.createElement(T,(0,r.A)({id:u,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:v.E,onFocus:this.onInputFocus,readOnly:!0,disabled:e,tabIndex:s,form:a,value:""},h));var f=this.commonProps,d=f.cx,g=f.theme,m=f.selectProps;return p.createElement(l,(0,r.A)({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:d,getStyles:this.getStyles,id:u,innerRef:this.getInputRef,isDisabled:e,isHidden:c,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,selectProps:m,spellCheck:"false",tabIndex:s,form:a,theme:g,type:"text",value:o},h))}},{key:"renderPlaceholderOrValue",value:function(){var t=this,e=this.components,n=e.MultiValue,i=e.MultiValueContainer,o=e.MultiValueLabel,s=e.MultiValueRemove,a=e.SingleValue,l=e.Placeholder,c=this.commonProps,u=this.props,h=u.controlShouldRenderValue,f=u.isDisabled,d=u.isMulti,g=u.inputValue,m=u.placeholder,b=this.state,v=b.selectValue,y=b.focusedValue,x=b.isFocused;if(!this.hasValue()||!h)return g?null:p.createElement(l,(0,r.A)({},c,{key:"placeholder",isDisabled:f,isFocused:x}),m);if(d)return v.map((function(e,a){var l=e===y;return p.createElement(n,(0,r.A)({},c,{components:{Container:i,Label:o,Remove:s},isFocused:l,isDisabled:f,key:"".concat(t.getOptionValue(e)).concat(a),index:a,removeProps:{onClick:function(){return t.removeValue(e)},onTouchEnd:function(){return t.removeValue(e)},onMouseDown:function(t){t.preventDefault(),t.stopPropagation()}},data:e}),t.formatOptionLabel(e,"value"))}));if(g)return null;var w=v[0];return p.createElement(a,(0,r.A)({},c,{data:w,isDisabled:f}),this.formatOptionLabel(w,"value"))}},{key:"renderClearIndicator",value:function(){var t=this.components.ClearIndicator,e=this.commonProps,n=this.props,i=n.isDisabled,o=n.isLoading,s=this.state.isFocused;if(!this.isClearable()||!t||i||!this.hasValue()||o)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return p.createElement(t,(0,r.A)({},e,{innerProps:a,isFocused:s}))}},{key:"renderLoadingIndicator",value:function(){var t=this.components.LoadingIndicator,e=this.commonProps,n=this.props,i=n.isDisabled,o=n.isLoading,s=this.state.isFocused;if(!t||!o)return null;return p.createElement(t,(0,r.A)({},e,{innerProps:{"aria-hidden":"true"},isDisabled:i,isFocused:s}))}},{key:"renderIndicatorSeparator",value:function(){var t=this.components,e=t.DropdownIndicator,n=t.IndicatorSeparator;if(!e||!n)return null;var i=this.commonProps,o=this.props.isDisabled,s=this.state.isFocused;return p.createElement(n,(0,r.A)({},i,{isDisabled:o,isFocused:s}))}},{key:"renderDropdownIndicator",value:function(){var t=this.components.DropdownIndicator;if(!t)return null;var e=this.commonProps,n=this.props.isDisabled,i=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return p.createElement(t,(0,r.A)({},e,{innerProps:o,isDisabled:n,isFocused:i}))}},{key:"renderMenu",value:function(){var t=this,e=this.components,n=e.Group,o=e.GroupHeading,s=e.Menu,a=e.MenuList,l=e.MenuPortal,c=e.LoadingMessage,u=e.NoOptionsMessage,h=e.Option,f=this.commonProps,d=this.state,g=d.focusedOption,m=d.menuOptions,b=this.props,y=b.captureMenuScroll,x=b.inputValue,w=b.isLoading,S=b.loadingMessage,O=b.minMenuHeight,I=b.maxMenuHeight,k=b.menuIsOpen,E=b.menuPlacement,M=b.menuPosition,C=b.menuPortalTarget,A=b.menuShouldBlockScroll,j=b.menuShouldScrollIntoView,P=b.noOptionsMessage,T=b.onMenuScrollToTop,N=b.onMenuScrollToBottom;if(!k)return null;var _,L=function(e){var n=g===e.data;return e.innerRef=n?t.getFocusedOptionRef:void 0,p.createElement(h,(0,r.A)({},f,e,{isFocused:n}),t.formatOptionLabel(e.data,"menu"))};if(this.hasOptions())_=m.render.map((function(e){if("group"===e.type){e.type;var s=(0,i.A)(e,["type"]),a="".concat(e.key,"-heading");return p.createElement(n,(0,r.A)({},f,s,{Heading:o,headingProps:{id:a,data:e.data},label:t.formatGroupLabel(e.data)}),e.options.map((function(t){return L(t)})))}if("option"===e.type)return L(e)}));else if(w){var D=S({inputValue:x});if(null===D)return null;_=p.createElement(c,f,D)}else{var R=P({inputValue:x});if(null===R)return null;_=p.createElement(u,f,R)}var B={minMenuHeight:O,maxMenuHeight:I,menuPlacement:E,menuPosition:M,menuShouldScrollIntoView:j},H=p.createElement(v.M,(0,r.A)({},f,B),(function(e){var n=e.ref,i=e.placerProps,o=i.placement,l=i.maxHeight;return p.createElement(s,(0,r.A)({},f,B,{innerRef:n,innerProps:{onMouseDown:t.onMenuMouseDown,onMouseMove:t.onMenuMouseMove},isLoading:w,placement:o}),p.createElement(Q,{isEnabled:y,onTopArrive:T,onBottomArrive:N},p.createElement(q,{isEnabled:A},p.createElement(a,(0,r.A)({},f,{innerRef:t.getMenuListRef,isLoading:w,maxHeight:l}),_))))}));return C||"fixed"===M?p.createElement(l,(0,r.A)({},f,{appendTo:C,controlElement:this.controlRef,menuPlacement:E,menuPosition:M}),H):H}},{key:"renderFormField",value:function(){var t=this,e=this.props,n=e.delimiter,i=e.isDisabled,r=e.isMulti,o=e.name,s=this.state.selectValue;if(o&&!i){if(r){if(n){var a=s.map((function(e){return t.getOptionValue(e)})).join(n);return p.createElement("input",{name:o,type:"hidden",value:a})}var l=s.length>0?s.map((function(e,n){return p.createElement("input",{key:"i-".concat(n),name:o,type:"hidden",value:t.getOptionValue(e)})})):p.createElement("input",{name:o,type:"hidden"});return p.createElement("div",null,l)}var c=s[0]?this.getOptionValue(s[0]):"";return p.createElement("input",{name:o,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?p.createElement(P,{"aria-live":"polite"},p.createElement("span",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),p.createElement("span",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var t=this.components,e=t.Control,n=t.IndicatorsContainer,i=t.SelectContainer,o=t.ValueContainer,s=this.props,a=s.className,l=s.id,c=s.isDisabled,u=s.menuIsOpen,h=this.state.isFocused,f=this.commonProps=this.getCommonProps();return p.createElement(i,(0,r.A)({},f,{className:a,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:h}),this.renderLiveRegion(),p.createElement(e,(0,r.A)({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:h,menuIsOpen:u}),p.createElement(o,(0,r.A)({},f,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),p.createElement(n,(0,r.A)({},f,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),n}(p.Component);lt.defaultProps=st},3702:(t,e,n)=>{"use strict";n.d(e,{A:()=>O,B:()=>Q,C:()=>w,D:()=>M,E:()=>v,G:()=>S,M:()=>R,a:()=>X,b:()=>dt,c:()=>at,d:()=>st,e:()=>bt,f:()=>lt,g:()=>mt,h:()=>xt,i:()=>K,j:()=>W,k:()=>B,l:()=>ut,m:()=>L,n:()=>G,o:()=>It,p:()=>kt,q:()=>Et,r:()=>z,s:()=>Pt,t:()=>Tt,u:()=>Nt,v:()=>$,w:()=>C,x:()=>A,y:()=>Rt,z:()=>x});var i=n(8801),r=n(4180),o=n(8175),s=n(9121),a=n(2937),l=n(785),c=n(9906),u=n(8782),h=n(7810),f=n(4313),d=n(2483),p=n(4360),g=n(9959),m=n(6420),b=n(5922),v=function(){};function y(t,e){return e?"-"===e[0]?t+e:t+"__"+e:t}function x(t,e,n){var i=[n];if(e&&t)for(var r in e)e.hasOwnProperty(r)&&e[r]&&i.push("".concat(y(t,r)));return i.filter((function(t){return t})).map((function(t){return String(t).trim()})).join(" ")}var w=function(t){return Array.isArray(t)?t.filter(Boolean):"object"===(0,p.A)(t)&&null!==t?[t]:[]};function S(t,e,n){if(n){var i=n(t,e);if("string"==typeof i)return i}return t}function O(t){return[document.documentElement,document.body,window].indexOf(t)>-1}function I(t){return O(t)?window.pageYOffset:t.scrollTop}function k(t,e){O(t)?window.scrollTo(0,e):t.scrollTop=e}function E(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:v,r=I(t),o=e-r,s=0;!function e(){var a,l=o*((a=(a=s+=10)/n-1)*a*a+1)+r;k(t,l),s<n?window.requestAnimationFrame(e):i(t)}()}function M(t,e){var n=t.getBoundingClientRect(),i=e.getBoundingClientRect(),r=e.offsetHeight/3;i.bottom+r>n.bottom?k(t,Math.min(e.offsetTop+e.clientHeight-t.offsetHeight+r,t.scrollHeight)):i.top-r<n.top&&k(t,Math.max(e.offsetTop-r,0))}function C(){try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}}function A(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(t){return!1}}function j(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function P(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?j(Object(n),!0).forEach((function(e){(0,o.A)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function T(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=(0,u.A)(t);if(e){var r=(0,u.A)(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return(0,c.A)(this,n)}}function N(t){var e=t.maxHeight,n=t.menuEl,i=t.minHeight,r=t.placement,o=t.shouldScroll,s=t.isFixedPosition,a=t.theme.spacing,l=function(t){var e=getComputedStyle(t),n="absolute"===e.position,i=/(auto|scroll)/,r=document.documentElement;if("fixed"===e.position)return r;for(var o=t;o=o.parentElement;)if(e=getComputedStyle(o),(!n||"static"!==e.position)&&i.test(e.overflow+e.overflowY+e.overflowX))return o;return r}(n),c={placement:"bottom",maxHeight:e};if(!n||!n.offsetParent)return c;var u=l.getBoundingClientRect().height,h=n.getBoundingClientRect(),f=h.bottom,d=h.height,p=h.top,g=n.offsetParent.getBoundingClientRect().top,m=window.innerHeight,b=I(l),v=parseInt(getComputedStyle(n).marginBottom,10),y=parseInt(getComputedStyle(n).marginTop,10),x=g-y,w=m-p,S=x+b,O=u-b-p,M=f-m+b+v,C=b+p-y,A=160;switch(r){case"auto":case"bottom":if(w>=d)return{placement:"bottom",maxHeight:e};if(O>=d&&!s)return o&&E(l,M,A),{placement:"bottom",maxHeight:e};if(!s&&O>=i||s&&w>=i)return o&&E(l,M,A),{placement:"bottom",maxHeight:s?w-v:O-v};if("auto"===r||s){var j=e,P=s?x:S;return P>=i&&(j=Math.min(P-v-a.controlHeight,e)),{placement:"top",maxHeight:j}}if("bottom"===r)return k(l,M),{placement:"bottom",maxHeight:e};break;case"top":if(x>=d)return{placement:"top",maxHeight:e};if(S>=d&&!s)return o&&E(l,C,A),{placement:"top",maxHeight:e};if(!s&&S>=i||s&&x>=i){var T=e;return(!s&&S>=i||s&&x>=i)&&(T=s?x-y:S-y),o&&E(l,C,A),{placement:"top",maxHeight:T}}return{placement:"bottom",maxHeight:e};default:throw new Error('Invalid placement provided "'.concat(r,'".'))}return c}var _=function(t){return"auto"===t?"bottom":t},L=function(t){var e,n=t.placement,i=t.theme,r=i.borderRadius,s=i.spacing,a=i.colors;return e={label:"menu"},(0,o.A)(e,function(t){return t?{bottom:"top",top:"bottom"}[t]:"bottom"}(n),"100%"),(0,o.A)(e,"backgroundColor",a.neutral0),(0,o.A)(e,"borderRadius",r),(0,o.A)(e,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),(0,o.A)(e,"marginBottom",s.menuGutter),(0,o.A)(e,"marginTop",s.menuGutter),(0,o.A)(e,"position","absolute"),(0,o.A)(e,"width","100%"),(0,o.A)(e,"zIndex",1),e},D=(0,h.createContext)({getPortalPlacement:null}),R=function(t){(0,l.A)(n,t);var e=T(n);function n(){var t;(0,s.A)(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))).state={maxHeight:t.props.maxMenuHeight,placement:null},t.getPlacement=function(e){var n=t.props,i=n.minMenuHeight,r=n.maxMenuHeight,o=n.menuPlacement,s=n.menuPosition,a=n.menuShouldScrollIntoView,l=n.theme;if(e){var c="fixed"===s,u=N({maxHeight:r,menuEl:e,minHeight:i,placement:o,shouldScroll:a&&!c,isFixedPosition:c,theme:l}),h=t.context.getPortalPlacement;h&&h(u),t.setState(u)}},t.getUpdatedProps=function(){var e=t.props.menuPlacement,n=t.state.placement||_(e);return P(P({},t.props),{},{placement:n,maxHeight:t.state.maxHeight})},t}return(0,a.A)(n,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),n}(h.Component);R.contextType=D;var B=function(t){var e=t.maxHeight,n=t.theme.spacing.baseUnit;return{maxHeight:e,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},H=function(t){var e=t.theme,n=e.spacing.baseUnit;return{color:e.colors.neutral40,padding:"".concat(2*n,"px ").concat(3*n,"px"),textAlign:"center"}},z=H,W=H,U=function(t){var e=t.children,n=t.className,i=t.cx,o=t.getStyles,s=t.innerProps;return(0,f.Y)("div",(0,r.A)({css:o("noOptionsMessage",t),className:i({"menu-notice":!0,"menu-notice--no-options":!0},n)},s),e)};U.defaultProps={children:"No options"};var F=function(t){var e=t.children,n=t.className,i=t.cx,o=t.getStyles,s=t.innerProps;return(0,f.Y)("div",(0,r.A)({css:o("loadingMessage",t),className:i({"menu-notice":!0,"menu-notice--loading":!0},n)},s),e)};F.defaultProps={children:"Loading..."};var G=function(t){var e=t.rect,n=t.offset,i=t.position;return{left:e.left,position:i,top:n,width:e.width,zIndex:1}},Z=function(t){(0,l.A)(n,t);var e=T(n);function n(){var t;(0,s.A)(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))).state={placement:null},t.getPortalPlacement=function(e){var n=e.placement;n!==_(t.props.menuPlacement)&&t.setState({placement:n})},t}return(0,a.A)(n,[{key:"render",value:function(){var t=this.props,e=t.appendTo,n=t.children,i=t.controlElement,r=t.menuPlacement,o=t.menuPosition,s=t.getStyles,a="fixed"===o;if(!e&&!a||!i)return null;var l=this.state.placement||_(r),c=function(t){var e=t.getBoundingClientRect();return{bottom:e.bottom,height:e.height,left:e.left,right:e.right,top:e.top,width:e.width}}(i),u=a?0:window.pageYOffset,h={offset:c[l]+u,position:o,rect:c},p=(0,f.Y)("div",{css:s("menuPortal",h)},n);return(0,f.Y)(D.Provider,{value:{getPortalPlacement:this.getPortalPlacement}},e?(0,d.createPortal)(p,e):p)}}]),n}(h.Component),V=Array.isArray,q=Object.keys,Y=Object.prototype.hasOwnProperty;function J(t,e){if(t===e)return!0;if(t&&e&&"object"==(0,p.A)(t)&&"object"==(0,p.A)(e)){var n,i,r,o=V(t),s=V(e);if(o&&s){if((i=t.length)!=e.length)return!1;for(n=i;0!=n--;)if(!J(t[n],e[n]))return!1;return!0}if(o!=s)return!1;var a=t instanceof Date,l=e instanceof Date;if(a!=l)return!1;if(a&&l)return t.getTime()==e.getTime();var c=t instanceof RegExp,u=e instanceof RegExp;if(c!=u)return!1;if(c&&u)return t.toString()==e.toString();var h=q(t);if((i=h.length)!==q(e).length)return!1;for(n=i;0!=n--;)if(!Y.call(e,h[n]))return!1;for(n=i;0!=n--;)if(!("_owner"===(r=h[n])&&t.$$typeof||J(t[r],e[r])))return!1;return!0}return t!=t&&e!=e}function Q(t,e){try{return J(t,e)}catch(n){if(n.message&&n.message.match(/stack|recursion/i))return console.warn("Warning: react-fast-compare does not handle circular references.",n.name,n.message),!1;throw n}}var X=function(t){var e=t.isDisabled;return{label:"container",direction:t.isRtl?"rtl":null,pointerEvents:e?"none":null,position:"relative"}},$=function(t){var e=t.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(e.baseUnit/2,"px ").concat(2*e.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}},K=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}};function tt(){var t=(0,m.A)(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]);return tt=function(){return t},t}var et={name:"19bqh2r",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;"},nt=function(t){var e=t.size,n=(0,i.A)(t,["size"]);return(0,f.Y)("svg",(0,r.A)({height:e,width:e,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:et},n))},it=function(t){return(0,f.Y)(nt,(0,r.A)({size:20},t),(0,f.Y)("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},rt=function(t){return(0,f.Y)(nt,(0,r.A)({size:20},t),(0,f.Y)("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},ot=function(t){var e=t.isFocused,n=t.theme,i=n.spacing.baseUnit,r=n.colors;return{label:"indicatorContainer",color:e?r.neutral60:r.neutral20,display:"flex",padding:2*i,transition:"color 150ms",":hover":{color:e?r.neutral80:r.neutral40}}},st=ot,at=ot,lt=function(t){var e=t.isDisabled,n=t.theme,i=n.spacing.baseUnit,r=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:e?r.neutral10:r.neutral20,marginBottom:2*i,marginTop:2*i,width:1}},ct=(0,f.i7)(tt()),ut=function(t){var e=t.isFocused,n=t.size,i=t.theme,r=i.colors,o=i.spacing.baseUnit;return{label:"loadingIndicator",color:e?r.neutral60:r.neutral20,display:"flex",padding:2*o,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},ht=function(t){var e=t.delay,n=t.offset;return(0,f.Y)("span",{css:(0,g.A)({animation:"".concat(ct," 1s ease-in-out ").concat(e,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":null,height:"1em",verticalAlign:"top",width:"1em"},"")})},ft=function(t){var e=t.className,n=t.cx,i=t.getStyles,o=t.innerProps,s=t.isRtl;return(0,f.Y)("div",(0,r.A)({},o,{css:i("loadingIndicator",t),className:n({indicator:!0,"loading-indicator":!0},e)}),(0,f.Y)(ht,{delay:0,offset:s}),(0,f.Y)(ht,{delay:160,offset:!0}),(0,f.Y)(ht,{delay:320,offset:!s}))};ft.defaultProps={size:4};var dt=function(t){var e=t.isDisabled,n=t.isFocused,i=t.theme,r=i.colors,o=i.borderRadius,s=i.spacing;return{label:"control",alignItems:"center",backgroundColor:e?r.neutral5:r.neutral0,borderColor:e?r.neutral10:n?r.primary:r.neutral20,borderRadius:o,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(r.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:s.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?r.primary:r.neutral30}}};function pt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function gt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?pt(Object(n),!0).forEach((function(e){(0,o.A)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var mt=function(t){var e=t.theme.spacing;return{paddingBottom:2*e.baseUnit,paddingTop:2*e.baseUnit}},bt=function(t){var e=t.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*e.baseUnit,paddingRight:3*e.baseUnit,textTransform:"uppercase"}};function vt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function yt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?vt(Object(n),!0).forEach((function(e){(0,o.A)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var xt=function(t){var e=t.isDisabled,n=t.theme,i=n.spacing,r=n.colors;return{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,visibility:e?"hidden":"visible",color:r.neutral80}},wt=function(t){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:t?0:1,outline:0,padding:0,color:"inherit"}};function St(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Ot(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?St(Object(n),!0).forEach((function(e){(0,o.A)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):St(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var It=function(t){var e=t.theme,n=e.spacing,i=e.borderRadius;return{label:"multiValue",backgroundColor:e.colors.neutral10,borderRadius:i/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},kt=function(t){var e=t.theme,n=e.borderRadius,i=e.colors,r=t.cropWithEllipsis;return{borderRadius:n/2,color:i.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:r?"ellipsis":null,whiteSpace:"nowrap"}},Et=function(t){var e=t.theme,n=e.spacing,i=e.borderRadius,r=e.colors;return{alignItems:"center",borderRadius:i/2,backgroundColor:t.isFocused&&r.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:r.dangerLight,color:r.danger}}},Mt=function(t){var e=t.children,n=t.innerProps;return(0,f.Y)("div",n,e)},Ct=Mt,At=Mt;var jt=function(t){var e=t.children,n=t.className,i=t.components,r=t.cx,o=t.data,s=t.getStyles,a=t.innerProps,l=t.isDisabled,c=t.removeProps,u=t.selectProps,h=i.Container,d=i.Label,p=i.Remove;return(0,f.Y)(f.Z2,null,(function(i){var g=i.css,m=i.cx;return(0,f.Y)(h,{data:o,innerProps:Ot(Ot({},a),{},{className:m(g(s("multiValue",t)),r({"multi-value":!0,"multi-value--is-disabled":l},n))}),selectProps:u},(0,f.Y)(d,{data:o,innerProps:{className:m(g(s("multiValueLabel",t)),r({"multi-value__label":!0},n))},selectProps:u},e),(0,f.Y)(p,{data:o,innerProps:Ot({className:m(g(s("multiValueRemove",t)),r({"multi-value__remove":!0},n))},c),selectProps:u}))}))};jt.defaultProps={cropWithEllipsis:!0};var Pt=function(t){var e=t.isDisabled,n=t.isFocused,i=t.isSelected,r=t.theme,o=r.spacing,s=r.colors;return{label:"option",backgroundColor:i?s.primary:n?s.primary25:"transparent",color:e?s.neutral20:i?s.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*o.baseUnit,"px ").concat(3*o.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!e&&(i?s.primary:s.primary50)}}},Tt=function(t){var e=t.theme,n=e.spacing;return{label:"placeholder",color:e.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},Nt=function(t){var e=t.isDisabled,n=t.theme,i=n.spacing,r=n.colors;return{label:"singleValue",color:e?r.neutral40:r.neutral80,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2,maxWidth:"calc(100% - ".concat(2*i.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}};function _t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Lt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_t(Object(n),!0).forEach((function(e){(0,o.A)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_t(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Dt={ClearIndicator:function(t){var e=t.children,n=t.className,i=t.cx,o=t.getStyles,s=t.innerProps;return(0,f.Y)("div",(0,r.A)({},s,{css:o("clearIndicator",t),className:i({indicator:!0,"clear-indicator":!0},n)}),e||(0,f.Y)(it,null))},Control:function(t){var e=t.children,n=t.cx,i=t.getStyles,o=t.className,s=t.isDisabled,a=t.isFocused,l=t.innerRef,c=t.innerProps,u=t.menuIsOpen;return(0,f.Y)("div",(0,r.A)({ref:l,css:i("control",t),className:n({control:!0,"control--is-disabled":s,"control--is-focused":a,"control--menu-is-open":u},o)},c),e)},DropdownIndicator:function(t){var e=t.children,n=t.className,i=t.cx,o=t.getStyles,s=t.innerProps;return(0,f.Y)("div",(0,r.A)({},s,{css:o("dropdownIndicator",t),className:i({indicator:!0,"dropdown-indicator":!0},n)}),e||(0,f.Y)(rt,null))},DownChevron:rt,CrossIcon:it,Group:function(t){var e=t.children,n=t.className,i=t.cx,o=t.getStyles,s=t.Heading,a=t.headingProps,l=t.label,c=t.theme,u=t.selectProps;return(0,f.Y)("div",{css:o("group",t),className:i({group:!0},n)},(0,f.Y)(s,(0,r.A)({},a,{selectProps:u,theme:c,getStyles:o,cx:i}),l),(0,f.Y)("div",null,e))},GroupHeading:function(t){var e=t.className,n=t.cx,o=t.getStyles,s=t.theme,a=(t.selectProps,(0,i.A)(t,["className","cx","getStyles","theme","selectProps"]));return(0,f.Y)("div",(0,r.A)({css:o("groupHeading",gt({theme:s},a)),className:n({"group-heading":!0},e)},a))},IndicatorsContainer:function(t){var e=t.children,n=t.className,i=t.cx,r=t.getStyles;return(0,f.Y)("div",{css:r("indicatorsContainer",t),className:i({indicators:!0},n)},e)},IndicatorSeparator:function(t){var e=t.className,n=t.cx,i=t.getStyles,o=t.innerProps;return(0,f.Y)("span",(0,r.A)({},o,{css:i("indicatorSeparator",t),className:n({"indicator-separator":!0},e)}))},Input:function(t){var e=t.className,n=t.cx,o=t.getStyles,s=t.innerRef,a=t.isHidden,l=t.isDisabled,c=t.theme,u=(t.selectProps,(0,i.A)(t,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme","selectProps"]));return(0,f.Y)("div",{css:o("input",yt({theme:c},u))},(0,f.Y)(b.A,(0,r.A)({className:n({input:!0},e),inputRef:s,inputStyle:wt(a),disabled:l},u)))},LoadingIndicator:ft,Menu:function(t){var e=t.children,n=t.className,i=t.cx,o=t.getStyles,s=t.innerRef,a=t.innerProps;return(0,f.Y)("div",(0,r.A)({css:o("menu",t),className:i({menu:!0},n)},a,{ref:s}),e)},MenuList:function(t){var e=t.children,n=t.className,i=t.cx,o=t.getStyles,s=t.isMulti,a=t.innerRef,l=t.innerProps;return(0,f.Y)("div",(0,r.A)({css:o("menuList",t),className:i({"menu-list":!0,"menu-list--is-multi":s},n),ref:a},l),e)},MenuPortal:Z,LoadingMessage:F,NoOptionsMessage:U,MultiValue:jt,MultiValueContainer:Ct,MultiValueLabel:At,MultiValueRemove:function(t){var e=t.children,n=t.innerProps;return(0,f.Y)("div",n,e||(0,f.Y)(it,{size:14}))},Option:function(t){var e=t.children,n=t.className,i=t.cx,o=t.getStyles,s=t.isDisabled,a=t.isFocused,l=t.isSelected,c=t.innerRef,u=t.innerProps;return(0,f.Y)("div",(0,r.A)({css:o("option",t),className:i({option:!0,"option--is-disabled":s,"option--is-focused":a,"option--is-selected":l},n),ref:c},u),e)},Placeholder:function(t){var e=t.children,n=t.className,i=t.cx,o=t.getStyles,s=t.innerProps;return(0,f.Y)("div",(0,r.A)({css:o("placeholder",t),className:i({placeholder:!0},n)},s),e)},SelectContainer:function(t){var e=t.children,n=t.className,i=t.cx,o=t.getStyles,s=t.innerProps,a=t.isDisabled,l=t.isRtl;return(0,f.Y)("div",(0,r.A)({css:o("container",t),className:i({"--is-disabled":a,"--is-rtl":l},n)},s),e)},SingleValue:function(t){var e=t.children,n=t.className,i=t.cx,o=t.getStyles,s=t.isDisabled,a=t.innerProps;return(0,f.Y)("div",(0,r.A)({css:o("singleValue",t),className:i({"single-value":!0,"single-value--is-disabled":s},n)},a),e)},ValueContainer:function(t){var e=t.children,n=t.className,i=t.cx,r=t.isMulti,o=t.getStyles,s=t.hasValue;return(0,f.Y)("div",{css:o("valueContainer",t),className:i({"value-container":!0,"value-container--is-multi":r,"value-container--has-value":s},n)},e)}},Rt=function(t){return Lt(Lt({},Dt),t.components)}},4901:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>o});n(7810),n(4313),n(2483);var i=n(1620),r=(n(9959),n(5922),n(3497));n(7161);const o=(0,r.m)(i.S)},3497:(t,e,n)=>{"use strict";n.d(e,{m:()=>d});var i=n(8801),r=n(4180),o=n(9121),s=n(2937),a=n(785),l=n(9906),c=n(8782),u=n(7810);function h(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=(0,c.A)(t);if(e){var r=(0,c.A)(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return(0,l.A)(this,n)}}var f={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},d=function(t){var e,n;return n=e=function(e){(0,a.A)(l,e);var n=h(l);function l(){var t;(0,o.A)(this,l);for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];return(t=n.call.apply(n,[this].concat(i))).select=void 0,t.state={inputValue:void 0!==t.props.inputValue?t.props.inputValue:t.props.defaultInputValue,menuIsOpen:void 0!==t.props.menuIsOpen?t.props.menuIsOpen:t.props.defaultMenuIsOpen,value:void 0!==t.props.value?t.props.value:t.props.defaultValue},t.onChange=function(e,n){t.callProp("onChange",e,n),t.setState({value:e})},t.onInputChange=function(e,n){var i=t.callProp("onInputChange",e,n);t.setState({inputValue:void 0!==i?i:e})},t.onMenuOpen=function(){t.callProp("onMenuOpen"),t.setState({menuIsOpen:!0})},t.onMenuClose=function(){t.callProp("onMenuClose"),t.setState({menuIsOpen:!1})},t}return(0,s.A)(l,[{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"getProp",value:function(t){return void 0!==this.props[t]?this.props[t]:this.state[t]}},{key:"callProp",value:function(t){if("function"==typeof this.props[t]){for(var e,n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return(e=this.props)[t].apply(e,i)}}},{key:"render",value:function(){var e=this,n=this.props,o=(n.defaultInputValue,n.defaultMenuIsOpen,n.defaultValue,(0,i.A)(n,["defaultInputValue","defaultMenuIsOpen","defaultValue"]));return u.createElement(t,(0,r.A)({},o,{ref:function(t){e.select=t},inputValue:this.getProp("inputValue"),menuIsOpen:this.getProp("menuIsOpen"),onChange:this.onChange,onInputChange:this.onInputChange,onMenuClose:this.onMenuClose,onMenuOpen:this.onMenuOpen,value:this.getProp("value")}))}}]),l}(u.Component),e.defaultProps=f,n}},9742:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(7810),o=(i=r)&&i.__esModule?i:{default:i};e.default=function(){return o.default.createElement("svg",{width:"14",height:"11",viewBox:"0 0 14 11"},o.default.createElement("path",{d:"M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0",fill:"#fff",fillRule:"evenodd"}))}},8058:(t,e,n)=>{"use strict";var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(7810),s=f(o),a=f(n(5755)),l=f(n(5826)),c=f(n(9742)),u=f(n(3594)),h=n(1524);function f(t){return t&&t.__esModule?t:{default:t}}var d=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.handleClick=n.handleClick.bind(n),n.handleTouchStart=n.handleTouchStart.bind(n),n.handleTouchMove=n.handleTouchMove.bind(n),n.handleTouchEnd=n.handleTouchEnd.bind(n),n.handleFocus=n.handleFocus.bind(n),n.handleBlur=n.handleBlur.bind(n),n.previouslyChecked=!(!t.checked&&!t.defaultChecked),n.state={checked:!(!t.checked&&!t.defaultChecked),hasFocus:!1},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"componentDidUpdate",value:function(t){t.checked!==this.props.checked&&this.setState({checked:!!this.props.checked})}},{key:"handleClick",value:function(t){if(!this.props.disabled){var e=this.input;if(t.target!==e&&!this.moved)return this.previouslyChecked=e.checked,t.preventDefault(),e.focus(),void e.click();var n=this.props.hasOwnProperty("checked")?this.props.checked:e.checked;this.setState({checked:n})}}},{key:"handleTouchStart",value:function(t){this.props.disabled||(this.startX=(0,h.pointerCoord)(t).x,this.activated=!0)}},{key:"handleTouchMove",value:function(t){if(this.activated&&(this.moved=!0,this.startX)){var e=(0,h.pointerCoord)(t).x;this.state.checked&&e+15<this.startX?(this.setState({checked:!1}),this.startX=e,this.activated=!0):e-15>this.startX&&(this.setState({checked:!0}),this.startX=e,this.activated=e<this.startX+5)}}},{key:"handleTouchEnd",value:function(t){if(this.moved){var e=this.input;if(t.preventDefault(),this.startX){var n=(0,h.pointerCoord)(t).x;!0===this.previouslyChecked&&this.startX+4>n?this.previouslyChecked!==this.state.checked&&(this.setState({checked:!1}),this.previouslyChecked=this.state.checked,e.click()):this.startX-4<n&&this.previouslyChecked!==this.state.checked&&(this.setState({checked:!0}),this.previouslyChecked=this.state.checked,e.click()),this.activated=!1,this.startX=null,this.moved=!1}}}},{key:"handleFocus",value:function(t){var e=this.props.onFocus;e&&e(t),this.setState({hasFocus:!0})}},{key:"handleBlur",value:function(t){var e=this.props.onBlur;e&&e(t),this.setState({hasFocus:!1})}},{key:"getIcon",value:function(t){var n=this.props.icons;return n?void 0===n[t]?e.defaultProps.icons[t]:n[t]:null}},{key:"render",value:function(){var t=this,e=this.props,n=e.className,r=(e.icons,function(t,e){var n={};for(var i in t)e.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(e,["className","icons"])),o=(0,a.default)("react-toggle",{"react-toggle--checked":this.state.checked,"react-toggle--focus":this.state.hasFocus,"react-toggle--disabled":this.props.disabled},n);return s.default.createElement("div",{className:o,onClick:this.handleClick,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd},s.default.createElement("div",{className:"react-toggle-track"},s.default.createElement("div",{className:"react-toggle-track-check"},this.getIcon("checked")),s.default.createElement("div",{className:"react-toggle-track-x"},this.getIcon("unchecked"))),s.default.createElement("div",{className:"react-toggle-thumb"}),s.default.createElement("input",i({},r,{ref:function(e){t.input=e},onFocus:this.handleFocus,onBlur:this.handleBlur,className:"react-toggle-screenreader-only",type:"checkbox"})))}}]),e}(o.PureComponent);e.A=d,d.displayName="Toggle",d.defaultProps={icons:{checked:s.default.createElement(c.default,null),unchecked:s.default.createElement(u.default,null)}},d.propTypes={checked:l.default.bool,disabled:l.default.bool,defaultChecked:l.default.bool,onChange:l.default.func,onFocus:l.default.func,onBlur:l.default.func,className:l.default.string,name:l.default.string,value:l.default.string,id:l.default.string,"aria-labelledby":l.default.string,"aria-label":l.default.string,icons:l.default.oneOfType([l.default.bool,l.default.shape({checked:l.default.node,unchecked:l.default.node})])}},1524:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pointerCoord=function(t){if(t){var e=t.changedTouches;if(e&&e.length>0){var n=e[0];return{x:n.clientX,y:n.clientY}}var i=t.pageX;if(void 0!==i)return{x:i,y:t.pageY}}return{x:0,y:0}}},3594:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(7810),o=(i=r)&&i.__esModule?i:{default:i};e.default=function(){return o.default.createElement("svg",{width:"10",height:"10",viewBox:"0 0 10 10"},o.default.createElement("path",{d:"M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12",fill:"#fff",fillRule:"evenodd"}))}},3394:(t,e,n)=>{"use strict";var i=n(7810),r=Symbol.for("react.element"),o=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};
/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/function c(t,e,n){var i,o={},c=null,u=null;for(i in void 0!==n&&(c=""+n),void 0!==e.key&&(c=""+e.key),void 0!==e.ref&&(u=e.ref),e)s.call(e,i)&&!l.hasOwnProperty(i)&&(o[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps)void 0===o[i]&&(o[i]=e[i]);return{$$typeof:r,type:t,key:c,ref:u,props:o,_owner:a.current}}e.jsx=c},4922:(t,e,n)=>{"use strict";t.exports=n(3394)},5686:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.autoprefix=void 0;var i,r=n(1633),o=(i=r)&&i.__esModule?i:{default:i},s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};var a={borderRadius:function(t){return{msBorderRadius:t,MozBorderRadius:t,OBorderRadius:t,WebkitBorderRadius:t,borderRadius:t}},boxShadow:function(t){return{msBoxShadow:t,MozBoxShadow:t,OBoxShadow:t,WebkitBoxShadow:t,boxShadow:t}},userSelect:function(t){return{WebkitTouchCallout:t,KhtmlUserSelect:t,MozUserSelect:t,msUserSelect:t,WebkitUserSelect:t,userSelect:t}},flex:function(t){return{WebkitBoxFlex:t,MozBoxFlex:t,WebkitFlex:t,msFlex:t,flex:t}},flexBasis:function(t){return{WebkitFlexBasis:t,flexBasis:t}},justifyContent:function(t){return{WebkitJustifyContent:t,justifyContent:t}},transition:function(t){return{msTransition:t,MozTransition:t,OTransition:t,WebkitTransition:t,transition:t}},transform:function(t){return{msTransform:t,MozTransform:t,OTransform:t,WebkitTransform:t,transform:t}},absolute:function(t){var e=t&&t.split(" ");return{position:"absolute",top:e&&e[0],right:e&&e[1],bottom:e&&e[2],left:e&&e[3]}},extend:function(t,e){var n=e[t];return n||{extend:t}}},l=e.autoprefix=function(t){var e={};return(0,o.default)(t,(function(t,n){var i={};(0,o.default)(t,(function(t,e){var n=a[e];n?i=s({},i,n(t)):i[e]=t})),e[n]=i})),e};e.default=l},9970:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.active=void 0;var i,r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},o=n(7810),s=(i=o)&&i.__esModule?i:{default:i};function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var l=e.active=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function i(){var n,o,l;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);for(var c=arguments.length,u=Array(c),h=0;h<c;h++)u[h]=arguments[h];return o=l=a(this,(n=i.__proto__||Object.getPrototypeOf(i)).call.apply(n,[this].concat(u))),l.state={active:!1},l.handleMouseDown=function(){return l.setState({active:!0})},l.handleMouseUp=function(){return l.setState({active:!1})},l.render=function(){return s.default.createElement(e,{onMouseDown:l.handleMouseDown,onMouseUp:l.handleMouseUp},s.default.createElement(t,r({},l.props,l.state)))},a(l,o)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(i,n),i}(s.default.Component)};e.default=l},6444:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hover=void 0;var i,r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},o=n(7810),s=(i=o)&&i.__esModule?i:{default:i};function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var l=e.hover=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function i(){var n,o,l;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);for(var c=arguments.length,u=Array(c),h=0;h<c;h++)u[h]=arguments[h];return o=l=a(this,(n=i.__proto__||Object.getPrototypeOf(i)).call.apply(n,[this].concat(u))),l.state={hover:!1},l.handleMouseOver=function(){return l.setState({hover:!0})},l.handleMouseOut=function(){return l.setState({hover:!1})},l.render=function(){return s.default.createElement(e,{onMouseOver:l.handleMouseOver,onMouseOut:l.handleMouseOut},s.default.createElement(t,r({},l.props,l.state)))},a(l,o)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(i,n),i}(s.default.Component)};e.default=l},2471:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.flattenNames=void 0;var i=a(n(3085)),r=a(n(1633)),o=a(n(1449)),s=a(n(7528));function a(t){return t&&t.__esModule?t:{default:t}}var l=e.flattenNames=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,s.default)(e,(function(e){Array.isArray(e)?t(e).map((function(t){return n.push(t)})):(0,o.default)(e)?(0,r.default)(e,(function(t,e){!0===t&&n.push(e),n.push(e+"-"+t)})):(0,i.default)(e)&&n.push(e)})),n};e.default=l},9325:(t,e,n)=>{"use strict";e.H8=void 0;var i=c(n(2471)),r=c(n(3705)),o=c(n(5686)),s=c(n(6444)),a=c(n(9970)),l=c(n(6491));function c(t){return t&&t.__esModule?t:{default:t}}s.default,e.H8=s.default,a.default,l.default;var u=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),s=1;s<e;s++)n[s-1]=arguments[s];var a=(0,i.default)(n),l=(0,r.default)(t,a);return(0,o.default)(l)};e.Ay=u},6491:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t,e){var n={},i=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];n[t]=e};return 0===t&&i("first-child"),t===e-1&&i("last-child"),(0===t||t%2==0)&&i("even"),1===Math.abs(t%2)&&i("odd"),i("nth-child",t),n}},3705:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mergeClasses=void 0;var i=s(n(1633)),r=s(n(3009)),o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};function s(t){return t&&t.__esModule?t:{default:t}}var a=e.mergeClasses=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=t.default&&(0,r.default)(t.default)||{};return e.map((function(e){var r=t[e];return r&&(0,i.default)(r,(function(t,e){n[e]||(n[e]={}),n[e]=o({},n[e],r[e])})),e})),n};e.default=a},4519:(t,e,n)=>{var i;!function(r){var o=/^\s+/,s=/\s+$/,a=0,l=r.round,c=r.min,u=r.max,h=r.random;function f(t,e){if(e=e||{},(t=t||"")instanceof f)return t;if(!(this instanceof f))return new f(t,e);var n=function(t){var e={r:0,g:0,b:0},n=1,i=null,a=null,l=null,h=!1,f=!1;"string"==typeof t&&(t=function(t){t=t.replace(o,"").replace(s,"").toLowerCase();var e,n=!1;if(j[t])t=j[t],n=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(e=F.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=F.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=F.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=F.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=F.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=F.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=F.hex8.exec(t))return{r:L(e[1]),g:L(e[2]),b:L(e[3]),a:H(e[4]),format:n?"name":"hex8"};if(e=F.hex6.exec(t))return{r:L(e[1]),g:L(e[2]),b:L(e[3]),format:n?"name":"hex"};if(e=F.hex4.exec(t))return{r:L(e[1]+""+e[1]),g:L(e[2]+""+e[2]),b:L(e[3]+""+e[3]),a:H(e[4]+""+e[4]),format:n?"name":"hex8"};if(e=F.hex3.exec(t))return{r:L(e[1]+""+e[1]),g:L(e[2]+""+e[2]),b:L(e[3]+""+e[3]),format:n?"name":"hex"};return!1}(t));"object"==typeof t&&(G(t.r)&&G(t.g)&&G(t.b)?(d=t.r,p=t.g,g=t.b,e={r:255*N(d,255),g:255*N(p,255),b:255*N(g,255)},h=!0,f="%"===String(t.r).substr(-1)?"prgb":"rgb"):G(t.h)&&G(t.s)&&G(t.v)?(i=R(t.s),a=R(t.v),e=function(t,e,n){t=6*N(t,360),e=N(e,100),n=N(n,100);var i=r.floor(t),o=t-i,s=n*(1-e),a=n*(1-o*e),l=n*(1-(1-o)*e),c=i%6,u=[n,a,s,s,l,n][c],h=[l,n,n,a,s,s][c],f=[s,s,l,n,n,a][c];return{r:255*u,g:255*h,b:255*f}}(t.h,i,a),h=!0,f="hsv"):G(t.h)&&G(t.s)&&G(t.l)&&(i=R(t.s),l=R(t.l),e=function(t,e,n){var i,r,o;function s(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}if(t=N(t,360),e=N(e,100),n=N(n,100),0===e)i=r=o=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=s(l,a,t+1/3),r=s(l,a,t),o=s(l,a,t-1/3)}return{r:255*i,g:255*r,b:255*o}}(t.h,i,l),h=!0,f="hsl"),t.hasOwnProperty("a")&&(n=t.a));var d,p,g;return n=T(n),{ok:h,format:t.format||f,r:c(255,u(e.r,0)),g:c(255,u(e.g,0)),b:c(255,u(e.b,0)),a:n}}(t);this._originalInput=t,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=e.format||n.format,this._gradientType=e.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=n.ok,this._tc_id=a++}function d(t,e,n){t=N(t,255),e=N(e,255),n=N(n,255);var i,r,o=u(t,e,n),s=c(t,e,n),a=(o+s)/2;if(o==s)i=r=0;else{var l=o-s;switch(r=a>.5?l/(2-o-s):l/(o+s),o){case t:i=(e-n)/l+(e<n?6:0);break;case e:i=(n-t)/l+2;break;case n:i=(t-e)/l+4}i/=6}return{h:i,s:r,l:a}}function p(t,e,n){t=N(t,255),e=N(e,255),n=N(n,255);var i,r,o=u(t,e,n),s=c(t,e,n),a=o,l=o-s;if(r=0===o?0:l/o,o==s)i=0;else{switch(o){case t:i=(e-n)/l+(e<n?6:0);break;case e:i=(n-t)/l+2;break;case n:i=(t-e)/l+4}i/=6}return{h:i,s:r,v:a}}function g(t,e,n,i){var r=[D(l(t).toString(16)),D(l(e).toString(16)),D(l(n).toString(16))];return i&&r[0].charAt(0)==r[0].charAt(1)&&r[1].charAt(0)==r[1].charAt(1)&&r[2].charAt(0)==r[2].charAt(1)?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function m(t,e,n,i){return[D(B(i)),D(l(t).toString(16)),D(l(e).toString(16)),D(l(n).toString(16))].join("")}function b(t,e){e=0===e?0:e||10;var n=f(t).toHsl();return n.s-=e/100,n.s=_(n.s),f(n)}function v(t,e){e=0===e?0:e||10;var n=f(t).toHsl();return n.s+=e/100,n.s=_(n.s),f(n)}function y(t){return f(t).desaturate(100)}function x(t,e){e=0===e?0:e||10;var n=f(t).toHsl();return n.l+=e/100,n.l=_(n.l),f(n)}function w(t,e){e=0===e?0:e||10;var n=f(t).toRgb();return n.r=u(0,c(255,n.r-l(-e/100*255))),n.g=u(0,c(255,n.g-l(-e/100*255))),n.b=u(0,c(255,n.b-l(-e/100*255))),f(n)}function S(t,e){e=0===e?0:e||10;var n=f(t).toHsl();return n.l-=e/100,n.l=_(n.l),f(n)}function O(t,e){var n=f(t).toHsl(),i=(n.h+e)%360;return n.h=i<0?360+i:i,f(n)}function I(t){var e=f(t).toHsl();return e.h=(e.h+180)%360,f(e)}function k(t){var e=f(t).toHsl(),n=e.h;return[f(t),f({h:(n+120)%360,s:e.s,l:e.l}),f({h:(n+240)%360,s:e.s,l:e.l})]}function E(t){var e=f(t).toHsl(),n=e.h;return[f(t),f({h:(n+90)%360,s:e.s,l:e.l}),f({h:(n+180)%360,s:e.s,l:e.l}),f({h:(n+270)%360,s:e.s,l:e.l})]}function M(t){var e=f(t).toHsl(),n=e.h;return[f(t),f({h:(n+72)%360,s:e.s,l:e.l}),f({h:(n+216)%360,s:e.s,l:e.l})]}function C(t,e,n){e=e||6,n=n||30;var i=f(t).toHsl(),r=360/n,o=[f(t)];for(i.h=(i.h-(r*e>>1)+720)%360;--e;)i.h=(i.h+r)%360,o.push(f(i));return o}function A(t,e){e=e||6;for(var n=f(t).toHsv(),i=n.h,r=n.s,o=n.v,s=[],a=1/e;e--;)s.push(f({h:i,s:r,v:o})),o=(o+a)%1;return s}f.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,n,i=this.toRgb();return t=i.r/255,e=i.g/255,n=i.b/255,.2126*(t<=.03928?t/12.92:r.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:r.pow((e+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:r.pow((n+.055)/1.055,2.4))},setAlpha:function(t){return this._a=T(t),this._roundA=l(100*this._a)/100,this},toHsv:function(){var t=p(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=p(this._r,this._g,this._b),e=l(360*t.h),n=l(100*t.s),i=l(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+i+"%)":"hsva("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=d(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=d(this._r,this._g,this._b),e=l(360*t.h),n=l(100*t.s),i=l(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+i+"%)":"hsla("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return g(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,n,i,r){var o=[D(l(t).toString(16)),D(l(e).toString(16)),D(l(n).toString(16)),D(B(i))];if(r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*N(this._r,255))+"%",g:l(100*N(this._g,255))+"%",b:l(100*N(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*N(this._r,255))+"%, "+l(100*N(this._g,255))+"%, "+l(100*N(this._b,255))+"%)":"rgba("+l(100*N(this._r,255))+"%, "+l(100*N(this._g,255))+"%, "+l(100*N(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(P[g(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+m(this._r,this._g,this._b,this._a),n=e,i=this._gradientType?"GradientType = 1, ":"";if(t){var r=f(t);n="#"+m(r._r,r._g,r._b,r._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+n+")"},toString:function(t){var e=!!t;t=t||this._format;var n=!1,i=this._a<1&&this._a>=0;return e||!i||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(n=this.toRgbString()),"prgb"===t&&(n=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(n=this.toHexString()),"hex3"===t&&(n=this.toHexString(!0)),"hex4"===t&&(n=this.toHex8String(!0)),"hex8"===t&&(n=this.toHex8String()),"name"===t&&(n=this.toName()),"hsl"===t&&(n=this.toHslString()),"hsv"===t&&(n=this.toHsvString()),n||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return f(this.toString())},_applyModification:function(t,e){var n=t.apply(null,[this].concat([].slice.call(e)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(x,arguments)},brighten:function(){return this._applyModification(w,arguments)},darken:function(){return this._applyModification(S,arguments)},desaturate:function(){return this._applyModification(b,arguments)},saturate:function(){return this._applyModification(v,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(O,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(C,arguments)},complement:function(){return this._applyCombination(I,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(k,arguments)},tetrad:function(){return this._applyCombination(E,arguments)}},f.fromRatio=function(t,e){if("object"==typeof t){var n={};for(var i in t)t.hasOwnProperty(i)&&(n[i]="a"===i?t[i]:R(t[i]));t=n}return f(t,e)},f.equals=function(t,e){return!(!t||!e)&&f(t).toRgbString()==f(e).toRgbString()},f.random=function(){return f.fromRatio({r:h(),g:h(),b:h()})},f.mix=function(t,e,n){n=0===n?0:n||50;var i=f(t).toRgb(),r=f(e).toRgb(),o=n/100;return f({r:(r.r-i.r)*o+i.r,g:(r.g-i.g)*o+i.g,b:(r.b-i.b)*o+i.b,a:(r.a-i.a)*o+i.a})},f.readability=function(t,e){var n=f(t),i=f(e);return(r.max(n.getLuminance(),i.getLuminance())+.05)/(r.min(n.getLuminance(),i.getLuminance())+.05)},f.isReadable=function(t,e,n){var i,r,o=f.readability(t,e);switch(r=!1,(i=function(t){var e,n;e=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA");"small"!==n&&"large"!==n&&(n="small");return{level:e,size:n}}(n)).level+i.size){case"AAsmall":case"AAAlarge":r=o>=4.5;break;case"AAlarge":r=o>=3;break;case"AAAsmall":r=o>=7}return r},f.mostReadable=function(t,e,n){var i,r,o,s,a=null,l=0;r=(n=n||{}).includeFallbackColors,o=n.level,s=n.size;for(var c=0;c<e.length;c++)(i=f.readability(t,e[c]))>l&&(l=i,a=f(e[c]));return f.isReadable(t,a,{level:o,size:s})||!r?a:(n.includeFallbackColors=!1,f.mostReadable(t,["#fff","#000"],n))};var j=f.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},P=f.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(j);function T(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function N(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var n=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=c(e,u(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),r.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function _(t){return c(1,u(0,t))}function L(t){return parseInt(t,16)}function D(t){return 1==t.length?"0"+t:""+t}function R(t){return t<=1&&(t=100*t+"%"),t}function B(t){return r.round(255*parseFloat(t)).toString(16)}function H(t){return L(t)/255}var z,W,U,F=(W="[\\s|\\(]+("+(z="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+z+")[,|\\s]+("+z+")\\s*\\)?",U="[\\s|\\(]+("+z+")[,|\\s]+("+z+")[,|\\s]+("+z+")[,|\\s]+("+z+")\\s*\\)?",{CSS_UNIT:new RegExp(z),rgb:new RegExp("rgb"+W),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+W),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+W),hsva:new RegExp("hsva"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function G(t){return!!F.CSS_UNIT.exec(t)}t.exports?t.exports=f:void 0===(i=function(){return f}.call(e,n,e,t))||(t.exports=i)}(Math)},5494:(t,e,n)=>{"use strict";n.d(e,{A:()=>k});var i=n(7810),r=t=>"string"!=typeof t?{}:t.split(/ ?; ?/).reduce(((t,e)=>{const[n,i]=e.split(/ ?: ?/).map(((t,e)=>0===e?t.replace(/\s+/g,""):t.trim()));if(n&&i){const e=n.replace(/(\w)-(\w)/g,((t,e,n)=>`${e}${n.toUpperCase()}`));let r=i.trim();Number.isNaN(Number(i))||(r=Number(i)),t[n.startsWith("-")?n:e]=r}return t}),{});var o=["br","col","colgroup","dl","hr","iframe","img","input","link","menuitem","meta","ol","param","select","table","tbody","tfoot","thead","tr","ul","wbr"],s={"accept-charset":"acceptCharset",acceptcharset:"acceptCharset",accesskey:"accessKey",allowfullscreen:"allowFullScreen",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",cellpadding:"cellPadding",cellspacing:"cellSpacing",charset:"charSet",class:"className",classid:"classID",classname:"className",colspan:"colSpan",contenteditable:"contentEditable",contextmenu:"contextMenu",controlslist:"controlsList",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",datetime:"dateTime",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",enctype:"encType",for:"htmlFor",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",innerhtml:"innerHTML",inputmode:"inputMode",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",marginwidth:"marginWidth",marginheight:"marginHeight",maxlength:"maxLength",mediagroup:"mediaGroup",minlength:"minLength",nomodule:"noModule",novalidate:"noValidate",playsinline:"playsInline",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rowspan:"rowSpan",spellcheck:"spellCheck",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex",typemustmatch:"typeMustMatch",usemap:"useMap",accentheight:"accentHeight","accent-height":"accentHeight",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",arabicform:"arabicForm","arabic-form":"arabicForm",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",diffuseconstant:"diffuseConstant",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",edgemode:"edgeMode",enablebackground:"enableBackground","enable-background":"enableBackground",externalresourcesrequired:"externalResourcesRequired",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",imagerendering:"imageRendering","image-rendering":"imageRendering",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",vmathematical:"vMathematical","v-mathematical":"vMathematical",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan",onblur:"onBlur",onchange:"onChange",onclick:"onClick",oncontextmenu:"onContextMenu",ondoubleclick:"onDoubleClick",ondrag:"onDrag",ondragend:"onDragEnd",ondragenter:"onDragEnter",ondragexit:"onDragExit",ondragleave:"onDragLeave",ondragover:"onDragOver",ondragstart:"onDragStart",ondrop:"onDrop",onerror:"onError",onfocus:"onFocus",oninput:"onInput",oninvalid:"onInvalid",onkeydown:"onKeyDown",onkeypress:"onKeyPress",onkeyup:"onKeyUp",onload:"onLoad",onmousedown:"onMouseDown",onmouseenter:"onMouseEnter",onmouseleave:"onMouseLeave",onmousemove:"onMouseMove",onmouseout:"onMouseOut",onmouseover:"onMouseOver",onmouseup:"onMouseUp",onscroll:"onScroll",onsubmit:"onSubmit",ontouchcancel:"onTouchCancel",ontouchend:"onTouchEnd",ontouchmove:"onTouchMove",ontouchstart:"onTouchStart",onwheel:"onWheel"};function a(t,e){const{key:n,level:a,...c}=e;switch(t.nodeType){case 1:return i.createElement(function(t){if(/[a-z]+[A-Z]+[a-z]+/.test(t))return t;return t.toLowerCase()}(t.nodeName),function(t,e){const n={key:e};if(t instanceof Element){const e=t.getAttribute("class");e&&(n.className=e),[...t.attributes].forEach((t=>{switch(t.name){case"class":break;case"style":n[t.name]=r(t.value);break;case"allowfullscreen":case"allowpaymentrequest":case"async":case"autofocus":case"autoplay":case"checked":case"controls":case"default":case"defer":case"disabled":case"formnovalidate":case"hidden":case"ismap":case"itemscope":case"loop":case"multiple":case"muted":case"nomodule":case"novalidate":case"open":case"readonly":case"required":case"reversed":case"selected":case"typemustmatch":n[s[t.name]||t.name]=!0;break;default:n[s[t.name]||t.name]=t.value}}))}return n}(t,n),l(t.childNodes,a,c));case 3:{const e=t.nodeValue?.toString()??"";if(!c.allowWhiteSpaces&&/^\s+$/.test(e)&&!/[\u00A0\u202F]/.test(e))return null;if(!t.parentNode)return e;const n=t.parentNode.nodeName.toLowerCase();return o.includes(n)?(/\S/.test(e)&&console.warn(`A textNode is not allowed inside '${n}'. Your text "${e}" will be ignored`),null):e}case 8:default:return null;case 11:return l(t.childNodes,a,e)}}function l(t,e,n){const i=[...t].map(((t,i)=>c(t,{...n,index:i,level:e+1}))).filter(Boolean);return i.length?i:null}function c(t,e={}){if(!(t&&t instanceof Node))return null;const{actions:n=[],index:i=0,level:r=0,randomKey:o}=e;let s=t,l=`${r}-${i}`;const c=[];return o&&0===r&&(l=`${function(t=6){const e="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";let n="";for(let i=t;i>0;--i)n+=e[Math.round(61*Math.random())];return n}()}-${l}`),Array.isArray(n)&&n.forEach((e=>{e.condition(s,l,r)&&("function"==typeof e.pre&&(s=e.pre(s,l,r),s instanceof Node||(s=t)),"function"==typeof e.post&&c.push(e.post(s,l,r)))})),c.length?c:a(s,{key:l,level:r,...e})}function u(t,e={}){return"string"==typeof t?function(t,e={}){if(!t||"string"!=typeof t)return null;const{includeAllNodes:n=!1,nodeOnly:i=!1,selector:r="body > *",type:o="text/html"}=e;try{const s=(new DOMParser).parseFromString(t,o);if(n){const{childNodes:t}=s.body;return i?t:[...t].map((t=>c(t,e)))}const a=s.querySelector(r)||s.body.childNodes[0];if(!(a instanceof Node))throw new TypeError("Error parsing input");return i?a:c(a,e)}catch(s){}return null}(t,e):t instanceof Node?c(t,e):null}var h=Object.defineProperty,f=(t,e,n)=>((t,e,n)=>e in t?h(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n),d="react-inlinesvg",p={IDLE:"idle",LOADING:"loading",LOADED:"loaded",FAILED:"failed",READY:"ready",UNSUPPORTED:"unsupported"};function g(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}function m(){return function(){if(!document)return!1;const t=document.createElement("div");t.innerHTML="<svg />";const e=t.firstChild;return!!e&&"http://www.w3.org/2000/svg"===e.namespaceURI}()&&"undefined"!=typeof window&&null!==window}async function b(t,e){const n=await fetch(t,e),i=n.headers.get("content-type"),[r]=(i??"").split(/ ?; ?/);if(n.status>299)throw new Error("Not found");if(!["image/svg+xml","text/plain"].some((t=>r.includes(t))))throw new Error(`Content type isn't valid: ${r}`);return n.text()}function v(t=1){return new Promise((e=>{setTimeout(e,1e3*t)}))}var y,x=class{constructor(){f(this,"cacheApi"),f(this,"cacheStore"),f(this,"subscribers",[]),f(this,"isReady",!1),this.cacheStore=new Map;let t=d,e=!1;g()&&(t=window.REACT_INLINESVG_CACHE_NAME??d,e=!!window.REACT_INLINESVG_PERSISTENT_CACHE&&"caches"in window),e?caches.open(t).then((t=>{this.cacheApi=t})).catch((t=>{console.error(`Failed to open cache: ${t.message}`)})).finally((()=>{this.isReady=!0,this.subscribers.forEach((t=>t()))})):this.isReady=!0}onReady(t){this.isReady?t():this.subscribers.push(t)}async get(t,e){return await(this.cacheApi?this.fetchAndAddToPersistentCache(t,e):this.fetchAndAddToInternalCache(t,e)),this.cacheStore.get(t)?.content??""}set(t,e){this.cacheStore.set(t,e)}isCached(t){return this.cacheStore.get(t)?.status===p.LOADED}async fetchAndAddToInternalCache(t,e){const n=this.cacheStore.get(t);if(n?.status!==p.LOADING){if(!n?.content){this.cacheStore.set(t,{content:"",status:p.LOADING});try{const n=await b(t,e);this.cacheStore.set(t,{content:n,status:p.LOADED})}catch(i){throw this.cacheStore.set(t,{content:"",status:p.FAILED}),i}}}else await this.handleLoading(t,(async()=>{this.cacheStore.set(t,{content:"",status:p.IDLE}),await this.fetchAndAddToInternalCache(t,e)}))}async fetchAndAddToPersistentCache(t,e){const n=this.cacheStore.get(t);if(n?.status===p.LOADED)return;if(n?.status===p.LOADING)return void(await this.handleLoading(t,(async()=>{this.cacheStore.set(t,{content:"",status:p.IDLE}),await this.fetchAndAddToPersistentCache(t,e)})));this.cacheStore.set(t,{content:"",status:p.LOADING});const i=await(this.cacheApi?.match(t));if(i){const e=await i.text();this.cacheStore.set(t,{content:e,status:p.LOADED})}else try{await(this.cacheApi?.add(new Request(t,e)));const n=await(this.cacheApi?.match(t)),i=await(n?.text())??"";this.cacheStore.set(t,{content:i,status:p.LOADED})}catch(r){throw this.cacheStore.set(t,{content:"",status:p.FAILED}),r}}async handleLoading(t,e){let n=0;for(;this.cacheStore.get(t)?.status===p.LOADING&&n<10;)await v(.1),n+=1;n>=10&&await e()}keys(){return[...this.cacheStore.keys()]}data(){return[...this.cacheStore.entries()].map((([t,e])=>({[t]:e})))}async delete(t){this.cacheApi&&await this.cacheApi.delete(t),this.cacheStore.delete(t)}async clear(){if(this.cacheApi){const t=await this.cacheApi.keys();for(const e of t)await this.cacheApi.delete(e)}this.cacheStore.clear()}};function w(t){const e=(0,i.useRef)();return(0,i.useEffect)((()=>{e.current=t})),e.current}function S(t){const{baseURL:e,content:n,description:i,handleError:r,hash:o,preProcessor:s,title:a,uniquifyIDs:l=!1}=t;try{const t=function(t,e){if(e)return e(t);return t}(n,s),r=u(t,{nodeOnly:!0});if(!(r&&r instanceof SVGSVGElement))throw new Error("Could not convert the src to a DOM Node");const c=O(r,{baseURL:e,hash:o,uniquifyIDs:l});if(i){const t=c.querySelector("desc");t?.parentNode&&t.parentNode.removeChild(t);const e=document.createElementNS("http://www.w3.org/2000/svg","desc");e.innerHTML=i,c.prepend(e)}if(void 0!==a){const t=c.querySelector("title");if(t?.parentNode&&t.parentNode.removeChild(t),a){const t=document.createElementNS("http://www.w3.org/2000/svg","title");t.innerHTML=a,c.prepend(t)}}return c}catch(c){return r(c)}}function O(t,e){const{baseURL:n="",hash:i,uniquifyIDs:r}=e,o=["id","href","xlink:href","xlink:role","xlink:arcrole"],s=["href","xlink:href"];return r?([...t.children].forEach((t=>{if(t.attributes?.length){const e=Object.values(t.attributes).map((t=>{const e=t,r=/url\((.*?)\)/.exec(t.value);return r?.[1]&&(e.value=t.value.replace(r[0],`url(${n}${r[1]}__${i})`)),e}));o.forEach((t=>{const n=e.find((e=>e.name===t));var r,o;n&&(r=t,o=n.value,!s.includes(r)||!o||o.includes("#"))&&(n.value=`${n.value}__${i}`)}))}return t.children.length?O(t,e):t})),t):t}function I(t){const{cacheRequests:e=!0,children:n=null,description:r,fetchOptions:o,innerRef:s,loader:a=null,onError:l,onLoad:c,src:h,title:f,uniqueHash:d}=t,[v,x]=(0,i.useReducer)(((t,e)=>({...t,...e})),{content:"",element:null,isCached:e&&y.isCached(t.src),status:p.IDLE}),{content:O,element:I,isCached:k,status:E}=v,M=w(t),C=w(v),A=(0,i.useRef)(d??function(t){const e="abcdefghijklmnopqrstuvwxyz",n=`${e}${e.toUpperCase()}1234567890`;let i="";for(let o=0;o<t;o++)i+=(r=n)[Math.floor(Math.random()*r.length)];var r;return i}(8)),j=(0,i.useRef)(!1),P=(0,i.useRef)(!1),T=(0,i.useCallback)((t=>{j.current&&(x({status:"Browser does not support SVG"===t.message?p.UNSUPPORTED:p.FAILED}),l?.(t))}),[l]),N=(0,i.useCallback)(((t,e=!1)=>{j.current&&x({content:t,isCached:e,status:p.LOADED})}),[]),_=(0,i.useCallback)((async()=>{const t=await b(h,o);N(t)}),[o,N,h]),L=(0,i.useCallback)((()=>{try{const e=u(S({...t,handleError:T,hash:A.current,content:O}));if(!e||!(0,i.isValidElement)(e))throw new Error("Could not convert the src to a React element");x({element:e,status:p.READY})}catch(e){T(new Error(e.message))}}),[O,T,t]),D=(0,i.useCallback)((async()=>{const t=/^data:image\/svg[^,]*?(;base64)?,(.*)/u.exec(h);let n;if(t?n=t[1]?window.atob(t[2]):decodeURIComponent(t[2]):h.includes("<svg")&&(n=h),n)N(n);else try{if(e){const t=await y.get(h,o);N(t,!0)}else await _()}catch(i){T(i)}}),[e,_,o,T,N,h]),R=(0,i.useCallback)((async()=>{j.current&&x({content:"",element:null,isCached:!1,status:p.LOADING})}),[]);(0,i.useEffect)((()=>{if(j.current=!0,!g()||P.current)return()=>{};try{if(E===p.IDLE){if(!m())throw new Error("Browser does not support SVG");if(!h)throw new Error("Missing src");R()}}catch(t){T(t)}return P.current=!0,()=>{j.current=!1}}),[]),(0,i.useEffect)((()=>{if(g()&&M)if(M.src!==h){if(!h)return void T(new Error("Missing src"));R()}else M.title===f&&M.description===r||L()}),[r,L,T,R,M,h,f]),(0,i.useEffect)((()=>{C&&(C.status!==p.LOADING&&E===p.LOADING&&D(),C.status!==p.LOADED&&E===p.LOADED&&L(),C.status!==p.READY&&E===p.READY&&c?.(h,k))}),[D,L,k,c,C,h,E]);const B=function(t,...e){const n={};for(const i in t)({}).hasOwnProperty.call(t,i)&&(e.includes(i)||(n[i]=t[i]));return n}(t,"baseURL","cacheRequests","children","description","fetchOptions","innerRef","loader","onError","onLoad","preProcessor","src","title","uniqueHash","uniquifyIDs");return g()?I?(0,i.cloneElement)(I,{ref:s,...B}):[p.UNSUPPORTED,p.FAILED].includes(E)?n:a:a}function k(t){y||(y=new x);const{loader:e}=t,n=(0,i.useRef)(!1),[r,o]=(0,i.useState)(y.isReady);return(0,i.useEffect)((()=>{n.current||(y.onReady((()=>{o(!0)})),n.current=!0)}),[]),r?i.createElement(I,{...t}):e}},5413:(t,e,n)=>{"use strict";function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}n.d(e,{A:()=>i})},1717:(t,e,n)=>{"use strict";function i(t){if(Array.isArray(t))return t}n.d(e,{A:()=>i})},2247:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});var i=n(5413);function r(t){if(Array.isArray(t))return(0,i.A)(t)}},9261:(t,e,n)=>{"use strict";function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,{A:()=>i})},9121:(t,e,n)=>{"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,{A:()=>i})},2937:(t,e,n)=>{"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function r(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}n.d(e,{A:()=>r})},8175:(t,e,n)=>{"use strict";function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,{A:()=>i})},4180:(t,e,n)=>{"use strict";function i(){return i=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},i.apply(this,arguments)}n.d(e,{A:()=>i})},8782:(t,e,n)=>{"use strict";function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}n.d(e,{A:()=>i})},785:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});var i=n(2722);function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&(0,i.A)(t,e)}},5209:(t,e,n)=>{"use strict";function i(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}n.d(e,{A:()=>i})},5566:(t,e,n)=>{"use strict";function i(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(i=n.next()).done)&&(o.push(i.value),!e||o.length!==e);s=!0);}catch(l){a=!0,r=l}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}}n.d(e,{A:()=>i})},3886:(t,e,n)=>{"use strict";function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(e,{A:()=>i})},3699:(t,e,n)=>{"use strict";function i(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(e,{A:()=>i})},8801:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});var i=n(6887);function r(t,e){if(null==t)return{};var n,r,o=(0,i.A)(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(r=0;r<s.length;r++)n=s[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}},6887:(t,e,n)=>{"use strict";function i(t,e){if(null==t)return{};var n,i,r={},o=Object.keys(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||(r[n]=t[n]);return r}n.d(e,{A:()=>i})},9906:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var i=n(4360),r=n(9261);function o(t,e){if(e&&("object"===(0,i.A)(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return(0,r.A)(t)}},2722:(t,e,n)=>{"use strict";function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}n.d(e,{A:()=>i})},4553:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var i=n(1717),r=n(5566),o=n(3564),s=n(3886);function a(t,e){return(0,i.A)(t)||(0,r.A)(t,e)||(0,o.A)(t,e)||(0,s.A)()}},6420:(t,e,n)=>{"use strict";function i(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}n.d(e,{A:()=>i})},2838:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var i=n(2247),r=n(5209),o=n(3564),s=n(3699);function a(t){return(0,i.A)(t)||(0,r.A)(t)||(0,o.A)(t)||(0,s.A)()}},4360:(t,e,n)=>{"use strict";function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}n.d(e,{A:()=>i})},3564:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});var i=n(5413);function r(t,e){if(t){if("string"==typeof t)return(0,i.A)(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,i.A)(t,e):void 0}}},9256:(t,e,n)=>{"use strict";n.d(e,{Ar:()=>c,Bc:()=>wt,Gw:()=>ct,OO:()=>jt,et:()=>l,wm:()=>gt,yU:()=>At});var i=n(5284),r=n(6896),o=n(1174);class s{constructor(t,e,n,i){this.state=t,this.pos=e,this.explicit=n,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(t){let e=(0,o.mv)(this.state).resolveInner(this.pos,-1);for(;e&&t.indexOf(e.name)<0;)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}matchBefore(t){let e=this.state.doc.lineAt(this.pos),n=Math.max(e.from,this.pos-250),i=e.text.slice(n-e.from,this.pos-e.from),r=i.search(f(t,!1));return r<0?null:{from:n+r,to:this.pos,text:i.slice(r)}}get aborted(){return null==this.abortListeners}addEventListener(t,e,n){"abort"==t&&this.abortListeners&&(this.abortListeners.push(e),n&&n.onDocChange&&(this.abortOnDocChange=!0))}}function a(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function l(t){let e=t.map((t=>"string"==typeof t?{label:t}:t)),[n,i]=e.every((t=>/^\w+$/.test(t.label)))?[/\w*$/,/\w+$/]:function(t){let e=Object.create(null),n=Object.create(null);for(let{label:r}of t){e[r[0]]=!0;for(let t=1;t<r.length;t++)n[r[t]]=!0}let i=a(e)+a(n)+"*$";return[new RegExp("^"+i),new RegExp(i)]}(e);return t=>{let r=t.matchBefore(i);return r||t.explicit?{from:r?r.from:t.pos,options:e,validFor:n}:null}}function c(t,e){return n=>{for(let e=(0,o.mv)(n.state).resolveInner(n.pos,-1);e;e=e.parent){if(t.indexOf(e.name)>-1)return null;if(e.type.isTop)break}return e(n)}}class u{constructor(t,e,n,i){this.completion=t,this.source=e,this.match=n,this.score=i}}function h(t){return t.selection.main.from}function f(t,e){var n;let{source:i}=t,r=e&&"^"!=i[0],o="$"!=i[i.length-1];return r||o?new RegExp(`${r?"^":""}(?:${i})${o?"$":""}`,null!==(n=t.flags)&&void 0!==n?n:t.ignoreCase?"i":""):t}const d=i.YH.define();const p=new WeakMap;function g(t){if(!Array.isArray(t))return t;let e=p.get(t);return e||p.set(t,e=l(t)),e}const m=i.Pe.define(),b=i.Pe.define();class v{constructor(t){this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let e=0;e<t.length;){let n=(0,i.vS)(t,e),r=(0,i.Fh)(n);this.chars.push(n);let o=t.slice(e,e+r),s=o.toUpperCase();this.folded.push((0,i.vS)(s==o?o.toLowerCase():s,0)),e+=r}this.astral=t.length!=this.chars.length}ret(t,e){return this.score=t,this.matched=e,this}match(t){if(0==this.pattern.length)return this.ret(-100,[]);if(t.length<this.pattern.length)return null;let{chars:e,folded:n,any:r,precise:o,byWord:s}=this;if(1==e.length){let r=(0,i.vS)(t,0),o=(0,i.Fh)(r),s=o==t.length?0:-100;if(r==e[0]);else{if(r!=n[0])return null;s+=-200}return this.ret(s,[0,o])}let a=t.indexOf(this.pattern);if(0==a)return this.ret(t.length==this.pattern.length?0:-100,[0,this.pattern.length]);let l=e.length,c=0;if(a<0){for(let o=0,s=Math.min(t.length,200);o<s&&c<l;){let s=(0,i.vS)(t,o);s!=e[c]&&s!=n[c]||(r[c++]=o),o+=(0,i.Fh)(s)}if(c<l)return null}let u=0,h=0,f=!1,d=0,p=-1,g=-1,m=/[a-z]/.test(t),b=!0;for(let v=0,y=Math.min(t.length,200),x=0;v<y&&h<l;){let r=(0,i.vS)(t,v);a<0&&(u<l&&r==e[u]&&(o[u++]=v),d<l&&(r==e[d]||r==n[d]?(0==d&&(p=v),g=v+1,d++):d=0));let c,y=r<255?r>=48&&r<=57||r>=97&&r<=122?2:r>=65&&r<=90?1:0:(c=(0,i.MK)(r))!=c.toLowerCase()?1:c!=c.toUpperCase()?2:0;(!v||1==y&&m||0==x&&0!=y)&&(e[h]==r||n[h]==r&&(f=!0)?s[h++]=v:s.length&&(b=!1)),x=y,v+=(0,i.Fh)(r)}return h==l&&0==s[0]&&b?this.result((f?-200:0)-100,s,t):d==l&&0==p?this.ret(-200-t.length+(g==t.length?0:-100),[0,g]):a>-1?this.ret(-700-t.length,[a,a+this.pattern.length]):d==l?this.ret(-900-t.length,[p,g]):h==l?this.result((f?-200:0)-100-700+(b?0:-1100),s,t):2==e.length?null:this.result((r[0]?-700:0)-200-1100,r,t)}result(t,e,n){let r=[],o=0;for(let s of e){let t=s+(this.astral?(0,i.Fh)((0,i.vS)(n,s)):1);o&&r[o-1]==s?r[o-1]=t:(r[o++]=s,r[o++]=t)}return this.ret(t-n.length,r)}}class y{constructor(t){this.pattern=t,this.matched=[],this.score=0,this.folded=t.toLowerCase()}match(t){if(t.length<this.pattern.length)return null;let e=t.slice(0,this.pattern.length),n=e==this.pattern?0:e.toLowerCase()==this.folded?-200:null;return null==n?null:(this.matched=[0,e.length],this.score=n+(t.length==this.pattern.length?0:-100),this)}}const x=i.sj.define({combine:t=>(0,i.QR)(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:S,filterStrict:!1,compareCompletions:(t,e)=>t.label.localeCompare(e.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(t,e)=>t&&e,closeOnBlur:(t,e)=>t&&e,icons:(t,e)=>t&&e,tooltipClass:(t,e)=>n=>w(t(n),e(n)),optionClass:(t,e)=>n=>w(t(n),e(n)),addToOptions:(t,e)=>t.concat(e),filterStrict:(t,e)=>t||e})});function w(t,e){return t?e?t+" "+e:t:e}function S(t,e,n,i,o,s){let a,l,c=t.textDirection==r.OP.RTL,u=c,h=!1,f="top",d=e.left-o.left,p=o.right-e.right,g=i.right-i.left,m=i.bottom-i.top;if(u&&d<Math.min(g,p)?u=!1:!u&&p<Math.min(g,d)&&(u=!0),g<=(u?d:p))a=Math.max(o.top,Math.min(n.top,o.bottom-m))-e.top,l=Math.min(400,u?d:p);else{h=!0,l=Math.min(400,(c?e.right:o.right-e.left)-30);let t=o.bottom-e.bottom;t>=m||t>e.top?a=n.bottom-e.top:(f="bottom",a=e.bottom-n.top)}return{style:`${f}: ${a/((e.bottom-e.top)/s.offsetHeight)}px; max-width: ${l/((e.right-e.left)/s.offsetWidth)}px`,class:"cm-completionInfo-"+(h?c?"left-narrow":"right-narrow":u?"left":"right")}}function O(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let t=Math.floor(e/n);return{from:t*n,to:(t+1)*n}}let i=Math.floor((t-e)/n);return{from:t-(i+1)*n,to:t-i*n}}class I{constructor(t,e,n){this.view=t,this.stateField=e,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:t=>this.placeInfo(t),key:this},this.space=null,this.currentClass="";let i=t.state.field(e),{options:r,selected:o}=i.open,s=t.state.facet(x);this.optionContent=function(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(t){let e=document.createElement("div");return e.classList.add("cm-completionIcon"),t.type&&e.classList.add(...t.type.split(/\s+/g).map((t=>"cm-completionIcon-"+t))),e.setAttribute("aria-hidden","true"),e},position:20}),e.push({render(t,e,n,i){let r=document.createElement("span");r.className="cm-completionLabel";let o=t.displayLabel||t.label,s=0;for(let a=0;a<i.length;){let t=i[a++],e=i[a++];t>s&&r.appendChild(document.createTextNode(o.slice(s,t)));let n=r.appendChild(document.createElement("span"));n.appendChild(document.createTextNode(o.slice(t,e))),n.className="cm-completionMatchedText",s=e}return s<o.length&&r.appendChild(document.createTextNode(o.slice(s))),r},position:50},{render(t){if(!t.detail)return null;let e=document.createElement("span");return e.className="cm-completionDetail",e.textContent=t.detail,e},position:80}),e.sort(((t,e)=>t.position-e.position)).map((t=>t.render))}(s),this.optionClass=s.optionClass,this.tooltipClass=s.tooltipClass,this.range=O(r.length,o,s.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(t.state),this.dom.addEventListener("mousedown",(n=>{let{options:i}=t.state.field(e).open;for(let e,r=n.target;r&&r!=this.dom;r=r.parentNode)if("LI"==r.nodeName&&(e=/-(\d+)$/.exec(r.id))&&+e[1]<i.length)return this.applyCompletion(t,i[+e[1]]),void n.preventDefault()})),this.dom.addEventListener("focusout",(e=>{let n=t.state.field(this.stateField,!1);n&&n.tooltip&&t.state.facet(x).closeOnBlur&&e.relatedTarget!=t.contentDOM&&t.dispatch({effects:b.of(null)})})),this.showOptions(r,i.id)}mount(){this.updateSel()}showOptions(t,e){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t,e,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)}))}update(t){var e;let n=t.state.field(this.stateField),i=t.startState.field(this.stateField);if(this.updateTooltipClass(t.state),n!=i){let{options:r,selected:o,disabled:s}=n.open;i.open&&i.open.options==r||(this.range=O(r.length,o,t.state.facet(x).maxRenderedOptions),this.showOptions(r,n.id)),this.updateSel(),s!=(null===(e=i.open)||void 0===e?void 0:e.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!s)}}updateTooltipClass(t){let e=this.tooltipClass(t);if(e!=this.currentClass){for(let t of this.currentClass.split(" "))t&&this.dom.classList.remove(t);for(let t of e.split(" "))t&&this.dom.classList.add(t);this.currentClass=e}}positioned(t){this.space=t,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let t=this.view.state.field(this.stateField),e=t.open;if((e.selected>-1&&e.selected<this.range.from||e.selected>=this.range.to)&&(this.range=O(e.options.length,e.selected,this.view.state.facet(x).maxRenderedOptions),this.showOptions(e.options,t.id)),this.updateSelectedOption(e.selected)){this.destroyInfo();let{completion:n}=e.options[e.selected],{info:i}=n;if(!i)return;let o="string"==typeof i?document.createTextNode(i):i(n);if(!o)return;"then"in o?o.then((e=>{e&&this.view.state.field(this.stateField,!1)==t&&this.addInfoPane(e,n)})).catch((t=>(0,r.c_)(this.view.state,t,"completion info"))):this.addInfoPane(o,n)}}addInfoPane(t,e){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",null!=t.nodeType)n.appendChild(t),this.infoDestroy=null;else{let{dom:e,destroy:i}=t;n.appendChild(e),this.infoDestroy=i||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(t){let e=null;for(let n=this.list.firstChild,i=this.range.from;n;n=n.nextSibling,i++)"LI"==n.nodeName&&n.id?i==t?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),e=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected"):i--;return e&&function(t,e){let n=t.getBoundingClientRect(),i=e.getBoundingClientRect(),r=n.height/t.offsetHeight;i.top<n.top?t.scrollTop-=(n.top-i.top)/r:i.bottom>n.bottom&&(t.scrollTop+=(i.bottom-n.bottom)/r)}(this.list,e),e}measureInfo(){let t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;let e=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),i=t.getBoundingClientRect(),r=this.space;if(!r){let t=this.dom.ownerDocument.defaultView||window;r={left:0,top:0,right:t.innerWidth,bottom:t.innerHeight}}return i.top>Math.min(r.bottom,e.bottom)-10||i.bottom<Math.max(r.top,e.top)+10?null:this.view.state.facet(x).positionInfo(this.view,e,i,n,r,this.dom)}placeInfo(t){this.info&&(t?(t.style&&(this.info.style.cssText=t.style),this.info.className="cm-tooltip cm-completionInfo "+(t.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(t,e,n){const i=document.createElement("ul");i.id=e,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions"));let r=null;for(let o=n.from;o<n.to;o++){let{completion:s,match:a}=t[o],{section:l}=s;if(l){let t="string"==typeof l?l:l.name;if(t!=r&&(o>n.from||0==n.from))if(r=t,"string"!=typeof l&&l.header)i.appendChild(l.header(l));else{i.appendChild(document.createElement("completion-section")).textContent=t}}const c=i.appendChild(document.createElement("li"));c.id=e+"-"+o,c.setAttribute("role","option");let u=this.optionClass(s);u&&(c.className=u);for(let t of this.optionContent){let e=t(s,this.view.state,this.view,a);e&&c.appendChild(e)}}return n.from&&i.classList.add("cm-completionListIncompleteTop"),n.to<t.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function k(t,e){return n=>new I(n,t,e)}function E(t){return 100*(t.boost||0)+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}class M{constructor(t,e,n,i,r,o){this.options=t,this.attrs=e,this.tooltip=n,this.timestamp=i,this.selected=r,this.disabled=o}setSelected(t,e){return t==this.selected||t>=this.options.length?this:new M(this.options,P(e,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,e,n,i,r,o){if(i&&!o&&t.some((t=>t.isPending)))return i.setDisabled();let s=function(t,e){let n=[],i=null,r=t=>{n.push(t);let{section:e}=t.completion;if(e){i||(i=[]);let t="string"==typeof e?e:e.name;i.some((e=>e.name==t))||i.push("string"==typeof e?{name:t}:e)}},o=e.facet(x);for(let c of t)if(c.hasResult()){let t=c.result.getMatch;if(!1===c.result.filter)for(let e of c.result.options)r(new u(e,c.source,t?t(e):[],1e9-n.length));else{let n,i=e.sliceDoc(c.from,c.to),s=o.filterStrict?new y(i):new v(i);for(let e of c.result.options)if(n=s.match(e.label)){let i=e.displayLabel?t?t(e,n.matched):[]:n.matched;r(new u(e,c.source,i,n.score+(e.boost||0)))}}}if(i){let t=Object.create(null),e=0,r=(t,e)=>{var n,i;return(null!==(n=t.rank)&&void 0!==n?n:1e9)-(null!==(i=e.rank)&&void 0!==i?i:1e9)||(t.name<e.name?-1:1)};for(let n of i.sort(r))e-=1e5,t[n.name]=e;for(let i of n){let{section:e}=i.completion;e&&(i.score+=t["string"==typeof e?e:e.name])}}let s=[],a=null,l=o.compareCompletions;for(let c of n.sort(((t,e)=>e.score-t.score||l(t.completion,e.completion)))){let t=c.completion;!a||a.label!=t.label||a.detail!=t.detail||null!=a.type&&null!=t.type&&a.type!=t.type||a.apply!=t.apply||a.boost!=t.boost?s.push(c):E(c.completion)>E(a)&&(s[s.length-1]=c),a=c.completion}return s}(t,e);if(!s.length)return i&&t.some((t=>t.isPending))?i.setDisabled():null;let a=e.facet(x).selectOnOpen?0:-1;if(i&&i.selected!=a&&-1!=i.selected){let t=i.options[i.selected].completion;for(let e=0;e<s.length;e++)if(s[e].completion==t){a=e;break}}return new M(s,P(n,a),{pos:t.reduce(((t,e)=>e.hasResult()?Math.min(t,e.from):t),1e8),create:z,above:r.aboveCursor},i?i.timestamp:Date.now(),a,!1)}map(t){return new M(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:t.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new M(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class C{constructor(t,e,n){this.active=t,this.id=e,this.open=n}static start(){return new C(T,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(t){let{state:e}=t,n=e.facet(x),i=(n.override||e.languageDataAt("autocomplete",h(e)).map(g)).map((e=>(this.active.find((t=>t.source==e))||new _(e,this.active.some((t=>0!=t.state))?1:0)).update(t,n)));i.length==this.active.length&&i.every(((t,e)=>t==this.active[e]))&&(i=this.active);let r=this.open,o=t.effects.some((t=>t.is(D)));r&&t.docChanged&&(r=r.map(t.changes)),t.selection||i.some((e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to)))||!function(t,e){if(t==e)return!0;for(let n=0,i=0;;){for(;n<t.length&&!t[n].hasResult();)n++;for(;i<e.length&&!e[i].hasResult();)i++;let r=n==t.length,o=i==e.length;if(r||o)return r==o;if(t[n++].result!=e[i++].result)return!1}}(i,this.active)||o?r=M.build(i,e,this.id,r,n,o):r&&r.disabled&&!i.some((t=>t.isPending))&&(r=null),!r&&i.every((t=>!t.isPending))&&i.some((t=>t.hasResult()))&&(i=i.map((t=>t.hasResult()?new _(t.source,0):t)));for(let s of t.effects)s.is(R)&&(r=r&&r.setSelected(s.value,this.id));return i==this.active&&r==this.open?this:new C(i,this.id,r)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?A:j}}const A={"aria-autocomplete":"list"},j={};function P(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const T=[];function N(t,e){if(t.isUserEvent("input.complete")){let n=t.annotation(d);if(n&&e.activateOnCompletion(n))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class _{constructor(t,e,n=!1){this.source=t,this.state=e,this.explicit=n}hasResult(){return!1}get isPending(){return 1==this.state}update(t,e){let n=N(t,e),i=this;(8&n||16&n&&this.touches(t))&&(i=new _(i.source,0)),4&n&&0==i.state&&(i=new _(this.source,1)),i=i.updateFor(t,n);for(let r of t.effects)if(r.is(m))i=new _(i.source,1,r.value);else if(r.is(b))i=new _(i.source,0);else if(r.is(D))for(let t of r.value)t.source==i.source&&(i=t);return i}updateFor(t,e){return this.map(t.changes)}map(t){return this}touches(t){return t.changes.touchesRange(h(t.state))}}class L extends _{constructor(t,e,n,i,r,o){super(t,3,e),this.limit=n,this.result=i,this.from=r,this.to=o}hasResult(){return!0}updateFor(t,e){var n;if(!(3&e))return this.map(t.changes);let i=this.result;i.map&&!t.changes.empty&&(i=i.map(i,t.changes));let r=t.changes.mapPos(this.from),o=t.changes.mapPos(this.to,1),a=h(t.state);if(a>o||!i||2&e&&(h(t.startState)==this.from||a<this.limit))return new _(this.source,4&e?1:0);let l=t.changes.mapPos(this.limit);return function(t,e,n,i){if(!t)return!1;let r=e.sliceDoc(n,i);return"function"==typeof t?t(r,n,i,e):f(t,!0).test(r)}(i.validFor,t.state,r,o)?new L(this.source,this.explicit,l,i,r,o):i.update&&(i=i.update(i,r,o,new s(t.state,a,!1)))?new L(this.source,this.explicit,l,i,i.from,null!==(n=i.to)&&void 0!==n?n:h(t.state)):new _(this.source,1,this.explicit)}map(t){if(t.empty)return this;return(this.result.map?this.result.map(this.result,t):this.result)?new L(this.source,this.explicit,t.mapPos(this.limit),this.result,t.mapPos(this.from),t.mapPos(this.to,1)):new _(this.source,0)}touches(t){return t.changes.touchesRange(this.from,this.to)}}const D=i.Pe.define({map:(t,e)=>t.map((t=>t.map(e)))}),R=i.Pe.define(),B=i.sU.define({create:()=>C.start(),update:(t,e)=>t.update(e),provide:t=>[r.DK.from(t,(t=>t.tooltip)),r.Lz.contentAttributes.from(t,(t=>t.attrs))]});function H(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field(B).active.find((t=>t.source==e.source));return r instanceof L&&("string"==typeof n?t.dispatch(Object.assign(Object.assign({},function(t,e,n,r){let{main:o}=t.selection,s=n-o.from,a=r-o.from;return Object.assign(Object.assign({},t.changeByRange((l=>{if(l!=o&&n!=r&&t.sliceDoc(l.from+s,l.from+a)!=t.sliceDoc(n,r))return{range:l};let c=t.toText(e);return{changes:{from:l.from+s,to:r==o.from?l.to:l.from+a,insert:c},range:i.OF.cursor(l.from+s+c.length)}}))),{scrollIntoView:!0,userEvent:"input.complete"})}(t.state,n,r.from,r.to)),{annotations:d.of(e.completion)})):n(t,e.completion,r.from,r.to),!0)}const z=k(B,H);function W(t,e="option"){return n=>{let i=n.state.field(B,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp<n.state.facet(x).interactionDelay)return!1;let o,s=1;"page"==e&&(o=(0,r.Eg)(n,i.open.tooltip))&&(s=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:a}=i.open.options,l=i.open.selected>-1?i.open.selected+s*(t?1:-1):t?0:a-1;return l<0?l="page"==e?0:a-1:l>=a&&(l="page"==e?a-1:0),n.dispatch({effects:R.of(l)}),!0}}const U=t=>!!t.state.field(B,!1)&&(t.dispatch({effects:m.of(!0)}),!0);class F{constructor(t,e){this.active=t,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}}const G=r.Z9.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(B).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(B),n=t.state.facet(x);if(!t.selectionSet&&!t.docChanged&&t.startState.field(B)==e)return;let i=t.transactions.some((t=>{let e=N(t,n);return 8&e||(t.selection||t.docChanged)&&!(3&e)}));for(let a=0;a<this.running.length;a++){let e=this.running[a];if(i||e.context.abortOnDocChange&&t.docChanged||e.updates.length+t.transactions.length>50&&Date.now()-e.time>1e3){for(let t of e.context.abortListeners)try{t()}catch(s){(0,r.c_)(this.view.state,s)}e.context.abortListeners=null,this.running.splice(a--,1)}else e.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some((t=>t.effects.some((t=>t.is(m)))))&&(this.pendingStart=!0);let o=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some((t=>t.isPending&&!this.running.some((e=>e.active.source==t.source))))?setTimeout((()=>this.startUpdate()),o):-1,0!=this.composing)for(let r of t.transactions)r.isUserEvent("input.type")?this.composing=2:2==this.composing&&r.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(B);for(let n of e.active)n.isPending&&!this.running.some((t=>t.active.source==n.source))&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(x).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=h(e),i=new s(e,n,t.explicit,this.view),o=new F(t,i);this.running.push(o),Promise.resolve(t.source(i)).then((t=>{o.context.aborted||(o.done=t||null,this.scheduleAccept())}),(t=>{this.view.dispatch({effects:b.of(null)}),(0,r.c_)(this.view.state,t)}))}scheduleAccept(){this.running.every((t=>void 0!==t.done))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(x).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(x),i=this.view.state.field(B);for(let r=0;r<this.running.length;r++){let o=this.running[r];if(void 0===o.done)continue;if(this.running.splice(r--,1),o.done){let i=h(o.updates.length?o.updates[0].startState:this.view.state),r=Math.min(i,o.done.from+(o.active.explicit?0:1)),s=new L(o.active.source,o.active.explicit,r,o.done,o.done.from,null!==(t=o.done.to)&&void 0!==t?t:i);for(let t of o.updates)s=s.update(t,n);if(s.hasResult()){e.push(s);continue}}let s=i.active.find((t=>t.source==o.active.source));if(s&&s.isPending)if(null==o.done){let t=new _(o.active.source,0);for(let e of o.updates)t=t.update(e,n);t.isPending||e.push(t)}else this.startQuery(s)}(e.length||i.open&&i.open.disabled)&&this.view.dispatch({effects:D.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(B,!1);if(e&&e.tooltip&&this.view.state.facet(x).closeOnBlur){let n=e.open&&(0,r.Eg)(this.view,e.open.tooltip);n&&n.dom.contains(t.relatedTarget)||setTimeout((()=>this.view.dispatch({effects:b.of(null)})),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:m.of(!1)})),20),this.composing=0}}}),Z="object"==typeof navigator&&/Win/.test(navigator.platform),V=i.Nb.highest(r.Lz.domEventHandlers({keydown(t,e){let n=e.state.field(B,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&(!Z||!t.altKey)||t.metaKey)return!1;let i=n.open.options[n.open.selected],r=n.active.find((t=>t.source==i.source)),o=i.completion.commitCharacters||r.result.commitCharacters;return o&&o.indexOf(t.key)>-1&&H(e,i),!1}})),q=r.Lz.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class Y{constructor(t,e,n,i){this.field=t,this.line=e,this.from=n,this.to=i}}class J{constructor(t,e,n){this.field=t,this.from=e,this.to=n}map(t){let e=t.mapPos(this.from,-1,i.iR.TrackDel),n=t.mapPos(this.to,1,i.iR.TrackDel);return null==e||null==n?null:new J(this.field,e,n)}}class Q{constructor(t,e){this.lines=t,this.fieldPositions=e}instantiate(t,e){let n=[],i=[e],r=t.doc.lineAt(e),s=/^\s*/.exec(r.text)[0];for(let l of this.lines){if(n.length){let n=s,r=/^\t*/.exec(l)[0].length;for(let e=0;e<r;e++)n+=t.facet(o.Xt);i.push(e+n.length-r),l=n+l.slice(r)}n.push(l),e+=l.length+1}let a=this.fieldPositions.map((t=>new J(t.field,i[t.line]+t.from,i[t.line]+t.to)));return{text:n,ranges:a}}static parse(t){let e,n=[],i=[],r=[];for(let o of t.split(/\r\n?|\n/)){for(;e=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(o);){let t=e[1]?+e[1]:null,s=e[2]||e[3]||"",a=-1,l=s.replace(/\\[{}]/g,(t=>t[1]));for(let e=0;e<n.length;e++)(null!=t?n[e].seq==t:l&&n[e].name==l)&&(a=e);if(a<0){let e=0;for(;e<n.length&&(null==t||null!=n[e].seq&&n[e].seq<t);)e++;n.splice(e,0,{seq:t,name:l}),a=e;for(let t of r)t.field>=a&&t.field++}r.push(new Y(a,i.length,e.index,e.index+l.length)),o=o.slice(0,e.index)+s+o.slice(e.index+e[0].length)}o=o.replace(/\\([{}])/g,((t,e,n)=>{for(let o of r)o.line==i.length&&o.from>n&&(o.from--,o.to--);return e})),i.push(o)}return new Q(i,r)}}let X=r.NZ.widget({widget:new class extends r.xO{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),$=r.NZ.mark({class:"cm-snippetField"});class K{constructor(t,e){this.ranges=t,this.active=e,this.deco=r.NZ.set(t.map((t=>(t.from==t.to?X:$).range(t.from,t.to))))}map(t){let e=[];for(let n of this.ranges){let i=n.map(t);if(!i)return null;e.push(i)}return new K(e,this.active)}selectionInsideField(t){return t.ranges.every((t=>this.ranges.some((e=>e.field==this.active&&e.from<=t.from&&e.to>=t.to))))}}const tt=i.Pe.define({map:(t,e)=>t&&t.map(e)}),et=i.Pe.define(),nt=i.sU.define({create:()=>null,update(t,e){for(let n of e.effects){if(n.is(tt))return n.value;if(n.is(et)&&t)return new K(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>r.Lz.decorations.from(t,(t=>t?t.deco:r.NZ.none))});function it(t,e){return i.OF.create(t.filter((t=>t.field==e)).map((t=>i.OF.range(t.from,t.to))))}function rt(t){let e=Q.parse(t);return(t,n,r,o)=>{let{text:s,ranges:a}=e.instantiate(t.state,r),{main:l}=t.state.selection,c={changes:{from:r,to:o==l.from?l.to:o,insert:i.EY.of(s)},scrollIntoView:!0,annotations:n?[d.of(n),i.ZX.userEvent.of("input.complete")]:void 0};if(a.length&&(c.selection=it(a,0)),a.some((t=>t.field>0))){let e=new K(a,0),n=c.effects=[tt.of(e)];void 0===t.state.field(nt,!1)&&n.push(i.Pe.appendConfig.of([nt,lt,ut,q]))}t.dispatch(t.state.update(c))}}function ot(t){return({state:e,dispatch:n})=>{let i=e.field(nt,!1);if(!i||t<0&&0==i.active)return!1;let r=i.active+t,o=t>0&&!i.ranges.some((e=>e.field==r+t));return n(e.update({selection:it(i.ranges,r),effects:tt.of(o?null:new K(i.ranges,r)),scrollIntoView:!0})),!0}}const st=[{key:"Tab",run:ot(1),shift:ot(-1)},{key:"Escape",run:({state:t,dispatch:e})=>!!t.field(nt,!1)&&(e(t.update({effects:tt.of(null)})),!0)}],at=i.sj.define({combine:t=>t.length?t[0]:st}),lt=i.Nb.highest(r.w4.compute([at],(t=>t.facet(at))));function ct(t,e){return Object.assign(Object.assign({},e),{apply:rt(t)})}const ut=r.Lz.domEventHandlers({mousedown(t,e){let n,i=e.state.field(nt,!1);if(!i||null==(n=e.posAtCoords({x:t.clientX,y:t.clientY})))return!1;let r=i.ranges.find((t=>t.from<=n&&t.to>=n));return!(!r||r.field==i.active)&&(e.dispatch({selection:it(i.ranges,r.field),effects:tt.of(i.ranges.some((t=>t.field>r.field))?new K(i.ranges,r.field):null),scrollIntoView:!0}),!0)}});const ht={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},ft=i.Pe.define({map(t,e){let n=e.mapPos(t,-1,i.iR.TrackAfter);return null==n?void 0:n}}),dt=new class extends i.FB{};dt.startSide=1,dt.endSide=-1;const pt=i.sU.define({create:()=>i.om.empty,update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:t=>t>=n.from&&t<=n.to})}for(let n of e.effects)n.is(ft)&&(t=t.update({add:[dt.range(n.value,n.value+1)]}));return t}});function gt(){return[xt,pt]}const mt="()[]{}<>";function bt(t){for(let e=0;e<8;e+=2)if(mt.charCodeAt(e)==t)return mt.charAt(e+1);return(0,i.MK)(t<128?t:t+1)}function vt(t,e){return t.languageDataAt("closeBrackets",e)[0]||ht}const yt="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),xt=r.Lz.inputHandler.of(((t,e,n,r)=>{if((yt?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let o=t.state.selection.main;if(r.length>2||2==r.length&&1==(0,i.Fh)((0,i.vS)(r,0))||e!=o.from||n!=o.to)return!1;let s=function(t,e){let n=vt(t,t.selection.main.head),r=n.brackets||ht.brackets;for(let o of r){let s=bt((0,i.vS)(o,0));if(e==o)return s==o?Et(t,o,r.indexOf(o+o+o)>-1,n):It(t,o,s,n.before||ht.before);if(e==s&&St(t,t.selection.main.from))return kt(t,o,s)}return null}(t.state,r);return!!s&&(t.dispatch(s),!0)})),wt=[{key:"Backspace",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=vt(t,t.selection.main.head).brackets||ht.brackets,r=null,o=t.changeByRange((e=>{if(e.empty){let r=function(t,e){let n=t.sliceString(e-2,e);return(0,i.Fh)((0,i.vS)(n,0))==n.length?n:n.slice(1)}(t.doc,e.head);for(let o of n)if(o==r&&Ot(t.doc,e.head)==bt((0,i.vS)(o,0)))return{changes:{from:e.head-o.length,to:e.head+o.length},range:i.OF.cursor(e.head-o.length)}}return{range:r=e}}));return r||e(t.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!r}}];function St(t,e){let n=!1;return t.field(pt).between(0,t.doc.length,(t=>{t==e&&(n=!0)})),n}function Ot(t,e){let n=t.sliceString(e,e+2);return n.slice(0,(0,i.Fh)((0,i.vS)(n,0)))}function It(t,e,n,r){let o=null,s=t.changeByRange((s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:n,from:s.to}],effects:ft.of(s.to+e.length),range:i.OF.range(s.anchor+e.length,s.head+e.length)};let a=Ot(t.doc,s.head);return!a||/\s/.test(a)||r.indexOf(a)>-1?{changes:{insert:e+n,from:s.head},effects:ft.of(s.head+e.length),range:i.OF.cursor(s.head+e.length)}:{range:o=s}}));return o?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function kt(t,e,n){let r=null,o=t.changeByRange((e=>e.empty&&Ot(t.doc,e.head)==n?{changes:{from:e.head,to:e.head+n.length,insert:n},range:i.OF.cursor(e.head+n.length)}:r={range:e}));return r?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Et(t,e,n,r){let s=r.stringPrefixes||ht.stringPrefixes,a=null,l=t.changeByRange((r=>{if(!r.empty)return{changes:[{insert:e,from:r.from},{insert:e,from:r.to}],effects:ft.of(r.to+e.length),range:i.OF.range(r.anchor+e.length,r.head+e.length)};let l,c=r.head,u=Ot(t.doc,c);if(u==e){if(Mt(t,c))return{changes:{insert:e+e,from:c},effects:ft.of(c+e.length),range:i.OF.cursor(c+e.length)};if(St(t,c)){let r=n&&t.sliceDoc(c,c+3*e.length)==e+e+e?e+e+e:e;return{changes:{from:c,to:c+r.length,insert:r},range:i.OF.cursor(c+r.length)}}}else{if(n&&t.sliceDoc(c-2*e.length,c)==e+e&&(l=Ct(t,c-2*e.length,s))>-1&&Mt(t,l))return{changes:{insert:e+e+e+e,from:c},effects:ft.of(c+e.length),range:i.OF.cursor(c+e.length)};if(t.charCategorizer(c)(u)!=i.Je.Word&&Ct(t,c,s)>-1&&!function(t,e,n,i){let r=(0,o.mv)(t).resolveInner(e,-1),s=i.reduce(((t,e)=>Math.max(t,e.length)),0);for(let o=0;o<5;o++){let o=t.sliceDoc(r.from,Math.min(r.to,r.from+n.length+s)),a=o.indexOf(n);if(!a||a>-1&&i.indexOf(o.slice(0,a))>-1){let e=r.firstChild;for(;e&&e.from==r.from&&e.to-e.from>n.length+a;){if(t.sliceDoc(e.to-n.length,e.to)==n)return!1;e=e.firstChild}return!0}let l=r.to==e&&r.parent;if(!l)break;r=l}return!1}(t,c,e,s))return{changes:{insert:e+e,from:c},effects:ft.of(c+e.length),range:i.OF.cursor(c+e.length)}}return{range:a=r}}));return a?null:t.update(l,{scrollIntoView:!0,userEvent:"input.type"})}function Mt(t,e){let n=(0,o.mv)(t).resolveInner(e+1);return n.parent&&n.from==e}function Ct(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=i.Je.Word)return e;for(let o of n){let n=e-o.length;if(t.sliceDoc(n,e)==o&&r(t.sliceDoc(n-1,n))!=i.Je.Word)return n}return-1}function At(t={}){return[V,B,x.of(t),G,Pt,q]}const jt=[{key:"Ctrl-Space",run:U},{mac:"Alt-`",run:U},{key:"Escape",run:t=>{let e=t.state.field(B,!1);return!(!e||!e.active.some((t=>0!=t.state)))&&(t.dispatch({effects:b.of(null)}),!0)}},{key:"ArrowDown",run:W(!0)},{key:"ArrowUp",run:W(!1)},{key:"PageDown",run:W(!0,"page")},{key:"PageUp",run:W(!1,"page")},{key:"Enter",run:t=>{let e=t.state.field(B,!1);return!(t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(x).interactionDelay)&&H(t,e.open.options[e.open.selected])}}],Pt=i.Nb.highest(r.w4.computeN([x],(t=>t.facet(x).defaultKeymap?[jt]:[])))},9257:(t,e,n)=>{"use strict";n.d(e,{AH:()=>N,Yk:()=>T});var i=n(168),r=n(9756);const o=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288];function s(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function a(t){return t>=48&&t<=57}const l=new i.Lu(((t,e)=>{for(let n=!1,i=0,r=0;;r++){let{next:o}=t;if(s(o)||45==o||95==o||n&&a(o))!n&&(45!=o||r>0)&&(n=!0),i===r&&45==o&&i++,t.advance();else{if(92!=o||10==t.peek(1)){n&&t.acceptToken(40==o?100:2==i&&e.canShift(2)?2:101);break}t.advance(),t.next>-1&&t.advance(),n=!0}}})),c=new i.Lu((t=>{if(o.includes(t.peek(-1))){let{next:e}=t;(s(e)||95==e||35==e||46==e||91==e||58==e&&s(t.peek(1))||45==e||38==e)&&t.acceptToken(99)}})),u=new i.Lu((t=>{if(!o.includes(t.peek(-1))){let{next:e}=t;if(37==e&&(t.advance(),t.acceptToken(1)),s(e)){do{t.advance()}while(s(t.next)||a(t.next));t.acceptToken(1)}}})),h=(0,r.pn)({"AtKeyword import charset namespace keyframes media supports":r._A.definitionKeyword,"from to selector":r._A.keyword,NamespaceName:r._A.namespace,KeyframeName:r._A.labelName,KeyframeRangeName:r._A.operatorKeyword,TagName:r._A.tagName,ClassName:r._A.className,PseudoClassName:r._A.constant(r._A.className),IdName:r._A.labelName,"FeatureName PropertyName":r._A.propertyName,AttributeName:r._A.attributeName,NumberLiteral:r._A.number,KeywordQuery:r._A.keyword,UnaryQueryOp:r._A.operatorKeyword,"CallTag ValueName":r._A.atom,VariableName:r._A.variableName,Callee:r._A.operatorKeyword,Unit:r._A.unit,"UniversalSelector NestingSelector":r._A.definitionOperator,MatchOp:r._A.compareOperator,"ChildOp SiblingOp, LogicOp":r._A.logicOperator,BinOp:r._A.arithmeticOperator,Important:r._A.modifier,Comment:r._A.blockComment,ColorLiteral:r._A.color,"ParenthesizedContent StringLiteral":r._A.string,":":r._A.punctuation,"PseudoOp #":r._A.derefOperator,"; ,":r._A.separator,"( )":r._A.paren,"[ ]":r._A.squareBracket,"{ }":r._A.brace}),f={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:138},d={__proto__:null,"@import":118,"@media":142,"@charset":146,"@namespace":150,"@keyframes":156,"@supports":168},p={__proto__:null,not:132,only:132},g=i.U1.deserialize({version:14,states:":jQYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$_QXO'#CaO$fQ[O'#ChO$qQ[O'#DTO$vQ[O'#DWOOQP'#Em'#EmO${QdO'#DgO%jQ[O'#DtO${QdO'#DvO%{Q[O'#DxO&WQ[O'#D{O&`Q[O'#ERO&nQ[O'#ETOOQS'#El'#ElOOQS'#EW'#EWQYQ[OOO&uQXO'#CdO'jQWO'#DcO'oQWO'#EsO'zQ[O'#EsQOQWOOP(UO#tO'#C_POOO)C@[)C@[OOQP'#Cg'#CgOOQP,59Q,59QO#kQ[O,59QO(aQ[O'#E[O({QWO,58{O)TQ[O,59SO$qQ[O,59oO$vQ[O,59rO(aQ[O,59uO(aQ[O,59wO(aQ[O,59xO)`Q[O'#DbOOQS,58{,58{OOQP'#Ck'#CkOOQO'#DR'#DROOQP,59S,59SO)gQWO,59SO)lQWO,59SOOQP'#DV'#DVOOQP,59o,59oOOQO'#DX'#DXO)qQ`O,59rOOQS'#Cp'#CpO${QdO'#CqO)yQvO'#CsO+ZQtO,5:ROOQO'#Cx'#CxO)lQWO'#CwO+oQWO'#CyO+tQ[O'#DOOOQS'#Ep'#EpOOQO'#Dj'#DjO+|Q[O'#DqO,[QWO'#EtO&`Q[O'#DoO,jQWO'#DrOOQO'#Eu'#EuO)OQWO,5:`O,oQpO,5:bOOQS'#Dz'#DzO,wQWO,5:dO,|Q[O,5:dOOQO'#D}'#D}O-UQWO,5:gO-ZQWO,5:mO-cQWO,5:oOOQS-E8U-E8UO-kQdO,59}O-{Q[O'#E^O.YQWO,5;_O.YQWO,5;_POOO'#EV'#EVP.eO#tO,58yPOOO,58y,58yOOQP1G.l1G.lO/[QXO,5:vOOQO-E8Y-E8YOOQS1G.g1G.gOOQP1G.n1G.nO)gQWO1G.nO)lQWO1G.nOOQP1G/Z1G/ZO/iQ`O1G/^O0SQXO1G/aO0jQXO1G/cO1QQXO1G/dO1hQWO,59|O1mQ[O'#DSO1tQdO'#CoOOQP1G/^1G/^O${QdO1G/^O1{QpO,59]OOQS,59_,59_O${QdO,59aO2TQWO1G/mOOQS,59c,59cO2YQ!bO,59eOOQS'#DP'#DPOOQS'#EY'#EYO2eQ[O,59jOOQS,59j,59jO2mQWO'#DjO2xQWO,5:VO2}QWO,5:]O&`Q[O,5:XO&`Q[O'#E_O3VQWO,5;`O3bQWO,5:ZO(aQ[O,5:^OOQS1G/z1G/zOOQS1G/|1G/|OOQS1G0O1G0OO3sQWO1G0OO3xQdO'#EOOOQS1G0R1G0ROOQS1G0X1G0XOOQS1G0Z1G0ZO4TQtO1G/iOOQO1G/i1G/iOOQO,5:x,5:xO4kQ[O,5:xOOQO-E8[-E8[O4xQWO1G0yPOOO-E8T-E8TPOOO1G.e1G.eOOQP7+$Y7+$YOOQP7+$x7+$xO${QdO7+$xOOQS1G/h1G/hO5TQXO'#ErO5[QWO,59nO5aQtO'#EXO6XQdO'#EoO6cQWO,59ZO6hQpO7+$xOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%X7+%XOOQS1G/P1G/PO6pQWO1G/POOQS-E8W-E8WOOQS1G/U1G/UO${QdO1G/qOOQO1G/w1G/wOOQO1G/s1G/sO6uQWO,5:yOOQO-E8]-E8]O7TQXO1G/xOOQS7+%j7+%jO7[QYO'#CsOOQO'#EQ'#EQO7gQ`O'#EPOOQO'#EP'#EPO7rQWO'#E`O7zQdO,5:jOOQS,5:j,5:jO8VQtO'#E]O${QdO'#E]O9WQdO7+%TOOQO7+%T7+%TOOQO1G0d1G0dO9kQpO<<HdO9sQWO,5;^OOQP1G/Y1G/YOOQS-E8V-E8VO${QdO'#EZO9{QWO,5;ZOOQT1G.u1G.uOOQP<<Hd<<HdOOQS7+$k7+$kO:TQdO7+%]OOQO7+%d7+%dOOQO,5:k,5:kO3{QdO'#EaO7rQWO,5:zOOQS,5:z,5:zOOQS-E8^-E8^OOQS1G0U1G0UO:[QtO,5:wOOQS-E8Z-E8ZOOQO<<Ho<<HoOOQPAN>OAN>OO;]QdO,5:uOOQO-E8X-E8XOOQO<<Hw<<HwOOQO,5:{,5:{OOQO-E8_-E8_OOQS1G0f1G0f",stateData:";o~O#ZOS#[QQ~OUYOXYO]VO^VOqXOxWO![aO!]ZO!i[O!k]O!m^O!p_O!v`O#XRO#bTO~OQfOUYOXYO]VO^VOqXOxWO![aO!]ZO!i[O!k]O!m^O!p_O!v`O#XeO#bTO~O#U#gP~P!ZO#[jO~O#XlO~O]qO^qOqsOtoOxrO!OtO!RvO#VuO#bnO~O!TwO~P#pO`}O#WzO#XyO~O#X!OO~O#X!QO~OQ![Ob!TOf![Oh![On!YOq!ZO#W!WO#X!SO#e!UO~Ob!^O!d!`O!g!aO#X!]O!T#hP~Oh!fOn!YO#X!eO~Oh!hO#X!hO~Ob!^O!d!`O!g!aO#X!]O~O!Y#hP~P%jO]WX]!WX^WXqWXtWXxWX!OWX!RWX!TWX#VWX#bWX~O]!mO~O!Y!nO#U#gX!S#gX~O#U#gX!S#gX~P!ZO#]!qO#^!qO#_!sO~OUYOXYO]VO^VOqXOxWO#XRO#bTO~OtoO!TwO~O`!zO#WzO#XyO~O!S#gP~P!ZOb#RO~Ob#SO~Op#TO|#UO~OP#WObgXjgX!YgX!dgX!ggX#XgXagXQgXfgXhgXngXqgXtgX!XgX#UgX#WgX#egXpgX!SgX~Ob!^Oj#XO!d!`O!g!aO#X!]O!Y#hP~Ob#[O~Op#`O#X#]O~Ob!^O!d!`O!g!aO#X#aO~Ot#eO!b#dO!T#hX!Y#hX~Ob#hO~Oj#XO!Y#jO~O!Y#kO~Oh#lOn!YO~O!T#mO~O!TwO!b#dO~O!TwO!Y#pO~O!X#rO!Y!Va#U!Va!S!Va~P${O!Y#QX#U#QX!S#QX~P!ZO!Y!nO#U#ga!S#ga~O#]!qO#^!qO#_#xO~O]qO^qOqsOxrO!OtO!RvO#VuO#bnO~Ot#Oa!T#Oaa#Oa~P.pOp#zO|#{O~O]qO^qOqsOxrO#bnO~Ot}i!O}i!R}i!T}i#V}ia}i~P/qOt!Pi!O!Pi!R!Pi!T!Pi#V!Pia!Pi~P/qOt!Qi!O!Qi!R!Qi!T!Qi#V!Qia!Qi~P/qO!S#|O~Oa#fP~P(aOa#cP~P${Oa$TOj#XO~O!Y$VO~Oa$WOh$XOo$XO~Op$ZO#X#]O~O]!`Xa!^X!b!^X~O]$[O~Oa$]O!b#dO~Ot#eO!T#ha!Y#ha~O!b#dOt!ca!T!ca!Y!caa!ca~O!Y$bO~O!S$iO#X$dO#e$cO~Oj#XOt$kO!X$mO!Y!Vi#U!Vi!S!Vi~P${O!Y#Qa#U#Qa!S#Qa~P!ZO!Y!nO#U#gi!S#gi~Oa#fX~P#pOa$qO~Oj#XOQ!{Xa!{Xb!{Xf!{Xh!{Xn!{Xq!{Xt!{X#W!{X#X!{X#e!{X~Ot$sOa#cX~P${Oa$uO~Oj#XOp$vO~Oa$wO~O!b#dOt#Ra!T#Ra!Y#Ra~Oa$yO~P.pOP#WOtgX!TgX~O#e$cOt!sX!T!sX~Ot${O!TwO~O!S%PO#X$dO#e$cO~Oj#XOQ#PXb#PXf#PXh#PXn#PXq#PXt#PX!X#PX!Y#PX#U#PX#W#PX#X#PX#e#PX!S#PX~Ot$kO!X%SO!Y!Vq#U!Vq!S!Vq~P${Oj#XOp%TO~OtoOa#fa~Ot$sOa#ca~Oa%WO~P${Oj#XOQ#Pab#Paf#Pah#Pan#Paq#Pat#Pa!X#Pa!Y#Pa#U#Pa#W#Pa#X#Pa#e#Pa!S#Pa~Oa!}at!}a~P${O#Zo#[#ej!R#e~",goto:"-g#jPPP#kP#nP#w$WP#w$g#wPP$mPPP$s$|$|P%`P$|P$|%z&^PPPP$|&vP&z'Q#wP'W#w'^P#wP#w#wPPP'd'y(WPP#nPP(_(_(i(_P(_P(_(_P#nP#nP#nP(l#nP(o(r(u(|#nP#nP)R)X)h)v)|*S*^*d*n*t*zPPPPPPPPPP+Q+ZP+v+yP,o,r,x-RRkQ_bOPdhw!n#tkYOPdhotuvw!n#R#h#tkSOPdhotuvw!n#R#h#tQmTR!tnQ{VR!xqQ!x}Q#Z!XR#y!zq![Z]!T!m#S#U#X#q#{$Q$[$k$l$s$x%Up![Z]!T!m#S#U#X#q#{$Q$[$k$l$s$x%UU$f#m$h${R$z$eq!XZ]!T!m#S#U#X#q#{$Q$[$k$l$s$x%Up![Z]!T!m#S#U#X#q#{$Q$[$k$l$s$x%UQ!f^R#l!gT#^!Z#_Q|VR!yqQ!x|R#y!yQ!PWR!{rQ!RXR!|sQxUQ!wpQ#i!cQ#o!jQ#p!kQ$}$gR%Z$|SgPwQ!phQ#s!nR$n#tZfPhw!n#ta!b[`a!V!^!`#d#eR#b!^R!g^R!i_R#n!iS$g#m$hR%X${V$e#m$h${Q!rjR#w!rQdOShPwU!ldh#tR#t!nQ$Q#SU$r$Q$x%UQ$x$[R%U$sQ#_!ZR$Y#_Q$t$QR%V$tQpUS!vp$pR$p#}Q$l#qR%R$lQ!ogS#u!o#vR#v!pQ#f!_R$`#fQ$h#mR%O$hQ$|$gR%Y$|_cOPdhw!n#t^UOPdhw!n#tQ!uoQ!}tQ#OuQ#PvQ#}#RR$a#hR$R#SQ!VZQ!d]Q#V!TQ#q!m[$P#S$Q$[$s$x%UQ$S#UQ$U#XS$j#q$lQ$o#{R%Q$kR$O#RQiPR#QwQ!c[Q!kaR#Y!VU!_[a!VQ!j`Q#c!^Q#g!`Q$^#dR$_#e",nodeNames:"⚠ Unit VariableName Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee CallLiteral CallTag ParenthesizedContent ] [ LineNames LineName , PseudoClassName ArgList IdSelector # IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp } { Block Declaration PropertyName Important ; ImportStatement AtKeyword import KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports AtRule Styles",maxTerm:117,nodeProps:[["isolate",-2,3,24,""],["openedBy",17,"(",32,"[",50,"{"],["closedBy",18,")",33,"]",51,"}"]],propSources:[h],skippedNodes:[0,3,87],repeatNodeCount:11,tokenData:"J^~R!^OX$}X^%u^p$}pq%uqr)Xrs.Rst/utu6duv$}vw7^wx7oxy9^yz9oz{9t{|:_|}?Q}!O?c!O!P@Q!P!Q@i!Q![Ab![!]B]!]!^CX!^!_$}!_!`Cj!`!aC{!a!b$}!b!cDw!c!}$}!}#OFa#O#P$}#P#QFr#Q#R6d#R#T$}#T#UGT#U#c$}#c#dHf#d#o$}#o#pH{#p#q6d#q#rI^#r#sIo#s#y$}#y#z%u#z$f$}$f$g%u$g#BY$}#BY#BZ%u#BZ$IS$}$IS$I_%u$I_$I|$}$I|$JO%u$JO$JT$}$JT$JU%u$JU$KV$}$KV$KW%u$KW&FU$}&FU&FV%u&FV;'S$};'S;=`JW<%lO$}`%QSOy%^z;'S%^;'S;=`%o<%lO%^`%cSo`Oy%^z;'S%^;'S;=`%o<%lO%^`%rP;=`<%l%^~%zh#Z~OX%^X^'f^p%^pq'fqy%^z#y%^#y#z'f#z$f%^$f$g'f$g#BY%^#BY#BZ'f#BZ$IS%^$IS$I_'f$I_$I|%^$I|$JO'f$JO$JT%^$JT$JU'f$JU$KV%^$KV$KW'f$KW&FU%^&FU&FV'f&FV;'S%^;'S;=`%o<%lO%^~'mh#Z~o`OX%^X^'f^p%^pq'fqy%^z#y%^#y#z'f#z$f%^$f$g'f$g#BY%^#BY#BZ'f#BZ$IS%^$IS$I_'f$I_$I|%^$I|$JO'f$JO$JT%^$JT$JU'f$JU$KV%^$KV$KW'f$KW&FU%^&FU&FV'f&FV;'S%^;'S;=`%o<%lO%^l)[UOy%^z#]%^#]#^)n#^;'S%^;'S;=`%o<%lO%^l)sUo`Oy%^z#a%^#a#b*V#b;'S%^;'S;=`%o<%lO%^l*[Uo`Oy%^z#d%^#d#e*n#e;'S%^;'S;=`%o<%lO%^l*sUo`Oy%^z#c%^#c#d+V#d;'S%^;'S;=`%o<%lO%^l+[Uo`Oy%^z#f%^#f#g+n#g;'S%^;'S;=`%o<%lO%^l+sUo`Oy%^z#h%^#h#i,V#i;'S%^;'S;=`%o<%lO%^l,[Uo`Oy%^z#T%^#T#U,n#U;'S%^;'S;=`%o<%lO%^l,sUo`Oy%^z#b%^#b#c-V#c;'S%^;'S;=`%o<%lO%^l-[Uo`Oy%^z#h%^#h#i-n#i;'S%^;'S;=`%o<%lO%^l-uS!X[o`Oy%^z;'S%^;'S;=`%o<%lO%^~.UWOY.RZr.Rrs.ns#O.R#O#P.s#P;'S.R;'S;=`/o<%lO.R~.sOh~~.vRO;'S.R;'S;=`/P;=`O.R~/SXOY.RZr.Rrs.ns#O.R#O#P.s#P;'S.R;'S;=`/o;=`<%l.R<%lO.R~/rP;=`<%l.Rn/zYxQOy%^z!Q%^!Q![0j![!c%^!c!i0j!i#T%^#T#Z0j#Z;'S%^;'S;=`%o<%lO%^l0oYo`Oy%^z!Q%^!Q![1_![!c%^!c!i1_!i#T%^#T#Z1_#Z;'S%^;'S;=`%o<%lO%^l1dYo`Oy%^z!Q%^!Q![2S![!c%^!c!i2S!i#T%^#T#Z2S#Z;'S%^;'S;=`%o<%lO%^l2ZYf[o`Oy%^z!Q%^!Q![2y![!c%^!c!i2y!i#T%^#T#Z2y#Z;'S%^;'S;=`%o<%lO%^l3QYf[o`Oy%^z!Q%^!Q![3p![!c%^!c!i3p!i#T%^#T#Z3p#Z;'S%^;'S;=`%o<%lO%^l3uYo`Oy%^z!Q%^!Q![4e![!c%^!c!i4e!i#T%^#T#Z4e#Z;'S%^;'S;=`%o<%lO%^l4lYf[o`Oy%^z!Q%^!Q![5[![!c%^!c!i5[!i#T%^#T#Z5[#Z;'S%^;'S;=`%o<%lO%^l5aYo`Oy%^z!Q%^!Q![6P![!c%^!c!i6P!i#T%^#T#Z6P#Z;'S%^;'S;=`%o<%lO%^l6WSf[o`Oy%^z;'S%^;'S;=`%o<%lO%^d6gUOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^d7QS|So`Oy%^z;'S%^;'S;=`%o<%lO%^b7cSXQOy%^z;'S%^;'S;=`%o<%lO%^~7rWOY7oZw7owx.nx#O7o#O#P8[#P;'S7o;'S;=`9W<%lO7o~8_RO;'S7o;'S;=`8h;=`O7o~8kXOY7oZw7owx.nx#O7o#O#P8[#P;'S7o;'S;=`9W;=`<%l7o<%lO7o~9ZP;=`<%l7on9cSb^Oy%^z;'S%^;'S;=`%o<%lO%^~9tOa~n9{UUQjWOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^n:fWjW!RQOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^l;TUo`Oy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^l;nYo`#e[Oy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^l<cYo`Oy%^z{%^{|=R|}%^}!O=R!O!Q%^!Q![=j![;'S%^;'S;=`%o<%lO%^l=WUo`Oy%^z!Q%^!Q![=j![;'S%^;'S;=`%o<%lO%^l=qUo`#e[Oy%^z!Q%^!Q![=j![;'S%^;'S;=`%o<%lO%^l>[[o`#e[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^n?VSt^Oy%^z;'S%^;'S;=`%o<%lO%^l?hWjWOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^n@VU#bQOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTjWOy%^z{@}{;'S%^;'S;=`%o<%lO%^~AUSo`#[~Oy%^z;'S%^;'S;=`%o<%lO%^lAg[#e[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^bBbU]QOy%^z![%^![!]Bt!];'S%^;'S;=`%o<%lO%^bB{S^Qo`Oy%^z;'S%^;'S;=`%o<%lO%^nC^S!Y^Oy%^z;'S%^;'S;=`%o<%lO%^dCoS|SOy%^z;'S%^;'S;=`%o<%lO%^bDQU!OQOy%^z!`%^!`!aDd!a;'S%^;'S;=`%o<%lO%^bDkS!OQo`Oy%^z;'S%^;'S;=`%o<%lO%^bDzWOy%^z!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bEk[![Qo`Oy%^z}%^}!OEd!O!Q%^!Q![Ed![!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^nFfSq^Oy%^z;'S%^;'S;=`%o<%lO%^nFwSp^Oy%^z;'S%^;'S;=`%o<%lO%^bGWUOy%^z#b%^#b#cGj#c;'S%^;'S;=`%o<%lO%^bGoUo`Oy%^z#W%^#W#XHR#X;'S%^;'S;=`%o<%lO%^bHYS!bQo`Oy%^z;'S%^;'S;=`%o<%lO%^bHiUOy%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!TUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!S^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!RQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}",tokenizers:[c,u,l,1,2,3,4,new i.uC("m~RRYZ[z{a~~g~aO#^~~dP!P!Qg~lO#_~~",28,105)],topRules:{StyleSheet:[0,4],Styles:[1,86]},specialized:[{term:100,get:t=>f[t]||-1},{term:58,get:t=>d[t]||-1},{term:101,get:t=>p[t]||-1}],tokenPrec:1219});var m=n(1174),b=n(9249);let v=null;function y(){if(!v&&"object"==typeof document&&document.body){let{style:t}=document.body,e=[],n=new Set;for(let i in t)"cssText"!=i&&"cssFloat"!=i&&"string"==typeof t[i]&&(/[A-Z]/.test(i)&&(i=i.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))),n.has(i)||(e.push(i),n.add(i)));v=e.sort().map((t=>({type:"property",label:t,apply:t+": "})))}return v||[]}const x=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map((t=>({type:"class",label:t}))),w=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map((t=>({type:"keyword",label:t}))).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map((t=>({type:"constant",label:t})))),S=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map((t=>({type:"type",label:t}))),O=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map((t=>({type:"keyword",label:t}))),I=/^(\w[\w-]*|-\w[\w-]*|)$/,k=/^-(-[\w-]*)?$/;const E=new b.RY,M=["Declaration"];function C(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function A(t,e,n){if(e.to-e.from>4096){let i=E.get(e);if(i)return i;let r=[],o=new Set,s=e.cursor(b.Qj.IncludeAnonymous);if(s.firstChild())do{for(let e of A(t,s.node,n))o.has(e.label)||(o.add(e.label),r.push(e))}while(s.nextSibling());return E.set(e,r),r}{let i=[],r=new Set;return e.cursor().iterate((e=>{var o;if(n(e)&&e.matchContext(M)&&":"==(null===(o=e.node.nextSibling)||void 0===o?void 0:o.name)){let n=t.sliceString(e.from,e.to);r.has(n)||(r.add(n),i.push({label:n,type:"variable"}))}})),i}}const j=t=>e=>{let{state:n,pos:i}=e,r=(0,m.mv)(n).resolveInner(i,-1),o=r.type.isError&&r.from==r.to-1&&"-"==n.doc.sliceString(r.from,r.to);if("PropertyName"==r.name||(o||"TagName"==r.name)&&/^(Block|Styles)$/.test(r.resolve(r.to).name))return{from:r.from,options:y(),validFor:I};if("ValueName"==r.name)return{from:r.from,options:w,validFor:I};if("PseudoClassName"==r.name)return{from:r.from,options:x,validFor:I};if(t(r)||(e.explicit||o)&&function(t,e){var n;if(("("==t.name||t.type.isError)&&(t=t.parent||t),"ArgList"!=t.name)return!1;let i=null===(n=t.parent)||void 0===n?void 0:n.firstChild;return"Callee"==(null==i?void 0:i.name)&&"var"==e.sliceString(i.from,i.to)}(r,n.doc))return{from:t(r)||o?r.from:i,options:A(n.doc,C(r),t),validFor:k};if("TagName"==r.name){for(let{parent:t}=r;t;t=t.parent)if("Block"==t.name)return{from:r.from,options:y(),validFor:I};return{from:r.from,options:S,validFor:I}}if("AtKeyword"==r.name)return{from:r.from,options:O,validFor:I};if(!e.explicit)return null;let s=r.resolve(i),a=s.childBefore(i);return a&&":"==a.name&&"PseudoClassSelector"==s.name?{from:i,options:x,validFor:I}:a&&":"==a.name&&"Declaration"==s.name||"ArgList"==s.name?{from:i,options:w,validFor:I}:"Block"==s.name||"Styles"==s.name?{from:i,options:y(),validFor:I}:null},P=j((t=>"VariableName"==t.name)),T=m.bj.define({name:"css",parser:g.configure({props:[m.Oh.add({Declaration:(0,m.mz)()}),m.b_.add({"Block KeyframeList":m.yd})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function N(){return new m.Yy(T,T.data.of({autocomplete:P}))}},1174:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>B,EI:()=>A,KB:()=>P,Lv:()=>dt,Oh:()=>T,Q0:()=>h,Q_:()=>Tt,SG:()=>Pt,WD:()=>F,Xt:()=>M,Yy:()=>k,Zt:()=>St,_Y:()=>z,_v:()=>j,b_:()=>Z,bj:()=>p,cr:()=>gt,f7:()=>rt,jU:()=>Lt,mv:()=>g,mz:()=>W,p9:()=>u,tp:()=>C,y9:()=>yt,yd:()=>V});var i,r=n(9249),o=n(5284),s=n(6896),a=n(9756),l=n(8709);const c=new r.uY;function u(t){return o.sj.define({combine:t?e=>e.concat(t):void 0})}const h=new r.uY;class f{constructor(t,e,n=[],i=""){this.data=t,this.name=i,o.$t.prototype.hasOwnProperty("tree")||Object.defineProperty(o.$t.prototype,"tree",{get(){return g(this)}}),this.parser=e,this.extension=[I.of(this),o.$t.languageData.of(((t,e,n)=>{let i=d(t,e,n),r=i.type.prop(c);if(!r)return[];let o=t.facet(r),s=i.type.prop(h);if(s){let r=i.resolve(e-i.from,n);for(let e of s)if(e.test(r,t)){let n=t.facet(e.facet);return"replace"==e.type?n:n.concat(o)}}return o}))].concat(n)}isActiveAt(t,e,n=-1){return d(t,e,n).type.prop(c)==this.data}findRegions(t){let e=t.facet(I);if((null==e?void 0:e.data)==this.data)return[{from:0,to:t.doc.length}];if(!e||!e.allowsNesting)return[];let n=[],i=(t,e)=>{if(t.prop(c)==this.data)return void n.push({from:e,to:e+t.length});let o=t.prop(r.uY.mounted);if(o){if(o.tree.prop(c)==this.data){if(o.overlay)for(let t of o.overlay)n.push({from:t.from+e,to:t.to+e});else n.push({from:e,to:e+t.length});return}if(o.overlay){let t=n.length;if(i(o.tree,o.overlay[0].from+e),n.length>t)return}}for(let n=0;n<t.children.length;n++){let o=t.children[n];o instanceof r.PH&&i(o,t.positions[n]+e)}};return i(g(t),0),n}get allowsNesting(){return!0}}function d(t,e,n){let i=t.facet(I),o=g(t).topNode;if(!i||i.allowsNesting)for(let s=o;s;s=s.enter(e,n,r.Qj.ExcludeBuffers))s.type.isTop&&(o=s);return o}f.setState=o.Pe.define();class p extends f{constructor(t,e,n){super(t,e,[],n),this.parser=e}static define(t){let e=u(t.languageData);return new p(e,t.parser.configure({props:[c.add((t=>t.isTop?e:void 0))]}),t.name)}configure(t,e){return new p(this.data,this.parser.configure(t),e||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function g(t){let e=t.field(f.state,!1);return e?e.tree:r.PH.empty}class m{constructor(t){this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}get length(){return this.doc.length}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,e){let n=this.cursorPos-this.string.length;return t<n||e>=this.cursorPos?this.doc.sliceString(t,e):this.string.slice(t-n,e-n)}}let b=null;class v{constructor(t,e,n=[],i,r,o,s,a){this.parser=t,this.state=e,this.fragments=n,this.tree=i,this.treeLen=r,this.viewport=o,this.skipped=s,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(t,e,n){return new v(t,e,[],r.PH.empty,0,n,[],null)}startParse(){return this.parser.startParse(new m(this.state.doc),this.fragments)}work(t,e){return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=r.PH.empty&&this.isDone(null!=e?e:this.state.doc.length)?(this.takeTree(),!0):this.withContext((()=>{var n;if("number"==typeof t){let e=Date.now()+t;t=()=>Date.now()>e}for(this.parse||(this.parse=this.startParse()),null!=e&&(null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&e<this.state.doc.length&&this.parse.stopAt(e);;){let i=this.parse.advance();if(i){if(this.fragments=this.withoutTempSkipped(r.rr.addTree(i,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!==(n=this.parse.stoppedAt)&&void 0!==n?n:this.state.doc.length,this.tree=i,this.parse=null,!(this.treeLen<(null!=e?e:this.state.doc.length)))return!0;this.parse=this.startParse()}if(t())return!1}}))}takeTree(){let t,e;this.parse&&(t=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext((()=>{for(;!(e=this.parse.advance()););})),this.treeLen=t,this.tree=e,this.fragments=this.withoutTempSkipped(r.rr.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let e=b;b=this;try{return t()}finally{b=e}}withoutTempSkipped(t){for(let e;e=this.tempSkipped.pop();)t=y(t,e.from,e.to);return t}changes(t,e){let{fragments:n,tree:i,treeLen:o,viewport:s,skipped:a}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges(((t,n,i,r)=>e.push({fromA:t,toA:n,fromB:i,toB:r}))),n=r.rr.applyChanges(n,e),i=r.PH.empty,o=0,s={from:t.mapPos(s.from,-1),to:t.mapPos(s.to,1)},this.skipped.length){a=[];for(let e of this.skipped){let n=t.mapPos(e.from,1),i=t.mapPos(e.to,-1);n<i&&a.push({from:n,to:i})}}}return new v(this.parser,e,n,i,o,s,a,this.scheduleOn)}updateViewport(t){if(this.viewport.from==t.from&&this.viewport.to==t.to)return!1;this.viewport=t;let e=this.skipped.length;for(let n=0;n<this.skipped.length;n++){let{from:e,to:i}=this.skipped[n];e<t.to&&i>t.from&&(this.fragments=y(this.fragments,e,i),this.skipped.splice(n--,1))}return!(this.skipped.length>=e)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,e){this.skipped.push({from:t,to:e})}static getSkippingParser(t){return new class extends r.iX{createParse(e,n,i){let o=i[0].from,s=i[i.length-1].to;return{parsedPos:o,advance(){let e=b;if(e){for(let t of i)e.tempSkipped.push(t);t&&(e.scheduleOn=e.scheduleOn?Promise.all([e.scheduleOn,t]):t)}return this.parsedPos=s,new r.PH(r.Z6.none,[],[],s-o)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let e=this.fragments;return this.treeLen>=t&&e.length&&0==e[0].from&&e[0].to>=t}static get(){return b}}function y(t,e,n){return r.rr.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class x{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let e=this.context.changes(t.changes,t.state),n=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,n)||e.takeTree(),new x(e)}static init(t){let e=Math.min(3e3,t.doc.length),n=v.create(t.facet(I).parser,t,{from:0,to:e});return n.work(20,e)||n.takeTree(),new x(n)}}f.state=o.sU.define({create:x.init,update(t,e){for(let n of e.effects)if(n.is(f.setState))return n.value;return e.startState.facet(I)!=e.state.facet(I)?x.init(e.state):t.apply(e)}});let w=t=>{let e=setTimeout((()=>t()),500);return()=>clearTimeout(e)};"undefined"!=typeof requestIdleCallback&&(w=t=>{let e=-1,n=setTimeout((()=>{e=requestIdleCallback(t,{timeout:400})}),100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const S="undefined"!=typeof navigator&&(null===(i=navigator.scheduling)||void 0===i?void 0:i.isInputPending)?()=>navigator.scheduling.isInputPending():null,O=s.Z9.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let e=this.view.state.field(f.state).context;(e.updateViewport(t.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field(f.state);e.tree==e.context.tree&&e.context.isDone(t.doc.length)||(this.working=w(this.work))}work(t){this.working=null;let e=Date.now();if(this.chunkEnd<e&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=e+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:i}}=this.view,r=n.field(f.state);if(r.tree==r.context.tree&&r.context.isDone(i+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,t&&!S?Math.max(25,t.timeRemaining()-5):1e9),s=r.context.treeLen<i&&n.doc.length>i+1e3,a=r.context.work((()=>S&&S()||Date.now()>o),i+(s?0:1e5));this.chunkBudget-=Date.now()-e,(a||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:f.setState.of(new x(r.context))})),this.chunkBudget>0&&(!a||s)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then((()=>this.scheduleWork())).catch((t=>(0,s.c_)(this.view.state,t))).then((()=>this.workScheduled--)),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),I=o.sj.define({combine:t=>t.length?t[0]:null,enables:t=>[f.state,O,s.Lz.contentAttributes.compute([t],(e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}}))]});class k{constructor(t,e=[]){this.language=t,this.support=e,this.extension=[t,e]}}const E=o.sj.define(),M=o.sj.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some((t=>t!=e[0])))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function C(t){let e=t.facet(M);return 9==e.charCodeAt(0)?t.tabSize*e.length:e.length}function A(t,e){let n="",i=t.tabSize,r=t.facet(M)[0];if("\t"==r){for(;e>=i;)n+="\t",e-=i;r=" "}for(let o=0;o<e;o++)n+=r;return n}function j(t,e){t instanceof o.$t&&(t=new P(t));for(let i of t.state.facet(E)){let n=i(t,e);if(void 0!==n)return n}let n=g(t.state);return n.length>=e?function(t,e,n){let i=e.resolveStack(n),r=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(r!=i.node){let t=[];for(let e=r;e&&(e.from!=i.node.from||e.type!=i.node.type);e=e.parent)t.push(e);for(let e=t.length-1;e>=0;e--)i={node:t[e],next:i}}return N(i,t,n)}(t,n,e):null}class P{constructor(t,e={}){this.state=t,this.options=e,this.unit=C(t)}lineAt(t,e=1){let n=this.state.doc.lineAt(t),{simulateBreak:i,simulateDoubleBreak:r}=this.options;return null!=i&&i>=n.from&&i<=n.to?r&&i==t?{text:"",from:t}:(e<0?i<t:i<=t)?{text:n.text.slice(i-n.from),from:i}:{text:n.text.slice(0,i-n.from),from:n.from}:n}textAfterPos(t,e=1){if(this.options.simulateDoubleBreak&&t==this.options.simulateBreak)return"";let{text:n,from:i}=this.lineAt(t,e);return n.slice(t-i,Math.min(n.length,t+100-i))}column(t,e=1){let{text:n,from:i}=this.lineAt(t,e),r=this.countColumn(n,t-i),o=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return o>-1&&(r+=o-this.countColumn(n,n.search(/\S|$/))),r}countColumn(t,e=t.length){return(0,o.y$)(t,this.state.tabSize,e)}lineIndent(t,e=1){let{text:n,from:i}=this.lineAt(t,e),r=this.options.overrideIndentation;if(r){let t=r(i);if(t>-1)return t}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const T=new r.uY;function N(t,e,n){for(let i=t;i;i=i.next){let t=_(i.node);if(t)return t(D.create(e,n,i))}return 0}function _(t){let e=t.type.prop(T);if(e)return e;let n,i=t.firstChild;if(i&&(n=i.type.prop(r.uY.closedBy))){let e=t.lastChild,i=e&&n.indexOf(e.name)>-1;return t=>H(t,!0,1,void 0,i&&!function(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}(t)?e.from:void 0)}return null==t.parent?L:null}function L(){return 0}class D extends P{constructor(t,e,n){super(t.state,t.options),this.base=t,this.pos=e,this.context=n}get node(){return this.context.node}static create(t,e,n){return new D(t,e,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(t){let e=this.state.doc.lineAt(t.from);for(;;){let n=t.resolve(e.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(R(n,t))break;e=this.state.doc.lineAt(n.from)}return this.lineIndent(e.from)}continue(){return N(this.context.next,this.base,this.pos)}}function R(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function B({closing:t,align:e=!0,units:n=1}){return i=>H(i,e,n,t)}function H(t,e,n,i,r){let o=t.textAfter,s=o.match(/^\s*/)[0].length,a=i&&o.slice(s,s+i.length)==i||r==t.pos+s,l=e?function(t){let e=t.node,n=e.childAfter(e.from),i=e.lastChild;if(!n)return null;let r=t.options.simulateBreak,o=t.state.doc.lineAt(n.from),s=null==r||r<=o.from?o.to:Math.min(o.to,r);for(let a=n.to;;){let t=e.childAfter(a);if(!t||t==i)return null;if(!t.type.isSkipped){if(t.from>=s)return null;let e=/^ */.exec(o.text.slice(n.to-o.from))[0].length;return{from:n.from,to:n.to+e}}a=t.to}}(t):null;return l?a?t.column(l.from):t.column(l.to):t.baseIndent+(a?0:t.unit*n)}const z=t=>t.baseIndent;function W({except:t,units:e=1}={}){return n=>{let i=t&&t.test(n.textAfter);return n.baseIndent+(i?0:e*n.unit)}}const U=200;function F(){return o.$t.transactionFilter.of((t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:i}=t.newSelection.main,r=n.lineAt(i);if(i>r.from+U)return t;let o=n.sliceString(r.from,i);if(!e.some((t=>t.test(o))))return t;let{state:s}=t,a=-1,l=[];for(let{head:c}of s.selection.ranges){let t=s.doc.lineAt(c);if(t.from==a)continue;a=t.from;let e=j(s,t.from);if(null==e)continue;let n=/^\s*/.exec(t.text)[0],i=A(s,e);n!=i&&l.push({from:t.from,to:t.from+n.length,insert:i})}return l.length?[t,{changes:l,sequential:!0}]:t}))}const G=o.sj.define(),Z=new r.uY;function V(t){let e=t.firstChild,n=t.lastChild;return e&&e.to<n.from?{from:e.to,to:n.type.isError?t.to:n.from}:null}function q(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function Y(t,e,n){for(let i of t.facet(G)){let r=i(t,e,n);if(r)return r}return function(t,e,n){let i=g(t);if(i.length<n)return null;let r=null;for(let o=i.resolveStack(n,1);o;o=o.next){let s=o.node;if(s.to<=n||s.from>n)continue;if(r&&s.from<e)break;let a=s.type.prop(Z);if(a&&(s.to<i.length-50||i.length==t.doc.length||!q(s))){let i=a(s,t);i&&i.from<=n&&i.from>=e&&i.to>n&&(r=i)}}return r}(t,e,n)}function J(t,e){let n=e.mapPos(t.from,1),i=e.mapPos(t.to,-1);return n>=i?void 0:{from:n,to:i}}const Q=o.Pe.define({map:J}),X=o.Pe.define({map:J});function $(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some((t=>t.from<=n&&t.to>=n))||e.push(t.lineBlockAt(n));return e}const K=o.sU.define({create:()=>s.NZ.none,update(t,e){t=t.map(e.changes);for(let n of e.effects)if(n.is(Q)&&!et(t,n.value.from,n.value.to)){let{preparePlaceholder:i}=e.state.facet(st),r=i?s.NZ.replace({widget:new ut(i(e.state,n.value))}):ct;t=t.update({add:[r.range(n.value.from,n.value.to)]})}else n.is(X)&&(t=t.update({filter:(t,e)=>n.value.from!=t||n.value.to!=e,filterFrom:n.value.from,filterTo:n.value.to}));if(e.selection){let n=!1,{head:i}=e.selection.main;t.between(i,i,((t,e)=>{t<i&&e>i&&(n=!0)})),n&&(t=t.update({filterFrom:i,filterTo:i,filter:(t,e)=>e<=i||t>=i}))}return t},provide:t=>s.Lz.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,((t,e)=>{n.push(t,e)})),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n<t.length;){let i=t[n++],r=t[n++];if("number"!=typeof i||"number"!=typeof r)throw new RangeError("Invalid JSON for fold state");e.push(ct.range(i,r))}return s.NZ.set(e,!0)}});function tt(t,e,n){var i;let r=null;return null===(i=t.field(K,!1))||void 0===i||i.between(e,n,((t,e)=>{(!r||r.from>t)&&(r={from:t,to:e})})),r}function et(t,e,n){let i=!1;return t.between(e,e,((t,r)=>{t==e&&r==n&&(i=!0)})),i}function nt(t,e){return t.field(K,!1)?e:e.concat(o.Pe.appendConfig.of(at()))}function it(t,e,n=!0){let i=t.state.doc.lineAt(e.from).number,r=t.state.doc.lineAt(e.to).number;return s.Lz.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${i} ${t.state.phrase("to")} ${r}.`)}const rt=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:t=>{for(let e of $(t)){let n=Y(t.state,e.from,e.to);if(n)return t.dispatch({effects:nt(t.state,[Q.of(n),it(t,n)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:t=>{if(!t.state.field(K,!1))return!1;let e=[];for(let n of $(t)){let i=tt(t.state,n.from,n.to);i&&e.push(X.of(i),it(t,i,!1))}return e.length&&t.dispatch({effects:e}),e.length>0}},{key:"Ctrl-Alt-[",run:t=>{let{state:e}=t,n=[];for(let i=0;i<e.doc.length;){let r=t.lineBlockAt(i),o=Y(e,r.from,r.to);o&&n.push(Q.of(o)),i=(o?t.lineBlockAt(o.to):r).to+1}return n.length&&t.dispatch({effects:nt(t.state,n)}),!!n.length}},{key:"Ctrl-Alt-]",run:t=>{let e=t.state.field(K,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,((t,e)=>{n.push(X.of({from:t,to:e}))})),t.dispatch({effects:n}),!0}}],ot={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},st=o.sj.define({combine:t=>(0,o.QR)(t,ot)});function at(t){let e=[K,pt];return t&&e.push(st.of(t)),e}function lt(t,e){let{state:n}=t,i=n.facet(st),r=e=>{let n=t.lineBlockAt(t.posAtDOM(e.target)),i=tt(t.state,n.from,n.to);i&&t.dispatch({effects:X.of(i)}),e.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(t,r,e);let o=document.createElement("span");return o.textContent=i.placeholderText,o.setAttribute("aria-label",n.phrase("folded code")),o.title=n.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=r,o}const ct=s.NZ.replace({widget:new class extends s.xO{toDOM(t){return lt(t,null)}}});class ut extends s.xO{constructor(t){super(),this.value=t}eq(t){return this.value==t.value}toDOM(t){return lt(t,this.value)}}const ht={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class ft extends s.wJ{constructor(t,e){super(),this.config=t,this.open=e}eq(t){return this.config==t.config&&this.open==t.open}toDOM(t){if(this.config.markerDOM)return this.config.markerDOM(this.open);let e=document.createElement("span");return e.textContent=this.open?this.config.openText:this.config.closedText,e.title=t.state.phrase(this.open?"Fold line":"Unfold line"),e}}function dt(t={}){let e=Object.assign(Object.assign({},ht),t),n=new ft(e,!0),i=new ft(e,!1),r=s.Z9.fromClass(class{constructor(t){this.from=t.viewport.from,this.markers=this.buildMarkers(t)}update(t){(t.docChanged||t.viewportChanged||t.startState.facet(I)!=t.state.facet(I)||t.startState.field(K,!1)!=t.state.field(K,!1)||g(t.startState)!=g(t.state)||e.foldingChanged(t))&&(this.markers=this.buildMarkers(t.view))}buildMarkers(t){let e=new o.vB;for(let r of t.viewportLineBlocks){let o=tt(t.state,r.from,r.to)?i:Y(t.state,r.from,r.to)?n:null;o&&e.add(r.from,r.from,o)}return e.finish()}}),{domEventHandlers:a}=e;return[r,(0,s.cU)({class:"cm-foldGutter",markers(t){var e;return(null===(e=t.plugin(r))||void 0===e?void 0:e.markers)||o.om.empty},initialSpacer:()=>new ft(e,!1),domEventHandlers:Object.assign(Object.assign({},a),{click:(t,e,n)=>{if(a.click&&a.click(t,e,n))return!0;let i=tt(t.state,e.from,e.to);if(i)return t.dispatch({effects:X.of(i)}),!0;let r=Y(t.state,e.from,e.to);return!!r&&(t.dispatch({effects:Q.of(r)}),!0)}})}),at()]}const pt=s.Lz.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class gt{constructor(t,e){let n;function i(t){let e=l.G.newName();return(n||(n=Object.create(null)))["."+e]=t,e}this.specs=t;const r="string"==typeof e.all?e.all:e.all?i(e.all):void 0,o=e.scope;this.scope=o instanceof f?t=>t.prop(c)==o.data:o?t=>t==o:void 0,this.style=(0,a.az)(t.map((t=>({tag:t.tag,class:t.class||i(Object.assign({},t,{tag:null}))}))),{all:r}).style,this.module=n?new l.G(n):null,this.themeType=e.themeType}static define(t,e){return new gt(t,e||{})}}const mt=o.sj.define(),bt=o.sj.define({combine:t=>t.length?[t[0]]:null});function vt(t){let e=t.facet(mt);return e.length?e:t.facet(bt)}function yt(t,e){let n,i=[wt];return t instanceof gt&&(t.module&&i.push(s.Lz.styleModule.of(t.module)),n=t.themeType),(null==e?void 0:e.fallback)?i.push(bt.of(t)):n?i.push(mt.computeN([s.Lz.darkTheme],(e=>e.facet(s.Lz.darkTheme)==("dark"==n)?[t]:[]))):i.push(mt.of(t)),i}class xt{constructor(t){this.markCache=Object.create(null),this.tree=g(t.state),this.decorations=this.buildDeco(t,vt(t.state)),this.decoratedTo=t.viewport.to}update(t){let e=g(t.state),n=vt(t.state),i=n!=vt(t.startState),{viewport:r}=t.view,o=t.changes.mapPos(this.decoratedTo,1);e.length<r.to&&!i&&e.type==this.tree.type&&o>=r.to?(this.decorations=this.decorations.map(t.changes),this.decoratedTo=o):(e!=this.tree||t.viewportChanged||i)&&(this.tree=e,this.decorations=this.buildDeco(t.view,n),this.decoratedTo=r.to)}buildDeco(t,e){if(!e||!this.tree.length)return s.NZ.none;let n=new o.vB;for(let{from:i,to:r}of t.visibleRanges)(0,a.DM)(this.tree,e,((t,e,i)=>{n.add(t,e,this.markCache[i]||(this.markCache[i]=s.NZ.mark({class:i})))}),i,r);return n.finish()}}const wt=o.Nb.high(s.Z9.fromClass(xt,{decorations:t=>t.decorations})),St=gt.define([{tag:a._A.meta,color:"#404740"},{tag:a._A.link,textDecoration:"underline"},{tag:a._A.heading,textDecoration:"underline",fontWeight:"bold"},{tag:a._A.emphasis,fontStyle:"italic"},{tag:a._A.strong,fontWeight:"bold"},{tag:a._A.strikethrough,textDecoration:"line-through"},{tag:a._A.keyword,color:"#708"},{tag:[a._A.atom,a._A.bool,a._A.url,a._A.contentSeparator,a._A.labelName],color:"#219"},{tag:[a._A.literal,a._A.inserted],color:"#164"},{tag:[a._A.string,a._A.deleted],color:"#a11"},{tag:[a._A.regexp,a._A.escape,a._A.special(a._A.string)],color:"#e40"},{tag:a._A.definition(a._A.variableName),color:"#00f"},{tag:a._A.local(a._A.variableName),color:"#30a"},{tag:[a._A.typeName,a._A.namespace],color:"#085"},{tag:a._A.className,color:"#167"},{tag:[a._A.special(a._A.variableName),a._A.macroName],color:"#256"},{tag:a._A.definition(a._A.propertyName),color:"#00c"},{tag:a._A.comment,color:"#940"},{tag:a._A.invalid,color:"#f00"}]),Ot=s.Lz.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),It=1e4,kt="()[]{}",Et=o.sj.define({combine:t=>(0,o.QR)(t,{afterCursor:!0,brackets:kt,maxScanDistance:It,renderMatch:At})}),Mt=s.NZ.mark({class:"cm-matchingBracket"}),Ct=s.NZ.mark({class:"cm-nonmatchingBracket"});function At(t){let e=[],n=t.matched?Mt:Ct;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const jt=[o.sU.define({create:()=>s.NZ.none,update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],i=e.state.facet(Et);for(let r of e.state.selection.ranges){if(!r.empty)continue;let t=Lt(e.state,r.head,-1,i)||r.head>0&&Lt(e.state,r.head-1,1,i)||i.afterCursor&&(Lt(e.state,r.head,1,i)||r.head<e.state.doc.length&&Lt(e.state,r.head+1,-1,i));t&&(n=n.concat(i.renderMatch(t,e.state)))}return s.NZ.set(n,!0)},provide:t=>s.Lz.decorations.from(t)}),Ot];function Pt(t={}){return[Et.of(t),jt]}const Tt=new r.uY;function Nt(t,e,n){let i=t.prop(e<0?r.uY.openedBy:r.uY.closedBy);if(i)return i;if(1==t.name.length){let i=n.indexOf(t.name);if(i>-1&&i%2==(e<0?1:0))return[n[i+e]]}return null}function _t(t){let e=t.type.prop(Tt);return e?e(t.node):t}function Lt(t,e,n,i={}){let r=i.maxScanDistance||It,o=i.brackets||kt,s=g(t),a=s.resolveInner(e,n);for(let l=a;l;l=l.parent){let i=Nt(l.type,n,o);if(i&&l.from<l.to){let r=_t(l);if(r&&(n>0?e>=r.from&&e<r.to:e>r.from&&e<=r.to))return Dt(t,e,n,l,r,i,o)}}return function(t,e,n,i,r,o,s){let a=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),l=s.indexOf(a);if(l<0||l%2==0!=n>0)return null;let c={from:n<0?e-1:e,to:n>0?e+1:e},u=t.doc.iterRange(e,n>0?t.doc.length:0),h=0;for(let f=0;!u.next().done&&f<=o;){let t=u.value;n<0&&(f+=t.length);let o=e+f*n;for(let e=n>0?0:t.length-1,a=n>0?t.length:-1;e!=a;e+=n){let a=s.indexOf(t[e]);if(!(a<0||i.resolveInner(o+e,1).type!=r))if(a%2==0==n>0)h++;else{if(1==h)return{start:c,end:{from:o+e,to:o+e+1},matched:a>>1==l>>1};h--}}n>0&&(f+=t.length)}return u.done?{start:c,matched:!1}:null}(t,e,n,s,a.type,r,o)}function Dt(t,e,n,i,r,o,s){let a=i.parent,l={from:r.from,to:r.to},c=0,u=null==a?void 0:a.cursor();if(u&&(n<0?u.childBefore(i.from):u.childAfter(i.to)))do{if(n<0?u.to<=i.from:u.from>=i.to){if(0==c&&o.indexOf(u.type.name)>-1&&u.from<u.to){let t=_t(u);return{start:l,end:t?{from:t.from,to:t.to}:void 0,matched:!0}}if(Nt(u.type,n,s))c++;else if(Nt(u.type,-n,s)){if(0==c){let t=_t(u);return{start:l,end:t&&t.from<t.to?{from:t.from,to:t.to}:void 0,matched:!1}}c--}}}while(n<0?u.prevSibling():u.nextSibling());return{start:l,matched:!1}}const Rt=Object.create(null),Bt=[r.Z6.none],Ht=[],zt=Object.create(null),Wt=Object.create(null);for(let[Gt,Zt]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])Wt[Gt]=Ft(Rt,Zt);function Ut(t,e){Ht.indexOf(t)>-1||(Ht.push(t),console.warn(e))}function Ft(t,e){let n=[];for(let r of e.split(" ")){let e=[];for(let n of r.split(".")){let i=t[n]||a._A[n];i?"function"==typeof i?e.length?e=e.map(i):Ut(n,`Modifier ${n} used at start of tag`):e.length?Ut(n,`Tag ${n} used as modifier`):e=Array.isArray(i)?i:[i]:Ut(n,`Unknown highlighting tag ${n}`)}for(let t of e)n.push(t)}if(!n.length)return 0;let i=e.replace(/ /g,"_"),o=i+" "+n.map((t=>t.id)),s=zt[o];if(s)return s.id;let l=zt[o]=r.Z6.define({id:Bt.length,name:i,props:[(0,a.pn)({[i]:n})]});return Bt.push(l),l.id}s.OP.RTL,s.OP.LTR},5284:(t,e,n)=>{"use strict";n.d(e,{YH:()=>mt,Gu:()=>P,VR:()=>T,Je:()=>Mt,OF:()=>z,$t:()=>Pt,sj:()=>F,iR:()=>j,Nb:()=>nt,om:()=>Rt,vB:()=>Bt,FB:()=>Nt,Pe:()=>yt,sU:()=>Q,EY:()=>g,ZX:()=>xt,vS:()=>E,Fh:()=>C,QR:()=>Tt,y$:()=>Jt,zK:()=>k,kn:()=>Qt,MK:()=>M});let i=[],r=[];function o(t){if(t<768)return!1;for(let e=0,n=i.length;;){let o=e+n>>1;if(t<i[o])n=o;else{if(!(t>=r[o]))return!0;e=o+1}if(e==n)return!1}}function s(t){return t>=127462&&t<=127487}(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((t=>t?parseInt(t,36):1));for(let e=0,n=0;e<t.length;e++)(e%2?r:i).push(n+=t[e])})();const a=8205;function l(t,e,n=!0,i=!0){return(n?c:u)(t,e,i)}function c(t,e,n){if(e==t.length)return e;e&&f(t.charCodeAt(e))&&d(t.charCodeAt(e-1))&&e--;let i=h(t,e);for(e+=p(i);e<t.length;){let r=h(t,e);if(i==a||r==a||n&&o(r))e+=p(r),i=r;else{if(!s(r))break;{let n=0,i=e-2;for(;i>=0&&s(h(t,i));)n++,i-=2;if(n%2==0)break;e+=2}}}return e}function u(t,e,n){for(;e>0;){let i=c(t,e-2,n);if(i<e)return i;e--}return 0}function h(t,e){let n=t.charCodeAt(e);if(!d(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return f(i)?i-56320+(n-55296<<10)+65536:n}function f(t){return t>=56320&&t<57344}function d(t){return t>=55296&&t<56320}function p(t){return t<65536?1:2}class g{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,e,n){[t,e]=I(this,t,e);let i=[];return this.decompose(0,t,i,2),n.length&&n.decompose(0,n.length,i,3),this.decompose(e,this.length,i,1),b.from(i,this.length-(e-t)+n.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,e=this.length){[t,e]=I(this,t,e);let n=[];return this.decompose(t,e,n,0),b.from(n,e-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let e=this.scanIdentical(t,1),n=this.length-this.scanIdentical(t,-1),i=new x(this),r=new x(t);for(let o=e,s=e;;){if(i.next(o),r.next(o),o=0,i.lineBreak!=r.lineBreak||i.done!=r.done||i.value!=r.value)return!1;if(s+=i.value.length,i.done||s>=n)return!0}}iter(t=1){return new x(this,t)}iterRange(t,e=this.length){return new w(this,t,e)}iterLines(t,e){let n;if(null==t)n=this.iter();else{null==e&&(e=this.lines+1);let i=this.line(t).from;n=this.iterRange(i,Math.max(i,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new S(n)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(0==t.length)throw new RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new m(t):b.from(m.split(t,[])):g.empty}}class m extends g{constructor(t,e=function(t){let e=-1;for(let n of t)e+=n.length+1;return e}(t)){super(),this.text=t,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(t,e,n,i){for(let r=0;;r++){let o=this.text[r],s=i+o.length;if((e?n:s)>=t)return new O(i,s,n,o);i=s+1,n++}}decompose(t,e,n,i){let r=t<=0&&e>=this.length?this:new m(y(this.text,t,e),Math.min(e,this.length)-Math.max(0,t));if(1&i){let t=n.pop(),e=v(r.text,t.text.slice(),0,r.length);if(e.length<=32)n.push(new m(e,t.length+r.length));else{let t=e.length>>1;n.push(new m(e.slice(0,t)),new m(e.slice(t)))}}else n.push(r)}replace(t,e,n){if(!(n instanceof m))return super.replace(t,e,n);[t,e]=I(this,t,e);let i=v(this.text,v(n.text,y(this.text,0,t)),e),r=this.length+n.length-(e-t);return i.length<=32?new m(i,r):b.from(m.split(i,[]),r)}sliceString(t,e=this.length,n="\n"){[t,e]=I(this,t,e);let i="";for(let r=0,o=0;r<=e&&o<this.text.length;o++){let s=this.text[o],a=r+s.length;r>t&&o&&(i+=n),t<a&&e>r&&(i+=s.slice(Math.max(0,t-r),e-r)),r=a+1}return i}flatten(t){for(let e of this.text)t.push(e)}scanIdentical(){return 0}static split(t,e){let n=[],i=-1;for(let r of t)n.push(r),i+=r.length+1,32==n.length&&(e.push(new m(n,i)),n=[],i=-1);return i>-1&&e.push(new m(n,i)),e}}class b extends g{constructor(t,e){super(),this.children=t,this.length=e,this.lines=0;for(let n of t)this.lines+=n.lines}lineInner(t,e,n,i){for(let r=0;;r++){let o=this.children[r],s=i+o.length,a=n+o.lines-1;if((e?a:s)>=t)return o.lineInner(t,e,n,i);i=s+1,n=a+1}}decompose(t,e,n,i){for(let r=0,o=0;o<=e&&r<this.children.length;r++){let s=this.children[r],a=o+s.length;if(t<=a&&e>=o){let r=i&((o<=t?1:0)|(a>=e?2:0));o>=t&&a<=e&&!r?n.push(s):s.decompose(t-o,e-o,n,r)}o=a+1}}replace(t,e,n){if([t,e]=I(this,t,e),n.lines<this.lines)for(let i=0,r=0;i<this.children.length;i++){let o=this.children[i],s=r+o.length;if(t>=r&&e<=s){let a=o.replace(t-r,e-r,n),l=this.lines-o.lines+a.lines;if(a.lines<l>>4&&a.lines>l>>6){let r=this.children.slice();return r[i]=a,new b(r,this.length-(e-t)+n.length)}return super.replace(r,s,a)}r=s+1}return super.replace(t,e,n)}sliceString(t,e=this.length,n="\n"){[t,e]=I(this,t,e);let i="";for(let r=0,o=0;r<this.children.length&&o<=e;r++){let s=this.children[r],a=o+s.length;o>t&&r&&(i+=n),t<a&&e>o&&(i+=s.sliceString(t-o,e-o,n)),o=a+1}return i}flatten(t){for(let e of this.children)e.flatten(t)}scanIdentical(t,e){if(!(t instanceof b))return 0;let n=0,[i,r,o,s]=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;i+=e,r+=e){if(i==o||r==s)return n;let a=this.children[i],l=t.children[r];if(a!=l)return n+a.scanIdentical(l,e);n+=a.length+1}}static from(t,e=t.reduce(((t,e)=>t+e.length+1),-1)){let n=0;for(let f of t)n+=f.lines;if(n<32){let n=[];for(let e of t)e.flatten(n);return new m(n,e)}let i=Math.max(32,n>>5),r=i<<1,o=i>>1,s=[],a=0,l=-1,c=[];function u(t){let e;if(t.lines>r&&t instanceof b)for(let n of t.children)u(n);else t.lines>o&&(a>o||!a)?(h(),s.push(t)):t instanceof m&&a&&(e=c[c.length-1])instanceof m&&t.lines+e.lines<=32?(a+=t.lines,l+=t.length+1,c[c.length-1]=new m(e.text.concat(t.text),e.length+1+t.length)):(a+t.lines>i&&h(),a+=t.lines,l+=t.length+1,c.push(t))}function h(){0!=a&&(s.push(1==c.length?c[0]:b.from(c,l)),l=-1,a=c.length=0)}for(let f of t)u(f);return h(),1==s.length?s[0]:new b(s,e)}}function v(t,e,n=0,i=1e9){for(let r=0,o=0,s=!0;o<t.length&&r<=i;o++){let a=t[o],l=r+a.length;l>=n&&(l>i&&(a=a.slice(0,i-r)),r<n&&(a=a.slice(n-r)),s?(e[e.length-1]+=a,s=!1):e.push(a)),r=l+1}return e}function y(t,e,n){return v(t,[""],e,n)}g.empty=new m([""],0);class x{constructor(t,e=1){this.dir=e,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[t],this.offsets=[e>0?1:(t instanceof m?t.text.length:t.children.length)<<1]}nextInner(t,e){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,i=this.nodes[n],r=this.offsets[n],o=r>>1,s=i instanceof m?i.text.length:i.children.length;if(o==(e>0?s:0)){if(0==n)return this.done=!0,this.value="",this;e>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&r)==(e>0?0:1)){if(this.offsets[n]+=e,0==t)return this.lineBreak=!0,this.value="\n",this;t--}else if(i instanceof m){let r=i.text[o+(e<0?-1:0)];if(this.offsets[n]+=e,r.length>Math.max(0,t))return this.value=0==t?r:e>0?r.slice(t):r.slice(0,r.length-t),this;t-=r.length}else{let r=i.children[o+(e<0?-1:0)];t>r.length?(t-=r.length,this.offsets[n]+=e):(e<0&&this.offsets[n]--,this.nodes.push(r),this.offsets.push(e>0?1:(r instanceof m?r.text.length:r.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class w{constructor(t,e,n){this.value="",this.done=!1,this.cursor=new x(t,e>n?-1:1),this.pos=e>n?t.length:0,this.from=Math.min(e,n),this.to=Math.max(e,n)}nextInner(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let n=e<0?this.pos-this.from:this.to-this.pos;t>n&&(t=n),n-=t;let{value:i}=this.cursor.next(t);return this.pos+=(i.length+t)*e,this.value=i.length<=n?i:e<0?i.slice(i.length-n):i.slice(0,n),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class S{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:e,lineBreak:n,value:i}=this.inner.next(t);return e&&this.afterBreak?(this.value="",this.afterBreak=!1):e?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(g.prototype[Symbol.iterator]=function(){return this.iter()},x.prototype[Symbol.iterator]=w.prototype[Symbol.iterator]=S.prototype[Symbol.iterator]=function(){return this});class O{constructor(t,e,n,i){this.from=t,this.to=e,this.number=n,this.text=i}get length(){return this.to-this.from}}function I(t,e,n){return[e=Math.max(0,Math.min(t.length,e)),Math.max(e,Math.min(t.length,n))]}function k(t,e,n=!0,i=!0){return l(t,e,n,i)}function E(t,e){let n=t.charCodeAt(e);if(!(i=n,i>=55296&&i<56320&&e+1!=t.length))return n;var i;let r=t.charCodeAt(e+1);return function(t){return t>=56320&&t<57344}(r)?r-56320+(n-55296<<10)+65536:n}function M(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function C(t){return t<65536?1:2}const A=/\r\n?|\n/;var j=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(j||(j={}));class P{constructor(t){this.sections=t}get length(){let t=0;for(let e=0;e<this.sections.length;e+=2)t+=this.sections[e];return t}get newLength(){let t=0;for(let e=0;e<this.sections.length;e+=2){let n=this.sections[e+1];t+=n<0?this.sections[e]:n}return t}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(t){for(let e=0,n=0,i=0;e<this.sections.length;){let r=this.sections[e++],o=this.sections[e++];o<0?(t(n,i,r),i+=r):i+=o,n+=r}}iterChangedRanges(t,e=!1){L(this,t,e)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let n=this.sections[e++],i=this.sections[e++];i<0?t.push(n,i):t.push(i,n)}return new P(t)}composeDesc(t){return this.empty?t:t.empty?this:R(this,t)}mapDesc(t,e=!1){return t.empty?this:D(this,t,e)}mapPos(t,e=-1,n=j.Simple){let i=0,r=0;for(let o=0;o<this.sections.length;){let s=this.sections[o++],a=this.sections[o++],l=i+s;if(a<0){if(l>t)return r+(t-i);r+=s}else{if(n!=j.Simple&&l>=t&&(n==j.TrackDel&&i<t&&l>t||n==j.TrackBefore&&i<t||n==j.TrackAfter&&l>t))return null;if(l>t||l==t&&e<0&&!s)return t==i||e<0?r:r+a;r+=a}i=l}if(t>i)throw new RangeError(`Position ${t} is out of range for changeset of length ${i}`);return r}touchesRange(t,e=t){for(let n=0,i=0;n<this.sections.length&&i<=e;){let r=i+this.sections[n++];if(this.sections[n++]>=0&&i<=e&&r>=t)return!(i<t&&r>e)||"cover";i=r}return!1}toString(){let t="";for(let e=0;e<this.sections.length;){let n=this.sections[e++],i=this.sections[e++];t+=(t?" ":"")+n+(i>=0?":"+i:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some((t=>"number"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeDesc");return new P(t)}static create(t){return new P(t)}}class T extends P{constructor(t,e){super(t),this.inserted=e}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return L(this,((e,n,i,r,o)=>t=t.replace(i,i+(n-e),o)),!1),t}mapDesc(t,e=!1){return D(this,t,e,!0)}invert(t){let e=this.sections.slice(),n=[];for(let i=0,r=0;i<e.length;i+=2){let o=e[i],s=e[i+1];if(s>=0){e[i]=s,e[i+1]=o;let a=i>>1;for(;n.length<a;)n.push(g.empty);n.push(o?t.slice(r,r+o):g.empty)}r+=o}return new T(e,n)}compose(t){return this.empty?t:t.empty?this:R(this,t,!0)}map(t,e=!1){return t.empty?this:D(this,t,e,!0)}iterChanges(t,e=!1){L(this,t,e)}get desc(){return P.create(this.sections)}filter(t){let e=[],n=[],i=[],r=new B(this);t:for(let o=0,s=0;;){let a=o==t.length?1e9:t[o++];for(;s<a||s==a&&0==r.len;){if(r.done)break t;let t=Math.min(r.len,a-s);N(i,t,-1);let o=-1==r.ins?-1:0==r.off?r.ins:0;N(e,t,o),o>0&&_(n,e,r.text),r.forward(t),s+=t}let l=t[o++];for(;s<l;){if(r.done)break t;let t=Math.min(r.len,l-s);N(e,t,-1),N(i,t,-1==r.ins?-1:0==r.off?r.ins:0),r.forward(t),s+=t}}return{changes:new T(e,n),filtered:P.create(i)}}toJSON(){let t=[];for(let e=0;e<this.sections.length;e+=2){let n=this.sections[e],i=this.sections[e+1];i<0?t.push(n):0==i?t.push([n]):t.push([n].concat(this.inserted[e>>1].toJSON()))}return t}static of(t,e,n){let i=[],r=[],o=0,s=null;function a(t=!1){if(!t&&!i.length)return;o<e&&N(i,e-o,-1);let n=new T(i,r);s=s?s.compose(n.map(s)):n,i=[],r=[],o=0}return function t(l){if(Array.isArray(l))for(let e of l)t(e);else if(l instanceof T){if(l.length!=e)throw new RangeError(`Mismatched change set length (got ${l.length}, expected ${e})`);a(),s=s?s.compose(l.map(s)):l}else{let{from:t,to:s=t,insert:c}=l;if(t>s||t<0||s>e)throw new RangeError(`Invalid change range ${t} to ${s} (in doc of length ${e})`);let u=c?"string"==typeof c?g.of(c.split(n||A)):c:g.empty,h=u.length;if(t==s&&0==h)return;t<o&&a(),t>o&&N(i,t-o,-1),N(i,s-t,h),_(r,i,u),o=s}}(t),a(!s),s}static empty(t){return new T(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let e=[],n=[];for(let i=0;i<t.length;i++){let r=t[i];if("number"==typeof r)e.push(r,-1);else{if(!Array.isArray(r)||"number"!=typeof r[0]||r.some(((t,e)=>e&&"string"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==r.length)e.push(r[0],0);else{for(;n.length<i;)n.push(g.empty);n[i]=g.of(r.slice(1)),e.push(r[0],n[i].length)}}}return new T(e,n)}static createSet(t,e){return new T(t,e)}}function N(t,e,n,i=!1){if(0==e&&n<=0)return;let r=t.length-2;r>=0&&n<=0&&n==t[r+1]?t[r]+=e:r>=0&&0==e&&0==t[r]?t[r+1]+=n:i?(t[r]+=e,t[r+1]+=n):t.push(e,n)}function _(t,e,n){if(0==n.length)return;let i=e.length-2>>1;if(i<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<i;)t.push(g.empty);t.push(n)}}function L(t,e,n){let i=t.inserted;for(let r=0,o=0,s=0;s<t.sections.length;){let a=t.sections[s++],l=t.sections[s++];if(l<0)r+=a,o+=a;else{let c=r,u=o,h=g.empty;for(;c+=a,u+=l,l&&i&&(h=h.append(i[s-2>>1])),!(n||s==t.sections.length||t.sections[s+1]<0);)a=t.sections[s++],l=t.sections[s++];e(r,c,o,u,h),r=c,o=u}}}function D(t,e,n,i=!1){let r=[],o=i?[]:null,s=new B(t),a=new B(e);for(let l=-1;;){if(s.done&&a.len||a.done&&s.len)throw new Error("Mismatched change set lengths");if(-1==s.ins&&-1==a.ins){let t=Math.min(s.len,a.len);N(r,t,-1),s.forward(t),a.forward(t)}else if(a.ins>=0&&(s.ins<0||l==s.i||0==s.off&&(a.len<s.len||a.len==s.len&&!n))){let t=a.len;for(N(r,a.ins,-1);t;){let e=Math.min(s.len,t);s.ins>=0&&l<s.i&&s.len<=e&&(N(r,0,s.ins),o&&_(o,r,s.text),l=s.i),s.forward(e),t-=e}a.next()}else{if(!(s.ins>=0)){if(s.done&&a.done)return o?T.createSet(r,o):P.create(r);throw new Error("Mismatched change set lengths")}{let t=0,e=s.len;for(;e;)if(-1==a.ins){let n=Math.min(e,a.len);t+=n,e-=n,a.forward(n)}else{if(!(0==a.ins&&a.len<e))break;e-=a.len,a.next()}N(r,t,l<s.i?s.ins:0),o&&l<s.i&&_(o,r,s.text),l=s.i,s.forward(s.len-e)}}}}function R(t,e,n=!1){let i=[],r=n?[]:null,o=new B(t),s=new B(e);for(let a=!1;;){if(o.done&&s.done)return r?T.createSet(i,r):P.create(i);if(0==o.ins)N(i,o.len,0,a),o.next();else if(0!=s.len||s.done){if(o.done||s.done)throw new Error("Mismatched change set lengths");{let t=Math.min(o.len2,s.len),e=i.length;if(-1==o.ins){let e=-1==s.ins?-1:s.off?0:s.ins;N(i,t,e,a),r&&e&&_(r,i,s.text)}else-1==s.ins?(N(i,o.off?0:o.len,t,a),r&&_(r,i,o.textBit(t))):(N(i,o.off?0:o.len,s.off?0:s.ins,a),r&&!s.off&&_(r,i,s.text));a=(o.ins>t||s.ins>=0&&s.len>t)&&(a||i.length>e),o.forward2(t),s.forward(t)}}else N(i,0,s.ins,a),r&&_(r,i,s.text),s.next()}}class B{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i<t.length?(this.len=t[this.i++],this.ins=t[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return-2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:t}=this.set,e=this.i-2>>1;return e>=t.length?g.empty:t[e]}textBit(t){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length&&!t?g.empty:e[n].slice(this.off,null==t?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){-1==this.ins?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class H{constructor(t,e,n){this.from=t,this.to=e,this.flags=n}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let t=7&this.flags;return 7==t?null:t}get goalColumn(){let t=this.flags>>6;return 16777215==t?void 0:t}map(t,e=-1){let n,i;return this.empty?n=i=t.mapPos(this.from,e):(n=t.mapPos(this.from,1),i=t.mapPos(this.to,-1)),n==this.from&&i==this.to?this:new H(n,i,this.flags)}extend(t,e=t){if(t<=this.anchor&&e>=this.anchor)return z.range(t,e);let n=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return z.range(this.anchor,n)}eq(t,e=!1){return!(this.anchor!=t.anchor||this.head!=t.head||e&&this.empty&&this.assoc!=t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||"number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid JSON representation for SelectionRange");return z.range(t.anchor,t.head)}static create(t,e,n){return new H(t,e,n)}}class z{constructor(t,e){this.ranges=t,this.mainIndex=e}map(t,e=-1){return t.empty?this:z.create(this.ranges.map((n=>n.map(t,e))),this.mainIndex)}eq(t,e=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(t.ranges[n],e))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new z([this.main],0)}addRange(t,e=!0){return z.create([t].concat(this.ranges),e?0:this.mainIndex+1)}replaceRange(t,e=this.mainIndex){let n=this.ranges.slice();return n[e]=t,z.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map((t=>t.toJSON())),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||"number"!=typeof t.main||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new z(t.ranges.map((t=>H.fromJSON(t))),t.main)}static single(t,e=t){return new z([z.range(t,e)],0)}static create(t,e=0){if(0==t.length)throw new RangeError("A selection needs at least one range");for(let n=0,i=0;i<t.length;i++){let r=t[i];if(r.empty?r.from<=n:r.from<n)return z.normalized(t.slice(),e);n=r.to}return new z(t,e)}static cursor(t,e=0,n,i){return H.create(t,t,(0==e?0:e<0?8:16)|(null==n?7:Math.min(6,n))|(null!=i?i:16777215)<<6)}static range(t,e,n,i){let r=(null!=n?n:16777215)<<6|(null==i?7:Math.min(6,i));return e<t?H.create(e,t,48|r):H.create(t,e,(e>t?8:0)|r)}static normalized(t,e=0){let n=t[e];t.sort(((t,e)=>t.from-e.from)),e=t.indexOf(n);for(let i=1;i<t.length;i++){let n=t[i],r=t[i-1];if(n.empty?n.from<=r.to:n.from<r.to){let o=r.from,s=Math.max(n.to,r.to);i<=e&&e--,t.splice(--i,2,n.anchor>n.head?z.range(s,o):z.range(o,s))}}return new z(t,e)}}function W(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let U=0;class F{constructor(t,e,n,i,r){this.combine=t,this.compareInput=e,this.compare=n,this.isStatic=i,this.id=U++,this.default=t([]),this.extensions="function"==typeof r?r(this):r}get reader(){return this}static define(t={}){return new F(t.combine||(t=>t),t.compareInput||((t,e)=>t===e),t.compare||(t.combine?(t,e)=>t===e:G),!!t.static,t.enables)}of(t){return new Z([],this,0,t)}compute(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new Z(t,this,1,e)}computeN(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new Z(t,this,2,e)}from(t,e){return e||(e=t=>t),this.compute([t],(n=>e(n.field(t))))}}function G(t,e){return t==e||t.length==e.length&&t.every(((t,n)=>t===e[n]))}class Z{constructor(t,e,n,i){this.dependencies=t,this.facet=e,this.type=n,this.value=i,this.id=U++}dynamicSlot(t){var e;let n=this.value,i=this.facet.compareInput,r=this.id,o=t[r]>>1,s=2==this.type,a=!1,l=!1,c=[];for(let u of this.dependencies)"doc"==u?a=!0:"selection"==u?l=!0:1&(null!==(e=t[u.id])&&void 0!==e?e:1)||c.push(t[u.id]);return{create:t=>(t.values[o]=n(t),1),update(t,e){if(a&&e.docChanged||l&&(e.docChanged||e.selection)||q(t,c)){let e=n(t);if(s?!V(e,t.values[o],i):!i(e,t.values[o]))return t.values[o]=e,1}return 0},reconfigure:(t,e)=>{let a,l=e.config.address[r];if(null!=l){let r=lt(e,l);if(this.dependencies.every((n=>n instanceof F?e.facet(n)===t.facet(n):!(n instanceof Q)||e.field(n,!1)==t.field(n,!1)))||(s?V(a=n(t),r,i):i(a=n(t),r)))return t.values[o]=r,0}else a=n(t);return t.values[o]=a,1}}}}function V(t,e,n){if(t.length!=e.length)return!1;for(let i=0;i<t.length;i++)if(!n(t[i],e[i]))return!1;return!0}function q(t,e){let n=!1;for(let i of e)1&at(t,i)&&(n=!0);return n}function Y(t,e,n){let i=n.map((e=>t[e.id])),r=n.map((t=>t.type)),o=i.filter((t=>!(1&t))),s=t[e.id]>>1;function a(t){let n=[];for(let e=0;e<i.length;e++){let o=lt(t,i[e]);if(2==r[e])for(let t of o)n.push(t);else n.push(o)}return e.combine(n)}return{create(t){for(let e of i)at(t,e);return t.values[s]=a(t),1},update(t,n){if(!q(t,o))return 0;let i=a(t);return e.compare(i,t.values[s])?0:(t.values[s]=i,1)},reconfigure(t,r){let o=q(t,i),l=r.config.facets[e.id],c=r.facet(e);if(l&&!o&&G(n,l))return t.values[s]=c,0;let u=a(t);return e.compare(u,c)?(t.values[s]=c,0):(t.values[s]=u,1)}}}const J=F.define({static:!0});class Q{constructor(t,e,n,i,r){this.id=t,this.createF=e,this.updateF=n,this.compareF=i,this.spec=r,this.provides=void 0}static define(t){let e=new Q(U++,t.create,t.update,t.compare||((t,e)=>t===e),t);return t.provide&&(e.provides=t.provide(e)),e}create(t){let e=t.facet(J).find((t=>t.field==this));return((null==e?void 0:e.create)||this.createF)(t)}slot(t){let e=t[this.id]>>1;return{create:t=>(t.values[e]=this.create(t),1),update:(t,n)=>{let i=t.values[e],r=this.updateF(i,n);return this.compareF(i,r)?0:(t.values[e]=r,1)},reconfigure:(t,n)=>null!=n.config.address[this.id]?(t.values[e]=n.field(this),0):(t.values[e]=this.create(t),1)}}init(t){return[this,J.of({field:this,create:t})]}get extension(){return this}}const X=4,$=3,K=2,tt=1;function et(t){return e=>new it(e,t)}const nt={highest:et(0),high:et(tt),default:et(K),low:et($),lowest:et(X)};class it{constructor(t,e){this.inner=t,this.prec=e}}class rt{of(t){return new ot(this,t)}reconfigure(t){return rt.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class ot{constructor(t,e){this.compartment=t,this.inner=e}}class st{constructor(t,e,n,i,r,o){for(this.base=t,this.compartments=e,this.dynamicSlots=n,this.address=i,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(t){let e=this.address[t.id];return null==e?t.default:this.staticValues[e>>1]}static resolve(t,e,n){let i=[],r=Object.create(null),o=new Map;for(let h of function(t,e,n){let i=[[],[],[],[],[]],r=new Map;function o(t,s){let a=r.get(t);if(null!=a){if(a<=s)return;let e=i[a].indexOf(t);e>-1&&i[a].splice(e,1),t instanceof ot&&n.delete(t.compartment)}if(r.set(t,s),Array.isArray(t))for(let e of t)o(e,s);else if(t instanceof ot){if(n.has(t.compartment))throw new RangeError("Duplicate use of compartment in extensions");let i=e.get(t.compartment)||t.inner;n.set(t.compartment,i),o(i,s)}else if(t instanceof it)o(t.inner,t.prec);else if(t instanceof Q)i[s].push(t),t.provides&&o(t.provides,s);else if(t instanceof Z)i[s].push(t),t.facet.extensions&&o(t.facet.extensions,K);else{let e=t.extension;if(!e)throw new Error(`Unrecognized extension value in extension set (${t}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(e,s)}}return o(t,K),i.reduce(((t,e)=>t.concat(e)))}(t,e,o))h instanceof Q?i.push(h):(r[h.facet.id]||(r[h.facet.id]=[])).push(h);let s=Object.create(null),a=[],l=[];for(let h of i)s[h.id]=l.length<<1,l.push((t=>h.slot(t)));let c=null==n?void 0:n.config.facets;for(let h in r){let t=r[h],e=t[0].facet,i=c&&c[h]||[];if(t.every((t=>0==t.type)))if(s[e.id]=a.length<<1|1,G(i,t))a.push(n.facet(e));else{let i=e.combine(t.map((t=>t.value)));a.push(n&&e.compare(i,n.facet(e))?n.facet(e):i)}else{for(let e of t)0==e.type?(s[e.id]=a.length<<1|1,a.push(e.value)):(s[e.id]=l.length<<1,l.push((t=>e.dynamicSlot(t))));s[e.id]=l.length<<1,l.push((n=>Y(n,e,t)))}}let u=l.map((t=>t(s)));return new st(t,o,u,s,a,r)}}function at(t,e){if(1&e)return 2;let n=e>>1,i=t.status[n];if(4==i)throw new Error("Cyclic dependency between fields and/or facets");if(2&i)return i;t.status[n]=4;let r=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|r}function lt(t,e){return 1&e?t.config.staticValues[e>>1]:t.values[e>>1]}const ct=F.define(),ut=F.define({combine:t=>t.some((t=>t)),static:!0}),ht=F.define({combine:t=>t.length?t[0]:void 0,static:!0}),ft=F.define(),dt=F.define(),pt=F.define(),gt=F.define({combine:t=>!!t.length&&t[0]});class mt{constructor(t,e){this.type=t,this.value=e}static define(){return new bt}}class bt{of(t){return new mt(this,t)}}class vt{constructor(t){this.map=t}of(t){return new yt(this,t)}}class yt{constructor(t,e){this.type=t,this.value=e}map(t){let e=this.type.map(this.value,t);return void 0===e?void 0:e==this.value?this:new yt(this.type,e)}is(t){return this.type==t}static define(t={}){return new vt(t.map||(t=>t))}static mapEffects(t,e){if(!t.length)return t;let n=[];for(let i of t){let t=i.map(e);t&&n.push(t)}return n}}yt.reconfigure=yt.define(),yt.appendConfig=yt.define();class xt{constructor(t,e,n,i,r,o){this.startState=t,this.changes=e,this.selection=n,this.effects=i,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,n&&W(n,e.newLength),r.some((t=>t.type==xt.time))||(this.annotations=r.concat(xt.time.of(Date.now())))}static create(t,e,n,i,r,o){return new xt(t,e,n,i,r,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let e of this.annotations)if(e.type==t)return e.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let e=this.annotation(xt.userEvent);return!(!e||!(e==t||e.length>t.length&&e.slice(0,t.length)==t&&"."==e[t.length]))}}function wt(t,e){let n=[];for(let i=0,r=0;;){let o,s;if(i<t.length&&(r==e.length||e[r]>=t[i]))o=t[i++],s=t[i++];else{if(!(r<e.length))return n;o=e[r++],s=e[r++]}!n.length||n[n.length-1]<o?n.push(o,s):n[n.length-1]<s&&(n[n.length-1]=s)}}function St(t,e,n){var i;let r,o,s;return n?(r=e.changes,o=T.empty(e.changes.length),s=t.changes.compose(e.changes)):(r=e.changes.map(t.changes),o=t.changes.mapDesc(e.changes,!0),s=t.changes.compose(r)),{changes:s,selection:e.selection?e.selection.map(o):null===(i=t.selection)||void 0===i?void 0:i.map(r),effects:yt.mapEffects(t.effects,r).concat(yt.mapEffects(e.effects,o)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function Ot(t,e,n){let i=e.selection,r=Et(e.annotations);return e.userEvent&&(r=r.concat(xt.userEvent.of(e.userEvent))),{changes:e.changes instanceof T?e.changes:T.of(e.changes||[],n,t.facet(ht)),selection:i&&(i instanceof z?i:z.single(i.anchor,i.head)),effects:Et(e.effects),annotations:r,scrollIntoView:!!e.scrollIntoView}}function It(t,e,n){let i=Ot(t,e.length?e[0]:{},t.doc.length);e.length&&!1===e[0].filter&&(n=!1);for(let o=1;o<e.length;o++){!1===e[o].filter&&(n=!1);let r=!!e[o].sequential;i=St(i,Ot(t,e[o],r?i.changes.newLength:t.doc.length),r)}let r=xt.create(t,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return function(t){let e=t.startState,n=e.facet(pt),i=t;for(let r=n.length-1;r>=0;r--){let o=n[r](t);o&&Object.keys(o).length&&(i=St(i,Ot(e,o,t.changes.newLength),!0))}return i==t?t:xt.create(e,t.changes,t.selection,i.effects,i.annotations,i.scrollIntoView)}(n?function(t){let e=t.startState,n=!0;for(let r of e.facet(ft)){let e=r(t);if(!1===e){n=!1;break}Array.isArray(e)&&(n=!0===n?e:wt(n,e))}if(!0!==n){let i,r;if(!1===n)r=t.changes.invertedDesc,i=T.empty(e.doc.length);else{let e=t.changes.filter(n);i=e.changes,r=e.filtered.mapDesc(e.changes).invertedDesc}t=xt.create(e,i,t.selection&&t.selection.map(r),yt.mapEffects(t.effects,r),t.annotations,t.scrollIntoView)}let i=e.facet(dt);for(let r=i.length-1;r>=0;r--){let n=i[r](t);t=n instanceof xt?n:Array.isArray(n)&&1==n.length&&n[0]instanceof xt?n[0]:It(e,Et(n),!1)}return t}(r):r)}xt.time=mt.define(),xt.userEvent=mt.define(),xt.addToHistory=mt.define(),xt.remote=mt.define();const kt=[];function Et(t){return null==t?kt:Array.isArray(t)?t:[t]}var Mt=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(Mt||(Mt={}));const Ct=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let At;try{At=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(Xt){}function jt(t){return e=>{if(!/\S/.test(e))return Mt.Space;if(function(t){if(At)return At.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>""&&(n.toUpperCase()!=n.toLowerCase()||Ct.test(n)))return!0}return!1}(e))return Mt.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return Mt.Word;return Mt.Other}}class Pt{constructor(t,e,n,i,r,o){this.config=t,this.doc=e,this.selection=n,this.values=i,this.status=t.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let s=0;s<this.config.dynamicSlots.length;s++)at(this,s<<1);this.computeSlot=null}field(t,e=!0){let n=this.config.address[t.id];if(null!=n)return at(this,n),lt(this,n);if(e)throw new RangeError("Field is not present in this state")}update(...t){return It(this,t,!0)}applyTransaction(t){let e,n=this.config,{base:i,compartments:r}=n;for(let s of t.effects)s.is(rt.reconfigure)?(n&&(r=new Map,n.compartments.forEach(((t,e)=>r.set(e,t))),n=null),r.set(s.value.compartment,s.value.extension)):s.is(yt.reconfigure)?(n=null,i=s.value):s.is(yt.appendConfig)&&(n=null,i=Et(i).concat(s.value));if(n)e=t.startState.values.slice();else{n=st.resolve(i,r,this),e=new Pt(n,this.doc,this.selection,n.dynamicSlots.map((()=>null)),((t,e)=>e.reconfigure(t,this)),null).values}let o=t.startState.facet(ut)?t.newSelection:t.newSelection.asSingle();new Pt(n,t.newDoc,o,e,((e,n)=>n.update(e,t)),t)}replaceSelection(t){return"string"==typeof t&&(t=this.toText(t)),this.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:t},range:z.cursor(e.from+t.length)})))}changeByRange(t){let e=this.selection,n=t(e.ranges[0]),i=this.changes(n.changes),r=[n.range],o=Et(n.effects);for(let s=1;s<e.ranges.length;s++){let n=t(e.ranges[s]),a=this.changes(n.changes),l=a.map(i);for(let t=0;t<s;t++)r[t]=r[t].map(l);let c=i.mapDesc(a,!0);r.push(n.range.map(c)),i=i.compose(l),o=yt.mapEffects(o,l).concat(yt.mapEffects(Et(n.effects),c))}return{changes:i,selection:z.create(r,e.mainIndex),effects:o}}changes(t=[]){return t instanceof T?t:T.of(t,this.doc.length,this.facet(Pt.lineSeparator))}toText(t){return g.of(t.split(this.facet(Pt.lineSeparator)||A))}sliceDoc(t=0,e=this.doc.length){return this.doc.sliceString(t,e,this.lineBreak)}facet(t){let e=this.config.address[t.id];return null==e?t.default:(at(this,e),lt(this,e))}toJSON(t){let e={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(let n in t){let i=t[n];i instanceof Q&&null!=this.config.address[i.id]&&(e[n]=i.spec.toJSON(this.field(t[n]),this))}return e}static fromJSON(t,e={},n){if(!t||"string"!=typeof t.doc)throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(n)for(let r in n)if(Object.prototype.hasOwnProperty.call(t,r)){let e=n[r],o=t[r];i.push(e.init((t=>e.spec.fromJSON(o,t))))}return Pt.create({doc:t.doc,selection:z.fromJSON(t.selection),extensions:e.extensions?i.concat([e.extensions]):i})}static create(t={}){let e=st.resolve(t.extensions||[],new Map),n=t.doc instanceof g?t.doc:g.of((t.doc||"").split(e.staticFacet(Pt.lineSeparator)||A)),i=t.selection?t.selection instanceof z?t.selection:z.single(t.selection.anchor,t.selection.head):z.single(0);return W(i,n.length),e.staticFacet(ut)||(i=i.asSingle()),new Pt(e,n,i,e.dynamicSlots.map((()=>null)),((t,e)=>e.create(t)),null)}get tabSize(){return this.facet(Pt.tabSize)}get lineBreak(){return this.facet(Pt.lineSeparator)||"\n"}get readOnly(){return this.facet(gt)}phrase(t,...e){for(let n of this.facet(Pt.phrases))if(Object.prototype.hasOwnProperty.call(n,t)){t=n[t];break}return e.length&&(t=t.replace(/\$(\$|\d*)/g,((t,n)=>{if("$"==n)return"$";let i=+(n||1);return!i||i>e.length?t:e[i-1]}))),t}languageDataAt(t,e,n=-1){let i=[];for(let r of this.facet(ct))for(let o of r(this,e,n))Object.prototype.hasOwnProperty.call(o,t)&&i.push(o[t]);return i}charCategorizer(t){return jt(this.languageDataAt("wordChars",t).join(""))}wordAt(t){let{text:e,from:n,length:i}=this.doc.lineAt(t),r=this.charCategorizer(t),o=t-n,s=t-n;for(;o>0;){let t=k(e,o,!1);if(r(e.slice(t,o))!=Mt.Word)break;o=t}for(;s<i;){let t=k(e,s);if(r(e.slice(s,t))!=Mt.Word)break;s=t}return o==s?null:z.range(o+n,s+n)}}function Tt(t,e,n={}){let i={};for(let r of t)for(let t of Object.keys(r)){let e=r[t],o=i[t];if(void 0===o)i[t]=e;else if(o===e||void 0===e);else{if(!Object.hasOwnProperty.call(n,t))throw new Error("Config merge conflict for field "+t);i[t]=n[t](o,e)}}for(let r in e)void 0===i[r]&&(i[r]=e[r]);return i}Pt.allowMultipleSelections=ut,Pt.tabSize=F.define({combine:t=>t.length?t[0]:4}),Pt.lineSeparator=ht,Pt.readOnly=gt,Pt.phrases=F.define({compare(t,e){let n=Object.keys(t),i=Object.keys(e);return n.length==i.length&&n.every((n=>t[n]==e[n]))}}),Pt.languageData=ct,Pt.changeFilter=ft,Pt.transactionFilter=dt,Pt.transactionExtender=pt,rt.reconfigure=yt.define();class Nt{eq(t){return this==t}range(t,e=t){return _t.create(t,e,this)}}Nt.prototype.startSide=Nt.prototype.endSide=0,Nt.prototype.point=!1,Nt.prototype.mapMode=j.TrackDel;class _t{constructor(t,e,n){this.from=t,this.to=e,this.value=n}static create(t,e,n){return new _t(t,e,n)}}function Lt(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class Dt{constructor(t,e,n,i){this.from=t,this.to=e,this.value=n,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(t,e,n,i=0){let r=n?this.to:this.from;for(let o=i,s=r.length;;){if(o==s)return o;let i=o+s>>1,a=r[i]-t||(n?this.value[i].endSide:this.value[i].startSide)-e;if(i==o)return a>=0?o:s;a>=0?s=i:o=i+1}}between(t,e,n,i){for(let r=this.findIndex(e,-1e9,!0),o=this.findIndex(n,1e9,!1,r);r<o;r++)if(!1===i(this.from[r]+t,this.to[r]+t,this.value[r]))return!1}map(t,e){let n=[],i=[],r=[],o=-1,s=-1;for(let a=0;a<this.value.length;a++){let l,c,u=this.value[a],h=this.from[a]+t,f=this.to[a]+t;if(h==f){let t=e.mapPos(h,u.startSide,u.mapMode);if(null==t)continue;if(l=c=t,u.startSide!=u.endSide&&(c=e.mapPos(h,u.endSide),c<l))continue}else if(l=e.mapPos(h,u.startSide),c=e.mapPos(f,u.endSide),l>c||l==c&&u.startSide>0&&u.endSide<=0)continue;(c-l||u.endSide-u.startSide)<0||(o<0&&(o=l),u.point&&(s=Math.max(s,c-l)),n.push(u),i.push(l-o),r.push(c-o))}return{mapped:n.length?new Dt(i,r,n,s):null,pos:o}}}class Rt{constructor(t,e,n,i){this.chunkPos=t,this.chunk=e,this.nextLayer=n,this.maxPoint=i}static create(t,e,n,i){return new Rt(t,e,n,i)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let e of this.chunk)t+=e.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:e=[],sort:n=!1,filterFrom:i=0,filterTo:r=this.length}=t,o=t.filter;if(0==e.length&&!o)return this;if(n&&(e=e.slice().sort(Lt)),this.isEmpty)return e.length?Rt.of(e):this;let s=new zt(this,null,-1).goto(0),a=0,l=[],c=new Bt;for(;s.value||a<e.length;)if(a<e.length&&(s.from-e[a].from||s.startSide-e[a].value.startSide)>=0){let t=e[a++];c.addInner(t.from,t.to,t.value)||l.push(t)}else 1==s.rangeIndex&&s.chunkIndex<this.chunk.length&&(a==e.length||this.chunkEnd(s.chunkIndex)<e[a].from)&&(!o||i>this.chunkEnd(s.chunkIndex)||r<this.chunkPos[s.chunkIndex])&&c.addChunk(this.chunkPos[s.chunkIndex],this.chunk[s.chunkIndex])?s.nextChunk():((!o||i>s.to||r<s.from||o(s.from,s.to,s.value))&&(c.addInner(s.from,s.to,s.value)||l.push(_t.create(s.from,s.to,s.value))),s.next());return c.finishInner(this.nextLayer.isEmpty&&!l.length?Rt.empty:this.nextLayer.update({add:l,filter:o,filterFrom:i,filterTo:r}))}map(t){if(t.empty||this.isEmpty)return this;let e=[],n=[],i=-1;for(let o=0;o<this.chunk.length;o++){let r=this.chunkPos[o],s=this.chunk[o],a=t.touchesRange(r,r+s.length);if(!1===a)i=Math.max(i,s.maxPoint),e.push(s),n.push(t.mapPos(r));else if(!0===a){let{mapped:o,pos:a}=s.map(r,t);o&&(i=Math.max(i,o.maxPoint),e.push(o),n.push(a))}}let r=this.nextLayer.map(t);return 0==e.length?r:new Rt(n,e,r||Rt.empty,i)}between(t,e,n){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let r=this.chunkPos[i],o=this.chunk[i];if(e>=r&&t<=r+o.length&&!1===o.between(r,t-r,e-r,n))return}this.nextLayer.between(t,e,n)}}iter(t=0){return Wt.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,e=0){return Wt.from(t).goto(e)}static compare(t,e,n,i,r=-1){let o=t.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=r)),s=e.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=r)),a=Ht(o,s,n),l=new Ft(o,a,r),c=new Ft(s,a,r);n.iterGaps(((t,e,n)=>Gt(l,t,c,e,n,i))),n.empty&&0==n.length&&Gt(l,0,c,0,0,i)}static eq(t,e,n=0,i){null==i&&(i=999999999);let r=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0)),o=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0));if(r.length!=o.length)return!1;if(!r.length)return!0;let s=Ht(r,o),a=new Ft(r,s,0).goto(n),l=new Ft(o,s,0).goto(n);for(;;){if(a.to!=l.to||!Zt(a.active,l.active)||a.point&&(!l.point||!a.point.eq(l.point)))return!1;if(a.to>i)return!0;a.next(),l.next()}}static spans(t,e,n,i,r=-1){let o=new Ft(t,null,r).goto(e),s=e,a=o.openStart;for(;;){let t=Math.min(o.to,n);if(o.point){let n=o.activeForPoint(o.to),r=o.pointFrom<e?n.length+1:o.point.startSide<0?n.length:Math.min(n.length,a);i.point(s,t,o.point,n,r,o.pointRank),a=Math.min(o.openEnd(t),n.length)}else t>s&&(i.span(s,t,o.active,a),a=o.openEnd(t));if(o.to>n)return a+(o.point&&o.to>n?1:0);s=o.to,o.next()}}static of(t,e=!1){let n=new Bt;for(let i of t instanceof _t?[t]:e?function(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let i=t[n];if(Lt(e,i)>0)return t.slice().sort(Lt);e=i}return t}(t):t)n.add(i.from,i.to,i.value);return n.finish()}static join(t){if(!t.length)return Rt.empty;let e=t[t.length-1];for(let n=t.length-2;n>=0;n--)for(let i=t[n];i!=Rt.empty;i=i.nextLayer)e=new Rt(i.chunkPos,i.chunk,e,Math.max(i.maxPoint,e.maxPoint));return e}}Rt.empty=new Rt([],[],null,-1),Rt.empty.nextLayer=Rt.empty;class Bt{finishChunk(t){this.chunks.push(new Dt(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,e,n){this.addInner(t,e,n)||(this.nextLayer||(this.nextLayer=new Bt)).add(t,e,n)}addInner(t,e,n){let i=t-this.lastTo||n.startSide-this.last.endSide;if(i<=0&&(t-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(i<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(e-this.chunkStart),this.last=n,this.lastFrom=t,this.lastTo=e,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,e-t)),!0)}addChunk(t,e){if((t-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(t);let n=e.value.length-1;return this.last=e.value[n],this.lastFrom=e.from[n]+t,this.lastTo=e.to[n]+t,!0}finish(){return this.finishInner(Rt.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return t;let e=Rt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,e}}function Ht(t,e,n){let i=new Map;for(let o of t)for(let t=0;t<o.chunk.length;t++)o.chunk[t].maxPoint<=0&&i.set(o.chunk[t],o.chunkPos[t]);let r=new Set;for(let o of e)for(let t=0;t<o.chunk.length;t++){let e=i.get(o.chunk[t]);null==e||(n?n.mapPos(e):e)!=o.chunkPos[t]||(null==n?void 0:n.touchesRange(e,e+o.chunk[t].length))||r.add(o.chunk[t])}return r}class zt{constructor(t,e,n,i=0){this.layer=t,this.skip=e,this.minPoint=n,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(t,e=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(t,e,!1),this}gotoInner(t,e,n){for(;this.chunkIndex<this.layer.chunk.length;){let e=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(e)||this.layer.chunkEnd(this.chunkIndex)<t||e.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(t-this.layer.chunkPos[this.chunkIndex],e,!0);(!n||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(t,e){(this.to-t||this.endSide-e)<0&&this.gotoInner(t,e,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let t=this.layer.chunkPos[this.chunkIndex],e=this.layer.chunk[this.chunkIndex],n=t+e.from[this.rangeIndex];if(this.from=n,this.to=t+e.to[this.rangeIndex],this.value=e.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=t}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(t){return this.from-t.from||this.startSide-t.startSide||this.rank-t.rank||this.to-t.to||this.endSide-t.endSide}}class Wt{constructor(t){this.heap=t}static from(t,e=null,n=-1){let i=[];for(let r=0;r<t.length;r++)for(let o=t[r];!o.isEmpty;o=o.nextLayer)o.maxPoint>=n&&i.push(new zt(o,e,n,r));return 1==i.length?i[0]:new Wt(i)}get startSide(){return this.value?this.value.startSide:0}goto(t,e=-1e9){for(let n of this.heap)n.goto(t,e);for(let n=this.heap.length>>1;n>=0;n--)Ut(this.heap,n);return this.next(),this}forward(t,e){for(let n of this.heap)n.forward(t,e);for(let n=this.heap.length>>1;n>=0;n--)Ut(this.heap,n);(this.to-t||this.value.endSide-e)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),Ut(this.heap,0)}}}function Ut(t,e){for(let n=t[e];;){let i=1+(e<<1);if(i>=t.length)break;let r=t[i];if(i+1<t.length&&r.compare(t[i+1])>=0&&(r=t[i+1],i++),n.compare(r)<0)break;t[i]=n,t[e]=r,e=i}}class Ft{constructor(t,e,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Wt.from(t,e,n)}goto(t,e=-1e9){return this.cursor.goto(t,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=e,this.openStart=-1,this.next(),this}forward(t,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(t,e)}removeActive(t){Vt(this.active,t),Vt(this.activeTo,t),Vt(this.activeRank,t),this.minActive=Yt(this.active,this.activeTo)}addActive(t){let e=0,{value:n,to:i,rank:r}=this.cursor;for(;e<this.activeRank.length&&(r-this.activeRank[e]||i-this.activeTo[e])>0;)e++;qt(this.active,e,n),qt(this.activeTo,e,i),qt(this.activeRank,e,r),t&&qt(t,e,this.cursor.from),this.minActive=Yt(this.active,this.activeTo)}next(){let t=this.to,e=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>t){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),n&&Vt(n,i)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let t=this.cursor.value;if(t.point){if(!(e&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)){this.point=t,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=t.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(n),this.cursor.next()}}}if(n){this.openStart=0;for(let e=n.length-1;e>=0&&n[e]<t;e--)this.openStart++}}activeForPoint(t){if(!this.active.length)return this.active;let e=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>t||this.activeTo[n]==t&&this.active[n].endSide>=this.point.endSide)&&e.push(this.active[n]);return e.reverse()}openEnd(t){let e=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>t;n--)e++;return e}}function Gt(t,e,n,i,r,o){t.goto(e),n.goto(i);let s=i+r,a=i,l=i-e;for(;;){let e=t.to+l-n.to,i=e||t.endSide-n.endSide,r=i<0?t.to+l:n.to,c=Math.min(r,s);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&Zt(t.activeForPoint(t.to),n.activeForPoint(n.to))||o.comparePoint(a,c,t.point,n.point):c>a&&!Zt(t.active,n.active)&&o.compareRange(a,c,t.active,n.active),r>s)break;(e||t.openEnd!=n.openEnd)&&o.boundChange&&o.boundChange(r),a=r,i<=0&&t.next(),i>=0&&n.next()}}function Zt(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!t[n].eq(e[n]))return!1;return!0}function Vt(t,e){for(let n=e,i=t.length-1;n<i;n++)t[n]=t[n+1];t.pop()}function qt(t,e,n){for(let i=t.length-1;i>=e;i--)t[i+1]=t[i];t[e]=n}function Yt(t,e){let n=-1,i=1e9;for(let r=0;r<e.length;r++)(e[r]-i||t[r].endSide-t[n].endSide)<0&&(n=r,i=e[r]);return n}function Jt(t,e,n=t.length){let i=0;for(let r=0;r<n;)9==t.charCodeAt(r)?(i+=e-i%e,r++):(i++,r=k(t,r));return i}function Qt(t,e,n,i){for(let r=0,o=0;;){if(o>=e)return r;if(r==t.length)break;o+=9==t.charCodeAt(r)?n-o%n:1,r=k(t,r)}return!0===i?-1:t.length}},6896:(t,e,n)=>{"use strict";n.d(e,{NZ:()=>ft,OP:()=>It,Lz:()=>ci,wJ:()=>Rr,Z9:()=>ce,xO:()=>ut,HJ:()=>fr,VH:()=>Ni,A:()=>Fi,ld:()=>Tr,Eg:()=>Ar,cU:()=>Ur,dz:()=>er,Wu:()=>ao,N$:()=>Xi,Ux:()=>Cr,w4:()=>bi,$K:()=>io,c_:()=>oe,qf:()=>or,D4:()=>cr,TS:()=>xi,S7:()=>Dr,DK:()=>Sr});for(var i=n(5284),r=n(8709),o={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},s={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},a="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),l="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),c=0;c<10;c++)o[48+c]=o[96+c]=String(c);for(c=1;c<=24;c++)o[c+111]="F"+c;for(c=65;c<=90;c++)o[c]=String.fromCharCode(c+32),s[c]=String.fromCharCode(c);for(var u in o)s.hasOwnProperty(u)||(s[u]=o[u]);function h(t){let e;return e=11==t.nodeType?t.getSelection?t:t.ownerDocument:t,e.getSelection()}function f(t,e){return!!e&&(t==e||t.contains(1!=e.nodeType?e.parentNode:e))}function d(t,e){if(!e.anchorNode)return!1;try{return f(t,e.anchorNode)}catch(n){return!1}}function p(t){return 3==t.nodeType?M(t,0,t.nodeValue.length).getClientRects():1==t.nodeType?t.getClientRects():[]}function g(t,e,n,i){return!!n&&(v(t,e,n,i,-1)||v(t,e,n,i,1))}function m(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e}function b(t){return 1==t.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function v(t,e,n,i,r){for(;;){if(t==n&&e==i)return!0;if(e==(r<0?0:y(t))){if("DIV"==t.nodeName)return!1;let n=t.parentNode;if(!n||1!=n.nodeType)return!1;e=m(t)+(r<0?0:1),t=n}else{if(1!=t.nodeType)return!1;if(1==(t=t.childNodes[e+(r<0?-1:0)]).nodeType&&"false"==t.contentEditable)return!1;e=r<0?y(t):0}}}function y(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function x(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function w(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function S(t,e){let n=e.width/t.offsetWidth,i=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.height-t.offsetHeight)<1)&&(i=1),{scaleX:n,scaleY:i}}class O{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}setRange(t){let{anchorNode:e,focusNode:n}=t;this.set(e,Math.min(t.anchorOffset,e?y(e):0),n,Math.min(t.focusOffset,n?y(n):0))}set(t,e,n,i){this.anchorNode=t,this.anchorOffset=e,this.focusNode=n,this.focusOffset=i}}let I,k=null;function E(t){if(t.setActive)return t.setActive();if(k)return t.focus(k);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(null==k?{get preventScroll(){return k={preventScroll:!0},!0}}:void 0),!k){k=!1;for(let t=0;t<e.length;){let n=e[t++],i=e[t++],r=e[t++];n.scrollTop!=i&&(n.scrollTop=i),n.scrollLeft!=r&&(n.scrollLeft=r)}}}function M(t,e,n=e){let i=I||(I=document.createRange());return i.setEnd(t,n),i.setStart(t,e),i}function C(t,e,n,i){let r={key:e,code:e,keyCode:n,which:n,cancelable:!0};i&&({altKey:r.altKey,ctrlKey:r.ctrlKey,shiftKey:r.shiftKey,metaKey:r.metaKey}=i);let o=new KeyboardEvent("keydown",r);o.synthetic=!0,t.dispatchEvent(o);let s=new KeyboardEvent("keyup",r);return s.synthetic=!0,t.dispatchEvent(s),o.defaultPrevented||s.defaultPrevented}function A(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}function j(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function P(t,e){for(let n=t,i=e;;){if(3==n.nodeType&&i>0)return{node:n,offset:i};if(1==n.nodeType&&i>0){if("false"==n.contentEditable)return null;n=n.childNodes[i-1],i=y(n)}else{if(!n.parentNode||b(n))return null;i=m(n),n=n.parentNode}}}function T(t,e){for(let n=t,i=e;;){if(3==n.nodeType&&i<n.nodeValue.length)return{node:n,offset:i};if(1==n.nodeType&&i<n.childNodes.length){if("false"==n.contentEditable)return null;n=n.childNodes[i],i=0}else{if(!n.parentNode||b(n))return null;i=m(n)+1,n=n.parentNode}}}class N{constructor(t,e,n=!0){this.node=t,this.offset=e,this.precise=n}static before(t,e){return new N(t.parentNode,m(t),e)}static after(t,e){return new N(t.parentNode,m(t)+1,e)}}const _=[];class L{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(t){let e=this.posAtStart;for(let n of this.children){if(n==t)return e;e+=n.length+n.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(t){return this.posBefore(t)+t.length}sync(t,e){if(2&this.flags){let n,i=this.dom,r=null;for(let o of this.children){if(7&o.flags){if(!o.dom&&(n=r?r.nextSibling:i.firstChild)){let t=L.get(n);(!t||!t.parent&&t.canReuseDOM(o))&&o.reuseDOM(n)}o.sync(t,e),o.flags&=-8}if(n=r?r.nextSibling:i.firstChild,e&&!e.written&&e.node==i&&n!=o.dom&&(e.written=!0),o.dom.parentNode==i)for(;n&&n!=o.dom;)n=D(n);else i.insertBefore(o.dom,n);r=o.dom}for(n=r?r.nextSibling:i.firstChild,n&&e&&e.node==i&&(e.written=!0);n;)n=D(n)}else if(1&this.flags)for(let n of this.children)7&n.flags&&(n.sync(t,e),n.flags&=-8)}reuseDOM(t){}localPosFromDOM(t,e){let n;if(t==this.dom)n=this.dom.childNodes[e];else{let i=0==y(t)?0:0==e?-1:1;for(;;){let e=t.parentNode;if(e==this.dom)break;0==i&&e.firstChild!=e.lastChild&&(i=t==e.firstChild?-1:1),t=e}n=i<0?t:t.nextSibling}if(n==this.dom.firstChild)return 0;for(;n&&!L.get(n);)n=n.nextSibling;if(!n)return this.length;for(let i=0,r=0;;i++){let t=this.children[i];if(t.dom==n)return r;r+=t.length+t.breakAfter}}domBoundsAround(t,e,n=0){let i=-1,r=-1,o=-1,s=-1;for(let a=0,l=n,c=n;a<this.children.length;a++){let n=this.children[a],u=l+n.length;if(l<t&&u>e)return n.domBoundsAround(t,e,l);if(u>=t&&-1==i&&(i=a,r=l),l>e&&n.dom.parentNode==this.dom){o=a,s=c;break}c=u,l=u+n.breakAfter}return{from:r,to:s<0?n+this.length:s,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o<this.children.length&&o>=0?this.children[o].dom:null}}markDirty(t=!1){this.flags|=2,this.markParentsDirty(t)}markParentsDirty(t){for(let e=this.parent;e;e=e.parent){if(t&&(e.flags|=2),1&e.flags)return;e.flags|=1,t=!1}}setParent(t){this.parent!=t&&(this.parent=t,7&this.flags&&this.markParentsDirty(!0))}setDOM(t){this.dom!=t&&(this.dom&&(this.dom.cmView=null),this.dom=t,t.cmView=this)}get rootView(){for(let t=this;;){let e=t.parent;if(!e)return t;t=e}}replaceChildren(t,e,n=_){this.markDirty();for(let i=t;i<e;i++){let t=this.children[i];t.parent==this&&n.indexOf(t)<0&&t.destroy()}n.length<250?this.children.splice(t,e-t,...n):this.children=[].concat(this.children.slice(0,t),n,this.children.slice(e));for(let i=0;i<n.length;i++)n[i].setParent(this)}ignoreMutation(t){return!1}ignoreEvent(t){return!1}childCursor(t=this.length){return new R(this.children,t,this.children.length)}childPos(t,e=1){return this.childCursor().findPos(t,e)}toString(){let t=this.constructor.name.replace("View","");return t+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==t?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(t){return t.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(t,e,n,i,r,o){return!1}become(t){return!1}canReuseDOM(t){return t.constructor==this.constructor&&!(8&(this.flags|t.flags))}getSide(){return 0}destroy(){for(let t of this.children)t.parent==this&&t.destroy();this.parent=null}}function D(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}L.prototype.breakAfter=0;class R{constructor(t,e,n){this.children=t,this.pos=e,this.i=n,this.off=0}findPos(t,e=1){for(;;){if(t>this.pos||t==this.pos&&(e>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=t-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function B(t,e,n,i,r,o,s,a,l){let{children:c}=t,u=c.length?c[e]:null,h=o.length?o[o.length-1]:null,f=h?h.breakAfter:s;if(!(e==i&&u&&!s&&!f&&o.length<2&&u.merge(n,r,o.length?h:null,0==n,a,l))){if(i<c.length){let t=c[i];t&&(r<t.length||t.breakAfter&&(null==h?void 0:h.breakAfter))?(e==i&&(t=t.split(r),r=0),!f&&h&&t.merge(0,r,h,!0,0,l)?o[o.length-1]=t:((r||t.children.length&&!t.children[0].length)&&t.merge(0,r,null,!1,0,l),o.push(t))):(null==t?void 0:t.breakAfter)&&(h?h.breakAfter=1:s=1),i++}for(u&&(u.breakAfter=s,n>0&&(!s&&o.length&&u.merge(n,u.length,o[0],!1,a,0)?u.breakAfter=o.shift().breakAfter:(n<u.length||u.children.length&&0==u.children[u.children.length-1].length)&&u.merge(n,u.length,null,!1,a,0),e++));e<i&&o.length;)if(c[i-1].become(o[o.length-1]))i--,o.pop(),l=o.length?0:a;else{if(!c[e].become(o[0]))break;e++,o.shift(),a=o.length?0:l}!o.length&&e&&i<c.length&&!c[e-1].breakAfter&&c[i].merge(0,0,c[e-1],!1,a,l)&&e--,(e<i||o.length)&&t.replaceChildren(e,i,o)}}function H(t,e,n,i,r,o){let s=t.childCursor(),{i:a,off:l}=s.findPos(n,1),{i:c,off:u}=s.findPos(e,-1),h=e-n;for(let f of i)h+=f.length;t.length+=h,B(t,c,u,a,l,i,0,r,o)}let z="undefined"!=typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},W="undefined"!=typeof document?document:{documentElement:{style:{}}};const U=/Edge\/(\d+)/.exec(z.userAgent),F=/MSIE \d/.test(z.userAgent),G=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(z.userAgent),Z=!!(F||G||U),V=!Z&&/gecko\/(\d+)/i.test(z.userAgent),q=!Z&&/Chrome\/(\d+)/.exec(z.userAgent),Y="webkitFontSmoothing"in W.documentElement.style,J=!Z&&/Apple Computer/.test(z.vendor),Q=J&&(/Mobile\/\w+/.test(z.userAgent)||z.maxTouchPoints>2);var X={mac:Q||/Mac/.test(z.platform),windows:/Win/.test(z.platform),linux:/Linux|X11/.test(z.platform),ie:Z,ie_version:F?W.documentMode||6:G?+G[1]:U?+U[1]:0,gecko:V,gecko_version:V?+(/Firefox\/(\d+)/.exec(z.userAgent)||[0,0])[1]:0,chrome:!!q,chrome_version:q?+q[1]:0,ios:Q,android:/Android\b/.test(z.userAgent),webkit:Y,safari:J,webkit_version:Y?+(/\bAppleWebKit\/(\d+)/.exec(z.userAgent)||[0,0])[1]:0,tabSize:null!=W.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class $ extends L{constructor(t){super(),this.text=t}get length(){return this.text.length}createDOM(t){this.setDOM(t||document.createTextNode(this.text))}sync(t,e){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text)}reuseDOM(t){3==t.nodeType&&this.createDOM(t)}merge(t,e,n){return!(8&this.flags||n&&(!(n instanceof $)||this.length-(e-t)+n.length>256||8&n.flags))&&(this.text=this.text.slice(0,t)+(n?n.text:"")+this.text.slice(e),this.markDirty(),!0)}split(t){let e=new $(this.text.slice(t));return this.text=this.text.slice(0,t),this.markDirty(),e.flags|=8&this.flags,e}localPosFromDOM(t,e){return t==this.dom?e:e?this.text.length:0}domAtPos(t){return new N(this.dom,t)}domBoundsAround(t,e,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(t,e){return function(t,e,n){let i=t.nodeValue.length;e>i&&(e=i);let r=e,o=e,s=0;0==e&&n<0||e==i&&n>=0?X.chrome||X.gecko||(e?(r--,s=1):o<i&&(o++,s=-1)):n<0?r--:o<i&&o++;let a=M(t,r,o).getClientRects();if(!a.length)return null;let l=a[(s?s<0:n>=0)?0:a.length-1];X.safari&&!s&&0==l.width&&(l=Array.prototype.find.call(a,(t=>t.width))||l);return s?x(l,s<0):l||null}(this.dom,t,e)}}class K extends L{constructor(t,e=[],n=0){super(),this.mark=t,this.children=e,this.length=n;for(let i of e)i.setParent(this)}setAttrs(t){if(A(t),this.mark.class&&(t.className=this.mark.class),this.mark.attrs)for(let e in this.mark.attrs)t.setAttribute(e,this.mark.attrs[e]);return t}canReuseDOM(t){return super.canReuseDOM(t)&&!(8&(this.flags|t.flags))}reuseDOM(t){t.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(t),this.flags|=6)}sync(t,e){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(t,e)}merge(t,e,n,i,r,o){return(!n||!(!(n instanceof K&&n.mark.eq(this.mark))||t&&r<=0||e<this.length&&o<=0))&&(H(this,t,e,n?n.children.slice():[],r-1,o-1),this.markDirty(),!0)}split(t){let e=[],n=0,i=-1,r=0;for(let s of this.children){let o=n+s.length;o>t&&e.push(n<t?s.split(t-n):s),i<0&&n>=t&&(i=r),n=o,r++}let o=this.length-t;return this.length=t,i>-1&&(this.children.length=i,this.markDirty()),new K(this.mark,e,o)}domAtPos(t){return nt(this,t)}coordsAt(t,e){return rt(this,t,e)}}class tt extends L{static create(t,e,n){return new tt(t,e,n)}constructor(t,e,n){super(),this.widget=t,this.length=e,this.side=n,this.prevWidget=null}split(t){let e=tt.create(this.widget,this.length-t,this.side);return this.length-=t,e}sync(t){this.dom&&this.widget.updateDOM(this.dom,t)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(t)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(t,e,n,i,r,o){return!(n&&(!(n instanceof tt&&this.widget.compare(n.widget))||t>0&&r<=0||e<this.length&&o<=0))&&(this.length=t+(n?n.length:0)+(this.length-e),!0)}become(t){return t instanceof tt&&t.side==this.side&&this.widget.constructor==t.widget.constructor&&(this.widget.compare(t.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=t.widget,this.length=t.length,!0)}ignoreMutation(){return!0}ignoreEvent(t){return this.widget.ignoreEvent(t)}get overrideDOMText(){if(0==this.length)return i.EY.empty;let t=this;for(;t.parent;)t=t.parent;let{view:e}=t,n=e&&e.state.doc,r=this.posAtStart;return n?n.slice(r,r+this.length):i.EY.empty}domAtPos(t){return(this.length?0==t:this.side>0)?N.before(this.dom):N.after(this.dom,t==this.length)}domBoundsAround(){return null}coordsAt(t,e){let n=this.widget.coordsAt(this.dom,t,e);if(n)return n;let i=this.dom.getClientRects(),r=null;if(!i.length)return null;let o=this.side?this.side<0:t>0;for(let s=o?i.length-1:0;r=i[s],!(t>0?0==s:s==i.length-1||r.top<r.bottom);s+=o?-1:1);return x(r,!o)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class et extends L{constructor(t){super(),this.side=t}get length(){return 0}merge(){return!1}become(t){return t instanceof et&&t.side==this.side}split(){return new et(this.side)}sync(){if(!this.dom){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),this.setDOM(t)}}getSide(){return this.side}domAtPos(t){return this.side>0?N.before(this.dom):N.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(t){return this.dom.getBoundingClientRect()}get overrideDOMText(){return i.EY.empty}get isHidden(){return!0}}function nt(t,e){let n=t.dom,{children:i}=t,r=0;for(let o=0;r<i.length;r++){let t=i[r],s=o+t.length;if(!(s==o&&t.getSide()<=0)){if(e>o&&e<s&&t.dom.parentNode==n)return t.domAtPos(e-o);if(e<=o)break;o=s}}for(let o=r;o>0;o--){let t=i[o-1];if(t.dom.parentNode==n)return t.domAtPos(t.length)}for(let o=r;o<i.length;o++){let t=i[o];if(t.dom.parentNode==n)return t.domAtPos(0)}return new N(n,0)}function it(t,e,n){let i,{children:r}=t;n>0&&e instanceof K&&r.length&&(i=r[r.length-1])instanceof K&&i.mark.eq(e.mark)?it(i,e.children[0],n-1):(r.push(e),e.setParent(t)),t.length+=e.length}function rt(t,e,n){let i=null,r=-1,o=null,s=-1;!function t(e,a){for(let l=0,c=0;l<e.children.length&&c<=a;l++){let u=e.children[l],h=c+u.length;h>=a&&(u.children.length?t(u,a-c):(!o||o.isHidden&&n>0)&&(h>a||c==h&&u.getSide()>0)?(o=u,s=a-c):(c<a||c==h&&u.getSide()<0&&!u.isHidden)&&(i=u,r=a-c)),c=h}}(t,e);let a=(n<0?i:o)||i||o;return a?a.coordsAt(Math.max(0,a==i?r:s),n):function(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=p(e);return n[n.length-1]||null}(t)}function ot(t,e){for(let n in t)"class"==n&&e.class?e.class+=" "+t.class:"style"==n&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}$.prototype.children=tt.prototype.children=et.prototype.children=_;const st=Object.create(null);function at(t,e,n){if(t==e)return!0;t||(t=st),e||(e=st);let i=Object.keys(t),r=Object.keys(e);if(i.length-(n&&i.indexOf(n)>-1?1:0)!=r.length-(n&&r.indexOf(n)>-1?1:0))return!1;for(let o of i)if(o!=n&&(-1==r.indexOf(o)||t[o]!==e[o]))return!1;return!0}function lt(t,e,n){let i=!1;if(e)for(let r in e)n&&r in n||(i=!0,"style"==r?t.style.cssText="":t.removeAttribute(r));if(n)for(let r in n)e&&e[r]==n[r]||(i=!0,"style"==r?t.style.cssText=n[r]:t.setAttribute(r,n[r]));return i}function ct(t){let e=Object.create(null);for(let n=0;n<t.attributes.length;n++){let i=t.attributes[n];e[i.name]=i.value}return e}class ut{eq(t){return!1}updateDOM(t,e){return!1}compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(t){return!0}coordsAt(t,e,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(t){}}var ht=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(ht||(ht={}));class ft extends i.FB{constructor(t,e,n,i){super(),this.startSide=t,this.endSide=e,this.widget=n,this.spec=i}get heightRelevant(){return!1}static mark(t){return new dt(t)}static widget(t){let e=Math.max(-1e4,Math.min(1e4,t.side||0)),n=!!t.block;return e+=n&&!t.inlineOrder?e>0?3e8:-4e8:e>0?1e8:-1e8,new gt(t,e,e,n,t.widget||null,!1)}static replace(t){let e,n,i=!!t.block;if(t.isBlockGap)e=-5e8,n=4e8;else{let{start:r,end:o}=mt(t,i);e=(r?i?-3e8:-1:5e8)-1,n=1+(o?i?2e8:1:-6e8)}return new gt(t,e,n,i,t.widget||null,!0)}static line(t){return new pt(t)}static set(t,e=!1){return i.om.of(t,e)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}ft.none=i.om.empty;class dt extends ft{constructor(t){let{start:e,end:n}=mt(t);super(e?-1:5e8,n?1:-6e8,null,t),this.tagName=t.tagName||"span",this.class=t.class||"",this.attrs=t.attributes||null}eq(t){var e,n;return this==t||t instanceof dt&&this.tagName==t.tagName&&(this.class||(null===(e=this.attrs)||void 0===e?void 0:e.class))==(t.class||(null===(n=t.attrs)||void 0===n?void 0:n.class))&&at(this.attrs,t.attrs,"class")}range(t,e=t){if(t>=e)throw new RangeError("Mark decorations may not be empty");return super.range(t,e)}}dt.prototype.point=!1;class pt extends ft{constructor(t){super(-2e8,-2e8,null,t)}eq(t){return t instanceof pt&&this.spec.class==t.spec.class&&at(this.spec.attributes,t.spec.attributes)}range(t,e=t){if(e!=t)throw new RangeError("Line decoration ranges must be zero-length");return super.range(t,e)}}pt.prototype.mapMode=i.iR.TrackBefore,pt.prototype.point=!0;class gt extends ft{constructor(t,e,n,r,o,s){super(e,n,o,t),this.block=r,this.isReplace=s,this.mapMode=r?e<=0?i.iR.TrackBefore:i.iR.TrackAfter:i.iR.TrackDel}get type(){return this.startSide!=this.endSide?ht.WidgetRange:this.startSide<=0?ht.WidgetBefore:ht.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof gt&&(e=this.widget,n=t.widget,e==n||!!(e&&n&&e.compare(n)))&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide;var e,n}range(t,e=t){if(this.isReplace&&(t>e||t==e&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&e!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(t,e)}}function mt(t,e=!1){let{inclusiveStart:n,inclusiveEnd:i}=t;return null==n&&(n=t.inclusive),null==i&&(i=t.inclusive),{start:null!=n?n:e,end:null!=i?i:e}}function bt(t,e,n,i=0){let r=n.length-1;r>=0&&n[r]+i>=t?n[r]=Math.max(n[r],e):n.push(t,e)}gt.prototype.point=!0;class vt extends L{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(t,e,n,i,r,o){if(n){if(!(n instanceof vt))return!1;this.dom||n.transferDOM(this)}return i&&this.setDeco(n?n.attrs:null),H(this,t,e,n?n.children.slice():[],r,o),!0}split(t){let e=new vt;if(e.breakAfter=this.breakAfter,0==this.length)return e;let{i:n,off:i}=this.childPos(t);i&&(e.append(this.children[n].split(i),0),this.children[n].merge(i,this.children[n].length,null,!1,0,0),n++);for(let r=n;r<this.children.length;r++)e.append(this.children[r],0);for(;n>0&&0==this.children[n-1].length;)this.children[--n].destroy();return this.children.length=n,this.markDirty(),this.length=t,e}transferDOM(t){this.dom&&(this.markDirty(),t.setDOM(this.dom),t.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(t){at(this.attrs,t)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=t)}append(t,e){it(this,t,e)}addLineDeco(t){let e=t.spec.attributes,n=t.spec.class;e&&(this.attrs=ot(e,this.attrs||{})),n&&(this.attrs=ot({class:n},this.attrs||{}))}domAtPos(t){return nt(this,t)}reuseDOM(t){"DIV"==t.nodeName&&(this.setDOM(t),this.flags|=6)}sync(t,e){var n;this.dom?4&this.flags&&(A(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(lt(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(t,e);let i=this.dom.lastChild;for(;i&&L.get(i)instanceof K;)i=i.lastChild;if(!(i&&this.length&&("BR"==i.nodeName||0!=(null===(n=L.get(i))||void 0===n?void 0:n.isEditable)||X.ios&&this.children.some((t=>t instanceof $))))){let t=document.createElement("BR");t.cmIgnore=!0,this.dom.appendChild(t)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let t,e=0;for(let n of this.children){if(!(n instanceof $)||/[^ -~]/.test(n.text))return null;let i=p(n.dom);if(1!=i.length)return null;e+=i[0].width,t=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(t,e){let n=rt(this,t,e);if(!this.children.length&&n&&this.parent){let{heightOracle:t}=this.parent.view.viewState,e=n.bottom-n.top;if(Math.abs(e-t.lineHeight)<2&&t.textHeight<e){let i=(e-t.textHeight)/2;return{top:n.top+i,bottom:n.bottom-i,left:n.left,right:n.left}}}return n}become(t){return t instanceof vt&&0==this.children.length&&0==t.children.length&&at(this.attrs,t.attrs)&&this.breakAfter==t.breakAfter}covers(){return!0}static find(t,e){for(let n=0,i=0;n<t.children.length;n++){let r=t.children[n],o=i+r.length;if(o>=e){if(r instanceof vt)return r;if(o>e)break}i=o+r.breakAfter}return null}}class yt extends L{constructor(t,e,n){super(),this.widget=t,this.length=e,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(t,e,n,i,r,o){return!(n&&(!(n instanceof yt&&this.widget.compare(n.widget))||t>0&&r<=0||e<this.length&&o<=0))&&(this.length=t+(n?n.length:0)+(this.length-e),!0)}domAtPos(t){return 0==t?N.before(this.dom):N.after(this.dom,t==this.length)}split(t){let e=this.length-t;this.length=t;let n=new yt(this.widget,e,this.deco);return n.breakAfter=this.breakAfter,n}get children(){return _}sync(t){this.dom&&this.widget.updateDOM(this.dom,t)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(t)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):i.EY.empty}domBoundsAround(){return null}become(t){return t instanceof yt&&t.widget.constructor==this.widget.constructor&&(t.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=t.widget,this.length=t.length,this.deco=t.deco,this.breakAfter=t.breakAfter,!0)}ignoreMutation(){return!0}ignoreEvent(t){return this.widget.ignoreEvent(t)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(t,e){let n=this.widget.coordsAt(this.dom,t,e);return n||(this.widget instanceof xt?null:x(this.dom.getBoundingClientRect(),this.length?0==t:e<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(t){let{startSide:e,endSide:n}=this.deco;return e!=n&&(t<0?e<0:n>0)}}class xt extends ut{constructor(t){super(),this.height=t}toDOM(){let t=document.createElement("div");return t.className="cm-gap",this.updateDOM(t),t}eq(t){return t.height==this.height}updateDOM(t){return t.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class wt{constructor(t,e,n,i){this.doc=t,this.pos=e,this.end=n,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=t.iter(),this.skip=e}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let t=this.content[this.content.length-1];return!(t.breakAfter||t instanceof yt&&t.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new vt),this.atCursorPos=!0),this.curLine}flushBuffer(t=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(St(new et(-1),t),t.length),this.pendingBuffer=0)}addBlockWidget(t){this.flushBuffer(),this.curLine=null,this.content.push(t)}finish(t){this.pendingBuffer&&t<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||t&&this.content.length&&this.content[this.content.length-1]instanceof yt||this.getLine()}buildText(t,e,n){for(;t>0;){if(this.textOff==this.text.length){let{value:e,lineBreak:n,done:i}=this.cursor.next(this.skip);if(this.skip=0,i)throw new Error("Ran out of text content when drawing inline views");if(n){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,t--;continue}this.text=e,this.textOff=0}let i=Math.min(this.text.length-this.textOff,t,512);this.flushBuffer(e.slice(e.length-n)),this.getLine().append(St(new $(this.text.slice(this.textOff,this.textOff+i)),e),n),this.atCursorPos=!0,this.textOff+=i,t-=i,n=0}}span(t,e,n,i){this.buildText(e-t,n,i),this.pos=e,this.openStart<0&&(this.openStart=i)}point(t,e,n,i,r,o){if(this.disallowBlockEffectsFor[o]&&n instanceof gt){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(e>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let s=e-t;if(n instanceof gt)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new yt(n.widget||Ot.block,s,n));else{let o=tt.create(n.widget||Ot.inline,s,s?0:n.startSide),a=this.atCursorPos&&!o.isEditable&&r<=i.length&&(t<e||n.startSide>0),l=!o.isEditable&&(t<e||r>i.length||n.startSide<=0),c=this.getLine();2!=this.pendingBuffer||a||o.isEditable||(this.pendingBuffer=0),this.flushBuffer(i),a&&(c.append(St(new et(1),i),r),r=i.length+Math.max(0,r-i.length)),c.append(St(o,i),r),this.atCursorPos=l,this.pendingBuffer=l?t<e||r>i.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);s&&(this.textOff+s<=this.text.length?this.textOff+=s:(this.skip+=s-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=e),this.openStart<0&&(this.openStart=r)}static build(t,e,n,r,o){let s=new wt(t,e,n,o);return s.openEnd=i.om.spans(r,e,n,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}function St(t,e){for(let n of e)t=new K(n,[t],t.length);return t}class Ot extends ut{constructor(t){super(),this.tag=t}eq(t){return t.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(t){return t.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Ot.inline=new Ot("span"),Ot.block=new Ot("div");var It=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(It||(It={}));const kt=It.LTR,Et=It.RTL;function Mt(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const Ct=Mt("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),At=Mt("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),jt=Object.create(null),Pt=[];for(let lo of["()","[]","{}"]){let t=lo.charCodeAt(0),e=lo.charCodeAt(1);jt[t]=e,jt[e]=-t}function Tt(t){return t<=247?Ct[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?At[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const Nt=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class _t{get dir(){return this.level%2?Et:kt}constructor(t,e,n){this.from=t,this.to=e,this.level=n}side(t,e){return this.dir==e==t?this.to:this.from}forward(t,e){return t==(this.dir==e)}static find(t,e,n,i){let r=-1;for(let o=0;o<t.length;o++){let s=t[o];if(s.from<=e&&s.to>=e){if(s.level==n)return o;(r<0||(0!=i?i<0?s.from<e:s.to>e:t[r].level>s.level))&&(r=o)}}if(r<0)throw new RangeError("Index out of range");return r}}function Lt(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let i=t[n],r=e[n];if(i.from!=r.from||i.to!=r.to||i.direction!=r.direction||!Lt(i.inner,r.inner))return!1}return!0}const Dt=[];function Rt(t,e,n,i,r,o,s){let a=i%2?2:1;if(i%2==r%2)for(let l=e,c=0;l<n;){let e=!0,u=!1;if(c==o.length||l<o[c].from){let t=Dt[l];t!=a&&(e=!1,u=16==t)}let h=e||1!=a?null:[],f=e?i:i+1,d=l;t:for(;;)if(c<o.length&&d==o[c].from){if(u)break t;let p=o[c];if(!e)for(let t=p.to,e=c+1;;){if(t==n)break t;if(!(e<o.length&&o[e].from==t)){if(Dt[t]==a)break t;break}t=o[e++].to}if(c++,h)h.push(p);else{p.from>l&&s.push(new _t(l,p.from,f)),Bt(t,p.direction==kt!=!(f%2)?i+1:i,r,p.inner,p.from,p.to,s),l=p.to}d=p.to}else{if(d==n||(e?Dt[d]!=a:Dt[d]==a))break;d++}h?Rt(t,l,d,i+1,r,h,s):l<d&&s.push(new _t(l,d,f)),l=d}else for(let l=n,c=o.length;l>e;){let n=!0,u=!1;if(!c||l>o[c-1].to){let t=Dt[l-1];t!=a&&(n=!1,u=16==t)}let h=n||1!=a?null:[],f=n?i:i+1,d=l;t:for(;;)if(c&&d==o[c-1].to){if(u)break t;let p=o[--c];if(!n)for(let t=p.from,n=c;;){if(t==e)break t;if(!n||o[n-1].to!=t){if(Dt[t-1]==a)break t;break}t=o[--n].from}if(h)h.push(p);else{p.to<l&&s.push(new _t(p.to,l,f)),Bt(t,p.direction==kt!=!(f%2)?i+1:i,r,p.inner,p.from,p.to,s),l=p.from}d=p.from}else{if(d==e||(n?Dt[d-1]!=a:Dt[d-1]==a))break;d--}h?Rt(t,d,l,i+1,r,h,s):d<l&&s.push(new _t(d,l,f)),l=d}}function Bt(t,e,n,i,r,o,s){let a=e%2?2:1;!function(t,e,n,i,r){for(let o=0;o<=i.length;o++){let s=o?i[o-1].to:e,a=o<i.length?i[o].from:n,l=o?256:r;for(let e=s,n=l,i=l;e<a;e++){let r=Tt(t.charCodeAt(e));512==r?r=n:8==r&&4==i&&(r=16),Dt[e]=4==r?2:r,7&r&&(i=r),n=r}for(let t=s,e=l,i=l;t<a;t++){let r=Dt[t];if(128==r)t<a-1&&e==Dt[t+1]&&24&e?r=Dt[t]=e:Dt[t]=256;else if(64==r){let r=t+1;for(;r<a&&64==Dt[r];)r++;let o=t&&8==e||r<n&&8==Dt[r]?1==i?1:8:256;for(let e=t;e<r;e++)Dt[e]=o;t=r-1}else 8==r&&1==i&&(Dt[t]=1);e=r,7&r&&(i=r)}}}(t,r,o,i,a),function(t,e,n,i,r){let o=1==r?2:1;for(let s=0,a=0,l=0;s<=i.length;s++){let c=s?i[s-1].to:e,u=s<i.length?i[s].from:n;for(let e,n,i,s=c;s<u;s++)if(n=jt[e=t.charCodeAt(s)])if(n<0){for(let t=a-3;t>=0;t-=3)if(Pt[t+1]==-n){let e=Pt[t+2],n=2&e?r:4&e?1&e?o:r:0;n&&(Dt[s]=Dt[Pt[t]]=n),a=t;break}}else{if(189==Pt.length)break;Pt[a++]=s,Pt[a++]=e,Pt[a++]=l}else if(2==(i=Dt[s])||1==i){let t=i==r;l=t?0:1;for(let e=a-3;e>=0;e-=3){let n=Pt[e+2];if(2&n)break;if(t)Pt[e+2]|=2;else{if(4&n)break;Pt[e+2]|=4}}}}}(t,r,o,i,a),function(t,e,n,i){for(let r=0,o=i;r<=n.length;r++){let s=r?n[r-1].to:t,a=r<n.length?n[r].from:e;for(let l=s;l<a;){let s=Dt[l];if(256==s){let s=l+1;for(;;)if(s==a){if(r==n.length)break;s=n[r++].to,a=r<n.length?n[r].from:e}else{if(256!=Dt[s])break;s++}let c=1==o,u=c==(1==(s<e?Dt[s]:i))?c?1:2:i;for(let e=s,i=r,o=i?n[i-1].to:t;e>l;)e==o&&(e=n[--i].from,o=i?n[i-1].to:t),Dt[--e]=u;l=s}else o=s,l++}}}(r,o,i,a),Rt(t,r,o,e,n,i,s)}function Ht(t,e,n){if(!t)return[new _t(0,0,e==Et?1:0)];if(e==kt&&!n.length&&!Nt.test(t))return zt(t.length);if(n.length)for(;t.length>Dt.length;)Dt[Dt.length]=256;let i=[],r=e==kt?0:1;return Bt(t,r,r,n,0,t.length,i),i}function zt(t){return[new _t(0,t,0)]}let Wt="";function Ut(t,e,n,r,o){var s;let a=r.head-t.from,l=_t.find(e,a,null!==(s=r.bidiLevel)&&void 0!==s?s:-1,r.assoc),c=e[l],u=c.side(o,n);if(a==u){let t=l+=o?1:-1;if(t<0||t>=e.length)return null;c=e[l=t],a=c.side(!o,n),u=c.side(o,n)}let h=(0,i.zK)(t.text,a,c.forward(o,n));(h<c.from||h>c.to)&&(h=u),Wt=t.text.slice(Math.min(a,h),Math.max(a,h));let f=l==(o?e.length-1:0)?null:e[l+(o?1:-1)];return f&&h==u&&f.level+(o?0:1)<c.level?i.OF.cursor(f.side(!o,n)+t.from,f.forward(o,n)?1:-1,f.level):i.OF.cursor(h+t.from,c.forward(o,n)?-1:1,c.level)}function Ft(t,e,n){for(let i=e;i<n;i++){let e=Tt(t.charCodeAt(i));if(1==e)return kt;if(2==e||4==e)return Et}return kt}const Gt=i.sj.define(),Zt=i.sj.define(),Vt=i.sj.define(),qt=i.sj.define(),Yt=i.sj.define(),Jt=i.sj.define(),Qt=i.sj.define(),Xt=i.sj.define(),$t=i.sj.define(),Kt=i.sj.define({combine:t=>t.some((t=>t))}),te=i.sj.define({combine:t=>t.some((t=>t))}),ee=i.sj.define();class ne{constructor(t,e="nearest",n="nearest",i=5,r=5,o=!1){this.range=t,this.y=e,this.x=n,this.yMargin=i,this.xMargin=r,this.isSnapshot=o}map(t){return t.empty?this:new ne(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new ne(i.OF.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const ie=i.Pe.define({map:(t,e)=>t.map(e)}),re=i.Pe.define();function oe(t,e,n){let i=t.facet(qt);i.length?i[0](e):window.onerror?window.onerror(String(e),n,void 0,void 0,e):n?console.error(n+":",e):console.error(e)}const se=i.sj.define({combine:t=>!t.length||t[0]});let ae=0;const le=i.sj.define();class ce{constructor(t,e,n,i,r){this.id=t,this.create=e,this.domEventHandlers=n,this.domEventObservers=i,this.extension=r(this)}static define(t,e){const{eventHandlers:n,eventObservers:i,provide:r,decorations:o}=e||{};return new ce(ae++,t,n,i,(t=>{let e=[le.of(t)];return o&&e.push(de.of((e=>{let n=e.plugin(t);return n?o(n):ft.none}))),r&&e.push(r(t)),e}))}static fromClass(t,e){return ce.define((e=>new t(e)),e)}}class ue{constructor(t){this.spec=t,this.mustUpdate=null,this.value=null}update(t){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(e){if(oe(t.state,e,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(n){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(t)}catch(e){oe(t.state,e,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(t){var e;if(null===(e=this.value)||void 0===e?void 0:e.destroy)try{this.value.destroy()}catch(n){oe(t.state,n,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const he=i.sj.define(),fe=i.sj.define(),de=i.sj.define(),pe=i.sj.define(),ge=i.sj.define(),me=i.sj.define();function be(t,e){let n=t.state.facet(me);if(!n.length)return n;let r=n.map((e=>e instanceof Function?e(t):e)),o=[];return i.om.spans(r,e.from,e.to,{point(){},span(t,n,i,r){let s=t-e.from,a=n-e.from,l=o;for(let o=i.length-1;o>=0;o--,r--){let t,n=i[o].spec.bidiIsolate;if(null==n&&(n=Ft(e.text,s,a)),r>0&&l.length&&(t=l[l.length-1]).to==s&&t.direction==n)t.to=a,l=t.inner;else{let t={from:s,to:a,direction:n,inner:[]};l.push(t),l=t.inner}}}}),o}const ve=i.sj.define();function ye(t){let e=0,n=0,i=0,r=0;for(let o of t.state.facet(ve)){let s=o(t);s&&(null!=s.left&&(e=Math.max(e,s.left)),null!=s.right&&(n=Math.max(n,s.right)),null!=s.top&&(i=Math.max(i,s.top)),null!=s.bottom&&(r=Math.max(r,s.bottom)))}return{left:e,right:n,top:i,bottom:r}}const xe=i.sj.define();class we{constructor(t,e,n,i){this.fromA=t,this.toA=e,this.fromB=n,this.toB=i}join(t){return new we(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let e=t.length,n=this;for(;e>0;e--){let i=t[e-1];if(!(i.fromA>n.toA)){if(i.toA<n.fromA)break;n=n.join(i),t.splice(e-1,1)}}return t.splice(e,0,n),t}static extendWithRanges(t,e){if(0==e.length)return t;let n=[];for(let i=0,r=0,o=0,s=0;;i++){let a=i==t.length?null:t[i],l=o-s,c=a?a.fromB:1e9;for(;r<e.length&&e[r]<c;){let t=e[r],i=e[r+1],o=Math.max(s,t),a=Math.min(c,i);if(o<=a&&new we(o+l,a+l,o,a).addToSet(n),i>c)break;r+=2}if(!a)return n;new we(a.fromA,a.toA,a.fromB,a.toB).addToSet(n),o=a.toA,s=a.toB}}}class Se{constructor(t,e,n){this.view=t,this.state=e,this.transactions=n,this.flags=0,this.startState=t.state,this.changes=i.VR.empty(this.startState.doc.length);for(let i of n)this.changes=this.changes.compose(i.changes);let r=[];this.changes.iterChangedRanges(((t,e,n,i)=>r.push(new we(t,e,n,i)))),this.changedRanges=r}static create(t,e,n){return new Se(t,e,n)}get viewportChanged(){return(4&this.flags)>0}get viewportMoved(){return(8&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(18&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((t=>t.selection))}get empty(){return 0==this.flags&&0==this.transactions.length}}class Oe extends L{get length(){return this.view.state.doc.length}constructor(t){super(),this.view=t,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=ft.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(t.contentDOM),this.children=[new vt],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new we(0,0,0,t.state.doc.length)],0,null)}update(t){var e;let n=t.changedRanges;this.minWidth>0&&n.length&&(n.every((({fromA:t,toA:e})=>e<this.minWidthFrom||t>this.minWidthTo))?(this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=t.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(t);let r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&((null===(e=this.domChanged)||void 0===e?void 0:e.newSel)?r=this.domChanged.newSel.head:function(t,e){let n=!1;e&&t.iterChangedRanges(((t,i)=>{t<e.to&&i>e.from&&(n=!0)}));return n}(t.changes,this.hasComposition)||t.selectionSet||(r=t.state.selection.main.head));let o=r>-1?function(t,e,n){let i=Ie(t,n);if(!i)return null;let{node:r,from:o,to:s}=i,a=r.nodeValue;if(/[\n\r]/.test(a))return null;if(t.state.doc.sliceString(i.from,i.to)!=a)return null;let l=e.invertedDesc,c=new we(l.mapPos(o),l.mapPos(s),o,s),u=[];for(let h=r.parentNode;;h=h.parentNode){let e=L.get(h);if(e instanceof K)u.push({node:h,deco:e.mark});else{if(e instanceof vt||"DIV"==h.nodeName&&h.parentNode==t.contentDOM)return{range:c,text:r,marks:u,line:h};if(h==t.contentDOM)return null;u.push({node:h,deco:new dt({inclusive:!0,attributes:ct(h),tagName:h.tagName.toLowerCase()})})}}}(this.view,t.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:e,to:i}=this.hasComposition;n=new we(e,i,t.changes.mapPos(e,-1),t.changes.mapPos(i,1)).addToSet(n.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(X.ie||X.chrome)&&!o&&t&&t.state.doc.lines!=t.startState.doc.lines&&(this.forceSelection=!0);let s=function(t,e,n){let r=new ke;return i.om.compare(t,e,n,r),r.changes}(this.decorations,this.updateDeco(),t.changes);return n=we.extendWithRanges(n,s),!!(7&this.flags||0!=n.length)&&(this.updateInner(n,t.startState.doc.length,o),t.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(t,e,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(t,e,n);let{observer:i}=this.view;i.ignore((()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let t=X.chrome||X.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,t),this.flags&=-8,t&&(t.written||i.selectionRange.focusNode!=t.node)&&(this.forceSelection=!0),this.dom.style.height=""})),this.markedForComposition.forEach((t=>t.flags&=-9));let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let o of this.children)o instanceof yt&&o.widget instanceof xt&&r.push(o.dom);i.updateGaps(r)}updateChildren(t,e,n){let i=n?n.range.addToSet(t.slice()):t,r=this.childCursor(e);for(let o=i.length-1;;o--){let t=o>=0?i[o]:null;if(!t)break;let e,s,a,l,{fromA:c,toA:u,fromB:h,toB:f}=t;if(n&&n.range.fromB<f&&n.range.toB>h){let t=wt.build(this.view.state.doc,h,n.range.fromB,this.decorations,this.dynamicDecorationMap),i=wt.build(this.view.state.doc,n.range.toB,f,this.decorations,this.dynamicDecorationMap);s=t.breakAtStart,a=t.openStart,l=i.openEnd;let r=this.compositionView(n);i.breakAtStart?r.breakAfter=1:i.content.length&&r.merge(r.length,r.length,i.content[0],!1,i.openStart,0)&&(r.breakAfter=i.content[0].breakAfter,i.content.shift()),t.content.length&&r.merge(0,0,t.content[t.content.length-1],!0,0,t.openEnd)&&t.content.pop(),e=t.content.concat(r).concat(i.content)}else({content:e,breakAtStart:s,openStart:a,openEnd:l}=wt.build(this.view.state.doc,h,f,this.decorations,this.dynamicDecorationMap));let{i:d,off:p}=r.findPos(u,1),{i:g,off:m}=r.findPos(c,-1);B(this,g,m,d,p,e,s,a,l)}n&&this.fixCompositionDOM(n)}updateEditContextFormatting(t){this.editContextFormatting=this.editContextFormatting.map(t.changes);for(let e of t.transactions)for(let t of e.effects)t.is(re)&&(this.editContextFormatting=t.value)}compositionView(t){let e=new $(t.text.nodeValue);e.flags|=8;for(let{deco:i}of t.marks)e=new K(i,[e],e.length);let n=new vt;return n.append(e,0),n}fixCompositionDOM(t){let e=(t,e)=>{e.flags|=8|(e.children.some((t=>7&t.flags))?1:0),this.markedForComposition.add(e);let n=L.get(t);n&&n!=e&&(n.dom=null),e.setDOM(t)},n=this.childPos(t.range.fromB,1),i=this.children[n.i];e(t.line,i);for(let r=t.marks.length-1;r>=-1;r--)n=i.childPos(n.off,1),i=i.children[n.i],e(r>=0?t.marks[r].node:t.text,i)}updateSelection(t=!1,e=!1){!t&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let n=this.view.root.activeElement,i=n==this.dom,r=!i&&!(this.view.state.facet(se)||this.dom.tabIndex>-1)&&d(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(!(i||e||r))return;let o=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,a=this.moveToLine(this.domAtPos(s.anchor)),l=s.empty?a:this.moveToLine(this.domAtPos(s.head));if(X.gecko&&s.empty&&!this.hasComposition&&(1==(c=a).node.nodeType&&c.node.firstChild&&(0==c.offset||"false"==c.node.childNodes[c.offset-1].contentEditable)&&(c.offset==c.node.childNodes.length||"false"==c.node.childNodes[c.offset].contentEditable))){let t=document.createTextNode("");this.view.observer.ignore((()=>a.node.insertBefore(t,a.node.childNodes[a.offset]||null))),a=l=new N(t,0),o=!0}var c;let u=this.view.observer.selectionRange;!o&&u.focusNode&&(g(a.node,a.offset,u.anchorNode,u.anchorOffset)&&g(l.node,l.offset,u.focusNode,u.focusOffset)||this.suppressWidgetCursorChange(u,s))||(this.view.observer.ignore((()=>{X.android&&X.chrome&&this.dom.contains(u.focusNode)&&function(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(1==n.nodeType&&"false"==n.contentEditable)return!0;return!1}(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let t=h(this.view.root);if(t)if(s.empty){if(X.gecko){let t=(e=a.node,i=a.offset,1!=e.nodeType?0:(i&&"false"==e.childNodes[i-1].contentEditable?1:0)|(i<e.childNodes.length&&"false"==e.childNodes[i].contentEditable?2:0));if(t&&3!=t){let e=(1==t?P:T)(a.node,a.offset);e&&(a=new N(e.node,e.offset))}}t.collapse(a.node,a.offset),null!=s.bidiLevel&&void 0!==t.caretBidiLevel&&(t.caretBidiLevel=s.bidiLevel)}else if(t.extend){t.collapse(a.node,a.offset);try{t.extend(l.node,l.offset)}catch(o){}}else{let e=document.createRange();s.anchor>s.head&&([a,l]=[l,a]),e.setEnd(l.node,l.offset),e.setStart(a.node,a.offset),t.removeAllRanges(),t.addRange(e)}else;var e,i;r&&this.view.root.activeElement==this.dom&&(this.dom.blur(),n&&n.focus())})),this.view.observer.setSelectionRange(a,l)),this.impreciseAnchor=a.precise?null:new N(u.anchorNode,u.anchorOffset),this.impreciseHead=l.precise?null:new N(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(t,e){return this.hasComposition&&e.empty&&g(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)&&this.posFromDOM(t.focusNode,t.focusOffset)==e.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:t}=this,e=t.state.selection.main,n=h(t.root),{anchorNode:i,anchorOffset:r}=t.observer.selectionRange;if(!(n&&e.empty&&e.assoc&&n.modify))return;let o=vt.find(this,e.head);if(!o)return;let s=o.posAtStart;if(e.head==s||e.head==s+o.length)return;let a=this.coordsAt(e.head,-1),l=this.coordsAt(e.head,1);if(!a||!l||a.bottom>l.top)return;let c=this.domAtPos(e.head+e.assoc);n.collapse(c.node,c.offset),n.modify("move",e.assoc<0?"forward":"backward","lineboundary"),t.observer.readSelectionRange();let u=t.observer.selectionRange;t.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=e.from&&n.collapse(i,r)}moveToLine(t){let e,n=this.dom;if(t.node!=n)return t;for(let i=t.offset;!e&&i<n.childNodes.length;i++){let t=L.get(n.childNodes[i]);t instanceof vt&&(e=t.domAtPos(0))}for(let i=t.offset-1;!e&&i>=0;i--){let t=L.get(n.childNodes[i]);t instanceof vt&&(e=t.domAtPos(t.length))}return e?new N(e.node,e.offset,!0):t}nearest(t){for(let e=t;e;){let t=L.get(e);if(t&&t.rootView==this)return t;e=e.parentNode}return null}posFromDOM(t,e){let n=this.nearest(t);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(t,e)+n.posAtStart}domAtPos(t){let{i:e,off:n}=this.childCursor().findPos(t,-1);for(;e<this.children.length-1;){let t=this.children[e];if(n<t.length||t instanceof vt)break;e++,n=0}return this.children[e].domAtPos(n)}coordsAt(t,e){let n=null,i=0;for(let r=this.length,o=this.children.length-1;o>=0;o--){let s=this.children[o],a=r-s.breakAfter,l=a-s.length;if(a<t)break;if(l<=t&&(l<t||s.covers(-1))&&(a>t||s.covers(1))&&(!n||s instanceof vt&&!(n instanceof vt&&e>=0)))n=s,i=l;else if(n&&l==t&&a==t&&s instanceof yt&&Math.abs(e)<2){if(s.deco.startSide<0)break;o&&(n=null)}r=l}return n?n.coordsAt(t-i,e):null}coordsForChar(t){let{i:e,off:n}=this.childPos(t,1),r=this.children[e];if(!(r instanceof vt))return null;for(;r.children.length;){let{i:t,off:e}=r.childPos(n,1);for(;;t++){if(t==r.children.length)return null;if((r=r.children[t]).length)break}n=e}if(!(r instanceof $))return null;let o=(0,i.zK)(r.text,n);if(o==n)return null;let s=M(r.dom,n,o).getClientRects();for(let i=0;i<s.length;i++){let t=s[i];if(i==s.length-1||t.top<t.bottom&&t.left<t.right)return t}return null}measureVisibleLineHeights(t){let e=[],{from:n,to:i}=t,r=this.view.contentDOM.clientWidth,o=r>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,a=this.view.textDirection==It.LTR;for(let l=0,c=0;c<this.children.length;c++){let t=this.children[c],u=l+t.length;if(u>i)break;if(l>=n){let n=t.dom.getBoundingClientRect();if(e.push(n.height),o){let e=t.dom.lastChild,i=e?p(e):[];if(i.length){let t=i[i.length-1],e=a?t.right-n.left:n.right-t.left;e>s&&(s=e,this.minWidth=r,this.minWidthFrom=l,this.minWidthTo=u)}}}l=u+t.breakAfter}return e}textDirectionAt(t){let{i:e}=this.childPos(t,1);return"rtl"==getComputedStyle(this.children[e].dom).direction?It.RTL:It.LTR}measureTextSize(){for(let r of this.children)if(r instanceof vt){let t=r.measureTextSize();if(t)return t}let t,e,n,i=document.createElement("div");return i.className="cm-line",i.style.width="99999px",i.style.position="absolute",i.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((()=>{this.dom.appendChild(i);let r=p(i.firstChild)[0];t=i.getBoundingClientRect().height,e=r?r.width/27:7,n=r?r.height:t,i.remove()})),{lineHeight:t,charWidth:e,textHeight:n}}childCursor(t=this.length){let e=this.children.length;return e&&(t-=this.children[--e].length),new R(this.children,t,e)}computeBlockGapDeco(){let t=[],e=this.view.viewState;for(let n=0,i=0;;i++){let r=i==e.viewports.length?null:e.viewports[i],o=r?r.from-1:this.length;if(o>n){let i=(e.lineBlockAt(o).bottom-e.lineBlockAt(n).top)/this.view.scaleY;t.push(ft.replace({widget:new xt(i),block:!0,inclusive:!0,isBlockGap:!0}).range(n,o))}if(!r)break;n=r.to+1}return ft.set(t)}updateDeco(){let t=1,e=this.view.state.facet(de).map((e=>(this.dynamicDecorationMap[t++]="function"==typeof e)?e(this.view):e)),n=!1,r=this.view.state.facet(pe).map(((t,e)=>{let i="function"==typeof t;return i&&(n=!0),i?t(this.view):t}));for(r.length&&(this.dynamicDecorationMap[t++]=n,e.push(i.om.join(r))),this.decorations=[this.editContextFormatting,...e,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];t<this.decorations.length;)this.dynamicDecorationMap[t++]=!1;return this.decorations}scrollIntoView(t){if(t.isSnapshot){let e=this.view.viewState.lineBlockAt(t.range.head);return this.view.scrollDOM.scrollTop=e.top-t.yMargin,void(this.view.scrollDOM.scrollLeft=t.xMargin)}for(let c of this.view.state.facet(ee))try{if(c(this.view,t.range,t))return!0}catch(l){oe(this.view.state,l,"scroll handler")}let e,{range:n}=t,i=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1);if(!i)return;!n.empty&&(e=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(i={left:Math.min(i.left,e.left),top:Math.min(i.top,e.top),right:Math.max(i.right,e.right),bottom:Math.max(i.bottom,e.bottom)});let r=ye(this.view),o={left:i.left-r.left,top:i.top-r.top,right:i.right+r.right,bottom:i.bottom+r.bottom},{offsetWidth:s,offsetHeight:a}=this.view.scrollDOM;!function(t,e,n,i,r,o,s,a){let l=t.ownerDocument,c=l.defaultView||window;for(let u=t,h=!1;u&&!h;)if(1==u.nodeType){let t,f=u==l.body,d=1,p=1;if(f)t=w(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(h=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let e=u.getBoundingClientRect();({scaleX:d,scaleY:p}=S(u,e)),t={left:e.left,right:e.left+u.clientWidth*d,top:e.top,bottom:e.top+u.clientHeight*p}}let g=0,m=0;if("nearest"==r)e.top<t.top?(m=-(t.top-e.top+s),n>0&&e.bottom>t.bottom+m&&(m=e.bottom-t.bottom+m+s)):e.bottom>t.bottom&&(m=e.bottom-t.bottom+s,n<0&&e.top-m<t.top&&(m=-(t.top+m-e.top+s)));else{let i=e.bottom-e.top,o=t.bottom-t.top;m=("center"==r&&i<=o?e.top+i/2-o/2:"start"==r||"center"==r&&n<0?e.top-s:e.bottom-o+s)-t.top}if("nearest"==i?e.left<t.left?(g=-(t.left-e.left+o),n>0&&e.right>t.right+g&&(g=e.right-t.right+g+o)):e.right>t.right&&(g=e.right-t.right+o,n<0&&e.left<t.left+g&&(g=-(t.left+g-e.left+o))):g=("center"==i?e.left+(e.right-e.left)/2-(t.right-t.left)/2:"start"==i==a?e.left-o:e.right-(t.right-t.left)+o)-t.left,g||m)if(f)c.scrollBy(g,m);else{let t=0,n=0;if(m){let t=u.scrollTop;u.scrollTop+=m/p,n=(u.scrollTop-t)*p}if(g){let e=u.scrollLeft;u.scrollLeft+=g/d,t=(u.scrollLeft-e)*d}e={left:e.left-t,top:e.top-n,right:e.right-t,bottom:e.bottom-n},t&&Math.abs(t-g)<1&&(i="nearest"),n&&Math.abs(n-m)<1&&(r="nearest")}if(f)break;u=u.assignedSlot||u.parentNode}else{if(11!=u.nodeType)break;u=u.host}}(this.view.scrollDOM,o,n.head<n.anchor?-1:1,t.x,t.y,Math.max(Math.min(t.xMargin,s),-s),Math.max(Math.min(t.yMargin,a),-a),this.view.textDirection==It.LTR)}}function Ie(t,e){let n=t.observer.selectionRange;if(!n.focusNode)return null;let i=P(n.focusNode,n.focusOffset),r=T(n.focusNode,n.focusOffset),o=i||r;if(r&&i&&r.node!=i.node){let e=L.get(r.node);if(!e||e instanceof $&&e.text!=r.node.nodeValue)o=r;else if(t.docView.lastCompositionAfterCursor){let t=L.get(i.node);!t||t instanceof $&&t.text!=i.node.nodeValue||(o=r)}}if(t.docView.lastCompositionAfterCursor=o!=i,!o)return null;let s=e-o.offset;return{from:s,to:s+o.node.nodeValue.length,node:o.node}}let ke=class{constructor(){this.changes=[]}compareRange(t,e){bt(t,e,this.changes)}comparePoint(t,e){bt(t,e,this.changes)}boundChange(t){bt(t,t,this.changes)}};function Ee(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function Me(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function Ce(t,e){return t.top<e.bottom-1&&t.bottom>e.top+1}function Ae(t,e){return e<t.top?{top:e,left:t.left,right:t.right,bottom:t.bottom}:t}function je(t,e){return e>t.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function Pe(t,e,n){let i,r,o,s,a,l,c,u,h=!1;for(let d=t.firstChild;d;d=d.nextSibling){let t=p(d);for(let f=0;f<t.length;f++){let p=t[f];r&&Ce(r,p)&&(p=Ae(je(p,r.bottom),r.top));let g=Ee(e,p),m=Me(n,p);if(0==g&&0==m)return 3==d.nodeType?Te(d,e,n):Pe(d,e,n);if(!i||s>m||s==m&&o>g){i=d,r=p,o=g,s=m;let a=m?n<p.top?-1:1:g?e<p.left?-1:1:0;h=!a||(a>0?f<t.length-1:f>0)}0==g?n>p.bottom&&(!c||c.bottom<p.bottom)?(a=d,c=p):n<p.top&&(!u||u.top>p.top)&&(l=d,u=p):c&&Ce(c,p)?c=je(c,p.bottom):u&&Ce(u,p)&&(u=Ae(u,p.top))}}if(c&&c.bottom>=n?(i=a,r=c):u&&u.top<=n&&(i=l,r=u),!i)return{node:t,offset:0};let f=Math.max(r.left,Math.min(r.right,e));return 3==i.nodeType?Te(i,f,n):h&&"false"!=i.contentEditable?Pe(i,f,n):{node:t,offset:Array.prototype.indexOf.call(t.childNodes,i)+(e>=(r.left+r.right)/2?1:0)}}function Te(t,e,n){let i=t.nodeValue.length,r=-1,o=1e9,s=0;for(let a=0;a<i;a++){let i=M(t,a,a+1).getClientRects();for(let l=0;l<i.length;l++){let c=i[l];if(c.top==c.bottom)continue;s||(s=e-c.left);let u=(c.top>n?c.top-n:n-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&u<o){let n=e>=(c.left+c.right)/2,i=n;if(X.chrome||X.gecko){M(t,a).getBoundingClientRect().left==c.right&&(i=!n)}if(u<=0)return{node:t,offset:a+(i?1:0)};r=a+(i?1:0),o=u}}}return{node:t,offset:r>-1?r:s>0?t.nodeValue.length:0}}function Ne(t,e,n,i=-1){var r,o;let s,a=t.contentDOM.getBoundingClientRect(),l=a.top+t.viewState.paddingTop,{docHeight:c}=t.viewState,{x:u,y:h}=e,f=h-l;if(f<0)return 0;if(f>c)return t.state.doc.length;for(let y=t.viewState.heightOracle.textHeight/2,w=!1;s=t.elementAtHeight(f),s.type!=ht.Text;)for(;f=i>0?s.bottom+y:s.top-y,!(f>=0&&f<=c);){if(w)return n?null:0;w=!0,i=-i}h=l+f;let d=s.from;if(d<t.viewport.from)return 0==t.viewport.from?0:n?null:_e(t,a,s,u,h);if(d>t.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:_e(t,a,s,u,h);let p=t.dom.ownerDocument,g=t.root.elementFromPoint?t.root:p,m=g.elementFromPoint(u,h);m&&!t.contentDOM.contains(m)&&(m=null),m||(u=Math.max(a.left+1,Math.min(a.right-1,u)),m=g.elementFromPoint(u,h),m&&!t.contentDOM.contains(m)&&(m=null));let b,v=-1;if(m&&0!=(null===(r=t.docView.nearest(m))||void 0===r?void 0:r.isEditable)){if(p.caretPositionFromPoint){let t=p.caretPositionFromPoint(u,h);t&&({offsetNode:b,offset:v}=t)}else if(p.caretRangeFromPoint){let e=p.caretRangeFromPoint(u,h);e&&(({startContainer:b,startOffset:v}=e),(!t.contentDOM.contains(b)||X.safari&&function(t,e,n){let i;if(3!=t.nodeType||e!=(i=t.nodeValue.length))return!1;for(let r=t.nextSibling;r;r=r.nextSibling)if(1!=r.nodeType||"BR"!=r.nodeName)return!1;return M(t,i-1,i).getBoundingClientRect().left>n}(b,v,u)||X.chrome&&function(t,e,n){if(0!=e)return!1;for(let r=t;;){let t=r.parentNode;if(!t||1!=t.nodeType||t.firstChild!=r)return!1;if(t.classList.contains("cm-line"))break;r=t}let i=1==t.nodeType?t.getBoundingClientRect():M(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-i.left>5}(b,v,u))&&(b=void 0))}b&&(v=Math.min(y(b),v))}if(!b||!t.docView.dom.contains(b)){let e=vt.find(t.docView,d);if(!e)return f>s.top+s.height/2?s.to:s.from;({node:b,offset:v}=Pe(e.dom,u,h))}let x=t.docView.nearest(b);if(!x)return null;if(x.isWidget&&1==(null===(o=x.dom)||void 0===o?void 0:o.nodeType)){let t=x.dom.getBoundingClientRect();return e.y<t.top||e.y<=t.bottom&&e.x<=(t.left+t.right)/2?x.posAtStart:x.posAtEnd}return x.localPosFromDOM(b,v)+x.posAtStart}function _e(t,e,n,r,o){let s=Math.round((r-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>1.5*t.defaultLineHeight){let e=t.viewState.heightOracle.textHeight;s+=Math.floor((o-n.top-.5*(t.defaultLineHeight-e))/e)*t.viewState.heightOracle.lineLength}let a=t.state.sliceDoc(n.from,n.to);return n.from+(0,i.kn)(a,s,t.state.tabSize)}function Le(t,e){let n=t.lineBlockAt(e);if(Array.isArray(n.type))for(let i of n.type)if(i.to>e||i.to==e&&(i.to==n.to||i.type==ht.Text))return i;return n}function De(t,e,n,i){let r=t.state.doc.lineAt(e.head),o=t.bidiSpans(r),s=t.textDirectionAt(r.from);for(let a=e,l=null;;){let e=Ut(r,o,s,a,n),c=Wt;if(!e){if(r.number==(n?t.state.doc.lines:1))return a;c="\n",r=t.state.doc.line(r.number+(n?1:-1)),o=t.bidiSpans(r),e=t.visualLineSide(r,!n)}if(l){if(!l(c))return a}else{if(!i)return e;l=i(c)}a=e}}function Re(t,e,n){for(;;){let i=0;for(let r of t)r.between(e-1,e+1,((t,r,o)=>{if(e>t&&e<r){let o=i||n||(e-t<r-e?-1:1);e=o<0?t:r,i=o}}));if(!i)return e}}function Be(t,e,n){let r=Re(t.state.facet(ge).map((e=>e(t))),n.from,e.head>n.from?-1:1);return r==n.from?n:i.OF.cursor(r,r<n.from?1:-1)}const He="";class ze{constructor(t,e){this.points=t,this.text="",this.lineSeparator=e.facet(i.$t.lineSeparator)}append(t){this.text+=t}lineBreak(){this.text+=He}readRange(t,e){if(!t)return this;let n=t.parentNode;for(let i=t;;){this.findPointBefore(n,i);let t=this.text.length;this.readNode(i);let r=i.nextSibling;if(r==e)break;let o=L.get(i),s=L.get(r);(o&&s?o.breakAfter:(o?o.breakAfter:b(i))||b(r)&&("BR"!=i.nodeName||i.cmIgnore)&&this.text.length>t)&&this.lineBreak(),i=r}return this.findPointBefore(n,e),this}readTextNode(t){let e=t.nodeValue;for(let n of this.points)n.node==t&&(n.pos=this.text.length+Math.min(n.offset,e.length));for(let n=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let r,o=-1,s=1;if(this.lineSeparator?(o=e.indexOf(this.lineSeparator,n),s=this.lineSeparator.length):(r=i.exec(e))&&(o=r.index,s=r[0].length),this.append(e.slice(n,o<0?e.length:o)),o<0)break;if(this.lineBreak(),s>1)for(let e of this.points)e.node==t&&e.pos>this.text.length&&(e.pos-=s-1);n=o+s}}readNode(t){if(t.cmIgnore)return;let e=L.get(t),n=e&&e.overrideDOMText;if(null!=n){this.findPointInside(t,n.length);for(let t=n.iter();!t.next().done;)t.lineBreak?this.lineBreak():this.append(t.value)}else 3==t.nodeType?this.readTextNode(t):"BR"==t.nodeName?t.nextSibling&&this.lineBreak():1==t.nodeType&&this.readRange(t.firstChild,null)}findPointBefore(t,e){for(let n of this.points)n.node==t&&t.childNodes[n.offset]==e&&(n.pos=this.text.length)}findPointInside(t,e){for(let n of this.points)(3==t.nodeType?n.node==t:t.contains(n.node))&&(n.pos=this.text.length+(We(t,n.node,n.offset)?e:0))}}function We(t,e,n){for(;;){if(!e||n<y(e))return!1;if(e==t)return!0;n=m(e)+1,e=e.parentNode}}class Ue{constructor(t,e){this.node=t,this.offset=e,this.pos=-1}}class Fe{constructor(t,e,n,r){this.typeOver=r,this.bounds=null,this.text="",this.domChanged=e>-1;let{impreciseHead:o,impreciseAnchor:s}=t.docView;if(t.state.readOnly&&e>-1)this.newSel=null;else if(e>-1&&(this.bounds=t.docView.domBoundsAround(e,n,0))){let e=o||s?[]:function(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:o}=t.observer.selectionRange;n&&(e.push(new Ue(n,i)),r==n&&o==i||e.push(new Ue(r,o)));return e}(t),n=new ze(e,t.state);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=function(t,e){if(0==t.length)return null;let n=t[0].pos,r=2==t.length?t[1].pos:n;return n>-1&&r>-1?i.OF.single(n+e,r+e):null}(e,this.bounds.from)}else{let e=t.observer.selectionRange,n=o&&o.node==e.focusNode&&o.offset==e.focusOffset||!f(t.contentDOM,e.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(e.focusNode,e.focusOffset),r=s&&s.node==e.anchorNode&&s.offset==e.anchorOffset||!f(t.contentDOM,e.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(e.anchorNode,e.anchorOffset),a=t.viewport;if((X.ios||X.chrome)&&t.state.selection.main.empty&&n!=r&&(a.from>0||a.to<t.state.doc.length)){let e=Math.min(n,r),i=Math.max(n,r),o=a.from-e,s=a.to-i;0!=o&&1!=o&&0!=e||0!=s&&-1!=s&&i!=t.state.doc.length||(n=0,r=t.state.doc.length)}this.newSel=i.OF.single(r,n)}}}function Ge(t,e){let n,{newSel:r}=e,o=t.state.selection.main,s=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:r,to:a}=e.bounds,l=o.from,c=null;(8===s||X.android&&e.text.length<a-r)&&(l=o.to,c="end");let u=function(t,e,n,i){let r=Math.min(t.length,e.length),o=0;for(;o<r&&t.charCodeAt(o)==e.charCodeAt(o);)o++;if(o==r&&t.length==e.length)return null;let s=t.length,a=e.length;for(;s>0&&a>0&&t.charCodeAt(s-1)==e.charCodeAt(a-1);)s--,a--;if("end"==i){n-=s+Math.max(0,o-Math.min(s,a))-o}if(s<o&&t.length<e.length){o-=n<=o&&n>=s?o-n:0,a=o+(a-s),s=o}else if(a<o){o-=n<=o&&n>=a?o-n:0,s=o+(s-a),a=o}return{from:o,toA:s,toB:a}}(t.state.doc.sliceString(r,a,He),e.text,l-r,c);u&&(X.chrome&&13==s&&u.toB==u.from+2&&e.text.slice(u.from,u.toB)==He+He&&u.toB--,n={from:r+u.from,to:r+u.toA,insert:i.EY.of(e.text.slice(u.from,u.toB).split(He))})}else r&&(!t.hasFocus&&t.state.facet(se)||r.main.eq(o))&&(r=null);if(!n&&!r)return!1;if(!n&&e.typeOver&&!o.empty&&r&&r.main.empty?n={from:o.from,to:o.to,insert:t.state.doc.slice(o.from,o.to)}:n&&n.from>=o.from&&n.to<=o.to&&(n.from!=o.from||n.to!=o.to)&&o.to-o.from-(n.to-n.from)<=4?n={from:o.from,to:o.to,insert:t.state.doc.slice(o.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,o.to))}:(X.mac||X.android)&&n&&n.from==n.to&&n.from==o.head-1&&/^\. ?$/.test(n.insert.toString())&&"off"==t.contentDOM.getAttribute("autocorrect")?(r&&2==n.insert.length&&(r=i.OF.single(r.main.anchor-1,r.main.head-1)),n={from:o.from,to:o.to,insert:i.EY.of([" "])}):X.chrome&&n&&n.from==n.to&&n.from==o.head&&"\n "==n.insert.toString()&&t.lineWrapping&&(r&&(r=i.OF.single(r.main.anchor-1,r.main.head-1)),n={from:o.from,to:o.to,insert:i.EY.of([" "])}),n)return Ze(t,n,r,s);if(r&&!r.main.eq(o)){let e=!1,n="select";return t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&(e=!0),n=t.inputState.lastSelectionOrigin),t.dispatch({selection:r,scrollIntoView:e,userEvent:n}),!0}return!1}function Ze(t,e,n,r=-1){if(X.ios&&t.inputState.flushIOSKey(e))return!0;let o=t.state.selection.main;if(X.android&&(e.to==o.to&&(e.from==o.from||e.from==o.from-1&&" "==t.state.sliceDoc(e.from,o.from))&&1==e.insert.length&&2==e.insert.lines&&C(t.contentDOM,"Enter",13)||(e.from==o.from-1&&e.to==o.to&&0==e.insert.length||8==r&&e.insert.length<e.to-e.from&&e.to>o.head)&&C(t.contentDOM,"Backspace",8)||e.from==o.from&&e.to==o.to+1&&0==e.insert.length&&C(t.contentDOM,"Delete",46)))return!0;let s,a=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let l=()=>s||(s=function(t,e,n){let r,o=t.state,s=o.selection.main;if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let n=s.from<e.from?o.sliceDoc(s.from,e.from):"",i=s.to>e.to?o.sliceDoc(e.to,s.to):"";r=o.replaceSelection(t.state.toText(n+e.insert.sliceString(0,void 0,t.state.lineBreak)+i))}else{let a=o.changes(e),l=n&&n.main.to<=a.newLength?n.main:void 0;if(o.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=s.to&&e.to>=s.to-10){let c,u=t.state.sliceDoc(e.from,e.to),h=n&&Ie(t,n.main.head);if(h){let t=e.insert.length-(e.to-e.from);c={from:h.from,to:h.to-t}}else c=t.state.doc.lineAt(s.head);let f=s.to-e.to,d=s.to-s.from;r=o.changeByRange((n=>{if(n.from==s.from&&n.to==s.to)return{changes:a,range:l||n.map(a)};let r=n.to-f,h=r-u.length;if(n.to-n.from!=d||t.state.sliceDoc(h,r)!=u||n.to>=c.from&&n.from<=c.to)return{range:n};let p=o.changes({from:h,to:r,insert:e.insert}),g=n.to-s.to;return{changes:p,range:l?i.OF.range(Math.max(0,l.anchor+g),Math.max(0,l.head+g)):n.map(p)}}))}else r={changes:a,selection:l&&o.selection.replaceRange(l)}}let a="input.type";(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,a+=".compose",t.inputState.compositionFirstChange&&(a+=".start",t.inputState.compositionFirstChange=!1));return o.update(r,{userEvent:a,scrollIntoView:!0})}(t,e,n));return t.state.facet(Jt).some((n=>n(t,e.from,e.to,a,l)))||t.dispatch(l()),!0}class Ve{setSelectionOrigin(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}constructor(t){this.view=t,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=t.hasFocus,X.safari&&t.contentDOM.addEventListener("input",(()=>null)),X.gecko&&function(t){xn.has(t)||(xn.add(t),t.addEventListener("copy",(()=>{})),t.addEventListener("cut",(()=>{})))}(t.contentDOM.ownerDocument)}handleEvent(t){(function(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n,i=e.target;i!=t.contentDOM;i=i.parentNode)if(!i||11==i.nodeType||(n=L.get(i))&&n.ignoreEvent(e))return!1;return!0})(this.view,t)&&!this.ignoreDuringComposition(t)&&("keydown"==t.type&&this.keydown(t)||this.runHandlers(t.type,t))}runHandlers(t,e){let n=this.handlers[t];if(n){for(let t of n.observers)t(this.view,e);for(let t of n.handlers){if(e.defaultPrevented)break;if(t(this.view,e)){e.preventDefault();break}}}}ensureHandlers(t){let e=Ye(t),n=this.handlers,i=this.view.contentDOM;for(let r in e)if("scroll"!=r){let t=!e[r].handlers.length,o=n[r];o&&t!=!o.handlers.length&&(i.removeEventListener(r,this.handleEvent),o=null),o||i.addEventListener(r,this.handleEvent,{passive:t})}for(let r in n)"scroll"==r||e[r]||i.removeEventListener(r,this.handleEvent);this.handlers=e}keydown(t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),9==t.keyCode&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&27!=t.keyCode&&Xe.indexOf(t.keyCode)<0&&(this.tabFocusMode=-1),X.android&&X.chrome&&!t.synthetic&&(13==t.keyCode||8==t.keyCode))return this.view.observer.delayAndroidKey(t.key,t.keyCode),!0;let e;return!X.ios||t.synthetic||t.altKey||t.metaKey||!((e=Je.find((e=>e.keyCode==t.keyCode)))&&!t.ctrlKey||Qe.indexOf(t.key)>-1&&t.ctrlKey&&!t.shiftKey)?(229!=t.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=e||t,setTimeout((()=>this.flushIOSKey()),250),!0)}flushIOSKey(t){let e=this.pendingIOSKey;return!!e&&(!("Enter"==e.key&&t&&t.from<t.to&&/^\S+$/.test(t.insert.toString()))&&(this.pendingIOSKey=void 0,C(this.view.contentDOM,e.key,e.keyCode,e instanceof KeyboardEvent?e:void 0)))}ignoreDuringComposition(t){return!!/^key/.test(t.type)&&(this.composing>0||!!(X.safari&&!X.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(t){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=t}update(t){this.view.observer.update(t),this.mouseSelection&&this.mouseSelection.update(t),this.draggedContent&&t.docChanged&&(this.draggedContent=this.draggedContent.map(t.changes)),t.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function qe(t,e){return(n,i)=>{try{return e.call(t,i,n)}catch(r){oe(n.state,r)}}}function Ye(t){let e=Object.create(null);function n(t){return e[t]||(e[t]={observers:[],handlers:[]})}for(let i of t){let t=i.spec;if(t&&t.domEventHandlers)for(let e in t.domEventHandlers){let r=t.domEventHandlers[e];r&&n(e).handlers.push(qe(i.value,r))}if(t&&t.domEventObservers)for(let e in t.domEventObservers){let r=t.domEventObservers[e];r&&n(e).observers.push(qe(i.value,r))}}for(let i in tn)n(i).handlers.push(tn[i]);for(let i in en)n(i).observers.push(en[i]);return e}const Je=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Qe="dthko",Xe=[16,17,18,20,91,92,224,225];function $e(t){return.7*Math.max(0,t)+8}class Ke{constructor(t,e,n,r){this.view=t,this.startEvent=e,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=e,this.scrollParents=function(t){let e,n,i=t.ownerDocument;for(let r=t.parentNode;r&&!(r==i.body||e&&n);)if(1==r.nodeType)!n&&r.scrollHeight>r.clientHeight&&(n=r),!e&&r.scrollWidth>r.clientWidth&&(e=r),r=r.assignedSlot||r.parentNode;else{if(11!=r.nodeType)break;r=r.host}return{x:e,y:n}}(t.contentDOM),this.atoms=t.state.facet(ge).map((e=>e(t)));let o=t.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=e.shiftKey,this.multiple=t.state.facet(i.$t.allowMultipleSelections)&&function(t,e){let n=t.state.facet(Gt);return n.length?n[0](e):X.mac?e.metaKey:e.ctrlKey}(t,e),this.dragging=!(!function(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let i=h(t.root);if(!i||0==i.rangeCount)return!0;let r=i.getRangeAt(0).getClientRects();for(let o=0;o<r.length;o++){let t=r[o];if(t.left<=e.clientX&&t.right>=e.clientX&&t.top<=e.clientY&&t.bottom>=e.clientY)return!0}return!1}(t,e)||1!=pn(e))&&null}start(t){!1===this.dragging&&this.select(t)}move(t){if(0==t.buttons)return this.destroy();if(this.dragging||null==this.dragging&&(e=this.startEvent,n=t,Math.max(Math.abs(e.clientX-n.clientX),Math.abs(e.clientY-n.clientY))<10))return;var e,n;this.select(this.lastEvent=t);let i=0,r=0,o=0,s=0,a=this.view.win.innerWidth,l=this.view.win.innerHeight;this.scrollParents.x&&({left:o,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:l}=this.scrollParents.y.getBoundingClientRect());let c=ye(this.view);t.clientX-c.left<=o+6?i=-$e(o-t.clientX):t.clientX+c.right>=a-6&&(i=$e(t.clientX-a)),t.clientY-c.top<=s+6?r=-$e(s-t.clientY):t.clientY+c.bottom>=l-6&&(r=$e(t.clientY-l)),this.setScrollSpeed(i,r)}up(t){null==this.dragging&&this.select(this.lastEvent),this.dragging||t.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move),t.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(t,e){this.scrollSpeed={x:t,y:e},t||e?this.scrolling<0&&(this.scrolling=setInterval((()=>this.scroll()),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:t,y:e}=this.scrollSpeed;t&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=t,t=0),e&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=e,e=0),(t||e)&&this.view.win.scrollBy(t,e),!1===this.dragging&&this.select(this.lastEvent)}skipAtoms(t){let e=null;for(let n=0;n<t.ranges.length;n++){let r=t.ranges[n],o=null;if(r.empty){let t=Re(this.atoms,r.from,0);t!=r.from&&(o=i.OF.cursor(t,-1))}else{let t=Re(this.atoms,r.from,-1),e=Re(this.atoms,r.to,1);t==r.from&&e==r.to||(o=i.OF.range(r.from==r.anchor?t:e,r.from==r.head?t:e))}o&&(e||(e=t.ranges.slice()),e[n]=o)}return e?i.OF.create(e,t.mainIndex):t}select(t){let{view:e}=this,n=this.skipAtoms(this.style.get(t,this.extend,this.multiple));!this.mustSelect&&n.eq(e.state.selection,!1===this.dragging)||this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}update(t){t.transactions.some((t=>t.isUserEvent("input.type")))?this.destroy():this.style.update(t)&&setTimeout((()=>this.select(this.lastEvent)),20)}}const tn=Object.create(null),en=Object.create(null),nn=X.ie&&X.ie_version<15||X.ios&&X.webkit_version<604;function rn(t,e,n){for(let i of t.facet(e))n=i(n,t);return n}function on(t,e){e=rn(t.state,Xt,e);let n,{state:r}=t,o=1,s=r.toText(e),a=s.lines==r.selection.ranges.length;if(null!=mn&&r.selection.ranges.every((t=>t.empty))&&mn==s.toString()){let t=-1;n=r.changeByRange((n=>{let l=r.doc.lineAt(n.from);if(l.from==t)return{range:n};t=l.from;let c=r.toText((a?s.line(o++).text:e)+r.lineBreak);return{changes:{from:l.from,insert:c},range:i.OF.cursor(n.from+c.length)}}))}else n=a?r.changeByRange((t=>{let e=s.line(o++);return{changes:{from:t.from,to:t.to,insert:e.text},range:i.OF.cursor(t.from+e.length)}})):r.replaceSelection(s);t.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}function sn(t,e,n,r){if(1==r)return i.OF.cursor(e,n);if(2==r)return function(t,e,n=1){let r=t.charCategorizer(e),o=t.doc.lineAt(e),s=e-o.from;if(0==o.length)return i.OF.cursor(e);0==s?n=1:s==o.length&&(n=-1);let a=s,l=s;n<0?a=(0,i.zK)(o.text,s,!1):l=(0,i.zK)(o.text,s);let c=r(o.text.slice(a,l));for(;a>0;){let t=(0,i.zK)(o.text,a,!1);if(r(o.text.slice(t,a))!=c)break;a=t}for(;l<o.length;){let t=(0,i.zK)(o.text,l);if(r(o.text.slice(l,t))!=c)break;l=t}return i.OF.range(a+o.from,l+o.from)}(t.state,e,n);{let n=vt.find(t.docView,e),r=t.state.doc.lineAt(n?n.posAtEnd:e),o=n?n.posAtStart:r.from,s=n?n.posAtEnd:r.to;return s<t.state.doc.length&&s==r.to&&s++,i.OF.range(o,s)}}en.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft},tn.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),27==e.keyCode&&0!=t.inputState.tabFocusMode&&(t.inputState.tabFocusMode=Date.now()+2e3),!1),en.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")},en.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")},tn.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let i of t.state.facet(Vt))if(n=i(t,e),n)break;if(n||0!=e.button||(n=function(t,e){let n=cn(t,e),r=pn(e),o=t.state.selection;return{update(t){t.docChanged&&(n.pos=t.changes.mapPos(n.pos),o=o.map(t.changes))},get(e,s,a){let l,c=cn(t,e),u=sn(t,c.pos,c.bias,r);if(n.pos!=c.pos&&!s){let e=sn(t,n.pos,n.bias,r),o=Math.min(e.from,u.from),s=Math.max(e.to,u.to);u=o<u.from?i.OF.range(o,s):i.OF.range(s,o)}return s?o.replaceRange(o.main.extend(u.from,u.to)):a&&1==r&&o.ranges.length>1&&(l=function(t,e){for(let n=0;n<t.ranges.length;n++){let{from:r,to:o}=t.ranges[n];if(r<=e&&o>=e)return i.OF.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}(o,c.pos))?l:a?o.addRange(u):i.OF.create([u])}}}(t,e)),n){let i=!t.hasFocus;t.inputState.startMouseSelection(new Ke(t,e,n,i)),i&&t.observer.ignore((()=>{E(t.contentDOM);let e=t.root.activeElement;e&&!e.contains(t.contentDOM)&&e.blur()}));let r=t.inputState.mouseSelection;if(r)return r.start(e),!1===r.dragging}return!1};let an=(t,e,n)=>e>=n.top&&e<=n.bottom&&t>=n.left&&t<=n.right;function ln(t,e,n,i){let r=vt.find(t.docView,e);if(!r)return 1;let o=e-r.posAtStart;if(0==o)return 1;if(o==r.length)return-1;let s=r.coordsAt(o,-1);if(s&&an(n,i,s))return-1;let a=r.coordsAt(o,1);return a&&an(n,i,a)?1:s&&s.bottom>=i?-1:1}function cn(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:ln(t,n,e.clientX,e.clientY)}}const un=X.ie&&X.ie_version<=11;let hn=null,fn=0,dn=0;function pn(t){if(!un)return t.detail;let e=hn,n=dn;return hn=t,dn=Date.now(),fn=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(fn+1)%3:1}function gn(t,e,n,i){if(!(n=rn(t.state,Xt,n)))return;let r=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:o}=t.inputState,s=i&&o&&function(t,e){let n=t.state.facet(Zt);return n.length?n[0](e):X.mac?!e.altKey:!e.ctrlKey}(t,e)?{from:o.from,to:o.to}:null,a={from:r,insert:n},l=t.state.changes(s?[s,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(r,-1),head:l.mapPos(r,1)},userEvent:s?"move.drop":"input.drop"}),t.inputState.draggedContent=null}tn.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let r=t.docView.nearest(e.target);if(r&&r.isWidget){let t=r.posAtStart,e=t+r.length;(t>=n.to||e<=n.from)&&(n=i.OF.range(t,e))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",rn(t.state,$t,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1},tn.dragend=t=>(t.inputState.draggedContent=null,!1),tn.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let i=Array(n.length),r=0,o=()=>{++r==n.length&&gn(t,e,i.filter((t=>null!=t)).join(t.state.lineBreak),!1)};for(let t=0;t<n.length;t++){let e=new FileReader;e.onerror=o,e.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(e.result)||(i[t]=e.result),o()},e.readAsText(n[t])}return!0}{let n=e.dataTransfer.getData("Text");if(n)return gn(t,e,n,!0),!0}return!1},tn.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=nn?null:e.clipboardData;return n?(on(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(function(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout((()=>{t.focus(),n.remove(),on(t,n.value)}),50)}(t),!1)};let mn=null;tn.copy=tn.cut=(t,e)=>{let{text:n,ranges:i,linewise:r}=function(t){let e=[],n=[],i=!1;for(let r of t.selection.ranges)r.empty||(e.push(t.sliceDoc(r.from,r.to)),n.push(r));if(!e.length){let r=-1;for(let{from:i}of t.selection.ranges){let o=t.doc.lineAt(i);o.number>r&&(e.push(o.text),n.push({from:o.from,to:Math.min(t.doc.length,o.to+1)})),r=o.number}i=!0}return{text:rn(t,$t,e.join(t.lineBreak)),ranges:n,linewise:i}}(t.state);if(!n&&!r)return!1;mn=r?n:null,"cut"!=e.type||t.state.readOnly||t.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let o=nn?null:e.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(function(t,e){let n=t.dom.parentNode;if(!n)return;let i=n.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout((()=>{i.remove(),t.focus()}),50)}(t,n),!1)};const bn=i.YH.define();function vn(t,e){let n=[];for(let i of t.facet(Qt)){let r=i(t,e);r&&n.push(r)}return n?t.update({effects:n,annotations:bn.of(!0)}):null}function yn(t){setTimeout((()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=vn(t.state,e);n?t.dispatch(n):t.update([])}}),10)}en.focus=t=>{t.inputState.lastFocusTime=Date.now(),t.scrollDOM.scrollTop||!t.inputState.lastScrollTop&&!t.inputState.lastScrollLeft||(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),yn(t)},en.blur=t=>{t.observer.clearSelectionRange(),yn(t)},en.compositionstart=en.compositionupdate=t=>{t.observer.editContext||(null==t.inputState.compositionFirstChange&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))},en.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,X.chrome&&X.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then((()=>t.observer.flush())):setTimeout((()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])}),50))},en.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()},tn.beforeinput=(t,e)=>{var n,i;if("insertReplacementText"==e.inputType&&t.observer.editContext){let i=null===(n=e.dataTransfer)||void 0===n?void 0:n.getData("text/plain"),r=e.getTargetRanges();if(i&&r.length){let e=r[0],n=t.posAtDOM(e.startContainer,e.startOffset),o=t.posAtDOM(e.endContainer,e.endOffset);return Ze(t,{from:n,to:o,insert:t.state.toText(i)},null),!0}}let r;if(X.chrome&&X.android&&(r=Je.find((t=>t.inputType==e.inputType)))&&(t.observer.delayAndroidKey(r.key,r.keyCode),"Backspace"==r.key||"Delete"==r.key)){let e=(null===(i=window.visualViewport)||void 0===i?void 0:i.height)||0;setTimeout((()=>{var n;((null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0)>e+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())}),100)}return X.ios&&"deleteContentForward"==e.inputType&&t.observer.flushSoon(),X.safari&&"insertText"==e.inputType&&t.inputState.composing>=0&&setTimeout((()=>en.compositionend(t,e)),20),!1};const xn=new Set;const wn=["pre-wrap","normal","pre-line","break-spaces"];let Sn=!1;function On(){Sn=!1}class In{constructor(t){this.lineWrapping=t,this.doc=i.EY.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(t,e){let n=this.doc.lineAt(e).number-this.doc.lineAt(t).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((e-t-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(t){if(!this.lineWrapping)return this.lineHeight;return(1+Math.max(0,Math.ceil((t-this.lineLength)/(this.lineLength-5))))*this.lineHeight}setDoc(t){return this.doc=t,this}mustRefreshForWrapping(t){return wn.indexOf(t)>-1!=this.lineWrapping}mustRefreshForHeights(t){let e=!1;for(let n=0;n<t.length;n++){let i=t[n];i<0?n++:this.heightSamples[Math.floor(10*i)]||(e=!0,this.heightSamples[Math.floor(10*i)]=!0)}return e}refresh(t,e,n,i,r,o){let s=wn.indexOf(t)>-1,a=Math.round(e)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=e,this.charWidth=n,this.textHeight=i,this.lineLength=r,a){this.heightSamples={};for(let t=0;t<o.length;t++){let e=o[t];e<0?t++:this.heightSamples[Math.floor(10*e)]=!0}}return a}}class kn{constructor(t,e){this.from=t,this.heights=e,this.index=0}get more(){return this.index<this.heights.length}}class En{constructor(t,e,n,i,r){this.from=t,this.length=e,this.top=n,this.height=i,this._content=r}get type(){return"number"==typeof this._content?ht.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof gt?this._content.widget:null}get widgetLineBreaks(){return"number"==typeof this._content?this._content:0}join(t){let e=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new En(this.from,this.length+t.length,this.top,this.height+t.height,e)}}var Mn=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(Mn||(Mn={}));const Cn=.001;class An{constructor(t,e,n=2){this.length=t,this.height=e,this.flags=n}get outdated(){return(2&this.flags)>0}set outdated(t){this.flags=(t?2:0)|-3&this.flags}setHeight(t){this.height!=t&&(Math.abs(this.height-t)>Cn&&(Sn=!0),this.height=t)}replace(t,e,n){return An.of(n)}decomposeLeft(t,e){e.push(this)}decomposeRight(t,e){e.push(this)}applyChanges(t,e,n,i){let r=this,o=n.doc;for(let s=i.length-1;s>=0;s--){let{fromA:a,toA:l,fromB:c,toB:u}=i[s],h=r.lineAt(a,Mn.ByPosNoHeight,n.setDoc(e),0,0),f=h.to>=l?h:r.lineAt(l,Mn.ByPosNoHeight,n,0,0);for(u+=f.to-l,l=f.to;s>0&&h.from<=i[s-1].toA;)a=i[s-1].fromA,c=i[s-1].fromB,s--,a<h.from&&(h=r.lineAt(a,Mn.ByPosNoHeight,n,0,0));c+=h.from-a,a=h.from;let d=Dn.build(n.setDoc(o),t,c,u);r=jn(r,r.replace(a,l,d))}return r.updateHeight(n,0)}static empty(){return new Tn(0,0)}static of(t){if(1==t.length)return t[0];let e=0,n=t.length,i=0,r=0;for(;;)if(e==n)if(i>2*r){let r=t[e-1];r.break?t.splice(--e,1,r.left,null,r.right):t.splice(--e,1,r.left,r.right),n+=1+r.break,i-=r.size}else{if(!(r>2*i))break;{let e=t[n];e.break?t.splice(n,1,e.left,null,e.right):t.splice(n,1,e.left,e.right),n+=2+e.break,r-=e.size}}else if(i<r){let n=t[e++];n&&(i+=n.size)}else{let e=t[--n];e&&(r+=e.size)}let o=0;return null==t[e-1]?(o=1,e--):null==t[e]&&(o=1,n++),new _n(An.of(t.slice(0,e)),o,An.of(t.slice(n)))}}function jn(t,e){return t==e?t:(t.constructor!=e.constructor&&(Sn=!0),e)}An.prototype.size=1;class Pn extends An{constructor(t,e,n){super(t,e),this.deco=n}blockAt(t,e,n,i){return new En(i,this.length,n,this.height,this.deco||0)}lineAt(t,e,n,i,r){return this.blockAt(0,n,i,r)}forEachLine(t,e,n,i,r,o){t<=r+this.length&&e>=r&&o(this.blockAt(0,n,i,r))}updateHeight(t,e=0,n=!1,i){return i&&i.from<=e&&i.more&&this.setHeight(i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Tn extends Pn{constructor(t,e){super(t,e,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(t,e,n,i){return new En(i,this.length,n,this.height,this.breaks)}replace(t,e,n){let i=n[0];return 1==n.length&&(i instanceof Tn||i instanceof Nn&&4&i.flags)&&Math.abs(this.length-i.length)<10?(i instanceof Nn?i=new Tn(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):An.of(n)}updateHeight(t,e=0,n=!1,i){return i&&i.from<=e&&i.more?this.setHeight(i.heights[i.index++]):(n||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,t.heightForLine(this.length-this.collapsed))+this.breaks*t.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Nn extends An{constructor(t){super(t,0)}heightMetrics(t,e){let n,i=t.doc.lineAt(e).number,r=t.doc.lineAt(e+this.length).number,o=r-i+1,s=0;if(t.lineWrapping){let e=Math.min(this.height,t.lineHeight*o);n=e/o,this.length>o+1&&(s=(this.height-e)/(this.length-o-1))}else n=this.height/o;return{firstLine:i,lastLine:r,perLine:n,perChar:s}}blockAt(t,e,n,i){let{firstLine:r,lastLine:o,perLine:s,perChar:a}=this.heightMetrics(e,i);if(e.lineWrapping){let r=i+(t<e.lineHeight?0:Math.round(Math.max(0,Math.min(1,(t-n)/this.height))*this.length)),o=e.doc.lineAt(r),l=s+o.length*a,c=Math.max(n,t-l/2);return new En(o.from,o.length,c,l,0)}{let i=Math.max(0,Math.min(o-r,Math.floor((t-n)/s))),{from:a,length:l}=e.doc.line(r+i);return new En(a,l,n+s*i,s,0)}}lineAt(t,e,n,i,r){if(e==Mn.ByHeight)return this.blockAt(t,n,i,r);if(e==Mn.ByPosNoHeight){let{from:e,to:i}=n.doc.lineAt(t);return new En(e,i-e,0,0,0)}let{firstLine:o,perLine:s,perChar:a}=this.heightMetrics(n,r),l=n.doc.lineAt(t),c=s+l.length*a,u=l.number-o,h=i+s*u+a*(l.from-r-u);return new En(l.from,l.length,Math.max(i,Math.min(h,i+this.height-c)),c,0)}forEachLine(t,e,n,i,r,o){t=Math.max(t,r),e=Math.min(e,r+this.length);let{firstLine:s,perLine:a,perChar:l}=this.heightMetrics(n,r);for(let c=t,u=i;c<=e;){let e=n.doc.lineAt(c);if(c==t){let n=e.number-s;u+=a*n+l*(t-r-n)}let i=a+l*e.length;o(new En(e.from,e.length,u,i,0)),u+=i,c=e.to+1}}replace(t,e,n){let i=this.length-e;if(i>0){let t=n[n.length-1];t instanceof Nn?n[n.length-1]=new Nn(t.length+i):n.push(null,new Nn(i-1))}if(t>0){let e=n[0];e instanceof Nn?n[0]=new Nn(t+e.length):n.unshift(new Nn(t-1),null)}return An.of(n)}decomposeLeft(t,e){e.push(new Nn(t-1),null)}decomposeRight(t,e){e.push(null,new Nn(this.length-t-1))}updateHeight(t,e=0,n=!1,i){let r=e+this.length;if(i&&i.from<=e+this.length&&i.more){let n=[],o=Math.max(e,i.from),s=-1;for(i.from>e&&n.push(new Nn(i.from-e-1).updateHeight(t,e));o<=r&&i.more;){let e=t.doc.lineAt(o).length;n.length&&n.push(null);let r=i.heights[i.index++];-1==s?s=r:Math.abs(r-s)>=Cn&&(s=-2);let a=new Tn(e,r);a.outdated=!1,n.push(a),o+=e+1}o<=r&&n.push(null,new Nn(r-o).updateHeight(t,o));let a=An.of(n);return(s<0||Math.abs(a.height-this.height)>=Cn||Math.abs(s-this.heightMetrics(t,e).perLine)>=Cn)&&(Sn=!0),jn(this,a)}return(n||this.outdated)&&(this.setHeight(t.heightForGap(e,e+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class _n extends An{constructor(t,e,n){super(t.length+e+n.length,t.height+n.height,e|(t.outdated||n.outdated?2:0)),this.left=t,this.right=n,this.size=t.size+n.size}get break(){return 1&this.flags}blockAt(t,e,n,i){let r=n+this.left.height;return t<r?this.left.blockAt(t,e,n,i):this.right.blockAt(t,e,r,i+this.left.length+this.break)}lineAt(t,e,n,i,r){let o=i+this.left.height,s=r+this.left.length+this.break,a=e==Mn.ByHeight?t<o:t<s,l=a?this.left.lineAt(t,e,n,i,r):this.right.lineAt(t,e,n,o,s);if(this.break||(a?l.to<s:l.from>s))return l;let c=e==Mn.ByPosNoHeight?Mn.ByPosNoHeight:Mn.ByPos;return a?l.join(this.right.lineAt(s,c,n,o,s)):this.left.lineAt(s,c,n,i,r).join(l)}forEachLine(t,e,n,i,r,o){let s=i+this.left.height,a=r+this.left.length+this.break;if(this.break)t<a&&this.left.forEachLine(t,e,n,i,r,o),e>=a&&this.right.forEachLine(t,e,n,s,a,o);else{let l=this.lineAt(a,Mn.ByPos,n,i,r);t<l.from&&this.left.forEachLine(t,l.from-1,n,i,r,o),l.to>=t&&l.from<=e&&o(l),e>l.to&&this.right.forEachLine(l.to+1,e,n,s,a,o)}}replace(t,e,n){let i=this.left.length+this.break;if(e<i)return this.balanced(this.left.replace(t,e,n),this.right);if(t>this.left.length)return this.balanced(this.left,this.right.replace(t-i,e-i,n));let r=[];t>0&&this.decomposeLeft(t,r);let o=r.length;for(let s of n)r.push(s);if(t>0&&Ln(r,o-1),e<this.length){let t=r.length;this.decomposeRight(e,r),Ln(r,t)}return An.of(r)}decomposeLeft(t,e){let n=this.left.length;if(t<=n)return this.left.decomposeLeft(t,e);e.push(this.left),this.break&&(n++,t>=n&&e.push(null)),t>n&&this.right.decomposeLeft(t-n,e)}decomposeRight(t,e){let n=this.left.length,i=n+this.break;if(t>=i)return this.right.decomposeRight(t-i,e);t<n&&this.left.decomposeRight(t,e),this.break&&t<i&&e.push(null),e.push(this.right)}balanced(t,e){return t.size>2*e.size||e.size>2*t.size?An.of(this.break?[t,null,e]:[t,e]):(this.left=jn(this.left,t),this.right=jn(this.right,e),this.setHeight(t.height+e.height),this.outdated=t.outdated||e.outdated,this.size=t.size+e.size,this.length=t.length+this.break+e.length,this)}updateHeight(t,e=0,n=!1,i){let{left:r,right:o}=this,s=e+r.length+this.break,a=null;return i&&i.from<=e+r.length&&i.more?a=r=r.updateHeight(t,e,n,i):r.updateHeight(t,e,n),i&&i.from<=s+o.length&&i.more?a=o=o.updateHeight(t,s,n,i):o.updateHeight(t,s,n),a?this.balanced(r,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Ln(t,e){let n,i;null==t[e]&&(n=t[e-1])instanceof Nn&&(i=t[e+1])instanceof Nn&&t.splice(e-1,3,new Nn(n.length+1+i.length))}class Dn{constructor(t,e){this.pos=t,this.oracle=e,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,e){if(this.lineStart>-1){let t=Math.min(e,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof Tn?n.length+=t-this.pos:(t>this.pos||!this.isCovered)&&this.nodes.push(new Tn(t-this.pos,-1)),this.writtenTo=t,e>t&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}point(t,e,n){if(t<e||n.heightRelevant){let i=n.widget?n.widget.estimatedHeight:0,r=n.widget?n.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let o=e-t;n.block?this.addBlock(new Pn(o,i,n)):(o||r||i>=5)&&this.addLineDeco(i,r,o)}else e>t&&this.span(t,e);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:t,to:e}=this.oracle.doc.lineAt(this.pos);this.lineStart=t,this.lineEnd=e,this.writtenTo<t&&((this.writtenTo<t-1||null==this.nodes[this.nodes.length-1])&&this.nodes.push(this.blankContent(this.writtenTo,t-1)),this.nodes.push(null)),this.pos>t&&this.nodes.push(new Tn(this.pos-t,-1)),this.writtenTo=this.pos}blankContent(t,e){let n=new Nn(e-t);return this.oracle.doc.lineAt(t).to==e&&(n.flags|=4),n}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof Tn)return t;let e=new Tn(0,-1);return this.nodes.push(e),e}addBlock(t){this.enterLine();let e=t.deco;e&&e.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,e&&e.endSide>0&&(this.covering=t)}addLineDeco(t,e,n){let i=this.ensureLine();i.length+=n,i.collapsed+=n,i.widgetHeight=Math.max(i.widgetHeight,t),i.breaks+=e,this.writtenTo=this.pos=this.pos+n}finish(t){let e=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||e instanceof Tn||this.isCovered?(this.writtenTo<this.pos||null==e)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new Tn(0,-1));let n=t;for(let i of this.nodes)i instanceof Tn&&i.updateHeight(this.oracle,n),n+=i?i.length:1;return this.nodes}static build(t,e,n,r){let o=new Dn(n,t);return i.om.spans(e,n,r,o,0),o.finish(n)}}class Rn{constructor(){this.changes=[]}compareRange(){}comparePoint(t,e,n,i){(t<e||n&&n.heightRelevant||i&&i.heightRelevant)&&bt(t,e,this.changes,5)}}function Bn(t,e){let n=t.getBoundingClientRect(),i=t.ownerDocument,r=i.defaultView||window,o=Math.max(0,n.left),s=Math.min(r.innerWidth,n.right),a=Math.max(0,n.top),l=Math.min(r.innerHeight,n.bottom);for(let c=t.parentNode;c&&c!=i.body;)if(1==c.nodeType){let e=c,n=window.getComputedStyle(e);if((e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth)&&"visible"!=n.overflow){let n=e.getBoundingClientRect();o=Math.max(o,n.left),s=Math.min(s,n.right),a=Math.max(a,n.top),l=Math.min(c==t.parentNode?r.innerHeight:l,n.bottom)}c="absolute"==n.position||"fixed"==n.position?e.offsetParent:e.parentNode}else{if(11!=c.nodeType)break;c=c.host}return{left:o-n.left,right:Math.max(o,s)-n.left,top:a-(n.top+e),bottom:Math.max(a,l)-(n.top+e)}}function Hn(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class zn{constructor(t,e,n,i){this.from=t,this.to=e,this.size=n,this.displaySize=i}static same(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let i=t[n],r=e[n];if(i.from!=r.from||i.to!=r.to||i.size!=r.size)return!1}return!0}draw(t,e){return ft.replace({widget:new Wn(this.displaySize*(e?t.scaleY:t.scaleX),e)}).range(this.from,this.to)}}class Wn extends ut{constructor(t,e){super(),this.size=t,this.vertical=e}eq(t){return t.size==this.size&&t.vertical==this.vertical}toDOM(){let t=document.createElement("div");return this.vertical?t.style.height=this.size+"px":(t.style.width=this.size+"px",t.style.height="2px",t.style.display="inline-block"),t}get estimatedHeight(){return this.vertical?this.size:-1}}class Un{constructor(t){this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=Vn,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=It.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let e=t.facet(fe).some((t=>"function"!=typeof t&&"cm-lineWrapping"==t.class));this.heightOracle=new In(e),this.stateDeco=t.facet(de).filter((t=>"function"!=typeof t)),this.heightMap=An.empty().applyChanges(this.stateDeco,i.EY.empty,this.heightOracle.setDoc(t.doc),[new we(0,0,0,t.doc.length)]);for(let n=0;n<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());n++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=ft.set(this.lineGaps.map((t=>t.draw(this,!1)))),this.computeVisibleRanges()}updateForViewport(){let t=[this.viewport],{main:e}=this.state.selection;for(let n=0;n<=1;n++){let i=n?e.head:e.anchor;if(!t.some((({from:t,to:e})=>i>=t&&i<=e))){let{from:e,to:n}=this.lineBlockAt(i);t.push(new Fn(e,n))}}return this.viewports=t.sort(((t,e)=>t.from-e.from)),this.updateScaler()}updateScaler(){let t=this.scaler;return this.scaler=this.heightMap.height<=7e6?Vn:new qn(this.heightOracle,this.heightMap,this.viewports),t.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,(t=>{this.viewportLines.push(Yn(t,this.scaler))}))}update(t,e=null){this.state=t.state;let n=this.stateDeco;this.stateDeco=this.state.facet(de).filter((t=>"function"!=typeof t));let r=t.changedRanges,o=we.extendWithRanges(r,function(t,e,n){let r=new Rn;return i.om.compare(t,e,n,r,0),r.changes}(n,this.stateDeco,t?t.changes:i.VR.empty(this.state.doc.length))),s=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);On(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,t.startState.doc,this.heightOracle.setDoc(this.state.doc),o),(this.heightMap.height!=s||Sn)&&(t.flags|=2),a?(this.scrollAnchorPos=t.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let l=o.length?this.mapViewport(this.viewport,t.changes):this.viewport;(e&&(e.range.head<l.from||e.range.head>l.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,e));let c=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,t.flags|=this.updateForViewport(),(c||!t.changes.empty||2&t.flags)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes))),t.flags|=this.computeVisibleRanges(t.changes),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&t.selectionSet&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&!t.state.facet(te)&&(this.mustEnforceCursorAssoc=!0)}measure(t){let e=t.contentDOM,n=window.getComputedStyle(e),r=this.heightOracle,o=n.whiteSpace;this.defaultTextDirection="rtl"==n.direction?It.RTL:It.LTR;let s=this.heightOracle.mustRefreshForWrapping(o),a=e.getBoundingClientRect(),l=s||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let c=0,u=0;if(a.width&&a.height){let{scaleX:t,scaleY:n}=S(e,a);(t>.005&&Math.abs(this.scaleX-t)>.005||n>.005&&Math.abs(this.scaleY-n)>.005)&&(this.scaleX=t,this.scaleY=n,c|=16,s=l=!0)}let h=(parseInt(n.paddingTop)||0)*this.scaleY,f=(parseInt(n.paddingBottom)||0)*this.scaleY;this.paddingTop==h&&this.paddingBottom==f||(this.paddingTop=h,this.paddingBottom=f,c|=18),this.editorWidth!=t.scrollDOM.clientWidth&&(r.lineWrapping&&(l=!0),this.editorWidth=t.scrollDOM.clientWidth,c|=16);let d=t.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=d&&(this.scrollAnchorHeight=-1,this.scrollTop=d),this.scrolledToBottom=j(t.scrollDOM);let p=(this.printing?Hn:Bn)(e,this.paddingTop),g=p.top-this.pixelViewport.top,m=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let b=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(b!=this.inView&&(this.inView=b,b&&(l=!0)),!this.inView&&!this.scrollTarget)return 0;let v=a.width;if(this.contentDOMWidth==v&&this.editorHeight==t.scrollDOM.clientHeight||(this.contentDOMWidth=a.width,this.editorHeight=t.scrollDOM.clientHeight,c|=16),l){let e=t.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(e)&&(s=!0),s||r.lineWrapping&&Math.abs(v-this.contentDOMWidth)>r.charWidth){let{lineHeight:n,charWidth:i,textHeight:a}=t.docView.measureTextSize();s=n>0&&r.refresh(o,n,i,a,v/i,e),s&&(t.docView.minWidth=0,c|=16)}g>0&&m>0?u=Math.max(g,m):g<0&&m<0&&(u=Math.min(g,m)),On();for(let n of this.viewports){let o=n.from==this.viewport.from?e:t.docView.measureVisibleLineHeights(n);this.heightMap=(s?An.empty().applyChanges(this.stateDeco,i.EY.empty,this.heightOracle,[new we(0,0,0,t.state.doc.length)]):this.heightMap).updateHeight(r,0,s,new kn(n.from,o))}Sn&&(c|=2)}let y=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return y&&(2&c&&(c|=this.updateScaler()),this.viewport=this.getViewport(u,this.scrollTarget),c|=this.updateForViewport()),(2&c||y)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]:this.lineGaps,t)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(t,e){let n=.5-Math.max(-.5,Math.min(.5,t/1e3/2)),i=this.heightMap,r=this.heightOracle,{visibleTop:o,visibleBottom:s}=this,a=new Fn(i.lineAt(o-1e3*n,Mn.ByHeight,r,0,0).from,i.lineAt(s+1e3*(1-n),Mn.ByHeight,r,0,0).to);if(e){let{head:t}=e.range;if(t<a.from||t>a.to){let n,o=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),s=i.lineAt(t,Mn.ByPos,r,0,0);n="center"==e.y?(s.top+s.bottom)/2-o/2:"start"==e.y||"nearest"==e.y&&t<a.from?s.top:s.bottom-o,a=new Fn(i.lineAt(n-500,Mn.ByHeight,r,0,0).from,i.lineAt(n+o+500,Mn.ByHeight,r,0,0).to)}}return a}mapViewport(t,e){let n=e.mapPos(t.from,-1),i=e.mapPos(t.to,1);return new Fn(this.heightMap.lineAt(n,Mn.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,Mn.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:t,to:e},n=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(t,Mn.ByPos,this.heightOracle,0,0),{bottom:r}=this.heightMap.lineAt(e,Mn.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:s}=this;return(0==t||i<=o-Math.max(10,Math.min(-n,250)))&&(e==this.state.doc.length||r>=s+Math.max(10,Math.min(n,250)))&&i>o-2e3&&r<s+2e3}mapLineGaps(t,e){if(!t.length||e.empty)return t;let n=[];for(let i of t)e.touchesRange(i.from,i.to)||n.push(new zn(e.mapPos(i.from),e.mapPos(i.to),i.size,i.displaySize));return n}ensureLineGaps(t,e){let n=this.heightOracle.lineWrapping,r=n?1e4:2e3,o=r>>1,s=r<<1;if(this.defaultTextDirection!=It.LTR&&!n)return[];let a=[],l=(r,s,c,u)=>{if(s-r<o)return;let h=this.state.selection.main,f=[h.from];h.empty||f.push(h.to);for(let t of f)if(t>r&&t<s)return l(r,t-10,c,u),void l(t+10,s,c,u);let d=function(t,e){for(let n of t)if(e(n))return n;return}(t,(t=>t.from>=c.from&&t.to<=c.to&&Math.abs(t.from-r)<o&&Math.abs(t.to-s)<o&&!f.some((e=>t.from<e&&t.to>e))));if(!d){if(s<c.to&&e&&n&&e.visibleRanges.some((t=>t.from<=s&&t.to>=s))){let t=e.moveToLineBoundary(i.OF.cursor(s),!1,!0).head;t>r&&(s=t)}let t=this.gapSize(c,r,s,u);d=new zn(r,s,t,n||t<2e6?t:2e6)}a.push(d)},c=e=>{if(e.length<s||e.type!=ht.Text)return;let o=function(t,e,n){let r=[],o=t,s=0;i.om.spans(n,t,e,{span(){},point(t,e){t>o&&(r.push({from:o,to:t}),s+=t-o),o=e}},20),o<e&&(r.push({from:o,to:e}),s+=e-o);return{total:s,ranges:r}}(e.from,e.to,this.stateDeco);if(o.total<s)return;let a,c,u=this.scrollTarget?this.scrollTarget.range.head:null;if(n){let t,n,i=r/this.heightOracle.lineLength*this.heightOracle.lineHeight;if(null!=u){let r=Zn(o,u),s=((this.visibleBottom-this.visibleTop)/2+i)/e.height;t=r-s,n=r+s}else t=(this.visibleTop-e.top-i)/e.height,n=(this.visibleBottom-e.top+i)/e.height;a=Gn(o,t),c=Gn(o,n)}else{let n=o.total*this.heightOracle.charWidth,i=r*this.heightOracle.charWidth,s=0;if(n>2e6)for(let r of t)r.from>=e.from&&r.from<e.to&&r.size!=r.displaySize&&r.from*this.heightOracle.charWidth+s<this.pixelViewport.left&&(s=r.size-r.displaySize);let l,h,f=this.pixelViewport.left+s,d=this.pixelViewport.right+s;if(null!=u){let t=Zn(o,u),e=((d-f)/2+i)/n;l=t-e,h=t+e}else l=(f-i)/n,h=(d+i)/n;a=Gn(o,l),c=Gn(o,h)}a>e.from&&l(e.from,a,e,o),c<e.to&&l(c,e.to,e,o)};for(let i of this.viewportLines)Array.isArray(i.type)?i.type.forEach(c):c(i);return a}gapSize(t,e,n,i){let r=Zn(i,n)-Zn(i,e);return this.heightOracle.lineWrapping?t.height*r:i.total*this.heightOracle.charWidth*r}updateLineGaps(t){zn.same(t,this.lineGaps)||(this.lineGaps=t,this.lineGapDeco=ft.set(t.map((t=>t.draw(this,this.heightOracle.lineWrapping)))))}computeVisibleRanges(t){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let n=[];i.om.spans(e,this.viewport.from,this.viewport.to,{span(t,e){n.push({from:t,to:e})},point(){}},20);let r=0;if(n.length!=this.visibleRanges.length)r=12;else for(let i=0;i<n.length&&!(8&r);i++){let e=this.visibleRanges[i],o=n[i];e.from==o.from&&e.to==o.to||(r|=4,t&&t.mapPos(e.from,-1)==o.from&&t.mapPos(e.to,1)==o.to||(r|=8))}return this.visibleRanges=n,r}lineBlockAt(t){return t>=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find((e=>e.from<=t&&e.to>=t))||Yn(this.heightMap.lineAt(t,Mn.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(t){return t>=this.viewportLines[0].top&&t<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find((e=>e.top<=t&&e.bottom>=t))||Yn(this.heightMap.lineAt(this.scaler.fromDOM(t),Mn.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(t){let e=this.lineBlockAtHeight(t+8);return e.from>=this.viewport.from||this.viewportLines[0].top-t>200?e:this.viewportLines[0]}elementAtHeight(t){return Yn(this.heightMap.blockAt(this.scaler.fromDOM(t),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Fn{constructor(t,e){this.from=t,this.to=e}}function Gn({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let i=Math.floor(t*n);for(let r=0;;r++){let{from:t,to:n}=e[r],o=n-t;if(i<=o)return t+i;i-=o}}function Zn(t,e){let n=0;for(let{from:i,to:r}of t.ranges){if(e<=r){n+=e-i;break}n+=r-i}return n/t.total}const Vn={toDOM:t=>t,fromDOM:t=>t,scale:1,eq(t){return t==this}};class qn{constructor(t,e,n){let i=0,r=0,o=0;this.viewports=n.map((({from:n,to:r})=>{let o=e.lineAt(n,Mn.ByPos,t,0,0).top,s=e.lineAt(r,Mn.ByPos,t,0,0).bottom;return i+=s-o,{from:n,to:r,top:o,bottom:s,domTop:0,domBottom:0}})),this.scale=(7e6-i)/(e.height-i);for(let s of this.viewports)s.domTop=o+(s.top-r)*this.scale,o=s.domBottom=s.domTop+(s.bottom-s.top),r=s.bottom}toDOM(t){for(let e=0,n=0,i=0;;e++){let r=e<this.viewports.length?this.viewports[e]:null;if(!r||t<r.top)return i+(t-n)*this.scale;if(t<=r.bottom)return r.domTop+(t-r.top);n=r.bottom,i=r.domBottom}}fromDOM(t){for(let e=0,n=0,i=0;;e++){let r=e<this.viewports.length?this.viewports[e]:null;if(!r||t<r.domTop)return n+(t-i)/this.scale;if(t<=r.domBottom)return r.top+(t-r.domTop);n=r.bottom,i=r.domBottom}}eq(t){return t instanceof qn&&(this.scale==t.scale&&this.viewports.length==t.viewports.length&&this.viewports.every(((e,n)=>e.from==t.viewports[n].from&&e.to==t.viewports[n].to)))}}function Yn(t,e){if(1==e.scale)return t;let n=e.toDOM(t.top),i=e.toDOM(t.bottom);return new En(t.from,t.length,n,i-n,Array.isArray(t._content)?t._content.map((t=>Yn(t,e))):t._content)}const Jn=i.sj.define({combine:t=>t.join(" ")}),Qn=i.sj.define({combine:t=>t.indexOf(!0)>-1}),Xn=r.G.newName(),$n=r.G.newName(),Kn=r.G.newName(),ti={"&light":"."+$n,"&dark":"."+Kn};function ei(t,e,n){return new r.G(e,{finish:e=>/&/.test(e)?e.replace(/&\w*/,(e=>{if("&"==e)return t;if(!n||!n[e])throw new RangeError(`Unsupported selector: ${e}`);return n[e]})):t+" "+e})}const ni=ei("."+Xn,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},ti),ii={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},ri=X.ie&&X.ie_version<=11;class oi{constructor(t){this.view=t,this.active=!1,this.editContext=null,this.selectionRange=new O,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=t.contentDOM,this.observer=new MutationObserver((e=>{for(let t of e)this.queue.push(t);(X.ie&&X.ie_version<=11||X.ios&&t.composing)&&e.some((t=>"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length))?this.flushSoon():this.flush()})),!window.EditContext||!1===t.constructor.EDIT_CONTEXT||X.chrome&&X.chrome_version<126||(this.editContext=new li(t),t.state.facet(se)&&(t.contentDOM.editContext=this.editContext.editContext)),ri&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver((()=>{var t;(null===(t=this.view.docView)||void 0===t?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()})),this.resizeScroll.observe(t.scrollDOM)),this.addWindowListeners(this.win=t.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver((t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))}),{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(t){this.view.inputState.runHandlers("scroll",t),this.intersecting&&this.view.measure()}onScroll(t){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(t)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout((()=>{this.resizeTimeout=-1,this.view.requestMeasure()}),50))}onPrint(t){("change"!=t.type&&t.type||t.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout((()=>{this.view.viewState.printing=!1,this.view.requestMeasure()}),500))}updateGaps(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some(((e,n)=>e!=t[n])))){this.gapIntersection.disconnect();for(let e of t)this.gapIntersection.observe(e);this.gaps=t}}onSelectionChange(t){let e=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,i=this.selectionRange;if(n.state.facet(se)?n.root.activeElement!=this.dom:!d(this.dom,i))return;let r=i.anchorNode&&n.docView.nearest(i.anchorNode);r&&r.ignoreEvent(t)?e||(this.selectionChanged=!1):(X.ie&&X.ie_version<=11||X.android&&X.chrome)&&!n.state.selection.main.empty&&i.focusNode&&g(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:t}=this,e=h(t.root);if(!e)return!1;let n=X.safari&&11==t.root.nodeType&&t.root.activeElement==this.dom&&function(t,e){if(e.getComposedRanges){let n=e.getComposedRanges(t.root)[0];if(n)return ai(t,n)}let n=null;function i(t){t.preventDefault(),t.stopImmediatePropagation(),n=t.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",i,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",i,!0),n?ai(t,n):null}(this.view,e)||e;if(!n||this.selectionRange.eq(n))return!1;let i=d(this.dom,n);return i&&!this.selectionChanged&&t.inputState.lastFocusTime>Date.now()-200&&t.inputState.lastTouchTime<Date.now()-300&&function(t,e){let n=e.focusNode,i=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=i)return!1;for(i=Math.min(i,y(n));;)if(i){if(1!=n.nodeType)return!1;let t=n.childNodes[i-1];"false"==t.contentEditable?i--:(n=t,i=y(n))}else{if(n==t)return!0;i=m(n),n=n.parentNode}}(this.dom,n)?(this.view.inputState.lastFocusTime=0,t.docView.updateSelection(),!1):(this.selectionRange.setRange(n),i&&(this.selectionChanged=!0),!0)}setSelectionRange(t,e){this.selectionRange.set(t.node,t.offset,e.node,e.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let t=0,e=null;for(let n=this.dom;n;)if(1==n.nodeType)!e&&t<this.scrollTargets.length&&this.scrollTargets[t]==n?t++:e||(e=this.scrollTargets.slice(0,t)),e&&e.push(n),n=n.assignedSlot||n.parentNode;else{if(11!=n.nodeType)break;n=n.host}if(t<this.scrollTargets.length&&!e&&(e=this.scrollTargets.slice(0,t)),e){for(let t of this.scrollTargets)t.removeEventListener("scroll",this.onScroll);for(let t of this.scrollTargets=e)t.addEventListener("scroll",this.onScroll)}}ignore(t){if(!this.active)return t();try{return this.stop(),t()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,ii),ri&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),ri&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(t,e){var n;if(!this.delayedAndroidKey){let t=()=>{let t=this.delayedAndroidKey;if(t){this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=t.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&t.force&&C(this.dom,t.key,t.keyCode)}};this.flushingAndroidKey=this.view.win.requestAnimationFrame(t)}this.delayedAndroidKey&&"Enter"!=t||(this.delayedAndroidKey={key:t,keyCode:e,force:this.lastChange<Date.now()-50||!!(null===(n=this.delayedAndroidKey)||void 0===n?void 0:n.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame((()=>{this.delayedFlush=-1,this.flush()})))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}processRecords(){let t=this.pendingRecords();t.length&&(this.queue=[]);let e=-1,n=-1,i=!1;for(let r of t){let t=this.readMutation(r);t&&(t.typeOver&&(i=!0),-1==e?({from:e,to:n}=t):(e=Math.min(t.from,e),n=Math.max(t.to,n)))}return{from:e,to:n,typeOver:i}}readChange(){let{from:t,to:e,typeOver:n}=this.processRecords(),i=this.selectionChanged&&d(this.dom,this.selectionRange);if(t<0&&!i)return null;t>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let r=new Fe(this.view,t,e,n);return this.view.docView.domChanged={newSel:r.newSel?r.newSel.main:null},r}flush(t=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;t&&this.readSelectionRange();let e=this.readChange();if(!e)return this.view.requestMeasure(),!1;let n=this.view.state,i=Ge(this.view,e);return this.view.state==n&&(e.domChanged||e.newSel&&!e.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),i}readMutation(t){let e=this.view.docView.nearest(t.target);if(!e||e.ignoreMutation(t))return null;if(e.markDirty("attributes"==t.type),"attributes"==t.type&&(e.flags|=4),"childList"==t.type){let n=si(e,t.previousSibling||t.target.previousSibling,-1),i=si(e,t.nextSibling||t.target.nextSibling,1);return{from:n?e.posAfter(n):e.posAtStart,to:i?e.posBefore(i):e.posAtEnd,typeOver:!1}}return"characterData"==t.type?{from:e.posAtStart,to:e.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}:null}setWindow(t){t!=this.win&&(this.removeWindowListeners(this.win),this.win=t,this.addWindowListeners(this.win))}addWindowListeners(t){t.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):t.addEventListener("beforeprint",this.onPrint),t.addEventListener("scroll",this.onScroll),t.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(t){t.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):t.removeEventListener("beforeprint",this.onPrint),t.document.removeEventListener("selectionchange",this.onSelectionChange)}update(t){this.editContext&&(this.editContext.update(t),t.startState.facet(se)!=t.state.facet(se)&&(t.view.contentDOM.editContext=t.state.facet(se)?this.editContext.editContext:null))}destroy(){var t,e,n;this.stop(),null===(t=this.intersection)||void 0===t||t.disconnect(),null===(e=this.gapIntersection)||void 0===e||e.disconnect(),null===(n=this.resizeScroll)||void 0===n||n.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function si(t,e,n){for(;e;){let i=L.get(e);if(i&&i.parent==t)return i;let r=e.parentNode;e=r!=t.dom?r:n>0?e.nextSibling:e.previousSibling}return null}function ai(t,e){let n=e.startContainer,i=e.startOffset,r=e.endContainer,o=e.endOffset,s=t.docView.domAtPos(t.state.selection.main.anchor);return g(s.node,s.offset,r,o)&&([n,i,r,o]=[r,o,n,i]),{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:o}}class li{constructor(t){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(t.state);let e=this.editContext=new window.EditContext({text:t.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,t.state.selection.main.anchor))),selectionEnd:this.toContextPos(t.state.selection.main.head)});this.handlers.textupdate=e=>{let{anchor:n}=t.state.selection.main,r=this.toEditorPos(e.updateRangeStart),o=this.toEditorPos(e.updateRangeEnd);t.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:e.updateRangeStart,editorBase:r,drifted:!1});let s={from:r,to:o,insert:i.EY.of(e.text.split("\n"))};if(s.from==this.from&&n<this.from?s.from=n:s.to==this.to&&n>this.to&&(s.to=n),s.from!=s.to||s.insert.length){if(this.pendingContextChange=s,!t.state.readOnly){let n=this.to-this.from+(s.to-s.from+s.insert.length);Ze(t,s,i.OF.single(this.toEditorPos(e.selectionStart,n),this.toEditorPos(e.selectionEnd,n)))}this.pendingContextChange&&(this.revertPending(t.state),this.setSelection(t.state))}},this.handlers.characterboundsupdate=n=>{let i=[],r=null;for(let e=this.toEditorPos(n.rangeStart),o=this.toEditorPos(n.rangeEnd);e<o;e++){let n=t.coordsForChar(e);r=n&&new DOMRect(n.left,n.top,n.right-n.left,n.bottom-n.top)||r||new DOMRect,i.push(r)}e.updateCharacterBounds(n.rangeStart,i)},this.handlers.textformatupdate=e=>{let n=[];for(let t of e.getTextFormats()){let e=t.underlineStyle,i=t.underlineThickness;if("None"!=e&&"None"!=i){let r=this.toEditorPos(t.rangeStart),o=this.toEditorPos(t.rangeEnd);if(r<o){let t=`text-decoration: underline ${"Dashed"==e?"dashed ":"Squiggle"==e?"wavy ":""}${"Thin"==i?1:2}px`;n.push(ft.mark({attributes:{style:t}}).range(r,o))}}}t.dispatch({effects:re.of(ft.set(n))})},this.handlers.compositionstart=()=>{t.inputState.composing<0&&(t.inputState.composing=0,t.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(t.inputState.composing=-1,t.inputState.compositionFirstChange=null,this.composing){let{drifted:e}=this.composing;this.composing=null,e&&this.reset(t.state)}};for(let n in this.handlers)e.addEventListener(n,this.handlers[n]);this.measureReq={read:t=>{this.editContext.updateControlBounds(t.contentDOM.getBoundingClientRect());let e=h(t.root);e&&e.rangeCount&&this.editContext.updateSelectionBounds(e.getRangeAt(0).getBoundingClientRect())}}}applyEdits(t){let e=0,n=!1,i=this.pendingContextChange;return t.changes.iterChanges(((r,o,s,a,l)=>{if(n)return;let c=l.length-(o-r);if(i&&o>=i.to){if(i.from==r&&i.to==o&&i.insert.eq(l))return i=this.pendingContextChange=null,e+=c,void(this.to+=c);i=null,this.revertPending(t.state)}if(r+=e,(o+=e)<=this.from)this.from+=c,this.to+=c;else if(r<this.to){if(r<this.from||o>this.to||this.to-this.from+l.length>3e4)return void(n=!0);this.editContext.updateText(this.toContextPos(r),this.toContextPos(o),l.toString()),this.to+=c}e+=c})),i&&!n&&this.revertPending(t.state),!n}update(t){let e=this.pendingContextChange;this.composing&&(this.composing.drifted||t.transactions.some((t=>!t.isUserEvent("input.type")&&t.changes.touchesRange(this.from,this.to))))?(this.composing.drifted=!0,this.composing.editorBase=t.changes.mapPos(this.composing.editorBase)):this.applyEdits(t)&&this.rangeIsValid(t.state)?(t.docChanged||t.selectionSet||e)&&this.setSelection(t.state):(this.pendingContextChange=null,this.reset(t.state)),(t.geometryChanged||t.docChanged||t.selectionSet)&&t.view.requestMeasure(this.measureReq)}resetRange(t){let{head:e}=t.selection.main;this.from=Math.max(0,e-1e4),this.to=Math.min(t.doc.length,e+1e4)}reset(t){this.resetRange(t),this.editContext.updateText(0,this.editContext.text.length,t.doc.sliceString(this.from,this.to)),this.setSelection(t)}revertPending(t){let e=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(e.from),this.toContextPos(e.from+e.insert.length),t.doc.sliceString(e.from,e.to))}setSelection(t){let{main:e}=t.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,e.anchor))),i=this.toContextPos(e.head);this.editContext.selectionStart==n&&this.editContext.selectionEnd==i||this.editContext.updateSelection(n,i)}rangeIsValid(t){let{head:e}=t.selection.main;return!(this.from>0&&e-this.from<500||this.to<t.doc.length&&this.to-e<500||this.to-this.from>3e4)}toEditorPos(t,e=this.to-this.from){t=Math.min(t,e);let n=this.composing;return n&&n.drifted?n.editorBase+(t-n.contextBase):t+this.from}toContextPos(t){let e=this.composing;return e&&e.drifted?e.contextBase+(t-e.editorBase):t-this.from}destroy(){for(let t in this.handlers)this.editContext.removeEventListener(t,this.handlers[t])}}class ci{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(t={}){var e;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),t.parent&&t.parent.appendChild(this.dom);let{dispatch:n}=t;this.dispatchTransactions=t.dispatchTransactions||n&&(t=>t.forEach((t=>n(t,this))))||(t=>this.update(t)),this.dispatch=this.dispatch.bind(this),this._root=t.root||function(t){for(;t;){if(t&&(9==t.nodeType||11==t.nodeType&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}(t.parent)||document,this.viewState=new Un(t.state||i.$t.create(t)),t.scrollTo&&t.scrollTo.is(ie)&&(this.viewState.scrollTarget=t.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(le).map((t=>new ue(t)));for(let i of this.plugins)i.update(this);this.observer=new oi(this),this.inputState=new Ve(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Oe(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),(null===(e=document.fonts)||void 0===e?void 0:e.ready)&&document.fonts.ready.then((()=>this.requestMeasure()))}dispatch(...t){let e=1==t.length&&t[0]instanceof i.ZX?t:1==t.length&&Array.isArray(t[0])?t[0]:[this.state.update(...t)];this.dispatchTransactions(e,this)}update(t){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let e,n=!1,r=!1,o=this.state;for(let i of t){if(i.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=i.state}if(this.destroyed)return void(this.viewState.state=o);let s=this.hasFocus,a=0,l=null;t.some((t=>t.annotation(bn)))?(this.inputState.notifiedFocused=s,a=1):s!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=s,l=vn(o,s),l||(a=1));let c=this.observer.delayedAndroidKey,u=null;if(c?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(u=null)):this.observer.clear(),o.facet(i.$t.phrases)!=this.state.facet(i.$t.phrases))return this.setState(o);e=Se.create(this,o,t),e.flags|=a;let h=this.viewState.scrollTarget;try{this.updateState=2;for(let e of t){if(h&&(h=h.map(e.changes)),e.scrollIntoView){let{main:t}=e.state.selection;h=new ne(t.empty?t:i.OF.cursor(t.head,t.head>t.anchor?-1:1))}for(let t of e.effects)t.is(ie)&&(h=t.value.clip(this.state))}this.viewState.update(e,h),this.bidiCache=fi.update(this.bidiCache,e.changes),e.empty||(this.updatePlugins(e),this.inputState.update(e)),n=this.docView.update(e),this.state.facet(xe)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(n,t.some((t=>t.isUserEvent("select.pointer"))))}finally{this.updateState=0}if(e.startState.facet(Jn)!=e.state.facet(Jn)&&(this.viewState.mustMeasureContent=!0),(n||r||h||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!e.empty)for(let i of this.state.facet(Yt))try{i(e)}catch(f){oe(this.state,f,"update listener")}(l||u)&&Promise.resolve().then((()=>{l&&this.state==l.startState&&this.dispatch(l),u&&!Ge(this,u)&&c.force&&C(this.contentDOM,c.key,c.keyCode)}))}setState(t){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=t);this.updateState=2;let e=this.hasFocus;try{for(let t of this.plugins)t.destroy(this);this.viewState=new Un(t),this.plugins=t.facet(le).map((t=>new ue(t))),this.pluginMap.clear();for(let t of this.plugins)t.update(this);this.docView.destroy(),this.docView=new Oe(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}e&&this.focus(),this.requestMeasure()}updatePlugins(t){let e=t.startState.facet(le),n=t.state.facet(le);if(e!=n){let i=[];for(let r of n){let n=e.indexOf(r);if(n<0)i.push(new ue(r));else{let e=this.plugins[n];e.mustUpdate=t,i.push(e)}}for(let e of this.plugins)e.mustUpdate!=t&&e.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=t;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);e!=n&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let n=e.value;if(n&&n.docViewUpdate)try{n.docViewUpdate(this)}catch(t){oe(this.state,t,"doc view update listener")}}}measure(t=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,t&&this.observer.forceFlush();let e=null,n=this.scrollDOM,i=n.scrollTop*this.scaleY,{scrollAnchorPos:r,scrollAnchorHeight:o}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let t=0;;t++){if(o<0)if(j(n))r=-1,o=this.viewState.heightMap.height;else{let t=this.viewState.scrollAnchorAt(i);r=t.from,o=t.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(t>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let l=[];4&a||([this.measureRequests,l]=[l,this.measureRequests]);let c=l.map((t=>{try{return t.read(this)}catch(e){return oe(this.state,e),hi}})),u=Se.create(this,this.state,[]),h=!1;u.flags|=a,e?e.flags|=a:e=u,this.updateState=2,u.empty||(this.updatePlugins(u),this.inputState.update(u),this.updateAttrs(),h=this.docView.update(u),h&&this.docViewUpdate());for(let t=0;t<l.length;t++)if(c[t]!=hi)try{let e=l[t];e.write&&e.write(c[t],this)}catch(s){oe(this.state,s)}if(h&&this.docView.updateSelection(!0),!u.viewportChanged&&0==this.measureRequests.length){if(this.viewState.editorHeight){if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,o=-1;continue}{let t=(r<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(r).top)-o;if(t>1||t<-1){i+=t,n.scrollTop=i/this.scaleY,o=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(e&&!e.empty)for(let a of this.state.facet(Yt))a(e)}get themeClasses(){return Xn+" "+(this.state.facet(Qn)?Kn:$n)+" "+this.state.facet(Jn)}updateAttrs(){let t=di(this,he,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),e={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(se)?"true":"false",class:"cm-content",style:`${X.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(e["aria-readonly"]="true"),di(this,fe,e);let n=this.observer.ignore((()=>{let n=lt(this.contentDOM,this.contentAttrs,e),i=lt(this.dom,this.editorAttrs,t);return n||i}));return this.editorAttrs=t,this.contentAttrs=e,n}showAnnouncements(t){let e=!0;for(let n of t)for(let t of n.effects)if(t.is(ci.announce)){e&&(this.announceDOM.textContent=""),e=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=t.value}}mountStyles(){this.styleModules=this.state.facet(xe);let t=this.state.facet(ci.cspNonce);r.G.mount(this.root,this.styleModules.concat(ni).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(t){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame((()=>this.measure()))),t){if(this.measureRequests.indexOf(t)>-1)return;if(null!=t.key)for(let e=0;e<this.measureRequests.length;e++)if(this.measureRequests[e].key===t.key)return void(this.measureRequests[e]=t);this.measureRequests.push(t)}}plugin(t){let e=this.pluginMap.get(t);return(void 0===e||e&&e.spec!=t)&&this.pluginMap.set(t,e=this.plugins.find((e=>e.spec==t))||null),e&&e.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}lineBlockAtHeight(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,e,n){return Be(this,t,De(this,t,e,n))}moveByGroup(t,e){return Be(this,t,De(this,t,e,(e=>function(t,e,n){let r=t.state.charCategorizer(e),o=r(n);return t=>{let e=r(t);return o==i.Je.Space&&(o=e),o==e}}(this,t.head,e))))}visualLineSide(t,e){let n=this.bidiSpans(t),r=this.textDirectionAt(t.from),o=n[e?n.length-1:0];return i.OF.cursor(o.side(e,r)+t.from,o.forward(!e,r)?1:-1)}moveToLineBoundary(t,e,n=!0){return function(t,e,n,r){let o=Le(t,e.head),s=r&&o.type==ht.Text&&(t.lineWrapping||o.widgetLineBreaks)?t.coordsAtPos(e.assoc<0&&e.head>o.from?e.head-1:e.head):null;if(s){let e=t.dom.getBoundingClientRect(),r=t.textDirectionAt(o.from),a=t.posAtCoords({x:n==(r==It.LTR)?e.right-1:e.left+1,y:(s.top+s.bottom)/2});if(null!=a)return i.OF.cursor(a,n?-1:1)}return i.OF.cursor(n?o.to:o.from,n?-1:1)}(this,t,e,n)}moveVertically(t,e,n){return Be(this,t,function(t,e,n,r){let o=e.head,s=n?1:-1;if(o==(n?t.state.doc.length:0))return i.OF.cursor(o,e.assoc);let a,l=e.goalColumn,c=t.contentDOM.getBoundingClientRect(),u=t.coordsAtPos(o,e.assoc||-1),h=t.documentTop;if(u)null==l&&(l=u.left-c.left),a=s<0?u.top:u.bottom;else{let e=t.viewState.lineBlockAt(o);null==l&&(l=Math.min(c.right-c.left,t.defaultCharacterWidth*(o-e.from))),a=(s<0?e.top:e.bottom)+h}let f=c.left+l,d=null!=r?r:t.viewState.heightOracle.textHeight>>1;for(let p=0;;p+=10){let e=a+(d+p)*s,n=Ne(t,{x:f,y:e},!1,s);if(e<c.top||e>c.bottom||(s<0?n<o:n>o)){let r=t.docView.coordsForChar(n),o=!r||e<r.top?-1:1;return i.OF.cursor(n,o,void 0,l)}}}(this,t,e,n))}domAtPos(t){return this.docView.domAtPos(t)}posAtDOM(t,e=0){return this.docView.posFromDOM(t,e)}posAtCoords(t,e=!0){return this.readMeasured(),Ne(this,t,e)}coordsAtPos(t,e=1){this.readMeasured();let n=this.docView.coordsAt(t,e);if(!n||n.left==n.right)return n;let i=this.state.doc.lineAt(t),r=this.bidiSpans(i);return x(n,r[_t.find(r,t-i.from,-1,e)].dir==It.LTR==e>0)}coordsForChar(t){return this.readMeasured(),this.docView.coordsForChar(t)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(t){return!this.state.facet(Kt)||t<this.viewport.from||t>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(t))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>ui)return zt(t.length);let e,n=this.textDirectionAt(t.from);for(let r of this.bidiCache)if(r.from==t.from&&r.dir==n&&(r.fresh||Lt(r.isolates,e=be(this,t))))return r.order;e||(e=be(this,t));let i=Ht(t.text,n,e);return this.bidiCache.push(new fi(t.from,t.to,n,e,!0,i)),i}get hasFocus(){var t;return(this.dom.ownerDocument.hasFocus()||X.safari&&(null===(t=this.inputState)||void 0===t?void 0:t.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore((()=>{E(this.contentDOM),this.docView.updateSelection()}))}setRoot(t){this._root!=t&&(this._root=t,this.observer.setWindow((9==t.nodeType?t:t.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let t of this.plugins)t.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(t,e={}){return ie.of(new ne("number"==typeof t?i.OF.cursor(t):t,e.y,e.x,e.yMargin,e.xMargin))}scrollSnapshot(){let{scrollTop:t,scrollLeft:e}=this.scrollDOM,n=this.viewState.scrollAnchorAt(t);return ie.of(new ne(i.OF.cursor(n.from),"start","start",n.top-t,e,!0))}setTabFocusMode(t){null==t?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:"boolean"==typeof t?this.inputState.tabFocusMode=t?0:-1:0!=this.inputState.tabFocusMode&&(this.inputState.tabFocusMode=Date.now()+t)}static domEventHandlers(t){return ce.define((()=>({})),{eventHandlers:t})}static domEventObservers(t){return ce.define((()=>({})),{eventObservers:t})}static theme(t,e){let n=r.G.newName(),i=[Jn.of(n),xe.of(ei(`.${n}`,t))];return e&&e.dark&&i.push(Qn.of(!0)),i}static baseTheme(t){return i.Nb.lowest(xe.of(ei("."+Xn,t,ti)))}static findFromDOM(t){var e;let n=t.querySelector(".cm-content"),i=n&&L.get(n)||L.get(t);return(null===(e=null==i?void 0:i.rootView)||void 0===e?void 0:e.view)||null}}ci.styleModule=xe,ci.inputHandler=Jt,ci.clipboardInputFilter=Xt,ci.clipboardOutputFilter=$t,ci.scrollHandler=ee,ci.focusChangeEffect=Qt,ci.perLineTextDirection=Kt,ci.exceptionSink=qt,ci.updateListener=Yt,ci.editable=se,ci.mouseSelectionStyle=Vt,ci.dragMovesSelection=Zt,ci.clickAddsSelectionRange=Gt,ci.decorations=de,ci.outerDecorations=pe,ci.atomicRanges=ge,ci.bidiIsolatedRanges=me,ci.scrollMargins=ve,ci.darkTheme=Qn,ci.cspNonce=i.sj.define({combine:t=>t.length?t[0]:""}),ci.contentAttributes=fe,ci.editorAttributes=he,ci.lineWrapping=ci.contentAttributes.of({class:"cm-lineWrapping"}),ci.announce=i.Pe.define();const ui=4096,hi={};class fi{constructor(t,e,n,i,r,o){this.from=t,this.to=e,this.dir=n,this.isolates=i,this.fresh=r,this.order=o}static update(t,e){if(e.empty&&!t.some((t=>t.fresh)))return t;let n=[],i=t.length?t[t.length-1].dir:It.LTR;for(let r=Math.max(0,t.length-10);r<t.length;r++){let o=t[r];o.dir!=i||e.touchesRange(o.from,o.to)||n.push(new fi(e.mapPos(o.from,1),e.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return n}}function di(t,e,n){for(let i=t.state.facet(e),r=i.length-1;r>=0;r--){let e=i[r],o="function"==typeof e?e(t):e;o&&ot(o,n)}return n}const pi=X.mac?"mac":X.windows?"win":X.linux?"linux":"key";function gi(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),!1!==n&&e.shiftKey&&(t="Shift-"+t),t}const mi=i.Nb.default(ci.domEventHandlers({keydown:(t,e)=>Ii(yi(e.state),t,e,"editor")})),bi=i.sj.define({enables:mi}),vi=new WeakMap;function yi(t){let e=t.facet(bi),n=vi.get(e);return n||vi.set(e,n=function(t,e=pi){let n=Object.create(null),i=Object.create(null),r=(t,e)=>{let n=i[t];if(null==n)i[t]=e;else if(n!=e)throw new Error("Key binding "+t+" is used both as a regular binding and as a multi-stroke prefix")},o=(t,i,o,s,a)=>{var l,c;let u=n[t]||(n[t]=Object.create(null)),h=i.split(/ (?!$)/).map((t=>function(t,e){const n=t.split(/-(?!$)/);let i,r,o,s,a=n[n.length-1];"Space"==a&&(a=" ");for(let l=0;l<n.length-1;++l){const t=n[l];if(/^(cmd|meta|m)$/i.test(t))s=!0;else if(/^a(lt)?$/i.test(t))i=!0;else if(/^(c|ctrl|control)$/i.test(t))r=!0;else if(/^s(hift)?$/i.test(t))o=!0;else{if(!/^mod$/i.test(t))throw new Error("Unrecognized modifier name: "+t);"mac"==e?s=!0:r=!0}}return i&&(a="Alt-"+a),r&&(a="Ctrl-"+a),s&&(a="Meta-"+a),o&&(a="Shift-"+a),a}(t,e)));for(let e=1;e<h.length;e++){let n=h.slice(0,e).join(" ");r(n,!0),u[n]||(u[n]={preventDefault:!0,stopPropagation:!1,run:[e=>{let i=wi={view:e,prefix:n,scope:t};return setTimeout((()=>{wi==i&&(wi=null)}),Si),!0}]})}let f=h.join(" ");r(f,!1);let d=u[f]||(u[f]={preventDefault:!1,stopPropagation:!1,run:(null===(c=null===(l=u._any)||void 0===l?void 0:l.run)||void 0===c?void 0:c.slice())||[]});o&&d.run.push(o),s&&(d.preventDefault=!0),a&&(d.stopPropagation=!0)};for(let s of t){let t=s.scope?s.scope.split(" "):["editor"];if(s.any)for(let e of t){let t=n[e]||(n[e]=Object.create(null));t._any||(t._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:i}=s;for(let e in t)t[e].run.push((t=>i(t,Oi)))}let i=s[e]||s.key;if(i)for(let e of t)o(e,i,s.run,s.preventDefault,s.stopPropagation),s.shift&&o(e,"Shift-"+i,s.shift,s.preventDefault,s.stopPropagation)}return n}(e.reduce(((t,e)=>t.concat(e)),[]))),n}function xi(t,e,n){return Ii(yi(t.state),e,t,n)}let wi=null;const Si=4e3;let Oi=null;function Ii(t,e,n,r){Oi=e;let c=function(t){var e=!(a&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||l&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key)&&t.key||(t.shiftKey?s:o)[t.keyCode]||t.key||"Unidentified";return"Esc"==e&&(e="Escape"),"Del"==e&&(e="Delete"),"Left"==e&&(e="ArrowLeft"),"Up"==e&&(e="ArrowUp"),"Right"==e&&(e="ArrowRight"),"Down"==e&&(e="ArrowDown"),e}(e),u=(0,i.vS)(c,0),h=(0,i.Fh)(u)==c.length&&" "!=c,f="",d=!1,p=!1,g=!1;wi&&wi.view==n&&wi.scope==r&&(f=wi.prefix+" ",Xe.indexOf(e.keyCode)<0&&(p=!0,wi=null));let m,b,v=new Set,y=t=>{if(t){for(let e of t.run)if(!v.has(e)&&(v.add(e),e(n)))return t.stopPropagation&&(g=!0),!0;t.preventDefault&&(t.stopPropagation&&(g=!0),p=!0)}return!1},x=t[r];return x&&(y(x[f+gi(c,e,!h)])?d=!0:h&&(e.altKey||e.metaKey||e.ctrlKey)&&!(X.windows&&e.ctrlKey&&e.altKey)&&(m=o[e.keyCode])&&m!=c?(y(x[f+gi(m,e,!0)])||e.shiftKey&&(b=s[e.keyCode])!=c&&b!=m&&y(x[f+gi(b,e,!1)]))&&(d=!0):h&&e.shiftKey&&y(x[f+gi(c,e,!0)])&&(d=!0),!d&&y(x._any)&&(d=!0)),p&&(d=!0),d&&g&&e.stopPropagation(),Oi=null,d}class ki{constructor(t,e,n,i,r){this.className=t,this.left=e,this.top=n,this.width=i,this.height=r}draw(){let t=document.createElement("div");return t.className=this.className,this.adjust(t),t}update(t,e){return e.className==this.className&&(this.adjust(t),!0)}adjust(t){t.style.left=this.left+"px",t.style.top=this.top+"px",null!=this.width&&(t.style.width=this.width+"px"),t.style.height=this.height+"px"}eq(t){return this.left==t.left&&this.top==t.top&&this.width==t.width&&this.height==t.height&&this.className==t.className}static forRange(t,e,n){if(n.empty){let i=t.coordsAtPos(n.head,n.assoc||1);if(!i)return[];let r=Ei(t);return[new ki(e,i.left-r.left,i.top-r.top,null,i.bottom-i.top)]}return function(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let i=Math.max(n.from,t.viewport.from),r=Math.min(n.to,t.viewport.to),o=t.textDirection==It.LTR,s=t.contentDOM,a=s.getBoundingClientRect(),l=Ei(t),c=s.querySelector(".cm-line"),u=c&&window.getComputedStyle(c),h=a.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),f=a.right-(u?parseInt(u.paddingRight):0),d=Le(t,i),p=Le(t,r),g=d.type==ht.Text?d:null,m=p.type==ht.Text?p:null;g&&(t.lineWrapping||d.widgetLineBreaks)&&(g=Mi(t,i,1,g));m&&(t.lineWrapping||p.widgetLineBreaks)&&(m=Mi(t,r,-1,m));if(g&&m&&g.from==m.from&&g.to==m.to)return v(y(n.from,n.to,g));{let e=g?y(n.from,null,g):x(d,!1),i=m?y(null,n.to,m):x(p,!0),r=[];return(g||d).to<(m||p).from-(g&&m?1:0)||d.widgetLineBreaks>1&&e.bottom+t.defaultLineHeight/2<i.top?r.push(b(h,e.bottom,f,i.top)):e.bottom<i.top&&t.elementAtHeight((e.bottom+i.top)/2).type==ht.Text&&(e.bottom=i.top=(e.bottom+i.top)/2),v(e).concat(r).concat(v(i))}function b(t,n,i,r){return new ki(e,t-l.left,n-l.top,i-t,r-n)}function v({top:t,bottom:e,horizontal:n}){let i=[];for(let r=0;r<n.length;r+=2)i.push(b(n[r],t,n[r+1],e));return i}function y(e,n,i){let r=1e9,s=-1e9,a=[];function l(e,n,l,c,u){let d=t.coordsAtPos(e,e==i.to?-2:2),p=t.coordsAtPos(l,l==i.from?2:-2);d&&p&&(r=Math.min(d.top,p.top,r),s=Math.max(d.bottom,p.bottom,s),u==It.LTR?a.push(o&&n?h:d.left,o&&c?f:p.right):a.push(!o&&c?h:p.left,!o&&n?f:d.right))}let c=null!=e?e:i.from,u=null!=n?n:i.to;for(let o of t.visibleRanges)if(o.to>c&&o.from<u)for(let i=Math.max(o.from,c),r=Math.min(o.to,u);;){let o=t.state.doc.lineAt(i);for(let s of t.bidiSpans(o)){let t=s.from+o.from,a=s.to+o.from;if(t>=r)break;a>i&&l(Math.max(t,i),null==e&&t<=c,Math.min(a,r),null==n&&a>=u,s.dir)}if(i=o.to+1,i>=r)break}return 0==a.length&&l(c,null==e,u,null==n,t.textDirection),{top:r,bottom:s,horizontal:a}}function x(t,e){let n=a.top+(e?t.top:t.bottom);return{top:n,bottom:n,horizontal:[]}}}(t,e,n)}}function Ei(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==It.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function Mi(t,e,n,i){let r=t.coordsAtPos(e,2*n);if(!r)return i;let o=t.dom.getBoundingClientRect(),s=(r.top+r.bottom)/2,a=t.posAtCoords({x:o.left+1,y:s}),l=t.posAtCoords({x:o.right-1,y:s});return null==a||null==l?i:{from:Math.max(i.from,Math.min(a,l)),to:Math.min(i.to,Math.max(a,l))}}class Ci{constructor(t,e){this.view=t,this.layer=e,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=t.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),e.above&&this.dom.classList.add("cm-layer-above"),e.class&&this.dom.classList.add(e.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(t.state),t.requestMeasure(this.measureReq),e.mount&&e.mount(this.dom,t)}update(t){t.startState.facet(Ai)!=t.state.facet(Ai)&&this.setOrder(t.state),(this.layer.update(t,this.dom)||t.geometryChanged)&&(this.scale(),t.view.requestMeasure(this.measureReq))}docViewUpdate(t){!1!==this.layer.updateOnDocViewUpdate&&t.requestMeasure(this.measureReq)}setOrder(t){let e=0,n=t.facet(Ai);for(;e<n.length&&n[e]!=this.layer;)e++;this.dom.style.zIndex=String((this.layer.above?150:-1)-e)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:t,scaleY:e}=this.view;t==this.scaleX&&e==this.scaleY||(this.scaleX=t,this.scaleY=e,this.dom.style.transform=`scale(${1/t}, ${1/e})`)}draw(t){if(t.length!=this.drawn.length||t.some(((t,e)=>{return n=t,i=this.drawn[e],!(n.constructor==i.constructor&&n.eq(i));var n,i}))){let e=this.dom.firstChild,n=0;for(let i of t)i.update&&e&&i.constructor&&this.drawn[n].constructor&&i.update(e,this.drawn[n])?(e=e.nextSibling,n++):this.dom.insertBefore(i.draw(),e);for(;e;){let t=e.nextSibling;e.remove(),e=t}this.drawn=t}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Ai=i.sj.define();function ji(t){return[ce.define((e=>new Ci(e,t))),Ai.of(t)]}const Pi=!(X.ios&&X.webkit&&X.webkit_version<534),Ti=i.sj.define({combine:t=>(0,i.QR)(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(t,e)=>Math.min(t,e),drawRangeCursor:(t,e)=>t||e})});function Ni(t={}){return[Ti.of(t),Li,Ri,Hi,te.of(!0)]}function _i(t){return t.startState.facet(Ti)!=t.state.facet(Ti)}const Li=ji({above:!0,markers(t){let{state:e}=t,n=e.facet(Ti),r=[];for(let o of e.selection.ranges){let s=o==e.selection.main;if(o.empty?!s||Pi:n.drawRangeCursor){let e=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",n=o.empty?o:i.OF.cursor(o.head,o.head>o.anchor?-1:1);for(let i of ki.forRange(t,e,n))r.push(i)}}return r},update(t,e){t.transactions.some((t=>t.selection))&&(e.style.animationName="cm-blink"==e.style.animationName?"cm-blink2":"cm-blink");let n=_i(t);return n&&Di(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){Di(e.state,t)},class:"cm-cursorLayer"});function Di(t,e){e.style.animationDuration=t.facet(Ti).cursorBlinkRate+"ms"}const Ri=ji({above:!1,markers:t=>t.state.selection.ranges.map((e=>e.empty?[]:ki.forRange(t,"cm-selectionBackground",e))).reduce(((t,e)=>t.concat(e))),update:(t,e)=>t.docChanged||t.selectionSet||t.viewportChanged||_i(t),class:"cm-selectionLayer"}),Bi={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};Pi&&(Bi[".cm-line"].caretColor=Bi[".cm-content"].caretColor="transparent !important");const Hi=i.Nb.highest(ci.theme(Bi)),zi=i.Pe.define({map:(t,e)=>null==t?null:e.mapPos(t)}),Wi=i.sU.define({create:()=>null,update:(t,e)=>(null!=t&&(t=e.changes.mapPos(t)),e.effects.reduce(((t,e)=>e.is(zi)?e.value:t),t))}),Ui=ce.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(Wi);null==n?null!=this.cursor&&(null===(e=this.cursor)||void 0===e||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(Wi)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(Wi),n=null!=e&&t.coordsAtPos(e);if(!n)return null;let i=t.scrollDOM.getBoundingClientRect();return{left:n.left-i.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-i.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(Wi)!=t&&this.view.dispatch({effects:zi.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){t.target!=this.view.contentDOM&&this.view.contentDOM.contains(t.relatedTarget)||this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function Fi(){return[Wi,Ui]}function Gi(t,e,n,i,r){e.lastIndex=0;for(let o,s=t.iterRange(n,i),a=n;!s.next().done;a+=s.value.length)if(!s.lineBreak)for(;o=e.exec(s.value);)r(a+o.index,o)}class Zi{constructor(t){const{regexp:e,decoration:n,decorate:i,boundary:r,maxLength:o=1e3}=t;if(!e.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=e,i)this.addMatch=(t,e,n,r)=>i(r,n,n+t[0].length,t,e);else if("function"==typeof n)this.addMatch=(t,e,i,r)=>{let o=n(t,e,i);o&&r(i,i+t[0].length,o)};else{if(!n)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=(t,e,i,r)=>r(i,i+t[0].length,n)}this.boundary=r,this.maxLength=o}createDeco(t){let e=new i.vB,n=e.add.bind(e);for(let{from:i,to:r}of function(t,e){let n=t.visibleRanges;if(1==n.length&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let i=[];for(let{from:r,to:o}of n)r=Math.max(t.state.doc.lineAt(r).from,r-e),o=Math.min(t.state.doc.lineAt(o).to,o+e),i.length&&i[i.length-1].to>=r?i[i.length-1].to=o:i.push({from:r,to:o});return i}(t,this.maxLength))Gi(t.state.doc,this.regexp,i,r,((e,i)=>this.addMatch(i,t,e,n)));return e.finish()}updateDeco(t,e){let n=1e9,i=-1;return t.docChanged&&t.changes.iterChanges(((e,r,o,s)=>{s>=t.view.viewport.from&&o<=t.view.viewport.to&&(n=Math.min(o,n),i=Math.max(s,i))})),t.viewportMoved||i-n>1e3?this.createDeco(t.view):i>-1?this.updateRange(t.view,e.map(t.changes),n,i):e}updateRange(t,e,n,i){for(let r of t.visibleRanges){let o=Math.max(r.from,n),s=Math.min(r.to,i);if(s>o){let n=t.state.doc.lineAt(o),i=n.to<s?t.state.doc.lineAt(s):n,a=Math.max(r.from,n.from),l=Math.min(r.to,i.to);if(this.boundary){for(;o>n.from;o--)if(this.boundary.test(n.text[o-1-n.from])){a=o;break}for(;s<i.to;s++)if(this.boundary.test(i.text[s-i.from])){l=s;break}}let c,u=[],h=(t,e,n)=>u.push(n.range(t,e));if(n==i)for(this.regexp.lastIndex=a-n.from;(c=this.regexp.exec(n.text))&&c.index<l-n.from;)this.addMatch(c,t,c.index+n.from,h);else Gi(t.state.doc,this.regexp,a,l,((e,n)=>this.addMatch(n,t,e,h)));e=e.update({filterFrom:a,filterTo:l,filter:(t,e)=>t<a||e>l,add:u})}}return e}}const Vi=null!=/x/.unicode?"gu":"g",qi=new RegExp("[\0-\b\n--\u2028\u2029\ufeff-]",Vi),Yi={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Ji=null;const Qi=i.sj.define({combine(t){let e=(0,i.QR)(t,{render:null,specialChars:qi,addSpecialChars:null});return(e.replaceTabs=!function(){var t;if(null==Ji&&"undefined"!=typeof document&&document.body){let e=document.body.style;Ji=null!=(null!==(t=e.tabSize)&&void 0!==t?t:e.MozTabSize)}return Ji||!1}())&&(e.specialChars=new RegExp("\t|"+e.specialChars.source,Vi)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Vi)),e}});function Xi(t={}){return[Qi.of(t),$i||($i=ce.fromClass(class{constructor(t){this.view=t,this.decorations=ft.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(Qi)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new Zi({regexp:t.specialChars,decoration:(e,n,r)=>{let{doc:o}=n.state,s=(0,i.vS)(e[0],0);if(9==s){let t=o.lineAt(r),e=n.state.tabSize,s=(0,i.y$)(t.text,e,r-t.from);return ft.replace({widget:new tr((e-s%e)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[s]||(this.decorationCache[s]=ft.replace({widget:new Ki(t,s)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(Qi);t.startState.facet(Qi)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))]}let $i=null;class Ki extends ut{constructor(t,e){super(),this.options=t,this.code=e}eq(t){return t.code==this.code}toDOM(t){let e=function(t){return t>=32?"•":10==t?"":String.fromCharCode(9216+t)}(this.code),n=t.state.phrase("Control character")+" "+(Yi[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,n,e);if(i)return i;let r=document.createElement("span");return r.textContent=e,r.title=n,r.setAttribute("aria-label",n),r.className="cm-specialChar",r}ignoreEvent(){return!1}}class tr extends ut{constructor(t){super(),this.width=t}eq(t){return t.width==this.width}toDOM(){let t=document.createElement("span");return t.textContent="\t",t.className="cm-tab",t.style.width=this.width+"px",t}ignoreEvent(){return!1}}function er(){return ir}const nr=ft.line({class:"cm-activeLine"}),ir=ce.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let i of t.state.selection.ranges){let r=t.lineBlockAt(i.head);r.from>e&&(n.push(nr.range(r.from)),e=r.from)}return ft.set(n)}},{decorations:t=>t.decorations});class rr extends ut{constructor(t){super(),this.content=t}toDOM(t){let e=document.createElement("span");return e.className="cm-placeholder",e.style.pointerEvents="none",e.appendChild("string"==typeof this.content?document.createTextNode(this.content):"function"==typeof this.content?this.content(t):this.content.cloneNode(!0)),"string"==typeof this.content?e.setAttribute("aria-label","placeholder "+this.content):e.setAttribute("aria-hidden","true"),e}coordsAt(t){let e=t.firstChild?p(t.firstChild):[];if(!e.length)return null;let n=window.getComputedStyle(t.parentNode),i=x(e[0],"rtl"!=n.direction),r=parseInt(n.lineHeight);return i.bottom-i.top>1.5*r?{left:i.left,right:i.right,top:i.top,bottom:i.top+r}:i}ignoreEvent(){return!1}}function or(t){return ce.fromClass(class{constructor(e){this.view=e,this.placeholder=t?ft.set([ft.widget({widget:new rr(t),side:1}).range(0)]):ft.none}get decorations(){return this.view.state.doc.length?ft.none:this.placeholder}},{decorations:t=>t.decorations})}const sr=2e3;function ar(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(n),o=n-r.from,s=o>sr?-1:o==r.length?function(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}(t,e.clientX):(0,i.y$)(r.text,t.state.tabSize,n-r.from);return{line:r.number,col:s,off:o}}function lr(t,e){let n=ar(t,e),r=t.state.selection;return n?{update(t){if(t.docChanged){let e=t.changes.mapPos(t.startState.doc.line(n.line).from),i=t.state.doc.lineAt(e);n={line:i.number,col:n.col,off:Math.min(n.off,i.length)},r=r.map(t.changes)}},get(e,o,s){let a=ar(t,e);if(!a)return r;let l=function(t,e,n){let r=Math.min(e.line,n.line),o=Math.max(e.line,n.line),s=[];if(e.off>sr||n.off>sr||e.col<0||n.col<0){let a=Math.min(e.off,n.off),l=Math.max(e.off,n.off);for(let e=r;e<=o;e++){let n=t.doc.line(e);n.length<=l&&s.push(i.OF.range(n.from+a,n.to+l))}}else{let a=Math.min(e.col,n.col),l=Math.max(e.col,n.col);for(let e=r;e<=o;e++){let n=t.doc.line(e),r=(0,i.kn)(n.text,a,t.tabSize,!0);if(r<0)s.push(i.OF.cursor(n.to));else{let e=(0,i.kn)(n.text,l,t.tabSize);s.push(i.OF.range(n.from+r,n.from+e))}}}return s}(t.state,n,a);return l.length?s?i.OF.create(l.concat(r.ranges)):i.OF.create(l):r}}:null}function cr(t){let e=(null==t?void 0:t.eventFilter)||(t=>t.altKey&&0==t.button);return ci.mouseSelectionStyle.of(((t,n)=>e(n)?lr(t,n):null))}const ur={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},hr={style:"cursor: crosshair"};function fr(t={}){let[e,n]=ur[t.key||"Alt"],i=ce.fromClass(class{constructor(t){this.view=t,this.isDown=!1}set(t){this.isDown!=t&&(this.isDown=t,this.view.update([]))}},{eventObservers:{keydown(t){this.set(t.keyCode==e||n(t))},keyup(t){t.keyCode!=e&&n(t)||this.set(!1)},mousemove(t){this.set(n(t))}}});return[i,ci.contentAttributes.of((t=>{var e;return(null===(e=t.plugin(i))||void 0===e?void 0:e.isDown)?hr:null}))]}const dr="-10000px";class pr{constructor(t,e,n,i){this.facet=e,this.createTooltipView=n,this.removeTooltipView=i,this.input=t.state.facet(e),this.tooltips=this.input.filter((t=>t));let r=null;this.tooltipViews=this.tooltips.map((t=>r=n(t,r)))}update(t,e){var n;let i=t.state.facet(this.facet),r=i.filter((t=>t));if(i===this.input){for(let e of this.tooltipViews)e.update&&e.update(t);return!1}let o=[],s=e?[]:null;for(let a=0;a<r.length;a++){let n=r[a],i=-1;if(n){for(let t=0;t<this.tooltips.length;t++){let e=this.tooltips[t];e&&e.create==n.create&&(i=t)}if(i<0)o[a]=this.createTooltipView(n,a?o[a-1]:null),s&&(s[a]=!!n.above);else{let n=o[a]=this.tooltipViews[i];s&&(s[a]=e[i]),n.update&&n.update(t)}}}for(let a of this.tooltipViews)o.indexOf(a)<0&&(this.removeTooltipView(a),null===(n=a.destroy)||void 0===n||n.call(a));return e&&(s.forEach(((t,n)=>e[n]=t)),e.length=s.length),this.input=i,this.tooltips=r,this.tooltipViews=o,!0}}function gr(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const mr=i.sj.define({combine:t=>{var e,n,i;return{position:X.ios?"absolute":(null===(e=t.find((t=>t.position)))||void 0===e?void 0:e.position)||"fixed",parent:(null===(n=t.find((t=>t.parent)))||void 0===n?void 0:n.parent)||null,tooltipSpace:(null===(i=t.find((t=>t.tooltipSpace)))||void 0===i?void 0:i.tooltipSpace)||gr}}}),br=new WeakMap,vr=ce.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(mr);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver="function"==typeof ResizeObserver?new ResizeObserver((()=>this.measureSoon())):null,this.manager=new pr(t,Sr,((t,e)=>this.createTooltip(t,e)),(t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()})),this.above=this.manager.tooltips.map((t=>!!t.above)),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver((t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()}),{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout((()=>{this.measureTimeout=-1,this.maybeMeasure()}),50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,i=t.state.facet(mr);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let t of this.manager.tooltipViews)t.dom.style.position=this.position;n=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let t of this.manager.tooltipViews)this.container.appendChild(t.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),i=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let t=document.createElement("div");t.className="cm-tooltip-arrow",n.dom.appendChild(t)}return n.dom.style.position=this.position,n.dom.style.top=dr,n.dom.style.left="0px",this.container.insertBefore(n.dom,i),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let i of this.manager.tooltipViews)i.dom.remove(),null===(t=i.destroy)||void 0===t||t.call(i);this.parent&&this.container.remove(),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),null===(n=this.intersectionObserver)||void 0===n||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:t}=this.manager.tooltipViews[0];if(X.gecko)n=t.offsetParent!=this.container.ownerDocument.body;else if(t.style.top==dr&&"0px"==t.style.left){let e=t.getBoundingClientRect();n=Math.abs(e.top+1e4)>1||Math.abs(e.left)>1}}if(n||"absolute"==this.position)if(this.parent){let n=this.parent.getBoundingClientRect();n.width&&n.height&&(t=n.width/this.parent.offsetWidth,e=n.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let i=this.view.scrollDOM.getBoundingClientRect(),r=ye(this.view);return{visible:{left:i.left+r.left,top:i.top+r.top,right:i.right-r.right,bottom:i.bottom-r.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map(((t,e)=>{let n=this.manager.tooltipViews[e];return n.getCoords?n.getCoords(t.pos):this.view.coordsAtPos(t.pos)})),size:this.manager.tooltipViews.map((({dom:t})=>t.getBoundingClientRect())),space:this.view.state.facet(mr).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let t of this.manager.tooltipViews)t.dom.style.position="absolute"}let{visible:n,space:i,scaleX:r,scaleY:o}=t,s=[];for(let a=0;a<this.manager.tooltips.length;a++){let l=this.manager.tooltips[a],c=this.manager.tooltipViews[a],{dom:u}=c,h=t.pos[a],f=t.size[a];if(!h||!1!==l.clip&&(h.bottom<=Math.max(n.top,i.top)||h.top>=Math.min(n.bottom,i.bottom)||h.right<Math.max(n.left,i.left)-.1||h.left>Math.min(n.right,i.right)+.1)){u.style.top=dr;continue}let d=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,p=d?7:0,g=f.right-f.left,m=null!==(e=br.get(c))&&void 0!==e?e:f.bottom-f.top,b=c.offset||wr,v=this.view.textDirection==It.LTR,y=f.width>i.right-i.left?v?i.left:i.right-f.width:v?Math.max(i.left,Math.min(h.left-(d?14:0)+b.x,i.right-g)):Math.min(Math.max(i.left,h.left-g+(d?14:0)-b.x),i.right-g),x=this.above[a];!l.strictSide&&(x?h.top-m-p-b.y<i.top:h.bottom+m+p+b.y>i.bottom)&&x==i.bottom-h.bottom>h.top-i.top&&(x=this.above[a]=!x);let w=(x?h.top-i.top:i.bottom-h.bottom)-p;if(w<m&&!1!==c.resize){if(w<this.view.defaultLineHeight){u.style.top=dr;continue}br.set(c,m),u.style.height=(m=w)/o+"px"}else u.style.height&&(u.style.height="");let S=x?h.top-m-p-b.y:h.bottom+p+b.y,O=y+g;if(!0!==c.overlap)for(let t of s)t.left<O&&t.right>y&&t.top<S+m&&t.bottom>S&&(S=x?t.top-m-2-p:t.bottom+p+2);if("absolute"==this.position?(u.style.top=(S-t.parent.top)/o+"px",yr(u,(y-t.parent.left)/r)):(u.style.top=S/o+"px",yr(u,y/r)),d){let t=h.left+(v?b.x:-b.x)-(y+14-7);d.style.left=t/r+"px"}!0!==c.overlap&&s.push({left:y,top:S,right:O,bottom:S+m}),u.classList.toggle("cm-tooltip-above",x),u.classList.toggle("cm-tooltip-below",!x),c.positioned&&c.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=dr}},{eventObservers:{scroll(){this.maybeMeasure()}}});function yr(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}const xr=ci.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),wr={x:0,y:0},Sr=i.sj.define({enables:[vr,xr]}),Or=i.sj.define({combine:t=>t.reduce(((t,e)=>t.concat(e)),[])});class Ir{static create(t){return new Ir(t)}constructor(t){this.view=t,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new pr(t,Or,((t,e)=>this.createHostedView(t,e)),(t=>t.dom.remove()))}createHostedView(t,e){let n=t.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(n.dom,e?e.dom.nextSibling:this.dom.firstChild),this.mounted&&n.mount&&n.mount(this.view),n}mount(t){for(let e of this.manager.tooltipViews)e.mount&&e.mount(t);this.mounted=!0}positioned(t){for(let e of this.manager.tooltipViews)e.positioned&&e.positioned(t)}update(t){this.manager.update(t)}destroy(){var t;for(let e of this.manager.tooltipViews)null===(t=e.destroy)||void 0===t||t.call(e)}passProp(t){let e;for(let n of this.manager.tooltipViews){let i=n[t];if(void 0!==i)if(void 0===e)e=i;else if(e!==i)return}return e}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const kr=Sr.compute([Or],(t=>{let e=t.facet(Or);return 0===e.length?null:{pos:Math.min(...e.map((t=>t.pos))),end:Math.max(...e.map((t=>{var e;return null!==(e=t.end)&&void 0!==e?e:t.pos}))),create:Ir.create,above:e[0].above,arrow:e.some((t=>t.arrow))}}));class Er{constructor(t,e,n,i,r){this.view=t,this.source=e,this.field=n,this.setHover=i,this.hoverTime=r,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:t.dom,time:0},this.checkHover=this.checkHover.bind(this),t.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),t.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout((()=>this.startHover()),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let t=Date.now()-this.lastMove.time;t<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-t):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:t,lastMove:e}=this,n=t.docView.nearest(e.target);if(!n)return;let i,r=1;if(n instanceof tt)i=n.posAtStart;else{if(i=t.posAtCoords(e),null==i)return;let n=t.coordsAtPos(i);if(!n||e.y<n.top||e.y>n.bottom||e.x<n.left-t.defaultCharacterWidth||e.x>n.right+t.defaultCharacterWidth)return;let o=t.bidiSpans(t.state.doc.lineAt(i)).find((t=>t.from<=i&&t.to>=i)),s=o&&o.dir==It.RTL?-1:1;r=e.x<n.left?-s:s}let o=this.source(t,i,r);if(null==o?void 0:o.then){let e=this.pending={pos:i};o.then((n=>{this.pending==e&&(this.pending=null,!n||Array.isArray(n)&&!n.length||t.dispatch({effects:this.setHover.of(Array.isArray(n)?n:[n])}))}),(e=>oe(t.state,e,"hover tooltip")))}else!o||Array.isArray(o)&&!o.length||t.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let t=this.view.plugin(vr),e=t?t.manager.tooltips.findIndex((t=>t.create==Ir.create)):-1;return e>-1?t.manager.tooltipViews[e]:null}mousemove(t){var e,n;this.lastMove={x:t.clientX,y:t.clientY,target:t.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:r}=this;if(i.length&&r&&!function(t,e){let n,{left:i,right:r,top:o,bottom:s}=t.getBoundingClientRect();if(n=t.querySelector(".cm-tooltip-arrow")){let t=n.getBoundingClientRect();o=Math.min(t.top,o),s=Math.max(t.bottom,s)}return e.clientX>=i-Mr&&e.clientX<=r+Mr&&e.clientY>=o-Mr&&e.clientY<=s+Mr}(r.dom,t)||this.pending){let{pos:r}=i[0]||this.pending,o=null!==(n=null===(e=i[0])||void 0===e?void 0:e.end)&&void 0!==n?n:r;(r==o?this.view.posAtCoords(this.lastMove)==r:function(t,e,n,i,r){let o=t.scrollDOM.getBoundingClientRect(),s=t.documentTop+t.documentPadding.top+t.contentHeight;if(o.left>i||o.right<i||o.top>r||Math.min(o.bottom,s)<r)return!1;let a=t.posAtCoords({x:i,y:r},!1);return a>=e&&a<=n}(this.view,r,o,t.clientX,t.clientY))||(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(t){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:e}=this;if(e.length){let{tooltip:e}=this;e&&e.dom.contains(t.relatedTarget)?this.watchTooltipLeave(e.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(t){let e=n=>{t.removeEventListener("mouseleave",e),this.active.length&&!this.view.dom.contains(n.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};t.addEventListener("mouseleave",e)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Mr=4;function Cr(t,e={}){let n=i.Pe.define(),r=i.sU.define({create:()=>[],update(t,r){if(t.length&&(e.hideOnChange&&(r.docChanged||r.selection)?t=[]:e.hideOn&&(t=t.filter((t=>!e.hideOn(r,t)))),r.docChanged)){let e=[];for(let n of t){let t=r.changes.mapPos(n.pos,-1,i.iR.TrackDel);if(null!=t){let i=Object.assign(Object.create(null),n);i.pos=t,null!=i.end&&(i.end=r.changes.mapPos(i.end)),e.push(i)}}t=e}for(let e of r.effects)e.is(n)&&(t=e.value),e.is(jr)&&(t=[]);return t},provide:t=>Or.from(t)});return{active:r,extension:[r,ce.define((i=>new Er(i,t,r,n,e.hoverTime||300))),kr]}}function Ar(t,e){let n=t.plugin(vr);if(!n)return null;let i=n.manager.tooltips.indexOf(e);return i<0?null:n.manager.tooltipViews[i]}const jr=i.Pe.define();const Pr=i.sj.define({combine(t){let e,n;for(let i of t)e=e||i.topContainer,n=n||i.bottomContainer;return{topContainer:e,bottomContainer:n}}});function Tr(t,e){let n=t.plugin(Nr),i=n?n.specs.indexOf(e):-1;return i>-1?n.panels[i]:null}const Nr=ce.fromClass(class{constructor(t){this.input=t.state.facet(Dr),this.specs=this.input.filter((t=>t)),this.panels=this.specs.map((e=>e(t)));let e=t.state.facet(Pr);this.top=new _r(t,!0,e.topContainer),this.bottom=new _r(t,!1,e.bottomContainer),this.top.sync(this.panels.filter((t=>t.top))),this.bottom.sync(this.panels.filter((t=>!t.top)));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(Pr);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new _r(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new _r(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(Dr);if(n!=this.input){let e=n.filter((t=>t)),i=[],r=[],o=[],s=[];for(let n of e){let e,a=this.specs.indexOf(n);a<0?(e=n(t.view),s.push(e)):(e=this.panels[a],e.update&&e.update(t)),i.push(e),(e.top?r:o).push(e)}this.specs=e,this.panels=i,this.top.sync(r),this.bottom.sync(o);for(let t of s)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}else for(let i of this.panels)i.update&&i.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>ci.scrollMargins.of((e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}}))});class _r{constructor(t,e,n){this.view=t,this.top=e,this.container=n,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(t){for(let e of this.panels)e.destroy&&t.indexOf(e)<0&&e.destroy();this.panels=t,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let t=this.dom.firstChild;for(let e of this.panels)if(e.dom.parentNode==this.dom){for(;t!=e.dom;)t=Lr(t);t=t.nextSibling}else this.dom.insertBefore(e.dom,t);for(;t;)t=Lr(t)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let t of this.classes.split(" "))t&&this.container.classList.remove(t);for(let t of(this.classes=this.view.themeClasses).split(" "))t&&this.container.classList.add(t)}}}function Lr(t){let e=t.nextSibling;return t.remove(),e}const Dr=i.sj.define({enables:Nr});class Rr extends i.FB{compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}eq(t){return!1}destroy(t){}}Rr.prototype.elementClass="",Rr.prototype.toDOM=void 0,Rr.prototype.mapMode=i.iR.TrackBefore,Rr.prototype.startSide=Rr.prototype.endSide=-1,Rr.prototype.point=!0;const Br=i.sj.define(),Hr=i.sj.define(),zr={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>i.om.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Wr=i.sj.define();function Ur(t){return[Gr(),Wr.of(Object.assign(Object.assign({},zr),t))]}const Fr=i.sj.define({combine:t=>t.some((t=>t))});function Gr(t){let e=[Zr];return t&&!1===t.fixed&&e.push(Fr.of(!0)),e}const Zr=ce.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(Wr).map((e=>new Jr(t,e)));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!t.state.facet(Fr),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,i=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(i<.8*(n.to-n.from))}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(Fr)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let n=i.om.iter(this.view.state.facet(Br),this.view.viewport.from),r=[],o=this.gutters.map((t=>new Yr(t,this.view.viewport,-this.view.documentPadding.top)));for(let i of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(i.type)){let t=!0;for(let e of i.type)if(e.type==ht.Text&&t){qr(n,r,e.from);for(let t of o)t.line(this.view,e,r);t=!1}else if(e.widget)for(let t of o)t.widget(this.view,e)}else if(i.type==ht.Text){qr(n,r,i.from);for(let t of o)t.line(this.view,i,r)}else if(i.widget)for(let t of o)t.widget(this.view,i);for(let i of o)i.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(Wr),n=t.state.facet(Wr),r=t.docChanged||t.heightChanged||t.viewportChanged||!i.om.eq(t.startState.facet(Br),t.state.facet(Br),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let i of this.gutters)i.update(t)&&(r=!0);else{r=!0;let i=[];for(let r of n){let n=e.indexOf(r);n<0?i.push(new Jr(this.view,r)):(this.gutters[n].update(t),i.push(this.gutters[n]))}for(let t of this.gutters)t.dom.remove(),i.indexOf(t)<0&&t.destroy();for(let t of i)this.dom.appendChild(t.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>ci.scrollMargins.of((e=>{let n=e.plugin(t);return n&&0!=n.gutters.length&&n.fixed?e.textDirection==It.LTR?{left:n.dom.offsetWidth*e.scaleX}:{right:n.dom.offsetWidth*e.scaleX}:null}))});function Vr(t){return Array.isArray(t)?t:[t]}function qr(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class Yr{constructor(t,e,n){this.gutter=t,this.height=n,this.i=0,this.cursor=i.om.iter(t.markers,e.from)}addElement(t,e,n){let{gutter:i}=this,r=(e.top-this.height)/t.scaleY,o=e.height/t.scaleY;if(this.i==i.elements.length){let e=new Qr(t,o,r,n);i.elements.push(e),i.dom.appendChild(e.dom)}else i.elements[this.i].update(t,o,r,n);this.height=e.bottom,this.i++}line(t,e,n){let i=[];qr(this.cursor,i,e.from),n.length&&(i=i.concat(n));let r=this.gutter.config.lineMarker(t,e,i);r&&i.unshift(r);let o=this.gutter;(0!=i.length||o.config.renderEmptyElements)&&this.addElement(t,e,i)}widget(t,e){let n=this.gutter.config.widgetMarker(t,e.widget,e),i=n?[n]:null;for(let r of t.state.facet(Hr)){let n=r(t,e.widget,e);n&&(i||(i=[])).push(n)}i&&this.addElement(t,e,i)}finish(){let t=this.gutter;for(;t.elements.length>this.i;){let e=t.elements.pop();t.dom.removeChild(e.dom),e.destroy()}}}class Jr{constructor(t,e){this.view=t,this.config=e,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let n in e.domEventHandlers)this.dom.addEventListener(n,(i=>{let r,o=i.target;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let t=o.getBoundingClientRect();r=(t.top+t.bottom)/2}else r=i.clientY;let s=t.lineBlockAtHeight(r-t.documentTop);e.domEventHandlers[n](t,s,i)&&i.preventDefault()}));this.markers=Vr(e.markers(t)),e.initialSpacer&&(this.spacer=new Qr(t,0,0,[e.initialSpacer(t)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(t){let e=this.markers;if(this.markers=Vr(this.config.markers(t.view)),this.spacer&&this.config.updateSpacer){let e=this.config.updateSpacer(this.spacer.markers[0],t);e!=this.spacer.markers[0]&&this.spacer.update(t.view,0,0,[e])}let n=t.view.viewport;return!i.om.eq(this.markers,e,n.from,n.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(t)}destroy(){for(let t of this.elements)t.destroy()}}class Qr{constructor(t,e,n,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(t,e,n,i)}update(t,e,n,i){this.height!=e&&(this.height=e,this.dom.style.height=e+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),function(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].compare(e[n]))return!1;return!0}(this.markers,i)||this.setMarkers(t,i)}setMarkers(t,e){let n="cm-gutterElement",i=this.dom.firstChild;for(let r=0,o=0;;){let s=o,a=r<e.length?e[r++]:null,l=!1;if(a){let t=a.elementClass;t&&(n+=" "+t);for(let e=o;e<this.markers.length;e++)if(this.markers[e].compare(a)){s=e,l=!0;break}}else s=this.markers.length;for(;o<s;){let t=this.markers[o++];if(t.toDOM){t.destroy(i);let e=i.nextSibling;i.remove(),i=e}}if(!a)break;a.toDOM&&(l?i=i.nextSibling:this.dom.insertBefore(a.toDOM(t),i)),l&&o++}this.dom.className=n,this.markers=e}destroy(){this.setMarkers(null,[])}}const Xr=i.sj.define(),$r=i.sj.define(),Kr=i.sj.define({combine:t=>(0,i.QR)(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(t,e){let n=Object.assign({},t);for(let i in e){let t=n[i],r=e[i];n[i]=t?(e,n,i)=>t(e,n,i)||r(e,n,i):r}return n}})});class to extends Rr{constructor(t){super(),this.number=t}eq(t){return this.number==t.number}toDOM(){return document.createTextNode(this.number)}}function eo(t,e){return t.state.facet(Kr).formatNumber(e,t.state)}const no=Wr.compute([Kr],(t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:t=>t.state.facet(Xr),lineMarker:(t,e,n)=>n.some((t=>t.toDOM))?null:new to(eo(t,t.state.doc.lineAt(e.from).number)),widgetMarker:(t,e,n)=>{for(let i of t.state.facet($r)){let r=i(t,e,n);if(r)return r}return null},lineMarkerChange:t=>t.startState.facet(Kr)!=t.state.facet(Kr),initialSpacer:t=>new to(eo(t,ro(t.state.doc.lines))),updateSpacer(t,e){let n=eo(e.view,ro(e.view.state.doc.lines));return n==t.number?t:new to(n)},domEventHandlers:t.facet(Kr).domEventHandlers})));function io(t={}){return[Kr.of(t),Gr(),no]}function ro(t){let e=9;for(;e<t;)e=10*e+9;return e}const oo=new class extends Rr{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},so=Br.compute(["selection"],(t=>{let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.head).from;r>n&&(n=r,e.push(oo.range(r)))}return i.om.of(e)}));function ao(){return so}},9249:(t,e,n)=>{"use strict";n.d(e,{$g:()=>D,PH:()=>p,Qj:()=>d,RY:()=>T,Z6:()=>c,cF:()=>i,fI:()=>u,iX:()=>_,rr:()=>N,uY:()=>s});const i=1024;let r=0;class o{constructor(t,e){this.from=t,this.to=e}}class s{constructor(t={}){this.id=r++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(t){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof t&&(t=c.match(t)),e=>{let n=t(e);return void 0===n?null:[this,n]}}}s.closedBy=new s({deserialize:t=>t.split(" ")}),s.openedBy=new s({deserialize:t=>t.split(" ")}),s.group=new s({deserialize:t=>t.split(" ")}),s.isolate=new s({deserialize:t=>{if(t&&"rtl"!=t&&"ltr"!=t&&"auto"!=t)throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}}),s.contextHash=new s({perNode:!0}),s.lookAhead=new s({perNode:!0}),s.mounted=new s({perNode:!0});class a{constructor(t,e,n){this.tree=t,this.overlay=e,this.parser=n}static get(t){return t&&t.props&&t.props[s.mounted.id]}}const l=Object.create(null);class c{constructor(t,e,n,i=0){this.name=t,this.props=e,this.id=n,this.flags=i}static define(t){let e=t.props&&t.props.length?Object.create(null):l,n=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(null==t.name?8:0),i=new c(t.name||"",e,t.id,n);if(t.props)for(let r of t.props)if(Array.isArray(r)||(r=r(i)),r){if(r[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");e[r[0].id]=r[1]}return i}prop(t){return this.props[t.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(t){if("string"==typeof t){if(this.name==t)return!0;let e=this.prop(s.group);return!!e&&e.indexOf(t)>-1}return this.id==t}static match(t){let e=Object.create(null);for(let n in t)for(let i of n.split(" "))e[i]=t[n];return t=>{for(let n=t.prop(s.group),i=-1;i<(n?n.length:0);i++){let r=e[i<0?t.name:n[i]];if(r)return r}}}}c.none=new c("",Object.create(null),0,8);class u{constructor(t){this.types=t;for(let e=0;e<t.length;e++)if(t[e].id!=e)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...t){let e=[];for(let n of this.types){let i=null;for(let e of t){let t=e(n);t&&(i||(i=Object.assign({},n.props)),i[t[0].id]=t[1])}e.push(i?new c(n.name,i,n.id,n.flags):n)}return new u(e)}}const h=new WeakMap,f=new WeakMap;var d;!function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"}(d||(d={}));class p{constructor(t,e,n,i,r){if(this.type=t,this.children=e,this.positions=n,this.length=i,this.props=null,r&&r.length){this.props=Object.create(null);for(let[t,e]of r)this.props["number"==typeof t?t:t.id]=e}}toString(){let t=a.get(this);if(t&&!t.overlay)return t.tree.toString();let e="";for(let n of this.children){let t=n.toString();t&&(e&&(e+=","),e+=t)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(e.length?"("+e+")":""):e}cursor(t=0){return new M(this.topNode,t)}cursorAt(t,e=0,n=0){let i=h.get(this)||this.topNode,r=new M(i);return r.moveTo(t,e),h.set(this,r._tree),r}get topNode(){return new x(this,0,0,null)}resolve(t,e=0){let n=v(h.get(this)||this.topNode,t,e,!1);return h.set(this,n),n}resolveInner(t,e=0){let n=v(f.get(this)||this.topNode,t,e,!0);return f.set(this,n),n}resolveStack(t,e=0){return function(t,e,n){let i=t.resolveInner(e,n),r=null;for(let o=i instanceof x?i:i.context.parent;o;o=o.parent)if(o.index<0){let t=o.parent;(r||(r=[i])).push(t.resolve(e,n)),o=t}else{let t=a.get(o.tree);if(t&&t.overlay&&t.overlay[0].from<=e&&t.overlay[t.overlay.length-1].to>=e){let s=new x(t.tree,t.overlay[0].from+o.from,-1,o);(r||(r=[i])).push(v(s,e,n,!1))}}return r?k(r):i}(this,t,e)}iterate(t){let{enter:e,leave:n,from:i=0,to:r=this.length}=t,o=t.mode||0,s=(o&d.IncludeAnonymous)>0;for(let a=this.cursor(o|d.IncludeAnonymous);;){let t=!1;if(a.from<=r&&a.to>=i&&(!s&&a.type.isAnonymous||!1!==e(a))){if(a.firstChild())continue;t=!0}for(;t&&n&&(s||!a.type.isAnonymous)&&n(a),!a.nextSibling();){if(!a.parent())return;t=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let e in this.props)t.push([+e,this.props[e]]);return t}balance(t={}){return this.children.length<=8?this:P(c.none,this.children,this.positions,0,this.children.length,0,this.length,((t,e,n)=>new p(this.type,t,e,n,this.propValues)),t.makeTree||((t,e,n)=>new p(c.none,t,e,n)))}static build(t){return function(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:o=i,reused:a=[],minRepeatType:l=r.types.length}=t,c=Array.isArray(n)?new g(n,n.length):n,u=r.types,h=0,f=0;function d(t,e,n,i,s,p){let{id:g,start:O,end:I,size:k}=c,E=f,M=h;for(;k<0;){if(c.next(),-1==k){let e=a[g];return n.push(e),void i.push(O-t)}if(-3==k)return void(h=g);if(-4==k)return void(f=g);throw new RangeError(`Unrecognized record size: ${k}`)}let C,A,j=u[g],T=O-t;if(I-O<=o&&(A=w(c.pos-e,s))){let e=new Uint16Array(A.size-A.skip),n=c.pos-A.size,i=e.length;for(;c.pos>n;)i=S(A.start,e,i);C=new m(e,I-A.start,r),T=A.start-t}else{let t=c.pos-k;c.next();let e=[],n=[],i=g>=l?g:-1,r=0,s=I;for(;c.pos>t;)i>=0&&c.id==i&&c.size>=0?(c.end<=s-o&&(y(e,n,O,r,c.end,s,i,E,M),r=e.length,s=c.end),c.next()):p>2500?b(O,t,e,n):d(O,t,e,n,i,p+1);if(i>=0&&r>0&&r<e.length&&y(e,n,O,r,O,s,i,E,M),e.reverse(),n.reverse(),i>-1&&r>0){let t=v(j,M);C=P(j,e,n,0,e.length,0,I-O,t,t)}else C=x(j,e,n,I-O,E-I,M)}n.push(C),i.push(T)}function b(t,e,n,i){let s=[],a=0,l=-1;for(;c.pos>e;){let{id:t,start:e,end:n,size:i}=c;if(i>4)c.next();else{if(l>-1&&e<l)break;l<0&&(l=n-o),s.push(t,e,n),a++,c.next()}}if(a){let e=new Uint16Array(4*a),o=s[s.length-2];for(let t=s.length-3,n=0;t>=0;t-=3)e[n++]=s[t],e[n++]=s[t+1]-o,e[n++]=s[t+2]-o,e[n++]=n;n.push(new m(e,s[2]-o,r)),i.push(o-t)}}function v(t,e){return(n,i,r)=>{let o,a,l=0,c=n.length-1;if(c>=0&&(o=n[c])instanceof p){if(!c&&o.type==t&&o.length==r)return o;(a=o.prop(s.lookAhead))&&(l=i[c]+o.length+a)}return x(t,n,i,r,l,e)}}function y(t,e,n,i,o,s,a,l,c){let u=[],h=[];for(;t.length>i;)u.push(t.pop()),h.push(e.pop()+n-o);t.push(x(r.types[a],u,h,s-o,l-s,c)),e.push(o-n)}function x(t,e,n,i,r,o,a){if(o){let t=[s.contextHash,o];a=a?[t].concat(a):[t]}if(r>25){let t=[s.lookAhead,r];a=a?[t].concat(a):[t]}return new p(t,e,n,i,a)}function w(t,e){let n=c.fork(),i=0,r=0,s=0,a=n.end-o,u={size:0,start:0,skip:0};t:for(let o=n.pos-t;n.pos>o;){let t=n.size;if(n.id==e&&t>=0){u.size=i,u.start=r,u.skip=s,s+=4,i+=4,n.next();continue}let c=n.pos-t;if(t<0||c<o||n.start<a)break;let h=n.id>=l?4:0,f=n.start;for(n.next();n.pos>c;){if(n.size<0){if(-3!=n.size)break t;h+=4}else n.id>=l&&(h+=4);n.next()}r=f,i+=t,s+=h}return(e<0||i==t)&&(u.size=i,u.start=r,u.skip=s),u.size>4?u:void 0}function S(t,e,n){let{id:i,start:r,end:o,size:s}=c;if(c.next(),s>=0&&i<l){let a=n;if(s>4){let i=c.pos-(s-4);for(;c.pos>i;)n=S(t,e,n)}e[--n]=a,e[--n]=o-t,e[--n]=r-t,e[--n]=i}else-3==s?h=i:-4==s&&(f=i);return n}let O=[],I=[];for(;c.pos>0;)d(t.start||0,t.bufferStart||0,O,I,-1,0);let k=null!==(e=t.length)&&void 0!==e?e:O.length?I[0]+O[0].length:0;return new p(u[t.topID],O.reverse(),I.reverse(),k)}(t)}}p.empty=new p(c.none,[],[],0);class g{constructor(t,e){this.buffer=t,this.index=e}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new g(this.buffer,this.index)}}class m{constructor(t,e,n){this.buffer=t,this.length=e,this.set=n}get type(){return c.none}toString(){let t=[];for(let e=0;e<this.buffer.length;)t.push(this.childString(e)),e=this.buffer[e+3];return t.join(",")}childString(t){let e=this.buffer[t],n=this.buffer[t+3],i=this.set.types[e],r=i.name;if(/\W/.test(r)&&!i.isError&&(r=JSON.stringify(r)),n==(t+=4))return r;let o=[];for(;t<n;)o.push(this.childString(t)),t=this.buffer[t+3];return r+"("+o.join(",")+")"}findChild(t,e,n,i,r){let{buffer:o}=this,s=-1;for(let a=t;a!=e&&!(b(r,i,o[a+1],o[a+2])&&(s=a,n>0));a=o[a+3]);return s}slice(t,e,n){let i=this.buffer,r=new Uint16Array(e-t),o=0;for(let s=t,a=0;s<e;){r[a++]=i[s++],r[a++]=i[s++]-n;let e=r[a++]=i[s++]-n;r[a++]=i[s++]-t,o=Math.max(o,e)}return new m(r,o,this.set)}}function b(t,e,n,i){switch(t){case-2:return n<e;case-1:return i>=e&&n<e;case 0:return n<e&&i>e;case 1:return n<=e&&i>e;case 2:return i>e;case 4:return!0}}function v(t,e,n,i){for(var r;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let e=!i&&t instanceof x&&t.index<0?null:t.parent;if(!e)return t;t=e}let o=i?0:d.IgnoreOverlays;if(i)for(let s=t,a=s.parent;a;s=a,a=s.parent)s instanceof x&&s.index<0&&(null===(r=a.enter(e,n,o))||void 0===r?void 0:r.from)!=s.from&&(t=a);for(;;){let i=t.enter(e,n,o);if(!i)return t;t=i}}class y{cursor(t=0){return new M(this,t)}getChild(t,e=null,n=null){let i=w(this,t,e,n);return i.length?i[0]:null}getChildren(t,e=null,n=null){return w(this,t,e,n)}resolve(t,e=0){return v(this,t,e,!1)}resolveInner(t,e=0){return v(this,t,e,!0)}matchContext(t){return S(this.parent,t)}enterUnfinishedNodesBefore(t){let e=this.childBefore(t),n=this;for(;e;){let t=e.lastChild;if(!t||t.to!=e.to)break;t.type.isError&&t.from==t.to?(n=e,e=t.prevSibling):e=t}return n}get node(){return this}get next(){return this.parent}}class x extends y{constructor(t,e,n,i){super(),this._tree=t,this.from=e,this.index=n,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,e,n,i,r=0){for(let o=this;;){for(let{children:s,positions:l}=o._tree,c=e>0?s.length:-1;t!=c;t+=e){let c=s[t],u=l[t]+o.from;if(b(i,n,u,u+c.length))if(c instanceof m){if(r&d.ExcludeBuffers)continue;let s=c.findChild(0,c.buffer.length,e,n-u,i);if(s>-1)return new I(new O(o,c,t,u),null,s)}else if(r&d.IncludeAnonymous||!c.type.isAnonymous||C(c)){let s;if(!(r&d.IgnoreMounts)&&(s=a.get(c))&&!s.overlay)return new x(s.tree,u,t,o);let l=new x(c,u,t,o);return r&d.IncludeAnonymous||!l.type.isAnonymous?l:l.nextChild(e<0?c.children.length-1:0,e,n,i)}}if(r&d.IncludeAnonymous||!o.type.isAnonymous)return null;if(t=o.index>=0?o.index+e:e<0?-1:o._parent._tree.children.length,o=o._parent,!o)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this._tree.children.length-1,-1,t,-2)}enter(t,e,n=0){let i;if(!(n&d.IgnoreOverlays)&&(i=a.get(this._tree))&&i.overlay){let n=t-this.from;for(let{from:t,to:r}of i.overlay)if((e>0?t<=n:t<n)&&(e<0?r>=n:r>n))return new x(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,e,n)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function w(t,e,n,i){let r=t.cursor(),o=[];if(!r.firstChild())return o;if(null!=n)for(let s=!1;!s;)if(s=r.type.is(n),!r.nextSibling())return o;for(;;){if(null!=i&&r.type.is(i))return o;if(r.type.is(e)&&o.push(r.node),!r.nextSibling())return null==i?o:[]}}function S(t,e,n=e.length-1){for(let i=t;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[n]&&e[n]!=i.name)return!1;n--}}return!0}class O{constructor(t,e,n,i){this.parent=t,this.buffer=e,this.index=n,this.start=i}}class I extends y{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(t,e,n){super(),this.context=t,this._parent=e,this.index=n,this.type=t.buffer.set.types[t.buffer.buffer[n]]}child(t,e,n){let{buffer:i}=this.context,r=i.findChild(this.index+4,i.buffer[this.index+3],t,e-this.context.start,n);return r<0?null:new I(this.context,this,r)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}enter(t,e,n=0){if(n&d.ExcludeBuffers)return null;let{buffer:i}=this.context,r=i.findChild(this.index+4,i.buffer[this.index+3],e>0?1:-1,t-this.context.start,e);return r<0?null:new I(this.context,this,r)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,e=t.buffer[this.index+3];return e<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new I(this.context,this._parent,e):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new I(this.context,this._parent,t.findChild(e,this.index,-1,0,4))}get tree(){return null}toTree(){let t=[],e=[],{buffer:n}=this.context,i=this.index+4,r=n.buffer[this.index+3];if(r>i){let o=n.buffer[this.index+1];t.push(n.slice(i,r,o)),e.push(0)}return new p(this.type,t,e,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function k(t){if(!t.length)return null;let e=0,n=t[0];for(let o=1;o<t.length;o++){let i=t[o];(i.from>n.from||i.to<n.to)&&(n=i,e=o)}let i=n instanceof x&&n.index<0?null:n.parent,r=t.slice();return i?r[e]=i:r.splice(e,1),new E(r,n)}class E{constructor(t,e){this.heads=t,this.node=e}get next(){return k(this.heads)}}class M{get name(){return this.type.name}constructor(t,e=0){if(this.mode=e,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,t instanceof x)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(let e=t._parent;e;e=e._parent)this.stack.unshift(e.index);this.bufferNode=t,this.yieldBuf(t.index)}}yieldNode(t){return!!t&&(this._tree=t,this.type=t.type,this.from=t.from,this.to=t.to,!0)}yieldBuf(t,e){this.index=t;let{start:n,buffer:i}=this.buffer;return this.type=e||i.set.types[i.buffer[t]],this.from=n+i.buffer[t+1],this.to=n+i.buffer[t+2],!0}yield(t){return!!t&&(t instanceof x?(this.buffer=null,this.yieldNode(t)):(this.buffer=t.context,this.yieldBuf(t.index,t.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(t,e,n){if(!this.buffer)return this.yield(this._tree.nextChild(t<0?this._tree._tree.children.length-1:0,t,e,n,this.mode));let{buffer:i}=this.buffer,r=i.findChild(this.index+4,i.buffer[this.index+3],t,e-this.buffer.start,n);return!(r<0)&&(this.stack.push(this.index),this.yieldBuf(r))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(t){return this.enterChild(1,t,2)}childBefore(t){return this.enterChild(-1,t,-2)}enter(t,e,n=this.mode){return this.buffer?!(n&d.ExcludeBuffers)&&this.enterChild(1,t,e):this.yield(this._tree.enter(t,e,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&d.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let t=this.mode&d.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(t)}sibling(t){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+t,t,0,4,this.mode));let{buffer:e}=this.buffer,n=this.stack.length-1;if(t<0){let t=n<0?0:this.stack[n]+4;if(this.index!=t)return this.yieldBuf(e.findChild(t,this.index,-1,0,4))}else{let t=e.buffer[this.index+3];if(t<(n<0?e.buffer.length:e.buffer[this.stack[n]+3]))return this.yieldBuf(t)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+t,t,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(t){let e,n,{buffer:i}=this;if(i){if(t>0){if(this.index<i.buffer.buffer.length)return!1}else for(let t=0;t<this.index;t++)if(i.buffer.buffer[t+3]<this.index)return!1;({index:e,parent:n}=i)}else({index:e,_parent:n}=this._tree);for(;n;({index:e,_parent:n}=n))if(e>-1)for(let i=e+t,r=t<0?-1:n._tree.children.length;i!=r;i+=t){let t=n._tree.children[i];if(this.mode&d.IncludeAnonymous||t instanceof m||!t.type.isAnonymous||C(t))return!1}return!0}move(t,e){if(e&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}next(t=!0){return this.move(1,t)}prev(t=!0){return this.move(-1,t)}moveTo(t,e=0){for(;(this.from==this.to||(e<1?this.from>=t:this.from>t)||(e>-1?this.to<=t:this.to<t))&&this.parent(););for(;this.enterChild(1,t,e););return this}get node(){if(!this.buffer)return this._tree;let t=this.bufferNode,e=null,n=0;if(t&&t.context==this.buffer)t:for(let i=this.index,r=this.stack.length;r>=0;){for(let o=t;o;o=o._parent)if(o.index==i){if(i==this.index)return o;e=o,n=r+1;break t}i=this.stack[--r]}for(let i=n;i<this.stack.length;i++)e=new I(this.buffer,e,this.stack[i]);return this.bufferNode=new I(this.buffer,e,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(t,e){for(let n=0;;){let i=!1;if(this.type.isAnonymous||!1!==t(this)){if(this.firstChild()){n++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&e&&e(this),i=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,i=!0}}}matchContext(t){if(!this.buffer)return S(this.node.parent,t);let{buffer:e}=this.buffer,{types:n}=e.set;for(let i=t.length-1,r=this.stack.length-1;i>=0;r--){if(r<0)return S(this._tree,t,i);let o=n[e.buffer[this.stack[r]]];if(!o.isAnonymous){if(t[i]&&t[i]!=o.name)return!1;i--}}return!0}}function C(t){return t.children.some((t=>t instanceof m||!t.type.isAnonymous||C(t)))}const A=new WeakMap;function j(t,e){if(!t.isAnonymous||e instanceof m||e.type!=t)return 1;let n=A.get(e);if(null==n){n=1;for(let i of e.children){if(i.type!=t||!(i instanceof p)){n=1;break}n+=j(t,i)}A.set(e,n)}return n}function P(t,e,n,i,r,o,s,a,l){let c=0;for(let d=i;d<r;d++)c+=j(t,e[d]);let u=Math.ceil(1.5*c/8),h=[],f=[];return function e(n,i,r,s,a){for(let c=r;c<s;){let r=c,d=i[c],p=j(t,n[c]);for(c++;c<s;c++){let e=j(t,n[c]);if(p+e>=u)break;p+=e}if(c==r+1){if(p>u){let t=n[r];e(t.children,t.positions,0,t.children.length,i[r]+a);continue}h.push(n[r])}else{let e=i[c-1]+n[c-1].length-d;h.push(P(t,n,i,r,c,d,e,null,l))}f.push(d+a-o)}}(e,n,i,r,0),(a||l)(h,f,s)}class T{constructor(){this.map=new WeakMap}setBuffer(t,e,n){let i=this.map.get(t);i||this.map.set(t,i=new Map),i.set(e,n)}getBuffer(t,e){let n=this.map.get(t);return n&&n.get(e)}set(t,e){t instanceof I?this.setBuffer(t.context.buffer,t.index,e):t instanceof x&&this.map.set(t.tree,e)}get(t){return t instanceof I?this.getBuffer(t.context.buffer,t.index):t instanceof x?this.map.get(t.tree):void 0}cursorSet(t,e){t.buffer?this.setBuffer(t.buffer.buffer,t.index,e):this.map.set(t.tree,e)}cursorGet(t){return t.buffer?this.getBuffer(t.buffer.buffer,t.index):this.map.get(t.tree)}}class N{constructor(t,e,n,i,r=!1,o=!1){this.from=t,this.to=e,this.tree=n,this.offset=i,this.open=(r?1:0)|(o?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(t,e=[],n=!1){let i=[new N(0,t.length,t,0,!1,n)];for(let r of e)r.to>t.length&&i.push(r);return i}static applyChanges(t,e,n=128){if(!e.length)return t;let i=[],r=1,o=t.length?t[0]:null;for(let s=0,a=0,l=0;;s++){let c=s<e.length?e[s]:null,u=c?c.fromA:1e9;if(u-a>=n)for(;o&&o.from<u;){let e=o;if(a>=e.from||u<=e.to||l){let t=Math.max(e.from,a)-l,n=Math.min(e.to,u)-l;e=t>=n?null:new N(t,n,e.tree,e.offset+l,s>0,!!c)}if(e&&i.push(e),o.to>u)break;o=r<t.length?t[r++]:null}if(!c)break;a=c.toA,l=c.toA-c.toB}return i}}class _{startParse(t,e,n){return"string"==typeof t&&(t=new L(t)),n=n?n.length?n.map((t=>new o(t.from,t.to))):[new o(0,0)]:[new o(0,t.length)],this.createParse(t,e||[],n)}parse(t,e,n){let i=this.startParse(t,e,n);for(;;){let t=i.advance();if(t)return t}}}class L{constructor(t){this.string=t}get length(){return this.string.length}chunk(t){return this.string.slice(t)}get lineChunks(){return!1}read(t,e){return this.string.slice(t,e)}}function D(t){return(e,n,i,r)=>new W(e,t,n,i,r)}class R{constructor(t,e,n,i,r){this.parser=t,this.parse=e,this.overlay=n,this.target=i,this.from=r}}function B(t){if(!t.length||t.some((t=>t.from>=t.to)))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class H{constructor(t,e,n,i,r,o,s){this.parser=t,this.predicate=e,this.mounts=n,this.index=i,this.start=r,this.target=o,this.prev=s,this.depth=0,this.ranges=[]}}const z=new s({perNode:!0});class W{constructor(t,e,n,i,r){this.nest=e,this.input=n,this.fragments=i,this.ranges=r,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=t}advance(){if(this.baseParse){let t=this.baseParse.advance();if(!t)return null;if(this.baseParse=null,this.baseTree=t,this.startInner(),null!=this.stoppedAt)for(let e of this.inner)e.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let t=this.baseTree;return null!=this.stoppedAt&&(t=new p(t.type,t.children,t.positions,t.length,t.propValues.concat([[z,this.stoppedAt]]))),t}let t=this.inner[this.innerDone],e=t.parse.advance();if(e){this.innerDone++;let n=Object.assign(Object.create(null),t.target.props);n[s.mounted.id]=new a(e,t.overlay,t.parser),t.target.props=n}return null}get parsedPos(){if(this.baseParse)return 0;let t=this.input.length;for(let e=this.innerDone;e<this.inner.length;e++)this.inner[e].from<t&&(t=Math.min(t,this.inner[e].parse.parsedPos));return t}stopAt(t){if(this.stoppedAt=t,this.baseParse)this.baseParse.stopAt(t);else for(let e=this.innerDone;e<this.inner.length;e++)this.inner[e].parse.stopAt(t)}startInner(){let t=new V(this.fragments),e=null,n=null,i=new M(new x(this.baseTree,this.ranges[0].from,0,null),d.IncludeAnonymous|d.IgnoreMounts);t:for(let r,s;;){let a,l=!0;if(null!=this.stoppedAt&&i.from>=this.stoppedAt)l=!1;else if(t.hasNode(i)){if(e){let t=e.mounts.find((t=>t.frag.from<=i.from&&t.frag.to>=i.to&&t.mount.overlay));if(t)for(let n of t.mount.overlay){let r=n.from+t.pos,o=n.to+t.pos;r>=i.from&&o<=i.to&&!e.ranges.some((t=>t.from<o&&t.to>r))&&e.ranges.push({from:r,to:o})}}l=!1}else if(n&&(s=U(n.ranges,i.from,i.to)))l=2!=s;else if(!i.type.isAnonymous&&(r=this.nest(i,this.input))&&(i.from<i.to||!r.overlay)){i.tree||G(i);let s=t.findMounts(i.from,r.parser);if("function"==typeof r.overlay)e=new H(r.parser,r.overlay,s,this.inner.length,i.from,i.tree,e);else{let t=q(this.ranges,r.overlay||(i.from<i.to?[new o(i.from,i.to)]:[]));t.length&&B(t),!t.length&&r.overlay||this.inner.push(new R(r.parser,t.length?r.parser.startParse(this.input,J(s,t),t):r.parser.startParse(""),r.overlay?r.overlay.map((t=>new o(t.from-i.from,t.to-i.from))):null,i.tree,t.length?t[0].from:i.from)),r.overlay?t.length&&(n={ranges:t,depth:0,prev:n}):l=!1}}else if(e&&(a=e.predicate(i))&&(!0===a&&(a=new o(i.from,i.to)),a.from<a.to)){let t=e.ranges.length-1;t>=0&&e.ranges[t].to==a.from?e.ranges[t]={from:e.ranges[t].from,to:a.to}:e.ranges.push(a)}if(l&&i.firstChild())e&&e.depth++,n&&n.depth++;else for(;!i.nextSibling();){if(!i.parent())break t;if(e&&! --e.depth){let t=q(this.ranges,e.ranges);t.length&&(B(t),this.inner.splice(e.index,0,new R(e.parser,e.parser.startParse(this.input,J(e.mounts,t),t),e.ranges.map((t=>new o(t.from-e.start,t.to-e.start))),e.target,t[0].from))),e=e.prev}n&&! --n.depth&&(n=n.prev)}}}}function U(t,e,n){for(let i of t){if(i.from>=n)break;if(i.to>e)return i.from<=e&&i.to>=n?2:1}return 0}function F(t,e,n,i,r,o){if(e<n){let s=t.buffer[e+1];i.push(t.slice(e,n,s)),r.push(s-o)}}function G(t){let{node:e}=t,n=[],i=e.context.buffer;do{n.push(t.index),t.parent()}while(!t.tree);let r=t.tree,o=r.children.indexOf(i),s=r.children[o],a=s.buffer,l=[o];r.children[o]=function t(i,r,o,c,u,h){let f=n[h],d=[],g=[];F(s,i,f,d,g,c);let m=a[f+1],b=a[f+2];l.push(d.length);let v=h?t(f+4,a[f+3],s.set.types[a[f]],m,b-m,h-1):e.toTree();return d.push(v),g.push(m-c),F(s,a[f+3],r,d,g,c),new p(o,d,g,u)}(0,a.length,c.none,0,s.length,n.length-1);for(let c of l){let e=t.tree.children[c],n=t.tree.positions[c];t.yield(new x(e,n+t.from,c,t._tree))}}class Z{constructor(t,e){this.offset=e,this.done=!1,this.cursor=t.cursor(d.IncludeAnonymous|d.IgnoreMounts)}moveTo(t){let{cursor:e}=this,n=t-this.offset;for(;!this.done&&e.from<n;)e.to>=t&&e.enter(n,1,d.IgnoreOverlays|d.ExcludeBuffers)||e.next(!1)||(this.done=!0)}hasNode(t){if(this.moveTo(t.from),!this.done&&this.cursor.from+this.offset==t.from&&this.cursor.tree)for(let e=this.cursor.tree;;){if(e==t.tree)return!0;if(!(e.children.length&&0==e.positions[0]&&e.children[0]instanceof p))break;e=e.children[0]}return!1}}class V{constructor(t){var e;if(this.fragments=t,this.curTo=0,this.fragI=0,t.length){let n=this.curFrag=t[0];this.curTo=null!==(e=n.tree.prop(z))&&void 0!==e?e:n.to,this.inner=new Z(n.tree,-n.offset)}else this.curFrag=this.inner=null}hasNode(t){for(;this.curFrag&&t.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=t.from&&this.curTo>=t.to&&this.inner.hasNode(t)}nextFrag(){var t;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let e=this.curFrag=this.fragments[this.fragI];this.curTo=null!==(t=e.tree.prop(z))&&void 0!==t?t:e.to,this.inner=new Z(e.tree,-e.offset)}}findMounts(t,e){var n;let i=[];if(this.inner){this.inner.cursor.moveTo(t,1);for(let t=this.inner.cursor.node;t;t=t.parent){let r=null===(n=t.tree)||void 0===n?void 0:n.prop(s.mounted);if(r&&r.parser==e)for(let e=this.fragI;e<this.fragments.length;e++){let n=this.fragments[e];if(n.from>=t.to)break;n.tree==this.curFrag.tree&&i.push({frag:n,pos:t.from-n.offset,mount:r})}}}return i}}function q(t,e){let n=null,i=e;for(let r=1,s=0;r<t.length;r++){let a=t[r-1].to,l=t[r].from;for(;s<i.length;s++){let t=i[s];if(t.from>=l)break;t.to<=a||(n||(i=n=e.slice()),t.from<a?(n[s]=new o(t.from,a),t.to>l&&n.splice(s+1,0,new o(l,t.to))):t.to>l?n[s--]=new o(l,t.to):n.splice(s--,1))}}return i}function Y(t,e,n,i){let r=0,s=0,a=!1,l=!1,c=-1e9,u=[];for(;;){let h=r==t.length?1e9:a?t[r].to:t[r].from,f=s==e.length?1e9:l?e[s].to:e[s].from;if(a!=l){let t=Math.max(c,n),e=Math.min(h,f,i);t<e&&u.push(new o(t,e))}if(c=Math.min(h,f),1e9==c)break;h==c&&(a?(a=!1,r++):a=!0),f==c&&(l?(l=!1,s++):l=!0)}return u}function J(t,e){let n=[];for(let{pos:i,mount:r,frag:s}of t){let t=i+(r.overlay?r.overlay[0].from:0),a=t+r.tree.length,l=Math.max(s.from,t),c=Math.min(s.to,a);if(r.overlay){let a=Y(e,r.overlay.map((t=>new o(t.from+i,t.to+i))),l,c);for(let e=0,i=l;;e++){let o=e==a.length,l=o?c:a[e].from;if(l>i&&n.push(new N(i,l,r.tree,-t,s.from>=i||s.openStart,s.to<=l||s.openEnd)),o)break;i=a[e].to}}else n.push(new N(l,c,r.tree,-t,s.from>=t||s.openStart,s.to<=a||s.openEnd))}return n}},9756:(t,e,n)=>{"use strict";n.d(e,{DM:()=>f,_A:()=>A,az:()=>h,pn:()=>l});var i=n(9249);let r=0;class o{constructor(t,e,n,i){this.name=t,this.set=e,this.base=n,this.modified=i,this.id=r++}toString(){let{name:t}=this;for(let e of this.modified)e.name&&(t=`${e.name}(${t})`);return t}static define(t,e){let n="string"==typeof t?t:"?";if(t instanceof o&&(e=t),null==e?void 0:e.base)throw new Error("Can not derive from a modified tag");let i=new o(n,[],null,[]);if(i.set.push(i),e)for(let r of e.set)i.set.push(r);return i}static defineModifier(t){let e=new a(t);return t=>t.modified.indexOf(e)>-1?t:a.get(t.base||t,t.modified.concat(e).sort(((t,e)=>t.id-e.id)))}}let s=0;class a{constructor(t){this.name=t,this.instances=[],this.id=s++}static get(t,e){if(!e.length)return t;let n=e[0].instances.find((n=>{return n.base==t&&(i=e,r=n.modified,i.length==r.length&&i.every(((t,e)=>t==r[e])));var i,r}));if(n)return n;let i=[],r=new o(t.name,i,t,e);for(let o of e)o.instances.push(r);let s=function(t){let e=[[]];for(let n=0;n<t.length;n++)for(let i=0,r=e.length;i<r;i++)e.push(e[i].concat(t[n]));return e.sort(((t,e)=>e.length-t.length))}(e);for(let o of t.set)if(!o.modified.length)for(let t of s)i.push(a.get(o,t));return r}}function l(t){let e=Object.create(null);for(let n in t){let i=t[n];Array.isArray(i)||(i=[i]);for(let t of n.split(" "))if(t){let n=[],r=2,o=t;for(let e=0;;){if("..."==o&&e>0&&e+3==t.length){r=1;break}let i=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(o);if(!i)throw new RangeError("Invalid path: "+t);if(n.push("*"==i[0]?"":'"'==i[0][0]?JSON.parse(i[0]):i[0]),e+=i[0].length,e==t.length)break;let s=t[e++];if(e==t.length&&"!"==s){r=0;break}if("/"!=s)throw new RangeError("Invalid path: "+t);o=t.slice(e)}let s=n.length-1,a=n[s];if(!a)throw new RangeError("Invalid path: "+t);let l=new u(i,r,s>0?n.slice(0,s):null);e[a]=l.sort(e[a])}}return c.add(e)}const c=new i.uY;class u{constructor(t,e,n,i){this.tags=t,this.mode=e,this.context=n,this.next=i}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(t){return!t||t.depth<this.depth?(this.next=t,this):(t.next=this.sort(t.next),t)}get depth(){return this.context?this.context.length:0}}function h(t,e){let n=Object.create(null);for(let o of t)if(Array.isArray(o.tag))for(let t of o.tag)n[t.id]=o.class;else n[o.tag.id]=o.class;let{scope:i,all:r=null}=e||{};return{style:t=>{let e=r;for(let i of t)for(let t of i.set){let i=n[t.id];if(i){e=e?e+" "+i:i;break}}return e},scope:i}}function f(t,e,n,i=0,r=t.length){let o=new d(i,Array.isArray(e)?e:[e],n);o.highlightRange(t.cursor(),i,r,"",o.highlighters),o.flush(r)}u.empty=new u([],2,null);class d{constructor(t,e,n){this.at=t,this.highlighters=e,this.span=n,this.class=""}startSpan(t,e){e!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=e)}flush(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}highlightRange(t,e,n,r,o){let{type:s,from:a,to:l}=t;if(a>=n||l<=e)return;s.isTop&&(o=this.highlighters.filter((t=>!t.scope||t.scope(s))));let h=r,f=function(t){let e=t.type.prop(c);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}(t)||u.empty,d=function(t,e){let n=null;for(let i of t){let t=i.style(e);t&&(n=n?n+" "+t:t)}return n}(o,f.tags);if(d&&(h&&(h+=" "),h+=d,1==f.mode&&(r+=(r?" ":"")+d)),this.startSpan(Math.max(e,a),h),f.opaque)return;let p=t.tree&&t.tree.prop(i.uY.mounted);if(p&&p.overlay){let i=t.node.enter(p.overlay[0].from+a,1),s=this.highlighters.filter((t=>!t.scope||t.scope(p.tree.type))),c=t.firstChild();for(let u=0,f=a;;u++){let d=u<p.overlay.length?p.overlay[u]:null,g=d?d.from+a:l,m=Math.max(e,f),b=Math.min(n,g);if(m<b&&c)for(;t.from<b&&(this.highlightRange(t,m,b,r,o),this.startSpan(Math.min(b,t.to),h),!(t.to>=g)&&t.nextSibling()););if(!d||g>n)break;f=d.to+a,f>e&&(this.highlightRange(i.cursor(),Math.max(e,d.from+a),Math.min(n,f),"",s),this.startSpan(Math.min(n,f),h))}c&&t.parent()}else if(t.firstChild()){p&&(r="");do{if(!(t.to<=e)){if(t.from>=n)break;this.highlightRange(t,e,n,r,o),this.startSpan(Math.min(n,t.to),h)}}while(t.nextSibling());t.parent()}}}const p=o.define,g=p(),m=p(),b=p(m),v=p(m),y=p(),x=p(y),w=p(y),S=p(),O=p(S),I=p(),k=p(),E=p(),M=p(E),C=p(),A={comment:g,lineComment:p(g),blockComment:p(g),docComment:p(g),name:m,variableName:p(m),typeName:b,tagName:p(b),propertyName:v,attributeName:p(v),className:p(m),labelName:p(m),namespace:p(m),macroName:p(m),literal:y,string:x,docString:p(x),character:p(x),attributeValue:p(x),number:w,integer:p(w),float:p(w),bool:p(y),regexp:p(y),escape:p(y),color:p(y),url:p(y),keyword:I,self:p(I),null:p(I),atom:p(I),unit:p(I),modifier:p(I),operatorKeyword:p(I),controlKeyword:p(I),definitionKeyword:p(I),moduleKeyword:p(I),operator:k,derefOperator:p(k),arithmeticOperator:p(k),logicOperator:p(k),bitwiseOperator:p(k),compareOperator:p(k),updateOperator:p(k),definitionOperator:p(k),typeOperator:p(k),controlOperator:p(k),punctuation:E,separator:p(E),bracket:M,angleBracket:p(M),squareBracket:p(M),paren:p(M),brace:p(M),content:S,heading:O,heading1:p(O),heading2:p(O),heading3:p(O),heading4:p(O),heading5:p(O),heading6:p(O),contentSeparator:p(S),list:p(S),quote:p(S),emphasis:p(S),strong:p(S),link:p(S),monospace:p(S),strikethrough:p(S),inserted:p(),deleted:p(),changed:p(),invalid:p(),meta:C,documentMeta:p(C),annotation:p(C),processingInstruction:p(C),definition:o.defineModifier("definition"),constant:o.defineModifier("constant"),function:o.defineModifier("function"),standard:o.defineModifier("standard"),local:o.defineModifier("local"),special:o.defineModifier("special")};for(let j in A){let t=A[j];t instanceof o&&(t.name=j)}h([{tag:A.link,class:"tok-link"},{tag:A.heading,class:"tok-heading"},{tag:A.emphasis,class:"tok-emphasis"},{tag:A.strong,class:"tok-strong"},{tag:A.keyword,class:"tok-keyword"},{tag:A.atom,class:"tok-atom"},{tag:A.bool,class:"tok-bool"},{tag:A.url,class:"tok-url"},{tag:A.labelName,class:"tok-labelName"},{tag:A.inserted,class:"tok-inserted"},{tag:A.deleted,class:"tok-deleted"},{tag:A.literal,class:"tok-literal"},{tag:A.string,class:"tok-string"},{tag:A.number,class:"tok-number"},{tag:[A.regexp,A.escape,A.special(A.string)],class:"tok-string2"},{tag:A.variableName,class:"tok-variableName"},{tag:A.local(A.variableName),class:"tok-variableName tok-local"},{tag:A.definition(A.variableName),class:"tok-variableName tok-definition"},{tag:A.special(A.variableName),class:"tok-variableName2"},{tag:A.definition(A.propertyName),class:"tok-propertyName tok-definition"},{tag:A.typeName,class:"tok-typeName"},{tag:A.namespace,class:"tok-namespace"},{tag:A.className,class:"tok-className"},{tag:A.macroName,class:"tok-macroName"},{tag:A.propertyName,class:"tok-propertyName"},{tag:A.operator,class:"tok-operator"},{tag:A.comment,class:"tok-comment"},{tag:A.meta,class:"tok-meta"},{tag:A.invalid,class:"tok-invalid"},{tag:A.punctuation,class:"tok-punctuation"}])},168:(t,e,n)=>{"use strict";n.d(e,{Aj:()=>M,Lu:()=>p,U1:()=>C,uC:()=>d});var i=n(9249);class r{constructor(t,e,n,i,r,o,s,a,l,c=0,u){this.p=t,this.stack=e,this.state=n,this.reducePos=i,this.pos=r,this.score=o,this.buffer=s,this.bufferBase=a,this.curContext=l,this.lookAhead=c,this.parent=u}toString(){return`[${this.stack.filter(((t,e)=>e%3==0)).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,n=0){let i=t.parser.context;return new r(t,[],e,n,n,0,[],0,i?new o(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var e;let n=t>>19,i=65535&t,{parser:r}=this.p,o=this.reducePos<this.pos-25;o&&this.setLookAhead(this.pos);let s=r.dynamicPrecedence(i);if(s&&(this.score+=s),0==n)return this.pushState(r.getGoto(this.state,i,!0),this.reducePos),i<r.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,o?8:4,!0),void this.reduceContext(i,this.reducePos);let a=this.stack.length-3*(n-1)-(262144&t?6:0),l=a?this.stack[a-2]:this.p.ranges[0].from,c=this.reducePos-l;c>=2e3&&!(null===(e=this.p.parser.nodeSet.types[i])||void 0===e?void 0:e.isAnonymous)&&(l==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=l,this.p.lastBigReductionSize=c));let u=a?this.stack[a-1]:0,h=this.bufferBase+this.buffer.length-u;if(i<r.minRepeatTerm||131072&t){let t=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,l,t,h+4,!0)}if(262144&t)this.state=this.stack[a];else{let t=this.stack[a-3];this.state=r.getGoto(t,i,!0)}for(;this.stack.length>a;)this.stack.pop();this.reduceContext(i,l)}storeNode(t,e,n,i=4,r=!1){if(0==t&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let t=this,i=this.buffer.length;if(0==i&&t.parent&&(i=t.bufferBase-t.parent.bufferBase,t=t.parent),i>0&&0==t.buffer[i-4]&&t.buffer[i-1]>-1){if(e==n)return;if(t.buffer[i-2]>=e)return void(t.buffer[i-2]=n)}}if(r&&this.pos!=n){let r=this.buffer.length;if(r>0&&0!=this.buffer[r-4]){let t=!1;for(let e=r;e>0&&this.buffer[e-2]>n;e-=4)if(this.buffer[e-1]>=0){t=!0;break}if(t)for(;r>0&&this.buffer[r-2]>n;)this.buffer[r]=this.buffer[r-4],this.buffer[r+1]=this.buffer[r-3],this.buffer[r+2]=this.buffer[r-2],this.buffer[r+3]=this.buffer[r-1],r-=4,i>4&&(i-=4)}this.buffer[r]=t,this.buffer[r+1]=e,this.buffer[r+2]=n,this.buffer[r+3]=i}else this.buffer.push(t,e,n,i)}shift(t,e,n,i){if(131072&t)this.pushState(65535&t,this.pos);else if(262144&t)this.pos=i,this.shiftContext(e,n),e<=this.p.parser.maxNode&&this.buffer.push(e,n,i,4);else{let r=t,{parser:o}=this.p;(i>this.pos||e<=o.maxNode)&&(this.pos=i,o.stateFlag(r,1)||(this.reducePos=i)),this.pushState(r,n),this.shiftContext(e,n),e<=o.maxNode&&this.buffer.push(e,n,i,4)}}apply(t,e,n,i){65536&t?this.reduce(t):this.shift(t,e,n,i)}useNode(t,e){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=t)&&(this.p.reused.push(t),n++);let i=this.pos;this.reducePos=this.pos=i+t.length,this.pushState(e,i),this.buffer.push(n,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(;e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let n=t.buffer.slice(e),i=t.bufferBase+e;for(;t&&i==t.bufferBase;)t=t.parent;return new r(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,i,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let n=t<=this.p.parser.maxNode;n&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,n?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new s(this);;){let n=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(0==n)return!1;if(!(65536&n))return!0;e.reduce(n)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let n=[];for(let i,r=0;r<e.length;r+=2)(i=e[r+1])!=this.state&&this.p.parser.hasAction(i,t)&&n.push(e[r],i);if(this.stack.length<120)for(let t=0;n.length<8&&t<e.length;t+=2){let i=e[t+1];n.some(((t,e)=>1&e&&t==i))||n.push(e[t],i)}e=n}let n=[];for(let i=0;i<e.length&&n.length<4;i+=2){let t=e[i+1];if(t==this.state)continue;let r=this.split();r.pushState(t,this.pos),r.storeNode(0,r.pos,r.pos,4,!0),r.shiftContext(e[i],this.pos),r.reducePos=this.pos,r.score-=200,n.push(r)}return n}forceReduce(){let{parser:t}=this.p,e=t.stateSlot(this.state,5);if(!(65536&e))return!1;if(!t.validAction(this.state,e)){let n=e>>19,i=65535&e,r=this.stack.length-3*n;if(r<0||t.getGoto(this.stack[r],i,!1)<0){let t=this.findForcedReduction();if(null==t)return!1;e=t}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:t}=this.p,e=[],n=(i,r)=>{if(!e.includes(i))return e.push(i),t.allActions(i,(e=>{if(393216&e);else if(65536&e){let n=(e>>19)-r;if(n>1){let i=65535&e,r=this.stack.length-3*n;if(r>=0&&t.getGoto(this.stack[r],i,!1)>=0)return n<<19|65536|i}}else{let t=n(e,r+1);if(null!=t)return t}}))};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:t}=this.p;return 65535==t.data[t.stateSlot(this.state,1)]&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let e=0;e<this.stack.length;e+=3)if(this.stack[e]!=t.stack[e])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(e)))}reduceContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(e)))}emitContext(){let t=this.buffer.length-1;(t<0||-3!=this.buffer[t])&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||-4!=this.buffer[t])&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let e=new o(this.curContext.tracker,t);e.hash!=this.curContext.hash&&this.emitContext(),this.curContext=e}}setLookAhead(t){t>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=t)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class o{constructor(t,e){this.tracker=t,this.context=e,this.hash=t.strict?t.hash(e):0}}class s{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let e=65535&t,n=t>>19;0==n?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(n-1);let i=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=i}}class a{constructor(t,e,n){this.stack=t,this.pos=e,this.index=n,this.buffer=t.buffer,0==this.index&&this.maybeNext()}static create(t,e=t.bufferBase+t.buffer.length){return new a(t,e,e-t.bufferBase)}maybeNext(){let t=this.stack.parent;null!=t&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new a(this.stack,this.pos,this.index)}}function l(t,e=Uint16Array){if("string"!=typeof t)return t;let n=null;for(let i=0,r=0;i<t.length;){let o=0;for(;;){let e=t.charCodeAt(i++),n=!1;if(126==e){o=65535;break}e>=92&&e--,e>=34&&e--;let r=e-32;if(r>=46&&(r-=46,n=!0),o+=r,n)break;o*=46}n?n[r++]=o:n=new e(o)}return n}class c{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const u=new c;class h{constructor(t,e){this.input=t,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=u,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(t,e){let n=this.range,i=this.rangeIndex,r=this.pos+t;for(;r<n.from;){if(!i)return null;let t=this.ranges[--i];r-=n.from-t.to,n=t}for(;e<0?r>n.to:r>=n.to;){if(i==this.ranges.length-1)return null;let t=this.ranges[++i];r+=t.from-n.to,n=t}return r}clipPos(t){if(t>=this.range.from&&t<this.range.to)return t;for(let e of this.ranges)if(e.to>t)return Math.max(t,e.from);return this.end}peek(t){let e,n,i=this.chunkOff+t;if(i>=0&&i<this.chunk.length)e=this.pos+t,n=this.chunk.charCodeAt(i);else{let i=this.resolveOffset(t,1);if(null==i)return-1;if(e=i,e>=this.chunk2Pos&&e<this.chunk2Pos+this.chunk2.length)n=this.chunk2.charCodeAt(e-this.chunk2Pos);else{let t=this.rangeIndex,i=this.range;for(;i.to<=e;)i=this.ranges[++t];this.chunk2=this.input.chunk(this.chunk2Pos=e),e+this.chunk2.length>i.to&&(this.chunk2=this.chunk2.slice(0,i.to-e)),n=this.chunk2.charCodeAt(0)}}return e>=this.token.lookAhead&&(this.token.lookAhead=e+1),n}acceptToken(t,e=0){let n=e?this.resolveOffset(e,-1):this.pos;if(null==n||n<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=t,this.token.end=n}acceptTokenTo(t,e){this.token.value=t,this.token.end=e}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:t,chunkPos:e}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=t,this.chunk2Pos=e,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let t=this.input.chunk(this.pos),e=this.pos+t.length;this.chunk=e>this.range.to?t.slice(0,this.range.to-this.pos):t,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=u,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;t>=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t<this.chunkPos+this.chunk.length?this.chunkOff=t-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(t,e){if(t>=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,e-this.chunk2Pos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);let n="";for(let i of this.ranges){if(i.from>=e)break;i.to>t&&(n+=this.input.read(Math.max(i.from,t),Math.min(i.to,e)))}return n}}class f{constructor(t,e){this.data=t,this.id=e}token(t,e){let{parser:n}=e.p;g(this.data,t,e,this.id,n.data,n.tokenPrecTable)}}f.prototype.contextual=f.prototype.fallback=f.prototype.extend=!1;class d{constructor(t,e,n){this.precTable=e,this.elseToken=n,this.data="string"==typeof t?l(t):t}token(t,e){let n=t.pos,i=0;for(;;){let n=t.next<0,r=t.resolveOffset(1,1);if(g(this.data,t,e,0,this.data,this.precTable),t.token.value>-1)break;if(null==this.elseToken)return;if(n||i++,null==r)break;t.reset(r,t.token)}i&&(t.reset(n,t.token),t.acceptToken(this.elseToken,i))}}d.prototype.contextual=f.prototype.fallback=f.prototype.extend=!1;class p{constructor(t,e={}){this.token=t,this.contextual=!!e.contextual,this.fallback=!!e.fallback,this.extend=!!e.extend}}function g(t,e,n,i,r,o){let s=0,a=1<<i,{dialect:l}=n.p.parser;t:for(;a&t[s];){let n=t[s+1];for(let h=s+3;h<n;h+=2)if((t[h+1]&a)>0){let n=t[h];if(l.allows(n)&&(-1==e.token.value||e.token.value==n||b(n,e.token.value,r,o))){e.acceptToken(n);break}}let i=e.next,c=0,u=t[s+2];if(!(e.next<0&&u>c&&65535==t[n+3*u-3])){for(;c<u;){let r=c+u>>1,o=n+r+(r<<1),a=t[o],l=t[o+1]||65536;if(i<a)u=r;else{if(!(i>=l)){s=t[o+2],e.advance();continue t}c=r+1}}break}s=t[n+3*u-1]}}function m(t,e,n){for(let i,r=e;65535!=(i=t[r]);r++)if(i==n)return r-e;return-1}function b(t,e,n,i){let r=m(n,i,e);return r<0||m(n,i,t)<r}const v="undefined"!=typeof process&&process.env&&/\bparse\b/.test(process.env.LOG);let y=null;function x(t,e,n){let r=t.cursor(i.Qj.IncludeAnonymous);for(r.moveTo(e);;)if(!(n<0?r.childBefore(e):r.childAfter(e)))for(;;){if((n<0?r.to<e:r.from>e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}class w{constructor(t,e){this.fragments=t,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?x(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?x(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(t<this.nextStart)return null;for(;this.fragment&&this.safeTo<=t;)this.nextFragment();if(!this.fragment)return null;for(;;){let e=this.trees.length-1;if(e<0)return this.nextFragment(),null;let n=this.trees[e],r=this.index[e];if(r==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let o=n.children[r],s=this.start[e]+n.positions[r];if(s>t)return this.nextStart=s,null;if(o instanceof i.PH){if(s==t){if(s<this.safeFrom)return null;let t=s+o.length;if(t<=this.safeTo){let e=o.prop(i.uY.lookAhead);if(!e||t+e<this.fragment.to)return o}}this.index[e]++,s+o.length>=Math.max(this.safeFrom,t)&&(this.trees.push(o),this.start.push(s),this.index.push(0))}else this.index[e]++,this.nextStart=s+o.length}}}class S{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map((t=>new c))}getActions(t){let e=0,n=null,{parser:i}=t.p,{tokenizers:r}=i,o=i.stateSlot(t.state,3),s=t.curContext?t.curContext.hash:0,a=0;for(let l=0;l<r.length;l++){if(!(1<<l&o))continue;let i=r[l],c=this.tokens[l];if((!n||i.fallback)&&((i.contextual||c.start!=t.pos||c.mask!=o||c.context!=s)&&(this.updateCachedToken(c,i,t),c.mask=o,c.context=s),c.lookAhead>c.end+25&&(a=Math.max(c.lookAhead,a)),0!=c.value)){let r=e;if(c.extended>-1&&(e=this.addActions(t,c.extended,c.end,e)),e=this.addActions(t,c.value,c.end,e),!i.extend&&(n=c,e>r))break}}for(;this.actions.length>e;)this.actions.pop();return a&&t.setLookAhead(a),n||t.pos!=this.stream.end||(n=new c,n.value=t.p.parser.eofTerm,n.start=n.end=t.pos,e=this.addActions(t,n.value,n.end,e)),this.mainToken=n,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let e=new c,{pos:n,p:i}=t;return e.start=n,e.end=Math.min(n+1,i.stream.end),e.value=n==i.stream.end?i.parser.eofTerm:0,e}updateCachedToken(t,e,n){let i=this.stream.clipPos(n.pos);if(e.token(this.stream.reset(i,t),n),t.value>-1){let{parser:e}=n.p;for(let i=0;i<e.specialized.length;i++)if(e.specialized[i]==t.value){let r=e.specializers[i](this.stream.read(t.start,t.end),n);if(r>=0&&n.p.parser.dialect.allows(r>>1)){1&r?t.extended=r>>1:t.value=r>>1;break}}}else t.value=0,t.end=this.stream.clipPos(i+1)}putAction(t,e,n,i){for(let r=0;r<i;r+=3)if(this.actions[r]==t)return i;return this.actions[i++]=t,this.actions[i++]=e,this.actions[i++]=n,i}addActions(t,e,n,i){let{state:r}=t,{parser:o}=t.p,{data:s}=o;for(let a=0;a<2;a++)for(let t=o.stateSlot(r,a?2:1);;t+=3){if(65535==s[t]){if(1!=s[t+1]){0==i&&2==s[t+1]&&(i=this.putAction(A(s,t+2),e,n,i));break}t=A(s,t+2)}s[t]==e&&(i=this.putAction(A(s,t+1),e,n,i))}return i}}class O{constructor(t,e,n,i){this.parser=t,this.input=e,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new h(e,i),this.tokens=new S(t,this.stream),this.topTerm=t.top[1];let{from:o}=i[0];this.stacks=[r.start(this,t.top[0],o)],this.fragments=n.length&&this.stream.end-o>4*t.bufferLength?new w(n,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t,e,n=this.stacks,i=this.minStackPos,r=this.stacks=[];if(this.bigReductionCount>300&&1==n.length){let[t]=n;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<n.length;o++){let s=n[o];for(;;){if(this.tokens.mainToken=null,s.pos>i)r.push(s);else{if(this.advanceStack(s,r,n))continue;{t||(t=[],e=[]),t.push(s);let n=this.tokens.getMainToken(s);e.push(n.value,n.end)}}break}}if(!r.length){let e=t&&function(t){let e=null;for(let n of t){let t=n.p.stoppedAt;(n.pos==n.p.stream.end||null!=t&&n.pos>t)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}(t);if(e)return v&&console.log("Finish with "+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw v&&t&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+i);this.recovering||(this.recovering=5)}if(this.recovering&&t){let n=null!=this.stoppedAt&&t[0].pos>this.stoppedAt?t[0]:this.runRecovery(t,e,r);if(n)return v&&console.log("Force-finish "+this.stackID(n)),this.stackToTree(n.forceAll())}if(this.recovering){let t=1==this.recovering?1:3*this.recovering;if(r.length>t)for(r.sort(((t,e)=>e.score-t.score));r.length>t;)r.pop();r.some((t=>t.reducePos>i))&&this.recovering--}else if(r.length>1){t:for(let t=0;t<r.length-1;t++){let e=r[t];for(let n=t+1;n<r.length;n++){let i=r[n];if(e.sameState(i)||e.buffer.length>500&&i.buffer.length>500){if(!((e.score-i.score||e.buffer.length-i.buffer.length)>0)){r.splice(t--,1);continue t}r.splice(n--,1)}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let o=1;o<r.length;o++)r[o].pos<this.minStackPos&&(this.minStackPos=r[o].pos);return null}stopAt(t){if(null!=this.stoppedAt&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}advanceStack(t,e,n){let r=t.pos,{parser:o}=this,s=v?this.stackID(t)+" -> ":"";if(null!=this.stoppedAt&&r>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let e=t.curContext&&t.curContext.tracker.strict,n=e?t.curContext.hash:0;for(let a=this.fragments.nodeAt(r);a;){let r=this.parser.nodeSet.types[a.type.id]==a.type?o.getGoto(t.state,a.type.id):-1;if(r>-1&&a.length&&(!e||(a.prop(i.uY.contextHash)||0)==n))return t.useNode(a,r),v&&console.log(s+this.stackID(t)+` (via reuse of ${o.getName(a.type.id)})`),!0;if(!(a instanceof i.PH)||0==a.children.length||a.positions[0]>0)break;let l=a.children[0];if(!(l instanceof i.PH&&0==a.positions[0]))break;a=l}}let a=o.stateSlot(t.state,4);if(a>0)return t.reduce(a),v&&console.log(s+this.stackID(t)+` (via always-reduce ${o.getName(65535&a)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let l=this.tokens.getActions(t);for(let i=0;i<l.length;){let a=l[i++],c=l[i++],u=l[i++],h=i==l.length||!n,f=h?t:t.split(),d=this.tokens.mainToken;if(f.apply(a,c,d?d.start:f.pos,u),v&&console.log(s+this.stackID(f)+` (via ${65536&a?`reduce of ${o.getName(65535&a)}`:"shift"} for ${o.getName(c)} @ ${r}${f==t?"":", split"})`),h)return!0;f.pos>r?e.push(f):n.push(f)}return!1}advanceFully(t,e){let n=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>n)return I(t,e),!0}}runRecovery(t,e,n){let i=null,r=!1;for(let o=0;o<t.length;o++){let s=t[o],a=e[o<<1],l=e[1+(o<<1)],c=v?this.stackID(s)+" -> ":"";if(s.deadEnd){if(r)continue;if(r=!0,s.restart(),v&&console.log(c+this.stackID(s)+" (restarted)"),this.advanceFully(s,n))continue}let u=s.split(),h=c;for(let t=0;u.forceReduce()&&t<10;t++){if(v&&console.log(h+this.stackID(u)+" (via force-reduce)"),this.advanceFully(u,n))break;v&&(h=this.stackID(u)+" -> ")}for(let t of s.recoverByInsert(a))v&&console.log(c+this.stackID(t)+" (via recover-insert)"),this.advanceFully(t,n);this.stream.end>s.pos?(l==s.pos&&(l++,a=0),s.recoverByDelete(a,l),v&&console.log(c+this.stackID(s)+` (via recover-delete ${this.parser.getName(a)})`),I(s,n)):(!i||i.score<s.score)&&(i=s)}return i}stackToTree(t){return t.close(),i.PH.build({buffer:a.create(t),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:t.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(t){let e=(y||(y=new WeakMap)).get(t);return e||y.set(t,e=String.fromCodePoint(this.nextStackID++)),e+t}}function I(t,e){for(let n=0;n<e.length;n++){let i=e[n];if(i.pos==t.pos&&i.sameState(t))return void(e[n].score<t.score&&(e[n]=t))}e.push(t)}class k{constructor(t,e,n){this.source=t,this.flags=e,this.disabled=n}allows(t){return!this.disabled||0==this.disabled[t]}}const E=t=>t;class M{constructor(t){this.start=t.start,this.shift=t.shift||E,this.reduce=t.reduce||E,this.reuse=t.reuse||E,this.hash=t.hash||(()=>0),this.strict=!1!==t.strict}}class C extends i.iX{constructor(t){if(super(),this.wrappers=[],14!=t.version)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let e=t.nodeNames.split(" ");this.minRepeatTerm=e.length;for(let i=0;i<t.repeatNodeCount;i++)e.push("");let n=Object.keys(t.topRules).map((e=>t.topRules[e][1])),r=[];for(let i=0;i<e.length;i++)r.push([]);function o(t,e,n){r[t].push([e,e.deserialize(String(n))])}if(t.nodeProps)for(let a of t.nodeProps){let t=a[0];"string"==typeof t&&(t=i.uY[t]);for(let e=1;e<a.length;){let n=a[e++];if(n>=0)o(n,t,a[e++]);else{let i=a[e+-n];for(let r=-n;r>0;r--)o(a[e++],t,i);e++}}}this.nodeSet=new i.fI(e.map(((e,o)=>i.Z6.define({name:o>=this.minRepeatTerm?void 0:e,id:o,props:r[o],top:n.indexOf(o)>-1,error:0==o,skipped:t.skippedNodes&&t.skippedNodes.indexOf(o)>-1})))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=i.cF;let s=l(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let i=0;i<this.specializerSpecs.length;i++)this.specialized[i]=this.specializerSpecs[i].term;this.specializers=this.specializerSpecs.map(j),this.states=l(t.states,Uint32Array),this.data=l(t.stateData),this.goto=l(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map((t=>"number"==typeof t?new f(s,t):t)),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,e,n){let i=new O(this,t,e,n);for(let r of this.wrappers)i=r(i,t,e,n);return i}getGoto(t,e,n=!1){let i=this.goto;if(e>=i[0])return-1;for(let r=i[e+1];;){let e=i[r++],o=1&e,s=i[r++];if(o&&n)return s;for(let n=r+(e>>1);r<n;r++)if(i[r]==t)return s;if(o)return-1}}hasAction(t,e){let n=this.data;for(let i=0;i<2;i++)for(let r,o=this.stateSlot(t,i?2:1);;o+=3){if(65535==(r=n[o])){if(1!=n[o+1]){if(2==n[o+1])return A(n,o+2);break}r=n[o=A(n,o+2)]}if(r==e||0==r)return A(n,o+1)}return 0}stateSlot(t,e){return this.states[6*t+e]}stateFlag(t,e){return(this.stateSlot(t,0)&e)>0}validAction(t,e){return!!this.allActions(t,(t=>t==e||null))}allActions(t,e){let n=this.stateSlot(t,4),i=n?e(n):void 0;for(let r=this.stateSlot(t,1);null==i;r+=3){if(65535==this.data[r]){if(1!=this.data[r+1])break;r=A(this.data,r+2)}i=e(A(this.data,r+1))}return i}nextStates(t){let e=[];for(let n=this.stateSlot(t,1);;n+=3){if(65535==this.data[n]){if(1!=this.data[n+1])break;n=A(this.data,n+2)}if(!(1&this.data[n+2])){let t=this.data[n+1];e.some(((e,n)=>1&n&&e==t))||e.push(this.data[n],t)}}return e}configure(t){let e=Object.assign(Object.create(C.prototype),this);if(t.props&&(e.nodeSet=this.nodeSet.extend(...t.props)),t.top){let n=this.topRules[t.top];if(!n)throw new RangeError(`Invalid top rule name ${t.top}`);e.top=n}return t.tokenizers&&(e.tokenizers=this.tokenizers.map((e=>{let n=t.tokenizers.find((t=>t.from==e));return n?n.to:e}))),t.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map(((n,i)=>{let r=t.specializers.find((t=>t.from==n.external));if(!r)return n;let o=Object.assign(Object.assign({},n),{external:r.to});return e.specializers[i]=j(o),o}))),t.contextTracker&&(e.context=t.contextTracker),t.dialect&&(e.dialect=this.parseDialect(t.dialect)),null!=t.strict&&(e.strict=t.strict),t.wrap&&(e.wrappers=e.wrappers.concat(t.wrap)),null!=t.bufferLength&&(e.bufferLength=t.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let e=this.dynamicPrecedences;return null==e?0:e[t]||0}parseDialect(t){let e=Object.keys(this.dialects),n=e.map((()=>!1));if(t)for(let r of t.split(" ")){let t=e.indexOf(r);t>=0&&(n[t]=!0)}let i=null;for(let r=0;r<e.length;r++)if(!n[r])for(let t,n=this.dialects[e[r]];65535!=(t=this.data[n++]);)(i||(i=new Uint8Array(this.maxTerm+1)))[t]=1;return new k(t,n,i)}static deserialize(t){return new C(t)}}function A(t,e){return t[e]|t[e+1]<<16}function j(t){if(t.external){let e=t.extend?1:0;return(n,i)=>t.external(n,i)<<1|e}return t.get}},8709:(t,e,n)=>{"use strict";n.d(e,{G:()=>s});const i="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),r="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class s{constructor(t,e){this.rules=[];let{finish:n}=e||{};function i(t){return/^@/.test(t)?[t]:t.split(/,\s*/)}function r(t,e,o,s){let a=[],l=/^@(\w+)\b/.exec(t[0]),c=l&&"keyframes"==l[1];if(l&&null==e)return o.push(t[0]+";");for(let n in e){let s=e[n];if(/&/.test(n))r(n.split(/,\s*/).map((e=>t.map((t=>e.replace(/&/,t))))).reduce(((t,e)=>t.concat(e))),s,o);else if(s&&"object"==typeof s){if(!l)throw new RangeError("The value of a property ("+n+") should be a primitive value.");r(i(n),s,a,c)}else null!=s&&a.push(n.replace(/_.*/,"").replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))+": "+s+";")}(a.length||c)&&o.push((!n||l||s?t:t.map(n)).join(", ")+" {"+a.join(" ")+"}")}for(let o in t)r(i(o),t[o],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let t=o[i]||1;return o[i]=t+1,"ͼ"+t.toString(36)}static mount(t,e,n){let i=t[r],o=n&&n.nonce;i?o&&i.setNonce(o):i=new l(t,o),i.mount(Array.isArray(e)?e:[e],t)}}let a=new Map;class l{constructor(t,e){let n=t.ownerDocument||t,i=n.defaultView;if(!t.head&&t.adoptedStyleSheets&&i.CSSStyleSheet){let e=a.get(n);if(e)return t[r]=e;this.sheet=new i.CSSStyleSheet,a.set(n,this)}else this.styleTag=n.createElement("style"),e&&this.styleTag.setAttribute("nonce",e);this.modules=[],t[r]=this}mount(t,e){let n=this.sheet,i=0,r=0;for(let o=0;o<t.length;o++){let e=t[o],s=this.modules.indexOf(e);if(s<r&&s>-1&&(this.modules.splice(s,1),r--,s=-1),-1==s){if(this.modules.splice(r++,0,e),n)for(let t=0;t<e.rules.length;t++)n.insertRule(e.rules[t],i++)}else{for(;r<s;)i+=this.modules[r++].rules.length;i+=e.rules.length,r++}}if(n)e.adoptedStyleSheets.indexOf(this.sheet)<0&&(e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets]);else{let t="";for(let e=0;e<this.modules.length;e++)t+=this.modules[e].getRules()+"\n";this.styleTag.textContent=t;let n=e.head||e;this.styleTag.parentNode!=n&&n.insertBefore(this.styleTag,n.firstChild)}}setNonce(t){this.styleTag&&this.styleTag.getAttribute("nonce")!=t&&this.styleTag.setAttribute("nonce",t)}}}},t=>{var e,n=(e=4791,t(t.s=e));(WPRecipeMakerAdmin=void 0===WPRecipeMakerAdmin?{}:WPRecipeMakerAdmin)["wp-recipe-maker/dist/admin-settings"]=n}]);