commit cb0f10e750b61426e02680030e40d8375a396e72 Author: Arash_M Date: Mon Jun 8 13:28:08 2026 +0330 Back up Chrome extension gjapjdfoanfgoeliolnigeieiibnefkp diff --git a/README.md b/README.md new file mode 100644 index 0000000..400be80 --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +# Google Meet Transcripts & AI Summary + +Backup of the unpacked Chrome extension source installed on this machine. + +- Extension ID: `gjapjdfoanfgoeliolnigeieiibnefkp` +- Version: `4.3.12` +- Description: Google Meet Transcription, AI Summary and Insight. Get the most out of Google Meet! +- Original source path: `D:\projects\google_meet_captions\Google Meet Transcripts & AI Summary` + +The `releases/` directory contains a ZIP backup of the extension source. + +MCP integration is planned. diff --git a/analytics.js b/analytics.js new file mode 100644 index 0000000..3aefffc --- /dev/null +++ b/analytics.js @@ -0,0 +1 @@ +//!function(e,t,c,r,n,s){e.GoogleAnalyticsObject=r,e[r]=e[r]||function(){(e[r].q=e[r].q||[]).push(arguments)},e[r].l=1*new Date,n=t.createElement(c),s=t.getElementsByTagName(c)[0],n.async=1,n.src=chrome.runtime.getURL("analytics/analyticsSource.js"),n.id="laxis-track",s.parentNode.insertBefore(n,s)}(window,document,"script","ga");let firstScript=document.getElementsByTagName("script")[1],s=document.createElement("script");s.src=chrome.runtime.getURL("analytics/load.js"),firstScript.parentNode.insertBefore(s,firstScript); \ No newline at end of file diff --git a/config/panel.js b/config/panel.js new file mode 100644 index 0000000..dba5c92 --- /dev/null +++ b/config/panel.js @@ -0,0 +1 @@ +let currentRight="1px",currentTop="100px",startTime=new Date,sessionList=[],bookmarkList=[{color:"crimson",enable:!1,name:"Important",code:"#E94B4B",attributes:{width:"15",height:"18",viewBox:"0 0 15 18",fill:"none"},content:[{type:"path",attributes:{d:"M1 11.8277H13.5105C13.682 11.8277 13.8499 11.7788 13.9945 11.6867C14.1392 11.5947 14.2546 11.4634 14.3274 11.3081C14.4001 11.1528 14.427 10.98 14.4051 10.81C14.3832 10.64 14.3132 10.4797 14.2035 10.3479L10.9254 6.41387L14.2035 2.47979C14.3132 2.34805 14.3832 2.18778 14.4051 2.01773C14.427 1.84769 14.4001 1.67492 14.3274 1.51965C14.2546 1.36438 14.1392 1.23304 13.9945 1.14101C13.8499 1.04898 13.682 1.00006 13.5105 1H1V17.2416",fill:"#E94B4B"}},{type:"path",attributes:{d:"M1 11.8277H13.5105C13.682 11.8277 13.8499 11.7788 13.9945 11.6867C14.1392 11.5947 14.2546 11.4634 14.3274 11.3081C14.4001 11.1528 14.427 10.98 14.4051 10.81C14.3832 10.64 14.3132 10.4797 14.2035 10.3479L10.9254 6.41387L14.2035 2.47979C14.3132 2.34805 14.3832 2.18778 14.4051 2.01773C14.427 1.84769 14.4001 1.67492 14.3274 1.51965C14.2546 1.36438 14.1392 1.23304 13.9945 1.14101C13.8499 1.04898 13.682 1.00006 13.5105 1H1V17.2416",stroke:"#E94B4B","stroke-linecap":"round","stroke-linejoin":"round"}}]},{color:"gold",enable:!1,name:"Follow up",code:"#FFD339",attributes:{width:"15",height:"18",viewBox:"0 0 15 18",fill:"none"},content:[{type:"path",attributes:{d:"M1 11.8277H13.5105C13.682 11.8277 13.8499 11.7788 13.9945 11.6867C14.1392 11.5947 14.2546 11.4634 14.3274 11.3081C14.4001 11.1528 14.427 10.98 14.4051 10.81C14.3832 10.64 14.3132 10.4797 14.2035 10.3479L10.9254 6.41387L14.2035 2.47979C14.3132 2.34805 14.3832 2.18778 14.4051 2.01773C14.427 1.84769 14.4001 1.67492 14.3274 1.51965C14.2546 1.36438 14.1392 1.23304 13.9945 1.14101C13.8499 1.04898 13.682 1.00006 13.5105 1H1V17.2416",fill:"#FFD339"}},{type:"path",attributes:{d:"M1 11.8277H13.5105C13.682 11.8277 13.8499 11.7788 13.9945 11.6867C14.1392 11.5947 14.2546 11.4634 14.3274 11.3081C14.4001 11.1528 14.427 10.98 14.4051 10.81C14.3832 10.64 14.3132 10.4797 14.2035 10.3479L10.9254 6.41387L14.2035 2.47979C14.3132 2.34805 14.3832 2.18778 14.4051 2.01773C14.427 1.84769 14.4001 1.67492 14.3274 1.51965C14.2546 1.36438 14.1392 1.23304 13.9945 1.14101C13.8499 1.04898 13.682 1.00006 13.5105 1H1V17.2416",stroke:"#FFD339","stroke-linecap":"round","stroke-linejoin":"round"}}]},{color:"yellowGreen",enable:!1,name:"Action",code:"#9CCC65",attributes:{width:"15",height:"18",viewBox:"0 0 15 18",fill:"none"},content:[{type:"path",attributes:{d:"M1 11.8277H13.5105C13.682 11.8277 13.8499 11.7788 13.9945 11.6867C14.1392 11.5947 14.2546 11.4634 14.3274 11.3081C14.4001 11.1528 14.427 10.98 14.4051 10.81C14.3832 10.64 14.3132 10.4797 14.2035 10.3479L10.9254 6.41387L14.2035 2.47979C14.3132 2.34805 14.3832 2.18778 14.4051 2.01773C14.427 1.84769 14.4001 1.67492 14.3274 1.51965C14.2546 1.36438 14.1392 1.23304 13.9945 1.14101C13.8499 1.04898 13.682 1.00006 13.5105 1H1V17.2416",fill:"#9CCC65"}},{type:"path",attributes:{d:"M1 11.8277H13.5105C13.682 11.8277 13.8499 11.7788 13.9945 11.6867C14.1392 11.5947 14.2546 11.4634 14.3274 11.3081C14.4001 11.1528 14.427 10.98 14.4051 10.81C14.3832 10.64 14.3132 10.4797 14.2035 10.3479L10.9254 6.41387L14.2035 2.47979C14.3132 2.34805 14.3832 2.18778 14.4051 2.01773C14.427 1.84769 14.4001 1.67492 14.3274 1.51965C14.2546 1.36438 14.1392 1.23304 13.9945 1.14101C13.8499 1.04898 13.682 1.00006 13.5105 1H1V17.2416",stroke:"#9CCC65","stroke-linecap":"round","stroke-linejoin":"round"}}]}];const dateStr=(startTime.getMonth()>8?startTime.getMonth()+1:"0"+(startTime.getMonth()+1))+"-"+(startTime.getDate()>9?startTime.getDate():"0"+startTime.getDate())+"-"+startTime.getFullYear();let autoSaveInterval,meetingStatus=0; \ No newline at end of file diff --git a/config/record.js b/config/record.js new file mode 100644 index 0000000..0aeec8c --- /dev/null +++ b/config/record.js @@ -0,0 +1 @@ +const CACHE=[],KEY_TRANSCRIPT_IDS="hangouts",CURRENT_INTERVAL="current_interval",ERROR_SAVING="error_saving",APPLICATION_SPEECH_IDS="speeches",SEARCH_TEXT_NO_MEETING_NAME="Meeting details";let SPEAKER_NAME_MAP,TRANSCRIPT_FORMAT_SPEAKER,TRANSCRIPT_FORMAT_SPEAKER_JOIN,TRANSCRIPT_FORMAT_SESSION_JOIN,TRANSCRIPT_FORMAT_MEETING,DEBUG;const XPATH_SELECTOR_PARTICIPANTS="//div[@aria-label='Show everyone']//*[@d='M15 8c0-1.42-.5-2.73-1.33-3.76.42-.14.86-.24 1.33-.24 2.21 0 4 1.79 4 4s-1.79 4-4 4c-.43 0-.84-.09-1.23-.21-.03-.01-.06-.02-.1-.03A5.98 5.98 0 0 0 15 8zm1.66 5.13C18.03 14.06 19 15.32 19 17v3h4v-3c0-2.18-3.58-3.47-6.34-3.87zM9 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 9c-2.7 0-5.8 1.29-6 2.01V18h12v-1c-.2-.71-3.3-2-6-2M9 4c2.21 0 4 1.79 4 4s-1.79 4-4 4-4-1.79-4-4 1.79-4 4-4zm0 9c2.67 0 8 1.34 8 4v3H1v-3c0-2.66 5.33-4 8-4z']",XPATH_SELECTOR_PARTICIPANTS_V20210602="//button[@aria-label='Show everyone'] | //button[@aria-label='Mostrar a todos'] | //button[@aria-label='显示所有人'] |//button[@aria-label='顯示所有參與者'] |//button[@aria-label='顯示所有人'] | //button[@aria-label='Alle anzeigen'] | //button[@aria-label='Afficher tout le monde'] | //button[@aria-label='全員を表示'] | //button[@aria-label='Mostra tutti'] | //button[@aria-label='Mostrar todas as pessoas'] | //button[@aria-label='Mostrar todos']",XPATH_MEETING_DETAILS='//div[contains(@jscontroller,"rYZP8b")] | //div[@aria-label="Meeting details"]',XPATH_MEETING_DETAILS_V20210602="//button[@aria-label='Meeting details']",XPATH_SELECTOR_CHAT="//div[@aria-label='Chat with everyone']//*[@d='M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H4V4h16v12z']",XPATH_SELECTOR_CHAT_V20210602="//button[@aria-label='Chat with everyone'] | //button[@aria-label='Chatear con todos'] | //button[@aria-label='与所有人聊天'] | //button[@aria-label='與所有參與者進行即時通訊'] | //button[@aria-label='同所有人即時通訊'] | //button[@aria-label='Mit allen chatten'] | //button[@aria-label='Clavarder avec tout le monde'] | //button[@aria-label='全員とチャット'] | //button[@aria-label='Chatta con tutti'] | //button[@aria-label='Conversar com todos'] | //button[@aria-label='Discuter avec tous les participants'] | //button[@aria-label='Chat com todos']",turnOnText=["Turn on captions","Untertitel aktivieren","Activer les sous-titres","Activar subtítulos","Attiva sottotitoli","字幕をオンにする","开启字幕","開啟字幕"],turnOffText=["Turn off captions","Untertitel deaktivieren","Désactiver les sous-titres","Desactivar subtítulos","Disattiva sottotitoli","字幕をオフにする","关闭字幕","關閉字幕"],XPATH_TURN_ON_CAPTIONS_BUTTON=turnOnText.map((t=>`//div[text()='${t}']/ancestor::div[@role='button']`)).join(" | "),XPATH_TURN_ON_CAPTIONS_BUTTON_V20210602=turnOnText.map((t=>`//button[contains(@aria-label, '${t}')]`)).join(" | "),XPATH_TURN_OFF_CAPTIONS_BUTTON=turnOffText.map((t=>`//div[text()='${t}']/ancestor::div[@role='button']`)).join(" | "),XPATH_TURN_OFF_CAPTIONS_BUTTON_V20210602=turnOffText.map((t=>`//button[contains(@aria-label, '${t}')]`)).join(" | "),XPATH_CAPTION_OPEN_TOAST="//div[contains(@id, 'J9Hpafc')]",XPATH_CAPTION_OPEN_TOAST_V20210602="//div[contains(@id, 'J9Hpafc')]",XPATH_TITLE="//div[contains(@jscontroller,'WEGDee')]",XPATH_TITLE_V20220324="//div[contains(@jscontroller,'yEvoid')]",XPATH_TITLE_TOOLTIP="//div[contains(@id,'tooltip-c15')]";let captionsContainer=null,closedCaptionsAttachInterval=null,isTranscribing=!1,weTurnedCaptionsOn=!1,currentTranscriptId=null,currentSessionIndex=null,firstStart=!0,loadLocalStorage=0,startTimeStored=null,loginStatus=0,appUser="You";const SHORTCUT_KEY="DEBUG"; \ No newline at end of file diff --git a/config/share.js b/config/share.js new file mode 100644 index 0000000..7762c20 --- /dev/null +++ b/config/share.js @@ -0,0 +1 @@ +const domainUrl="https://app.laxis.tech",extensionId=chrome.runtime.id,loginUrl=domainUrl+"/login?source=chrome-extension&extensionId="+extensionId,upgradeUrl=domainUrl+"/settings/plan",signupUrl=domainUrl+"/signup?source=chrome-extension&extensionId="+extensionId,googleMeetUrl="https://meet.google.com/*"; \ No newline at end of file diff --git a/feature/panel/icons.js b/feature/panel/icons.js new file mode 100644 index 0000000..df3fce3 --- /dev/null +++ b/feature/panel/icons.js @@ -0,0 +1 @@ +const createRemindLoginIcon=()=>createSVGIcon({viewBox:"0 0 40 40",fill:"none",height:"40",width:"40"},[{type:"path",attributes:{d:"M40 20C40 31.0457 31.0457 40 20 40C8.9543 40 0 31.0457 0 20C0 8.9543 8.9543 0 20 0C31.0457 0 40 8.9543 40 20Z",fill:"#A32A2C"}},{type:"path",attributes:{d:"M9.64893 23.0845V23.9277H5.73877V23.0845H9.64893ZM5.94287 16.1074V23.9277H4.90625V16.1074H5.94287Z",fill:"white"}},{type:"path",attributes:{d:"M16.5024 19.7705V20.2646C16.5024 20.8519 16.429 21.3783 16.2822 21.8438C16.1354 22.3092 15.9242 22.7049 15.6484 23.0308C15.3727 23.3566 15.0415 23.6055 14.6548 23.7773C14.2716 23.9492 13.842 24.0352 13.3657 24.0352C12.9038 24.0352 12.4795 23.9492 12.0928 23.7773C11.7096 23.6055 11.3766 23.3566 11.0938 23.0308C10.8145 22.7049 10.5978 22.3092 10.4438 21.8438C10.2899 21.3783 10.2129 20.8519 10.2129 20.2646V19.7705C10.2129 19.1833 10.2881 18.6587 10.4385 18.1968C10.5924 17.7313 10.8091 17.3356 11.0884 17.0098C11.3677 16.6803 11.6989 16.4297 12.082 16.2578C12.4688 16.0859 12.8931 16 13.355 16C13.8312 16 14.2609 16.0859 14.644 16.2578C15.0308 16.4297 15.362 16.6803 15.6377 17.0098C15.917 17.3356 16.13 17.7313 16.2769 18.1968C16.4272 18.6587 16.5024 19.1833 16.5024 19.7705ZM15.4766 20.2646V19.7598C15.4766 19.2943 15.4282 18.8825 15.3315 18.5244C15.2384 18.1663 15.1006 17.8656 14.918 17.6221C14.7354 17.3786 14.5116 17.1942 14.2466 17.0688C13.9852 16.9435 13.688 16.8809 13.355 16.8809C13.0327 16.8809 12.7409 16.9435 12.4795 17.0688C12.2217 17.1942 11.9997 17.3786 11.8135 17.6221C11.6309 17.8656 11.4894 18.1663 11.3892 18.5244C11.2889 18.8825 11.2388 19.2943 11.2388 19.7598V20.2646C11.2388 20.7337 11.2889 21.1491 11.3892 21.5107C11.4894 21.8688 11.6326 22.1714 11.8188 22.4185C12.0086 22.6619 12.2324 22.8464 12.4902 22.9717C12.7516 23.097 13.0435 23.1597 13.3657 23.1597C13.7023 23.1597 14.0013 23.097 14.2627 22.9717C14.5241 22.8464 14.7443 22.6619 14.9233 22.4185C15.106 22.1714 15.2438 21.8688 15.3369 21.5107C15.43 21.1491 15.4766 20.7337 15.4766 20.2646Z",fill:"white"}},{type:"path",attributes:{d:"M23.834 20.0337V22.8965C23.7373 23.0397 23.5833 23.2008 23.3721 23.3799C23.1608 23.5553 22.869 23.7093 22.4966 23.8418C22.1278 23.9707 21.6515 24.0352 21.0679 24.0352C20.5916 24.0352 20.153 23.9528 19.752 23.7881C19.3545 23.6198 19.009 23.3763 18.7153 23.0576C18.4253 22.7354 18.1997 22.3451 18.0386 21.8867C17.881 21.4248 17.8022 20.902 17.8022 20.3184V19.7114C17.8022 19.1278 17.8703 18.6068 18.0063 18.1484C18.146 17.6901 18.3501 17.3016 18.6187 16.9829C18.8872 16.6606 19.2166 16.4172 19.6069 16.2524C19.9972 16.0841 20.4448 16 20.9497 16C21.5477 16 22.0472 16.1038 22.4482 16.3115C22.8529 16.5156 23.168 16.7985 23.3936 17.1602C23.6227 17.5218 23.7695 17.9336 23.834 18.3955H22.7974C22.7508 18.1126 22.6577 17.8548 22.5181 17.6221C22.382 17.3893 22.1868 17.2031 21.9326 17.0635C21.6784 16.9202 21.3507 16.8486 20.9497 16.8486C20.5881 16.8486 20.2747 16.9149 20.0098 17.0474C19.7448 17.1799 19.5264 17.3696 19.3545 17.6167C19.1826 17.8638 19.0537 18.1628 18.9678 18.5137C18.8854 18.8646 18.8442 19.2603 18.8442 19.7007V20.3184C18.8442 20.7695 18.8962 21.1724 19 21.5269C19.1074 21.8813 19.2596 22.1839 19.4565 22.4346C19.6535 22.6816 19.888 22.8696 20.1602 22.9985C20.4359 23.1274 20.7402 23.1919 21.0732 23.1919C21.4421 23.1919 21.741 23.1615 21.9702 23.1006C22.1994 23.0361 22.3784 22.9609 22.5073 22.875C22.6362 22.7855 22.7347 22.7013 22.8027 22.6226V20.8716H20.9927V20.0337H23.834Z",fill:"white"}},{type:"path",attributes:{d:"M26.6646 16.1074V23.9277H25.6279V16.1074H26.6646Z",fill:"white"}},{type:"path",attributes:{d:"M34.5654 16.1074V23.9277H33.5234L29.5864 17.896V23.9277H28.5498V16.1074H29.5864L33.5396 22.1553V16.1074H34.5654Z",fill:"white"}}]),createExpandIcon=()=>createSVGIcon({viewBox:"0 0 19 19",fill:"none",height:"19",width:"19"},[{type:"path",attributes:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.92036 12.0793C6.80901 11.968 6.65802 11.9055 6.50058 11.9055C6.34314 11.9055 6.19214 11.968 6.0808 12.0793L1.2168 16.9433V13.6563C1.2168 13.4989 1.15424 13.3479 1.04289 13.2365C0.931542 13.1252 0.780519 13.0626 0.623047 13.0626C0.465575 13.0626 0.314552 13.1252 0.203202 13.2365C0.0918525 13.3479 0.0292969 13.4989 0.0292969 13.6563V18.3767C0.0292969 18.5341 0.0918525 18.6852 0.203202 18.7965C0.314552 18.9079 0.465575 18.9704 0.623047 18.9704H5.34336C5.50083 18.9704 5.65185 18.9079 5.7632 18.7965C5.87455 18.6852 5.93711 18.5341 5.93711 18.3767C5.93711 18.2192 5.87455 18.0682 5.7632 17.9568C5.65185 17.8455 5.50083 17.7829 5.34336 17.7829H2.05636L6.92036 12.9189C7.03167 12.8076 7.0942 12.6566 7.0942 12.4991C7.0942 12.3417 7.03167 12.1907 6.92036 12.0793V12.0793ZM12.0789 6.92085C12.1902 7.03216 12.3412 7.09469 12.4986 7.09469C12.6561 7.09469 12.8071 7.03216 12.9184 6.92085L17.7824 2.05685V5.34385C17.7824 5.50132 17.845 5.65234 17.9563 5.76369C18.0677 5.87504 18.2187 5.9376 18.3762 5.9376C18.5336 5.9376 18.6847 5.87504 18.796 5.76369C18.9074 5.65234 18.9699 5.50132 18.9699 5.34385V0.623535C18.9699 0.466063 18.9074 0.31504 18.796 0.20369C18.6847 0.0923408 18.5336 0.0297852 18.3762 0.0297852H13.6559C13.4984 0.0297852 13.3474 0.0923408 13.236 0.20369C13.1247 0.31504 13.0621 0.466063 13.0621 0.623535C13.0621 0.781007 13.1247 0.93203 13.236 1.04338C13.3474 1.15473 13.4984 1.21729 13.6559 1.21729H16.9429L12.0789 6.08128C11.9675 6.19263 11.905 6.34363 11.905 6.50107C11.905 6.65851 11.9675 6.8095 12.0789 6.92085V6.92085Z",fill:"#9E9E9E"}}]),createCollapseIcon=()=>createSVGIcon({height:"19",width:"19",viewBox:"0 0 19 19",fill:"none"},[{type:"path",attributes:{d:"M19.3327 8H12.9393L19.106 1.83333C19.2152 1.7058 19.2723 1.54175 19.2658 1.37396C19.2593 1.20618 19.1898 1.04702 19.0711 0.928291C18.9523 0.809562 18.7932 0.740007 18.6254 0.733526C18.4576 0.727045 18.2935 0.784116 18.166 0.893333L11.9993 7.06V0.666667C11.9993 0.489856 11.9291 0.320286 11.8041 0.195262C11.6791 0.0702379 11.5095 0 11.3327 0C11.1559 0 10.9863 0.0702379 10.8613 0.195262C10.7363 0.320286 10.666 0.489856 10.666 0.666667V9.33333H19.3327C19.5095 9.33333 19.6791 9.2631 19.8041 9.13807C19.9291 9.01305 19.9993 8.84348 19.9993 8.66667C19.9993 8.48986 19.9291 8.32029 19.8041 8.19526C19.6791 8.07024 19.5095 8 19.3327 8Z",fill:"#9E9E9E"}},{type:"path",attributes:{d:"M0.666667 10.6665C0.489856 10.6665 0.320286 10.7367 0.195262 10.8618C0.0702379 10.9868 0 11.1564 0 11.3332C0 11.51 0.0702379 11.6796 0.195262 11.8046C0.320286 11.9296 0.489856 11.9998 0.666667 11.9998H7.06L0.886667 18.1665C0.816879 18.2263 0.760198 18.2998 0.720183 18.3825C0.680167 18.4652 0.657681 18.5553 0.654134 18.6471C0.650588 18.7389 0.666059 18.8305 0.699575 18.9161C0.733091 19.0016 0.78393 19.0793 0.8489 19.1443C0.91387 19.2092 0.991568 19.2601 1.07712 19.2936C1.16267 19.3271 1.25422 19.3426 1.34604 19.339C1.43785 19.3355 1.52794 19.313 1.61065 19.273C1.69336 19.233 1.7669 19.1763 1.82667 19.1065L8 12.9398V19.3332C8 19.51 8.07024 19.6796 8.19526 19.8046C8.32029 19.9296 8.48986 19.9998 8.66667 19.9998C8.84348 19.9998 9.01305 19.9296 9.13807 19.8046C9.2631 19.6796 9.33333 19.51 9.33333 19.3332V10.6665H0.666667Z",fill:"#9E9E9E"}}]),createCrimsonBookmarkIcon=()=>createSVGIcon({width:"15",height:"18",viewBox:"0 0 15 18",fill:"none"},[{type:"path",attributes:{d:"M1 11.8277H13.5105C13.682 11.8277 13.8499 11.7788 13.9945 11.6867C14.1392 11.5947 14.2546 11.4634 14.3274 11.3081C14.4001 11.1528 14.427 10.98 14.4051 10.81C14.3832 10.64 14.3132 10.4797 14.2035 10.3479L10.9254 6.41387L14.2035 2.47979C14.3132 2.34805 14.3832 2.18778 14.4051 2.01773C14.427 1.84769 14.4001 1.67492 14.3274 1.51965C14.2546 1.36438 14.1392 1.23304 13.9945 1.14101C13.8499 1.04898 13.682 1.00006 13.5105 1H1V17.2416",fill:"#E94B4B"}},{type:"path",attributes:{d:"M1 11.8277H13.5105C13.682 11.8277 13.8499 11.7788 13.9945 11.6867C14.1392 11.5947 14.2546 11.4634 14.3274 11.3081C14.4001 11.1528 14.427 10.98 14.4051 10.81C14.3832 10.64 14.3132 10.4797 14.2035 10.3479L10.9254 6.41387L14.2035 2.47979C14.3132 2.34805 14.3832 2.18778 14.4051 2.01773C14.427 1.84769 14.4001 1.67492 14.3274 1.51965C14.2546 1.36438 14.1392 1.23304 13.9945 1.14101C13.8499 1.04898 13.682 1.00006 13.5105 1H1V17.2416",stroke:"#E94B4B","stroke-linecap":"round","stroke-linejoin":"round"}}]),createGoldIcon=()=>createSVGIcon({width:"15",height:"18",viewBox:"0 0 15 18",fill:"none"},[{type:"path",attributes:{d:"M1 11.8277H13.5105C13.682 11.8277 13.8499 11.7788 13.9945 11.6867C14.1392 11.5947 14.2546 11.4634 14.3274 11.3081C14.4001 11.1528 14.427 10.98 14.4051 10.81C14.3832 10.64 14.3132 10.4797 14.2035 10.3479L10.9254 6.41387L14.2035 2.47979C14.3132 2.34805 14.3832 2.18778 14.4051 2.01773C14.427 1.84769 14.4001 1.67492 14.3274 1.51965C14.2546 1.36438 14.1392 1.23304 13.9945 1.14101C13.8499 1.04898 13.682 1.00006 13.5105 1H1V17.2416",fill:"#FFD339"}},{type:"path",attributes:{d:"M1 11.8277H13.5105C13.682 11.8277 13.8499 11.7788 13.9945 11.6867C14.1392 11.5947 14.2546 11.4634 14.3274 11.3081C14.4001 11.1528 14.427 10.98 14.4051 10.81C14.3832 10.64 14.3132 10.4797 14.2035 10.3479L10.9254 6.41387L14.2035 2.47979C14.3132 2.34805 14.3832 2.18778 14.4051 2.01773C14.427 1.84769 14.4001 1.67492 14.3274 1.51965C14.2546 1.36438 14.1392 1.23304 13.9945 1.14101C13.8499 1.04898 13.682 1.00006 13.5105 1H1V17.2416",stroke:"#FFD339","stroke-linecap":"round","stroke-linejoin":"round"}}]),createYellowGreen=()=>createSVGIcon({width:"15",height:"18",viewBox:"0 0 15 18",fill:"none"},[{type:"path",attributes:{d:"M1 11.8277H13.5105C13.682 11.8277 13.8499 11.7788 13.9945 11.6867C14.1392 11.5947 14.2546 11.4634 14.3274 11.3081C14.4001 11.1528 14.427 10.98 14.4051 10.81C14.3832 10.64 14.3132 10.4797 14.2035 10.3479L10.9254 6.41387L14.2035 2.47979C14.3132 2.34805 14.3832 2.18778 14.4051 2.01773C14.427 1.84769 14.4001 1.67492 14.3274 1.51965C14.2546 1.36438 14.1392 1.23304 13.9945 1.14101C13.8499 1.04898 13.682 1.00006 13.5105 1H1V17.2416",fill:"#9CCC65"}},{type:"path",attributes:{d:"M1 11.8277H13.5105C13.682 11.8277 13.8499 11.7788 13.9945 11.6867C14.1392 11.5947 14.2546 11.4634 14.3274 11.3081C14.4001 11.1528 14.427 10.98 14.4051 10.81C14.3832 10.64 14.3132 10.4797 14.2035 10.3479L10.9254 6.41387L14.2035 2.47979C14.3132 2.34805 14.3832 2.18778 14.4051 2.01773C14.427 1.84769 14.4001 1.67492 14.3274 1.51965C14.2546 1.36438 14.1392 1.23304 13.9945 1.14101C13.8499 1.04898 13.682 1.00006 13.5105 1H1V17.2416",stroke:"#9CCC65","stroke-linecap":"round","stroke-linejoin":"round"}}]),createCaptionOnIcon=()=>createSVGIcon({width:"21",height:"17",viewBox:"0 0 21 17",fill:"none"},[{type:"path",attributes:{d:"M7.69253 4.64127C8.22123 4.71644 8.73462 4.89912 9.11032 5.18446C9.17573 5.23425 9.23019 5.2958 9.27059 5.3656C9.31098 5.43539 9.33653 5.51208 9.34576 5.59127C9.355 5.67045 9.34774 5.7506 9.32441 5.82712C9.30107 5.90364 9.26212 5.97504 9.20977 6.03724C9.15742 6.09945 9.09269 6.15124 9.0193 6.18966C8.9459 6.22807 8.86526 6.25237 8.78199 6.26115C8.69872 6.26993 8.61445 6.26303 8.53398 6.24084C8.45352 6.21865 8.37844 6.1816 8.31303 6.13182C8.15748 6.013 7.87443 5.89255 7.50553 5.84082C7.13316 5.7864 6.75253 5.81631 6.39459 5.92812C6.0444 6.0429 5.73245 6.24579 5.5038 6.5667C5.2743 6.88922 5.09921 7.37017 5.09921 8.08312C5.09921 8.79606 5.2743 9.27701 5.5038 9.59953C5.7333 9.92044 6.0444 10.1233 6.39459 10.2381C6.75159 10.3537 7.14514 10.3755 7.50638 10.3254C7.87443 10.2729 8.15748 10.1532 8.31388 10.0344C8.44598 9.93397 8.61463 9.88756 8.78272 9.90537C8.95081 9.92318 9.10458 10.0038 9.21019 10.1294C9.31581 10.255 9.36462 10.4154 9.34589 10.5752C9.32716 10.7351 9.24242 10.8813 9.11032 10.9818C8.73462 11.2671 8.22123 11.4506 7.69253 11.525C7.11852 11.6075 6.5321 11.5593 5.9815 11.3843C5.35724 11.1859 4.8188 10.7979 4.44896 10.2801C4.04777 9.71836 3.82422 8.98682 3.82422 8.08312C3.82422 7.17941 4.04777 6.44787 4.44896 5.88609C4.81876 5.36825 5.35721 4.9803 5.9815 4.78192C6.5321 4.60692 7.11852 4.55871 7.69253 4.64127V4.64127Z",fill:"#9E9E9E"}},{type:"path",attributes:{d:"M16.3341 5.18446C15.9584 4.89912 15.4458 4.71563 14.9171 4.64127C14.3431 4.55871 13.7567 4.60692 13.2061 4.78192C12.6264 4.97026 12.0756 5.32349 11.6736 5.88609C11.2724 6.44787 11.0488 7.17941 11.0488 8.08312C11.0488 8.98682 11.2724 9.71836 11.6736 10.2801C12.0434 10.7979 12.5818 11.1859 13.2061 11.3843C13.7567 11.5593 14.3431 11.6075 14.9171 11.525C15.4458 11.4506 15.9592 11.2671 16.3349 10.9818C16.4003 10.932 16.4548 10.8704 16.4952 10.8006C16.5356 10.7308 16.5611 10.6542 16.5704 10.575C16.5796 10.4958 16.5724 10.4156 16.549 10.3391C16.5257 10.2626 16.4867 10.1912 16.4344 10.129C16.382 10.0668 16.3173 10.015 16.2439 9.97657C16.1705 9.93816 16.0899 9.91386 16.0066 9.90508C15.9233 9.8963 15.8391 9.9032 15.7586 9.92539C15.6781 9.94758 15.603 9.98463 15.5376 10.0344C15.3829 10.1532 15.099 10.2729 14.7301 10.3254C14.358 10.3797 13.9777 10.3498 13.6201 10.2381C13.2567 10.1249 12.9432 9.90033 12.7284 9.59953C12.4989 9.27701 12.3238 8.79606 12.3238 8.08312C12.3238 7.37017 12.4989 6.88922 12.7284 6.5667C12.9579 6.24579 13.2699 6.0429 13.6201 5.92812C13.9762 5.81253 14.3697 5.79071 14.7301 5.84082C15.099 5.89255 15.3829 6.013 15.5376 6.13182C15.6697 6.23236 15.8384 6.27888 16.0066 6.26115C16.1748 6.24341 16.3286 6.16287 16.4344 6.03724C16.5401 5.91162 16.589 5.75119 16.5704 5.59127C16.5517 5.43134 16.467 5.28501 16.3349 5.18446H16.3341Z",fill:"#9E9E9E"}},{type:"path",attributes:{d:"M0 3.43538C0 2.52426 0.380598 1.65046 1.05807 1.0062C1.73554 0.361941 2.65438 0 3.61247 0H16.7873C17.7454 0 18.6643 0.361941 19.3417 1.0062C20.0192 1.65046 20.3998 2.52426 20.3998 3.43538V12.7311C20.3998 13.6422 20.0192 14.516 19.3417 15.1603C18.6643 15.8046 17.7454 16.1665 16.7873 16.1665H3.61247C2.65438 16.1665 1.73554 15.8046 1.05807 15.1603C0.380598 14.516 0 13.6422 0 12.7311V3.43538ZM3.61247 1.21249C2.99253 1.21249 2.39798 1.44668 1.95962 1.86356C1.52126 2.28043 1.27499 2.84583 1.27499 3.43538V12.7311C1.27499 13.3207 1.52126 13.8861 1.95962 14.3029C2.39798 14.7198 2.99253 14.954 3.61247 14.954H16.7873C17.0943 14.954 17.3983 14.8965 17.6819 14.7848C17.9654 14.6731 18.2231 14.5094 18.4402 14.3029C18.6572 14.0965 18.8294 13.8515 18.9469 13.5818C19.0644 13.3121 19.1248 13.023 19.1248 12.7311V3.43538C19.1248 3.14347 19.0644 2.85441 18.9469 2.58472C18.8294 2.31502 18.6572 2.06997 18.4402 1.86356C18.2231 1.65714 17.9654 1.49341 17.6819 1.3817C17.3983 1.26998 17.0943 1.21249 16.7873 1.21249H3.61247Z",fill:"#9E9E9E"}}]),createCaptionOffIcon=()=>createSVGIcon({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[{type:"path",attributes:{d:"M17.0981 17.9816L18.9331 19.8166C19.0509 19.9305 19.2088 19.9935 19.3727 19.9921C19.5365 19.9908 19.6933 19.9251 19.8092 19.8092C19.9251 19.6934 19.9909 19.5366 19.9924 19.3728C19.9939 19.2089 19.9309 19.051 19.8171 18.9331L1.06708 0.183082C1.00904 0.125038 0.94013 0.0789949 0.864291 0.0475816C0.788453 0.0161682 0.707169 0 0.625082 0C0.542995 0 0.461712 0.0161682 0.385874 0.0475816C0.310035 0.0789949 0.241127 0.125038 0.183082 0.183082C0.0658568 0.300308 0 0.4593 0 0.625082C0 0.707169 0.0161682 0.788453 0.0475816 0.864291C0.0789949 0.94013 0.125038 1.00904 0.183082 1.06708L1.57808 2.46208C1.09655 2.75081 0.698063 3.15941 0.421503 3.64803C0.144943 4.13666 -0.000251268 4.68862 8.23736e-05 5.25008V14.7501C8.23736e-05 15.612 0.342492 16.4387 0.951985 17.0482C1.56148 17.6577 2.38813 18.0001 3.25008 18.0001H16.7501C16.8676 18.0001 16.9836 17.9936 17.0981 17.9816ZM15.8661 16.7501H3.25008C2.71965 16.7501 2.21094 16.5394 1.83587 16.1643C1.4608 15.7892 1.25008 15.2805 1.25008 14.7501V5.25008C1.25 4.85011 1.36982 4.4593 1.59406 4.1281C1.81831 3.79691 2.13668 3.54053 2.50808 3.39208L5.38608 6.26958C5.25541 6.33295 5.1303 6.40722 5.01208 6.49158C4.24458 7.03958 3.50008 8.06008 3.50008 10.0001C3.50008 11.9206 4.19158 12.9666 5.03008 13.5216C5.61758 13.9101 6.36008 14.0591 7.04508 13.9866C7.72958 13.9141 8.44008 13.6096 8.88358 12.9886C8.97999 12.8537 9.01887 12.6861 8.99168 12.5226C8.96449 12.359 8.87344 12.213 8.73858 12.1166C8.60372 12.0202 8.43608 11.9813 8.27255 12.0085C8.10902 12.0357 7.96299 12.1267 7.86658 12.2616C7.68508 12.5156 7.34758 12.6976 6.91408 12.7436C6.48108 12.7891 6.03608 12.6881 5.72008 12.4786C5.29158 12.1956 4.75008 11.5791 4.75008 10.0001C4.75008 8.44008 5.31908 7.80808 5.73808 7.50858C5.92708 7.37358 6.14458 7.28958 6.36808 7.25208L15.8666 16.7501H15.8661ZM18.7501 14.7501C18.7501 15.1351 18.6411 15.4951 18.4521 15.8006L19.3511 16.6991C19.7734 16.1372 20.0012 15.453 20.0001 14.7501V5.25008C20.0001 4.82329 19.916 4.40067 19.7527 4.00636C19.5894 3.61205 19.35 3.25378 19.0482 2.95199C18.7464 2.65019 18.3881 2.4108 17.9938 2.24747C17.5995 2.08415 17.1769 2.00008 16.7501 2.00008H4.65158L5.90158 3.25008H16.7501C17.2805 3.25008 17.7892 3.4608 18.1643 3.83587C18.5394 4.21094 18.7501 4.71965 18.7501 5.25008V14.7501ZM15.1386 12.4871L16.0286 13.3771C16.1591 13.2641 16.2786 13.1351 16.3836 12.9886C16.48 12.8537 16.5189 12.6861 16.4917 12.5226C16.4645 12.359 16.3734 12.213 16.2386 12.1166C16.1037 12.0202 15.9361 11.9813 15.7726 12.0085C15.609 12.0357 15.463 12.1267 15.3666 12.2616C15.3066 12.3456 15.2301 12.4216 15.1386 12.4866V12.4871ZM11.1736 8.52208L12.2626 9.61108C12.3486 8.33108 12.8561 7.78158 13.2386 7.50858C13.9096 7.02908 14.9431 7.18858 15.3451 7.83158C15.433 7.97215 15.5732 8.07203 15.7347 8.10925C15.8963 8.14648 16.066 8.118 16.2066 8.03008C16.3471 7.94216 16.447 7.80201 16.4843 7.64044C16.5215 7.47888 16.493 7.30915 16.4051 7.16858C15.5571 5.81208 13.6661 5.66708 12.5116 6.49158C11.9691 6.87908 11.4381 7.50308 11.1736 8.52158V8.52208Z",fill:"#9E9E9E"}}]),createDownloadIcon=()=>createSVGIcon({width:"17",height:"23",viewBox:"0 0 17 23",fill:"none"},[{type:"path",attributes:{d:"M0.85141 20.3962H16.1486C16.361 20.3958 16.5658 20.475 16.7227 20.6181C16.8797 20.7611 16.9773 20.9578 16.9965 21.1693C17.0157 21.3808 16.955 21.5918 16.8264 21.7608C16.6978 21.9298 16.5105 22.0445 16.3016 22.0823L16.1486 22.0959H0.85141C0.639041 22.0963 0.434221 22.0172 0.277284 21.8741C0.120347 21.731 0.0226665 21.5344 0.00347795 21.3229C-0.0157106 21.1114 0.0449835 20.9004 0.173608 20.7314C0.302233 20.5624 0.489466 20.4477 0.698438 20.4098L0.85141 20.3962H16.1486H0.85141ZM8.34703 0.0135976L8.5 4.72688e-08C8.69891 -6.62642e-05 8.89154 0.0696386 9.04434 0.196976C9.19714 0.324313 9.30044 0.501214 9.33625 0.696872L9.34984 0.849843V15.7935L13.9084 11.2366C14.049 11.0958 14.2346 11.0089 14.4327 10.9909C14.6309 10.9728 14.8291 11.0249 14.9928 11.138L15.1118 11.2366C15.2523 11.3775 15.339 11.5631 15.3567 11.7613C15.3744 11.9594 15.322 12.1575 15.2087 12.321L15.1101 12.4383L9.10169 18.4484C8.96086 18.5889 8.7752 18.6756 8.57704 18.6933C8.37888 18.711 8.1808 18.6586 8.01729 18.5453L7.89831 18.4484L1.88992 12.4383C1.73935 12.2884 1.65039 12.0876 1.64057 11.8753C1.63075 11.6631 1.70077 11.4549 1.83685 11.2917C1.97292 11.1286 2.16517 11.0223 2.37572 10.9938C2.58626 10.9654 2.79982 11.0168 2.97432 11.138L3.0916 11.2366L7.65016 15.7935V0.849843C7.65009 0.650937 7.7198 0.458308 7.84713 0.305504C7.97447 0.152699 8.15137 0.0494008 8.34703 0.0135976L8.5 4.72688e-08L8.34703 0.0135976Z",fill:"#9E9E9E"}}]),createAutoScrollIcon=()=>createSVGIcon({width:"11",height:"22",viewBox:"0 0 11 22",fill:"none"},[{type:"path",attributes:{d:"M2.35742 10.9998C2.35742 11.6214 2.54175 12.229 2.88709 12.7459C3.23243 13.2627 3.72328 13.6655 4.29756 13.9034C4.87184 14.1413 5.50377 14.2035 6.11342 14.0823C6.72307 13.961 7.28308 13.6617 7.72261 13.2221C8.16215 12.7826 8.46148 12.2226 8.58275 11.6129C8.70402 11.0033 8.64178 10.3714 8.4039 9.79707C8.16603 9.22279 7.7632 8.73194 7.24636 8.3866C6.72952 8.04126 6.12188 7.85693 5.50028 7.85693C4.66674 7.85693 3.86734 8.18805 3.27794 8.77745C2.68854 9.36685 2.35742 10.1663 2.35742 10.9998V10.9998ZM7.07171 10.9998C7.07171 11.3106 6.97954 11.6144 6.80687 11.8728C6.6342 12.1313 6.38878 12.3327 6.10164 12.4516C5.8145 12.5705 5.49854 12.6017 5.19371 12.541C4.88888 12.4804 4.60888 12.3307 4.38911 12.111C4.16934 11.8912 4.01968 11.6112 3.95904 11.3064C3.89841 11.0015 3.92953 10.6856 4.04847 10.3984C4.16741 10.1113 4.36882 9.86587 4.62724 9.6932C4.88566 9.52052 5.18948 9.42836 5.50028 9.42836C5.91705 9.42836 6.31675 9.59392 6.61145 9.88862C6.90615 10.1833 7.07171 10.583 7.07171 10.9998Z",fill:"#9E9E9E"}},{type:"path",attributes:{d:"M5.5 19.7764L1.1 15.3843L0 16.5L5.5 22L11 16.5L9.89214 15.3921L5.5 19.7764Z",fill:"#9E9E9E"}},{type:"path",attributes:{d:"M5.5 2.22357L9.88429 6.6L11 5.5L5.5 0L0 5.5L1.10786 6.60786L5.5 2.22357Z",fill:"#9E9E9E"}}]),createSVGIcon=(C,t)=>{let e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(const[t,i]of Object.entries(C))e.setAttribute(t,i);for(let C=0;C { + var e, t; + e = chrome.runtime.getURL("feature/utilities/packages/html2pdf.bundle.min.js"), (t = document.createElement("script")).type = "application/javascript", t.src = e, document.head.appendChild(t); + const n = document.getElementById("laxis-root"); + let l = document.getElementById("laxis-mainPanel"); + if (l) l.style.display = "block"; + else { + l = document.createElement("div"), l.setAttribute("id", "laxis-mainPanel"), l.classList.add("panelBase"), l.style.width = "300px", l.style.backgroundColor = "#454953"; + const e = document.createElement("div"); + e.setAttribute("name", "laxis-rootHeader"), e.style.cursor = "move", e.style.width = "300px", e.style.height = "50px", e.style.backgroundColor = "#454953", e.style.borderRadius = "12px 12px 0 0", e.style.display = "flex", e.style.alignItems = "center", e.style.justifyContent = "space-between"; + const t = document.createElement("div"); + t.style.display = "flex", t.style.alignItems = "center", t.style.paddingLeft = "8px"; + const i = document.createElement("img"); + i.src = chrome.runtime.getURL("image/logo.png"), i.addEventListener("click", (function() { + window.open(`${domainUrl}/login`) + })), i.alt = "none", i.style.height = "30px", i.style.width = "90px", i.style.marginLeft = "-16px", i.style.cursor = "pointer", i.style.zIndex = "999", t.appendChild(i), e.appendChild(t); + const o = document.createElement("div"); + o.style.display = "flex", o.style.alignItems = "center"; + const d = document.createElement("div"); + d.classList.add("imageContainer"), d.title = "Minimize", d.addEventListener("click", minimize); + const a = createCollapseIcon(); + d.appendChild(a), o.appendChild(d), e.appendChild(o), l.appendChild(e); + let s = document.createElement("div"); + s.style.padding = "24px", s.style.fontSize = "14px", s.style.color = "#ffffff", s.style.backgroundColor = "#292c35", s.style.borderRadius = "0 0 12px 12px"; + let c = document.createElement("div"); + c.innerHTML = "Highlight with colors", s.appendChild(c); + let r = document.createElement("div"); + r.style.display = "flex", r.style.alignItems = "center", r.style.justifyContent = "center", bookmarkList.forEach((e => { + let t = document.createElement("div"); + t.classList.add("tutorialContainer"), t.style.border = "1px solid #9e9e9e", t.style.backgroundColor = "#454953", t.style.display = "flex", t.style.alignItems = "center", t.style.justifyContent = "center"; + let n = createSVGIcon(e.attributes, e.content); + t.appendChild(n), r.appendChild(t) + })), s.appendChild(r); + let p = document.createElement("div"); + p.style.textAlign = "center", p.innerHTML = "Use the three main color to hightlight any paragraph during the meeting.", s.appendChild(p); + let m = document.createElement("div"); + m.innerHTML = "Select language", m.style.paddingTop = "32px", s.appendChild(m); + let u = document.createElement("div"); + u.style.display = "flex", u.style.alignItems = "center", u.style.justifyContent = "center"; + const y = document.createElement("div"); + y.classList.add("tutorialContainer"), y.style.display = "flex", y.style.alignItems = "center", y.style.justifyContent = "center"; + const g = createCaptionOnIcon(); + y.appendChild(g), u.appendChild(y), s.appendChild(u); + let h = document.createElement("div"); + h.style.textAlign = "center", h.innerHTML = "Laxis supports 69 languages in Google Meet", s.appendChild(h); + let x = document.createElement("div"); + x.style.paddingTop = "32px", x.innerHTML = "Download", s.appendChild(x); + let C = document.createElement("div"); + C.style.display = "flex", C.style.justifyContent = "center"; + let v = document.createElement("div"); + v.classList.add("tutorialContainer"), v.style.display = "flex", v.style.alignItems = "center", v.style.justifyContent = "center"; + let E = createDownloadIcon(); + v.appendChild(E), C.appendChild(v), s.appendChild(C); + let b = document.createElement("div"); + b.style.textAlign = "center", b.innerHTML = "Laxis provides multiple formats for downloading the transcripts.", s.appendChild(b), l.appendChild(s), n.appendChild(l), dragElement(n) + } +}; + +function addRoot() { + const e = document.createElement("div"); + e.setAttribute("id", "laxis-root"), e.style.position = "absolute", e.style.zIndex = "2000", e.style.right = currentRight, e.style.top = currentTop, e.style.height = "10px", e.style.width = "10px", document.body.appendChild(e) +} + +function addMiniPanel() { + const e = document.getElementById("laxis-root"), + t = document.createElement("div"); + t.setAttribute("id", "laxis-miniPanel"), t.classList.add("panelBase"), t.style.width = "60px", t.style.paddingBottom = "16px", t.style.backgroundColor = "#292c35"; + const n = document.createElement("div"); + n.setAttribute("name", "laxis-rootHeader"), n.style.cursor = "move", n.classList.add("col-12"), n.style.height = "50px", n.style.width = "50px", n.style.marginBottom = "-10px", n.style.cursor = "move", n.style.zIndex = "999"; + const l = document.createElement("img"); + l.src = chrome.runtime.getURL("image/logo.png"), l.addEventListener("click", (function() { + window.open(`${domainUrl}/login`) + })), l.style.cursor = "pointer", l.style.marginTop = "10px", l.style.height = "25px", l.style.width = "75px", l.style.marginLeft = "-16px", l.alt = "none", n.appendChild(l), t.appendChild(n); + const i = document.createElement("div"); + i.title = "Expand", i.id = "laxis-expandPanel", i.classList.add("miniButtonContainer"), i.addEventListener("click", addTutorialPanel); + const o = createExpandIcon(); + o.id = "expandInputIcon", i.appendChild(o), t.appendChild(i), e.appendChild(t), dragElement(e) +} +const addCaptionPanel = () => { + const e = findButtonContainer(), + t = document.getElementById("laxis-root"); + if (e && !e.__gmt_button_added) { + e.__gmt_button_added = !0; + const n = document.getElementById("laxis-miniPanel"), + l = document.createElement("div"); + l.title = "Captions settings", l.setAttribute("id", "laxis-caption-toggle-mini"), l.classList.add("miniButtonContainer"), l.addEventListener("click", getToSettings); + const i = createCaptionOnIcon(); + i.id = "captionIconMini", l.appendChild(i), n.appendChild(l); + const o = document.createElement("div"); + o.title = "Download", o.setAttribute("id", "laxis-download-menu-mini"), o.classList.add("miniButtonContainer"), o.addEventListener("click", displayMenu); + const d = createDownloadIcon(); + d.id = "downloadIconMini", d.style.width = "20px", d.style.height = "20px", o.appendChild(d), n.appendChild(o); + const a = document.createElement("div"); + a.style.margin = "12px 5px 0px", a.style.padding = "6px 12px", a.style.borderRadius = "12px", a.style.backgroundColor = "#3e4149"; + for (let e = 0; e < bookmarkList.length; e++) { + const t = document.createElement("div"), + n = document.createElement("div"); + t.style.display = "flex", t.style.flexDirection = "column", t.style.alignItems = "center", n.title = `Highlight as ${bookmarkList[e].name}`, n.classList.add("flagContainerMini"), n.id = `laxis-highlight-${bookmarkList[e].code}-mini`, n.onclick = () => { + highlight(e) + }; + const l = createSVGIcon(bookmarkList[e].attributes, bookmarkList[e].content); + n.appendChild(l), t.appendChild(n), a.appendChild(t) + } + n.appendChild(a), n.style.display = "block"; + let s = document.getElementById("laxis-mainPanel"); + s && t.removeChild(s); + const c = document.createElement("div"); + c.setAttribute("id", "laxis-mainPanel"), c.classList.add("panelBase"), c.style.width = "300px", c.style.display = "none"; + const r = document.createElement("div"); + r.setAttribute("name", "laxis-rootHeader"), r.style.cursor = "move", r.style.width = "300px", r.style.height = "50px", r.style.backgroundColor = "#454953", r.style.borderRadius = "12px 12px 0 0", r.style.display = "flex", r.style.alignItems = "center", r.style.justifyContent = "space-between"; + const p = document.createElement("div"); + p.style.display = "flex", p.style.alignItems = "center", p.style.paddingLeft = "8px"; + const m = document.createElement("img"); + m.src = chrome.runtime.getURL("image/logo.png"), m.alt = "none", m.addEventListener("click", (function() { + window.open(`${domainUrl}/login`) + })), m.style.height = "30px", m.style.marginLeft = "-16px", m.style.cursor = "pointer", m.style.zIndex = "999", p.appendChild(m), r.appendChild(p); + const u = document.createElement("div"); + u.style.display = "flex", u.style.alignItems = "center"; + const y = document.createElement("div"); + y.title = "Retrieve local data", y.setAttribute("id", "laxis-repair"), y.classList.add("imageContainer"), y.style.display = "none", y.addEventListener("click", extractLocalStorage); + const g = document.createElement("img"); + g.id = "restoreIcon", g.src = chrome.runtime.getURL("image/repair.svg"), g.style.width = "15px", g.style.height = "18px", y.appendChild(g), u.appendChild(y); + const h = document.createElement("div"); + h.title = "Captions settings", h.setAttribute("id", "laxis-caption-toggle"), h.classList.add("imageContainer"), h.addEventListener("click", getToSettings); + const x = createCaptionOnIcon(); + x.id = "captionIcon", h.appendChild(x), u.appendChild(h); + const C = document.createElement("div"); + C.title = "Auto-Scroll", C.setAttribute("id", "laxis-autoScroll"); + const v = document.createElement("input"); + v.type = "hidden", v.value = 1, v.setAttribute("id", "autoscroll"), v.onchange = () => autoScroll(), C.appendChild(v), C.classList.add("imageContainer"), C.addEventListener("click", (function() { + let e = document.getElementById("autoscroll"); + "0" === e.value.toString() ? e.value = 1 : e.value = 0, autoScroll() + })); + const E = createAutoScrollIcon(); + E.style.width = "15px", E.style.height = "15px", C.appendChild(E), u.appendChild(C); + const b = document.createElement("div"); + b.title = "Download", b.id = "laxis-openDownloadMenu", b.classList.add("imageContainer"), b.addEventListener("click", displayMenu); + const f = createDownloadIcon(); + f.style.width = "15px", f.style.height = "15px", b.appendChild(f), u.appendChild(b); + const L = document.createElement("div"); + L.title = "Minimize", L.id = "laxis-minimizePanel", L.classList.add("imageContainer"), L.addEventListener("click", minimize); + const k = createCollapseIcon(); + k.style.width = "15px", k.style.height = "15px", L.appendChild(k), u.appendChild(L), r.appendChild(u), c.appendChild(r); + const I = document.createElement("div"); + I.style.width = "300px", I.style.backgroundColor = "#292c35", I.style.paddingTop = "8px"; + const w = document.createElement("div"); + w.id = "login-prompt", w.style.display = "none", w.style.margin = "0px 8px", w.style.padding = "4px", w.style.textAlign = "center", w.addEventListener("click", signup), w.style.cursor = "pointer", w.innerHTML = "Please log in to enable autosave to Laxis Cloud.", w.style.borderRadius = "12px", w.style.border = "1px solid rgba(255, 255, 255, 0.5)", w.style.backgroundColor = "#454953", w.style.color = "#ffffff", w.style.fontSize = "10px"; + const T = document.createElement("div"); + T.id = "google-meet-quota", T.style.display = "none", T.style.margin = "0px 8px", T.style.padding = "4px", T.style.textAlign = "center", T.addEventListener("click", upgrade), T.style.cursor = "pointer", T.innerHTML = "Used Google Meet Quota: ", T.style.borderRadius = "12px", T.style.border = "1px solid rgba(255, 255, 255, 0.5)", T.style.backgroundColor = "#454953", T.style.color = "#ffffff", T.style.fontSize = "10px"; + const M = document.createElement("div"); + M.id = "meeting-name", M.style.fontWeight = "bold", M.style.padding = "8px", M.style.color = "#FFFFFF", I.appendChild(w), I.appendChild(T), I.appendChild(M); + const B = document.createElement("div"); + B.style.paddingTop = "8px", B.style.width = "25%", I.style.paddingBottom = "8px", c.appendChild(I); + const S = document.createElement("div"); + S.setAttribute("id", "feature"), S.style.width = "300px", S.style.backgroundColor = "#292c35", S.style.borderRadius = "0 0 12px 12px"; + const A = document.createElement("div"); + A.setAttribute("id", "caption"), A.style.height = "350px", A.style.width = "300px", A.style.overflowY = "auto", A.style.overflowX = "hidden", A.style.color = "#FFFFFF", A.style.paddingRight = "8px", A.onwheel = () => { + v.value = 0 + }, S.appendChild(A); + const H = document.createElement("div"); + H.id = "highlight-laxis", H.style.width = "300px", H.style.backgroundColor = "#292c35", H.style.display = "flex", H.style.justifyContent = "space-around", H.style.borderTop = "1px solid #e0e0e0", H.style.paddingTop = "10px", H.style.paddingBottom = "10px", H.classList.add("popup"), H.style.borderRadius = "0 0 12px 12px"; + for (let e = 0; e < bookmarkList.length; e++) { + const t = document.createElement("div"), + n = document.createElement("div"); + t.style.display = "flex", t.style.flexDirection = "column", t.style.alignItems = "center", n.style.textAlign = "center", n.style.fontSize = "10px", n.style.color = "#9e9e9e", n.style.marginTop = "4px", n.innerHTML = bookmarkList[e].name, n.id = `laxis-highlight-${bookmarkList[e].code}-title`; + const l = document.createElement("div"); + l.title = `Highlight as ${bookmarkList[e].name}`, l.classList.add("flagContainer"), l.id = `laxis-highlight-${bookmarkList[e].code}`; + const i = createSVGIcon(bookmarkList[e].attributes, bookmarkList[e].content); + l.appendChild(i), l.onclick = () => { + highlight(e) + }, t.appendChild(l), t.appendChild(n), H.appendChild(t) + } + let N = document.createElement("div"); + N.id = "popup", N.className = "popupText", N.innerHTML = "Test", N.onclick = () => { + clearTimeout(notificationsTimeout), N.classList.remove("show") + }, H.appendChild(N), S.appendChild(H), c.appendChild(S), t.appendChild(c), dragElement(t), autoScroll(), document.getElementById("laxis-downloadMenu") || addDownloadMenu(), checkCaptionStatusInterval = setInterval(checkCaptionStatus, 500), turnOnCaptions(), debug("turned on caption"), removeCaptionPanel(), checkToken(), autoSaveInterval = setInterval((() => { + let e = document.getElementById("autoSaveCheck"); + e && e.checked && Export2App(!0).catch((e => { + console.error(e); + const t = get(ERROR_SAVING) || []; + set(ERROR_SAVING, [...t, e]) + })) + }), 3e5), setTimeout(updateMeetingName, 500), clearInterval(checkOngoingMeeting) + } + }, + addDownloadMenu = () => { + let e = document.createElement("div"); + e.id = "laxis-downloadMenu", e.className = "modal", e.style.display = "none"; + let t = document.createElement("div"); + t.className = "modal-content", t.id = "laxis-downloadMenuContent"; + let n = document.createElement("div"); + n.className = "modal-header", n.innerHTML = "Download", t.appendChild(n); + let l = document.createElement("div"), + i = document.createElement("div"); + i.className = "modal-body", i.innerHTML = "File Type", l.appendChild(i); + let o = document.createElement("div"); + o.className = "modal-body", o.innerHTML = "
Highlights
", l.appendChild(o); + let d = document.createElement("div"); + d.className = "modal-body", d.innerHTML = "
Timestamps
", l.appendChild(d); + let a = document.createElement("div"); + a.className = "modal-body", a.title = "Autosave to Laxis every 5 minutes", a.style.cursor = "help", a.innerHTML = "
Autosave to Laxis Cloud
", l.appendChild(a), t.appendChild(l); + let s = document.createElement("div"); + s.className = "modal-footer"; + let c = document.createElement("button"); + c.classList.add("modal-button"), c.id = "laxis-close-menu", c.style.border = "solid 2px #292c35", c.style.backgroundColor = "#454953", c.innerHTML = "Cancel", c.onclick = () => { + document.getElementById("laxis-downloadMenu").style.display = "none" + }, s.appendChild(c); + let r = document.createElement("button"); + r.classList.add("modal-button"), r.style.backgroundColor = "#292c35", r.style.boxShadow = "box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.29)", r.innerHTML = "Download", r.addEventListener("click", downloadTranscript), r.setAttribute("id", "laxis-confirm-download"), s.appendChild(r), t.appendChild(s), e.appendChild(t); + const p = document.getElementById("laxis-root"); + p && p.appendChild(e) + }, + minimize = () => { + const e = document.getElementById("laxis-mainPanel"), + t = document.getElementById("laxis-miniPanel"); + e.style.display = "none", t.style.display = "block" + }, + autoScroll = () => { + let e = document.getElementById("laxis-autoScroll"); + e.style.border = "1px solid #2196f3"; + const t = document.getElementById("caption"), + n = document.getElementById("autoscroll"), + l = setInterval((function() { + "0" === n.value.toString() ? (clearInterval(l), e.style.border = "1px solid #292c35") : t.scrollTop = t.scrollHeight + }), 1e3) + }, + updateMeetingName = () => { + const e = document.getElementById("meeting-name"); + getMeetingName() ? (e.innerHTML = getMeetingName(), chrome.runtime.sendMessage({ + type: "meetingName", + meetingName: getMeetingName() + })) : (e.innerHTML = getDefaultName(), chrome.runtime.sendMessage({ + type: "meetingName", + meetingName: getDefaultName() + })) + }, + highlight = e => { + let t = document.getElementById("highlight-laxis"), + n = document.getElementById("popup"), + l = document.getElementById("laxis-miniPanel"); + weTurnedCaptionsOn ? bookmarkList.forEach(((l, i) => { + const o = t.childNodes[i].childNodes[0], + d = t.childNodes[i].childNodes[1], + a = document.getElementById(`laxis-highlight-${bookmarkList[i].code}-mini`); + i === e ? l.enable ? (l.enable = !1, o.style.backgroundColor = "", a.style.backgroundColor = "", d.style.color = "#9e9e9e", clearTimeout(notificationsTimeout), n.classList.remove("show")) : (l.enable = !0, o.style.backgroundColor = "#696969", a.style.backgroundColor = "#696969", d.style.color = "#ffffff", n.innerHTML = "Your conversation is being highlighted.", n.style.backgroundColor = "#454953", n.style.color = l.code, n.classList.add("show"), clearTimeout(notificationsTimeout), notificationsTimeout = setTimeout((() => { + n.classList.remove("show") + }), notificationsTimeoutDuration)) : (l.enable = !1, o.style.backgroundColor = "", a.style.backgroundColor = "", d.style.color = "#9e9e9e") + })) : (l.style.display && alert("Your caption is turned off"), n.style.backgroundColor = "#818388", n.style.color = "#292c35", n.innerHTML = "Your caption is turned off", n.classList.add("show"), clearTimeout(notificationsTimeout), notificationsTimeout = setTimeout((() => { + n.classList.remove("show") + }), notificationsTimeoutDuration)) + }; \ No newline at end of file diff --git a/feature/record/captionControls.js b/feature/record/captionControls.js new file mode 100644 index 0000000..bcdc417 --- /dev/null +++ b/feature/record/captionControls.js @@ -0,0 +1,54 @@ +const stopTranscribing = () => { + debug("call stopTranscribing"), notificationsOff(), clearInterval(closedCaptionsAttachInterval), closedCaptionsAttachInterval = null, captionContainerChildObserver.disconnect(), captionContainerAttributeObserver.disconnect() +}, +startTranscribing = () => { + debug("call startTranscribing"), currentSessionIndex = null, closedCaptionsAttachInterval = setInterval(tryTo(closedCaptionsAttachLoop, "attach to captions"), 1e3), setCurrentTranscriptDetails() +}, +toggleTranscribing = () => { + debug("call toggleTranscribing"), isTranscribing ? stopTranscribing() : startTranscribing(), isTranscribing = !isTranscribing +}, +turnOnCaptions = () => { + const t = getElementWithXPathFallback(document, XPATH_TURN_ON_CAPTIONS_BUTTON, XPATH_TURN_ON_CAPTIONS_BUTTON_V20210602); + return debug("captionsButtonOn", t), t && (t.click(), notificationsOn()), t +}, +turnOffCaptions = () => { + const t = getElementWithXPathFallback(document, XPATH_TURN_OFF_CAPTIONS_BUTTON, XPATH_TURN_OFF_CAPTIONS_BUTTON_V20210602); + return debug("captionsButtonOff", t), t && (t.click(), notificationsOff()), t +}, +turnOnCaptionNotificationsOn = () => { + const t = document.getElementById("popup"); + t.style.backgroundColor = "#818388", t.style.color = "#292c35", t.innerHTML = "Please turn on captions", t.classList.add("show"), clearTimeout(notificationsTimeout), notificationsTimeout = setTimeout((() => { + t.classList.remove("show") + }), 500) +}, +notificationsOn = () => { + const t = document.getElementById("laxis-caption-toggle"), + n = document.getElementById("laxis-caption-toggle-mini"), + i = document.getElementById("captionIcon"), + o = document.getElementById("captionIconMini"); + t.removeChild(i), n.removeChild(o); + const e = createCaptionOnIcon(), + c = createCaptionOnIcon(); + e.id = "captionIcon", e.style.width = "15px", e.style.height = "15px", t.appendChild(e), c.id = "captionIconMini", c.style.width = "15px", c.style.height = "15px", n.appendChild(c); + const s = document.getElementById("popup"); + s.style.backgroundColor = "#818388", s.style.color = "#292c35", s.innerHTML = "Your caption is turned on", s.classList.add("show"), clearTimeout(notificationsTimeout), notificationsTimeout = setTimeout((() => { + s.classList.remove("show") + }), notificationsTimeoutDuration) +}, +notificationsOff = () => { + const t = document.getElementById("laxis-caption-toggle"), + n = document.getElementById("laxis-caption-toggle-mini"), + i = document.getElementById("captionIcon"), + o = document.getElementById("captionIconMini"); + t.removeChild(i), n.removeChild(o); + const e = createCaptionOffIcon(), + c = createCaptionOffIcon(); + e.id = "captionIcon", e.style.width = "15px", e.style.height = "15px", t.appendChild(e), c.id = "captionIconMini", c.style.width = "15px", c.style.height = "15px", n.appendChild(c); + const s = document.getElementById("popup"); + s.style.backgroundColor = "#818388", s.style.color = "#292c35", s.innerHTML = "Your caption is turned off", s.classList.add("show"), clearTimeout(notificationsTimeout), notificationsTimeout = setTimeout((() => { + s.classList.remove("show") + }), notificationsTimeoutDuration) +}, +toggleCaptions = () => { + debug("call toggleCaptions"), weTurnedCaptionsOn ? turnOffCaptions() : turnOnCaptions(), weTurnedCaptionsOn = !weTurnedCaptionsOn +}; \ No newline at end of file diff --git a/feature/record/captionObserver.js b/feature/record/captionObserver.js new file mode 100644 index 0000000..e7287e5 --- /dev/null +++ b/feature/record/captionObserver.js @@ -0,0 +1,116 @@ +const findCaptionsContainer = () => { + let e = document.querySelector('div[jsname="dsyhDe"]'); + return e || (e = document.querySelector('div[jscontroller="D1tHje"] > div > div:first-child')), e && (captionContainerChildObserver.observe(e, { + childList: !0, + subtree: !0, + characterData: !0 + }), captionContainerAttributeObserver.observe(e, { + attributes: !0, + subtree: !1, + attributeOldValue: !0 + }), Array.from(e.children).forEach(tryTo((e => { + updateCurrentTranscriptSession(e) + }), "handling child node")), debug("Final CaptionsContainer", e)), e +}, +findCaptionsContainerObsolete = () => { + captionContainerChildObserver.disconnect(), captionContainerAttributeObserver.disconnect(); + const e = {}, + t = Array.from(document.querySelectorAll("img")).filter((e => e.src.match(/\.googleusercontent\.com\//))); + for (let n of t) n.className in e || (e[n.className] = []), e[n.className].push(n); + const n = []; + for (let t of Object.values(e)) { + let e = 0; + for (let n of t) { + const t = document.evaluate("..//span", n.parentElement, null, XPathResult.ORDERED_NODE_ITERATOR_TYPE); + let r; + for (; r = t.iterateNext();) + if (0 === r.children.length && r.textContent.length > 3) { + e += 1; + break + } + } + if (e !== t.length) continue; + let r = null; + if (t.length >= 2) { + const e = [...t]; + let n = null, + o = !1; + do { + for (let t in e) { + if (!e[t].parent) { + o = !0; + break + } + e[t] = e[t].parent, 0 === t ? n = e[t] : n && n !== e[t] && (n = null), debug("current", n) + } + } while (null === n && !1 === o); + r = n + } else { + let e = t[0]; + for (; null === r && e;) e.getAttribute("jscontroller") ? r = e : e = e.parentNode + } + if (r) { + const e = r?.firstChild?.firstChild?.tagName; + debug("first grand child tag name", e); + const t = "IMG" === e ? r : r.firstChild.firstChild; + debug("caption container candidate", t), null !== t && n.push(t) + } + } + if (1 === n.length) return captionContainerChildObserver.observe(n[0], { + childList: !0, + subtree: !0, + characterData: !0 + }), captionContainerAttributeObserver.observe(n[0], { + attributes: !0, + subtree: !1, + attributeOldValue: !0 + }), Array.from(n[0].children).forEach(tryTo((e => { + updateCurrentTranscriptSession(e) + }), "handling child node")), debug("Final CaptionsContainer", n[0]), n[0] +}, +captionContainerChildObserver = new MutationObserver(tryTo((e => { + for (let t of e) + if (debug("mutation target", t.target), t.target === captionsContainer) { + debug("update with added nodes"); + for (let e of t.addedNodes) updateCurrentTranscriptSession(e) + } else { + const e = Array.from(t.addedNodes).filter((e => "SPAN" === e.nodeName || "#text" === e.nodeName)), + n = Array.from(t.removedNodes).filter((e => "SPAN" === e.nodeName || "#text" === e.nodeName)); + if (debug("addedSpansOrTexts", e), "characterData" === t.type || e.length > 0 || n.length > 0) { + let e = t.target; + for (; e && e.parentNode !== captionsContainer;) e = e.parentNode; + if (!e) { + debug("could not find root for", t.target); + continue + } + if (debug("update with parent node"), e.querySelector("button")) { + let t = Array.from(e.children), + n = t.slice(0, t.length - 1).slice(-4); + for (let e of n) updateCurrentTranscriptSession(e) + } else updateCurrentTranscriptSession(e) + } + } +}), "executing observer")), +captionContainerAttributeObserver = new MutationObserver(tryTo((e => { + for (let t of e) + if ("style" === t.attributeName) { + const e = t.target.getAttribute("style"); + "display: none;" === t.oldValue && "" === e && (currentSessionIndex = null) + } +}), "executing observer")); +let isCaptionTurnedOn = !1; +const closedCaptionsAttachLoop = () => { + if (captionsContainer = findCaptionsContainer(), captionsContainer) debug("attached to closed captions"), isCaptionTurnedOn = !0, clearInterval(closedCaptionsAttachInterval); + else if (!hasCaptionButtons) { + if (isCaptionTurnedOn) return; + if (getElementWithXPathFallback(document, XPATH_CAPTION_OPEN_TOAST, XPATH_CAPTION_OPEN_TOAST_V20210602)) return popup.classList.remove("show"), isCaptionTurnedOn = !0, notificationsOn(), void clearInterval(closedCaptionsAttachInterval); + isCaptionTurnedOn || turnOnCaptionNotificationsOn() + } +}, +removeCaptionPanel = () => { + // debug("start remove caption panel"); + // const e = document.querySelector('div[jscontroller="D1tHje"]'); + // debug("googleMeetCaptionsPanel", e), e && (e.style = "height: 0px", turnOffCaptions(), setTimeout((() => { + // turnOnCaptions() + // }), 500)) +}; \ No newline at end of file diff --git a/feature/record/captionProcessing.js b/feature/record/captionProcessing.js new file mode 100644 index 0000000..6fdbe01 --- /dev/null +++ b/feature/record/captionProcessing.js @@ -0,0 +1 @@ +const spansToText=e=>e.map((e=>e.textContent)).join(" "),mergeSpans=(e,t)=>{const s=e.map((e=>e.textContent));if(Array.isArray(t)&&t.length){const n=stringSimilarity.findBestMatch(t[0].textContent,s);return[].concat(e.slice(0,n.bestMatchIndex),t)}return t},isDataNodeEquals=(e,t)=>{if(e.hash===t.hash)return!0;const s=spansToText(e.spans),n=spansToText(t.spans);return e.person===t.person&&e.image===t.image&&stringSimilarity.compareTwoStrings(s,n)>=.75},findMostRecentParagraph=(e,t)=>CACHE.findIndex((s=>s.person===t&&s.image===e)),getCaptionData=e=>{if(!e.querySelector("button")){if(e&&e.querySelector("img")?.src){if(e.querySelectorAll("span")?.length>1){const t=e.querySelector("img").src.replace(/=s[\d]+/,"=s50"),s=xpath(".//div/text()",e),n=Array.from(e.querySelectorAll("span")).filter((e=>0===e.children.length)),o=n.map((e=>e.textContent)).join(" ");return{image:t,person:s.textContent,spans:n,text:o,hash:e}}{let t=e;if(!t?.querySelector("img")?.src)return null;const s=t.querySelector("img").src.replace(/=s[\d]+/,"=s50"),n=t.children[0].children[1],o=t.children[1].textContent,i=o.split(" ").map((e=>({textContent:e})));return{image:s,person:n.textContent,spans:i,text:o,hash:t}}}return null}},mergeToLastParagraph=(e,t)=>{const s=CACHE[e];debug(`Current paragraph: ${spansToText(s.spans)}, merging to paragraph: ${spansToText(t.spans)}`),s.spans=mergeSpans(s.spans,t.spans),sessionList[e].text=spansToText(s.spans),updateSessionNode(e),s.debounce&&clearInterval(s.debounce),s.count+=1,0===e&&(s.endedAt=date,sessionList[e].endedAt=date),s.debounce=setInterval(tryTo((()=>{s.text=spansToText(s.spans),debug("count",s.count,"polls",s.pollCount),setSpeaker(s),clearInterval(s.debounce),clearInterval(s.poll),delete s.poll}),"trailing caption poll"),1e3),"poll"in s||(sessionList[e].text=spansToText(s.spans),updateSessionNode(e),s.poll=setInterval(tryTo((()=>{s.pollCount+=1,s.text=spansToText(s.spans),setSpeaker(s)}),"caption polling"),1e3))},updateCurrentTranscriptSession=e=>{debug(e);const t=getCaptionData(e);if(t&&t.text&&t.text.trim()){let e=new Date;if(1===loginStatus||0===loginStatus){const s=CACHE.length?CACHE.findIndex((e=>isDataNodeEquals(e,t))):-1;if(-1===s){const s=increment(makeTranscriptKey(currentTranscriptId,currentSessionIndex));CACHE.unshift({...t,startedAt:e,endedAt:e,count:0,pollCount:0,transcriptId:currentTranscriptId,sessionIndex:currentSessionIndex,speakerIndex:s}),sessionList.unshift({...t,startedAt:e,endedAt:e,transcriptId:currentTranscriptId,sessionIndex:currentSessionIndex,speakerIndex:s}),appendSessionNode(),setSpeaker(CACHE[0])}else{const n=CACHE[s];debug(`Current paragraph: ${spansToText(n.spans)}, updating paragraph: ${spansToText(t.spans)}`),n.spans=mergeSpans(n.spans,t.spans),sessionList[s].text=spansToText(n.spans),updateSessionNode(s),n.debounce&&clearInterval(n.debounce),n.count+=1,0===s&&(n.endedAt=e,sessionList[s].endedAt=e),n.debounce=setInterval(tryTo((()=>{n.text=spansToText(n.spans),debug("count",n.count,"polls",n.pollCount),setSpeaker(n),clearInterval(n.debounce),clearInterval(n.poll),delete n.poll}),"trailing caption poll"),1e3),"poll"in n||(sessionList[s].text=spansToText(n.spans),updateSessionNode(s),n.poll=setInterval(tryTo((()=>{n.pollCount+=1,n.text=spansToText(n.spans),setSpeaker(n)}),"caption polling"),1e3))}}}},checkTranscriptionId=()=>{const e=getTranscript(currentTranscriptId);let t=document.getElementById("caption"),s="";for(t&&t.childNodes&&t.childNodes[t.childNodes.length-1]&&(s=t.childNodes[t.childNodes.length-1].firstChild.childNodes[2].innerText);e.length>0;)(!s||s{let e=[];1===loadLocalStorage&&(bookmarkList.forEach((t=>{t.enable&&(e[0]=t.color)})),sessionList[0].highlight=e,CACHE[0].highlight=e),0===loadLocalStorage&&(e=sessionList[0].highlight);const t=document.getElementById("caption"),s=document.createElement("div"),n=document.createElement("div");n.style.display="flex",n.style.alignItems="center",n.style.width="100%",s.style.width="100%",s.style.paddingLeft="8px",s.style.paddingBottom="8px";const o=document.createElement("img");o.src=sessionList[0].image,o.alt="none",o.style.width="24px",o.style.height="24px",o.style.borderRadius="50%",n.appendChild(o);const i=document.createElement("div");i.innerHTML="You"===sessionList[0].person?appUser:sessionList[0].person,i.style.color="#ADFF2F",i.style.fontSize="12px",i.style.paddingLeft="8px",i.style.width="25%",i.style.textOverflow="ellipsis",i.style.whiteSpace="nowrap",i.style.overflow="hidden",n.appendChild(i);const r=document.createElement("div");let l=getTimeStr(startTime,sessionList[0].startedAt)+" - "+getTimeStr(startTime,sessionList[0].endedAt);r.innerHTML=l,r.style.color="#F0E68C",r.style.fontSize="12px",r.style.paddingRight="16px",n.appendChild(r);const a=document.createElement("div");e.forEach((e=>{const t=document.createElement("img");t.style.height="12px",t.style.width="12px",t.src=chrome.runtime.getURL("image/bookmark/"+e+".svg"),a.appendChild(t)})),n.appendChild(a),s.appendChild(n);const d=document.createElement("div");if(d.classList.add("tooltip","col-12"),d.style.marginTop="4px",d.style.padding="8px 4px",e.length){let t=e[0];d.style.border=`1px solid ${t}`,d.style.borderRadius="12px",d.style.backgroundColor="#454953"}else d.style.border="",d.style.backgroundColor="inherit";const c=document.createElement("div");c.style.color="#FFFFFF",c.innerHTML=sessionList[0].text,d.appendChild(c);const p=document.createElement("span");p.classList.add("tooltiptext"),bookmarkList.forEach(((t,s)=>{const n=document.createElement("input");n.type="image",n.title=t.name,n.style.width="16px",n.style.height="16px",n.style.borderRadius="50%",n.style.padding="2px",n.style.border="solid 1px #9e9e9e",n.style.margin="2px",n.src=chrome.runtime.getURL("image/bookmark/"+t.color+".svg"),-1!==e.indexOf(t.color)&&(n.style.backgroundColor="#696969");const o=sessionList.length;n.onclick=tryTo((()=>highlightTranscribed(s,sessionList.length-o)),"bookmark transcribed paragraph"),p.appendChild(n)})),d.appendChild(p),s.appendChild(d),t.appendChild(s),chrome.storage.session.set({sessionList:sessionList},(()=>{}))},updateSessionNode=e=>{let t=sessionList[e].highlight?sessionList[e].highlight:[];1===loadLocalStorage&&(bookmarkList.forEach((s=>{s.enable&&(sessionList[e]?.highlight.length>0?sessionList[e].highlight[0]!==s.color&&(t[0]=s.color):t[0]=s.color)})),sessionList[e].highlight=t,CACHE[e].highlight=t),0===loadLocalStorage&&(t=CACHE[e].highlight);const s=document.getElementById("caption"),n=s.childNodes[s.childNodes.length-1-e],o=n.firstChild,i=o.lastChild,r=n.lastChild,l=o.childNodes[2];if(r.firstChild.innerHTML=sessionList[e].text,l.innerHTML=getTimeStr(startTime,sessionList[e].startedAt)+" - "+getTimeStr(startTime,sessionList[e].endedAt),t.length){let e=t[0];r.style.border=`1px solid ${e}`,r.style.borderRadius="12px",r.style.backgroundColor="#454953"}else r.style.border="",r.style.backgroundColor="inherit";const a=r.getElementsByTagName("span")[0];i.textContent="",t.forEach((e=>{const t=document.createElement("img");t.style.height="12px",t.style.width="12px",t.src=chrome.runtime.getURL("image/bookmark/"+e+".svg"),i.appendChild(t),a.childNodes.forEach((t=>{t.src.includes(e)&&(t.style.backgroundColor="#696969")}))})),chrome.storage.session.set({sessionList:sessionList},(()=>{}))},highlightTranscribed=(e,t)=>{const s=bookmarkList[e].color,n=document.getElementById("caption"),o=n.childNodes[n.childNodes.length-1-t].getElementsByTagName("span")[0],i=n.childNodes[n.childNodes.length-1-t].childNodes[1],r=o.childNodes[e];-1!==sessionList[t].highlight.indexOf(s)?(sessionList[t].highlight=[],setSpeaker(sessionList[t]),r.style.backgroundColor="",i.style.border="",i.style.backgroundColor="inherit"):(sessionList[t].highlight=[s],setSpeaker(sessionList[t]),o.childNodes.forEach((e=>{e.style.backgroundColor=""})),r.style.backgroundColor="#696969",i.style.border=`1px solid ${s}`,i.style.borderRadius="12px",i.style.backgroundColor="#454953");const l=n.childNodes[n.childNodes.length-1-t].firstChild.lastChild;l.textContent="",sessionList[t].highlight.forEach((e=>{const t=document.createElement("img");t.style.height="12px",t.style.width="12px",t.src=chrome.runtime.getURL("image/bookmark/"+e+".svg"),l.appendChild(t)}))}; \ No newline at end of file diff --git a/feature/record/dom.js b/feature/record/dom.js new file mode 100644 index 0000000..5170e12 --- /dev/null +++ b/feature/record/dom.js @@ -0,0 +1 @@ +const parents=e=>{const t=[e];for(;e;e=e.parentNode)t.unshift(e);return t},getCommonAncestor=(e,t)=>{const n=parents(e),o=parents(t);if(n[0]===o[0])for(let e=0;edocument.evaluate(e,t,null,XPathResult.FIRST_ORDERED_NODE_TYPE).singleNodeValue,findButtonContainer=()=>{const e=getElementWithXPathFallback(document,XPATH_MEETING_DETAILS,XPATH_MEETING_DETAILS_V20210602),t=getElementWithXPathFallback(document,XPATH_SELECTOR_CHAT,XPATH_SELECTOR_CHAT_V20210602);return getCommonAncestor(e,t)},getElementWithXPathFallback=(e,t,n)=>xpath(t,e)||xpath(n,e),displayMenu=()=>{document.getElementById("laxis-downloadMenu").style.display="block"},dragElement=e=>{let t=0,n=0,o=0,l=0;function u(e){(e=e||window.event).preventDefault(),o=e.clientX,l=e.clientY,document.onmouseup=c,document.onmousemove=a}function a(u){(u=u||window.event).preventDefault(),t=o-u.clientX,n=l-u.clientY,o=u.clientX,l=u.clientY,e.style.top=e.offsetTop-n+"px",e.style.left=e.offsetLeft-t+"px",currentTop=e.style.top,currentRight=e.style.right}function c(){document.onmouseup=null,document.onmousemove=null}document.getElementsByName(e.id+"Header")?document.getElementsByName(e.id+"Header").forEach((e=>{e.onmousedown=u})):e.onmousedown=u}; \ No newline at end of file diff --git a/feature/record/meetingInfo.js b/feature/record/meetingInfo.js new file mode 100644 index 0000000..659657d --- /dev/null +++ b/feature/record/meetingInfo.js @@ -0,0 +1 @@ +const getMeetingName=()=>{let e=xpath(XPATH_TITLE_V20220324)?.innerText;e||(e=xpath(XPATH_TITLE)?.innerText),e===SEARCH_TEXT_NO_MEETING_NAME&&(e=xpath(XPATH_TITLE_TOOLTIP)?.innerText);const t=document.location.pathname.match(/\/(.+)/)[1];if(e&&e!==SEARCH_TEXT_NO_MEETING_NAME&&e!==t)return e},checkMeetingStatus=()=>{const e=xpath("//body[@id='yDmH0d']/c-wiz/div/div[2]/div/div/div[3]/div/div/div/div/button/div[2]"),t=getElementWithXPathFallback(document,'//div[contains(@jscontroller,"VQ0pCb")]','//*[contains(text(), "You left the meeting")]');xpath(),e?meetingStatus=0:findButtonContainer()?meetingStatus=1:t&&(meetingStatus=2,clearInterval(checkCaptionStatusInterval),clearInterval(autoSaveInterval),Export2App(!0,!0).then((e=>{increment(`hangout_${currentTranscriptId}`),window.open(`${domainUrl}/transcript/${e}`,"_blank")})).catch((e=>{console.error(e);const t=get(ERROR_SAVING)||[];set(ERROR_SAVING,[...t,e])})))},renewToken=e=>{chrome.storage.local.get(["refreshToken"],(function(t){let n=JSON.stringify({idToken:e,refreshToken:t.refreshToken}),o={Authorization:`Bearer ${e}`,"Content-Type":"application/json"};window.fetch(`${domainUrl}/api/v1/users/token`,{method:"POST",headers:o,body:n}).then((t=>{200===t.status?t.json().then((e=>{const t=new Date;chrome.storage.local.set({last_refresh_date:t},(function(){console.log(t)})),chrome.storage.local.set({token:e.id_token,refreshToken:e.refreshToken},(function(){console.log("Token refreshed")}))})):401===t.status?(debug("Unauthorized"),t.json().then((t=>{saveLog(`renewToken 401 fail ${e} ${t.message}`)})),reDisplayPrompt(),reDisplayRemindLogin()):(t.json().then((t=>{saveLog(`renewToken request fail ${e} ${t.message}`),debug(t.message)})),reDisplayPrompt(),reDisplayRemindLogin())})).catch((t=>{saveLog(`renewToken request exception ${e} ${t}`),debug(t),reDisplayPrompt(),reDisplayRemindLogin()}))}))},checkToken=()=>{chrome.storage.local.get(["token"],(function(e){if(e.token){tryTo((()=>{1e3*JSON.parse(atob(e.token.split(".")[1])).exp-Date.now()<6048e5&&(debug("Refresh JWT token"),renewToken(e.token))})(),"check whether token expired");const t={method:"GET",headers:{Authorization:`Bearer ${e.token}`}},n=()=>window.fetch(`${domainUrl}/api/v1/users/info`,t),o=()=>window.fetch(`${domainUrl}/api/v2/templates?quick-note=true`,t),s=e=>window.fetch(`${domainUrl}/api/v2/templates/${e}/topics`,t);Promise.all([n(),o()]).then((n=>{if(200===n[0].status&&200===n[1].status){loginStatus=1;const e=document.getElementById("login-prompt");e&&(e.style.display="none");const o=document.getElementById("laxis-remindLogin");o&&(o.style.display="none"),n[0].json().then((e=>{const n=e;appUser=`${n.firstName} ${n.lastName}`,window.fetch(`${domainUrl}/api/v1/teams/isAdmin`,t).then((e=>{e.json().then((e=>{e.isAdmin||e.hasTeam?window.fetch(`${domainUrl}/api/v1/teams/info`,t).then((e=>{e.json().then((e=>{console.log(e),displayGoogleMeetQuota(e.usedSecondsQuota/60,-1)}))})):"free"===n.plan?displayGoogleMeetQuota(n.usedSecondsQuota/60,n.secondsQuota/60):displayGoogleMeetQuota(n.usedSecondsQuota/60,-1)}))}))})),n[1].json().then((e=>{let t=bookmarkList;s(e.items[0].id).then((e=>e.json().then((e=>{e.items.forEach((e=>{let n=bookmarkList.findIndex((t=>t.code===e.color));if(-1!==n){if(t[n].name=e.name,document.getElementById(`laxis-highlight-${e.color}-title`)){document.getElementById(`laxis-highlight-${e.color}-title`).innerHTML=e.name}let o=document.getElementById(`laxis-highlight-${e.color}`),s=document.getElementById(`laxis-highlight-${e.color}-mini`);o&&(o.title=`Highlight as ${e.name}`),s&&(s.title=`Highlight as ${e.name}`)}}))})))),bookmarkList=t}))}else 401===n[0].status||401===n[1].status?(401===n[0].status?n[0].json().then((t=>{saveLog(`checkToken 401 fail ${e.token} ${t.message}`)})):n[1].json().then((t=>{saveLog(`checkToken 401 fail ${e.token} ${t.message}`)})),reDisplayPrompt(),reDisplayRemindLogin()):n[0].json().then((e=>{window.alert(e.message)}))})).catch((e=>{window.alert(e)}))}else saveLog(`checkToken token empty ${e.token}`),reDisplayPrompt(),reDisplayRemindLogin()}))};let hasCaptionButtons=!1;const checkCaptionStatus=()=>{if(checkMeetingStatus(),1===meetingStatus){const e=getElementWithXPathFallback(document,XPATH_TURN_ON_CAPTIONS_BUTTON,XPATH_TURN_ON_CAPTIONS_BUTTON_V20210602),t=getElementWithXPathFallback(document,XPATH_TURN_OFF_CAPTIONS_BUTTON,XPATH_TURN_OFF_CAPTIONS_BUTTON_V20210602);if(null==e&&null==t)return void tryTo(startTranscribing(),"start");hasCaptionButtons=!0;let n=!1;if(e&&!t&&(n=!1),!e&&t&&(n=!0),firstStart||n!==weTurnedCaptionsOn){firstStart=!1,weTurnedCaptionsOn=n;const e=document.getElementById("feature"),t=document.getElementById("laxis-caption-toggle");e&&t&&(n?(isCaptionTurnedOn=!0,notificationsOn(),tryTo(startTranscribing(),"start")):tryTo(stopTranscribing(),"stop"))}}},setCurrentTranscriptDetails=()=>{const e=new Date,t=`${e.getFullYear()}-${pad(e.getMonth()+1)}-${pad(e.getDate())}`,n=`${document.location.pathname.match(/\/(.+)/)[1]}-${t}`,o=get(KEY_TRANSCRIPT_IDS)||[],s=!o.includes(n);if(currentTranscriptId=n,chrome.runtime.sendMessage({type:"meetingId",meetingId:n}),s){o.unshift(currentTranscriptId),set(KEY_TRANSCRIPT_IDS,o),currentSessionIndex=increment(`hangout_${currentTranscriptId}`);const e=getMeetingName();e&&set(`${makeTranscriptKey(currentTranscriptId)}_name`,e)}else{currentSessionIndex=get(makeTranscriptKey(currentTranscriptId))||0;const e=get(makeTranscriptKey(currentTranscriptId,currentSessionIndex))||0,t=get(makeTranscriptKey(currentTranscriptId,currentSessionIndex,e));if(t){const e=new Date(t.endedAt),n=parseInt(get(CURRENT_INTERVAL))||10;(new Date).getTime()-e.getTime()>6e4*n?currentSessionIndex=increment(`hangout_${currentTranscriptId}`):checkTranscriptionId()}else checkTranscriptionId()}debug({currentTranscriptId:currentTranscriptId,currentSessionIndex:currentSessionIndex}),loadLocalStorage=1};function saveLog(e){const t={message:e,time:(new Date).toISOString()};chrome.storage.local.get("logs",(function(e){var n=structuredClone(e.logs);void 0===n?n=[t]:n.push(t),chrome.storage.local.set({logs:n})}))} \ No newline at end of file diff --git a/feature/record/settings.js b/feature/record/settings.js new file mode 100644 index 0000000..0427172 --- /dev/null +++ b/feature/record/settings.js @@ -0,0 +1 @@ +window.__gmt_get=t=>get(`setting.${t}`),window.__gmt_set=(t,e)=>{set(`setting.${t}`,e),syncSettings()},window.__gmt_remove=t=>{remove(`setting.${t}`),syncSettings()};const syncSettings=()=>{TRANSCRIPT_FORMAT_MEETING=getOrSet("setting.transcript-format-meeting","# $year$-$month$-$day$ $name$\n\n$text$"),TRANSCRIPT_FORMAT_SESSION_JOIN=getOrSet("setting.transcript-format-session-join","\n\n...\n\n"),TRANSCRIPT_FORMAT_SPEAKER=getOrSet("setting.transcript-format-speaker","$hour$:$minute$:$second$\n $name$: $text$"),TRANSCRIPT_FORMAT_SPEAKER_JOIN=getOrSet("setting.transcript-format-speaker-join","\n\n"),SPEAKER_NAME_MAP=getOrSet("setting.speaker-name-map",{}),DEBUG=getOrSet("setting.debug",!1)}; \ No newline at end of file diff --git a/feature/record/storage.js b/feature/record/storage.js new file mode 100644 index 0000000..1f145cb --- /dev/null +++ b/feature/record/storage.js @@ -0,0 +1 @@ +const makeFullKey=e=>`__laxis_${e}`,makeTranscriptKey=(...e)=>{const[t,r,o]=e,n=[`hangout_${t}`];return e.length>=2&&(n.push(`session_${r}`),e.length>=3&&n.push(`speaker_${o}`)),n.join("_")},get=e=>{const t=window.localStorage.getItem(makeFullKey(e));return"string"==typeof t||t instanceof String?(debug(e,t),JSON.parse(t)):t},set=(e,t,r=!1)=>{const o=makeFullKey(e),n=JSON.stringify(t),a=makeFullKey("rotationKeys");let s=JSON.parse(window.localStorage.getItem(a))||[],i=new Set(s);for(;;)try{window.localStorage.setItem(o,n),r&&(i.add(o),window.localStorage.setItem(a,JSON.stringify(Array.from(i))));break}catch(e){if(e instanceof DOMException&&("QuotaExceededError"===e.name||e.code===DOMException.QUOTA_EXCEEDED_ERR)){if(console.log("Local storage quota exceeded! Deleting old keys to make room for new ones. This may take a while..."),debug("Local storage quota exceeded! Deleting old keys to make room for new ones. This may take a while..."),i.size>0){for(let e=0;e<5&&i.size>0;e++){const e=i.values().next().value;i.delete(e),window.localStorage.removeItem(e)}window.localStorage.setItem(a,JSON.stringify(Array.from(i)));continue}console.error("No keys available to delete.");break}console.error("Unexpected error:",e);break}},remove=e=>{debug(`remove ${makeFullKey(e)}`),window.localStorage.removeItem(makeFullKey(e))},getOrSet=(e,t)=>{const r=get(e);return null==r?(set(e,t),t):r},increment=e=>{const t=get(e);if(null==t)return set(e,0),0;{let r=t+1;return set(e,r),r}},setSpeaker=e=>{set(makeTranscriptKey(e.transcriptId,e.sessionIndex,e.speakerIndex),{image:e.image,person:e.person,text:e.text,startedAt:e.startedAt,endedAt:e.endedAt,highlight:e.highlight},!0)},getTranscript=e=>{const t=get(makeTranscriptKey(e))||0;let r=[];const o=get(makeTranscriptKey(e,t))||0;for(let n=0;n<=o;n+=1){const o=get(makeTranscriptKey(e,t,n));if(o&&o.text&&o.text.match(/\S/g)){startTimeStored||(startTimeStored=new Date(o.startedAt),startTime=new Date(o.startedAt));const a={transcriptId:e,sessionIndex:t,speakerIndex:n,person:o.person in SPEAKER_NAME_MAP?SPEAKER_NAME_MAP[o.person]:o.person,startedAt:new Date(o.startedAt),endedAt:new Date(o.endedAt),image:o.image,text:o.text,highlight:o.highlight};r.push(a)}}return r},deleteTranscript=e=>{const t=get(makeTranscriptKey(e));for(let r=0;r<=t;r+=1){const t=get(makeTranscriptKey(e,r));for(let o=0;o<=t;o+=1)remove(makeTranscriptKey(e,r,o));remove(makeTranscriptKey(e,r))}remove(makeTranscriptKey(e)),get(makeTranscriptKey(`${e}_name`))&&remove(makeTranscriptKey(`${e}_name`));let r=get(KEY_TRANSCRIPT_IDS)||[],o=get(APPLICATION_SPEECH_IDS)||[];const n=r.indexOf(e),a=o.findIndex((t=>t.ext===e));r.splice(n,1),o.splice(a,1),debug("would set transcript to",r),debug("would set transcript pairs to",o),set(KEY_TRANSCRIPT_IDS,r),set(APPLICATION_SPEECH_IDS,o);const s=document.querySelector(`#${e}`);if(s){const e=s.parentNode;e.removeChild(s),0===e.children.length&&(e.parentNode.removeChild(e.previousSibling),e.parentNode.removeChild(e))}else debug(`transcriptNode doesn't exist for ${e}`)},deletePreviousTranscripts=()=>{let e=get(KEY_TRANSCRIPT_IDS)||[];if(e.length>1)for(let t of e)t!==currentTranscriptId&&deleteTranscript(t)}; \ No newline at end of file diff --git a/feature/record/transcript.js b/feature/record/transcript.js new file mode 100644 index 0000000..736c54a --- /dev/null +++ b/feature/record/transcript.js @@ -0,0 +1,289 @@ +const getTranscriptText = (e, t) => { + let o = []; + sessionList.forEach((e => { + o.unshift(e) + })); + let n = "
", + i = {}; + n += "
Transcripts
", o.forEach(((s, a) => { + if (s.text && s.text.length && (0 === a || s.startedAt !== o[a - 1].startedAt)) { + let o = "", + a = "You" === s.person ? appUser : s.person; + if (s.highlight.length && e && (o = s.highlight[0], s.highlight[0])) { + let e = s.highlight[0], + t = i[e] ? i[e] : []; + t.push({ + text: s.text, + time: getTimeStr(startTime, s.startedAt), + person: a + }), i[e] = t + } + if (n += "
", n = n + "" + a, t && (n += ` (${getTimeStr(startTime,s.startedAt)})`), n += ": ", e && o.length) { + const e = bookmarkList.find((e => e.color === o)).code; + n += `
` + } + n += s.text, e && o.length && (n += "
"), n += "

" + } + })), n += "
"; + let s = ""; + return e && (s += "
", s += "
Highlights
", Object.keys(i).forEach((e => { + let t = bookmarkList.find((t => t.color === e)), + o = t.name, + n = t.code; + s += "
", s += `${o}:
`, i[e].forEach((e => { + s += `
${e.person} (${e.time}): ${e.text}

` + })), s += "
" + })), s += "
"), `
${startTime}
` + s + n + "
" +}, +Export2Txt = (e, t = "") => { + let o = document.createElement("a"), + n = e.replaceAll("
", "\n"), + i = document.createElement("div"); + i.style.display = "none", i.innerHTML = n; + let s = i.innerText; + const a = new File([s], "filename"), + d = URL.createObjectURL(a); + return o.href = d, o.download = `${t}.txt`, document.body.appendChild(o), o.click(), document.body.removeChild(o), Promise.resolve(1) +}, +Export2Pdf = (e, t = "") => { + const o = window.html2pdf; + t = t ? t + ".pdf" : `${getDefaultName()}.pdf`; + let n = document.createElement("div"); + n.innerHTML = e, document.body.appendChild(n); + const i = { + margin: [8, 16, 8, 16], + filename: `${t}.pdf`, + enableLinks: !1, + pagebreak: { + avoid: ["div"], + mode: ["css"] + }, + image: { + type: "jpeg", + quality: 1 + }, + html2canvas: { + allowTaint: !0, + dpi: 144, + letterRendering: !0, + logging: !1, + scale: 2, + scrollX: 0, + scrollY: 0 + } + }; + return new Promise(((e, t) => { + o().from(n).set(i).toPdf().get("pdf").then((e => { + const t = e.internal.getNumberOfPages(); + for (let o = 1; o < t + 1; o++) e.setPage(o), e.setFontSize(14), e.text(`${o}/${t}`, e.internal.pageSize.getWidth() - 10, e.internal.pageSize.getHeight() - 5); + document.body.removeChild(n) + })).save().then((() => { + e("Downloaded") + })).catch((e => t(e))) + })) +}, +Export2Word = (e, t = "") => { + var o = "Export HTML To Doc" + e + "", + n = new Blob(["\ufeff", o], { + type: "application/msword" + }), + i = "data:application/vnd.ms-word;charset=utf-8," + encodeURIComponent(o); + t = t ? `${t}.doc` : `${getDefaultName()}.doc`; + var s = document.createElement("a"); + return document.body.appendChild(s), navigator.msSaveOrOpenBlob ? navigator.msSaveOrOpenBlob(n, t) : (s.href = i, s.download = t, s.click()), document.body.removeChild(s), Promise.resolve(1) +}, +disableSaveToLaxisCloud = e => { + const t = document.getElementById("laxis-confirm-download"); + t && (t.disabled = e, t.style.color = t.disabled ? "#999" : ""); + const o = document.getElementById("extension"); + o && (o.onchange = () => { + t && (t.disabled = e && "app" === o.value, t.style.color = t.disabled ? "#999" : "") + }); + const n = document.getElementById("autoSaveCheck"); + n && (n.disabled = e) +}, +displayGoogleMeetQuota = (e, t) => { + const o = document.getElementById("google-meet-quota"); + o && -1 !== t && 0 !== t && (e < t ? (o.innerHTML = `Autosave to Laxis cloud: ${e.toFixed(0)} / ${t.toFixed(0)} minutes.
Please upgrade to enjoy unlimited autosave.`, disableSaveToLaxisCloud(!1)) : (o.innerHTML = `Autosave to Laxis cloud: ${e.toFixed(0)} / ${t.toFixed(0)} minutes.
Please upgrade to enjoy unlimited autosave.`, disableSaveToLaxisCloud(!0)), o.style.display = "block") +}, +reDisplayPrompt = () => { + const e = document.getElementById("login-prompt"); + e && (e.style.display = "block"), chrome.storage.local.remove("token") +}, +addRemindLogin = () => { + console.log("add login"); + const e = document.getElementById("laxis-miniPanel"), + t = document.getElementById("laxis-expandPanel"), + o = document.createElement("div"); + o.title = "Login to autosave notes", o.id = "laxis-remindLogin", o.style.width = "40px", o.style.height = "40px", o.classList.add("miniButtonContainer"), o.style.border = "0", o.addEventListener("click", signup), o.style.padding = "0"; + const n = createRemindLoginIcon(); + n.id = "remindLoginIcon", o.appendChild(n), n.id = "remindLoginIcon", o.style.display = "none", e.insertBefore(o, t) +}, +reDisplayRemindLogin = () => { + console.log("redisplay"); + const e = document.getElementById("laxis-remindLogin"); + e && (e.style.display = "block"), chrome.storage.local.remove("token") +}, +getTopics = (e, t) => window.fetch(`${domainUrl}/api/v2/templates/${e}/topics`, t), +Export2App = async (e, t = !1) => new Promise(((o, n) => { + chrome.storage.local.get(["token"], (function(i) { + if (i.token) { + let s = document.getElementById("laxis-openDownloadMenu"), + a = document.getElementById("laxis-download-menu-mini"); + s.classList.add("loading"), a.classList.add("loading"), window.fetch(`${domainUrl}/api/v2/templates?quick-note=true`, { + method: "GET", + headers: { + Authorization: `Bearer ${i.token}`, + "Content-Type": "application/json" + } + }).then((s => { + 200 === s.status ? s.json().then((s => { + s.items.length ? getTopics(s.items[0].id, { + method: "GET", + headers: { + Authorization: `Bearer ${i.token}`, + "Content-Type": "application/json" + } + }).then((a => { + a.json().then((a => { + const d = a.items; + let l = []; + if (getTranscript(currentTranscriptId).forEach((({ + image: t, + person: o, + text: n, + startedAt: i, + endedAt: s, + highlight: a + }) => { + let r = []; + if (a && e) { + const e = bookmarkList.find((e => e.color === a[0])); + if (e) { + const t = d.find((t => t.color.toLowerCase() === e.code.toLowerCase())); + t && (r = [t.id]) + } + } + n && l.push({ + imageUrl: t, + person: "You" === o ? appUser : o, + startedAt: i, + endedAt: s || i, + highlights: r, + text: n + }) + })), l.length) { + let e = JSON.stringify({ + meetingId: currentTranscriptId, + meetingName: document.getElementById("meeting-name").innerText, + templateId: s.items[0].id, + transcripts: l, + isEnded: t + }), + a = { + Authorization: `Bearer ${i.token}`, + "Content-Type": "application/json" + }, + d = get(APPLICATION_SPEECH_IDS) || [], + r = d.findIndex((e => e.ext === currentTranscriptId)); + if (-1 === r) window.fetch(`${domainUrl}/api/v1/speeches/google-meet`, { + method: "POST", + headers: a, + body: e + }).then((e => { + 200 === e.status ? e.json().then((e => { + set(APPLICATION_SPEECH_IDS, [...d, { + ext: currentTranscriptId, + app: e.id + }]), chrome.runtime.sendMessage({ + type: "transcriptId", + transcriptId: e.id + }), o(e.id) + })) : 401 === e.status ? (e.json().then((e => { + saveLog(`Export2App 401 fail 1 ${i.token} ${e.id} ${e.message}`) + })), reDisplayPrompt(), n("Expired token")) : e.json().then((e => { + n(e.message) + })) + })).catch((e => { + n(e) + })); + else { + let t = d[r].app; + window.fetch(`${domainUrl}/api/v1/speeches/google-meet/${t}`, { + method: "PUT", + headers: a, + body: e + }).then((e => { + 200 === e.status ? e.json().then((() => { + o(t) + })) : 401 === e.status ? (e.json().then((e => { + saveLog(`Export2App 401 fail 2 ${i.token} ${t} ${e.message}`) + })), reDisplayPrompt(), n("Expired token")) : e.json().then((e => { + n(e.message) + })) + })).catch((e => { + n(e) + })) + } + } else n("Empty transcript") + })) + })).catch((e => n(e))) : n("No quick note template") + })) : 401 === s.status ? (s.json().then((e => { + saveLog(`Export2App 401 fail 3 ${e.message} ${i.token}`) + })), reDisplayPrompt(), n("Expired token")) : s.json().then((e => n(e.message))) + })).catch((e => { + n(e) + })).finally((() => { + s.classList.remove("loading"), a.classList.remove("loading"), s.classList.add("finishing"), a.classList.add("finishing"), setTimeout((() => { + s.classList.remove("finishing"), a.classList.remove("finishing") + }), 3e3) + })) + } else n("Not logged in") + })) +})), downloadTranscript = () => { + const e = document.getElementById("meeting-name").innerText, + t = document.getElementById("laxis-confirm-download"); + t.innerHTML = "Downloading..."; + const o = document.getElementById("highlightCheck").checked, + n = document.getElementById("timestampCheck").checked, + i = document.getElementById("extension").value.toString(), + s = getTranscriptText(o, n); + let a; + switch (i) { + case "pdf": + a = () => Export2Pdf(s, e); + break; + case "doc": + a = () => Export2Word(s, e); + break; + case "txt": + a = () => Export2Txt(s, e); + break; + default: + a = () => Export2App(o) + } + a().then((e => { + "app" === i && window.open(`${domainUrl}/transcript/${e}`, "_blank") + })).catch((e => { + window.alert(e); + const t = get(ERROR_SAVING) || []; + set(ERROR_SAVING, [...t, e]) + })).finally((() => { + t.innerHTML = "Download"; + const e = document.getElementById("laxis-downloadMenu"); + e && (e.style.display = "none") + })) +}; + +function saveLog(e) { +const t = { + message: e, + time: (new Date).toISOString() +}; +chrome.storage.local.get("logs", (function(e) { + var o = structuredClone(e.logs); + void 0 === o ? o = [t] : o.push(t), chrome.storage.local.set({ + logs: o + }) +})) +} \ No newline at end of file diff --git a/feature/utilities/packages/html2canvas.js b/feature/utilities/packages/html2canvas.js new file mode 100644 index 0000000..b084bd1 --- /dev/null +++ b/feature/utilities/packages/html2canvas.js @@ -0,0 +1,20 @@ +/*! + * html2canvas 1.0.0-rc.7 + * Copyright (c) 2020 Niklas von Hertzen + * Released under MIT License + */ +!function(A,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(A=A||self).html2canvas=e()}(this,(function(){"use strict"; +/*! ***************************************************************************** + Copyright (c) Microsoft Corporation. All rights reserved. + Licensed under the Apache License, Version 2.0 (the "License"); you may not use + this file except in compliance with the License. You may obtain a copy of the + License at http://www.apache.org/licenses/LICENSE-2.0 + + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED + WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, + MERCHANTABLITY OR NON-INFRINGEMENT. + + See the Apache Version 2.0 License for specific language governing permissions + and limitations under the License. + ***************************************************************************** */var A=function(e,t){return A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,e){A.__proto__=e}||function(A,e){for(var t in e)e.hasOwnProperty(t)&&(A[t]=e[t])},A(e,t)};function e(e,t){function r(){this.constructor=e}A(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var t=function(){return t=Object.assign||function(A){for(var e,t=1,r=arguments.length;t0&&n[n.length-1])||6!==B[0]&&2!==B[0])){s=0;continue}if(3===B[0]&&(!n||B[1]>n[0]&&B[1]=55296&&n<=56319&&t>10),s%1024+56320)),(n+1===t||r.length>16384)&&(B+=String.fromCharCode.apply(String,r),r.length=0)}return B},a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Q=0;Q<64;Q++)c[a.charCodeAt(Q)]=Q;var u,w=function(A,e,t){return A.slice?A.slice(e,t):new Uint16Array(Array.prototype.slice.call(A,e,t))},U=function(){function A(A,e,t,r,n,B){this.initialValue=A,this.errorValue=e,this.highStart=t,this.highValueIndex=r,this.index=n,this.data=B}return A.prototype.get=function(A){var e;if(A>=0){if(A<55296||A>56319&&A<=65535)return e=((e=this.index[A>>5])<<2)+(31&A),this.data[e];if(A<=65535)return e=((e=this.index[2048+(A-55296>>5)])<<2)+(31&A),this.data[e];if(A>11),e=this.index[e],e+=A>>5&63,e=((e=this.index[e])<<2)+(31&A),this.data[e];if(A<=1114111)return this.data[this.highValueIndex]}return this.errorValue},A}(),l=10,C=13,g=15,E=17,F=18,h=19,H=20,d=21,f=22,p=24,N=25,K=26,I=27,T=28,m=30,R=32,L=33,O=34,v=35,D=37,b=38,S=39,M=40,y=42,_="×",P="÷",x=function(A){var e,t,r,n=function(A){var e,t,r,n,B,s=.75*A.length,o=A.length,i=0;"="===A[A.length-1]&&(s--,"="===A[A.length-2]&&s--);var a="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(s):new Array(s),Q=Array.isArray(a)?a:new Uint8Array(a);for(e=0;e>4,Q[i++]=(15&r)<<4|n>>2,Q[i++]=(3&n)<<6|63&B;return a}(A),B=Array.isArray(n)?function(A){for(var e=A.length,t=[],r=0;r0;){var s=r[--B];if(Array.isArray(A)?-1!==A.indexOf(s):A===s)for(var o=t;o<=r.length;){var i;if((i=r[++o])===e)return!0;if(i!==l)break}if(s!==l)break}return!1},q=function(A,e){for(var t=A;t>=0;){var r=e[t];if(r!==l)return r;t--}return 0},Z=function(A,e,t,r,n){if(0===t[r])return _;var B=r-1;if(Array.isArray(n)&&!0===n[B])return _;var s=B-1,o=B+1,i=e[B],a=s>=0?e[s]:0,c=e[o];if(2===i&&3===c)return _;if(-1!==z.indexOf(i))return"!";if(-1!==z.indexOf(c))return _;if(-1!==X.indexOf(c))return _;if(8===q(B,e))return P;if(11===x.get(A[B])&&(c===D||c===R||c===L))return _;if(7===i||7===c)return _;if(9===i)return _;if(-1===[l,C,g].indexOf(i)&&9===c)return _;if(-1!==[E,F,h,p,T].indexOf(c))return _;if(q(B,e)===f)return _;if(Y(23,f,B,e))return _;if(Y([E,F],d,B,e))return _;if(Y(12,12,B,e))return _;if(i===l)return P;if(23===i||23===c)return _;if(16===c||16===i)return P;if(-1!==[C,g,d].indexOf(c)||14===i)return _;if(36===a&&-1!==W.indexOf(i))return _;if(i===T&&36===c)return _;if(c===H&&-1!==V.concat(H,h,N,D,R,L).indexOf(i))return _;if(-1!==V.indexOf(c)&&i===N||-1!==V.indexOf(i)&&c===N)return _;if(i===I&&-1!==[D,R,L].indexOf(c)||-1!==[D,R,L].indexOf(i)&&c===K)return _;if(-1!==V.indexOf(i)&&-1!==J.indexOf(c)||-1!==J.indexOf(i)&&-1!==V.indexOf(c))return _;if(-1!==[I,K].indexOf(i)&&(c===N||-1!==[f,g].indexOf(c)&&e[o+1]===N)||-1!==[f,g].indexOf(i)&&c===N||i===N&&-1!==[N,T,p].indexOf(c))return _;if(-1!==[N,T,p,E,F].indexOf(c))for(var Q=B;Q>=0;){if((u=e[Q])===N)return _;if(-1===[T,p].indexOf(u))break;Q--}if(-1!==[I,K].indexOf(c))for(Q=-1!==[E,F].indexOf(i)?s:B;Q>=0;){var u;if((u=e[Q])===N)return _;if(-1===[T,p].indexOf(u))break;Q--}if(b===i&&-1!==[b,S,O,v].indexOf(c)||-1!==[S,O].indexOf(i)&&-1!==[S,M].indexOf(c)||-1!==[M,v].indexOf(i)&&c===M)return _;if(-1!==k.indexOf(i)&&-1!==[H,K].indexOf(c)||-1!==k.indexOf(c)&&i===I)return _;if(-1!==V.indexOf(i)&&-1!==V.indexOf(c))return _;if(i===p&&-1!==V.indexOf(c))return _;if(-1!==V.concat(N).indexOf(i)&&c===f||-1!==V.concat(N).indexOf(c)&&i===F)return _;if(41===i&&41===c){for(var w=t[B],U=1;w>0&&41===e[--w];)U++;if(U%2!=0)return _}return i===R&&c===L?_:P},j=function(A,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var t=function(A,e){void 0===e&&(e="strict");var t=[],r=[],n=[];return A.forEach((function(A,B){var s=x.get(A);if(s>50?(n.push(!0),s-=50):n.push(!1),-1!==["normal","auto","loose"].indexOf(e)&&-1!==[8208,8211,12316,12448].indexOf(A))return r.push(B),t.push(16);if(4===s||11===s){if(0===B)return r.push(B),t.push(m);var o=t[B-1];return-1===G.indexOf(o)?(r.push(r[B-1]),t.push(o)):(r.push(B),t.push(m))}return r.push(B),31===s?t.push("strict"===e?d:D):s===y||29===s?t.push(m):43===s?A>=131072&&A<=196605||A>=196608&&A<=262141?t.push(D):t.push(m):void t.push(s)})),[r,t,n]}(A,e.lineBreak),r=t[0],n=t[1],B=t[2];"break-all"!==e.wordBreak&&"break-word"!==e.wordBreak||(n=n.map((function(A){return-1!==[N,m,y].indexOf(A)?D:A})));var s="keep-all"===e.wordBreak?B.map((function(e,t){return e&&A[t]>=19968&&A[t]<=40959})):void 0;return[r,n,s]},$=function(){function A(A,e,t,r){this.codePoints=A,this.required="!"===e,this.start=t,this.end=r}return A.prototype.slice=function(){return i.apply(void 0,this.codePoints.slice(this.start,this.end))},A}();!function(A){A[A.STRING_TOKEN=0]="STRING_TOKEN",A[A.BAD_STRING_TOKEN=1]="BAD_STRING_TOKEN",A[A.LEFT_PARENTHESIS_TOKEN=2]="LEFT_PARENTHESIS_TOKEN",A[A.RIGHT_PARENTHESIS_TOKEN=3]="RIGHT_PARENTHESIS_TOKEN",A[A.COMMA_TOKEN=4]="COMMA_TOKEN",A[A.HASH_TOKEN=5]="HASH_TOKEN",A[A.DELIM_TOKEN=6]="DELIM_TOKEN",A[A.AT_KEYWORD_TOKEN=7]="AT_KEYWORD_TOKEN",A[A.PREFIX_MATCH_TOKEN=8]="PREFIX_MATCH_TOKEN",A[A.DASH_MATCH_TOKEN=9]="DASH_MATCH_TOKEN",A[A.INCLUDE_MATCH_TOKEN=10]="INCLUDE_MATCH_TOKEN",A[A.LEFT_CURLY_BRACKET_TOKEN=11]="LEFT_CURLY_BRACKET_TOKEN",A[A.RIGHT_CURLY_BRACKET_TOKEN=12]="RIGHT_CURLY_BRACKET_TOKEN",A[A.SUFFIX_MATCH_TOKEN=13]="SUFFIX_MATCH_TOKEN",A[A.SUBSTRING_MATCH_TOKEN=14]="SUBSTRING_MATCH_TOKEN",A[A.DIMENSION_TOKEN=15]="DIMENSION_TOKEN",A[A.PERCENTAGE_TOKEN=16]="PERCENTAGE_TOKEN",A[A.NUMBER_TOKEN=17]="NUMBER_TOKEN",A[A.FUNCTION=18]="FUNCTION",A[A.FUNCTION_TOKEN=19]="FUNCTION_TOKEN",A[A.IDENT_TOKEN=20]="IDENT_TOKEN",A[A.COLUMN_TOKEN=21]="COLUMN_TOKEN",A[A.URL_TOKEN=22]="URL_TOKEN",A[A.BAD_URL_TOKEN=23]="BAD_URL_TOKEN",A[A.CDC_TOKEN=24]="CDC_TOKEN",A[A.CDO_TOKEN=25]="CDO_TOKEN",A[A.COLON_TOKEN=26]="COLON_TOKEN",A[A.SEMICOLON_TOKEN=27]="SEMICOLON_TOKEN",A[A.LEFT_SQUARE_BRACKET_TOKEN=28]="LEFT_SQUARE_BRACKET_TOKEN",A[A.RIGHT_SQUARE_BRACKET_TOKEN=29]="RIGHT_SQUARE_BRACKET_TOKEN",A[A.UNICODE_RANGE_TOKEN=30]="UNICODE_RANGE_TOKEN",A[A.WHITESPACE_TOKEN=31]="WHITESPACE_TOKEN",A[A.EOF_TOKEN=32]="EOF_TOKEN"}(u||(u={}));var AA=45,eA=43,tA=-1,rA=function(A){return A>=48&&A<=57},nA=function(A){return rA(A)||A>=65&&A<=70||A>=97&&A<=102},BA=function(A){return 10===A||9===A||32===A},sA=function(A){return function(A){return function(A){return A>=97&&A<=122}(A)||function(A){return A>=65&&A<=90}(A)}(A)||function(A){return A>=128}(A)||95===A},oA=function(A){return sA(A)||rA(A)||A===AA},iA=function(A){return A>=0&&A<=8||11===A||A>=14&&A<=31||127===A},aA=function(A,e){return 92===A&&10!==e},cA=function(A,e,t){return A===AA?sA(e)||aA(e,t):!!sA(A)||!(92!==A||!aA(A,e))},QA=function(A,e,t){return A===eA||A===AA?!!rA(e)||46===e&&rA(t):rA(46===A?e:A)},uA=function(A){var e=0,t=1;A[e]!==eA&&A[e]!==AA||(A[e]===AA&&(t=-1),e++);for(var r=[];rA(A[e]);)r.push(A[e++]);var n=r.length?parseInt(i.apply(void 0,r),10):0;46===A[e]&&e++;for(var B=[];rA(A[e]);)B.push(A[e++]);var s=B.length,o=s?parseInt(i.apply(void 0,B),10):0;69!==A[e]&&101!==A[e]||e++;var a=1;A[e]!==eA&&A[e]!==AA||(A[e]===AA&&(a=-1),e++);for(var c=[];rA(A[e]);)c.push(A[e++]);var Q=c.length?parseInt(i.apply(void 0,c),10):0;return t*(n+o*Math.pow(10,-s))*Math.pow(10,a*Q)},wA={type:u.LEFT_PARENTHESIS_TOKEN},UA={type:u.RIGHT_PARENTHESIS_TOKEN},lA={type:u.COMMA_TOKEN},CA={type:u.SUFFIX_MATCH_TOKEN},gA={type:u.PREFIX_MATCH_TOKEN},EA={type:u.COLUMN_TOKEN},FA={type:u.DASH_MATCH_TOKEN},hA={type:u.INCLUDE_MATCH_TOKEN},HA={type:u.LEFT_CURLY_BRACKET_TOKEN},dA={type:u.RIGHT_CURLY_BRACKET_TOKEN},fA={type:u.SUBSTRING_MATCH_TOKEN},pA={type:u.BAD_URL_TOKEN},NA={type:u.BAD_STRING_TOKEN},KA={type:u.CDO_TOKEN},IA={type:u.CDC_TOKEN},TA={type:u.COLON_TOKEN},mA={type:u.SEMICOLON_TOKEN},RA={type:u.LEFT_SQUARE_BRACKET_TOKEN},LA={type:u.RIGHT_SQUARE_BRACKET_TOKEN},OA={type:u.WHITESPACE_TOKEN},vA={type:u.EOF_TOKEN},DA=function(){function A(){this._value=[]}return A.prototype.write=function(A){this._value=this._value.concat(o(A))},A.prototype.read=function(){for(var A=[],e=this.consumeToken();e!==vA;)A.push(e),e=this.consumeToken();return A},A.prototype.consumeToken=function(){var A=this.consumeCodePoint();switch(A){case 34:return this.consumeStringToken(34);case 35:var e=this.peekCodePoint(0),t=this.peekCodePoint(1),r=this.peekCodePoint(2);if(oA(e)||aA(t,r)){var n=cA(e,t,r)?2:1,B=this.consumeName();return{type:u.HASH_TOKEN,value:B,flags:n}}break;case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),CA;break;case 39:return this.consumeStringToken(39);case 40:return wA;case 41:return UA;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),fA;break;case eA:if(QA(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case 44:return lA;case AA:var s=A,o=this.peekCodePoint(0),a=this.peekCodePoint(1);if(QA(s,o,a))return this.reconsumeCodePoint(A),this.consumeNumericToken();if(cA(s,o,a))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();if(o===AA&&62===a)return this.consumeCodePoint(),this.consumeCodePoint(),IA;break;case 46:if(QA(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case 47:if(42===this.peekCodePoint(0))for(this.consumeCodePoint();;){var c=this.consumeCodePoint();if(42===c&&47===(c=this.consumeCodePoint()))return this.consumeToken();if(c===tA)return this.consumeToken()}break;case 58:return TA;case 59:return mA;case 60:if(33===this.peekCodePoint(0)&&this.peekCodePoint(1)===AA&&this.peekCodePoint(2)===AA)return this.consumeCodePoint(),this.consumeCodePoint(),KA;break;case 64:var Q=this.peekCodePoint(0),w=this.peekCodePoint(1),U=this.peekCodePoint(2);if(cA(Q,w,U)){B=this.consumeName();return{type:u.AT_KEYWORD_TOKEN,value:B}}break;case 91:return RA;case 92:if(aA(A,this.peekCodePoint(0)))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();break;case 93:return LA;case 61:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),gA;break;case 123:return HA;case 125:return dA;case 117:case 85:var l=this.peekCodePoint(0),C=this.peekCodePoint(1);return l!==eA||!nA(C)&&63!==C||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(A),this.consumeIdentLikeToken();case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),FA;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),EA;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),hA;break;case tA:return vA}return BA(A)?(this.consumeWhiteSpace(),OA):rA(A)?(this.reconsumeCodePoint(A),this.consumeNumericToken()):sA(A)?(this.reconsumeCodePoint(A),this.consumeIdentLikeToken()):{type:u.DELIM_TOKEN,value:i(A)}},A.prototype.consumeCodePoint=function(){var A=this._value.shift();return void 0===A?-1:A},A.prototype.reconsumeCodePoint=function(A){this._value.unshift(A)},A.prototype.peekCodePoint=function(A){return A>=this._value.length?-1:this._value[A]},A.prototype.consumeUnicodeRangeToken=function(){for(var A=[],e=this.consumeCodePoint();nA(e)&&A.length<6;)A.push(e),e=this.consumeCodePoint();for(var t=!1;63===e&&A.length<6;)A.push(e),e=this.consumeCodePoint(),t=!0;if(t){var r=parseInt(i.apply(void 0,A.map((function(A){return 63===A?48:A}))),16),n=parseInt(i.apply(void 0,A.map((function(A){return 63===A?70:A}))),16);return{type:u.UNICODE_RANGE_TOKEN,start:r,end:n}}var B=parseInt(i.apply(void 0,A),16);if(this.peekCodePoint(0)===AA&&nA(this.peekCodePoint(1))){this.consumeCodePoint(),e=this.consumeCodePoint();for(var s=[];nA(e)&&s.length<6;)s.push(e),e=this.consumeCodePoint();n=parseInt(i.apply(void 0,s),16);return{type:u.UNICODE_RANGE_TOKEN,start:B,end:n}}return{type:u.UNICODE_RANGE_TOKEN,start:B,end:B}},A.prototype.consumeIdentLikeToken=function(){var A=this.consumeName();return"url"===A.toLowerCase()&&40===this.peekCodePoint(0)?(this.consumeCodePoint(),this.consumeUrlToken()):40===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:u.FUNCTION_TOKEN,value:A}):{type:u.IDENT_TOKEN,value:A}},A.prototype.consumeUrlToken=function(){var A=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===tA)return{type:u.URL_TOKEN,value:""};var e=this.peekCodePoint(0);if(39===e||34===e){var t=this.consumeStringToken(this.consumeCodePoint());return t.type===u.STRING_TOKEN&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===tA||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:u.URL_TOKEN,value:t.value}):(this.consumeBadUrlRemnants(),pA)}for(;;){var r=this.consumeCodePoint();if(r===tA||41===r)return{type:u.URL_TOKEN,value:i.apply(void 0,A)};if(BA(r))return this.consumeWhiteSpace(),this.peekCodePoint(0)===tA||41===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:u.URL_TOKEN,value:i.apply(void 0,A)}):(this.consumeBadUrlRemnants(),pA);if(34===r||39===r||40===r||iA(r))return this.consumeBadUrlRemnants(),pA;if(92===r){if(!aA(r,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),pA;A.push(this.consumeEscapedCodePoint())}else A.push(r)}},A.prototype.consumeWhiteSpace=function(){for(;BA(this.peekCodePoint(0));)this.consumeCodePoint()},A.prototype.consumeBadUrlRemnants=function(){for(;;){var A=this.consumeCodePoint();if(41===A||A===tA)return;aA(A,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},A.prototype.consumeStringSlice=function(A){for(var e="";A>0;){var t=Math.min(6e4,A);e+=i.apply(void 0,this._value.splice(0,t)),A-=t}return this._value.shift(),e},A.prototype.consumeStringToken=function(A){for(var e="",t=0;;){var r=this._value[t];if(r===tA||void 0===r||r===A)return e+=this.consumeStringSlice(t),{type:u.STRING_TOKEN,value:e};if(10===r)return this._value.splice(0,t),NA;if(92===r){var n=this._value[t+1];n!==tA&&void 0!==n&&(10===n?(e+=this.consumeStringSlice(t),t=-1,this._value.shift()):aA(r,n)&&(e+=this.consumeStringSlice(t),e+=i(this.consumeEscapedCodePoint()),t=-1))}t++}},A.prototype.consumeNumber=function(){var A=[],e=4,t=this.peekCodePoint(0);for(t!==eA&&t!==AA||A.push(this.consumeCodePoint());rA(this.peekCodePoint(0));)A.push(this.consumeCodePoint());t=this.peekCodePoint(0);var r=this.peekCodePoint(1);if(46===t&&rA(r))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),e=8;rA(this.peekCodePoint(0));)A.push(this.consumeCodePoint());t=this.peekCodePoint(0),r=this.peekCodePoint(1);var n=this.peekCodePoint(2);if((69===t||101===t)&&((r===eA||r===AA)&&rA(n)||rA(r)))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),e=8;rA(this.peekCodePoint(0));)A.push(this.consumeCodePoint());return[uA(A),e]},A.prototype.consumeNumericToken=function(){var A=this.consumeNumber(),e=A[0],t=A[1],r=this.peekCodePoint(0),n=this.peekCodePoint(1),B=this.peekCodePoint(2);if(cA(r,n,B)){var s=this.consumeName();return{type:u.DIMENSION_TOKEN,number:e,flags:t,unit:s}}return 37===r?(this.consumeCodePoint(),{type:u.PERCENTAGE_TOKEN,number:e,flags:t}):{type:u.NUMBER_TOKEN,number:e,flags:t}},A.prototype.consumeEscapedCodePoint=function(){var A=this.consumeCodePoint();if(nA(A)){for(var e=i(A);nA(this.peekCodePoint(0))&&e.length<6;)e+=i(this.consumeCodePoint());BA(this.peekCodePoint(0))&&this.consumeCodePoint();var t=parseInt(e,16);return 0===t||function(A){return A>=55296&&A<=57343}(t)||t>1114111?65533:t}return A===tA?65533:A},A.prototype.consumeName=function(){for(var A="";;){var e=this.consumeCodePoint();if(oA(e))A+=i(e);else{if(!aA(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),A;A+=i(this.consumeEscapedCodePoint())}}},A}(),bA=function(){function A(A){this._tokens=A}return A.create=function(e){var t=new DA;return t.write(e),new A(t.read())},A.parseValue=function(e){return A.create(e).parseComponentValue()},A.parseValues=function(e){return A.create(e).parseComponentValues()},A.prototype.parseComponentValue=function(){for(var A=this.consumeToken();A.type===u.WHITESPACE_TOKEN;)A=this.consumeToken();if(A.type===u.EOF_TOKEN)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(A);var e=this.consumeComponentValue();do{A=this.consumeToken()}while(A.type===u.WHITESPACE_TOKEN);if(A.type===u.EOF_TOKEN)return e;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},A.prototype.parseComponentValues=function(){for(var A=[];;){var e=this.consumeComponentValue();if(e.type===u.EOF_TOKEN)return A;A.push(e),A.push()}},A.prototype.consumeComponentValue=function(){var A=this.consumeToken();switch(A.type){case u.LEFT_CURLY_BRACKET_TOKEN:case u.LEFT_SQUARE_BRACKET_TOKEN:case u.LEFT_PARENTHESIS_TOKEN:return this.consumeSimpleBlock(A.type);case u.FUNCTION_TOKEN:return this.consumeFunction(A)}return A},A.prototype.consumeSimpleBlock=function(A){for(var e={type:A,values:[]},t=this.consumeToken();;){if(t.type===u.EOF_TOKEN||XA(t,A))return e;this.reconsumeToken(t),e.values.push(this.consumeComponentValue()),t=this.consumeToken()}},A.prototype.consumeFunction=function(A){for(var e={name:A.value,values:[],type:u.FUNCTION};;){var t=this.consumeToken();if(t.type===u.EOF_TOKEN||t.type===u.RIGHT_PARENTHESIS_TOKEN)return e;this.reconsumeToken(t),e.values.push(this.consumeComponentValue())}},A.prototype.consumeToken=function(){var A=this._tokens.shift();return void 0===A?vA:A},A.prototype.reconsumeToken=function(A){this._tokens.unshift(A)},A}(),SA=function(A){return A.type===u.DIMENSION_TOKEN},MA=function(A){return A.type===u.NUMBER_TOKEN},yA=function(A){return A.type===u.IDENT_TOKEN},_A=function(A){return A.type===u.STRING_TOKEN},PA=function(A,e){return yA(A)&&A.value===e},xA=function(A){return A.type!==u.WHITESPACE_TOKEN},VA=function(A){return A.type!==u.WHITESPACE_TOKEN&&A.type!==u.COMMA_TOKEN},zA=function(A){var e=[],t=[];return A.forEach((function(A){if(A.type===u.COMMA_TOKEN){if(0===t.length)throw new Error("Error parsing function args, zero tokens for arg");return e.push(t),void(t=[])}A.type!==u.WHITESPACE_TOKEN&&t.push(A)})),t.length&&e.push(t),e},XA=function(A,e){return e===u.LEFT_CURLY_BRACKET_TOKEN&&A.type===u.RIGHT_CURLY_BRACKET_TOKEN||(e===u.LEFT_SQUARE_BRACKET_TOKEN&&A.type===u.RIGHT_SQUARE_BRACKET_TOKEN||e===u.LEFT_PARENTHESIS_TOKEN&&A.type===u.RIGHT_PARENTHESIS_TOKEN)},JA=function(A){return A.type===u.NUMBER_TOKEN||A.type===u.DIMENSION_TOKEN},GA=function(A){return A.type===u.PERCENTAGE_TOKEN||JA(A)},kA=function(A){return A.length>1?[A[0],A[1]]:[A[0]]},WA={type:u.NUMBER_TOKEN,number:0,flags:4},YA={type:u.PERCENTAGE_TOKEN,number:50,flags:4},qA={type:u.PERCENTAGE_TOKEN,number:100,flags:4},ZA=function(A,e,t){var r=A[0],n=A[1];return[jA(r,e),jA(void 0!==n?n:r,t)]},jA=function(A,e){if(A.type===u.PERCENTAGE_TOKEN)return A.number/100*e;if(SA(A))switch(A.unit){case"rem":case"em":return 16*A.number;default:return A.number}return A.number},$A="grad",Ae="turn",ee=function(A){if(A.type===u.DIMENSION_TOKEN)switch(A.unit){case"deg":return Math.PI*A.number/180;case $A:return Math.PI/200*A.number;case"rad":return A.number;case Ae:return 2*Math.PI*A.number}throw new Error("Unsupported angle type")},te=function(A){return A.type===u.DIMENSION_TOKEN&&("deg"===A.unit||A.unit===$A||"rad"===A.unit||A.unit===Ae)},re=function(A){switch(A.filter(yA).map((function(A){return A.value})).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[WA,WA];case"to top":case"bottom":return ne(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[WA,qA];case"to right":case"left":return ne(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[qA,qA];case"to bottom":case"top":return ne(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[qA,WA];case"to left":case"right":return ne(270)}return 0},ne=function(A){return Math.PI*A/180},Be=function(A){if(A.type===u.FUNCTION){var e=le[A.name];if(void 0===e)throw new Error('Attempting to parse an unsupported color function "'+A.name+'"');return e(A.values)}if(A.type===u.HASH_TOKEN){if(3===A.value.length){var t=A.value.substring(0,1),r=A.value.substring(1,2),n=A.value.substring(2,3);return ie(parseInt(t+t,16),parseInt(r+r,16),parseInt(n+n,16),1)}if(4===A.value.length){t=A.value.substring(0,1),r=A.value.substring(1,2),n=A.value.substring(2,3);var B=A.value.substring(3,4);return ie(parseInt(t+t,16),parseInt(r+r,16),parseInt(n+n,16),parseInt(B+B,16)/255)}if(6===A.value.length){t=A.value.substring(0,2),r=A.value.substring(2,4),n=A.value.substring(4,6);return ie(parseInt(t,16),parseInt(r,16),parseInt(n,16),1)}if(8===A.value.length){t=A.value.substring(0,2),r=A.value.substring(2,4),n=A.value.substring(4,6),B=A.value.substring(6,8);return ie(parseInt(t,16),parseInt(r,16),parseInt(n,16),parseInt(B,16)/255)}}if(A.type===u.IDENT_TOKEN){var s=Ce[A.value.toUpperCase()];if(void 0!==s)return s}return Ce.TRANSPARENT},se=function(A){return!(255&A)},oe=function(A){var e=255&A,t=255&A>>8,r=255&A>>16,n=255&A>>24;return e<255?"rgba("+n+","+r+","+t+","+e/255+")":"rgb("+n+","+r+","+t+")"},ie=function(A,e,t,r){return(A<<24|e<<16|t<<8|Math.round(255*r))>>>0},ae=function(A,e){if(A.type===u.NUMBER_TOKEN)return A.number;if(A.type===u.PERCENTAGE_TOKEN){var t=3===e?1:255;return 3===e?A.number/100*t:Math.round(A.number/100*t)}return 0},ce=function(A){var e=A.filter(VA);if(3===e.length){var t=e.map(ae),r=t[0],n=t[1],B=t[2];return ie(r,n,B,1)}if(4===e.length){var s=e.map(ae),o=(r=s[0],n=s[1],B=s[2],s[3]);return ie(r,n,B,o)}return 0};function Qe(A,e,t){return t<0&&(t+=1),t>=1&&(t-=1),t<1/6?(e-A)*t*6+A:t<.5?e:t<2/3?6*(e-A)*(2/3-t)+A:A}var ue,we,Ue=function(A){var e=A.filter(VA),t=e[0],r=e[1],n=e[2],B=e[3],s=(t.type===u.NUMBER_TOKEN?ne(t.number):ee(t))/(2*Math.PI),o=GA(r)?r.number/100:0,i=GA(n)?n.number/100:0,a=void 0!==B&&GA(B)?jA(B,1):1;if(0===o)return ie(255*i,255*i,255*i,1);var c=i<=.5?i*(o+1):i+o-i*o,Q=2*i-c,w=Qe(Q,c,s+1/3),U=Qe(Q,c,s),l=Qe(Q,c,s-1/3);return ie(255*w,255*U,255*l,a)},le={hsl:Ue,hsla:Ue,rgb:ce,rgba:ce},Ce={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199};!function(A){A[A.VALUE=0]="VALUE",A[A.LIST=1]="LIST",A[A.IDENT_VALUE=2]="IDENT_VALUE",A[A.TYPE_VALUE=3]="TYPE_VALUE",A[A.TOKEN_VALUE=4]="TOKEN_VALUE"}(ue||(ue={})),function(A){A[A.BORDER_BOX=0]="BORDER_BOX",A[A.PADDING_BOX=1]="PADDING_BOX",A[A.CONTENT_BOX=2]="CONTENT_BOX"}(we||(we={}));var ge,Ee={name:"background-clip",initialValue:"border-box",prefix:!1,type:ue.LIST,parse:function(A){return A.map((function(A){if(yA(A))switch(A.value){case"padding-box":return we.PADDING_BOX;case"content-box":return we.CONTENT_BOX}return we.BORDER_BOX}))}},Fe={name:"background-color",initialValue:"transparent",prefix:!1,type:ue.TYPE_VALUE,format:"color"},he=function(A){var e=Be(A[0]),t=A[1];return t&&GA(t)?{color:e,stop:t}:{color:e,stop:null}},He=function(A,e){var t=A[0],r=A[A.length-1];null===t.stop&&(t.stop=WA),null===r.stop&&(r.stop=qA);for(var n=[],B=0,s=0;sB?n.push(i):n.push(B),B=i}else n.push(null)}var a=null;for(s=0;sA.optimumDistance)?{optimumCorner:e,optimumDistance:o}:A}),{optimumDistance:n?1/0:-1/0,optimumCorner:null}).optimumCorner},Ne=function(A){var e=ne(180),t=[];return zA(A).forEach((function(A,r){if(0===r){var n=A[0];if(n.type===u.IDENT_TOKEN&&-1!==["top","left","right","bottom"].indexOf(n.value))return void(e=re(A));if(te(n))return void(e=(ee(n)+ne(270))%ne(360))}var B=he(A);t.push(B)})),{angle:e,stops:t,type:ge.LINEAR_GRADIENT}},Ke=function(A){return 0===A[0]&&255===A[1]&&0===A[2]&&255===A[3]},Ie=function(A,e,t,r,n){var B="http://www.w3.org/2000/svg",s=document.createElementNS(B,"svg"),o=document.createElementNS(B,"foreignObject");return s.setAttributeNS(null,"width",A.toString()),s.setAttributeNS(null,"height",e.toString()),o.setAttributeNS(null,"width","100%"),o.setAttributeNS(null,"height","100%"),o.setAttributeNS(null,"x",t.toString()),o.setAttributeNS(null,"y",r.toString()),o.setAttributeNS(null,"externalResourcesRequired","true"),s.appendChild(o),o.appendChild(n),s},Te=function(A){return new Promise((function(e,t){var r=new Image;r.onload=function(){return e(r)},r.onerror=t,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(A))}))},me={get SUPPORT_RANGE_BOUNDS(){var A=function(A){if(A.createRange){var e=A.createRange();if(e.getBoundingClientRect){var t=A.createElement("boundtest");t.style.height="123px",t.style.display="block",A.body.appendChild(t),e.selectNode(t);var r=e.getBoundingClientRect(),n=Math.round(r.height);if(A.body.removeChild(t),123===n)return!0}}return!1}(document);return Object.defineProperty(me,"SUPPORT_RANGE_BOUNDS",{value:A}),A},get SUPPORT_SVG_DRAWING(){var A=function(A){var e=new Image,t=A.createElement("canvas"),r=t.getContext("2d");if(!r)return!1;e.src="data:image/svg+xml,";try{r.drawImage(e,0,0),t.toDataURL()}catch(A){return!1}return!0}(document);return Object.defineProperty(me,"SUPPORT_SVG_DRAWING",{value:A}),A},get SUPPORT_FOREIGNOBJECT_DRAWING(){var A="function"==typeof Array.from&&"function"==typeof window.fetch?function(A){var e=A.createElement("canvas"),t=100;e.width=t,e.height=t;var r=e.getContext("2d");if(!r)return Promise.reject(!1);r.fillStyle="rgb(0, 255, 0)",r.fillRect(0,0,t,t);var n=new Image,B=e.toDataURL();n.src=B;var s=Ie(t,t,0,0,n);return r.fillStyle="red",r.fillRect(0,0,t,t),Te(s).then((function(e){r.drawImage(e,0,0);var n=r.getImageData(0,0,t,t).data;r.fillStyle="red",r.fillRect(0,0,t,t);var s=A.createElement("div");return s.style.backgroundImage="url("+B+")",s.style.height=t+"px",Ke(n)?Te(Ie(t,t,0,0,s)):Promise.reject(!1)})).then((function(A){return r.drawImage(A,0,0),Ke(r.getImageData(0,0,t,t).data)})).catch((function(){return!1}))}(document):Promise.resolve(!1);return Object.defineProperty(me,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:A}),A},get SUPPORT_CORS_IMAGES(){var A=void 0!==(new Image).crossOrigin;return Object.defineProperty(me,"SUPPORT_CORS_IMAGES",{value:A}),A},get SUPPORT_RESPONSE_TYPE(){var A="string"==typeof(new XMLHttpRequest).responseType;return Object.defineProperty(me,"SUPPORT_RESPONSE_TYPE",{value:A}),A},get SUPPORT_CORS_XHR(){var A="withCredentials"in new XMLHttpRequest;return Object.defineProperty(me,"SUPPORT_CORS_XHR",{value:A}),A}},Re=function(){function A(A){var e=A.id,t=A.enabled;this.id=e,this.enabled=t,this.start=Date.now()}return A.prototype.debug=function(){for(var A=[],e=0;e0&&setTimeout((function(){return e("Timed out ("+s._options.imageTimeout+"ms) loading image")}),s._options.imageTimeout)}))];case 3:return[2,n.sent()]}}))}))},A.prototype.has=function(A){return void 0!==this._cache[A]},A.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},A.prototype.proxy=function(A){var e=this,t=this._options.proxy;if(!t)throw new Error("No proxy defined");var r=A.substring(0,256);return new Promise((function(n,B){var s=me.SUPPORT_RESPONSE_TYPE?"blob":"text",o=new XMLHttpRequest;if(o.onload=function(){if(200===o.status)if("text"===s)n(o.response);else{var A=new FileReader;A.addEventListener("load",(function(){return n(A.result)}),!1),A.addEventListener("error",(function(A){return B(A)}),!1),A.readAsDataURL(o.response)}else B("Failed to proxy resource "+r+" with status code "+o.status)},o.onerror=B,o.open("GET",t+"?url="+encodeURIComponent(A)+"&responseType="+s),"text"!==s&&o instanceof XMLHttpRequest&&(o.responseType=s),e._options.imageTimeout){var i=e._options.imageTimeout;o.timeout=i,o.ontimeout=function(){return B("Timed out ("+i+"ms) proxying "+r)}}o.send()}))},A}(),ve=/^data:image\/svg\+xml/i,De=/^data:image\/.*;base64,/i,be=/^data:image\/.*/i,Se=function(A){return me.SUPPORT_SVG_DRAWING||!Pe(A)},Me=function(A){return be.test(A)},ye=function(A){return De.test(A)},_e=function(A){return"blob"===A.substr(0,4)},Pe=function(A){return"svg"===A.substr(-3).toLowerCase()||ve.test(A)},xe="closest-side",Ve="farthest-side",ze="closest-corner",Xe="farthest-corner",Je="circle",Ge="ellipse",ke="cover",We="contain",Ye=function(A){var e=qe.CIRCLE,t=Ze.FARTHEST_CORNER,r=[],n=[];return zA(A).forEach((function(A,B){var s=!0;if(0===B?s=A.reduce((function(A,e){if(yA(e))switch(e.value){case"center":return n.push(YA),!1;case"top":case"left":return n.push(WA),!1;case"right":case"bottom":return n.push(qA),!1}else if(GA(e)||JA(e))return n.push(e),!1;return A}),s):1===B&&(s=A.reduce((function(A,r){if(yA(r))switch(r.value){case Je:return e=qe.CIRCLE,!1;case Ge:return e=qe.ELLIPSE,!1;case We:case xe:return t=Ze.CLOSEST_SIDE,!1;case Ve:return t=Ze.FARTHEST_SIDE,!1;case ze:return t=Ze.CLOSEST_CORNER,!1;case ke:case Xe:return t=Ze.FARTHEST_CORNER,!1}else if(JA(r)||GA(r))return Array.isArray(t)||(t=[]),t.push(r),!1;return A}),s)),s){var o=he(A);r.push(o)}})),{size:t,shape:e,stops:r,position:n,type:ge.RADIAL_GRADIENT}};!function(A){A[A.URL=0]="URL",A[A.LINEAR_GRADIENT=1]="LINEAR_GRADIENT",A[A.RADIAL_GRADIENT=2]="RADIAL_GRADIENT"}(ge||(ge={}));var qe,Ze;!function(A){A[A.CIRCLE=0]="CIRCLE",A[A.ELLIPSE=1]="ELLIPSE"}(qe||(qe={})),function(A){A[A.CLOSEST_SIDE=0]="CLOSEST_SIDE",A[A.FARTHEST_SIDE=1]="FARTHEST_SIDE",A[A.CLOSEST_CORNER=2]="CLOSEST_CORNER",A[A.FARTHEST_CORNER=3]="FARTHEST_CORNER"}(Ze||(Ze={}));var je=function(A){if(A.type===u.URL_TOKEN){var e={url:A.value,type:ge.URL};return Le.getInstance().addImage(A.value),e}if(A.type===u.FUNCTION){var t=At[A.name];if(void 0===t)throw new Error('Attempting to parse an unsupported image function "'+A.name+'"');return t(A.values)}throw new Error("Unsupported image type")};var $e,At={"linear-gradient":function(A){var e=ne(180),t=[];return zA(A).forEach((function(A,r){if(0===r){var n=A[0];if(n.type===u.IDENT_TOKEN&&"to"===n.value)return void(e=re(A));if(te(n))return void(e=ee(n))}var B=he(A);t.push(B)})),{angle:e,stops:t,type:ge.LINEAR_GRADIENT}},"-moz-linear-gradient":Ne,"-ms-linear-gradient":Ne,"-o-linear-gradient":Ne,"-webkit-linear-gradient":Ne,"radial-gradient":function(A){var e=qe.CIRCLE,t=Ze.FARTHEST_CORNER,r=[],n=[];return zA(A).forEach((function(A,B){var s=!0;if(0===B){var o=!1;s=A.reduce((function(A,r){if(o)if(yA(r))switch(r.value){case"center":return n.push(YA),A;case"top":case"left":return n.push(WA),A;case"right":case"bottom":return n.push(qA),A}else(GA(r)||JA(r))&&n.push(r);else if(yA(r))switch(r.value){case Je:return e=qe.CIRCLE,!1;case Ge:return e=qe.ELLIPSE,!1;case"at":return o=!0,!1;case xe:return t=Ze.CLOSEST_SIDE,!1;case ke:case Ve:return t=Ze.FARTHEST_SIDE,!1;case We:case ze:return t=Ze.CLOSEST_CORNER,!1;case Xe:return t=Ze.FARTHEST_CORNER,!1}else if(JA(r)||GA(r))return Array.isArray(t)||(t=[]),t.push(r),!1;return A}),s)}if(s){var i=he(A);r.push(i)}})),{size:t,shape:e,stops:r,position:n,type:ge.RADIAL_GRADIENT}},"-moz-radial-gradient":Ye,"-ms-radial-gradient":Ye,"-o-radial-gradient":Ye,"-webkit-radial-gradient":Ye,"-webkit-gradient":function(A){var e=ne(180),t=[],r=ge.LINEAR_GRADIENT,n=qe.CIRCLE,B=Ze.FARTHEST_CORNER;return zA(A).forEach((function(A,e){var n=A[0];if(0===e){if(yA(n)&&"linear"===n.value)return void(r=ge.LINEAR_GRADIENT);if(yA(n)&&"radial"===n.value)return void(r=ge.RADIAL_GRADIENT)}if(n.type===u.FUNCTION)if("from"===n.name){var B=Be(n.values[0]);t.push({stop:WA,color:B})}else if("to"===n.name){B=Be(n.values[0]);t.push({stop:qA,color:B})}else if("color-stop"===n.name){var s=n.values.filter(VA);if(2===s.length){B=Be(s[1]);var o=s[0];MA(o)&&t.push({stop:{type:u.PERCENTAGE_TOKEN,number:100*o.number,flags:o.flags},color:B})}}})),r===ge.LINEAR_GRADIENT?{angle:(e+ne(180))%ne(360),stops:t,type:r}:{size:B,shape:n,stops:t,position:[],type:r}}},et={name:"background-image",initialValue:"none",type:ue.LIST,prefix:!1,parse:function(A){if(0===A.length)return[];var e=A[0];return e.type===u.IDENT_TOKEN&&"none"===e.value?[]:A.filter((function(A){return VA(A)&&function(A){return A.type!==u.FUNCTION||At[A.name]}(A)})).map(je)}},tt={name:"background-origin",initialValue:"border-box",prefix:!1,type:ue.LIST,parse:function(A){return A.map((function(A){if(yA(A))switch(A.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},rt={name:"background-position",initialValue:"0% 0%",type:ue.LIST,prefix:!1,parse:function(A){return zA(A).map((function(A){return A.filter(GA)})).map(kA)}};!function(A){A[A.REPEAT=0]="REPEAT",A[A.NO_REPEAT=1]="NO_REPEAT",A[A.REPEAT_X=2]="REPEAT_X",A[A.REPEAT_Y=3]="REPEAT_Y"}($e||($e={}));var nt,Bt={name:"background-repeat",initialValue:"repeat",prefix:!1,type:ue.LIST,parse:function(A){return zA(A).map((function(A){return A.filter(yA).map((function(A){return A.value})).join(" ")})).map(st)}},st=function(A){switch(A){case"no-repeat":return $e.NO_REPEAT;case"repeat-x":case"repeat no-repeat":return $e.REPEAT_X;case"repeat-y":case"no-repeat repeat":return $e.REPEAT_Y;default:return $e.REPEAT}};!function(A){A.AUTO="auto",A.CONTAIN="contain",A.COVER="cover"}(nt||(nt={}));var ot,it={name:"background-size",initialValue:"0",prefix:!1,type:ue.LIST,parse:function(A){return zA(A).map((function(A){return A.filter(at)}))}},at=function(A){return yA(A)||GA(A)},ct=function(A){return{name:"border-"+A+"-color",initialValue:"transparent",prefix:!1,type:ue.TYPE_VALUE,format:"color"}},Qt=ct("top"),ut=ct("right"),wt=ct("bottom"),Ut=ct("left"),lt=function(A){return{name:"border-radius-"+A,initialValue:"0 0",prefix:!1,type:ue.LIST,parse:function(A){return kA(A.filter(GA))}}},Ct=lt("top-left"),gt=lt("top-right"),Et=lt("bottom-right"),Ft=lt("bottom-left");!function(A){A[A.NONE=0]="NONE",A[A.SOLID=1]="SOLID"}(ot||(ot={}));var ht,Ht=function(A){return{name:"border-"+A+"-style",initialValue:"solid",prefix:!1,type:ue.IDENT_VALUE,parse:function(A){return"none"===A?ot.NONE:ot.SOLID}}},dt=Ht("top"),ft=Ht("right"),pt=Ht("bottom"),Nt=Ht("left"),Kt=function(A){return{name:"border-"+A+"-width",initialValue:"0",type:ue.VALUE,prefix:!1,parse:function(A){return SA(A)?A.number:0}}},It=Kt("top"),Tt=Kt("right"),mt=Kt("bottom"),Rt=Kt("left"),Lt={name:"color",initialValue:"transparent",prefix:!1,type:ue.TYPE_VALUE,format:"color"},Ot={name:"display",initialValue:"inline-block",prefix:!1,type:ue.LIST,parse:function(A){return A.filter(yA).reduce((function(A,e){return A|vt(e.value)}),0)}},vt=function(A){switch(A){case"block":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0};!function(A){A[A.NONE=0]="NONE",A[A.LEFT=1]="LEFT",A[A.RIGHT=2]="RIGHT",A[A.INLINE_START=3]="INLINE_START",A[A.INLINE_END=4]="INLINE_END"}(ht||(ht={}));var Dt,bt={name:"float",initialValue:"none",prefix:!1,type:ue.IDENT_VALUE,parse:function(A){switch(A){case"left":return ht.LEFT;case"right":return ht.RIGHT;case"inline-start":return ht.INLINE_START;case"inline-end":return ht.INLINE_END}return ht.NONE}},St={name:"letter-spacing",initialValue:"0",prefix:!1,type:ue.VALUE,parse:function(A){return A.type===u.IDENT_TOKEN&&"normal"===A.value?0:A.type===u.NUMBER_TOKEN||A.type===u.DIMENSION_TOKEN?A.number:0}};!function(A){A.NORMAL="normal",A.STRICT="strict"}(Dt||(Dt={}));var Mt,yt={name:"line-break",initialValue:"normal",prefix:!1,type:ue.IDENT_VALUE,parse:function(A){return"strict"===A?Dt.STRICT:Dt.NORMAL}},_t={name:"line-height",initialValue:"normal",prefix:!1,type:ue.TOKEN_VALUE},Pt={name:"list-style-image",initialValue:"none",type:ue.VALUE,prefix:!1,parse:function(A){return A.type===u.IDENT_TOKEN&&"none"===A.value?null:je(A)}};!function(A){A[A.INSIDE=0]="INSIDE",A[A.OUTSIDE=1]="OUTSIDE"}(Mt||(Mt={}));var xt,Vt={name:"list-style-position",initialValue:"outside",prefix:!1,type:ue.IDENT_VALUE,parse:function(A){return"inside"===A?Mt.INSIDE:Mt.OUTSIDE}};!function(A){A[A.NONE=-1]="NONE",A[A.DISC=0]="DISC",A[A.CIRCLE=1]="CIRCLE",A[A.SQUARE=2]="SQUARE",A[A.DECIMAL=3]="DECIMAL",A[A.CJK_DECIMAL=4]="CJK_DECIMAL",A[A.DECIMAL_LEADING_ZERO=5]="DECIMAL_LEADING_ZERO",A[A.LOWER_ROMAN=6]="LOWER_ROMAN",A[A.UPPER_ROMAN=7]="UPPER_ROMAN",A[A.LOWER_GREEK=8]="LOWER_GREEK",A[A.LOWER_ALPHA=9]="LOWER_ALPHA",A[A.UPPER_ALPHA=10]="UPPER_ALPHA",A[A.ARABIC_INDIC=11]="ARABIC_INDIC",A[A.ARMENIAN=12]="ARMENIAN",A[A.BENGALI=13]="BENGALI",A[A.CAMBODIAN=14]="CAMBODIAN",A[A.CJK_EARTHLY_BRANCH=15]="CJK_EARTHLY_BRANCH",A[A.CJK_HEAVENLY_STEM=16]="CJK_HEAVENLY_STEM",A[A.CJK_IDEOGRAPHIC=17]="CJK_IDEOGRAPHIC",A[A.DEVANAGARI=18]="DEVANAGARI",A[A.ETHIOPIC_NUMERIC=19]="ETHIOPIC_NUMERIC",A[A.GEORGIAN=20]="GEORGIAN",A[A.GUJARATI=21]="GUJARATI",A[A.GURMUKHI=22]="GURMUKHI",A[A.HEBREW=22]="HEBREW",A[A.HIRAGANA=23]="HIRAGANA",A[A.HIRAGANA_IROHA=24]="HIRAGANA_IROHA",A[A.JAPANESE_FORMAL=25]="JAPANESE_FORMAL",A[A.JAPANESE_INFORMAL=26]="JAPANESE_INFORMAL",A[A.KANNADA=27]="KANNADA",A[A.KATAKANA=28]="KATAKANA",A[A.KATAKANA_IROHA=29]="KATAKANA_IROHA",A[A.KHMER=30]="KHMER",A[A.KOREAN_HANGUL_FORMAL=31]="KOREAN_HANGUL_FORMAL",A[A.KOREAN_HANJA_FORMAL=32]="KOREAN_HANJA_FORMAL",A[A.KOREAN_HANJA_INFORMAL=33]="KOREAN_HANJA_INFORMAL",A[A.LAO=34]="LAO",A[A.LOWER_ARMENIAN=35]="LOWER_ARMENIAN",A[A.MALAYALAM=36]="MALAYALAM",A[A.MONGOLIAN=37]="MONGOLIAN",A[A.MYANMAR=38]="MYANMAR",A[A.ORIYA=39]="ORIYA",A[A.PERSIAN=40]="PERSIAN",A[A.SIMP_CHINESE_FORMAL=41]="SIMP_CHINESE_FORMAL",A[A.SIMP_CHINESE_INFORMAL=42]="SIMP_CHINESE_INFORMAL",A[A.TAMIL=43]="TAMIL",A[A.TELUGU=44]="TELUGU",A[A.THAI=45]="THAI",A[A.TIBETAN=46]="TIBETAN",A[A.TRAD_CHINESE_FORMAL=47]="TRAD_CHINESE_FORMAL",A[A.TRAD_CHINESE_INFORMAL=48]="TRAD_CHINESE_INFORMAL",A[A.UPPER_ARMENIAN=49]="UPPER_ARMENIAN",A[A.DISCLOSURE_OPEN=50]="DISCLOSURE_OPEN",A[A.DISCLOSURE_CLOSED=51]="DISCLOSURE_CLOSED"}(xt||(xt={}));var zt,Xt={name:"list-style-type",initialValue:"none",prefix:!1,type:ue.IDENT_VALUE,parse:function(A){switch(A){case"disc":return xt.DISC;case"circle":return xt.CIRCLE;case"square":return xt.SQUARE;case"decimal":return xt.DECIMAL;case"cjk-decimal":return xt.CJK_DECIMAL;case"decimal-leading-zero":return xt.DECIMAL_LEADING_ZERO;case"lower-roman":return xt.LOWER_ROMAN;case"upper-roman":return xt.UPPER_ROMAN;case"lower-greek":return xt.LOWER_GREEK;case"lower-alpha":return xt.LOWER_ALPHA;case"upper-alpha":return xt.UPPER_ALPHA;case"arabic-indic":return xt.ARABIC_INDIC;case"armenian":return xt.ARMENIAN;case"bengali":return xt.BENGALI;case"cambodian":return xt.CAMBODIAN;case"cjk-earthly-branch":return xt.CJK_EARTHLY_BRANCH;case"cjk-heavenly-stem":return xt.CJK_HEAVENLY_STEM;case"cjk-ideographic":return xt.CJK_IDEOGRAPHIC;case"devanagari":return xt.DEVANAGARI;case"ethiopic-numeric":return xt.ETHIOPIC_NUMERIC;case"georgian":return xt.GEORGIAN;case"gujarati":return xt.GUJARATI;case"gurmukhi":return xt.GURMUKHI;case"hebrew":return xt.HEBREW;case"hiragana":return xt.HIRAGANA;case"hiragana-iroha":return xt.HIRAGANA_IROHA;case"japanese-formal":return xt.JAPANESE_FORMAL;case"japanese-informal":return xt.JAPANESE_INFORMAL;case"kannada":return xt.KANNADA;case"katakana":return xt.KATAKANA;case"katakana-iroha":return xt.KATAKANA_IROHA;case"khmer":return xt.KHMER;case"korean-hangul-formal":return xt.KOREAN_HANGUL_FORMAL;case"korean-hanja-formal":return xt.KOREAN_HANJA_FORMAL;case"korean-hanja-informal":return xt.KOREAN_HANJA_INFORMAL;case"lao":return xt.LAO;case"lower-armenian":return xt.LOWER_ARMENIAN;case"malayalam":return xt.MALAYALAM;case"mongolian":return xt.MONGOLIAN;case"myanmar":return xt.MYANMAR;case"oriya":return xt.ORIYA;case"persian":return xt.PERSIAN;case"simp-chinese-formal":return xt.SIMP_CHINESE_FORMAL;case"simp-chinese-informal":return xt.SIMP_CHINESE_INFORMAL;case"tamil":return xt.TAMIL;case"telugu":return xt.TELUGU;case"thai":return xt.THAI;case"tibetan":return xt.TIBETAN;case"trad-chinese-formal":return xt.TRAD_CHINESE_FORMAL;case"trad-chinese-informal":return xt.TRAD_CHINESE_INFORMAL;case"upper-armenian":return xt.UPPER_ARMENIAN;case"disclosure-open":return xt.DISCLOSURE_OPEN;case"disclosure-closed":return xt.DISCLOSURE_CLOSED;default:return xt.NONE}}},Jt=function(A){return{name:"margin-"+A,initialValue:"0",prefix:!1,type:ue.TOKEN_VALUE}},Gt=Jt("top"),kt=Jt("right"),Wt=Jt("bottom"),Yt=Jt("left");!function(A){A[A.VISIBLE=0]="VISIBLE",A[A.HIDDEN=1]="HIDDEN",A[A.SCROLL=2]="SCROLL",A[A.AUTO=3]="AUTO"}(zt||(zt={}));var qt,Zt={name:"overflow",initialValue:"visible",prefix:!1,type:ue.LIST,parse:function(A){return A.filter(yA).map((function(A){switch(A.value){case"hidden":return zt.HIDDEN;case"scroll":return zt.SCROLL;case"auto":return zt.AUTO;default:return zt.VISIBLE}}))}};!function(A){A.NORMAL="normal",A.BREAK_WORD="break-word"}(qt||(qt={}));var jt,$t={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:ue.IDENT_VALUE,parse:function(A){return"break-word"===A?qt.BREAK_WORD:qt.NORMAL}},Ar=function(A){return{name:"padding-"+A,initialValue:"0",prefix:!1,type:ue.TYPE_VALUE,format:"length-percentage"}},er=Ar("top"),tr=Ar("right"),rr=Ar("bottom"),nr=Ar("left");!function(A){A[A.LEFT=0]="LEFT",A[A.CENTER=1]="CENTER",A[A.RIGHT=2]="RIGHT"}(jt||(jt={}));var Br,sr={name:"text-align",initialValue:"left",prefix:!1,type:ue.IDENT_VALUE,parse:function(A){switch(A){case"right":return jt.RIGHT;case"center":case"justify":return jt.CENTER;default:return jt.LEFT}}};!function(A){A[A.STATIC=0]="STATIC",A[A.RELATIVE=1]="RELATIVE",A[A.ABSOLUTE=2]="ABSOLUTE",A[A.FIXED=3]="FIXED",A[A.STICKY=4]="STICKY"}(Br||(Br={}));var or,ir={name:"position",initialValue:"static",prefix:!1,type:ue.IDENT_VALUE,parse:function(A){switch(A){case"relative":return Br.RELATIVE;case"absolute":return Br.ABSOLUTE;case"fixed":return Br.FIXED;case"sticky":return Br.STICKY}return Br.STATIC}},ar={name:"text-shadow",initialValue:"none",type:ue.LIST,prefix:!1,parse:function(A){return 1===A.length&&PA(A[0],"none")?[]:zA(A).map((function(A){for(var e={color:Ce.TRANSPARENT,offsetX:WA,offsetY:WA,blur:WA},t=0,r=0;r1?1:0],this.overflowWrap=xr($t,A.overflowWrap),this.paddingTop=xr(er,A.paddingTop),this.paddingRight=xr(tr,A.paddingRight),this.paddingBottom=xr(rr,A.paddingBottom),this.paddingLeft=xr(nr,A.paddingLeft),this.position=xr(ir,A.position),this.textAlign=xr(sr,A.textAlign),this.textDecorationColor=xr(fr,A.textDecorationColor||A.color),this.textDecorationLine=xr(pr,A.textDecorationLine),this.textShadow=xr(ar,A.textShadow),this.textTransform=xr(Qr,A.textTransform),this.transform=xr(ur,A.transform),this.transformOrigin=xr(Cr,A.transformOrigin),this.visibility=xr(Er,A.visibility),this.wordBreak=xr(hr,A.wordBreak),this.zIndex=xr(Hr,A.zIndex)}return A.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===cr.VISIBLE},A.prototype.isTransparent=function(){return se(this.backgroundColor)},A.prototype.isTransformed=function(){return null!==this.transform},A.prototype.isPositioned=function(){return this.position!==Br.STATIC},A.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},A.prototype.isFloating=function(){return this.float!==ht.NONE},A.prototype.isInlineLevel=function(){return Lr(this.display,4)||Lr(this.display,33554432)||Lr(this.display,268435456)||Lr(this.display,536870912)||Lr(this.display,67108864)||Lr(this.display,134217728)},A}(),_r=function(A){this.content=xr(Or,A.content),this.quotes=xr(br,A.quotes)},Pr=function(A){this.counterIncrement=xr(vr,A.counterIncrement),this.counterReset=xr(Dr,A.counterReset)},xr=function(A,e){var t=new DA,r=null!=e?e.toString():A.initialValue;t.write(r);var n=new bA(t.read());switch(A.type){case ue.IDENT_VALUE:var B=n.parseComponentValue();return A.parse(yA(B)?B.value:A.initialValue);case ue.VALUE:return A.parse(n.parseComponentValue());case ue.LIST:return A.parse(n.parseComponentValues());case ue.TOKEN_VALUE:return n.parseComponentValue();case ue.TYPE_VALUE:switch(A.format){case"angle":return ee(n.parseComponentValue());case"color":return Be(n.parseComponentValue());case"image":return je(n.parseComponentValue());case"length":var s=n.parseComponentValue();return JA(s)?s:WA;case"length-percentage":var o=n.parseComponentValue();return GA(o)?o:WA}}throw new Error("Attempting to parse unsupported css format type "+A.format)},Vr=function(A){this.styles=new yr(window.getComputedStyle(A,null)),this.textNodes=[],this.elements=[],null!==this.styles.transform&&fn(A)&&(A.style.transform="none"),this.bounds=s(A),this.flags=0},zr=function(A,e){this.text=A,this.bounds=e},Xr=function(A){var e=A.ownerDocument;if(e){var t=e.createElement("html2canvaswrapper");t.appendChild(A.cloneNode(!0));var r=A.parentNode;if(r){r.replaceChild(t,A);var n=s(t);return t.firstChild&&r.replaceChild(t.firstChild,t),n}}return new B(0,0,0,0)},Jr=function(A,e,t){var r=A.ownerDocument;if(!r)throw new Error("Node has no owner document");var n=r.createRange();return n.setStart(A,e),n.setEnd(A,e+t),B.fromClientRect(n.getBoundingClientRect())},Gr=function(A,e){return 0!==e.letterSpacing?o(A).map((function(A){return i(A)})):kr(A,e)},kr=function(A,e){for(var t,r=function(A,e){var t=o(A),r=j(t,e),n=r[0],B=r[1],s=r[2],i=t.length,a=0,c=0;return{next:function(){if(c>=i)return{done:!0,value:null};for(var A=_;c0)if(me.SUPPORT_RANGE_BOUNDS)n.push(new zr(A,Jr(t,B,A.length)));else{var r=t.splitText(A.length);n.push(new zr(A,Xr(t))),t=r}else me.SUPPORT_RANGE_BOUNDS||(t=t.splitText(A.length));B+=A.length})),n}(this.text,e,A)},Yr=function(A,e){switch(e){case or.LOWERCASE:return A.toLowerCase();case or.CAPITALIZE:return A.replace(qr,Zr);case or.UPPERCASE:return A.toUpperCase();default:return A}},qr=/(^|\s|:|-|\(|\))([a-z])/g,Zr=function(A,e,t){return A.length>0?e+t.toUpperCase():A},jr=function(A){function t(e){var t=A.call(this,e)||this;return t.src=e.currentSrc||e.src,t.intrinsicWidth=e.naturalWidth,t.intrinsicHeight=e.naturalHeight,Le.getInstance().addImage(t.src),t}return e(t,A),t}(Vr),$r=function(A){function t(e){var t=A.call(this,e)||this;return t.canvas=e,t.intrinsicWidth=e.width,t.intrinsicHeight=e.height,t}return e(t,A),t}(Vr),An=function(A){function t(e){var t=A.call(this,e)||this,r=new XMLSerializer;return t.svg="data:image/svg+xml,"+encodeURIComponent(r.serializeToString(e)),t.intrinsicWidth=e.width.baseVal.value,t.intrinsicHeight=e.height.baseVal.value,Le.getInstance().addImage(t.svg),t}return e(t,A),t}(Vr),en=function(A){function t(e){var t=A.call(this,e)||this;return t.value=e.value,t}return e(t,A),t}(Vr),tn=function(A){function t(e){var t=A.call(this,e)||this;return t.start=e.start,t.reversed="boolean"==typeof e.reversed&&!0===e.reversed,t}return e(t,A),t}(Vr),rn=[{type:u.DIMENSION_TOKEN,flags:0,unit:"px",number:3}],nn=[{type:u.PERCENTAGE_TOKEN,flags:0,number:50}],Bn="checkbox",sn="radio",on="password",an=707406591,cn=function(A){function t(e){var t,r,n,s=A.call(this,e)||this;switch(s.type=e.type.toLowerCase(),s.checked=e.checked,s.value=0===(r=(t=e).type===on?new Array(t.value.length+1).join("•"):t.value).length?t.placeholder||"":r,s.type!==Bn&&s.type!==sn||(s.styles.backgroundColor=3739148031,s.styles.borderTopColor=s.styles.borderRightColor=s.styles.borderBottomColor=s.styles.borderLeftColor=2779096575,s.styles.borderTopWidth=s.styles.borderRightWidth=s.styles.borderBottomWidth=s.styles.borderLeftWidth=1,s.styles.borderTopStyle=s.styles.borderRightStyle=s.styles.borderBottomStyle=s.styles.borderLeftStyle=ot.SOLID,s.styles.backgroundClip=[we.BORDER_BOX],s.styles.backgroundOrigin=[0],s.bounds=(n=s.bounds).width>n.height?new B(n.left+(n.width-n.height)/2,n.top,n.height,n.height):n.width0)e.textNodes.push(new Wr(r,e.styles));else if(dn(r)){var B=gn(r);B.styles.isVisible()&&(Fn(r,B,t)?B.flags|=4:hn(B.styles)&&(B.flags|=2),-1!==ln.indexOf(r.tagName)&&(B.flags|=8),e.elements.push(B),bn(r)||Tn(r)||Sn(r)||Cn(r,B,t))}},gn=function(A){return Ln(A)?new jr(A):Rn(A)?new $r(A):Tn(A)?new An(A):Nn(A)?new en(A):Kn(A)?new tn(A):In(A)?new cn(A):Sn(A)?new Qn(A):bn(A)?new un(A):On(A)?new Un(A):new Vr(A)},En=function(A){var e=gn(A);return e.flags|=4,Cn(A,e,e),e},Fn=function(A,e,t){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||mn(A)&&t.styles.isTransparent()},hn=function(A){return A.isPositioned()||A.isFloating()},Hn=function(A){return A.nodeType===Node.TEXT_NODE},dn=function(A){return A.nodeType===Node.ELEMENT_NODE},fn=function(A){return dn(A)&&void 0!==A.style&&!pn(A)},pn=function(A){return"object"==typeof A.className},Nn=function(A){return"LI"===A.tagName},Kn=function(A){return"OL"===A.tagName},In=function(A){return"INPUT"===A.tagName},Tn=function(A){return"svg"===A.tagName},mn=function(A){return"BODY"===A.tagName},Rn=function(A){return"CANVAS"===A.tagName},Ln=function(A){return"IMG"===A.tagName},On=function(A){return"IFRAME"===A.tagName},vn=function(A){return"STYLE"===A.tagName},Dn=function(A){return"SCRIPT"===A.tagName},bn=function(A){return"TEXTAREA"===A.tagName},Sn=function(A){return"SELECT"===A.tagName},Mn=function(){function A(){this.counters={}}return A.prototype.getCounterValue=function(A){var e=this.counters[A];return e&&e.length?e[e.length-1]:1},A.prototype.getCounterValues=function(A){var e=this.counters[A];return e||[]},A.prototype.pop=function(A){var e=this;A.forEach((function(A){return e.counters[A].pop()}))},A.prototype.parse=function(A){var e=this,t=A.counterIncrement,r=A.counterReset,n=!0;null!==t&&t.forEach((function(A){var t=e.counters[A.counter];t&&0!==A.increment&&(n=!1,t[Math.max(0,t.length-1)]+=A.increment)}));var B=[];return n&&r.forEach((function(A){var t=e.counters[A.counter];B.push(A.counter),t||(t=e.counters[A.counter]=[]),t.push(A.reset)})),B},A}(),yn={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},_n={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},Pn={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},xn={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Vn=function(A,e,t,r,n,B){return At?Zn(A,n,B.length>0):r.integers.reduce((function(e,t,n){for(;A>=t;)A-=t,e+=r.values[n];return e}),"")+B},zn=function(A,e,t,r){var n="";do{t||A--,n=r(A)+n,A/=e}while(A*e>=e);return n},Xn=function(A,e,t,r,n){var B=t-e+1;return(A<0?"-":"")+(zn(Math.abs(A),B,r,(function(A){return i(Math.floor(A%B)+e)}))+n)},Jn=function(A,e,t){void 0===t&&(t=". ");var r=e.length;return zn(Math.abs(A),r,!1,(function(A){return e[Math.floor(A%r)]}))+t},Gn=function(A,e,t,r,n,B){if(A<-9999||A>9999)return Zn(A,xt.CJK_DECIMAL,n.length>0);var s=Math.abs(A),o=n;if(0===s)return e[0]+o;for(var i=0;s>0&&i<=4;i++){var a=s%10;0===a&&Lr(B,1)&&""!==o?o=e[a]+o:a>1||1===a&&0===i||1===a&&1===i&&Lr(B,2)||1===a&&1===i&&Lr(B,4)&&A>100||1===a&&i>1&&Lr(B,8)?o=e[a]+(i>0?t[i-1]:"")+o:1===a&&i>0&&(o=t[i-1]+o),s=Math.floor(s/10)}return(A<0?r:"")+o},kn="十百千萬",Wn="拾佰仟萬",Yn="マイナス",qn="마이너스",Zn=function(A,e,t){var r=t?". ":"",n=t?"、":"",B=t?", ":"",s=t?" ":"";switch(e){case xt.DISC:return"•"+s;case xt.CIRCLE:return"◦"+s;case xt.SQUARE:return"◾"+s;case xt.DECIMAL_LEADING_ZERO:var o=Xn(A,48,57,!0,r);return o.length<4?"0"+o:o;case xt.CJK_DECIMAL:return Jn(A,"〇一二三四五六七八九",n);case xt.LOWER_ROMAN:return Vn(A,1,3999,yn,xt.DECIMAL,r).toLowerCase();case xt.UPPER_ROMAN:return Vn(A,1,3999,yn,xt.DECIMAL,r);case xt.LOWER_GREEK:return Xn(A,945,969,!1,r);case xt.LOWER_ALPHA:return Xn(A,97,122,!1,r);case xt.UPPER_ALPHA:return Xn(A,65,90,!1,r);case xt.ARABIC_INDIC:return Xn(A,1632,1641,!0,r);case xt.ARMENIAN:case xt.UPPER_ARMENIAN:return Vn(A,1,9999,_n,xt.DECIMAL,r);case xt.LOWER_ARMENIAN:return Vn(A,1,9999,_n,xt.DECIMAL,r).toLowerCase();case xt.BENGALI:return Xn(A,2534,2543,!0,r);case xt.CAMBODIAN:case xt.KHMER:return Xn(A,6112,6121,!0,r);case xt.CJK_EARTHLY_BRANCH:return Jn(A,"子丑寅卯辰巳午未申酉戌亥",n);case xt.CJK_HEAVENLY_STEM:return Jn(A,"甲乙丙丁戊己庚辛壬癸",n);case xt.CJK_IDEOGRAPHIC:case xt.TRAD_CHINESE_INFORMAL:return Gn(A,"零一二三四五六七八九",kn,"負",n,14);case xt.TRAD_CHINESE_FORMAL:return Gn(A,"零壹貳參肆伍陸柒捌玖",Wn,"負",n,15);case xt.SIMP_CHINESE_INFORMAL:return Gn(A,"零一二三四五六七八九",kn,"负",n,14);case xt.SIMP_CHINESE_FORMAL:return Gn(A,"零壹贰叁肆伍陆柒捌玖",Wn,"负",n,15);case xt.JAPANESE_INFORMAL:return Gn(A,"〇一二三四五六七八九","十百千万",Yn,n,0);case xt.JAPANESE_FORMAL:return Gn(A,"零壱弐参四伍六七八九","拾百千万",Yn,n,7);case xt.KOREAN_HANGUL_FORMAL:return Gn(A,"영일이삼사오육칠팔구","십백천만",qn,B,7);case xt.KOREAN_HANJA_INFORMAL:return Gn(A,"零一二三四五六七八九","十百千萬",qn,B,0);case xt.KOREAN_HANJA_FORMAL:return Gn(A,"零壹貳參四五六七八九","拾百千",qn,B,7);case xt.DEVANAGARI:return Xn(A,2406,2415,!0,r);case xt.GEORGIAN:return Vn(A,1,19999,xn,xt.DECIMAL,r);case xt.GUJARATI:return Xn(A,2790,2799,!0,r);case xt.GURMUKHI:return Xn(A,2662,2671,!0,r);case xt.HEBREW:return Vn(A,1,10999,Pn,xt.DECIMAL,r);case xt.HIRAGANA:return Jn(A,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case xt.HIRAGANA_IROHA:return Jn(A,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case xt.KANNADA:return Xn(A,3302,3311,!0,r);case xt.KATAKANA:return Jn(A,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",n);case xt.KATAKANA_IROHA:return Jn(A,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",n);case xt.LAO:return Xn(A,3792,3801,!0,r);case xt.MONGOLIAN:return Xn(A,6160,6169,!0,r);case xt.MYANMAR:return Xn(A,4160,4169,!0,r);case xt.ORIYA:return Xn(A,2918,2927,!0,r);case xt.PERSIAN:return Xn(A,1776,1785,!0,r);case xt.TAMIL:return Xn(A,3046,3055,!0,r);case xt.TELUGU:return Xn(A,3174,3183,!0,r);case xt.THAI:return Xn(A,3664,3673,!0,r);case xt.TIBETAN:return Xn(A,3872,3881,!0,r);case xt.DECIMAL:default:return Xn(A,48,57,!0,r)}},jn="data-html2canvas-ignore",$n=function(){function A(A,e){if(this.options=e,this.scrolledElements=[],this.referenceElement=A,this.counters=new Mn,this.quoteDepth=0,!A.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(A.ownerDocument.documentElement)}return A.prototype.toIFrame=function(A,e){var t=this,B=eB(A,e);if(!B.contentWindow)return Promise.reject("Unable to find iframe window");var s=A.defaultView.pageXOffset,o=A.defaultView.pageYOffset,i=B.contentWindow,a=i.document,c=tB(B).then((function(){return r(t,void 0,void 0,(function(){var A;return n(this,(function(t){switch(t.label){case 0:return this.scrolledElements.forEach(sB),i&&(i.scrollTo(e.left,e.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||i.scrollY===e.top&&i.scrollX===e.left||(a.documentElement.style.top=-e.top+"px",a.documentElement.style.left=-e.left+"px",a.documentElement.style.position="absolute")),A=this.options.onclone,void 0===this.clonedReferenceElement?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:a.fonts&&a.fonts.ready?[4,a.fonts.ready]:[3,2];case 1:t.sent(),t.label=2;case 2:return"function"==typeof A?[2,Promise.resolve().then((function(){return A(a)})).then((function(){return B}))]:[2,B]}}))}))}));return a.open(),a.write(nB(document.doctype)+""),BB(this.referenceElement.ownerDocument,s,o),a.replaceChild(a.adoptNode(this.documentElement),a.documentElement),a.close(),c},A.prototype.createElementClone=function(A){if(Rn(A))return this.createCanvasClone(A);if(vn(A))return this.createStyleClone(A);var e=A.cloneNode(!1);return Ln(e)&&"lazy"===e.loading&&(e.loading="eager"),e},A.prototype.createStyleClone=function(A){try{var e=A.sheet;if(e&&e.cssRules){var t=[].slice.call(e.cssRules,0).reduce((function(A,e){return e&&"string"==typeof e.cssText?A+e.cssText:A}),""),r=A.cloneNode(!1);return r.textContent=t,r}}catch(A){if(Re.getInstance(this.options.id).error("Unable to access cssRules property",A),"SecurityError"!==A.name)throw A}return A.cloneNode(!1)},A.prototype.createCanvasClone=function(A){if(this.options.inlineImages&&A.ownerDocument){var e=A.ownerDocument.createElement("img");try{return e.src=A.toDataURL(),e}catch(A){Re.getInstance(this.options.id).info("Unable to clone canvas contents, canvas is tainted")}}var t=A.cloneNode(!1);try{t.width=A.width,t.height=A.height;var r=A.getContext("2d"),n=t.getContext("2d");return n&&(r?n.putImageData(r.getImageData(0,0,A.width,A.height),0,0):n.drawImage(A,0,0)),t}catch(A){}return t},A.prototype.cloneNode=function(A){if(Hn(A))return document.createTextNode(A.data);if(!A.ownerDocument)return A.cloneNode(!1);var e=A.ownerDocument.defaultView;if(e&&dn(A)&&(fn(A)||pn(A))){var t=this.createElementClone(A),r=e.getComputedStyle(A),n=e.getComputedStyle(A,":before"),B=e.getComputedStyle(A,":after");this.referenceElement===A&&fn(t)&&(this.clonedReferenceElement=t),mn(t)&&cB(t);for(var s=this.counters.parse(new Pr(r)),o=this.resolvePseudoContent(A,t,n,mr.BEFORE),i=A.firstChild;i;i=i.nextSibling)dn(i)&&(Dn(i)||i.hasAttribute(jn)||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(i))||this.options.copyStyles&&dn(i)&&vn(i)||t.appendChild(this.cloneNode(i));o&&t.insertBefore(o,t.firstChild);var a=this.resolvePseudoContent(A,t,B,mr.AFTER);return a&&t.appendChild(a),this.counters.pop(s),r&&(this.options.copyStyles||pn(A))&&!On(A)&&rB(r,t),0===A.scrollTop&&0===A.scrollLeft||this.scrolledElements.push([t,A.scrollLeft,A.scrollTop]),(bn(A)||Sn(A))&&(bn(t)||Sn(t))&&(t.value=A.value),t}return A.cloneNode(!1)},A.prototype.resolvePseudoContent=function(A,e,t,r){var n=this;if(t){var B=t.content,s=e.ownerDocument;if(s&&B&&"none"!==B&&"-moz-alt-content"!==B&&"none"!==t.display){this.counters.parse(new Pr(t));var o=new _r(t),i=s.createElement("html2canvaspseudoelement");rB(t,i),o.content.forEach((function(e){if(e.type===u.STRING_TOKEN)i.appendChild(s.createTextNode(e.value));else if(e.type===u.URL_TOKEN){var t=s.createElement("img");t.src=e.value,t.style.opacity="1",i.appendChild(t)}else if(e.type===u.FUNCTION){if("attr"===e.name){var r=e.values.filter(yA);r.length&&i.appendChild(s.createTextNode(A.getAttribute(r[0].value)||""))}else if("counter"===e.name){var B=e.values.filter(VA),a=B[0],c=B[1];if(a&&yA(a)){var Q=n.counters.getCounterValue(a.value),w=c&&yA(c)?Xt.parse(c.value):xt.DECIMAL;i.appendChild(s.createTextNode(Zn(Q,w,!1)))}}else if("counters"===e.name){var U=e.values.filter(VA),l=(a=U[0],U[1]);c=U[2];if(a&&yA(a)){var C=n.counters.getCounterValues(a.value),g=c&&yA(c)?Xt.parse(c.value):xt.DECIMAL,E=l&&l.type===u.STRING_TOKEN?l.value:"",F=C.map((function(A){return Zn(A,g,!1)})).join(E);i.appendChild(s.createTextNode(F))}}}else if(e.type===u.IDENT_TOKEN)switch(e.value){case"open-quote":i.appendChild(s.createTextNode(Sr(o.quotes,n.quoteDepth++,!0)));break;case"close-quote":i.appendChild(s.createTextNode(Sr(o.quotes,--n.quoteDepth,!1)));break;default:i.appendChild(s.createTextNode(e.value))}})),i.className=oB+" "+iB;var a=r===mr.BEFORE?" "+oB:" "+iB;return pn(e)?e.className.baseValue+=a:e.className+=a,i}}},A.destroy=function(A){return!!A.parentNode&&(A.parentNode.removeChild(A),!0)},A}();!function(A){A[A.BEFORE=0]="BEFORE",A[A.AFTER=1]="AFTER"}(mr||(mr={}));var AB,eB=function(A,e){var t=A.createElement("iframe");return t.className="html2canvas-container",t.style.visibility="hidden",t.style.position="fixed",t.style.left="-10000px",t.style.top="0px",t.style.border="0",t.width=e.width.toString(),t.height=e.height.toString(),t.scrolling="no",t.setAttribute(jn,"true"),A.body.appendChild(t),t},tB=function(A){return new Promise((function(e,t){var r=A.contentWindow;if(!r)return t("No window assigned for iframe");var n=r.document;r.onload=A.onload=n.onreadystatechange=function(){r.onload=A.onload=n.onreadystatechange=null;var t=setInterval((function(){n.body.childNodes.length>0&&"complete"===n.readyState&&(clearInterval(t),e(A))}),50)}}))},rB=function(A,e){for(var t=A.length-1;t>=0;t--){var r=A.item(t);"content"!==r&&e.style.setProperty(r,A.getPropertyValue(r))}return e},nB=function(A){var e="";return A&&(e+=""),e},BB=function(A,e,t){A&&A.defaultView&&(e!==A.defaultView.pageXOffset||t!==A.defaultView.pageYOffset)&&A.defaultView.scrollTo(e,t)},sB=function(A){var e=A[0],t=A[1],r=A[2];e.scrollLeft=t,e.scrollTop=r},oB="___html2canvas___pseudoelement_before",iB="___html2canvas___pseudoelement_after",aB='{\n content: "" !important;\n display: none !important;\n}',cB=function(A){QB(A,"."+oB+":before"+aB+"\n ."+iB+":after"+aB)},QB=function(A,e){var t=A.ownerDocument;if(t){var r=t.createElement("style");r.textContent=e,A.appendChild(r)}};!function(A){A[A.VECTOR=0]="VECTOR",A[A.BEZIER_CURVE=1]="BEZIER_CURVE"}(AB||(AB={}));var uB,wB=function(A,e){return A.length===e.length&&A.some((function(A,t){return A===e[t]}))},UB=function(){function A(A,e){this.type=AB.VECTOR,this.x=A,this.y=e}return A.prototype.add=function(e,t){return new A(this.x+e,this.y+t)},A}(),lB=function(A,e,t){return new UB(A.x+(e.x-A.x)*t,A.y+(e.y-A.y)*t)},CB=function(){function A(A,e,t,r){this.type=AB.BEZIER_CURVE,this.start=A,this.startControl=e,this.endControl=t,this.end=r}return A.prototype.subdivide=function(e,t){var r=lB(this.start,this.startControl,e),n=lB(this.startControl,this.endControl,e),B=lB(this.endControl,this.end,e),s=lB(r,n,e),o=lB(n,B,e),i=lB(s,o,e);return t?new A(this.start,r,s,i):new A(i,o,B,this.end)},A.prototype.add=function(e,t){return new A(this.start.add(e,t),this.startControl.add(e,t),this.endControl.add(e,t),this.end.add(e,t))},A.prototype.reverse=function(){return new A(this.end,this.endControl,this.startControl,this.start)},A}(),gB=function(A){return A.type===AB.BEZIER_CURVE},EB=function(A){var e=A.styles,t=A.bounds,r=ZA(e.borderTopLeftRadius,t.width,t.height),n=r[0],B=r[1],s=ZA(e.borderTopRightRadius,t.width,t.height),o=s[0],i=s[1],a=ZA(e.borderBottomRightRadius,t.width,t.height),c=a[0],Q=a[1],u=ZA(e.borderBottomLeftRadius,t.width,t.height),w=u[0],U=u[1],l=[];l.push((n+o)/t.width),l.push((w+c)/t.width),l.push((B+U)/t.height),l.push((i+Q)/t.height);var C=Math.max.apply(Math,l);C>1&&(n/=C,B/=C,o/=C,i/=C,c/=C,Q/=C,w/=C,U/=C);var g=t.width-o,E=t.height-Q,F=t.width-c,h=t.height-U,H=e.borderTopWidth,d=e.borderRightWidth,f=e.borderBottomWidth,p=e.borderLeftWidth,N=jA(e.paddingTop,A.bounds.width),K=jA(e.paddingRight,A.bounds.width),I=jA(e.paddingBottom,A.bounds.width),T=jA(e.paddingLeft,A.bounds.width);this.topLeftBorderBox=n>0||B>0?FB(t.left,t.top,n,B,uB.TOP_LEFT):new UB(t.left,t.top),this.topRightBorderBox=o>0||i>0?FB(t.left+g,t.top,o,i,uB.TOP_RIGHT):new UB(t.left+t.width,t.top),this.bottomRightBorderBox=c>0||Q>0?FB(t.left+F,t.top+E,c,Q,uB.BOTTOM_RIGHT):new UB(t.left+t.width,t.top+t.height),this.bottomLeftBorderBox=w>0||U>0?FB(t.left,t.top+h,w,U,uB.BOTTOM_LEFT):new UB(t.left,t.top+t.height),this.topLeftPaddingBox=n>0||B>0?FB(t.left+p,t.top+H,Math.max(0,n-p),Math.max(0,B-H),uB.TOP_LEFT):new UB(t.left+p,t.top+H),this.topRightPaddingBox=o>0||i>0?FB(t.left+Math.min(g,t.width+p),t.top+H,g>t.width+p?0:o-p,i-H,uB.TOP_RIGHT):new UB(t.left+t.width-d,t.top+H),this.bottomRightPaddingBox=c>0||Q>0?FB(t.left+Math.min(F,t.width-p),t.top+Math.min(E,t.height+H),Math.max(0,c-d),Q-f,uB.BOTTOM_RIGHT):new UB(t.left+t.width-d,t.top+t.height-f),this.bottomLeftPaddingBox=w>0||U>0?FB(t.left+p,t.top+h,Math.max(0,w-p),U-f,uB.BOTTOM_LEFT):new UB(t.left+p,t.top+t.height-f),this.topLeftContentBox=n>0||B>0?FB(t.left+p+T,t.top+H+N,Math.max(0,n-(p+T)),Math.max(0,B-(H+N)),uB.TOP_LEFT):new UB(t.left+p+T,t.top+H+N),this.topRightContentBox=o>0||i>0?FB(t.left+Math.min(g,t.width+p+T),t.top+H+N,g>t.width+p+T?0:o-p+T,i-(H+N),uB.TOP_RIGHT):new UB(t.left+t.width-(d+K),t.top+H+N),this.bottomRightContentBox=c>0||Q>0?FB(t.left+Math.min(F,t.width-(p+T)),t.top+Math.min(E,t.height+H+N),Math.max(0,c-(d+K)),Q-(f+I),uB.BOTTOM_RIGHT):new UB(t.left+t.width-(d+K),t.top+t.height-(f+I)),this.bottomLeftContentBox=w>0||U>0?FB(t.left+p+T,t.top+h,Math.max(0,w-(p+T)),U-(f+I),uB.BOTTOM_LEFT):new UB(t.left+p+T,t.top+t.height-(f+I))};!function(A){A[A.TOP_LEFT=0]="TOP_LEFT",A[A.TOP_RIGHT=1]="TOP_RIGHT",A[A.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",A[A.BOTTOM_LEFT=3]="BOTTOM_LEFT"}(uB||(uB={}));var FB=function(A,e,t,r,n){var B=(Math.sqrt(2)-1)/3*4,s=t*B,o=r*B,i=A+t,a=e+r;switch(n){case uB.TOP_LEFT:return new CB(new UB(A,a),new UB(A,a-o),new UB(i-s,e),new UB(i,e));case uB.TOP_RIGHT:return new CB(new UB(A,e),new UB(A+s,e),new UB(i,a-o),new UB(i,a));case uB.BOTTOM_RIGHT:return new CB(new UB(i,e),new UB(i,e+o),new UB(A+s,a),new UB(A,a));case uB.BOTTOM_LEFT:default:return new CB(new UB(i,a),new UB(i-s,a),new UB(A,e+o),new UB(A,e))}},hB=function(A){return[A.topLeftBorderBox,A.topRightBorderBox,A.bottomRightBorderBox,A.bottomLeftBorderBox]},HB=function(A){return[A.topLeftPaddingBox,A.topRightPaddingBox,A.bottomRightPaddingBox,A.bottomLeftPaddingBox]},dB=function(A,e,t){this.type=0,this.offsetX=A,this.offsetY=e,this.matrix=t,this.target=6},fB=function(A,e){this.type=1,this.target=e,this.path=A},pB=function(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]},NB=function(){function A(A,e){if(this.container=A,this.effects=e.slice(0),this.curves=new EB(A),null!==A.styles.transform){var t=A.bounds.left+A.styles.transformOrigin[0].number,r=A.bounds.top+A.styles.transformOrigin[1].number,n=A.styles.transform;this.effects.push(new dB(t,r,n))}if(A.styles.overflowX!==zt.VISIBLE){var B=hB(this.curves),s=HB(this.curves);wB(B,s)?this.effects.push(new fB(B,6)):(this.effects.push(new fB(B,2)),this.effects.push(new fB(s,4)))}}return A.prototype.getParentEffects=function(){var A=this.effects.slice(0);if(this.container.styles.overflowX!==zt.VISIBLE){var e=hB(this.curves),t=HB(this.curves);wB(e,t)||A.push(new fB(t,6))}return A},A}(),KB=function(A,e,t,r){A.container.elements.forEach((function(n){var B=Lr(n.flags,4),s=Lr(n.flags,2),o=new NB(n,A.getParentEffects());Lr(n.styles.display,2048)&&r.push(o);var i=Lr(n.flags,8)?[]:r;if(B||s){var a=B||n.styles.isPositioned()?t:e,c=new pB(o);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var Q=n.styles.zIndex.order;if(Q<0){var u=0;a.negativeZIndex.some((function(A,e){return Q>A.element.container.styles.zIndex.order?(u=e,!1):u>0})),a.negativeZIndex.splice(u,0,c)}else if(Q>0){var w=0;a.positiveZIndex.some((function(A,e){return Q>=A.element.container.styles.zIndex.order?(w=e+1,!1):w>0})),a.positiveZIndex.splice(w,0,c)}else a.zeroOrAutoZIndexOrTransformedOrOpacity.push(c)}else n.styles.isFloating()?a.nonPositionedFloats.push(c):a.nonPositionedInlineLevel.push(c);KB(o,c,B?c:t,i)}else n.styles.isInlineLevel()?e.inlineLevel.push(o):e.nonInlineLevel.push(o),KB(o,e,t,i);Lr(n.flags,8)&&IB(n,i)}))},IB=function(A,e){for(var t=A instanceof tn?A.start:1,r=A instanceof tn&&A.reversed,n=0;n0&&A.intrinsicHeight>0){var r=RB(A),n=HB(e);this.path(n),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(t,0,0,A.intrinsicWidth,A.intrinsicHeight,r.left,r.top,r.width,r.height),this.ctx.restore()}},A.prototype.renderNodeContent=function(e){return r(this,void 0,void 0,(function(){var t,r,s,o,i,a,c,Q,w,U,l,C,g,E;return n(this,(function(n){switch(n.label){case 0:this.applyEffects(e.effects,4),t=e.container,r=e.curves,s=t.styles,o=0,i=t.textNodes,n.label=1;case 1:return o0&&p>0&&(E=r.ctx.createPattern(l,"repeat"),r.renderRepeat(h,E,K,I))):function(A){return A.type===ge.RADIAL_GRADIENT}(t)&&(F=LB(A,e,[null,null,null]),h=F[0],H=F[1],d=F[2],f=F[3],p=F[4],N=0===t.position.length?[YA]:t.position,K=jA(N[0],f),I=jA(N[N.length-1],p),T=function(A,e,t,r,n){var B=0,s=0;switch(A.size){case Ze.CLOSEST_SIDE:A.shape===qe.CIRCLE?B=s=Math.min(Math.abs(e),Math.abs(e-r),Math.abs(t),Math.abs(t-n)):A.shape===qe.ELLIPSE&&(B=Math.min(Math.abs(e),Math.abs(e-r)),s=Math.min(Math.abs(t),Math.abs(t-n)));break;case Ze.CLOSEST_CORNER:if(A.shape===qe.CIRCLE)B=s=Math.min(fe(e,t),fe(e,t-n),fe(e-r,t),fe(e-r,t-n));else if(A.shape===qe.ELLIPSE){var o=Math.min(Math.abs(t),Math.abs(t-n))/Math.min(Math.abs(e),Math.abs(e-r)),i=pe(r,n,e,t,!0),a=i[0],c=i[1];s=o*(B=fe(a-e,(c-t)/o))}break;case Ze.FARTHEST_SIDE:A.shape===qe.CIRCLE?B=s=Math.max(Math.abs(e),Math.abs(e-r),Math.abs(t),Math.abs(t-n)):A.shape===qe.ELLIPSE&&(B=Math.max(Math.abs(e),Math.abs(e-r)),s=Math.max(Math.abs(t),Math.abs(t-n)));break;case Ze.FARTHEST_CORNER:if(A.shape===qe.CIRCLE)B=s=Math.max(fe(e,t),fe(e,t-n),fe(e-r,t),fe(e-r,t-n));else if(A.shape===qe.ELLIPSE){o=Math.max(Math.abs(t),Math.abs(t-n))/Math.max(Math.abs(e),Math.abs(e-r));var Q=pe(r,n,e,t,!1);a=Q[0],c=Q[1],s=o*(B=fe(a-e,(c-t)/o))}}return Array.isArray(A.size)&&(B=jA(A.size[0],r),s=2===A.size.length?jA(A.size[1],n):B),[B,s]}(t,K,I,f,p),m=T[0],R=T[1],m>0&&m>0&&(L=r.ctx.createRadialGradient(H+K,d+I,0,H+K,d+I,m),He(t.stops,2*m).forEach((function(A){return L.addColorStop(A.stop,oe(A.color))})),r.path(h),r.ctx.fillStyle=L,m!==R?(O=A.bounds.left+.5*A.bounds.width,v=A.bounds.top+.5*A.bounds.height,b=1/(D=R/m),r.ctx.save(),r.ctx.translate(O,v),r.ctx.transform(1,0,0,D,0,0),r.ctx.translate(-O,-v),r.ctx.fillRect(H,b*(d-v)+v,f,p*b),r.ctx.restore()):r.ctx.fill())),n.label=6;case 6:return e--,[2]}}))},r=this,B=0,s=A.styles.backgroundImage.slice(0).reverse(),i.label=1;case 1:return Be.length)&&(t=e.length);for(var r=0,n=new Array(t);rA){var c=u;u=A,A=c}}else{if("l"!==e&&"landscape"!==e)throw"Invalid orientation: "+e;e="l",A>u&&(c=u,u=A,A=c)}return{width:u,height:A,unit:t,k:a}},t.default=n.jsPDF},"./src/plugin/pagebreaks.js":function(e,t,r){"use strict";r.r(t),r("./node_modules/core-js/modules/es.array.concat.js"),r("./node_modules/core-js/modules/es.array.slice.js"),r("./node_modules/core-js/modules/es.array.join.js"),r("./node_modules/core-js/modules/web.dom-collections.for-each.js"),r("./node_modules/core-js/modules/es.object.keys.js");var n=r("./src/worker.js"),o=r("./src/utils.js"),s={toContainer:n.default.prototype.toContainer};n.default.template.opt.pagebreak={mode:["css","legacy"],before:[],after:[],avoid:[]},n.default.prototype.toContainer=function(){return s.toContainer.call(this).then((function(){var e=this.prop.container,t=this.prop.pageSize.inner.px.height,r=[].concat(this.opt.pagebreak.mode),n={avoidAll:-1!==r.indexOf("avoid-all"),css:-1!==r.indexOf("css"),legacy:-1!==r.indexOf("legacy")},s={},i=this;["before","after","avoid"].forEach((function(t){var r=n.avoidAll&&"avoid"===t;s[t]=r?[]:[].concat(i.opt.pagebreak[t]||[]),s[t].length>0&&(s[t]=Array.prototype.slice.call(e.querySelectorAll(s[t].join(", "))))}));var a=e.querySelectorAll(".html2pdf__page-break");a=Array.prototype.slice.call(a);var A=e.querySelectorAll("*");Array.prototype.forEach.call(A,(function(e){var r={before:!1,after:n.legacy&&-1!==a.indexOf(e),avoid:n.avoidAll};if(n.css){var i=window.getComputedStyle(e),A=["always","page","left","right"];r={before:r.before||-1!==A.indexOf(i.breakBefore||i.pageBreakBefore),after:r.after||-1!==A.indexOf(i.breakAfter||i.pageBreakAfter),avoid:r.avoid||-1!==["avoid","avoid-page"].indexOf(i.breakInside||i.pageBreakInside)}}Object.keys(r).forEach((function(t){r[t]=r[t]||-1!==s[t].indexOf(e)}));var u=e.getBoundingClientRect();if(r.avoid&&!r.before){var c=Math.floor(u.top/t),l=Math.floor(u.bottom/t),d=Math.abs(u.bottom-u.top)/t;l!==c&&d<=1&&(r.before=!0)}if(r.before){var f=(0,o.createElement)("div",{style:{display:"block",height:t-u.top%t+"px"}});e.parentNode.insertBefore(f,e)}r.after&&(f=(0,o.createElement)("div",{style:{display:"block",height:t-u.bottom%t+"px"}}),e.parentNode.insertBefore(f,e.nextSibling))}))}))}},"./src/utils.js":function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}r.r(t),r.d(t,{objType:function(){return o},createElement:function(){return s},cloneNode:function(){return i},unitConvert:function(){return a},toPx:function(){return A}}),r("./node_modules/core-js/modules/es.number.constructor.js"),r("./node_modules/core-js/modules/es.symbol.js"),r("./node_modules/core-js/modules/es.symbol.description.js"),r("./node_modules/core-js/modules/es.object.to-string.js"),r("./node_modules/core-js/modules/es.symbol.iterator.js"),r("./node_modules/core-js/modules/es.array.iterator.js"),r("./node_modules/core-js/modules/es.string.iterator.js"),r("./node_modules/core-js/modules/web.dom-collections.iterator.js");var o=function(e){var t=n(e);return"undefined"===t?"undefined":"string"===t||e instanceof String?"string":"number"===t||e instanceof Number?"number":"function"===t||e instanceof Function?"function":e&&e.constructor===Array?"array":e&&1===e.nodeType?"element":"object"===t?"object":"unknown"},s=function(e,t){var r=document.createElement(e);if(t.className&&(r.className=t.className),t.innerHTML){r.innerHTML=t.innerHTML;for(var n=r.getElementsByTagName("script"),o=n.length;o-- >0;null)n[o].parentNode.removeChild(n[o])}for(var s in t.style)r.style[s]=t.style[s];return r},i=function e(t,r){for(var n=3===t.nodeType?document.createTextNode(t.nodeValue):t.cloneNode(!1),o=t.firstChild;o;o=o.nextSibling)!0!==r&&1===o.nodeType&&"SCRIPT"===o.nodeName||n.appendChild(e(o,r));return 1===t.nodeType&&("CANVAS"===t.nodeName?(n.width=t.width,n.height=t.height,n.getContext("2d").drawImage(t,0,0)):"TEXTAREA"!==t.nodeName&&"SELECT"!==t.nodeName||(n.value=t.value),n.addEventListener("load",(function(){n.scrollTop=t.scrollTop,n.scrollLeft=t.scrollLeft}),!0)),n},a=function(e,t){if("number"===o(e))return 72*e/96/t;var r={};for(var n in e)r[n]=72*e[n]/96/t;return r},A=function(e,t){return Math.floor(e*t/72*96)}},"./src/worker.js":function(e,t,r){"use strict";r.r(t),r("./node_modules/core-js/modules/es.object.assign.js"),r("./node_modules/core-js/modules/es.array.map.js"),r("./node_modules/core-js/modules/es.object.keys.js"),r("./node_modules/core-js/modules/es.array.concat.js"),r("./node_modules/core-js/modules/es.object.to-string.js"),r("./node_modules/core-js/modules/es.regexp.to-string.js"),r("./node_modules/core-js/modules/es.function.name.js"),r("./node_modules/core-js/modules/web.dom-collections.for-each.js");var n=r("./node_modules/jspdf/dist/jspdf.es.min.js"),o=r("./node_modules/html2canvas/dist/html2canvas.js"),s=r("./src/utils.js"),i=r("./node_modules/es6-promise/dist/es6-promise.js"),a=r.n(i)().Promise,A=function e(t){var r=Object.assign(e.convert(a.resolve()),JSON.parse(JSON.stringify(e.template))),n=e.convert(a.resolve(),r);return(n=n.setProgress(1,e,1,[e])).set(t)};(A.prototype=Object.create(a.prototype)).constructor=A,A.convert=function(e,t){return e.__proto__=t||A.prototype,e},A.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],image:{type:"jpeg",quality:.95},enableLinks:!0,html2canvas:{},jsPDF:{}}},A.prototype.from=function(e,t){return this.then((function(){switch(t=t||function(e){switch((0,s.objType)(e)){case"string":return"string";case"element":return"canvas"===e.nodeName.toLowerCase?"canvas":"element";default:return"unknown"}}(e)){case"string":return this.set({src:(0,s.createElement)("div",{innerHTML:e})});case"element":return this.set({src:e});case"canvas":return this.set({canvas:e});case"img":return this.set({img:e});default:return this.error("Unknown source type.")}}))},A.prototype.to=function(e){switch(e){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},A.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then((function(){var e={position:"fixed",overflow:"hidden",zIndex:1e3,left:0,right:0,bottom:0,top:0,backgroundColor:"rgba(0,0,0,0.8)"},t={position:"absolute",width:this.prop.pageSize.inner.width+this.prop.pageSize.unit,left:0,right:0,top:0,height:"auto",margin:"auto",backgroundColor:"white"};e.opacity=0;var r=(0,s.cloneNode)(this.prop.src,this.opt.html2canvas.javascriptEnabled);this.prop.overlay=(0,s.createElement)("div",{className:"html2pdf__overlay",style:e}),this.prop.container=(0,s.createElement)("div",{className:"html2pdf__container",style:t}),this.prop.container.appendChild(r),this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay)}))},A.prototype.toCanvas=function(){var e=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(e).then((function(){var e=Object.assign({},this.opt.html2canvas);return delete e.onrendered,o(this.prop.container,e)})).then((function(e){(this.opt.html2canvas.onrendered||function(){})(e),this.prop.canvas=e,document.body.removeChild(this.prop.overlay)}))},A.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then((function(){var e=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=e}))},A.prototype.toPdf=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then((function(){var e=this.prop.canvas,t=this.opt,r=e.height,o=Math.floor(e.width*this.prop.pageSize.inner.ratio),s=Math.ceil(r/o),i=this.prop.pageSize.inner.height,a=document.createElement("canvas"),A=a.getContext("2d");a.width=e.width,a.height=o,this.prop.pdf=this.prop.pdf||new n.jsPDF(t.jsPDF);for(var u=0;u~\.\[:]+)/g,Je=/(\.[^\s\+>~\.\[:]+)/g,Ye=/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,Ze=/(:[\w-]+\([^\)]*\))/gi,$e=/(:[^\s\+>~\.\[:]+)/g,et=/([^\s\+>~\.\[:]+)/g;function tt(e,t){var r=e.match(t);return r?[e.replace(t," "),r.length]:[e,0]}function rt(e){var t=[0,0,0],r=e.replace(/:not\(([^\)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),n=0,o=tt(r,Xe),s=(0,u.default)(o,2);r=s[0],n=s[1],t[1]+=n;var i=tt(r,We),a=(0,u.default)(i,2);r=a[0],n=a[1],t[0]+=n;var A=tt(r,Je),c=(0,u.default)(A,2);r=c[0],n=c[1],t[1]+=n;var l=tt(r,Ye),d=(0,u.default)(l,2);r=d[0],n=d[1],t[2]+=n;var f=tt(r,Ze),h=(0,u.default)(f,2);r=h[0],n=h[1],t[1]+=n;var p=tt(r,$e),m=(0,u.default)(p,2);r=m[0],n=m[1],t[1]+=n;var g=tt(r=r.replace(/[\*\s\+>~]/g," ").replace(/[#\.]/g," "),et),y=(0,u.default)(g,2);return r=y[0],n=y[1],t[2]+=n,t.join("")}var nt=1e-8;function ot(e){return Math.sqrt(Math.pow(e[0],2)+Math.pow(e[1],2))}function st(e,t){return(e[0]*t[0]+e[1]*t[1])/(ot(e)*ot(t))}function it(e,t){return(e[0]*t[1]0&&void 0!==arguments[0]?arguments[0]:" ",o=this.document,s=this.name;return A()(t=G()(r=Re(this.getString())).call(r).split(n)).call(t,(function(t){return new e(o,s,t)}))}},{key:"hasValue",value:function(e){var t=this.value;return null!==t&&""!==t&&(e||0!==t)&&void 0!==t}},{key:"isString",value:function(e){var t=this.value,r="string"==typeof t;return r&&e?e.test(t):r}},{key:"isUrlDefinition",value:function(){return this.isString(/^url\(/)}},{key:"isPixels",value:function(){if(!this.hasValue())return!1;var e=this.getString();switch(!0){case/px$/.test(e):case/^[0-9]+$/.test(e):return!0;default:return!1}}},{key:"setValue",value:function(e){return this.value=e,this}},{key:"getValue",value:function(e){return void 0===e||this.hasValue()?this.value:e}},{key:"getNumber",value:function(e){if(!this.hasValue())return void 0===e?0:i()(e);var t=this.value,r=i()(t);return this.isString(/%$/)&&(r/=100),r}},{key:"getString",value:function(e){return void 0===e||this.hasValue()?void 0===this.value?"":String(this.value):String(e)}},{key:"getColor",value:function(e){var t=this.getString(e);return this.isNormalizedColor||(this.isNormalizedColor=!0,t=Ge(t),this.value=t),t}},{key:"getDpi",value:function(){return 96}},{key:"getRem",value:function(){return this.document.rootEmSize}},{key:"getEm",value:function(){return this.document.emSize}},{key:"getUnits",value:function(){return this.getString().replace(/[0-9\.\-]/g,"")}},{key:"getPixels",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.hasValue())return 0;var r="boolean"==typeof e?[void 0,e]:[e],n=(0,u.default)(r,2),o=n[0],s=n[1],i=this.document.screen.viewPort;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(i.computeSize("x"),i.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(i.computeSize("x"),i.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*i.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*i.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return 15*this.getNumber();case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case this.isString(/%$/)&&s:return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*i.computeSize(o);default:var a=this.getNumber();return t&&a<1?a*i.computeSize(o):a}}},{key:"getMilliseconds",value:function(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():1e3*this.getNumber():0}},{key:"getRadians",value:function(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180)}}},{key:"getDefinition",value:function(){var e=this.getString(),t=e.match(/#([^\)'"]+)/);return t&&(t=t[1]),t||(t=e),this.document.definitions[t]}},{key:"getFillStyleDefinition",value:function(e,t){var r=this.getDefinition();if(!r)return null;if("function"==typeof r.createGradient)return r.createGradient(this.document.ctx,e,t);if("function"==typeof r.createPattern){if(r.getHrefAttribute().hasValue()){var n=r.getAttribute("patternTransform");r=r.getHrefAttribute().getDefinition(),n.hasValue()&&r.getAttribute("patternTransform",!0).setValue(n.value)}return r.createPattern(this.document.ctx,e,t)}return null}},{key:"getTextBaseline",value:function(){return this.hasValue()?e.textBaselineMapping[this.getString()]:null}},{key:"addOpacity",value:function(t){for(var r=this.getColor(),n=r.length,o=0,s=0;s1&&void 0!==arguments[1]?arguments[1]:0,n=Ke(t),o=(0,u.default)(n,2),s=o[0],i=void 0===s?r:s,a=o[1];return new e(i,void 0===a?r:a)}},{key:"parseScale",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=Ke(t),o=(0,u.default)(n,2),s=o[0],i=void 0===s?r:s,a=o[1];return new e(i,void 0===a?i:a)}},{key:"parsePath",value:function(t){for(var r=Ke(t),n=r.length,o=[],s=0;s0}},{key:"runEvents",value:function(){if(this.working){var e=this.screen,t=this.events,r=this.eventElements,n=e.ctx.canvas.style;n&&(n.cursor=""),g()(t).call(t,(function(e,t){for(var n=e.run,o=r[t];o;)n(o),o=o.parent})),this.events=[],this.eventElements=[]}}},{key:"checkPath",value:function(e,t){if(this.working&&t){var r=this.events,n=this.eventElements;g()(r).call(r,(function(r,o){var s=r.x,i=r.y;!n[o]&&t.isPointInPath&&t.isPointInPath(s,i)&&(n[o]=e)}))}}},{key:"checkBoundingBox",value:function(e,t){if(this.working&&t){var r=this.events,n=this.eventElements;g()(r).call(r,(function(r,o){var s=r.x,i=r.y;!n[o]&&t.isPointInBox(s,i)&&(n[o]=e)}))}}},{key:"mapXY",value:function(e,t){for(var r=this.screen,n=r.window,o=r.ctx,s=new mt(e,t),i=o.canvas;i;)s.x-=i.offsetLeft,s.y-=i.offsetTop,i=i.offsetParent;return n.scrollX&&(s.x+=n.scrollX),n.scrollY&&(s.y+=n.scrollY),s}},{key:"onClick",value:function(e){var t=this.mapXY((e||event).clientX,(e||event).clientY),r=t.x,n=t.y;this.events.push({type:"onclick",x:r,y:n,run:function(e){e.onClick&&e.onClick()}})}},{key:"onMouseMove",value:function(e){var t=this.mapXY((e||event).clientX,(e||event).clientY),r=t.x,n=t.y;this.events.push({type:"onmousemove",x:r,y:n,run:function(e){e.onMouseMove&&e.onMouseMove()}})}}]),e}(),yt="undefined"!=typeof window?window:null,vt="undefined"!=typeof fetch?K()(fetch).call(fetch,void 0):null,wt=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.fetch,o=void 0===n?vt:n,s=r.window,i=void 0===s?yt:s;(0,F.default)(this,e),this.ctx=t,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new pt,this.mouse=new gt(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=i,this.fetch=o}return(0,U.default)(e,[{key:"wait",value:function(e){this.waits.push(e)}},{key:"ready",value:function(){return this.readyPromise?this.readyPromise:M().resolve()}},{key:"isReady",value:function(){var e;if(this.isReadyLock)return!0;var t=k()(e=this.waits).call(e,(function(e){return e()}));return t&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=t,t}},{key:"setDefaults",value:function(e){e.strokeStyle="rgba(0,0,0,0)",e.lineCap="butt",e.lineJoin="miter",e.miterLimit=4}},{key:"setViewBox",value:function(e){var t=e.document,r=e.ctx,n=e.aspectRatio,o=e.width,s=e.desiredWidth,i=e.height,a=e.desiredHeight,A=e.minX,c=void 0===A?0:A,l=e.minY,d=void 0===l?0:l,f=e.refX,h=e.refY,p=e.clip,m=void 0!==p&&p,g=e.clipX,y=void 0===g?0:g,v=e.clipY,w=void 0===v?0:v,b=Re(n).replace(/^defer\s/,"").split(" "),B=(0,u.default)(b,2),j=B[0]||"xMidYMid",_=B[1]||"meet",x=o/s,C=i/a,E=Math.min(x,C),N=Math.max(x,C),Q=s,F=a;"meet"===_&&(Q*=E,F*=E),"slice"===_&&(Q*=N,F*=N);var U=new ht(t,"refX",f),S=new ht(t,"refY",h),L=U.hasValue()&&S.hasValue();if(L&&r.translate(-E*U.getPixels("x"),-E*S.getPixels("y")),m){var T=E*y,H=E*w;r.beginPath(),r.moveTo(T,H),r.lineTo(o,H),r.lineTo(o,i),r.lineTo(T,i),r.closePath(),r.clip()}if(!L){var I="meet"===_&&E===C,P="slice"===_&&N===C,O="meet"===_&&E===x,k="slice"===_&&N===x;/^xMid/.test(j)&&(I||P)&&r.translate(o/2-Q/2,0),/YMid$/.test(j)&&(O||k)&&r.translate(0,i/2-F/2),/^xMax/.test(j)&&(I||P)&&r.translate(o-Q,0),/YMax$/.test(j)&&(O||k)&&r.translate(0,i-F)}switch(!0){case"none"===j:r.scale(x,C);break;case"meet"===_:r.scale(E,E);break;case"slice"===_:r.scale(N,N)}r.translate(-c,-d)}},{key:"start",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.enableRedraw,o=void 0!==n&&n,s=r.ignoreMouse,i=void 0!==s&&s,a=r.ignoreAnimation,A=void 0!==a&&a,u=r.ignoreDimensions,c=void 0!==u&&u,l=r.ignoreClear,d=void 0!==l&&l,f=r.forceRedraw,h=r.scaleWidth,p=r.scaleHeight,m=r.offsetX,g=r.offsetY,y=this.FRAMERATE,v=this.mouse,w=1e3/y;if(this.frameDuration=w,this.readyPromise=new(M())((function(e){t.resolveReady=e})),this.isReady()&&this.render(e,c,d,h,p,m,g),o){var b=P()(),B=b,j=0;i||v.start(),this.intervalId=V()((function r(){b=P()(),(j=b-B)>=w&&(B=b-j%w,t.shouldUpdate(A,f)&&(t.render(e,c,d,h,p,m,g),v.runEvents())),t.intervalId=V()(r)}))}}},{key:"stop",value:function(){this.intervalId&&(V().cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}},{key:"shouldUpdate",value:function(e,t){if(!e){var r,n=this.frameDuration;if(H()(r=this.animations).call(r,(function(e,t){return t.update(n)||e}),!1))return!0}return!("function"!=typeof t||!t())||!(this.isReadyLock||!this.isReady())||!!this.mouse.hasEvents()}},{key:"render",value:function(e,t,r,n,o,s,i){var a=this.CLIENT_WIDTH,A=this.CLIENT_HEIGHT,u=this.viewPort,c=this.ctx,l=this.isFirstRender,d=c.canvas;u.clear(),d.width&&d.height?u.setCurrent(d.width,d.height):u.setCurrent(a,A);var f=e.getStyle("width"),h=e.getStyle("height");!t&&(l||"number"!=typeof n&&"number"!=typeof o)&&(f.hasValue()&&(d.width=f.getPixels("x"),d.style&&(d.style.width="".concat(d.width,"px"))),h.hasValue()&&(d.height=h.getPixels("y"),d.style&&(d.style.height="".concat(d.height,"px"))));var p=d.clientWidth||d.width,m=d.clientHeight||d.height;if(t&&f.hasValue()&&h.hasValue()&&(p=f.getPixels("x"),m=h.getPixels("y")),u.setCurrent(p,m),"number"==typeof s&&e.getAttribute("x",!0).setValue(s),"number"==typeof i&&e.getAttribute("y",!0).setValue(i),"number"==typeof n||"number"==typeof o){var g,y,v=Ke(e.getAttribute("viewBox").getString()),w=0,b=0;if("number"==typeof n){var B=e.getStyle("width");B.hasValue()?w=B.getPixels("x")/n:isNaN(v[2])||(w=v[2]/n)}if("number"==typeof o){var j=e.getStyle("height");j.hasValue()?b=j.getPixels("y")/o:isNaN(v[3])||(b=v[3]/o)}w||(w=b),b||(b=w),e.getAttribute("width",!0).setValue(n),e.getAttribute("height",!0).setValue(o);var _=e.getStyle("transform",!0,!0);_.setValue(L()(g=L()(y="".concat(_.getString()," scale(")).call(y,1/w,", ")).call(g,1/b,")"))}r||c.clearRect(0,0,p,m),e.render(c),l&&(this.isFirstRender=!1)}}]),e}();wt.defaultWindow=yt,wt.defaultFetch=vt;var bt=wt.defaultFetch,Bt="undefined"!=typeof DOMParser?DOMParser:null,jt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.fetch,n=void 0===r?bt:r,o=t.DOMParser,s=void 0===o?Bt:o;(0,F.default)(this,e),this.fetch=n,this.DOMParser=s}var t,r;return(0,U.default)(e,[{key:"parse",value:(r=(0,N.default)(E().mark((function e(t){return E().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!/^=0;r--)t[r].unapply(e)}},{key:"applyToPoint",value:function(e){for(var t=this.transforms,r=t.length,n=0;n2&&void 0!==arguments[2]&&arguments[2];if((0,F.default)(this,e),this.document=t,this.node=r,this.captureTextNodes=i,this.attributes={},this.styles={},this.stylesSpecificity={},this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],r&&1===r.nodeType){if(g()(n=ae()(r.attributes)).call(n,(function(e){var r=Ve(e.nodeName);s.attributes[r]=new ht(t,r,e.value)})),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var a,c=A()(a=this.getAttribute("style").getString().split(";")).call(a,(function(e){return G()(e).call(e)}));g()(c).call(c,(function(e){var r;if(e){var n=A()(r=e.split(":")).call(r,(function(e){return G()(e).call(e)})),o=(0,u.default)(n,2),i=o[0],a=o[1];s.styles[i]=new ht(t,i,a)}}))}var l=t.definitions,d=this.getAttribute("id");d.hasValue()&&(l[d.getValue()]||(l[d.getValue()]=this)),g()(o=ae()(r.childNodes)).call(o,(function(e){if(1===e.nodeType)s.addChild(e);else if(i&&(3===e.nodeType||4===e.nodeType)){var r=t.createTextNode(e);r.getText().length>0&&s.addChild(r)}}))}}return(0,U.default)(e,[{key:"getAttribute",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.attributes[e];if(!r&&t){var n=new ht(this.document,e,"");return this.attributes[e]=n,n}return r||ht.empty(this.document)}},{key:"getHrefAttribute",value:function(){for(var e in this.attributes)if("href"===e||/:href$/.test(e))return this.attributes[e];return ht.empty(this.document)}},{key:"getStyle",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this.styles[e];if(n)return n;var o=this.getAttribute(e);if(o&&o.hasValue())return this.styles[e]=o,o;if(!r){var s=this.parent;if(s){var i=s.getStyle(e);if(i&&i.hasValue())return i}}if(t){var a=new ht(this.document,e,"");return this.styles[e]=a,a}return n||ht.empty(this.document)}},{key:"render",value:function(e){if("none"!==this.getStyle("display").getString()&&"hidden"!==this.getStyle("visibility").getString()){if(e.save(),this.getStyle("mask").hasValue()){var t=this.getStyle("mask").getDefinition();t&&(this.applyEffects(e),t.apply(e,this))}else if("none"!==this.getStyle("filter").getValue("none")){var r=this.getStyle("filter").getDefinition();r&&(this.applyEffects(e),r.apply(e,this))}else this.setContext(e),this.renderChildren(e),this.clearContext(e);e.restore()}}},{key:"setContext",value:function(e){}},{key:"applyEffects",value:function(e){var t=Ut.fromElement(this.document,this);t&&t.apply(e);var r=this.getStyle("clip-path",!1,!0);if(r.hasValue()){var n=r.getDefinition();n&&n.apply(e)}}},{key:"clearContext",value:function(e){}},{key:"renderChildren",value:function(e){var t;g()(t=this.children).call(t,(function(t){t.render(e)}))}},{key:"addChild",value:function(t){var r,n=t instanceof e?t:this.document.createElement(t);n.parent=this,se()(r=e.ignoreChildTypes).call(r,n.type)||this.children.push(n)}},{key:"matchesSelector",value:function(e){var t,r=this.node;if("function"==typeof r.matches)return r.matches(e);var n=r.getAttribute("class");return!(!n||""===n)&&ne()(t=n.split(" ")).call(t,(function(t){if(".".concat(t)===e)return!0}))}},{key:"addStylesFromStyleDefinition",value:function(){var e=this.document,t=e.styles,r=e.stylesSpecificity;for(var n in t)if("@"!==n[0]&&this.matchesSelector(n)){var o=t[n],s=r[n];if(o)for(var i in o){var a=this.stylesSpecificity[i];void 0===a&&(a="000"),s>=a&&(this.styles[i]=o[i],this.stylesSpecificity[i]=s)}}}},{key:"removeStyles",value:function(e,t){return H()(t).call(t,(function(t,r){var n,o=e.getStyle(r);if(!o.hasValue())return t;var s=o.getString();return o.setValue(""),L()(n=[]).call(n,(0,te.default)(t),[[r,s]])}),[])}},{key:"restoreStyles",value:function(e,t){g()(t).call(t,(function(t){var r=(0,u.default)(t,2),n=r[0],o=r[1];e.getStyle(n,!0).setValue(o)}))}}]),e}();St.ignoreChildTypes=["title"];var Lt=function(e){(0,Z.default)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Y())return!1;if(Y().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Y()(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,ee.default)(t);if(r){var o=(0,ee.default)(this).constructor;e=Y()(n,arguments,o)}else e=n.apply(this,arguments);return(0,$.default)(this,e)});function o(e,t,r){return(0,F.default)(this,o),n.call(this,e,t,r)}return o}(St);function Tt(e){var t=G()(e).call(e);return/^('|")/.test(t)?t:'"'.concat(t,'"')}function Ht(e){if(!e)return"";var t=G()(e).call(e).toLowerCase();switch(t){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return t;default:return/^oblique\s+(-|)\d+deg$/.test(t)?t:""}}function It(e){if(!e)return"";var t=G()(e).call(e).toLowerCase();switch(t){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return t;default:return/^[\d.]+$/.test(t)?t:""}}var Pt=function(){function e(t,r,n,o,s,i){(0,F.default)(this,e);var a=i?"string"==typeof i?e.parse(i):i:{};this.fontFamily=s||a.fontFamily,this.fontSize=o||a.fontSize,this.fontStyle=t||a.fontStyle,this.fontWeight=n||a.fontWeight,this.fontVariant=r||a.fontVariant}return(0,U.default)(e,[{key:"toString",value:function(){var e,t,r;return G()(e=[Ht(this.fontStyle),this.fontVariant,It(this.fontWeight),this.fontSize,(t=this.fontFamily,"undefined"==typeof process?t:A()(r=G()(t).call(t).split(",")).call(r,Tt).join(","))].join(" ")).call(e)}}],[{key:"parse",value:function(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,o="",s="",i="",a="",A="",c=G()(t=Re(r)).call(t).split(" "),l={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return g()(c).call(c,(function(t){var r,n,c;switch(!0){case!l.fontStyle&&se()(r=e.styles).call(r,t):"inherit"!==t&&(o=t),l.fontStyle=!0;break;case!l.fontVariant&&se()(n=e.variants).call(n,t):"inherit"!==t&&(s=t),l.fontStyle=!0,l.fontVariant=!0;break;case!l.fontWeight&&se()(c=e.weights).call(c,t):"inherit"!==t&&(i=t),l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0;break;case!l.fontSize:if("inherit"!==t){var d=t.split("/"),f=(0,u.default)(d,1);a=f[0]}l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0,l.fontSize=!0;break;default:"inherit"!==t&&(A+=t)}})),new e(o,s,i,a,A,n)}}]),e}();Pt.styles="normal|italic|oblique|inherit",Pt.variants="normal|small-caps|inherit",Pt.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";var Ot=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.NaN,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.NaN,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.NaN,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Number.NaN;(0,F.default)(this,e),this.x1=t,this.y1=r,this.x2=n,this.y2=o,this.addPoint(t,r),this.addPoint(n,o)}return(0,U.default)(e,[{key:"addPoint",value:function(e,t){void 0!==e&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),ethis.x2&&(this.x2=e)),void 0!==t&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=t,this.y2=t),tthis.y2&&(this.y2=t))}},{key:"addX",value:function(e){this.addPoint(e,null)}},{key:"addY",value:function(e){this.addPoint(null,e)}},{key:"addBoundingBox",value:function(e){if(e){var t=e.x1,r=e.y1,n=e.x2,o=e.y2;this.addPoint(t,r),this.addPoint(n,o)}}},{key:"sumCubic",value:function(e,t,r,n,o){return Math.pow(1-e,3)*t+3*Math.pow(1-e,2)*e*r+3*(1-e)*Math.pow(e,2)*n+Math.pow(e,3)*o}},{key:"bezierCurveAdd",value:function(e,t,r,n,o){var s=6*t-12*r+6*n,i=-3*t+9*r-9*n+3*o,a=3*r-3*t;if(0!==i){var A=Math.pow(s,2)-4*a*i;if(!(A<0)){var u=(-s+Math.sqrt(A))/(2*i);01&&void 0!==arguments[1]&&arguments[1];if(!t){var r=this.getStyle("fill"),n=this.getStyle("fill-opacity"),o=this.getStyle("stroke"),s=this.getStyle("stroke-opacity");if(r.isUrlDefinition()){var i=r.getFillStyleDefinition(this,n);i&&(e.fillStyle=i)}else if(r.hasValue()){"currentColor"===r.getString()&&r.setValue(this.getStyle("color").getColor());var a=r.getColor();"inherit"!==a&&(e.fillStyle="none"===a?"rgba(0,0,0,0)":a)}if(n.hasValue()){var A=new ht(this.document,"fill",e.fillStyle).addOpacity(n).getColor();e.fillStyle=A}if(o.isUrlDefinition()){var u=o.getFillStyleDefinition(this,s);u&&(e.strokeStyle=u)}else if(o.hasValue()){"currentColor"===o.getString()&&o.setValue(this.getStyle("color").getColor());var c=o.getString();"inherit"!==c&&(e.strokeStyle="none"===c?"rgba(0,0,0,0)":c)}if(s.hasValue()){var l=new ht(this.document,"stroke",e.strokeStyle).addOpacity(s).getString();e.strokeStyle=l}var d=this.getStyle("stroke-width");if(d.hasValue()){var f=d.getPixels();e.lineWidth=f||nt}var h=this.getStyle("stroke-linecap"),p=this.getStyle("stroke-linejoin"),m=this.getStyle("stroke-miterlimit"),g=this.getStyle("paint-order"),y=this.getStyle("stroke-dasharray"),v=this.getStyle("stroke-dashoffset");if(h.hasValue()&&(e.lineCap=h.getString()),p.hasValue()&&(e.lineJoin=p.getString()),m.hasValue()&&(e.miterLimit=m.getNumber()),g.hasValue()&&(e.paintOrder=g.getValue()),y.hasValue()&&"none"!==y.getString()){var w=Ke(y.getString());void 0!==e.setLineDash?e.setLineDash(w):void 0!==e.webkitLineDash?e.webkitLineDash=w:void 0===e.mozDash||1===w.length&&0===w[0]||(e.mozDash=w);var b=v.getPixels();void 0!==e.lineDashOffset?e.lineDashOffset=b:void 0!==e.webkitLineDashOffset?e.webkitLineDashOffset=b:void 0!==e.mozDashOffset&&(e.mozDashOffset=b)}}if(this.modifiedEmSizeStack=!1,void 0!==e.font){var B=this.getStyle("font"),j=this.getStyle("font-style"),_=this.getStyle("font-variant"),x=this.getStyle("font-weight"),C=this.getStyle("font-size"),E=this.getStyle("font-family"),N=new Pt(j.getString(),_.getString(),x.getString(),C.hasValue()?"".concat(C.getPixels(!0),"px"):"",E.getString(),Pt.parse(B.getString(),e.font));j.setValue(N.fontStyle),_.setValue(N.fontVariant),x.setValue(N.fontWeight),C.setValue(N.fontSize),E.setValue(N.fontFamily),e.font=N.toString(),C.isPixels()&&(this.document.emSize=C.getPixels(),this.modifiedEmSizeStack=!0)}t||(this.applyEffects(e),e.globalAlpha=this.calculateOpacity())}},{key:"clearContext",value:function(e){(0,de.default)((0,ee.default)(o.prototype),"clearContext",this).call(this,e),this.modifiedEmSizeStack&&this.document.popEmSize()}}]),o}(St),Rt=function(e){(0,Z.default)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Y())return!1;if(Y().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Y()(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,ee.default)(t);if(r){var o=(0,ee.default)(this).constructor;e=Y()(n,arguments,o)}else e=n.apply(this,arguments);return(0,$.default)(this,e)});function o(e,t,r){var s;return(0,F.default)(this,o),(s=n.call(this,e,t,(this instanceof o?this.constructor:void 0)===o||r)).type="text",s.x=0,s.y=0,s.measureCache=-1,s}return(0,U.default)(o,[{key:"setContext",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,de.default)((0,ee.default)(o.prototype),"setContext",this).call(this,e,t);var r=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();r&&(e.textBaseline=r)}},{key:"initializeCoordinates",value:function(e){this.x=this.getAttribute("x").getPixels("x"),this.y=this.getAttribute("y").getPixels("y");var t=this.getAttribute("dx"),r=this.getAttribute("dy");t.hasValue()&&(this.x+=t.getPixels("x")),r.hasValue()&&(this.y+=r.getPixels("y")),this.x+=this.getAnchorDelta(e,this,0)}},{key:"getBoundingBox",value:function(e){var t,r=this;if("text"!==this.type)return this.getTElementBoundingBox(e);this.initializeCoordinates(e);var n=null;return g()(t=this.children).call(t,(function(t,o){var s=r.getChildBoundingBox(e,r,r,o);n?n.addBoundingBox(s):n=s})),n}},{key:"getFontSize",value:function(){var e=this.document,t=this.parent,r=Pt.parse(e.ctx.font).fontSize;return t.getStyle("font-size").getNumber(r)}},{key:"getTElementBoundingBox",value:function(e){var t=this.getFontSize();return new Ot(this.x,this.y-t,this.x+this.measureText(e),this.y)}},{key:"getGlyph",value:function(e,t,r){var n=t[r],o=null;if(e.isArabic){var s=t.length,i=t[r-1],a=t[r+1],A="isolated";(0===r||" "===i)&&r0&&" "!==i&&r0&&" "!==i&&(r===s-1||" "===a)&&(A="initial"),void 0!==e.glyphs[n]&&((o=e.glyphs[n][A])||"glyph"!==e.glyphs[n].type||(o=e.glyphs[n]))}else o=e.glyphs[n];return o||(o=e.missingGlyph),o}},{key:"getText",value:function(){return""}},{key:"getTextFromNode",value:function(e){var t=e||this.node,r=ae()(t.parentNode.childNodes),n=le()(r).call(r,t),o=r.length-1,s=Re(t.value||t.text||t.textContent||"");return 0===n&&(s=Me(s)),n===o&&(s=De(s)),s}},{key:"renderChildren",value:function(e){var t,r=this;if("text"===this.type){this.initializeCoordinates(e),g()(t=this.children).call(t,(function(t,n){r.renderChild(e,r,r,n)}));var n=this.document.screen.mouse;n.isWorking()&&n.checkBoundingBox(this,this.getBoundingBox(e))}else this.renderTElementChildren(e)}},{key:"renderTElementChildren",value:function(e){var t=this.document,r=this.parent,n=this.getText(),o=r.getStyle("font-family").getDefinition();if(o)for(var s,i=o.fontFace.unitsPerEm,a=Pt.parse(t.ctx.font),A=r.getStyle("font-size").getNumber(a.fontSize),u=r.getStyle("font-style").getString(a.fontStyle),c=A/i,l=o.isRTL?ue()(s=n.split("")).call(s).join(""):n,d=Ke(r.getAttribute("dx").getString()),f=l.length,h=0;hr&&i.getAttribute("x").hasValue()||i.getAttribute("text-anchor").hasValue()));A++)a+=i.measureTextRecursive(e);return-1*("end"===n?a:a/2)}return 0}},{key:"adjustChildCoordinates",value:function(e,t,r,n){var o=r.children[n];if("function"!=typeof o.measureText)return o;e.save(),o.setContext(e,!0);var s=o.getAttribute("x"),i=o.getAttribute("y"),a=o.getAttribute("dx"),A=o.getAttribute("dy"),u=o.getAttribute("text-anchor").getString("start");if(0===n&&"textNode"!==o.type&&(s.hasValue()||s.setValue(t.getAttribute("x").getValue("0")),i.hasValue()||i.setValue(t.getAttribute("y").getValue("0")),a.hasValue()||a.setValue(t.getAttribute("dx").getValue("0")),A.hasValue()||A.setValue(t.getAttribute("dy").getValue("0"))),s.hasValue()){if(o.x=s.getPixels("x")+t.getAnchorDelta(e,r,n),"start"!==u){var c=o.measureTextRecursive(e);o.x+=-1*("end"===u?c:c/2)}a.hasValue()&&(o.x+=a.getPixels("x"))}else{if("start"!==u){var l=o.measureTextRecursive(e);t.x+=-1*("end"===u?l:l/2)}a.hasValue()&&(t.x+=a.getPixels("x")),o.x=t.x}return t.x=o.x+o.measureText(e),i.hasValue()?(o.y=i.getPixels("y"),A.hasValue()&&(o.y+=A.getPixels("y"))):(A.hasValue()&&(t.y+=A.getPixels("y")),o.y=t.y),t.y=o.y,o.clearContext(e),e.restore(),o}},{key:"getChildBoundingBox",value:function(e,t,r,n){var o,s=this.adjustChildCoordinates(e,t,r,n);if("function"!=typeof s.getBoundingBox)return null;var i=s.getBoundingBox(e);return i?(g()(o=s.children).call(o,(function(r,n){var o=t.getChildBoundingBox(e,t,s,n);i.addBoundingBox(o)})),i):null}},{key:"renderChild",value:function(e,t,r,n){var o,s=this.adjustChildCoordinates(e,t,r,n);s.render(e),g()(o=s.children).call(o,(function(r,n){t.renderChild(e,t,s,n)}))}},{key:"measureTextRecursive",value:function(e){var t;return H()(t=this.children).call(t,(function(t,r){return t+r.measureTextRecursive(e)}),this.measureText(e))}},{key:"measureText",value:function(e){var t=this.measureCache;if(~t)return t;var r=this.getText(),n=this.measureTargetText(e,r);return this.measureCache=n,n}},{key:"measureTargetText",value:function(e,t){if(!t.length)return 0;var r=this.parent,n=r.getStyle("font-family").getDefinition();if(n){for(var o,s=this.getFontSize(),i=n.isRTL?ue()(o=t.split("")).call(o).join(""):t,a=Ke(r.getAttribute("dx").getString()),A=i.length,u=0,c=0;c0?"":s.getTextFromNode(),s}return(0,U.default)(o,[{key:"getText",value:function(){return this.text}}]),o}(Rt),Dt=function(e){(0,Z.default)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Y())return!1;if(Y().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Y()(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,ee.default)(t);if(r){var o=(0,ee.default)(this).constructor;e=Y()(n,arguments,o)}else e=n.apply(this,arguments);return(0,$.default)(this,e)});function o(){var e;return(0,F.default)(this,o),(e=n.apply(this,arguments)).type="textNode",e}return o}(Mt),Kt=function(e){(0,Z.default)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Y())return!1;if(Y().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Y()(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,ee.default)(t);if(r){var o=(0,ee.default)(this).constructor;e=Y()(n,arguments,o)}else e=n.apply(this,arguments);return(0,$.default)(this,e)});function o(e){var t;return(0,F.default)(this,o),(t=n.call(this,e.replace(/[+-.]\s+/g,"-").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,""))).control=null,t.start=null,t.current=null,t.command=null,t.commands=t.commands,t.i=-1,t.previousCommand=null,t.points=[],t.angles=[],t}return(0,U.default)(o,[{key:"reset",value:function(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new mt(0,0),this.control=new mt(0,0),this.current=new mt(0,0),this.points=[],this.angles=[]}},{key:"isEnd",value:function(){return this.i>=this.commands.length-1}},{key:"next",value:function(){var e=this.commands[++this.i];return this.previousCommand=this.command,this.command=e,e}},{key:"getPoint",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"x",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"y",r=new mt(this.command[e],this.command[t]);return this.makeAbsolute(r)}},{key:"getAsControlPoint",value:function(e,t){var r=this.getPoint(e,t);return this.control=r,r}},{key:"getAsCurrentPoint",value:function(e,t){var r=this.getPoint(e,t);return this.current=r,r}},{key:"getReflectedControlPoint",value:function(){var e=this.previousCommand.type;if(e!==pe.SVGPathData.CURVE_TO&&e!==pe.SVGPathData.SMOOTH_CURVE_TO&&e!==pe.SVGPathData.QUAD_TO&&e!==pe.SVGPathData.SMOOTH_QUAD_TO)return this.current;var t=this.current,r=t.x,n=t.y,o=this.control,s=o.x,i=o.y;return new mt(2*r-s,2*n-i)}},{key:"makeAbsolute",value:function(e){if(this.command.relative){var t=this.current,r=t.x,n=t.y;e.x+=r,e.y+=n}return e}},{key:"addMarker",value:function(e,t,r){var n=this.points,o=this.angles;r&&o.length>0&&!o[o.length-1]&&(o[o.length-1]=n[n.length-1].angleTo(r)),this.addMarkerAngle(e,t?t.angleTo(e):null)}},{key:"addMarkerAngle",value:function(e,t){this.points.push(e),this.angles.push(t)}},{key:"getMarkerPoints",value:function(){return this.points}},{key:"getMarkerAngles",value:function(){for(var e=this.angles,t=e.length,r=0;ra?i:a,g=i>a?1:i/a,y=i>a?a/i:1;e.translate(c.x,c.y),e.rotate(u),e.scale(g,y),e.arc(0,0,m,l,l+d,Boolean(1-A)),e.scale(1/g,1/y),e.rotate(-u),e.translate(-c.x,-c.y)}}},{key:"pathZ",value:function(e,t){o.pathZ(this.pathParser),e&&t.x1!==t.x2&&t.y1!==t.y2&&e.closePath()}}],[{key:"pathM",value:function(e){var t=e.getAsCurrentPoint();return e.start=e.current,{point:t}}},{key:"pathL",value:function(e){return{current:e.current,point:e.getAsCurrentPoint()}}},{key:"pathH",value:function(e){var t=e.current,r=e.command,n=new mt((r.relative?t.x:0)+r.x,t.y);return e.current=n,{current:t,point:n}}},{key:"pathV",value:function(e){var t=e.current,r=e.command,n=new mt(t.x,(r.relative?t.y:0)+r.y);return e.current=n,{current:t,point:n}}},{key:"pathC",value:function(e){return{current:e.current,point:e.getPoint("x1","y1"),controlPoint:e.getAsControlPoint("x2","y2"),currentPoint:e.getAsCurrentPoint()}}},{key:"pathS",value:function(e){return{current:e.current,point:e.getReflectedControlPoint(),controlPoint:e.getAsControlPoint("x2","y2"),currentPoint:e.getAsCurrentPoint()}}},{key:"pathQ",value:function(e){return{current:e.current,controlPoint:e.getAsControlPoint("x1","y1"),currentPoint:e.getAsCurrentPoint()}}},{key:"pathT",value:function(e){var t=e.current,r=e.getReflectedControlPoint();return e.control=r,{current:t,controlPoint:r,currentPoint:e.getAsCurrentPoint()}}},{key:"pathA",value:function(e){var t=e.current,r=e.command,n=r.rX,o=r.rY,s=r.xRot,i=r.lArcFlag,a=r.sweepFlag,A=s*(Math.PI/180),u=e.getAsCurrentPoint(),c=new mt(Math.cos(A)*(t.x-u.x)/2+Math.sin(A)*(t.y-u.y)/2,-Math.sin(A)*(t.x-u.x)/2+Math.cos(A)*(t.y-u.y)/2),l=Math.pow(c.x,2)/Math.pow(n,2)+Math.pow(c.y,2)/Math.pow(o,2);l>1&&(n*=Math.sqrt(l),o*=Math.sqrt(l));var d=(i===a?-1:1)*Math.sqrt((Math.pow(n,2)*Math.pow(o,2)-Math.pow(n,2)*Math.pow(c.y,2)-Math.pow(o,2)*Math.pow(c.x,2))/(Math.pow(n,2)*Math.pow(c.y,2)+Math.pow(o,2)*Math.pow(c.x,2)));isNaN(d)&&(d=0);var f=new mt(d*n*c.y/o,d*-o*c.x/n),h=new mt((t.x+u.x)/2+Math.cos(A)*f.x-Math.sin(A)*f.y,(t.y+u.y)/2+Math.sin(A)*f.x+Math.cos(A)*f.y),p=it([1,0],[(c.x-f.x)/n,(c.y-f.y)/o]),m=[(c.x-f.x)/n,(c.y-f.y)/o],g=[(-c.x-f.x)/n,(-c.y-f.y)/o],y=it(m,g);return st(m,g)<=-1&&(y=Math.PI),st(m,g)>=1&&(y=0),{currentPoint:u,rX:n,rY:o,sweepFlag:a,xAxisRotation:A,centp:h,a1:p,ad:y}}},{key:"pathZ",value:function(e){e.current=e.start}}]),o}(kt),Vt=function(e){(0,Z.default)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Y())return!1;if(Y().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Y()(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,ee.default)(t);if(r){var o=(0,ee.default)(this).constructor;e=Y()(n,arguments,o)}else e=n.apply(this,arguments);return(0,$.default)(this,e)});function o(){var e;return(0,F.default)(this,o),(e=n.apply(this,arguments)).type="svg",e.root=!1,e}return(0,U.default)(o,[{key:"setContext",value:function(e){var t=this.document,r=t.screen,n=t.window,s=e.canvas;if(r.setDefaults(e),s.style&&void 0!==e.font&&n&&void 0!==n.getComputedStyle){e.font=n.getComputedStyle(s).getPropertyValue("font");var i=new ht(t,"fontSize",Pt.parse(e.font).fontSize);i.hasValue()&&(t.rootEmSize=i.getPixels("y"),t.emSize=t.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);var a=r.viewPort,A=a.width,u=a.height;this.getStyle("width").hasValue()||this.getStyle("width",!0).setValue("100%"),this.getStyle("height").hasValue()||this.getStyle("height",!0).setValue("100%"),this.getStyle("color").hasValue()||this.getStyle("color",!0).setValue("black");var c=this.getAttribute("refX"),l=this.getAttribute("refY"),d=this.getAttribute("viewBox"),f=d.hasValue()?Ke(d.getString()):null,h=!this.root&&"visible"!==this.getStyle("overflow").getValue("hidden"),p=0,m=0,g=0,y=0;f&&(p=f[0],m=f[1]),this.root||(A=this.getStyle("width").getPixels("x"),u=this.getStyle("height").getPixels("y"),"marker"===this.type&&(g=p,y=m,p=0,m=0)),r.viewPort.setCurrent(A,u),this.node&&this.getStyle("transform",!1,!0).hasValue()&&!this.getStyle("transform-origin",!1,!0).hasValue()&&this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),(0,de.default)((0,ee.default)(o.prototype),"setContext",this).call(this,e),e.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),f&&(A=f[2],u=f[3]),t.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:r.viewPort.width,desiredWidth:A,height:r.viewPort.height,desiredHeight:u,minX:p,minY:m,refX:c.getValue(),refY:l.getValue(),clip:h,clipX:g,clipY:y}),f&&(r.viewPort.removeCurrent(),r.viewPort.setCurrent(A,u))}},{key:"clearContext",value:function(e){(0,de.default)((0,ee.default)(o.prototype),"clearContext",this).call(this,e),this.document.screen.viewPort.removeCurrent()}},{key:"resize",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=this.getAttribute("width",!0),s=this.getAttribute("height",!0),i=this.getAttribute("viewBox"),a=this.getAttribute("style"),A=o.getNumber(0),u=s.getNumber(0);if(n)if("string"==typeof n)this.getAttribute("preserveAspectRatio",!0).setValue(n);else{var c=this.getAttribute("preserveAspectRatio");c.hasValue()&&c.setValue(c.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(o.setValue(e),s.setValue(r),i.hasValue()||i.setValue(L()(t="0 0 ".concat(A||e," ")).call(t,u||r)),a.hasValue()){var l=this.getStyle("width"),d=this.getStyle("height");l.hasValue()&&l.setValue("".concat(e,"px")),d.hasValue()&&d.setValue("".concat(r,"px"))}}}]),o}(kt),qt=function(e){(0,Z.default)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Y())return!1;if(Y().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Y()(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,ee.default)(t);if(r){var o=(0,ee.default)(this).constructor;e=Y()(n,arguments,o)}else e=n.apply(this,arguments);return(0,$.default)(this,e)});function o(){var e;return(0,F.default)(this,o),(e=n.apply(this,arguments)).type="rect",e}return(0,U.default)(o,[{key:"path",value:function(e){var t=this.getAttribute("x").getPixels("x"),r=this.getAttribute("y").getPixels("y"),n=this.getStyle("width",!1,!0).getPixels("x"),o=this.getStyle("height",!1,!0).getPixels("y"),s=this.getAttribute("rx"),i=this.getAttribute("ry"),a=s.getPixels("x"),A=i.getPixels("y");if(s.hasValue()&&!i.hasValue()&&(A=a),i.hasValue()&&!s.hasValue()&&(a=A),a=Math.min(a,n/2),A=Math.min(A,o/2),e){var u=(Math.sqrt(2)-1)/3*4;e.beginPath(),o>0&&n>0&&(e.moveTo(t+a,r),e.lineTo(t+n-a,r),e.bezierCurveTo(t+n-a+u*a,r,t+n,r+A-u*A,t+n,r+A),e.lineTo(t+n,r+o-A),e.bezierCurveTo(t+n,r+o-A+u*A,t+n-a+u*a,r+o,t+n-a,r+o),e.lineTo(t+a,r+o),e.bezierCurveTo(t+a-u*a,r+o,t,r+o-A+u*A,t,r+o-A),e.lineTo(t,r+A),e.bezierCurveTo(t,r+A-u*A,t+a-u*a,r,t+a,r),e.closePath())}return new Ot(t,r,t+n,r+o)}},{key:"getMarkers",value:function(){return null}}]),o}(zt),Gt=function(e){(0,Z.default)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Y())return!1;if(Y().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Y()(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,ee.default)(t);if(r){var o=(0,ee.default)(this).constructor;e=Y()(n,arguments,o)}else e=n.apply(this,arguments);return(0,$.default)(this,e)});function o(){var e;return(0,F.default)(this,o),(e=n.apply(this,arguments)).type="circle",e}return(0,U.default)(o,[{key:"path",value:function(e){var t=this.getAttribute("cx").getPixels("x"),r=this.getAttribute("cy").getPixels("y"),n=this.getAttribute("r").getPixels();return e&&n>0&&(e.beginPath(),e.arc(t,r,n,0,2*Math.PI,!1),e.closePath()),new Ot(t-n,r-n,t+n,r+n)}},{key:"getMarkers",value:function(){return null}}]),o}(zt),Xt=function(e){(0,Z.default)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Y())return!1;if(Y().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Y()(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,ee.default)(t);if(r){var o=(0,ee.default)(this).constructor;e=Y()(n,arguments,o)}else e=n.apply(this,arguments);return(0,$.default)(this,e)});function o(){var e;return(0,F.default)(this,o),(e=n.apply(this,arguments)).type="ellipse",e}return(0,U.default)(o,[{key:"path",value:function(e){var t=(Math.sqrt(2)-1)/3*4,r=this.getAttribute("rx").getPixels("x"),n=this.getAttribute("ry").getPixels("y"),o=this.getAttribute("cx").getPixels("x"),s=this.getAttribute("cy").getPixels("y");return e&&r>0&&n>0&&(e.beginPath(),e.moveTo(o+r,s),e.bezierCurveTo(o+r,s+t*n,o+t*r,s+n,o,s+n),e.bezierCurveTo(o-t*r,s+n,o-r,s+t*n,o-r,s),e.bezierCurveTo(o-r,s-t*n,o-t*r,s-n,o,s-n),e.bezierCurveTo(o+t*r,s-n,o+r,s-t*n,o+r,s),e.closePath()),new Ot(o-r,s-n,o+r,s+n)}},{key:"getMarkers",value:function(){return null}}]),o}(zt),Wt=function(e){(0,Z.default)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Y())return!1;if(Y().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Y()(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,ee.default)(t);if(r){var o=(0,ee.default)(this).constructor;e=Y()(n,arguments,o)}else e=n.apply(this,arguments);return(0,$.default)(this,e)});function o(){var e;return(0,F.default)(this,o),(e=n.apply(this,arguments)).type="line",e}return(0,U.default)(o,[{key:"getPoints",value:function(){return[new mt(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new mt(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}},{key:"path",value:function(e){var t=this.getPoints(),r=(0,u.default)(t,2),n=r[0],o=n.x,s=n.y,i=r[1],a=i.x,A=i.y;return e&&(e.beginPath(),e.moveTo(o,s),e.lineTo(a,A)),new Ot(o,s,a,A)}},{key:"getMarkers",value:function(){var e=this.getPoints(),t=(0,u.default)(e,2),r=t[0],n=t[1],o=r.angleTo(n);return[[r,o],[n,o]]}}]),o}(zt),Jt=function(e){(0,Z.default)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Y())return!1;if(Y().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Y()(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,ee.default)(t);if(r){var o=(0,ee.default)(this).constructor;e=Y()(n,arguments,o)}else e=n.apply(this,arguments);return(0,$.default)(this,e)});function o(e,t,r){var s;return(0,F.default)(this,o),(s=n.call(this,e,t,r)).type="polyline",s.points=[],s.points=mt.parsePath(s.getAttribute("points").getString()),s}return(0,U.default)(o,[{key:"path",value:function(e){var t=this.points,r=(0,u.default)(t,1)[0],n=r.x,o=r.y,s=new Ot(n,o);return e&&(e.beginPath(),e.moveTo(n,o)),g()(t).call(t,(function(t){var r=t.x,n=t.y;s.addPoint(r,n),e&&e.lineTo(r,n)})),s}},{key:"getMarkers",value:function(){var e=this.points,t=e.length-1,r=[];return g()(e).call(e,(function(n,o){o!==t&&r.push([n,n.angleTo(e[o+1])])})),r.length>0&&r.push([e[e.length-1],r[r.length-1][1]]),r}}]),o}(zt),Yt=function(e){(0,Z.default)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Y())return!1;if(Y().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Y()(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,ee.default)(t);if(r){var o=(0,ee.default)(this).constructor;e=Y()(n,arguments,o)}else e=n.apply(this,arguments);return(0,$.default)(this,e)});function o(){var e;return(0,F.default)(this,o),(e=n.apply(this,arguments)).type="polygon",e}return(0,U.default)(o,[{key:"path",value:function(e){var t=(0,de.default)((0,ee.default)(o.prototype),"path",this).call(this,e),r=(0,u.default)(this.points,1)[0],n=r.x,s=r.y;return e&&(e.lineTo(n,s),e.closePath()),t}}]),o}(Jt),Zt=function(e){(0,Z.default)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Y())return!1;if(Y().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Y()(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,ee.default)(t);if(r){var o=(0,ee.default)(this).constructor;e=Y()(n,arguments,o)}else e=n.apply(this,arguments);return(0,$.default)(this,e)});function o(){var e;return(0,F.default)(this,o),(e=n.apply(this,arguments)).type="pattern",e}return(0,U.default)(o,[{key:"createPattern",value:function(e,t,r){var n=this.getStyle("width").getPixels("x",!0),o=this.getStyle("height").getPixels("y",!0),s=new Vt(this.document,null);s.attributes.viewBox=new ht(this.document,"viewBox",this.getAttribute("viewBox").getValue()),s.attributes.width=new ht(this.document,"width","".concat(n,"px")),s.attributes.height=new ht(this.document,"height","".concat(o,"px")),s.attributes.transform=new ht(this.document,"transform",this.getAttribute("patternTransform").getValue()),s.children=this.children;var i=this.document.createCanvas(n,o),a=i.getContext("2d"),A=this.getAttribute("x"),u=this.getAttribute("y");A.hasValue()&&u.hasValue()&&a.translate(A.getPixels("x",!0),u.getPixels("y",!0)),r.hasValue()?this.styles["fill-opacity"]=r:ge()(this.styles,"fill-opacity");for(var c=-1;c<=1;c++)for(var l=-1;l<=1;l++)a.save(),s.attributes.x=new ht(this.document,"x",c*i.width),s.attributes.y=new ht(this.document,"y",l*i.height),s.render(a),a.restore();return e.createPattern(i,"repeat")}}]),o}(St),$t=function(e){(0,Z.default)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Y())return!1;if(Y().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Y()(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,ee.default)(t);if(r){var o=(0,ee.default)(this).constructor;e=Y()(n,arguments,o)}else e=n.apply(this,arguments);return(0,$.default)(this,e)});function o(){var e;return(0,F.default)(this,o),(e=n.apply(this,arguments)).type="marker",e}return(0,U.default)(o,[{key:"render",value:function(e,t,r){if(t){var n=t.x,o=t.y,s=this.getAttribute("orient").getValue("auto"),i=this.getAttribute("markerUnits").getValue("strokeWidth");e.translate(n,o),"auto"===s&&e.rotate(r),"strokeWidth"===i&&e.scale(e.lineWidth,e.lineWidth),e.save();var a=new Vt(this.document,null);a.type=this.type,a.attributes.viewBox=new ht(this.document,"viewBox",this.getAttribute("viewBox").getValue()),a.attributes.refX=new ht(this.document,"refX",this.getAttribute("refX").getValue()),a.attributes.refY=new ht(this.document,"refY",this.getAttribute("refY").getValue()),a.attributes.width=new ht(this.document,"width",this.getAttribute("markerWidth").getValue()),a.attributes.height=new ht(this.document,"height",this.getAttribute("markerHeight").getValue()),a.attributes.overflow=new ht(this.document,"overflow",this.getAttribute("overflow").getValue()),a.attributes.fill=new ht(this.document,"fill",this.getAttribute("fill").getColor("black")),a.attributes.stroke=new ht(this.document,"stroke",this.getAttribute("stroke").getValue("none")),a.children=this.children,a.render(e),e.restore(),"strokeWidth"===i&&e.scale(1/e.lineWidth,1/e.lineWidth),"auto"===s&&e.rotate(-r),e.translate(-n,-o)}}}]),o}(St),er=function(e){(0,Z.default)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Y())return!1;if(Y().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Y()(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,ee.default)(t);if(r){var o=(0,ee.default)(this).constructor;e=Y()(n,arguments,o)}else e=n.apply(this,arguments);return(0,$.default)(this,e)});function o(){var e;return(0,F.default)(this,o),(e=n.apply(this,arguments)).type="defs",e}return(0,U.default)(o,[{key:"render",value:function(){}}]),o}(St),tr=function(e){(0,Z.default)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Y())return!1;if(Y().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Y()(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,ee.default)(t);if(r){var o=(0,ee.default)(this).constructor;e=Y()(n,arguments,o)}else e=n.apply(this,arguments);return(0,$.default)(this,e)});function o(){var e;return(0,F.default)(this,o),(e=n.apply(this,arguments)).type="g",e}return(0,U.default)(o,[{key:"getBoundingBox",value:function(e){var t,r=new Ot;return g()(t=this.children).call(t,(function(t){r.addBoundingBox(t.getBoundingBox(e))})),r}}]),o}(kt),rr=function(e){(0,Z.default)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Y())return!1;if(Y().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Y()(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,ee.default)(t);if(r){var o=(0,ee.default)(this).constructor;e=Y()(n,arguments,o)}else e=n.apply(this,arguments);return(0,$.default)(this,e)});function o(e,t,r){var s;(0,F.default)(this,o),(s=n.call(this,e,t,r)).attributesToInherit=["gradientUnits"],s.stops=[];var i=(0,ye.default)(s),a=i.stops,A=i.children;return g()(A).call(A,(function(e){"stop"===e.type&&a.push(e)})),s}return(0,U.default)(o,[{key:"getGradientUnits",value:function(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}},{key:"createGradient",value:function(e,t,r){var n=this,o=this;this.getHrefAttribute().hasValue()&&(o=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(o));var s=o.stops,i=this.getGradient(e,t);if(!i)return this.addParentOpacity(r,s[s.length-1].color);if(g()(s).call(s,(function(e){i.addColorStop(e.offset,n.addParentOpacity(r,e.color))})),this.getAttribute("gradientTransform").hasValue()){var a=this.document,A=a.screen,c=A.MAX_VIRTUAL_PIXELS,l=A.viewPort,d=(0,u.default)(l.viewPorts,1)[0],f=new qt(a,null);f.attributes.x=new ht(a,"x",-c/3),f.attributes.y=new ht(a,"y",-c/3),f.attributes.width=new ht(a,"width",c),f.attributes.height=new ht(a,"height",c);var h=new tr(a,null);h.attributes.transform=new ht(a,"transform",this.getAttribute("gradientTransform").getValue()),h.children=[f];var p=new Vt(a,null);p.attributes.x=new ht(a,"x",0),p.attributes.y=new ht(a,"y",0),p.attributes.width=new ht(a,"width",d.width),p.attributes.height=new ht(a,"height",d.height),p.children=[h];var m=a.createCanvas(d.width,d.height),y=m.getContext("2d");return y.fillStyle=i,p.render(y),y.createPattern(m,"no-repeat")}return i}},{key:"inheritStopContainer",value:function(e){var t,r=this;g()(t=this.attributesToInherit).call(t,(function(t){!r.getAttribute(t).hasValue()&&e.getAttribute(t).hasValue()&&r.getAttribute(t,!0).setValue(e.getAttribute(t).getValue())}))}},{key:"addParentOpacity",value:function(e,t){return e.hasValue()?new ht(this.document,"color",t).addOpacity(e).getColor():t}}]),o}(St),nr=function(e){(0,Z.default)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Y())return!1;if(Y().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Y()(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,ee.default)(t);if(r){var o=(0,ee.default)(this).constructor;e=Y()(n,arguments,o)}else e=n.apply(this,arguments);return(0,$.default)(this,e)});function o(e,t,r){var s;return(0,F.default)(this,o),(s=n.call(this,e,t,r)).type="linearGradient",s.attributesToInherit.push("x1","y1","x2","y2"),s}return(0,U.default)(o,[{key:"getGradient",value:function(e,t){var r="objectBoundingBox"===this.getGradientUnits(),n=r?t.getBoundingBox(e):null;if(r&&!n)return null;this.getAttribute("x1").hasValue()||this.getAttribute("y1").hasValue()||this.getAttribute("x2").hasValue()||this.getAttribute("y2").hasValue()||(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));var o=r?n.x+n.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),s=r?n.y+n.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),i=r?n.x+n.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),a=r?n.y+n.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return o===i&&s===a?null:e.createLinearGradient(o,s,i,a)}}]),o}(rr),or=function(e){(0,Z.default)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Y())return!1;if(Y().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Y()(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,ee.default)(t);if(r){var o=(0,ee.default)(this).constructor;e=Y()(n,arguments,o)}else e=n.apply(this,arguments);return(0,$.default)(this,e)});function o(e,t,r){var s;return(0,F.default)(this,o),(s=n.call(this,e,t,r)).type="radialGradient",s.attributesToInherit.push("cx","cy","r","fx","fy","fr"),s}return(0,U.default)(o,[{key:"getGradient",value:function(e,t){var r="objectBoundingBox"===this.getGradientUnits(),n=t.getBoundingBox(e);if(r&&!n)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");var o=r?n.x+n.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),s=r?n.y+n.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),i=o,a=s;this.getAttribute("fx").hasValue()&&(i=r?n.x+n.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(a=r?n.y+n.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var A=r?(n.width+n.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),u=this.getAttribute("fr").getPixels();return e.createRadialGradient(i,a,u,o,s,A)}}]),o}(rr),sr=function(e){(0,Z.default)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Y())return!1;if(Y().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Y()(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,ee.default)(t);if(r){var o=(0,ee.default)(this).constructor;e=Y()(n,arguments,o)}else e=n.apply(this,arguments);return(0,$.default)(this,e)});function o(e,t,r){var s;(0,F.default)(this,o),(s=n.call(this,e,t,r)).type="stop";var i=Math.max(0,Math.min(1,s.getAttribute("offset").getNumber())),a=s.getStyle("stop-opacity"),A=s.getStyle("stop-color",!0);return""===A.getString()&&A.setValue("#000"),a.hasValue()&&(A=A.addOpacity(a)),s.offset=i,s.color=A.getColor(),s}return o}(St),ir=function(e){(0,Z.default)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Y())return!1;if(Y().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Y()(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,ee.default)(t);if(r){var o=(0,ee.default)(this).constructor;e=Y()(n,arguments,o)}else e=n.apply(this,arguments);return(0,$.default)(this,e)});function o(e,t,r){var s;return(0,F.default)(this,o),(s=n.call(this,e,t,r)).type="animate",s.duration=0,s.initialValue=null,s.initialUnits="",s.removed=!1,s.frozen=!1,e.screen.animations.push((0,ye.default)(s)),s.begin=s.getAttribute("begin").getMilliseconds(),s.maxDuration=s.begin+s.getAttribute("dur").getMilliseconds(),s.from=s.getAttribute("from"),s.to=s.getAttribute("to"),s.values=s.getAttribute("values"),we()(s).hasValue()&&we()(s).setValue(we()(s).getString().split(";")),s}return(0,U.default)(o,[{key:"getProperty",value:function(){var e=this.getAttribute("attributeType").getString(),t=this.getAttribute("attributeName").getString();return"CSS"===e?this.parent.getStyle(t,!0):this.parent.getAttribute(t,!0)}},{key:"calcValue",value:function(){var e,t=this.initialUnits,r=this.getProgress(),n=r.progress,o=r.from,s=r.to,i=o.getNumber()+(s.getNumber()-o.getNumber())*n;return"%"===t&&(i*=100),L()(e="".concat(i)).call(e,t)}},{key:"update",value:function(e){var t=this.parent,r=this.getProperty();if(this.initialValue||(this.initialValue=r.getString(),this.initialUnits=r.getUnits()),this.duration>this.maxDuration){var n=this.getAttribute("fill").getString("remove");if("indefinite"===this.getAttribute("repeatCount").getString()||"indefinite"===this.getAttribute("repeatDur").getString())this.duration=0;else if("freeze"!==n||this.frozen){if("remove"===n&&!this.removed)return this.removed=!0,r.setValue(t.animationFrozen?t.animationFrozenValue:this.initialValue),!0}else this.frozen=!0,t.animationFrozen=!0,t.animationFrozenValue=r.getString();return!1}this.duration+=e;var o=!1;if(this.begine.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,i=!1;return{s:function(){t=_e()(e)},n:function(){var e=t.next();return s=e.done,e},e:function(e){i=!0,o=e},f:function(){try{s||null==t.return||t.return()}finally{if(i)throw o}}}}((0,ye.default)(s).children);try{for(A.s();!(i=A.n()).done;){var u=i.value;switch(u.type){case"font-face":s.fontFace=u;var c=u.getStyle("font-family");c.hasValue()&&(a[c.getString()]=(0,ye.default)(s));break;case"missing-glyph":s.missingGlyph=u;break;case"glyph":var l=u;l.arabicForm?(s.isRTL=!0,s.isArabic=!0,void 0===s.glyphs[l.unicode]&&(s.glyphs[l.unicode]={}),s.glyphs[l.unicode][l.arabicForm]=l):s.glyphs[l.unicode]=l}}}catch(e){A.e(e)}finally{A.f()}return s}return(0,U.default)(o,[{key:"render",value:function(){}}]),o}(St),lr=function(e){(0,Z.default)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Y())return!1;if(Y().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Y()(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,ee.default)(t);if(r){var o=(0,ee.default)(this).constructor;e=Y()(n,arguments,o)}else e=n.apply(this,arguments);return(0,$.default)(this,e)});function o(e,t,r){var s;return(0,F.default)(this,o),(s=n.call(this,e,t,r)).type="font-face",s.ascent=s.getAttribute("ascent").getNumber(),s.descent=s.getAttribute("descent").getNumber(),s.unitsPerEm=s.getAttribute("units-per-em").getNumber(),s}return o}(St),dr=function(e){(0,Z.default)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Y())return!1;if(Y().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Y()(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,ee.default)(t);if(r){var o=(0,ee.default)(this).constructor;e=Y()(n,arguments,o)}else e=n.apply(this,arguments);return(0,$.default)(this,e)});function o(){var e;return(0,F.default)(this,o),(e=n.apply(this,arguments)).type="missing-glyph",e.horizAdvX=0,e}return o}(zt),fr=function(e){(0,Z.default)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Y())return!1;if(Y().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Y()(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,ee.default)(t);if(r){var o=(0,ee.default)(this).constructor;e=Y()(n,arguments,o)}else e=n.apply(this,arguments);return(0,$.default)(this,e)});function o(e,t,r){var s;return(0,F.default)(this,o),(s=n.call(this,e,t,r)).type="glyph",s.horizAdvX=s.getAttribute("horiz-adv-x").getNumber(),s.unicode=s.getAttribute("unicode").getString(),s.arabicForm=s.getAttribute("arabic-form").getString(),s}return o}(zt),hr=function(e){(0,Z.default)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Y())return!1;if(Y().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Y()(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,ee.default)(t);if(r){var o=(0,ee.default)(this).constructor;e=Y()(n,arguments,o)}else e=n.apply(this,arguments);return(0,$.default)(this,e)});function o(){var e;return(0,F.default)(this,o),(e=n.apply(this,arguments)).type="tref",e}return(0,U.default)(o,[{key:"getText",value:function(){var e=this.getHrefAttribute().getDefinition();if(e){var t=e.children[0];if(t)return t.getText()}return""}}]),o}(Rt),pr=function(e){(0,Z.default)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Y())return!1;if(Y().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Y()(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,ee.default)(t);if(r){var o=(0,ee.default)(this).constructor;e=Y()(n,arguments,o)}else e=n.apply(this,arguments);return(0,$.default)(this,e)});function o(e,t,r){var s,i;(0,F.default)(this,o),(i=n.call(this,e,t,r)).type="a";var a=t.childNodes,A=a[0],u=a.length>0&&k()(s=ae()(a)).call(s,(function(e){return 3===e.nodeType}));return i.hasText=u,i.text=u?i.getTextFromNode(A):"",i}return(0,U.default)(o,[{key:"getText",value:function(){return this.text}},{key:"renderChildren",value:function(e){if(this.hasText){(0,de.default)((0,ee.default)(o.prototype),"renderChildren",this).call(this,e);var t=this.document,r=this.x,n=this.y,s=t.screen.mouse,i=new ht(t,"fontSize",Pt.parse(t.ctx.font).fontSize);s.isWorking()&&s.checkBoundingBox(this,new Ot(r,n-i.getPixels("y"),r+this.measureText(e),n))}else if(this.children.length>0){var a=new tr(this.document,null);a.children=this.children,a.parent=this,a.render(e)}}},{key:"onClick",value:function(){var e=this.document.window;e&&e.open(this.getHrefAttribute().getString())}},{key:"onMouseMove",value:function(){this.document.ctx.canvas.style.cursor="pointer"}}]),o}(Rt);function mr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rA?a:A,p=a>A?1:a/A,m=a>A?A/a:1;e&&(e.translate(s,i),e.rotate(d),e.scale(p,m),e.arc(0,0,h,c,c+l,Boolean(1-f)),e.scale(1/p,1/m),e.rotate(-d),e.translate(-s,-i));break;case Kt.CLOSE_PATH:e&&e.closePath()}}))}},{key:"renderChildren",value:function(e){this.setTextData(e),e.save();var t=this.parent.getStyle("text-decoration").getString(),r=this.getFontSize(),n=this.glyphInfo,o=e.fillStyle;"underline"===t&&e.beginPath(),g()(n).call(n,(function(n,o){var s=n.p0,i=n.p1,a=n.rotation,A=n.text;e.save(),e.translate(s.x,s.y),e.rotate(a),e.fillStyle&&e.fillText(A,0,0),e.strokeStyle&&e.strokeText(A,0,0),e.restore(),"underline"===t&&(0===o&&e.moveTo(s.x,s.y+r/8),e.lineTo(i.x,i.y+r/5))})),"underline"===t&&(e.lineWidth=r/20,e.strokeStyle=o,e.stroke(),e.closePath()),e.restore()}},{key:"getLetterSpacingAt",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.letterSpacingCache[e]||0}},{key:"findSegmentToFitChar",value:function(e,t,r,n,o,s,i,a,A){var u=s,c=this.measureText(e,a);" "===a&&"justify"===t&&r-1&&(u+=this.getLetterSpacingAt(A));var l=this.textHeight/20,d=this.getEquidistantPointOnPath(u,l,0),f=this.getEquidistantPointOnPath(u+c,l,0),h={p0:d,p1:f},p=d&&f?Math.atan2(f.y-d.y,f.x-d.x):0;if(i){var m=Math.cos(Math.PI/2+p)*i,g=Math.cos(-p)*i;h.p0=yr(yr({},d),{},{x:d.x+m,y:d.y+g}),h.p1=yr(yr({},f),{},{x:f.x+m,y:f.y+g})}return{offset:u+=c,segment:h,rotation:p}}},{key:"measureText",value:function(e,t){var r=this.measuresCache,n=t||this.getText();if(r.has(n))return r.get(n);var o=this.measureTargetText(e,n);return r.set(n,o),o}},{key:"setTextData",value:function(e){var t,r=this;if(!this.glyphInfo){var n=this.getText(),o=n.split(""),s=n.split(" ").length-1,i=A()(t=this.parent.getAttribute("dx").split()).call(t,(function(e){return e.getPixels("x")})),a=this.parent.getAttribute("dy").getPixels("y"),u=this.parent.getStyle("text-anchor").getString("start"),c=this.getStyle("letter-spacing"),l=this.parent.getStyle("letter-spacing"),d=0;c.hasValue()&&"inherit"!==c.getValue()?c.hasValue()&&"initial"!==c.getValue()&&"unset"!==c.getValue()&&(d=c.getPixels()):d=l.getPixels();var f=[],h=n.length;this.letterSpacingCache=f;for(var p=0;p0&&(A-=2*Math.PI),1===o&&A<0&&(A+=2*Math.PI),[i.x,i.y,r,n,a,A,s,o]}},{key:"calcLength",value:function(e,t,r,n){var o=0,s=null,i=null,a=0;switch(r){case Kt.LINE_TO:return this.getLineLength(e,t,n[0],n[1]);case Kt.CURVE_TO:for(o=0,s=this.getPointOnCubicBezier(0,e,t,n[0],n[1],n[2],n[3],n[4],n[5]),a=.01;a<=1;a+=.01)i=this.getPointOnCubicBezier(a,e,t,n[0],n[1],n[2],n[3],n[4],n[5]),o+=this.getLineLength(s.x,s.y,i.x,i.y),s=i;return o;case Kt.QUAD_TO:for(o=0,s=this.getPointOnQuadraticBezier(0,e,t,n[0],n[1],n[2],n[3]),a=.01;a<=1;a+=.01)i=this.getPointOnQuadraticBezier(a,e,t,n[0],n[1],n[2],n[3]),o+=this.getLineLength(s.x,s.y,i.x,i.y),s=i;return o;case Kt.ARC:o=0;var A=n[4],u=n[5],c=n[4]+u,l=Math.PI/180;if(Math.abs(A-c)c;a-=l)i=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],a,0),o+=this.getLineLength(s.x,s.y,i.x,i.y),s=i;else for(a=A+l;a5&&void 0!==arguments[5]?arguments[5]:t,i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:r,a=(o-r)/(n-t+nt),A=Math.sqrt(e*e/(1+a*a));nt)return null;var o,s=function(e){var t;if(void 0===Fe()||null==Ne()(e)){if(Ce()(e)||(t=function(e,t){var r;if(e){if("string"==typeof e)return mr(e,t);var n=Se()(r=Object.prototype.toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?ae()(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mr(e,t):void 0}}(e))){t&&(e=t);var r=0,n=function(){};return{s:n,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,i=!1;return{s:function(){t=_e()(e)},n:function(){var e=t.next();return s=e.done,e},e:function(e){i=!0,o=e},f:function(){try{s||null==t.return||t.return()}finally{if(i)throw o}}}}(this.dataArray);try{for(s.s();!(o=s.n()).done;){var i=o.value;if(!i||!(i.pathLength<5e-5||r+i.pathLength+5e-5=0&&A>l)break;n=this.getPointOnEllipticalArc(i.points[0],i.points[1],i.points[2],i.points[3],A,i.points[6]);break;case Kt.CURVE_TO:(A=a/i.pathLength)>1&&(A=1),n=this.getPointOnCubicBezier(A,i.start.x,i.start.y,i.points[0],i.points[1],i.points[2],i.points[3],i.points[4],i.points[5]);break;case Kt.QUAD_TO:(A=a/i.pathLength)>1&&(A=1),n=this.getPointOnQuadraticBezier(A,i.start.x,i.start.y,i.points[0],i.points[1],i.points[2],i.points[3])}if(n)return n;break}r+=i.pathLength}}catch(e){s.e(e)}finally{s.f()}return null}},{key:"getLineLength",value:function(e,t,r,n){return Math.sqrt((r-e)*(r-e)+(n-t)*(n-t))}},{key:"getPathLength",value:function(){var e;return-1===this.pathLength&&(this.pathLength=H()(e=this.dataArray).call(e,(function(e,t){return t.pathLength>0?e+t.pathLength:e}),0)),this.pathLength}},{key:"getPointOnCubicBezier",value:function(e,t,r,n,o,s,i,a,A){return{x:a*at(e)+s*At(e)+n*ut(e)+t*ct(e),y:A*at(e)+i*At(e)+o*ut(e)+r*ct(e)}}},{key:"getPointOnQuadraticBezier",value:function(e,t,r,n,o,s,i){return{x:s*lt(e)+n*dt(e)+t*ft(e),y:i*lt(e)+o*dt(e)+r*ft(e)}}},{key:"getPointOnEllipticalArc",value:function(e,t,r,n,o,s){var i=Math.cos(s),a=Math.sin(s),A=r*Math.cos(o),u=n*Math.sin(o);return{x:e+(A*i-u*a),y:t+(A*a+u*i)}}},{key:"buildEquidistantCache",value:function(e,t){var r=this.getPathLength(),n=t||.25,o=e||r/100;if(!this.equidistantCache||this.equidistantCache.step!==o||this.equidistantCache.precision!==n){this.equidistantCache={step:o,precision:n,points:[]};for(var s=0,i=0;i<=r;i+=n){var a=this.getPointOnPath(i),A=this.getPointOnPath(i+n);a&&A&&(s+=this.getLineLength(a.x,a.y,A.x,A.y))>=o&&(this.equidistantCache.points.push({x:a.x,y:a.y,distance:i}),s-=o)}}}},{key:"getEquidistantPointOnPath",value:function(e,t,r){if(this.buildEquidistantCache(t,r),e<0||e-this.getPathLength()>5e-5)return null;var n=Math.round(e/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[n]||null}}]),o}(Rt),wr=function(e){(0,Z.default)(i,e);var t,r,n,o,s=(n=i,o=function(){if("undefined"==typeof Reflect||!Y())return!1;if(Y().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Y()(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,ee.default)(n);if(o){var r=(0,ee.default)(this).constructor;e=Y()(t,arguments,r)}else e=t.apply(this,arguments);return(0,$.default)(this,e)});function i(e,t,r){var n;(0,F.default)(this,i),(n=s.call(this,e,t,r)).type="image",n.loaded=!1;var o=n.getHrefAttribute().getString();if(!o)return(0,$.default)(n);var a=/\.svg$/.test(o);return e.images.push((0,ye.default)(n)),a?n.loadSvg(o):n.loadImage(o),n.isSvg=a,n}return(0,U.default)(i,[{key:"loadImage",value:(r=(0,N.default)(E().mark((function e(t){var r;return E().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.document.createImage(t);case 3:r=e.sent,this.image=r,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.error('Error while loading image "'.concat(t,'":'),e.t0);case 10:this.loaded=!0;case 11:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(e){return r.apply(this,arguments)})},{key:"loadSvg",value:(t=(0,N.default)(E().mark((function e(t){var r,n;return E().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.document.fetch(t);case 3:return r=e.sent,e.next=6,r.text();case 6:n=e.sent,this.image=n,e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.error('Error while loading image "'.concat(t,'":'),e.t0);case 13:this.loaded=!0;case 14:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(e){return t.apply(this,arguments)})},{key:"renderChildren",value:function(e){var t=this.document,r=this.image,n=this.loaded,o=this.getAttribute("x").getPixels("x"),s=this.getAttribute("y").getPixels("y"),i=this.getStyle("width").getPixels("x"),a=this.getStyle("height").getPixels("y");if(n&&r&&i&&a){if(e.save(),this.isSvg)t.canvg.forkString(e,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:o,offsetY:s,scaleWidth:i,scaleHeight:a}).render();else{var A=this.image;e.translate(o,s),t.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:i,desiredWidth:A.width,height:a,desiredHeight:A.height}),this.loaded&&(void 0===A.complete||A.complete)&&e.drawImage(A,0,0)}e.restore()}}},{key:"getBoundingBox",value:function(){var e=this.getAttribute("x").getPixels("x"),t=this.getAttribute("y").getPixels("y"),r=this.getStyle("width").getPixels("x"),n=this.getStyle("height").getPixels("y");return new Ot(e,t,e+r,t+n)}}]),i}(kt),br=function(e){(0,Z.default)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Y())return!1;if(Y().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Y()(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,ee.default)(t);if(r){var o=(0,ee.default)(this).constructor;e=Y()(n,arguments,o)}else e=n.apply(this,arguments);return(0,$.default)(this,e)});function o(){var e;return(0,F.default)(this,o),(e=n.apply(this,arguments)).type="symbol",e}return(0,U.default)(o,[{key:"render",value:function(e){}}]),o}(kt),Br=function(){function e(t){(0,F.default)(this,e),this.document=t,this.loaded=!1,t.fonts.push(this)}var t;return(0,U.default)(e,[{key:"load",value:(t=(0,N.default)(E().mark((function e(t,r){var n,o,s,i;return E().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,o=this.document,e.next=4,o.canvg.parser.load(r);case 4:s=e.sent,i=s.getElementsByTagName("font"),g()(n=ae()(i)).call(n,(function(e){var r=o.createElement(e);o.definitions[t]=r})),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),console.error('Error while loading font "'.concat(r,'":'),e.t0);case 12:this.loaded=!0;case 13:case"end":return e.stop()}}),e,this,[[0,9]])}))),function(e,r){return t.apply(this,arguments)})}]),e}(),jr=function(e){(0,Z.default)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Y())return!1;if(Y().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Y()(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,ee.default)(t);if(r){var o=(0,ee.default)(this).constructor;e=Y()(n,arguments,o)}else e=n.apply(this,arguments);return(0,$.default)(this,e)});function o(e,t,r){var s,i;(0,F.default)(this,o),(i=n.call(this,e,t,r)).type="style";var a=Re(A()(s=ae()(t.childNodes)).call(s,(function(e){return e.data})).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")).split("}");return g()(a).call(a,(function(t){var r=G()(t).call(t);if(r){var n=r.split("{"),o=n[0].split(","),s=n[1].split(";");g()(o).call(o,(function(t){var r=G()(t).call(t);if(r){var n=e.styles[r]||{};if(g()(s).call(s,(function(t){var r,o,s=le()(t).call(t,":"),i=G()(r=t.substr(0,s)).call(r),a=G()(o=t.substr(s+1,t.length-s)).call(o);i&&a&&(n[i]=new ht(e,i,a))})),e.styles[r]=n,e.stylesSpecificity[r]=rt(r),"@font-face"===r){var o=n["font-family"].getString().replace(/"|'/g,""),i=n.src.getString().split(",");g()(i).call(i,(function(t){if(le()(t).call(t,'format("svg")')>0){var r=qe(t);r&&new Br(e).load(o,r)}}))}}}))}})),i}return o}(St);jr.parseExternalUrl=qe;var _r=function(e){(0,Z.default)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Y())return!1;if(Y().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Y()(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,ee.default)(t);if(r){var o=(0,ee.default)(this).constructor;e=Y()(n,arguments,o)}else e=n.apply(this,arguments);return(0,$.default)(this,e)});function o(){var e;return(0,F.default)(this,o),(e=n.apply(this,arguments)).type="use",e}return(0,U.default)(o,[{key:"setContext",value:function(e){(0,de.default)((0,ee.default)(o.prototype),"setContext",this).call(this,e);var t=this.getAttribute("x"),r=this.getAttribute("y");t.hasValue()&&e.translate(t.getPixels("x"),0),r.hasValue()&&e.translate(0,r.getPixels("y"))}},{key:"path",value:function(e){var t=this.element;t&&t.path(e)}},{key:"renderChildren",value:function(e){var t=this.document,r=this.element;if(r){var n=r;if("symbol"===r.type&&((n=new Vt(t,null)).attributes.viewBox=new ht(t,"viewBox",r.getAttribute("viewBox").getString()),n.attributes.preserveAspectRatio=new ht(t,"preserveAspectRatio",r.getAttribute("preserveAspectRatio").getString()),n.attributes.overflow=new ht(t,"overflow",r.getAttribute("overflow").getString()),n.children=r.children,r.styles.opacity=new ht(t,"opacity",this.calculateOpacity())),"svg"===n.type){var o=this.getStyle("width",!1,!0),s=this.getStyle("height",!1,!0);o.hasValue()&&(n.attributes.width=new ht(t,"width",o.getString())),s.hasValue()&&(n.attributes.height=new ht(t,"height",s.getString()))}var i=n.parent;n.parent=this,n.render(e),n.parent=i}}},{key:"getBoundingBox",value:function(e){var t=this.element;return t?t.getBoundingBox(e):null}},{key:"elementTransform",value:function(){var e=this.document,t=this.element;return Ut.fromElement(e,t)}},{key:"element",get:function(){return this._element||(this._element=this.getHrefAttribute().getDefinition()),this._element}}]),o}(kt);function xr(e,t,r,n,o,s){return e[r*n*4+4*t+s]}function Cr(e,t,r,n,o,s,i){e[r*n*4+4*t+s]=i}function Er(e,t,r){return e[t]*r}function Nr(e,t,r,n){return t+Math.cos(e)*r+Math.sin(e)*n}var Qr=function(e){(0,Z.default)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Y())return!1;if(Y().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Y()(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,ee.default)(t);if(r){var o=(0,ee.default)(this).constructor;e=Y()(n,arguments,o)}else e=n.apply(this,arguments);return(0,$.default)(this,e)});function o(e,t,r){var s;(0,F.default)(this,o),(s=n.call(this,e,t,r)).type="feColorMatrix";var i=Ke(s.getAttribute("values").getString());switch(s.getAttribute("type").getString("matrix")){case"saturate":var a=i[0];i=[.213+.787*a,.715-.715*a,.072-.072*a,0,0,.213-.213*a,.715+.285*a,.072-.072*a,0,0,.213-.213*a,.715-.715*a,.072+.928*a,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var A=i[0]*Math.PI/180;i=[Nr(A,.213,.787,-.213),Nr(A,.715,-.715,-.715),Nr(A,.072,-.072,.928),0,0,Nr(A,.213,-.213,.143),Nr(A,.715,.285,.14),Nr(A,.072,-.072,-.283),0,0,Nr(A,.213,-.213,-.787),Nr(A,.715,-.715,.715),Nr(A,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1]}return s.matrix=i,s.includeOpacity=s.getAttribute("includeOpacity").hasValue(),s}return(0,U.default)(o,[{key:"apply",value:function(e,t,r,n,o){for(var s=this.includeOpacity,i=this.matrix,a=e.getImageData(0,0,n,o),A=0;A1&&void 0!==o[1]&&o[1],n=document.createElement("img"),r&&(n.crossOrigin="Anonymous"),e.abrupt("return",new(M())((function(e,r){n.onload=function(){e(n)},n.onerror=function(){r()},n.src=t})));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Kr=function(){function e(t){var r,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=o.rootEmSize,i=void 0===s?12:s,a=o.emSize,A=void 0===a?12:a,u=o.createCanvas,c=void 0===u?e.createCanvas:u,l=o.createImage,d=void 0===l?e.createImage:l,f=o.anonymousCrossOrigin;(0,F.default)(this,e),this.canvg=t,this.definitions={},this.styles={},this.stylesSpecificity={},this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=t.screen,this.rootEmSize=i,this.emSize=A,this.createCanvas=c,this.createImage=this.bindCreateImage(d,f),this.screen.wait(K()(r=this.isImagesLoaded).call(r,this)),this.screen.wait(K()(n=this.isFontsLoaded).call(n,this))}return(0,U.default)(e,[{key:"bindCreateImage",value:function(e,t){return"boolean"==typeof t?function(r,n){return e(r,"boolean"==typeof n?n:t)}:e}},{key:"popEmSize",value:function(){this.emSizeStack.pop()}},{key:"getUniqueId",value:function(){return"canvg".concat(++this.uniqueId)}},{key:"isImagesLoaded",value:function(){var e;return k()(e=this.images).call(e,(function(e){return e.loaded}))}},{key:"isFontsLoaded",value:function(){var e;return k()(e=this.fonts).call(e,(function(e){return e.loaded}))}},{key:"createDocumentElement",value:function(e){var t=this.createElement(e.documentElement);return t.root=!0,t.addStylesFromStyleDefinition(),this.documentElement=t,t}},{key:"createElement",value:function(t){var r=t.nodeName.replace(/^[^:]+:/,""),n=e.elementTypes[r];return void 0!==n?new n(this,t):new Lt(this,t)}},{key:"createTextNode",value:function(e){return new Dt(this,e)}},{key:"setViewBox",value:function(e){this.screen.setViewBox(function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};(0,F.default)(this,e),this.parser=new jt(n),this.screen=new wt(t,n),this.options=n;var o=new Kr(this,n),s=o.createDocumentElement(r);this.document=o,this.documentElement=s}var t,r;return(0,U.default)(e,[{key:"fork",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.from(t,r,Vr(Vr({},this.options),n))}},{key:"forkString",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.fromString(t,r,Vr(Vr({},this.options),n))}},{key:"ready",value:function(){return this.screen.ready()}},{key:"isReady",value:function(){return this.screen.isReady()}},{key:"render",value:(r=(0,N.default)(E().mark((function e(){var t,r=arguments;return E().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:{},this.start(Vr({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},t)),e.next=4,this.ready();case 4:this.stop();case 5:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"start",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.documentElement,r=this.screen,n=this.options;r.start(t,Vr(Vr({enableRedraw:!0},n),e))}},{key:"stop",value:function(){this.screen.stop()}},{key:"resize",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.documentElement.resize(e,t,r)}}],[{key:"from",value:(t=(0,N.default)(E().mark((function t(r,n){var o,s,i,a=arguments;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=new jt(o=a.length>2&&void 0!==a[2]?a[2]:{}),t.next=4,s.parse(n);case 4:return i=t.sent,t.abrupt("return",new e(r,i,o));case 6:case"end":return t.stop()}}),t)}))),function(e,r){return t.apply(this,arguments)})},{key:"fromString",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new e(t,new jt(n).parseFromString(r),n)}}]),e}(),Gr=Object.freeze({__proto__:null,offscreen:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).DOMParser,t={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,createCanvas:function(e,t){return new OffscreenCanvas(e,t)},createImage:function(e){return(0,N.default)(E().mark((function t(){var r,n,o;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch(e);case 2:return r=t.sent,t.next=5,r.blob();case 5:return n=t.sent,t.next=8,createImageBitmap(n);case 8:return o=t.sent,t.abrupt("return",o);case 10:case"end":return t.stop()}}),t)})))()}};return"undefined"==typeof DOMParser&&void 0!==e||ge()(t,"DOMParser"),t},node:function(e){var t=e.DOMParser,r=e.canvas;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:t,fetch:e.fetch,createCanvas:r.createCanvas,createImage:r.loadImage}}});t.default=qr},"./node_modules/core-js-pure/es/array/from.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.string.iterator.js"),r("./node_modules/core-js-pure/modules/es.array.from.js");var n=r("./node_modules/core-js-pure/internals/path.js");e.exports=n.Array.from},"./node_modules/core-js-pure/es/array/is-array.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.array.is-array.js");var n=r("./node_modules/core-js-pure/internals/path.js");e.exports=n.Array.isArray},"./node_modules/core-js-pure/es/array/virtual/concat.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.array.concat.js");var n=r("./node_modules/core-js-pure/internals/entry-virtual.js");e.exports=n("Array").concat},"./node_modules/core-js-pure/es/array/virtual/every.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.array.every.js");var n=r("./node_modules/core-js-pure/internals/entry-virtual.js");e.exports=n("Array").every},"./node_modules/core-js-pure/es/array/virtual/fill.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.array.fill.js");var n=r("./node_modules/core-js-pure/internals/entry-virtual.js");e.exports=n("Array").fill},"./node_modules/core-js-pure/es/array/virtual/filter.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.array.filter.js");var n=r("./node_modules/core-js-pure/internals/entry-virtual.js");e.exports=n("Array").filter},"./node_modules/core-js-pure/es/array/virtual/for-each.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.array.for-each.js");var n=r("./node_modules/core-js-pure/internals/entry-virtual.js");e.exports=n("Array").forEach},"./node_modules/core-js-pure/es/array/virtual/includes.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.array.includes.js");var n=r("./node_modules/core-js-pure/internals/entry-virtual.js");e.exports=n("Array").includes},"./node_modules/core-js-pure/es/array/virtual/index-of.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.array.index-of.js");var n=r("./node_modules/core-js-pure/internals/entry-virtual.js");e.exports=n("Array").indexOf},"./node_modules/core-js-pure/es/array/virtual/map.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.array.map.js");var n=r("./node_modules/core-js-pure/internals/entry-virtual.js");e.exports=n("Array").map},"./node_modules/core-js-pure/es/array/virtual/reduce.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.array.reduce.js");var n=r("./node_modules/core-js-pure/internals/entry-virtual.js");e.exports=n("Array").reduce},"./node_modules/core-js-pure/es/array/virtual/reverse.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.array.reverse.js");var n=r("./node_modules/core-js-pure/internals/entry-virtual.js");e.exports=n("Array").reverse},"./node_modules/core-js-pure/es/array/virtual/slice.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.array.slice.js");var n=r("./node_modules/core-js-pure/internals/entry-virtual.js");e.exports=n("Array").slice},"./node_modules/core-js-pure/es/array/virtual/some.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.array.some.js");var n=r("./node_modules/core-js-pure/internals/entry-virtual.js");e.exports=n("Array").some},"./node_modules/core-js-pure/es/array/virtual/values.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.array.iterator.js");var n=r("./node_modules/core-js-pure/internals/entry-virtual.js");e.exports=n("Array").values},"./node_modules/core-js-pure/es/date/now.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.date.now.js");var n=r("./node_modules/core-js-pure/internals/path.js");e.exports=n.Date.now},"./node_modules/core-js-pure/es/function/virtual/bind.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.function.bind.js");var n=r("./node_modules/core-js-pure/internals/entry-virtual.js");e.exports=n("Function").bind},"./node_modules/core-js-pure/es/instance/bind.js":function(e,t,r){var n=r("./node_modules/core-js-pure/es/function/virtual/bind.js"),o=Function.prototype;e.exports=function(e){var t=e.bind;return e===o||e instanceof Function&&t===o.bind?n:t}},"./node_modules/core-js-pure/es/instance/concat.js":function(e,t,r){var n=r("./node_modules/core-js-pure/es/array/virtual/concat.js"),o=Array.prototype;e.exports=function(e){var t=e.concat;return e===o||e instanceof Array&&t===o.concat?n:t}},"./node_modules/core-js-pure/es/instance/every.js":function(e,t,r){var n=r("./node_modules/core-js-pure/es/array/virtual/every.js"),o=Array.prototype;e.exports=function(e){var t=e.every;return e===o||e instanceof Array&&t===o.every?n:t}},"./node_modules/core-js-pure/es/instance/fill.js":function(e,t,r){var n=r("./node_modules/core-js-pure/es/array/virtual/fill.js"),o=Array.prototype;e.exports=function(e){var t=e.fill;return e===o||e instanceof Array&&t===o.fill?n:t}},"./node_modules/core-js-pure/es/instance/filter.js":function(e,t,r){var n=r("./node_modules/core-js-pure/es/array/virtual/filter.js"),o=Array.prototype;e.exports=function(e){var t=e.filter;return e===o||e instanceof Array&&t===o.filter?n:t}},"./node_modules/core-js-pure/es/instance/includes.js":function(e,t,r){var n=r("./node_modules/core-js-pure/es/array/virtual/includes.js"),o=r("./node_modules/core-js-pure/es/string/virtual/includes.js"),s=Array.prototype,i=String.prototype;e.exports=function(e){var t=e.includes;return e===s||e instanceof Array&&t===s.includes?n:"string"==typeof e||e===i||e instanceof String&&t===i.includes?o:t}},"./node_modules/core-js-pure/es/instance/index-of.js":function(e,t,r){var n=r("./node_modules/core-js-pure/es/array/virtual/index-of.js"),o=Array.prototype;e.exports=function(e){var t=e.indexOf;return e===o||e instanceof Array&&t===o.indexOf?n:t}},"./node_modules/core-js-pure/es/instance/map.js":function(e,t,r){var n=r("./node_modules/core-js-pure/es/array/virtual/map.js"),o=Array.prototype;e.exports=function(e){var t=e.map;return e===o||e instanceof Array&&t===o.map?n:t}},"./node_modules/core-js-pure/es/instance/reduce.js":function(e,t,r){var n=r("./node_modules/core-js-pure/es/array/virtual/reduce.js"),o=Array.prototype;e.exports=function(e){var t=e.reduce;return e===o||e instanceof Array&&t===o.reduce?n:t}},"./node_modules/core-js-pure/es/instance/reverse.js":function(e,t,r){var n=r("./node_modules/core-js-pure/es/array/virtual/reverse.js"),o=Array.prototype;e.exports=function(e){var t=e.reverse;return e===o||e instanceof Array&&t===o.reverse?n:t}},"./node_modules/core-js-pure/es/instance/slice.js":function(e,t,r){var n=r("./node_modules/core-js-pure/es/array/virtual/slice.js"),o=Array.prototype;e.exports=function(e){var t=e.slice;return e===o||e instanceof Array&&t===o.slice?n:t}},"./node_modules/core-js-pure/es/instance/some.js":function(e,t,r){var n=r("./node_modules/core-js-pure/es/array/virtual/some.js"),o=Array.prototype;e.exports=function(e){var t=e.some;return e===o||e instanceof Array&&t===o.some?n:t}},"./node_modules/core-js-pure/es/instance/starts-with.js":function(e,t,r){var n=r("./node_modules/core-js-pure/es/string/virtual/starts-with.js"),o=String.prototype;e.exports=function(e){var t=e.startsWith;return"string"==typeof e||e===o||e instanceof String&&t===o.startsWith?n:t}},"./node_modules/core-js-pure/es/instance/trim.js":function(e,t,r){var n=r("./node_modules/core-js-pure/es/string/virtual/trim.js"),o=String.prototype;e.exports=function(e){var t=e.trim;return"string"==typeof e||e===o||e instanceof String&&t===o.trim?n:t}},"./node_modules/core-js-pure/es/map/index.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.map.js"),r("./node_modules/core-js-pure/modules/es.object.to-string.js"),r("./node_modules/core-js-pure/modules/es.string.iterator.js"),r("./node_modules/core-js-pure/modules/web.dom-collections.iterator.js");var n=r("./node_modules/core-js-pure/internals/path.js");e.exports=n.Map},"./node_modules/core-js-pure/es/object/create.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.object.create.js");var n=r("./node_modules/core-js-pure/internals/path.js").Object;e.exports=function(e,t){return n.create(e,t)}},"./node_modules/core-js-pure/es/object/define-properties.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.object.define-properties.js");var n=r("./node_modules/core-js-pure/internals/path.js").Object,o=e.exports=function(e,t){return n.defineProperties(e,t)};n.defineProperties.sham&&(o.sham=!0)},"./node_modules/core-js-pure/es/object/define-property.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.object.define-property.js");var n=r("./node_modules/core-js-pure/internals/path.js").Object,o=e.exports=function(e,t,r){return n.defineProperty(e,t,r)};n.defineProperty.sham&&(o.sham=!0)},"./node_modules/core-js-pure/es/object/get-own-property-descriptor.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.object.get-own-property-descriptor.js");var n=r("./node_modules/core-js-pure/internals/path.js").Object,o=e.exports=function(e,t){return n.getOwnPropertyDescriptor(e,t)};n.getOwnPropertyDescriptor.sham&&(o.sham=!0)},"./node_modules/core-js-pure/es/object/get-own-property-descriptors.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.object.get-own-property-descriptors.js");var n=r("./node_modules/core-js-pure/internals/path.js");e.exports=n.Object.getOwnPropertyDescriptors},"./node_modules/core-js-pure/es/object/get-own-property-symbols.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.symbol.js");var n=r("./node_modules/core-js-pure/internals/path.js");e.exports=n.Object.getOwnPropertySymbols},"./node_modules/core-js-pure/es/object/get-prototype-of.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.object.get-prototype-of.js");var n=r("./node_modules/core-js-pure/internals/path.js");e.exports=n.Object.getPrototypeOf},"./node_modules/core-js-pure/es/object/keys.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.object.keys.js");var n=r("./node_modules/core-js-pure/internals/path.js");e.exports=n.Object.keys},"./node_modules/core-js-pure/es/object/set-prototype-of.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.object.set-prototype-of.js");var n=r("./node_modules/core-js-pure/internals/path.js");e.exports=n.Object.setPrototypeOf},"./node_modules/core-js-pure/es/parse-float.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.parse-float.js");var n=r("./node_modules/core-js-pure/internals/path.js");e.exports=n.parseFloat},"./node_modules/core-js-pure/es/parse-int.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.parse-int.js");var n=r("./node_modules/core-js-pure/internals/path.js");e.exports=n.parseInt},"./node_modules/core-js-pure/es/promise/index.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.aggregate-error.js"),r("./node_modules/core-js-pure/modules/es.object.to-string.js"),r("./node_modules/core-js-pure/modules/es.promise.js"),r("./node_modules/core-js-pure/modules/es.promise.all-settled.js"),r("./node_modules/core-js-pure/modules/es.promise.any.js"),r("./node_modules/core-js-pure/modules/es.promise.finally.js"),r("./node_modules/core-js-pure/modules/es.string.iterator.js"),r("./node_modules/core-js-pure/modules/web.dom-collections.iterator.js");var n=r("./node_modules/core-js-pure/internals/path.js");e.exports=n.Promise},"./node_modules/core-js-pure/es/reflect/apply.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.reflect.apply.js");var n=r("./node_modules/core-js-pure/internals/path.js");e.exports=n.Reflect.apply},"./node_modules/core-js-pure/es/reflect/construct.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.reflect.construct.js");var n=r("./node_modules/core-js-pure/internals/path.js");e.exports=n.Reflect.construct},"./node_modules/core-js-pure/es/reflect/delete-property.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.reflect.delete-property.js");var n=r("./node_modules/core-js-pure/internals/path.js");e.exports=n.Reflect.deleteProperty},"./node_modules/core-js-pure/es/reflect/get-prototype-of.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.reflect.get-prototype-of.js");var n=r("./node_modules/core-js-pure/internals/path.js");e.exports=n.Reflect.getPrototypeOf},"./node_modules/core-js-pure/es/reflect/get.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.reflect.get.js");var n=r("./node_modules/core-js-pure/internals/path.js");e.exports=n.Reflect.get},"./node_modules/core-js-pure/es/string/virtual/includes.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.string.includes.js");var n=r("./node_modules/core-js-pure/internals/entry-virtual.js");e.exports=n("String").includes},"./node_modules/core-js-pure/es/string/virtual/starts-with.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.string.starts-with.js");var n=r("./node_modules/core-js-pure/internals/entry-virtual.js");e.exports=n("String").startsWith},"./node_modules/core-js-pure/es/string/virtual/trim.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.string.trim.js");var n=r("./node_modules/core-js-pure/internals/entry-virtual.js");e.exports=n("String").trim},"./node_modules/core-js-pure/es/symbol/index.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.array.concat.js"),r("./node_modules/core-js-pure/modules/es.object.to-string.js"),r("./node_modules/core-js-pure/modules/es.symbol.js"),r("./node_modules/core-js-pure/modules/es.symbol.async-iterator.js"),r("./node_modules/core-js-pure/modules/es.symbol.description.js"),r("./node_modules/core-js-pure/modules/es.symbol.has-instance.js"),r("./node_modules/core-js-pure/modules/es.symbol.is-concat-spreadable.js"),r("./node_modules/core-js-pure/modules/es.symbol.iterator.js"),r("./node_modules/core-js-pure/modules/es.symbol.match.js"),r("./node_modules/core-js-pure/modules/es.symbol.match-all.js"),r("./node_modules/core-js-pure/modules/es.symbol.replace.js"),r("./node_modules/core-js-pure/modules/es.symbol.search.js"),r("./node_modules/core-js-pure/modules/es.symbol.species.js"),r("./node_modules/core-js-pure/modules/es.symbol.split.js"),r("./node_modules/core-js-pure/modules/es.symbol.to-primitive.js"),r("./node_modules/core-js-pure/modules/es.symbol.to-string-tag.js"),r("./node_modules/core-js-pure/modules/es.symbol.unscopables.js"),r("./node_modules/core-js-pure/modules/es.json.to-string-tag.js"),r("./node_modules/core-js-pure/modules/es.math.to-string-tag.js"),r("./node_modules/core-js-pure/modules/es.reflect.to-string-tag.js");var n=r("./node_modules/core-js-pure/internals/path.js");e.exports=n.Symbol},"./node_modules/core-js-pure/es/symbol/iterator.js":function(e,t,r){r("./node_modules/core-js-pure/modules/es.symbol.iterator.js"),r("./node_modules/core-js-pure/modules/es.string.iterator.js"),r("./node_modules/core-js-pure/modules/web.dom-collections.iterator.js");var n=r("./node_modules/core-js-pure/internals/well-known-symbol-wrapped.js");e.exports=n.f("iterator")},"./node_modules/core-js-pure/features/array/from.js":function(e,t,r){var n=r("./node_modules/core-js-pure/es/array/from.js");e.exports=n},"./node_modules/core-js-pure/features/array/is-array.js":function(e,t,r){var n=r("./node_modules/core-js-pure/es/array/is-array.js");e.exports=n},"./node_modules/core-js-pure/features/get-iterator-method.js":function(e,t,r){r("./node_modules/core-js-pure/modules/web.dom-collections.iterator.js"),r("./node_modules/core-js-pure/modules/es.string.iterator.js");var n=r("./node_modules/core-js-pure/internals/get-iterator-method.js");e.exports=n},"./node_modules/core-js-pure/features/get-iterator.js":function(e,t,r){r("./node_modules/core-js-pure/modules/web.dom-collections.iterator.js"),r("./node_modules/core-js-pure/modules/es.string.iterator.js");var n=r("./node_modules/core-js-pure/internals/get-iterator.js");e.exports=n},"./node_modules/core-js-pure/features/instance/slice.js":function(e,t,r){var n=r("./node_modules/core-js-pure/es/instance/slice.js");e.exports=n},"./node_modules/core-js-pure/features/object/create.js":function(e,t,r){var n=r("./node_modules/core-js-pure/es/object/create.js");e.exports=n},"./node_modules/core-js-pure/features/object/define-property.js":function(e,t,r){var n=r("./node_modules/core-js-pure/es/object/define-property.js");e.exports=n},"./node_modules/core-js-pure/features/object/get-own-property-descriptor.js":function(e,t,r){var n=r("./node_modules/core-js-pure/es/object/get-own-property-descriptor.js");e.exports=n},"./node_modules/core-js-pure/features/object/get-prototype-of.js":function(e,t,r){var n=r("./node_modules/core-js-pure/es/object/get-prototype-of.js");e.exports=n},"./node_modules/core-js-pure/features/object/set-prototype-of.js":function(e,t,r){var n=r("./node_modules/core-js-pure/es/object/set-prototype-of.js");e.exports=n},"./node_modules/core-js-pure/features/promise/index.js":function(e,t,r){var n=r("./node_modules/core-js-pure/es/promise/index.js");r("./node_modules/core-js-pure/modules/esnext.aggregate-error.js"),r("./node_modules/core-js-pure/modules/esnext.promise.all-settled.js"),r("./node_modules/core-js-pure/modules/esnext.promise.try.js"),r("./node_modules/core-js-pure/modules/esnext.promise.any.js"),e.exports=n},"./node_modules/core-js-pure/features/reflect/get.js":function(e,t,r){var n=r("./node_modules/core-js-pure/es/reflect/get.js");e.exports=n},"./node_modules/core-js-pure/features/symbol/index.js":function(e,t,r){var n=r("./node_modules/core-js-pure/es/symbol/index.js");r("./node_modules/core-js-pure/modules/esnext.symbol.async-dispose.js"),r("./node_modules/core-js-pure/modules/esnext.symbol.dispose.js"),r("./node_modules/core-js-pure/modules/esnext.symbol.matcher.js"),r("./node_modules/core-js-pure/modules/esnext.symbol.metadata.js"),r("./node_modules/core-js-pure/modules/esnext.symbol.observable.js"),r("./node_modules/core-js-pure/modules/esnext.symbol.pattern-match.js"),r("./node_modules/core-js-pure/modules/esnext.symbol.replace-all.js"),e.exports=n},"./node_modules/core-js-pure/features/symbol/iterator.js":function(e,t,r){var n=r("./node_modules/core-js-pure/es/symbol/iterator.js");e.exports=n},"./node_modules/core-js-pure/internals/a-function.js":function(e){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},"./node_modules/core-js-pure/internals/a-possible-prototype.js":function(e,t,r){var n=r("./node_modules/core-js-pure/internals/is-object.js");e.exports=function(e){if(!n(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},"./node_modules/core-js-pure/internals/add-to-unscopables.js":function(e){e.exports=function(){}},"./node_modules/core-js-pure/internals/an-instance.js":function(e){e.exports=function(e,t,r){if(!(e instanceof t))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return e}},"./node_modules/core-js-pure/internals/an-object.js":function(e,t,r){var n=r("./node_modules/core-js-pure/internals/is-object.js");e.exports=function(e){if(!n(e))throw TypeError(String(e)+" is not an object");return e}},"./node_modules/core-js-pure/internals/array-fill.js":function(e,t,r){"use strict";var n=r("./node_modules/core-js-pure/internals/to-object.js"),o=r("./node_modules/core-js-pure/internals/to-absolute-index.js"),s=r("./node_modules/core-js-pure/internals/to-length.js");e.exports=function(e){for(var t=n(this),r=s(t.length),i=arguments.length,a=o(i>1?arguments[1]:void 0,r),A=i>2?arguments[2]:void 0,u=void 0===A?r:o(A,r);u>a;)t[a++]=e;return t}},"./node_modules/core-js-pure/internals/array-for-each.js":function(e,t,r){"use strict";var n=r("./node_modules/core-js-pure/internals/array-iteration.js").forEach,o=r("./node_modules/core-js-pure/internals/array-method-is-strict.js")("forEach");e.exports=o?[].forEach:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}},"./node_modules/core-js-pure/internals/array-from.js":function(e,t,r){"use strict";var n=r("./node_modules/core-js-pure/internals/function-bind-context.js"),o=r("./node_modules/core-js-pure/internals/to-object.js"),s=r("./node_modules/core-js-pure/internals/call-with-safe-iteration-closing.js"),i=r("./node_modules/core-js-pure/internals/is-array-iterator-method.js"),a=r("./node_modules/core-js-pure/internals/to-length.js"),A=r("./node_modules/core-js-pure/internals/create-property.js"),u=r("./node_modules/core-js-pure/internals/get-iterator-method.js");e.exports=function(e){var t,r,c,l,d,f,h=o(e),p="function"==typeof this?this:Array,m=arguments.length,g=m>1?arguments[1]:void 0,y=void 0!==g,v=u(h),w=0;if(y&&(g=n(g,m>2?arguments[2]:void 0,2)),null==v||p==Array&&i(v))for(r=new p(t=a(h.length));t>w;w++)f=y?g(h[w],w):h[w],A(r,w,f);else for(d=(l=v.call(h)).next,r=new p;!(c=d.call(l)).done;w++)f=y?s(l,g,[c.value,w],!0):c.value,A(r,w,f);return r.length=w,r}},"./node_modules/core-js-pure/internals/array-includes.js":function(e,t,r){var n=r("./node_modules/core-js-pure/internals/to-indexed-object.js"),o=r("./node_modules/core-js-pure/internals/to-length.js"),s=r("./node_modules/core-js-pure/internals/to-absolute-index.js"),i=function(e){return function(t,r,i){var a,A=n(t),u=o(A.length),c=s(i,u);if(e&&r!=r){for(;u>c;)if((a=A[c++])!=a)return!0}else for(;u>c;c++)if((e||c in A)&&A[c]===r)return e||c||0;return!e&&-1}};e.exports={includes:i(!0),indexOf:i(!1)}},"./node_modules/core-js-pure/internals/array-iteration.js":function(e,t,r){var n=r("./node_modules/core-js-pure/internals/function-bind-context.js"),o=r("./node_modules/core-js-pure/internals/indexed-object.js"),s=r("./node_modules/core-js-pure/internals/to-object.js"),i=r("./node_modules/core-js-pure/internals/to-length.js"),a=r("./node_modules/core-js-pure/internals/array-species-create.js"),A=[].push,u=function(e){var t=1==e,r=2==e,u=3==e,c=4==e,l=6==e,d=7==e,f=5==e||l;return function(h,p,m,g){for(var y,v,w=s(h),b=o(w),B=n(p,m,3),j=i(b.length),_=0,x=g||a,C=t?x(h,j):r||d?x(h,0):void 0;j>_;_++)if((f||_ in b)&&(v=B(y=b[_],_,w),e))if(t)C[_]=v;else if(v)switch(e){case 3:return!0;case 5:return y;case 6:return _;case 2:A.call(C,y)}else switch(e){case 4:return!1;case 7:A.call(C,y)}return l?-1:u||c?c:C}};e.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterOut:u(7)}},"./node_modules/core-js-pure/internals/array-method-has-species-support.js":function(e,t,r){var n=r("./node_modules/core-js-pure/internals/fails.js"),o=r("./node_modules/core-js-pure/internals/well-known-symbol.js"),s=r("./node_modules/core-js-pure/internals/engine-v8-version.js"),i=o("species");e.exports=function(e){return s>=51||!n((function(){var t=[];return(t.constructor={})[i]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},"./node_modules/core-js-pure/internals/array-method-is-strict.js":function(e,t,r){"use strict";var n=r("./node_modules/core-js-pure/internals/fails.js");e.exports=function(e,t){var r=[][e];return!!r&&n((function(){r.call(null,t||function(){throw 1},1)}))}},"./node_modules/core-js-pure/internals/array-reduce.js":function(e,t,r){var n=r("./node_modules/core-js-pure/internals/a-function.js"),o=r("./node_modules/core-js-pure/internals/to-object.js"),s=r("./node_modules/core-js-pure/internals/indexed-object.js"),i=r("./node_modules/core-js-pure/internals/to-length.js"),a=function(e){return function(t,r,a,A){n(r);var u=o(t),c=s(u),l=i(u.length),d=e?l-1:0,f=e?-1:1;if(a<2)for(;;){if(d in c){A=c[d],d+=f;break}if(d+=f,e?d<0:l<=d)throw TypeError("Reduce of empty array with no initial value")}for(;e?d>=0:l>d;d+=f)d in c&&(A=r(A,c[d],d,u));return A}};e.exports={left:a(!1),right:a(!0)}},"./node_modules/core-js-pure/internals/array-species-create.js":function(e,t,r){var n=r("./node_modules/core-js-pure/internals/is-object.js"),o=r("./node_modules/core-js-pure/internals/is-array.js"),s=r("./node_modules/core-js-pure/internals/well-known-symbol.js")("species");e.exports=function(e,t){var r;return o(e)&&("function"!=typeof(r=e.constructor)||r!==Array&&!o(r.prototype)?n(r)&&null===(r=r[s])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===t?0:t)}},"./node_modules/core-js-pure/internals/call-with-safe-iteration-closing.js":function(e,t,r){var n=r("./node_modules/core-js-pure/internals/an-object.js"),o=r("./node_modules/core-js-pure/internals/iterator-close.js");e.exports=function(e,t,r,s){try{return s?t(n(r)[0],r[1]):t(r)}catch(t){throw o(e),t}}},"./node_modules/core-js-pure/internals/check-correctness-of-iteration.js":function(e,t,r){var n=r("./node_modules/core-js-pure/internals/well-known-symbol.js")("iterator"),o=!1;try{var s=0,i={next:function(){return{done:!!s++}},return:function(){o=!0}};i[n]=function(){return this},Array.from(i,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var r=!1;try{var s={};s[n]=function(){return{next:function(){return{done:r=!0}}}},e(s)}catch(e){}return r}},"./node_modules/core-js-pure/internals/classof-raw.js":function(e){var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},"./node_modules/core-js-pure/internals/classof.js":function(e,t,r){var n=r("./node_modules/core-js-pure/internals/to-string-tag-support.js"),o=r("./node_modules/core-js-pure/internals/classof-raw.js"),s=r("./node_modules/core-js-pure/internals/well-known-symbol.js")("toStringTag"),i="Arguments"==o(function(){return arguments}());e.exports=n?o:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),s))?r:i?o(t):"Object"==(n=o(t))&&"function"==typeof t.callee?"Arguments":n}},"./node_modules/core-js-pure/internals/collection-strong.js":function(e,t,r){"use strict";var n=r("./node_modules/core-js-pure/internals/object-define-property.js").f,o=r("./node_modules/core-js-pure/internals/object-create.js"),s=r("./node_modules/core-js-pure/internals/redefine-all.js"),i=r("./node_modules/core-js-pure/internals/function-bind-context.js"),a=r("./node_modules/core-js-pure/internals/an-instance.js"),A=r("./node_modules/core-js-pure/internals/iterate.js"),u=r("./node_modules/core-js-pure/internals/define-iterator.js"),c=r("./node_modules/core-js-pure/internals/set-species.js"),l=r("./node_modules/core-js-pure/internals/descriptors.js"),d=r("./node_modules/core-js-pure/internals/internal-metadata.js").fastKey,f=r("./node_modules/core-js-pure/internals/internal-state.js"),h=f.set,p=f.getterFor;e.exports={getConstructor:function(e,t,r,u){var c=e((function(e,n){a(e,c,t),h(e,{type:t,index:o(null),first:void 0,last:void 0,size:0}),l||(e.size=0),null!=n&&A(n,e[u],{that:e,AS_ENTRIES:r})})),f=p(t),m=function(e,t,r){var n,o,s=f(e),i=g(e,t);return i?i.value=r:(s.last=i={index:o=d(t,!0),key:t,value:r,previous:n=s.last,next:void 0,removed:!1},s.first||(s.first=i),n&&(n.next=i),l?s.size++:e.size++,"F"!==o&&(s.index[o]=i)),e},g=function(e,t){var r,n=f(e),o=d(t);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key==t)return r};return s(c.prototype,{clear:function(){for(var e=f(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,l?e.size=0:this.size=0},delete:function(e){var t=this,r=f(t),n=g(t,e);if(n){var o=n.next,s=n.previous;delete r.index[n.index],n.removed=!0,s&&(s.next=o),o&&(o.previous=s),r.first==n&&(r.first=o),r.last==n&&(r.last=s),l?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=f(this),n=i(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!g(this,e)}}),s(c.prototype,r?{get:function(e){var t=g(this,e);return t&&t.value},set:function(e,t){return m(this,0===e?0:e,t)}}:{add:function(e){return m(this,e=0===e?0:e,e)}}),l&&n(c.prototype,"size",{get:function(){return f(this).size}}),c},setStrong:function(e,t,r){var n=t+" Iterator",o=p(t),s=p(n);u(e,t,(function(e,t){h(this,{type:n,target:e,state:o(e),kind:t,last:void 0})}),(function(){for(var e=s(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?"keys"==t?{value:r.key,done:!1}:"values"==t?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),c(t)}}},"./node_modules/core-js-pure/internals/collection.js":function(e,t,r){"use strict";var n=r("./node_modules/core-js-pure/internals/export.js"),o=r("./node_modules/core-js-pure/internals/global.js"),s=r("./node_modules/core-js-pure/internals/internal-metadata.js"),i=r("./node_modules/core-js-pure/internals/fails.js"),a=r("./node_modules/core-js-pure/internals/create-non-enumerable-property.js"),A=r("./node_modules/core-js-pure/internals/iterate.js"),u=r("./node_modules/core-js-pure/internals/an-instance.js"),c=r("./node_modules/core-js-pure/internals/is-object.js"),l=r("./node_modules/core-js-pure/internals/set-to-string-tag.js"),d=r("./node_modules/core-js-pure/internals/object-define-property.js").f,f=r("./node_modules/core-js-pure/internals/array-iteration.js").forEach,h=r("./node_modules/core-js-pure/internals/descriptors.js"),p=r("./node_modules/core-js-pure/internals/internal-state.js"),m=p.set,g=p.getterFor;e.exports=function(e,t,r){var p,y=-1!==e.indexOf("Map"),v=-1!==e.indexOf("Weak"),w=y?"set":"add",b=o[e],B=b&&b.prototype,j={};if(h&&"function"==typeof b&&(v||B.forEach&&!i((function(){(new b).entries().next()})))){p=t((function(t,r){m(u(t,p,e),{type:e,collection:new b}),null!=r&&A(r,t[w],{that:t,AS_ENTRIES:y})}));var _=g(e);f(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in B)||v&&"clear"==e||a(p.prototype,e,(function(r,n){var o=_(this).collection;if(!t&&v&&!c(r))return"get"==e&&void 0;var s=o[e](0===r?0:r,n);return t?this:s}))})),v||d(p.prototype,"size",{configurable:!0,get:function(){return _(this).collection.size}})}else p=r.getConstructor(t,e,y,w),s.REQUIRED=!0;return l(p,e,!1,!0),j[e]=p,n({global:!0,forced:!0},j),v||r.setStrong(p,e,y),p}},"./node_modules/core-js-pure/internals/correct-is-regexp-logic.js":function(e,t,r){var n=r("./node_modules/core-js-pure/internals/well-known-symbol.js")("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[n]=!1,"/./"[e](t)}catch(e){}}return!1}},"./node_modules/core-js-pure/internals/correct-prototype-getter.js":function(e,t,r){var n=r("./node_modules/core-js-pure/internals/fails.js");e.exports=!n((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},"./node_modules/core-js-pure/internals/create-iterator-constructor.js":function(e,t,r){"use strict";var n=r("./node_modules/core-js-pure/internals/iterators-core.js").IteratorPrototype,o=r("./node_modules/core-js-pure/internals/object-create.js"),s=r("./node_modules/core-js-pure/internals/create-property-descriptor.js"),i=r("./node_modules/core-js-pure/internals/set-to-string-tag.js"),a=r("./node_modules/core-js-pure/internals/iterators.js"),A=function(){return this};e.exports=function(e,t,r){var u=t+" Iterator";return e.prototype=o(n,{next:s(1,r)}),i(e,u,!1,!0),a[u]=A,e}},"./node_modules/core-js-pure/internals/create-non-enumerable-property.js":function(e,t,r){var n=r("./node_modules/core-js-pure/internals/descriptors.js"),o=r("./node_modules/core-js-pure/internals/object-define-property.js"),s=r("./node_modules/core-js-pure/internals/create-property-descriptor.js");e.exports=n?function(e,t,r){return o.f(e,t,s(1,r))}:function(e,t,r){return e[t]=r,e}},"./node_modules/core-js-pure/internals/create-property-descriptor.js":function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"./node_modules/core-js-pure/internals/create-property.js":function(e,t,r){"use strict";var n=r("./node_modules/core-js-pure/internals/to-primitive.js"),o=r("./node_modules/core-js-pure/internals/object-define-property.js"),s=r("./node_modules/core-js-pure/internals/create-property-descriptor.js");e.exports=function(e,t,r){var i=n(t);i in e?o.f(e,i,s(0,r)):e[i]=r}},"./node_modules/core-js-pure/internals/define-iterator.js":function(e,t,r){"use strict";var n=r("./node_modules/core-js-pure/internals/export.js"),o=r("./node_modules/core-js-pure/internals/create-iterator-constructor.js"),s=r("./node_modules/core-js-pure/internals/object-get-prototype-of.js"),i=r("./node_modules/core-js-pure/internals/object-set-prototype-of.js"),a=r("./node_modules/core-js-pure/internals/set-to-string-tag.js"),A=r("./node_modules/core-js-pure/internals/create-non-enumerable-property.js"),u=r("./node_modules/core-js-pure/internals/redefine.js"),c=r("./node_modules/core-js-pure/internals/well-known-symbol.js"),l=r("./node_modules/core-js-pure/internals/is-pure.js"),d=r("./node_modules/core-js-pure/internals/iterators.js"),f=r("./node_modules/core-js-pure/internals/iterators-core.js"),h=f.IteratorPrototype,p=f.BUGGY_SAFARI_ITERATORS,m=c("iterator"),g="keys",y="values",v="entries",w=function(){return this};e.exports=function(e,t,r,c,f,b,B){o(r,t,c);var j,_,x,C=function(e){if(e===f&&U)return U;if(!p&&e in Q)return Q[e];switch(e){case g:case y:case v:return function(){return new r(this,e)}}return function(){return new r(this)}},E=t+" Iterator",N=!1,Q=e.prototype,F=Q[m]||Q["@@iterator"]||f&&Q[f],U=!p&&F||C(f),S="Array"==t&&Q.entries||F;if(S&&(j=s(S.call(new e)),h!==Object.prototype&&j.next&&(l||s(j)===h||(i?i(j,h):"function"!=typeof j[m]&&A(j,m,w)),a(j,E,!0,!0),l&&(d[E]=w))),f==y&&F&&F.name!==y&&(N=!0,U=function(){return F.call(this)}),l&&!B||Q[m]===U||A(Q,m,U),d[t]=U,f)if(_={values:C(y),keys:b?U:C(g),entries:C(v)},B)for(x in _)(p||N||!(x in Q))&&u(Q,x,_[x]);else n({target:t,proto:!0,forced:p||N},_);return _}},"./node_modules/core-js-pure/internals/define-well-known-symbol.js":function(e,t,r){var n=r("./node_modules/core-js-pure/internals/path.js"),o=r("./node_modules/core-js-pure/internals/has.js"),s=r("./node_modules/core-js-pure/internals/well-known-symbol-wrapped.js"),i=r("./node_modules/core-js-pure/internals/object-define-property.js").f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});o(t,e)||i(t,e,{value:s.f(e)})}},"./node_modules/core-js-pure/internals/descriptors.js":function(e,t,r){var n=r("./node_modules/core-js-pure/internals/fails.js");e.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"./node_modules/core-js-pure/internals/document-create-element.js":function(e,t,r){var n=r("./node_modules/core-js-pure/internals/global.js"),o=r("./node_modules/core-js-pure/internals/is-object.js"),s=n.document,i=o(s)&&o(s.createElement);e.exports=function(e){return i?s.createElement(e):{}}},"./node_modules/core-js-pure/internals/dom-iterables.js":function(e){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},"./node_modules/core-js-pure/internals/engine-is-browser.js":function(e){e.exports="object"==typeof window},"./node_modules/core-js-pure/internals/engine-is-ios.js":function(e,t,r){var n=r("./node_modules/core-js-pure/internals/engine-user-agent.js");e.exports=/(?:iphone|ipod|ipad).*applewebkit/i.test(n)},"./node_modules/core-js-pure/internals/engine-is-node.js":function(e,t,r){var n=r("./node_modules/core-js-pure/internals/classof-raw.js"),o=r("./node_modules/core-js-pure/internals/global.js");e.exports="process"==n(o.process)},"./node_modules/core-js-pure/internals/engine-is-webos-webkit.js":function(e,t,r){var n=r("./node_modules/core-js-pure/internals/engine-user-agent.js");e.exports=/web0s(?!.*chrome)/i.test(n)},"./node_modules/core-js-pure/internals/engine-user-agent.js":function(e,t,r){var n=r("./node_modules/core-js-pure/internals/get-built-in.js");e.exports=n("navigator","userAgent")||""},"./node_modules/core-js-pure/internals/engine-v8-version.js":function(e,t,r){var n,o,s=r("./node_modules/core-js-pure/internals/global.js"),i=r("./node_modules/core-js-pure/internals/engine-user-agent.js"),a=s.process,A=a&&a.versions,u=A&&A.v8;u?o=(n=u.split("."))[0]<4?1:n[0]+n[1]:i&&(!(n=i.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=i.match(/Chrome\/(\d+)/))&&(o=n[1]),e.exports=o&&+o},"./node_modules/core-js-pure/internals/entry-virtual.js":function(e,t,r){var n=r("./node_modules/core-js-pure/internals/path.js");e.exports=function(e){return n[e+"Prototype"]}},"./node_modules/core-js-pure/internals/enum-bug-keys.js":function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"./node_modules/core-js-pure/internals/export.js":function(e,t,r){"use strict";var n=r("./node_modules/core-js-pure/internals/global.js"),o=r("./node_modules/core-js-pure/internals/object-get-own-property-descriptor.js").f,s=r("./node_modules/core-js-pure/internals/is-forced.js"),i=r("./node_modules/core-js-pure/internals/path.js"),a=r("./node_modules/core-js-pure/internals/function-bind-context.js"),A=r("./node_modules/core-js-pure/internals/create-non-enumerable-property.js"),u=r("./node_modules/core-js-pure/internals/has.js"),c=function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var r,l,d,f,h,p,m,g,y=e.target,v=e.global,w=e.stat,b=e.proto,B=v?n:w?n[y]:(n[y]||{}).prototype,j=v?i:i[y]||(i[y]={}),_=j.prototype;for(d in t)r=!s(v?d:y+(w?".":"#")+d,e.forced)&&B&&u(B,d),h=j[d],r&&(p=e.noTargetGet?(g=o(B,d))&&g.value:B[d]),f=r&&p?p:t[d],r&&typeof h==typeof f||(m=e.bind&&r?a(f,n):e.wrap&&r?c(f):b&&"function"==typeof f?a(Function.call,f):f,(e.sham||f&&f.sham||h&&h.sham)&&A(m,"sham",!0),j[d]=m,b&&(u(i,l=y+"Prototype")||A(i,l,{}),i[l][d]=f,e.real&&_&&!_[d]&&A(_,d,f)))}},"./node_modules/core-js-pure/internals/fails.js":function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},"./node_modules/core-js-pure/internals/freezing.js":function(e,t,r){var n=r("./node_modules/core-js-pure/internals/fails.js");e.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},"./node_modules/core-js-pure/internals/function-bind-context.js":function(e,t,r){var n=r("./node_modules/core-js-pure/internals/a-function.js");e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 0:return function(){return e.call(t)};case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,o){return e.call(t,r,n,o)}}return function(){return e.apply(t,arguments)}}},"./node_modules/core-js-pure/internals/function-bind.js":function(e,t,r){"use strict";var n=r("./node_modules/core-js-pure/internals/a-function.js"),o=r("./node_modules/core-js-pure/internals/is-object.js"),s=[].slice,i={},a=function(e,t,r){if(!(t in i)){for(var n=[],o=0;od;d++)if((h=j(e[d]))&&h instanceof u)return h;return new u(!1)}c=l.call(e)}for(p=c.next;!(m=p.call(c)).done;){try{h=j(m.value)}catch(e){throw A(c),e}if("object"==typeof h&&h&&h instanceof u)return h}return new u(!1)}},"./node_modules/core-js-pure/internals/iterator-close.js":function(e,t,r){var n=r("./node_modules/core-js-pure/internals/an-object.js");e.exports=function(e){var t=e.return;if(void 0!==t)return n(t.call(e)).value}},"./node_modules/core-js-pure/internals/iterators-core.js":function(e,t,r){"use strict";var n,o,s,i=r("./node_modules/core-js-pure/internals/fails.js"),a=r("./node_modules/core-js-pure/internals/object-get-prototype-of.js"),A=r("./node_modules/core-js-pure/internals/create-non-enumerable-property.js"),u=r("./node_modules/core-js-pure/internals/has.js"),c=r("./node_modules/core-js-pure/internals/well-known-symbol.js"),l=r("./node_modules/core-js-pure/internals/is-pure.js"),d=c("iterator"),f=!1;[].keys&&("next"in(s=[].keys())?(o=a(a(s)))!==Object.prototype&&(n=o):f=!0);var h=null==n||i((function(){var e={};return n[d].call(e)!==e}));h&&(n={}),l&&!h||u(n,d)||A(n,d,(function(){return this})),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:f}},"./node_modules/core-js-pure/internals/iterators.js":function(e){e.exports={}},"./node_modules/core-js-pure/internals/microtask.js":function(e,t,r){var n,o,s,i,a,A,u,c,l=r("./node_modules/core-js-pure/internals/global.js"),d=r("./node_modules/core-js-pure/internals/object-get-own-property-descriptor.js").f,f=r("./node_modules/core-js-pure/internals/task.js").set,h=r("./node_modules/core-js-pure/internals/engine-is-ios.js"),p=r("./node_modules/core-js-pure/internals/engine-is-webos-webkit.js"),m=r("./node_modules/core-js-pure/internals/engine-is-node.js"),g=l.MutationObserver||l.WebKitMutationObserver,y=l.document,v=l.process,w=l.Promise,b=d(l,"queueMicrotask"),B=b&&b.value;B||(n=function(){var e,t;for(m&&(e=v.domain)&&e.exit();o;){t=o.fn,o=o.next;try{t()}catch(e){throw o?i():s=void 0,e}}s=void 0,e&&e.enter()},h||m||p||!g||!y?w&&w.resolve?((u=w.resolve(void 0)).constructor=w,c=u.then,i=function(){c.call(u,n)}):i=m?function(){v.nextTick(n)}:function(){f.call(l,n)}:(a=!0,A=y.createTextNode(""),new g(n).observe(A,{characterData:!0}),i=function(){A.data=a=!a})),e.exports=B||function(e){var t={fn:e,next:void 0};s&&(s.next=t),o||(o=t,i()),s=t}},"./node_modules/core-js-pure/internals/native-promise-constructor.js":function(e,t,r){var n=r("./node_modules/core-js-pure/internals/global.js");e.exports=n.Promise},"./node_modules/core-js-pure/internals/native-symbol.js":function(e,t,r){var n=r("./node_modules/core-js-pure/internals/engine-v8-version.js"),o=r("./node_modules/core-js-pure/internals/fails.js");e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},"./node_modules/core-js-pure/internals/native-weak-map.js":function(e,t,r){var n=r("./node_modules/core-js-pure/internals/global.js"),o=r("./node_modules/core-js-pure/internals/inspect-source.js"),s=n.WeakMap;e.exports="function"==typeof s&&/native code/.test(o(s))},"./node_modules/core-js-pure/internals/new-promise-capability.js":function(e,t,r){"use strict";var n=r("./node_modules/core-js-pure/internals/a-function.js"),o=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n})),this.resolve=n(t),this.reject=n(r)};e.exports.f=function(e){return new o(e)}},"./node_modules/core-js-pure/internals/not-a-regexp.js":function(e,t,r){var n=r("./node_modules/core-js-pure/internals/is-regexp.js");e.exports=function(e){if(n(e))throw TypeError("The method doesn't accept regular expressions");return e}},"./node_modules/core-js-pure/internals/number-parse-float.js":function(e,t,r){var n=r("./node_modules/core-js-pure/internals/global.js"),o=r("./node_modules/core-js-pure/internals/string-trim.js").trim,s=r("./node_modules/core-js-pure/internals/whitespaces.js"),i=n.parseFloat,a=1/i(s+"-0")!=-1/0;e.exports=a?function(e){var t=o(String(e)),r=i(t);return 0===r&&"-"==t.charAt(0)?-0:r}:i},"./node_modules/core-js-pure/internals/number-parse-int.js":function(e,t,r){var n=r("./node_modules/core-js-pure/internals/global.js"),o=r("./node_modules/core-js-pure/internals/string-trim.js").trim,s=r("./node_modules/core-js-pure/internals/whitespaces.js"),i=n.parseInt,a=/^[+-]?0[Xx]/,A=8!==i(s+"08")||22!==i(s+"0x16");e.exports=A?function(e,t){var r=o(String(e));return i(r,t>>>0||(a.test(r)?16:10))}:i},"./node_modules/core-js-pure/internals/object-create.js":function(e,t,r){var n,o=r("./node_modules/core-js-pure/internals/an-object.js"),s=r("./node_modules/core-js-pure/internals/object-define-properties.js"),i=r("./node_modules/core-js-pure/internals/enum-bug-keys.js"),a=r("./node_modules/core-js-pure/internals/hidden-keys.js"),A=r("./node_modules/core-js-pure/internals/html.js"),u=r("./node_modules/core-js-pure/internals/document-create-element.js"),c=r("./node_modules/core-js-pure/internals/shared-key.js")("IE_PROTO"),l=function(){},d=function(e){return"