From e06411a6ae6c2382db7c719745c992095a70ce4a Mon Sep 17 00:00:00 2001 From: kervin <101122530+userkace@users.noreply.github.com> Date: Mon, 28 Oct 2024 16:25:31 +0800 Subject: [PATCH] Update 4.7.0 --- .bkp/CODE_OF_CONDUCT.md | 128 + .bkp/README.md | 19 + .bkp/SECURITY.md | 10 + .dockerignore | 6 + .editorconfig | 7 + .eslintrc.cjs | 108 + .gitattributes | 1 + .github/CODEOWNERS | 2 + .github/CONTRIBUTING.md | 91 + .github/ISSUE_TEMPLATE/bug-report.yml | 50 + .github/ISSUE_TEMPLATE/feature-request.yml | 26 + .github/README.md | 19 + .github/Sudo-Flix.png | Bin 0 -> 14535 bytes .github/pull_request_template.md | 6 + .github/workflows/deploying.yml | 181 + .github/workflows/linting_testing.yml | 73 + .gitignore | 32 +- .npmrc | 1 + .vscode/extensions.json | 6 + .vscode/settings.json | 11 + Dockerfile | 52 + README.md | 48 +- assets/DeveloperPage--1rV1y1n.js | 2 - assets/DeveloperPage--1rV1y1n.js.map | 1 - assets/Icons-7LetCtYR.css | 1 - assets/Icons-Ct84pi7p.js | 255 - assets/Icons-Ct84pi7p.js.map | 1 - assets/PlayerView-CHau_TOb.js | 9 - assets/PlayerView-CHau_TOb.js.map | 1 - assets/Settings-CEKoIO_M.js | 2043 -- assets/Settings-CEKoIO_M.js.map | 1 - assets/StatusCircle-D7h8AcdR.js | 2 - assets/StatusCircle-D7h8AcdR.js.map | 1 - assets/TestView-C1rlAP4k.js | 2 - assets/TestView-C1rlAP4k.js.map | 1 - assets/ad-BOo-tPI4.svg | 150 - assets/ad-CDtWnnSA.svg | 148 - assets/af-BReSbsTq.svg | 81 - assets/af-Cc32fsDB.svg | 81 - assets/arab-DwNob5Qo.svg | 109 - assets/arab-PzQTPYwO.svg | 109 - assets/as-D2gsNMrP.svg | 72 - assets/as-_t1IQUdv.svg | 73 - assets/auth-72H9TcpW.js | 12212 -------- assets/auth-72H9TcpW.js.map | 1 - assets/aw-CLCX8uk5.svg | 186 - assets/aw-W0PWLK5p.svg | 186 - assets/bm-BoWRAtUx.svg | 97 - assets/bm-CyW69jd8.svg | 97 - assets/bn-BDKbSv-u.svg | 36 - assets/bn-CEevvwJS.svg | 36 - assets/bo-BE5mqlGv.svg | 674 - assets/bo-Cvfzpazb.svg | 674 - assets/br-DFzUeaDV.svg | 45 - assets/br-Dbh3w8z9.svg | 45 - assets/bt-Cm0R6rAQ.svg | 89 - assets/bt-Csq9bKsA.svg | 89 - assets/by-EkqhOCLw.svg | 22 - assets/by-oPm0zKcB.svg | 20 - assets/bz-CqiVUvof.svg | 145 - assets/bz-YpwBidLU.svg | 145 - assets/caption-parsing-BABN6jyO.js | 8485 ------ assets/caption-parsing-BABN6jyO.js.map | 1 - assets/cy-Bgo0XIP0.svg | 6 - assets/cy-VQFkW-qk.svg | 6 - assets/dg-B55Nvqqm.svg | 130 - assets/dg-CPWO5scz.svg | 130 - assets/dm-BlhP-6zy.svg | 152 - assets/dm-ClJ_IDld.svg | 152 - assets/do-B91cOUCO.svg | 123 - assets/do-_FYrCblZ.svg | 121 - assets/eac-CZCl_pn7.svg | 48 - assets/eac-D_uIzpYR.svg | 48 - assets/ec-LNhQ9L4k.svg | 138 - assets/ec-sTVr1A3S.svg | 138 - assets/eg-BIzzVp3n.svg | 38 - assets/eg-C1MYAOXe.svg | 38 - assets/es-CYT-Z8U_.svg | 547 - assets/es-DTsPkOCa.svg | 544 - assets/es-ga-BbFllROk.svg | 187 - assets/es-ga-RI_ZudJJ.svg | 187 - assets/fj-B6MkAYsu.svg | 123 - assets/fj-LI4FYNBW.svg | 120 - assets/fk-Be42QBCW.svg | 89 - assets/fk-Ck9cznm4.svg | 90 - assets/gb-nir-BOm9QMOa.svg | 132 - assets/gb-nir-BZUeOVwE.svg | 131 - assets/gb-wls-C4LdH8Nd.svg | 9 - assets/gb-wls-lLp_JivI.svg | 9 - assets/gq-BvOxIUGP.svg | 23 - assets/gq-OBiOttRB.svg | 23 - assets/gs-Di8hLP4g.svg | 133 - assets/gs-YFymFo8z.svg | 132 - assets/gt-CovS1bZs.svg | 204 - assets/gt-Ufdm0MFv.svg | 204 - assets/gu-Bkjkorus.svg | 23 - assets/gu-wFhsTC1Y.svg | 23 - assets/hls-2_Gpnevg.js | 15663 ---------- assets/hls-2_Gpnevg.js.map | 1 - assets/hr-C9VaLqwu.svg | 56 - assets/hr-K104hqQF.svg | 58 - assets/ht-C3TTQpK4.svg | 116 - assets/ht-Dv-spnGk.svg | 116 - assets/im-BAoxVCMv.svg | 36 - assets/im-deD7ny0b.svg | 36 - assets/index-DNeM3t3R.css | 5815 ---- assets/index-DYBNcHgS.js | 12367 -------- assets/index-DYBNcHgS.js.map | 8 - assets/io-Bkx8USW1.svg | 130 - assets/io-BzKkDPkD.svg | 130 - assets/ir-CXFV1BFU.svg | 219 - assets/ir-cCIgaNf6.svg | 219 - assets/je-DavEsnCV.svg | 62 - assets/je-PUw16g1j.svg | 62 - assets/kh-CAffWc0R.svg | 61 - assets/kh-V4Sa3vlt.svg | 61 - assets/ki-CM44VBPm.svg | 36 - assets/ki-COZ8g898.svg | 36 - assets/ky-BqProAqG.svg | 103 - assets/ky-D_l3blFP.svg | 103 - assets/kz-BBCbe9jj.svg | 36 - assets/kz-DBjWpOlG.svg | 36 - assets/language-db-DxKZVAm4.js | 52 - assets/language-db-DxKZVAm4.js.map | 1 - assets/li-DgeenFRc.svg | 43 - assets/li-y6TPS81M.svg | 43 - assets/lk-B2IfFxoh.svg | 22 - assets/lk-DIvkWByA.svg | 22 - assets/locales-BXkJCeK5.js | 21498 -------------- assets/locales-BXkJCeK5.js.map | 1 - assets/md-DArlF80d.svg | 70 - assets/md-DRw6DF0o.svg | 71 - assets/me-B32CQdRA.svg | 116 - assets/me-Btx9w4B_.svg | 118 - assets/mp-DOjKDFJv.svg | 86 - assets/mp-xI88Vk3c.svg | 86 - assets/ms-7tNehsjt.svg | 29 - assets/ms-D--tLJBo.svg | 25 - assets/mt-B9RzfhuG.svg | 50 - assets/mt-Tc-Y-wNN.svg | 49 - assets/mx-BB6Demq1.svg | 377 - assets/mx-Cwlb0I_O.svg | 382 - assets/nf--j2oelto.svg | 11 - assets/nf-COchEj81.svg | 9 - assets/ni-CC3zFI7h.svg | 129 - assets/ni-ChnV2lR-.svg | 129 - assets/om-DnUPbroW.svg | 115 - assets/om-Ri__rIwP.svg | 115 - assets/pf-CEX9Vx76.svg | 18 - assets/pf-CMTHIumB.svg | 19 - assets/pn-DEs-Vj71.svg | 53 - assets/pn-vyD5VXw1.svg | 53 - assets/pt-BLLm3V0o.svg | 57 - assets/pt-BV5okG4O.svg | 57 - assets/py-BfpB8kRi.svg | 157 - assets/py-CRTEf2ay.svg | 156 - assets/react-dom-DpNJ2UNC.js | 11009 ------- assets/react-dom-DpNJ2UNC.js.map | 1 - assets/rs-D31ZZnI-.svg | 296 - assets/rs-DBaCzDQy.svg | 292 - assets/sa-DLf2NaXn.svg | 25 - assets/sa-eH5F7cXy.svg | 25 - assets/sh-ac-6pU0wZVL.svg | 690 - assets/sh-ac-Bxo6e1OQ.svg | 689 - assets/sh-hl-DWwv0HRi.svg | 164 - assets/sh-hl-a930SJst.svg | 164 - assets/sh-ta-BNzkCa6e.svg | 76 - assets/sh-ta-DNDOtP8t.svg | 76 - assets/sm-1NcqoN_z.svg | 75 - assets/sm-DHRSzt4z.svg | 73 - assets/sv-BGK8a8aZ.svg | 594 - assets/sv-n55iiUxg.svg | 594 - assets/sx-DsF4D6De.svg | 56 - assets/sx-DzlMoqh2.svg | 56 - assets/sz-BC3w3Gmj.svg | 34 - assets/sz-DpZ3V1AK.svg | 34 - assets/tc-BB3tFO-G.svg | 50 - assets/tc-CYGgqbY-.svg | 50 - assets/tm-CCv743R_.svg | 205 - assets/tm-MQp6IHsv.svg | 204 - assets/un-BQ1kEGox.svg | 16 - assets/un-ChThV8ch.svg | 16 - assets/va-BntFJQHU.svg | 190 - assets/va-maDzWwNR.svg | 190 - assets/vendor-Dkz3gcSC.js | 23882 ---------------- assets/vendor-Dkz3gcSC.js.map | 1 - assets/vg-DKEU1GdO.svg | 59 - assets/vg-qlt33Cv3.svg | 59 - assets/vi-1FTBesw2.svg | 28 - assets/vi-DatfOFqY.svg | 28 - assets/workbox-window.prod.es5-DFjpnwFp.js | 3 - .../workbox-window.prod.es5-DFjpnwFp.js.map | 1 - assets/xk-B6uU6dIH.svg | 5 - assets/xk-F5dDvX79.svg | 5 - assets/zm-BmHUGSoa.svg | 27 - assets/zm-CNg0kgkw.svg | 27 - assets/zw-DsbN9cxg.svg | 21 - assets/zw-j2YKWgEN.svg | 21 - docker-compose.yaml | 26 + example.env | 8 + index.html | 44 +- lightbar-images/santa.png | Bin 94675 -> 0 bytes manifest.json | 37 + manifest.webmanifest | 32 - package.json | 145 + plugins/.gitignore | 1 + plugins/figmaTokensToThemeTokens.mjs | 43 + plugins/handlebars.ts | 41 + pnpm-lock.yaml | 8630 ++++++ postcss.config.js | 6 + prettierrc.js | 4 + _headers => public/_headers | 0 _redirects => public/_redirects | 0 .../android-chrome-192x192.png | Bin .../android-chrome-512x512.png | Bin .../apple-touch-icon.png | Bin browserconfig.xml => public/browserconfig.xml | 0 public/cat.svg | 94 + config.js => public/config.js | 16 +- favicon-16x16.png => public/favicon-16x16.png | Bin favicon-32x32.png => public/favicon-32x32.png | Bin favicon.ico => public/favicon.ico | Bin .../flags/965055-middle-removebg-preview.png | Bin 0 -> 113849 bytes public/flags/cat.png | Bin 0 -> 40422 bytes {flags => public/flags}/galicia.svg | 0 {flags => public/flags}/skull.svg | 0 {flags => public/flags}/tokiPona.svg | 0 public/flags/uwu.png | Bin 0 -> 213335 bytes public/lightbar-images/auto-gun.png | Bin 0 -> 16670 bytes public/lightbar-images/barn.png | Bin 0 -> 18754 bytes public/lightbar-images/beer-bottle.png | Bin 0 -> 5147 bytes public/lightbar-images/beer.png | Bin 0 -> 9791 bytes public/lightbar-images/camera.png | Bin 0 -> 10724 bytes public/lightbar-images/cat.png | Bin 0 -> 11477 bytes public/lightbar-images/cigarette.png | Bin 0 -> 7154 bytes public/lightbar-images/cigarette2.png | Bin 0 -> 10081 bytes public/lightbar-images/cock.png | Bin 0 -> 14405 bytes public/lightbar-images/coin.png | Bin 0 -> 12023 bytes public/lightbar-images/dice.svg | 1 + public/lightbar-images/egg.png | Bin 0 -> 10197 bytes .../lightbar-images}/fishie.png | Bin public/lightbar-images/ghost.png | Bin 0 -> 14241 bytes public/lightbar-images/git.png | Bin 0 -> 2383 bytes public/lightbar-images/gun.png | Bin 0 -> 13108 bytes public/lightbar-images/heart.svg | 4 + public/lightbar-images/money-sack.png | Bin 0 -> 15911 bytes public/lightbar-images/money.png | Bin 0 -> 15218 bytes public/lightbar-images/popcorn.png | Bin 0 -> 14090 bytes public/lightbar-images/pumpkin.png | Bin 0 -> 21464 bytes public/lightbar-images/santa.png | Bin 0 -> 12601 bytes public/lightbar-images/shark.png | Bin 0 -> 16086 bytes public/lightbar-images/ship.png | Bin 0 -> 9991 bytes public/lightbar-images/skull.png | Bin 0 -> 16638 bytes .../lightbar-images}/snowflake.svg | 0 public/lightbar-images/star.png | Bin 0 -> 11347 bytes public/lightbar-images/ts.png | Bin 0 -> 6552 bytes public/lightbar-images/turkey.png | Bin 0 -> 15725 bytes public/lightbar-images/weed.png | Bin 0 -> 222962 bytes public/lightbar-images/wine.png | Bin 0 -> 12375 bytes .../mstile-150x150.png | Bin ping.txt => public/ping.txt | 0 public/placeholder.png | Bin 0 -> 49773 bytes robots.txt => public/robots.txt | 0 .../safari-pinned-tab.svg | 0 .../splash_screens}/10.2__iPad_landscape.png | Bin .../splash_screens}/10.2__iPad_portrait.png | Bin .../10.5__iPad_Air_landscape.png | Bin .../10.5__iPad_Air_portrait.png | Bin .../10.9__iPad_Air_landscape.png | Bin .../10.9__iPad_Air_portrait.png | Bin ...11__iPad_Pro__10.5__iPad_Pro_landscape.png | Bin .../11__iPad_Pro__10.5__iPad_Pro_portrait.png | Bin .../12.9__iPad_Pro_landscape.png | Bin .../12.9__iPad_Pro_portrait.png | Bin ...uch_5th_generation_and_later_landscape.png | Bin ...ouch_5th_generation_and_later_portrait.png | Bin .../8.3__iPad_Mini_landscape.png | Bin .../8.3__iPad_Mini_portrait.png | Bin ...ni__9.7__iPad_Air__9.7__iPad_landscape.png | Bin ...ini__9.7__iPad_Air__9.7__iPad_portrait.png | Bin ...ne_11_Pro_Max__iPhone_XS_Max_landscape.png | Bin ...one_11_Pro_Max__iPhone_XS_Max_portrait.png | Bin .../iPhone_11__iPhone_XR_landscape.png | Bin .../iPhone_11__iPhone_XR_portrait.png | Bin ..._11_Pro__iPhone_XS__iPhone_X_landscape.png | Bin ...e_11_Pro__iPhone_XS__iPhone_X_portrait.png | Bin ...3_Pro_Max__iPhone_12_Pro_Max_landscape.png | Bin ...13_Pro_Max__iPhone_12_Pro_Max_portrait.png | Bin ...13__iPhone_12_Pro__iPhone_12_landscape.png | Bin ..._13__iPhone_12_Pro__iPhone_12_portrait.png | Bin ...e_15_Plus__iPhone_14_Pro_Max_landscape.png | Bin ...ne_15_Plus__iPhone_14_Pro_Max_portrait.png | Bin ...ro__iPhone_15__iPhone_14_Pro_landscape.png | Bin ...Pro__iPhone_15__iPhone_14_Pro_portrait.png | Bin ...Phone_6s_Plus__iPhone_6_Plus_landscape.png | Bin ...iPhone_6s_Plus__iPhone_6_Plus_portrait.png | Bin ...6s__iPhone_6__4.7__iPhone_SE_landscape.png | Bin ..._6s__iPhone_6__4.7__iPhone_SE_portrait.png | Bin .../splash_screens}/icon.png | Bin public/splash_screens/icon144x144.png | Bin 0 -> 6036 bytes src/@types/country-language.d.ts | 21 + src/assets/README.md | 9 + src/assets/css/index.css | 234 + src/assets/languages.ts | 101 + src/assets/locales/7358455941559356193.mp3 | Bin 0 -> 480280 bytes src/assets/locales/ar.json | 537 + src/assets/locales/bg.json | 359 + src/assets/locales/bn.json | 285 + src/assets/locales/ca.json | 547 + src/assets/locales/ca@valencia.json | 547 + src/assets/locales/cs.json | 540 + src/assets/locales/da.json | 626 + src/assets/locales/de.json | 553 + src/assets/locales/el.json | 428 + src/assets/locales/en.json | 650 + src/assets/locales/es.json | 549 + src/assets/locales/et.json | 557 + src/assets/locales/fa.json | 557 + src/assets/locales/fi-FI.json | 288 + src/assets/locales/fr.json | 566 + src/assets/locales/gl.json | 549 + src/assets/locales/gu.json | 533 + src/assets/locales/he.json | 537 + src/assets/locales/hi.json | 557 + src/assets/locales/id.json | 489 + src/assets/locales/is-IS.json | 546 + src/assets/locales/it.json | 622 + src/assets/locales/ja.json | 136 + src/assets/locales/kitty.json | 432 + src/assets/locales/km.json | 38 + src/assets/locales/ko.json | 547 + src/assets/locales/lv.json | 391 + src/assets/locales/minion.json | 432 + src/assets/locales/ne.json | 557 + src/assets/locales/nl.json | 553 + src/assets/locales/nv.json | 12 + src/assets/locales/pa.json | 546 + src/assets/locales/pirate.json | 537 + src/assets/locales/pl.json | 549 + src/assets/locales/pt-BR.json | 557 + src/assets/locales/pt-PT.json | 432 + src/assets/locales/ro.json | 543 + src/assets/locales/ru.json | 630 + src/assets/locales/sl.json | 557 + src/assets/locales/sv.json | 391 + src/assets/locales/ta.json | 531 + src/assets/locales/th.json | 414 + src/assets/locales/tok.json | 468 + src/assets/locales/tr.json | 557 + src/assets/locales/uk.json | 547 + src/assets/locales/uwu.json | 614 + src/assets/locales/vi.json | 210 + src/assets/locales/zh-Hant.json | 557 + src/assets/locales/zh.json | 557 + .../assets/templates/opensearch.xml.hbs | 4 +- src/backend/accounts/auth.ts | 35 + src/backend/accounts/bookmarks.ts | 64 + src/backend/accounts/crypto.ts | 131 + src/backend/accounts/import.ts | 33 + src/backend/accounts/login.ts | 48 + src/backend/accounts/meta.ts | 15 + src/backend/accounts/progress.ts | 115 + src/backend/accounts/register.ts | 55 + src/backend/accounts/sessions.ts | 49 + src/backend/accounts/settings.ts | 39 + src/backend/accounts/user.ts | 178 + src/backend/extension/compatibility.ts | 7 + src/backend/extension/messaging.ts | 86 + src/backend/extension/plasmo.ts | 71 + src/backend/extension/request.ts | 17 + src/backend/extension/streams.ts | 43 + src/backend/helpers/fetch.ts | 84 + src/backend/helpers/providerApi.ts | 163 + src/backend/helpers/report.ts | 168 + src/backend/helpers/subs.ts | 65 + src/backend/metadata/getmeta.ts | 216 + src/backend/metadata/justwatch.ts | 84 + src/backend/metadata/search.ts | 35 + src/backend/metadata/tmdb.ts | 295 + src/backend/metadata/types/justwatch.ts | 65 + src/backend/metadata/types/mw.ts | 53 + src/backend/metadata/types/tmdb.ts | 289 + src/backend/providers/fetchers.ts | 88 + src/backend/providers/providers.ts | 36 + src/components/Avatar.tsx | 95 + src/components/DropFile.tsx | 51 + src/components/FlagIcon.tsx | 74 + src/components/Icon.tsx | 189 + src/components/LinksDropdown.tsx | 178 + src/components/UserIcon.tsx | 42 + src/components/buttons/Button.tsx | 148 + src/components/buttons/EditButton.tsx | 37 + src/components/buttons/IconPatch.tsx | 34 + src/components/buttons/Toggle.tsx | 23 + src/components/form/ColorPicker.tsx | 40 + src/components/form/Dropdown.tsx | 68 + src/components/form/IconPicker.tsx | 48 + src/components/form/PassphraseDisplay.tsx | 57 + src/components/form/SearchBar.tsx | 78 + src/components/form/SortableList.tsx | 109 + src/components/layout/Box.tsx | 9 + src/components/layout/BrandPill.tsx | 36 + src/components/layout/Footer.tsx | 113 + src/components/layout/IconPill.tsx | 13 + src/components/layout/LargeCard.tsx | 58 + src/components/layout/Loading.tsx | 22 + src/components/layout/Navigation.tsx | 130 + src/components/layout/ProgressRing.tsx | 39 + src/components/layout/SectionHeading.tsx | 28 + src/components/layout/SettingsCard.tsx | 37 + src/components/layout/Sidebar.tsx | 47 + src/components/layout/Spinner.css | 19 + src/components/layout/Spinner.tsx | 9 + src/components/layout/Stepper.tsx | 25 + src/components/layout/ThinContainer.tsx | 44 + src/components/layout/WideContainer.tsx | 19 + src/components/media/MediaBookmark.tsx | 47 + src/components/media/MediaCard.tsx | 224 + src/components/media/MediaGrid.tsx | 18 + src/components/media/WatchedMediaCard.tsx | 51 + src/components/overlays/Modal.tsx | 42 + src/components/overlays/OverlayAnchor.tsx | 20 + src/components/overlays/OverlayDisplay.tsx | 147 + src/components/overlays/OverlayPage.tsx | 60 + src/components/overlays/OverlayRouter.tsx | 101 + .../positions/OverlayAnchorPosition.tsx | 74 + .../positions/OverlayMobilePosition.tsx | 37 + src/components/player/Player.tsx | 11 + src/components/player/README.md | 31 + src/components/player/atoms/Airplay.tsx | 17 + src/components/player/atoms/AutoPlayStart.tsx | 34 + src/components/player/atoms/Captions.tsx | 28 + .../player/atoms/CastingNotification.tsx | 22 + src/components/player/atoms/Chromecast.tsx | 56 + src/components/player/atoms/EpisodeTitle.tsx | 24 + src/components/player/atoms/Episodes.tsx | 307 + src/components/player/atoms/Fullscreen.tsx | 15 + .../player/atoms/LoadingSpinner.tsx | 10 + .../player/atoms/NextEpisodeButton.tsx | 232 + src/components/player/atoms/Pause.tsx | 22 + src/components/player/atoms/Pip.tsx | 20 + src/components/player/atoms/ProgressBar.tsx | 186 + src/components/player/atoms/Settings.tsx | 159 + src/components/player/atoms/Skips.tsx | 39 + src/components/player/atoms/Time.tsx | 67 + src/components/player/atoms/Title.tsx | 6 + src/components/player/atoms/Volume.tsx | 115 + .../player/atoms/VolumeChangedPopout.tsx | 43 + src/components/player/atoms/index.ts | 19 + .../player/atoms/settings/AudioView.tsx | 65 + .../atoms/settings/CaptionSettingsView.tsx | 320 + .../player/atoms/settings/CaptionsView.tsx | 232 + .../player/atoms/settings/Downloads.tsx | 216 + .../settings/OpensubtitlesCaptionsView.tsx | 104 + .../atoms/settings/PlaybackSettingsView.tsx | 71 + .../player/atoms/settings/QualityView.tsx | 115 + .../player/atoms/settings/SettingsMenu.tsx | 132 + .../atoms/settings/SourceCaptionsView.tsx | 149 + .../atoms/settings/SourceSelectingView.tsx | 166 + src/components/player/base/BackLink.tsx | 21 + src/components/player/base/BlackOverlay.tsx | 11 + src/components/player/base/BottomControls.tsx | 38 + src/components/player/base/CenterControls.tsx | 7 + .../player/base/CenterMobileControls.tsx | 26 + src/components/player/base/Container.tsx | 104 + .../player/base/LeftSideControls.tsx | 32 + src/components/player/base/SubtitleView.tsx | 136 + src/components/player/base/TopControls.tsx | 54 + src/components/player/display/base.ts | 527 + src/components/player/display/chromecast.ts | 290 + .../player/display/displayInterface.ts | 82 + src/components/player/hooks/useCaptions.ts | 135 + .../player/hooks/useInitializePlayer.ts | 37 + src/components/player/hooks/usePlayer.ts | 80 + src/components/player/hooks/usePlayerMeta.ts | 77 + .../player/hooks/useShouldShowControls.tsx | 30 + src/components/player/hooks/useSlashFocus.ts | 22 + .../player/hooks/useSourceSelection.ts | 213 + src/components/player/hooks/useVolume.ts | 34 + src/components/player/index.tsx | 1 + .../player/internals/BookmarkButton.tsx | 30 + src/components/player/internals/Button.tsx | 37 + .../player/internals/CastingInternal.tsx | 117 + .../player/internals/ContextMenu/Cards.tsx | 17 + .../player/internals/ContextMenu/Input.tsx | 21 + .../player/internals/ContextMenu/Links.tsx | 160 + .../player/internals/ContextMenu/Misc.tsx | 83 + .../player/internals/ContextMenu/Sections.tsx | 62 + .../player/internals/ContextMenu/index.ts | 11 + .../player/internals/HeadUpdater.tsx | 31 + .../player/internals/KeyboardEvents.tsx | 160 + .../player/internals/MediaSession.tsx | 185 + .../player/internals/MetaReporter.tsx | 92 + .../player/internals/ProgressSaver.tsx | 58 + .../player/internals/ScrapeCard.tsx | 76 + .../player/internals/StatusCircle.tsx | 89 + .../player/internals/ThumbnailScraper.tsx | 192 + .../player/internals/VideoClickTarget.tsx | 62 + .../player/internals/VideoContainer.tsx | 121 + src/components/player/utils/aired.ts | 11 + src/components/player/utils/captions.ts | 107 + .../player/utils/convertRunoutputToSource.ts | 59 + src/components/player/utils/handleBuffered.ts | 8 + .../player/utils/mediaErrorDetails.ts | 31 + src/components/player/utils/videoTracks.ts | 19 + src/components/text-inputs/AuthInputBox.tsx | 31 + .../text-inputs/TextInputControl.tsx | 85 + src/components/text/ArrowLink.tsx | 56 + src/components/text/DotList.tsx | 19 + src/components/text/HeroTitle.tsx | 16 + src/components/text/Link.tsx | 23 + src/components/text/Paragraph.tsx | 17 + src/components/text/SecondaryLabel.tsx | 3 + src/components/text/Title.tsx | 17 + src/components/utils/Divider.tsx | 12 + src/components/utils/ErrorLine.tsx | 18 + src/components/utils/Flare.css | 16 + src/components/utils/Flare.tsx | 103 + src/components/utils/Lightbar.css | 77 + src/components/utils/Lightbar.tsx | 428 + src/components/utils/Ol.tsx | 36 + src/components/utils/Text.tsx | 63 + src/components/utils/Transition.tsx | 108 + src/hooks/auth/useAuth.ts | 203 + src/hooks/auth/useAuthData.ts | 105 + src/hooks/auth/useAuthRestore.ts | 26 + src/hooks/auth/useBackendUrl.ts | 7 + src/hooks/useChromecastAvailable.ts | 15 + src/hooks/useDebounce.ts | 17 + src/hooks/useIsMobile.ts | 30 + src/hooks/useOverlayRouter.ts | 137 + src/hooks/usePing.ts | 41 + src/hooks/useProgressBar.ts | 89 + src/hooks/useProviderScrape.tsx | 281 + src/hooks/useQueryParams.ts | 39 + src/hooks/useRandomTranslation.ts | 32 + src/hooks/useSearchQuery.ts | 41 + src/hooks/useSettingsState.ts | 182 + src/index.tsx | 193 + src/pages/About.tsx | 92 + src/pages/DeveloperPage.tsx | 17 + src/pages/Discover.tsx | 585 + src/pages/Dmca.tsx | 53 + src/pages/HomePage.tsx | 96 + src/pages/Jip.tsx | 57 + src/pages/Login.tsx | 20 + src/pages/PlayerView.tsx | 140 + src/pages/Register.tsx | 80 + src/pages/Settings.tsx | 357 + src/pages/Support.tsx | 134 + src/pages/admin/AdminPage.tsx | 24 + src/pages/developer/TestView.tsx | 12 + src/pages/developer/VideoTesterView.tsx | 112 + src/pages/errors/ErrorBoundary.tsx | 44 + src/pages/errors/MaintenancePage.tsx | 57 + src/pages/errors/NotFoundPage.tsx | 5 + src/pages/layouts/ErrorLayout.tsx | 26 + src/pages/layouts/HomeLayout.tsx | 14 + src/pages/layouts/MinimalPageLayout.tsx | 28 + src/pages/layouts/PageLayout.tsx | 11 + src/pages/layouts/SubPageLayout.tsx | 43 + src/pages/onboarding/Onboarding.tsx | 121 + src/pages/onboarding/OnboardingExtension.tsx | 264 + src/pages/onboarding/OnboardingProxy.tsx | 96 + src/pages/onboarding/onboardingHooks.ts | 37 + src/pages/onboarding/utils.tsx | 91 + src/pages/parts/admin/BackendTestPart.tsx | 135 + src/pages/parts/admin/ConfigValuesPart.tsx | 91 + src/pages/parts/admin/TMDBTestPart.tsx | 99 + src/pages/parts/admin/WorkerTestPart.tsx | 182 + src/pages/parts/auth/AccountCreatePart.tsx | 104 + src/pages/parts/auth/LoginFormPart.tsx | 111 + .../parts/auth/PassphraseGeneratePart.tsx | 44 + src/pages/parts/auth/TrustBackendPart.tsx | 105 + src/pages/parts/auth/VerifyPassphrasePart.tsx | 126 + src/pages/parts/errors/ErrorCard.tsx | 111 + src/pages/parts/errors/ErrorPart.tsx | 59 + src/pages/parts/errors/NotFoundPart.tsx | 50 + src/pages/parts/home/BookmarksPart.tsx | 74 + src/pages/parts/home/HeroPart.tsx | 89 + src/pages/parts/home/WatchingPart.tsx | 72 + src/pages/parts/migrations/MigrationPart.tsx | 24 + src/pages/parts/player/MetaPart.tsx | 236 + src/pages/parts/player/PlaybackErrorPart.tsx | 52 + src/pages/parts/player/PlayerPart.tsx | 148 + src/pages/parts/player/ScrapeErrorPart.tsx | 147 + src/pages/parts/player/ScrapingPart.tsx | 182 + src/pages/parts/search/SearchListPart.tsx | 99 + src/pages/parts/search/SearchLoadingPart.tsx | 13 + .../parts/settings/AccountActionsPart.tsx | 71 + src/pages/parts/settings/AccountEditPart.tsx | 85 + src/pages/parts/settings/AdminPanel.tsx | 30 + src/pages/parts/settings/CaptionsPart.tsx | 164 + src/pages/parts/settings/ConnectionsPart.tsx | 172 + src/pages/parts/settings/DeviceListPart.tsx | 105 + src/pages/parts/settings/PreferencesPart.tsx | 139 + src/pages/parts/settings/ProfileEditModal.tsx | 67 + .../parts/settings/RegisterCalloutPart.tsx | 32 + src/pages/parts/settings/SetupPart.tsx | 204 + src/pages/parts/settings/SidebarPart.tsx | 212 + src/pages/parts/settings/ThemePart.tsx | 157 + src/pages/parts/util/LargeTextPart.tsx | 23 + src/pages/parts/util/PageTitle.tsx | 20 + src/pages/parts/util/WarningPart.tsx | 14 + src/setup/App.tsx | 185 + src/setup/Layout.tsx | 21 + src/setup/chromecast.ts | 30 + src/setup/config.ts | 130 + src/setup/constants.ts | 7 + src/setup/ga.ts | 11 + src/setup/i18n.ts | 27 + src/setup/pwa.ts | 27 + src/stores/__old/DONT_TOUCH_THIS_FOLDER | 1 + src/stores/__old/bookmark/store.ts | 59 + src/stores/__old/bookmark/types.ts | 5 + src/stores/__old/imports.ts | 4 + src/stores/__old/migrations.ts | 177 + src/stores/__old/settings/store.ts | 68 + src/stores/__old/settings/types.ts | 34 + src/stores/__old/utils.ts | 11 + src/stores/__old/volume/store.ts | 29 + src/stores/__old/watched/migrations/v2.ts | 217 + src/stores/__old/watched/migrations/v3.ts | 93 + src/stores/__old/watched/migrations/v4.ts | 77 + src/stores/__old/watched/store.ts | 49 + src/stores/__old/watched/types.ts | 22 + src/stores/auth/index.ts | 87 + src/stores/banner/BannerLocation.tsx | 86 + src/stores/banner/index.ts | 100 + src/stores/bookmarks/BookmarkSyncer.tsx | 81 + src/stores/bookmarks/index.ts | 102 + src/stores/history/index.ts | 55 + src/stores/language/index.tsx | 54 + src/stores/onboarding/index.tsx | 22 + src/stores/overlay/store.ts | 52 + src/stores/player/slices/casting.ts | 47 + src/stores/player/slices/display.ts | 129 + src/stores/player/slices/interface.ts | 115 + src/stores/player/slices/playing.ts | 41 + src/stores/player/slices/progress.ts | 25 + src/stores/player/slices/source.ts | 224 + src/stores/player/slices/thumbnails.ts | 115 + src/stores/player/slices/types.ts | 23 + src/stores/player/store.ts | 23 + src/stores/player/types.ts | 20 + src/stores/player/utils/qualities.ts | 123 + src/stores/preferences/index.tsx | 41 + src/stores/progress/ProgressSyncer.tsx | 83 + src/stores/progress/index.ts | 181 + src/stores/progress/utils.ts | 94 + src/stores/quality/index.ts | 40 + src/stores/subtitles/SettingsSyncer.tsx | 39 + src/stores/subtitles/index.ts | 135 + src/stores/theme/index.tsx | 67 + src/stores/turnstile/index.tsx | 130 + src/stores/volume/index.ts | 40 + src/utils/autoplay.ts | 11 + src/utils/cache.ts | 101 + src/utils/cdn.ts | 16 + src/utils/detectFeatures.ts | 79 + src/utils/discover.ts | 57 + src/utils/events.ts | 34 + src/utils/extension.ts | 20 + src/utils/formatSeconds.ts | 25 + src/utils/language.ts | 209 + src/utils/mediaTypes.ts | 8 + src/utils/onboarding.ts | 23 + src/utils/proxyUrls.ts | 77 + src/utils/setup/App.tsx | 183 + src/utils/setup/Layout.tsx | 25 + src/utils/setup/chromecast.ts | 30 + src/utils/setup/config.ts | 120 + src/utils/setup/constants.ts | 5 + src/utils/setup/ga.ts | 11 + src/utils/setup/i18n.ts | 27 + src/utils/setup/pwa.ts | 27 + src/utils/timestamp.ts | 14 + src/utils/typeguard.ts | 5 + sw.js | 908 - sw.js.map | 1 - tailwind.config.ts | 51 + themes/all.ts | 13 + themes/default.ts | 340 + themes/index.ts | 9 + themes/list/blck.ts | 277 + themes/list/blue.ts | 260 + themes/list/gray.ts | 260 + themes/list/red.ts | 260 + themes/list/teal.ts | 260 + themes/types.ts | 15 + tsconfig.json | 28 + vercel.json | 49 + vite.config.mts | 173 + 693 files changed, 62019 insertions(+), 131496 deletions(-) create mode 100644 .bkp/CODE_OF_CONDUCT.md create mode 100644 .bkp/README.md create mode 100644 .bkp/SECURITY.md create mode 100644 .dockerignore create mode 100644 .editorconfig create mode 100644 .eslintrc.cjs create mode 100644 .gitattributes create mode 100644 .github/CODEOWNERS create mode 100644 .github/CONTRIBUTING.md create mode 100644 .github/ISSUE_TEMPLATE/bug-report.yml create mode 100644 .github/ISSUE_TEMPLATE/feature-request.yml create mode 100644 .github/README.md create mode 100644 .github/Sudo-Flix.png create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/deploying.yml create mode 100644 .github/workflows/linting_testing.yml create mode 100644 .npmrc create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json create mode 100644 Dockerfile delete mode 100644 assets/DeveloperPage--1rV1y1n.js delete mode 100644 assets/DeveloperPage--1rV1y1n.js.map delete mode 100644 assets/Icons-7LetCtYR.css delete mode 100644 assets/Icons-Ct84pi7p.js delete mode 100644 assets/Icons-Ct84pi7p.js.map delete mode 100644 assets/PlayerView-CHau_TOb.js delete mode 100644 assets/PlayerView-CHau_TOb.js.map delete mode 100644 assets/Settings-CEKoIO_M.js delete mode 100644 assets/Settings-CEKoIO_M.js.map delete mode 100644 assets/StatusCircle-D7h8AcdR.js delete mode 100644 assets/StatusCircle-D7h8AcdR.js.map delete mode 100644 assets/TestView-C1rlAP4k.js delete mode 100644 assets/TestView-C1rlAP4k.js.map delete mode 100644 assets/ad-BOo-tPI4.svg delete mode 100644 assets/ad-CDtWnnSA.svg delete mode 100644 assets/af-BReSbsTq.svg delete mode 100644 assets/af-Cc32fsDB.svg delete mode 100644 assets/arab-DwNob5Qo.svg delete mode 100644 assets/arab-PzQTPYwO.svg delete mode 100644 assets/as-D2gsNMrP.svg delete mode 100644 assets/as-_t1IQUdv.svg delete mode 100644 assets/auth-72H9TcpW.js delete mode 100644 assets/auth-72H9TcpW.js.map delete mode 100644 assets/aw-CLCX8uk5.svg delete mode 100644 assets/aw-W0PWLK5p.svg delete mode 100644 assets/bm-BoWRAtUx.svg delete mode 100644 assets/bm-CyW69jd8.svg delete mode 100644 assets/bn-BDKbSv-u.svg delete mode 100644 assets/bn-CEevvwJS.svg delete mode 100644 assets/bo-BE5mqlGv.svg delete mode 100644 assets/bo-Cvfzpazb.svg delete mode 100644 assets/br-DFzUeaDV.svg delete mode 100644 assets/br-Dbh3w8z9.svg delete mode 100644 assets/bt-Cm0R6rAQ.svg delete mode 100644 assets/bt-Csq9bKsA.svg delete mode 100644 assets/by-EkqhOCLw.svg delete mode 100644 assets/by-oPm0zKcB.svg delete mode 100644 assets/bz-CqiVUvof.svg delete mode 100644 assets/bz-YpwBidLU.svg delete mode 100644 assets/caption-parsing-BABN6jyO.js delete mode 100644 assets/caption-parsing-BABN6jyO.js.map delete mode 100644 assets/cy-Bgo0XIP0.svg delete mode 100644 assets/cy-VQFkW-qk.svg delete mode 100644 assets/dg-B55Nvqqm.svg delete mode 100644 assets/dg-CPWO5scz.svg delete mode 100644 assets/dm-BlhP-6zy.svg delete mode 100644 assets/dm-ClJ_IDld.svg delete mode 100644 assets/do-B91cOUCO.svg delete mode 100644 assets/do-_FYrCblZ.svg delete mode 100644 assets/eac-CZCl_pn7.svg delete mode 100644 assets/eac-D_uIzpYR.svg delete mode 100644 assets/ec-LNhQ9L4k.svg delete mode 100644 assets/ec-sTVr1A3S.svg delete mode 100644 assets/eg-BIzzVp3n.svg delete mode 100644 assets/eg-C1MYAOXe.svg delete mode 100644 assets/es-CYT-Z8U_.svg delete mode 100644 assets/es-DTsPkOCa.svg delete mode 100644 assets/es-ga-BbFllROk.svg delete mode 100644 assets/es-ga-RI_ZudJJ.svg delete mode 100644 assets/fj-B6MkAYsu.svg delete mode 100644 assets/fj-LI4FYNBW.svg delete mode 100644 assets/fk-Be42QBCW.svg delete mode 100644 assets/fk-Ck9cznm4.svg delete mode 100644 assets/gb-nir-BOm9QMOa.svg delete mode 100644 assets/gb-nir-BZUeOVwE.svg delete mode 100644 assets/gb-wls-C4LdH8Nd.svg delete mode 100644 assets/gb-wls-lLp_JivI.svg delete mode 100644 assets/gq-BvOxIUGP.svg delete mode 100644 assets/gq-OBiOttRB.svg delete mode 100644 assets/gs-Di8hLP4g.svg delete mode 100644 assets/gs-YFymFo8z.svg delete mode 100644 assets/gt-CovS1bZs.svg delete mode 100644 assets/gt-Ufdm0MFv.svg delete mode 100644 assets/gu-Bkjkorus.svg delete mode 100644 assets/gu-wFhsTC1Y.svg delete mode 100644 assets/hls-2_Gpnevg.js delete mode 100644 assets/hls-2_Gpnevg.js.map delete mode 100644 assets/hr-C9VaLqwu.svg delete mode 100644 assets/hr-K104hqQF.svg delete mode 100644 assets/ht-C3TTQpK4.svg delete mode 100644 assets/ht-Dv-spnGk.svg delete mode 100644 assets/im-BAoxVCMv.svg delete mode 100644 assets/im-deD7ny0b.svg delete mode 100644 assets/index-DNeM3t3R.css delete mode 100644 assets/index-DYBNcHgS.js delete mode 100644 assets/index-DYBNcHgS.js.map delete mode 100644 assets/io-Bkx8USW1.svg delete mode 100644 assets/io-BzKkDPkD.svg delete mode 100644 assets/ir-CXFV1BFU.svg delete mode 100644 assets/ir-cCIgaNf6.svg delete mode 100644 assets/je-DavEsnCV.svg delete mode 100644 assets/je-PUw16g1j.svg delete mode 100644 assets/kh-CAffWc0R.svg delete mode 100644 assets/kh-V4Sa3vlt.svg delete mode 100644 assets/ki-CM44VBPm.svg delete mode 100644 assets/ki-COZ8g898.svg delete mode 100644 assets/ky-BqProAqG.svg delete mode 100644 assets/ky-D_l3blFP.svg delete mode 100644 assets/kz-BBCbe9jj.svg delete mode 100644 assets/kz-DBjWpOlG.svg delete mode 100644 assets/language-db-DxKZVAm4.js delete mode 100644 assets/language-db-DxKZVAm4.js.map delete mode 100644 assets/li-DgeenFRc.svg delete mode 100644 assets/li-y6TPS81M.svg delete mode 100644 assets/lk-B2IfFxoh.svg delete mode 100644 assets/lk-DIvkWByA.svg delete mode 100644 assets/locales-BXkJCeK5.js delete mode 100644 assets/locales-BXkJCeK5.js.map delete mode 100644 assets/md-DArlF80d.svg delete mode 100644 assets/md-DRw6DF0o.svg delete mode 100644 assets/me-B32CQdRA.svg delete mode 100644 assets/me-Btx9w4B_.svg delete mode 100644 assets/mp-DOjKDFJv.svg delete mode 100644 assets/mp-xI88Vk3c.svg delete mode 100644 assets/ms-7tNehsjt.svg delete mode 100644 assets/ms-D--tLJBo.svg delete mode 100644 assets/mt-B9RzfhuG.svg delete mode 100644 assets/mt-Tc-Y-wNN.svg delete mode 100644 assets/mx-BB6Demq1.svg delete mode 100644 assets/mx-Cwlb0I_O.svg delete mode 100644 assets/nf--j2oelto.svg delete mode 100644 assets/nf-COchEj81.svg delete mode 100644 assets/ni-CC3zFI7h.svg delete mode 100644 assets/ni-ChnV2lR-.svg delete mode 100644 assets/om-DnUPbroW.svg delete mode 100644 assets/om-Ri__rIwP.svg delete mode 100644 assets/pf-CEX9Vx76.svg delete mode 100644 assets/pf-CMTHIumB.svg delete mode 100644 assets/pn-DEs-Vj71.svg delete mode 100644 assets/pn-vyD5VXw1.svg delete mode 100644 assets/pt-BLLm3V0o.svg delete mode 100644 assets/pt-BV5okG4O.svg delete mode 100644 assets/py-BfpB8kRi.svg delete mode 100644 assets/py-CRTEf2ay.svg delete mode 100644 assets/react-dom-DpNJ2UNC.js delete mode 100644 assets/react-dom-DpNJ2UNC.js.map delete mode 100644 assets/rs-D31ZZnI-.svg delete mode 100644 assets/rs-DBaCzDQy.svg delete mode 100644 assets/sa-DLf2NaXn.svg delete mode 100644 assets/sa-eH5F7cXy.svg delete mode 100644 assets/sh-ac-6pU0wZVL.svg delete mode 100644 assets/sh-ac-Bxo6e1OQ.svg delete mode 100644 assets/sh-hl-DWwv0HRi.svg delete mode 100644 assets/sh-hl-a930SJst.svg delete mode 100644 assets/sh-ta-BNzkCa6e.svg delete mode 100644 assets/sh-ta-DNDOtP8t.svg delete mode 100644 assets/sm-1NcqoN_z.svg delete mode 100644 assets/sm-DHRSzt4z.svg delete mode 100644 assets/sv-BGK8a8aZ.svg delete mode 100644 assets/sv-n55iiUxg.svg delete mode 100644 assets/sx-DsF4D6De.svg delete mode 100644 assets/sx-DzlMoqh2.svg delete mode 100644 assets/sz-BC3w3Gmj.svg delete mode 100644 assets/sz-DpZ3V1AK.svg delete mode 100644 assets/tc-BB3tFO-G.svg delete mode 100644 assets/tc-CYGgqbY-.svg delete mode 100644 assets/tm-CCv743R_.svg delete mode 100644 assets/tm-MQp6IHsv.svg delete mode 100644 assets/un-BQ1kEGox.svg delete mode 100644 assets/un-ChThV8ch.svg delete mode 100644 assets/va-BntFJQHU.svg delete mode 100644 assets/va-maDzWwNR.svg delete mode 100644 assets/vendor-Dkz3gcSC.js delete mode 100644 assets/vendor-Dkz3gcSC.js.map delete mode 100644 assets/vg-DKEU1GdO.svg delete mode 100644 assets/vg-qlt33Cv3.svg delete mode 100644 assets/vi-1FTBesw2.svg delete mode 100644 assets/vi-DatfOFqY.svg delete mode 100644 assets/workbox-window.prod.es5-DFjpnwFp.js delete mode 100644 assets/workbox-window.prod.es5-DFjpnwFp.js.map delete mode 100644 assets/xk-B6uU6dIH.svg delete mode 100644 assets/xk-F5dDvX79.svg delete mode 100644 assets/zm-BmHUGSoa.svg delete mode 100644 assets/zm-CNg0kgkw.svg delete mode 100644 assets/zw-DsbN9cxg.svg delete mode 100644 assets/zw-j2YKWgEN.svg create mode 100644 docker-compose.yaml create mode 100644 example.env delete mode 100644 lightbar-images/santa.png create mode 100644 manifest.json delete mode 100644 manifest.webmanifest create mode 100644 package.json create mode 100644 plugins/.gitignore create mode 100644 plugins/figmaTokensToThemeTokens.mjs create mode 100644 plugins/handlebars.ts create mode 100644 pnpm-lock.yaml create mode 100644 postcss.config.js create mode 100644 prettierrc.js rename _headers => public/_headers (100%) rename _redirects => public/_redirects (100%) rename android-chrome-192x192.png => public/android-chrome-192x192.png (100%) rename android-chrome-512x512.png => public/android-chrome-512x512.png (100%) rename apple-touch-icon.png => public/apple-touch-icon.png (100%) rename browserconfig.xml => public/browserconfig.xml (100%) create mode 100644 public/cat.svg rename config.js => public/config.js (55%) rename favicon-16x16.png => public/favicon-16x16.png (100%) rename favicon-32x32.png => public/favicon-32x32.png (100%) rename favicon.ico => public/favicon.ico (100%) create mode 100644 public/flags/965055-middle-removebg-preview.png create mode 100644 public/flags/cat.png rename {flags => public/flags}/galicia.svg (100%) rename {flags => public/flags}/skull.svg (100%) rename {flags => public/flags}/tokiPona.svg (100%) create mode 100644 public/flags/uwu.png create mode 100644 public/lightbar-images/auto-gun.png create mode 100644 public/lightbar-images/barn.png create mode 100644 public/lightbar-images/beer-bottle.png create mode 100644 public/lightbar-images/beer.png create mode 100644 public/lightbar-images/camera.png create mode 100644 public/lightbar-images/cat.png create mode 100644 public/lightbar-images/cigarette.png create mode 100644 public/lightbar-images/cigarette2.png create mode 100644 public/lightbar-images/cock.png create mode 100644 public/lightbar-images/coin.png create mode 100644 public/lightbar-images/dice.svg create mode 100644 public/lightbar-images/egg.png rename {lightbar-images => public/lightbar-images}/fishie.png (100%) create mode 100644 public/lightbar-images/ghost.png create mode 100644 public/lightbar-images/git.png create mode 100644 public/lightbar-images/gun.png create mode 100644 public/lightbar-images/heart.svg create mode 100644 public/lightbar-images/money-sack.png create mode 100644 public/lightbar-images/money.png create mode 100644 public/lightbar-images/popcorn.png create mode 100644 public/lightbar-images/pumpkin.png create mode 100644 public/lightbar-images/santa.png create mode 100644 public/lightbar-images/shark.png create mode 100644 public/lightbar-images/ship.png create mode 100644 public/lightbar-images/skull.png rename {lightbar-images => public/lightbar-images}/snowflake.svg (100%) create mode 100644 public/lightbar-images/star.png create mode 100644 public/lightbar-images/ts.png create mode 100644 public/lightbar-images/turkey.png create mode 100644 public/lightbar-images/weed.png create mode 100644 public/lightbar-images/wine.png rename mstile-150x150.png => public/mstile-150x150.png (100%) rename ping.txt => public/ping.txt (100%) create mode 100644 public/placeholder.png rename robots.txt => public/robots.txt (100%) rename safari-pinned-tab.svg => public/safari-pinned-tab.svg (100%) rename {splash_screens => public/splash_screens}/10.2__iPad_landscape.png (100%) rename {splash_screens => public/splash_screens}/10.2__iPad_portrait.png (100%) rename {splash_screens => public/splash_screens}/10.5__iPad_Air_landscape.png (100%) rename {splash_screens => public/splash_screens}/10.5__iPad_Air_portrait.png (100%) rename {splash_screens => public/splash_screens}/10.9__iPad_Air_landscape.png (100%) rename {splash_screens => public/splash_screens}/10.9__iPad_Air_portrait.png (100%) rename {splash_screens => public/splash_screens}/11__iPad_Pro__10.5__iPad_Pro_landscape.png (100%) rename {splash_screens => public/splash_screens}/11__iPad_Pro__10.5__iPad_Pro_portrait.png (100%) rename {splash_screens => public/splash_screens}/12.9__iPad_Pro_landscape.png (100%) rename {splash_screens => public/splash_screens}/12.9__iPad_Pro_portrait.png (100%) rename {splash_screens => public/splash_screens}/4__iPhone_SE__iPod_touch_5th_generation_and_later_landscape.png (100%) rename {splash_screens => public/splash_screens}/4__iPhone_SE__iPod_touch_5th_generation_and_later_portrait.png (100%) rename {splash_screens => public/splash_screens}/8.3__iPad_Mini_landscape.png (100%) rename {splash_screens => public/splash_screens}/8.3__iPad_Mini_portrait.png (100%) rename {splash_screens => public/splash_screens}/9.7__iPad_Pro__7.9__iPad_mini__9.7__iPad_Air__9.7__iPad_landscape.png (100%) rename {splash_screens => public/splash_screens}/9.7__iPad_Pro__7.9__iPad_mini__9.7__iPad_Air__9.7__iPad_portrait.png (100%) rename {splash_screens => public/splash_screens}/iPhone_11_Pro_Max__iPhone_XS_Max_landscape.png (100%) rename {splash_screens => public/splash_screens}/iPhone_11_Pro_Max__iPhone_XS_Max_portrait.png (100%) rename {splash_screens => public/splash_screens}/iPhone_11__iPhone_XR_landscape.png (100%) rename {splash_screens => public/splash_screens}/iPhone_11__iPhone_XR_portrait.png (100%) rename {splash_screens => public/splash_screens}/iPhone_13_mini__iPhone_12_mini__iPhone_11_Pro__iPhone_XS__iPhone_X_landscape.png (100%) rename {splash_screens => public/splash_screens}/iPhone_13_mini__iPhone_12_mini__iPhone_11_Pro__iPhone_XS__iPhone_X_portrait.png (100%) rename {splash_screens => public/splash_screens}/iPhone_14_Plus__iPhone_13_Pro_Max__iPhone_12_Pro_Max_landscape.png (100%) rename {splash_screens => public/splash_screens}/iPhone_14_Plus__iPhone_13_Pro_Max__iPhone_12_Pro_Max_portrait.png (100%) rename {splash_screens => public/splash_screens}/iPhone_14__iPhone_13_Pro__iPhone_13__iPhone_12_Pro__iPhone_12_landscape.png (100%) rename {splash_screens => public/splash_screens}/iPhone_14__iPhone_13_Pro__iPhone_13__iPhone_12_Pro__iPhone_12_portrait.png (100%) rename {splash_screens => public/splash_screens}/iPhone_15_Pro_Max__iPhone_15_Plus__iPhone_14_Pro_Max_landscape.png (100%) rename {splash_screens => public/splash_screens}/iPhone_15_Pro_Max__iPhone_15_Plus__iPhone_14_Pro_Max_portrait.png (100%) rename {splash_screens => public/splash_screens}/iPhone_15_Pro__iPhone_15__iPhone_14_Pro_landscape.png (100%) rename {splash_screens => public/splash_screens}/iPhone_15_Pro__iPhone_15__iPhone_14_Pro_portrait.png (100%) rename {splash_screens => public/splash_screens}/iPhone_8_Plus__iPhone_7_Plus__iPhone_6s_Plus__iPhone_6_Plus_landscape.png (100%) rename {splash_screens => public/splash_screens}/iPhone_8_Plus__iPhone_7_Plus__iPhone_6s_Plus__iPhone_6_Plus_portrait.png (100%) rename {splash_screens => public/splash_screens}/iPhone_8__iPhone_7__iPhone_6s__iPhone_6__4.7__iPhone_SE_landscape.png (100%) rename {splash_screens => public/splash_screens}/iPhone_8__iPhone_7__iPhone_6s__iPhone_6__4.7__iPhone_SE_portrait.png (100%) rename {splash_screens => public/splash_screens}/icon.png (100%) create mode 100644 public/splash_screens/icon144x144.png create mode 100644 src/@types/country-language.d.ts create mode 100644 src/assets/README.md create mode 100644 src/assets/css/index.css create mode 100644 src/assets/languages.ts create mode 100644 src/assets/locales/7358455941559356193.mp3 create mode 100644 src/assets/locales/ar.json create mode 100644 src/assets/locales/bg.json create mode 100644 src/assets/locales/bn.json create mode 100644 src/assets/locales/ca.json create mode 100644 src/assets/locales/ca@valencia.json create mode 100644 src/assets/locales/cs.json create mode 100644 src/assets/locales/da.json create mode 100644 src/assets/locales/de.json create mode 100644 src/assets/locales/el.json create mode 100644 src/assets/locales/en.json create mode 100644 src/assets/locales/es.json create mode 100644 src/assets/locales/et.json create mode 100644 src/assets/locales/fa.json create mode 100644 src/assets/locales/fi-FI.json create mode 100644 src/assets/locales/fr.json create mode 100644 src/assets/locales/gl.json create mode 100644 src/assets/locales/gu.json create mode 100644 src/assets/locales/he.json create mode 100644 src/assets/locales/hi.json create mode 100644 src/assets/locales/id.json create mode 100644 src/assets/locales/is-IS.json create mode 100644 src/assets/locales/it.json create mode 100644 src/assets/locales/ja.json create mode 100644 src/assets/locales/kitty.json create mode 100644 src/assets/locales/km.json create mode 100644 src/assets/locales/ko.json create mode 100644 src/assets/locales/lv.json create mode 100644 src/assets/locales/minion.json create mode 100644 src/assets/locales/ne.json create mode 100644 src/assets/locales/nl.json create mode 100644 src/assets/locales/nv.json create mode 100644 src/assets/locales/pa.json create mode 100644 src/assets/locales/pirate.json create mode 100644 src/assets/locales/pl.json create mode 100644 src/assets/locales/pt-BR.json create mode 100644 src/assets/locales/pt-PT.json create mode 100644 src/assets/locales/ro.json create mode 100644 src/assets/locales/ru.json create mode 100644 src/assets/locales/sl.json create mode 100644 src/assets/locales/sv.json create mode 100644 src/assets/locales/ta.json create mode 100644 src/assets/locales/th.json create mode 100644 src/assets/locales/tok.json create mode 100644 src/assets/locales/tr.json create mode 100644 src/assets/locales/uk.json create mode 100644 src/assets/locales/uwu.json create mode 100644 src/assets/locales/vi.json create mode 100644 src/assets/locales/zh-Hant.json create mode 100644 src/assets/locales/zh.json rename opensearch.xml => src/assets/templates/opensearch.xml.hbs (64%) create mode 100644 src/backend/accounts/auth.ts create mode 100644 src/backend/accounts/bookmarks.ts create mode 100644 src/backend/accounts/crypto.ts create mode 100644 src/backend/accounts/import.ts create mode 100644 src/backend/accounts/login.ts create mode 100644 src/backend/accounts/meta.ts create mode 100644 src/backend/accounts/progress.ts create mode 100644 src/backend/accounts/register.ts create mode 100644 src/backend/accounts/sessions.ts create mode 100644 src/backend/accounts/settings.ts create mode 100644 src/backend/accounts/user.ts create mode 100644 src/backend/extension/compatibility.ts create mode 100644 src/backend/extension/messaging.ts create mode 100644 src/backend/extension/plasmo.ts create mode 100644 src/backend/extension/request.ts create mode 100644 src/backend/extension/streams.ts create mode 100644 src/backend/helpers/fetch.ts create mode 100644 src/backend/helpers/providerApi.ts create mode 100644 src/backend/helpers/report.ts create mode 100644 src/backend/helpers/subs.ts create mode 100644 src/backend/metadata/getmeta.ts create mode 100644 src/backend/metadata/justwatch.ts create mode 100644 src/backend/metadata/search.ts create mode 100644 src/backend/metadata/tmdb.ts create mode 100644 src/backend/metadata/types/justwatch.ts create mode 100644 src/backend/metadata/types/mw.ts create mode 100644 src/backend/metadata/types/tmdb.ts create mode 100644 src/backend/providers/fetchers.ts create mode 100644 src/backend/providers/providers.ts create mode 100644 src/components/Avatar.tsx create mode 100644 src/components/DropFile.tsx create mode 100644 src/components/FlagIcon.tsx create mode 100644 src/components/Icon.tsx create mode 100644 src/components/LinksDropdown.tsx create mode 100644 src/components/UserIcon.tsx create mode 100644 src/components/buttons/Button.tsx create mode 100644 src/components/buttons/EditButton.tsx create mode 100644 src/components/buttons/IconPatch.tsx create mode 100644 src/components/buttons/Toggle.tsx create mode 100644 src/components/form/ColorPicker.tsx create mode 100644 src/components/form/Dropdown.tsx create mode 100644 src/components/form/IconPicker.tsx create mode 100644 src/components/form/PassphraseDisplay.tsx create mode 100644 src/components/form/SearchBar.tsx create mode 100644 src/components/form/SortableList.tsx create mode 100644 src/components/layout/Box.tsx create mode 100644 src/components/layout/BrandPill.tsx create mode 100644 src/components/layout/Footer.tsx create mode 100644 src/components/layout/IconPill.tsx create mode 100644 src/components/layout/LargeCard.tsx create mode 100644 src/components/layout/Loading.tsx create mode 100644 src/components/layout/Navigation.tsx create mode 100644 src/components/layout/ProgressRing.tsx create mode 100644 src/components/layout/SectionHeading.tsx create mode 100644 src/components/layout/SettingsCard.tsx create mode 100644 src/components/layout/Sidebar.tsx create mode 100644 src/components/layout/Spinner.css create mode 100644 src/components/layout/Spinner.tsx create mode 100644 src/components/layout/Stepper.tsx create mode 100644 src/components/layout/ThinContainer.tsx create mode 100644 src/components/layout/WideContainer.tsx create mode 100644 src/components/media/MediaBookmark.tsx create mode 100644 src/components/media/MediaCard.tsx create mode 100644 src/components/media/MediaGrid.tsx create mode 100644 src/components/media/WatchedMediaCard.tsx create mode 100644 src/components/overlays/Modal.tsx create mode 100644 src/components/overlays/OverlayAnchor.tsx create mode 100644 src/components/overlays/OverlayDisplay.tsx create mode 100644 src/components/overlays/OverlayPage.tsx create mode 100644 src/components/overlays/OverlayRouter.tsx create mode 100644 src/components/overlays/positions/OverlayAnchorPosition.tsx create mode 100644 src/components/overlays/positions/OverlayMobilePosition.tsx create mode 100644 src/components/player/Player.tsx create mode 100644 src/components/player/README.md create mode 100644 src/components/player/atoms/Airplay.tsx create mode 100644 src/components/player/atoms/AutoPlayStart.tsx create mode 100644 src/components/player/atoms/Captions.tsx create mode 100644 src/components/player/atoms/CastingNotification.tsx create mode 100644 src/components/player/atoms/Chromecast.tsx create mode 100644 src/components/player/atoms/EpisodeTitle.tsx create mode 100644 src/components/player/atoms/Episodes.tsx create mode 100644 src/components/player/atoms/Fullscreen.tsx create mode 100644 src/components/player/atoms/LoadingSpinner.tsx create mode 100644 src/components/player/atoms/NextEpisodeButton.tsx create mode 100644 src/components/player/atoms/Pause.tsx create mode 100644 src/components/player/atoms/Pip.tsx create mode 100644 src/components/player/atoms/ProgressBar.tsx create mode 100644 src/components/player/atoms/Settings.tsx create mode 100644 src/components/player/atoms/Skips.tsx create mode 100644 src/components/player/atoms/Time.tsx create mode 100644 src/components/player/atoms/Title.tsx create mode 100644 src/components/player/atoms/Volume.tsx create mode 100644 src/components/player/atoms/VolumeChangedPopout.tsx create mode 100644 src/components/player/atoms/index.ts create mode 100644 src/components/player/atoms/settings/AudioView.tsx create mode 100644 src/components/player/atoms/settings/CaptionSettingsView.tsx create mode 100644 src/components/player/atoms/settings/CaptionsView.tsx create mode 100644 src/components/player/atoms/settings/Downloads.tsx create mode 100644 src/components/player/atoms/settings/OpensubtitlesCaptionsView.tsx create mode 100644 src/components/player/atoms/settings/PlaybackSettingsView.tsx create mode 100644 src/components/player/atoms/settings/QualityView.tsx create mode 100644 src/components/player/atoms/settings/SettingsMenu.tsx create mode 100644 src/components/player/atoms/settings/SourceCaptionsView.tsx create mode 100644 src/components/player/atoms/settings/SourceSelectingView.tsx create mode 100644 src/components/player/base/BackLink.tsx create mode 100644 src/components/player/base/BlackOverlay.tsx create mode 100644 src/components/player/base/BottomControls.tsx create mode 100644 src/components/player/base/CenterControls.tsx create mode 100644 src/components/player/base/CenterMobileControls.tsx create mode 100644 src/components/player/base/Container.tsx create mode 100644 src/components/player/base/LeftSideControls.tsx create mode 100644 src/components/player/base/SubtitleView.tsx create mode 100644 src/components/player/base/TopControls.tsx create mode 100644 src/components/player/display/base.ts create mode 100644 src/components/player/display/chromecast.ts create mode 100644 src/components/player/display/displayInterface.ts create mode 100644 src/components/player/hooks/useCaptions.ts create mode 100644 src/components/player/hooks/useInitializePlayer.ts create mode 100644 src/components/player/hooks/usePlayer.ts create mode 100644 src/components/player/hooks/usePlayerMeta.ts create mode 100644 src/components/player/hooks/useShouldShowControls.tsx create mode 100644 src/components/player/hooks/useSlashFocus.ts create mode 100644 src/components/player/hooks/useSourceSelection.ts create mode 100644 src/components/player/hooks/useVolume.ts create mode 100644 src/components/player/index.tsx create mode 100644 src/components/player/internals/BookmarkButton.tsx create mode 100644 src/components/player/internals/Button.tsx create mode 100644 src/components/player/internals/CastingInternal.tsx create mode 100644 src/components/player/internals/ContextMenu/Cards.tsx create mode 100644 src/components/player/internals/ContextMenu/Input.tsx create mode 100644 src/components/player/internals/ContextMenu/Links.tsx create mode 100644 src/components/player/internals/ContextMenu/Misc.tsx create mode 100644 src/components/player/internals/ContextMenu/Sections.tsx create mode 100644 src/components/player/internals/ContextMenu/index.ts create mode 100644 src/components/player/internals/HeadUpdater.tsx create mode 100644 src/components/player/internals/KeyboardEvents.tsx create mode 100644 src/components/player/internals/MediaSession.tsx create mode 100644 src/components/player/internals/MetaReporter.tsx create mode 100644 src/components/player/internals/ProgressSaver.tsx create mode 100644 src/components/player/internals/ScrapeCard.tsx create mode 100644 src/components/player/internals/StatusCircle.tsx create mode 100644 src/components/player/internals/ThumbnailScraper.tsx create mode 100644 src/components/player/internals/VideoClickTarget.tsx create mode 100644 src/components/player/internals/VideoContainer.tsx create mode 100644 src/components/player/utils/aired.ts create mode 100644 src/components/player/utils/captions.ts create mode 100644 src/components/player/utils/convertRunoutputToSource.ts create mode 100644 src/components/player/utils/handleBuffered.ts create mode 100644 src/components/player/utils/mediaErrorDetails.ts create mode 100644 src/components/player/utils/videoTracks.ts create mode 100644 src/components/text-inputs/AuthInputBox.tsx create mode 100644 src/components/text-inputs/TextInputControl.tsx create mode 100644 src/components/text/ArrowLink.tsx create mode 100644 src/components/text/DotList.tsx create mode 100644 src/components/text/HeroTitle.tsx create mode 100644 src/components/text/Link.tsx create mode 100644 src/components/text/Paragraph.tsx create mode 100644 src/components/text/SecondaryLabel.tsx create mode 100644 src/components/text/Title.tsx create mode 100644 src/components/utils/Divider.tsx create mode 100644 src/components/utils/ErrorLine.tsx create mode 100644 src/components/utils/Flare.css create mode 100644 src/components/utils/Flare.tsx create mode 100644 src/components/utils/Lightbar.css create mode 100644 src/components/utils/Lightbar.tsx create mode 100644 src/components/utils/Ol.tsx create mode 100644 src/components/utils/Text.tsx create mode 100644 src/components/utils/Transition.tsx create mode 100644 src/hooks/auth/useAuth.ts create mode 100644 src/hooks/auth/useAuthData.ts create mode 100644 src/hooks/auth/useAuthRestore.ts create mode 100644 src/hooks/auth/useBackendUrl.ts create mode 100644 src/hooks/useChromecastAvailable.ts create mode 100644 src/hooks/useDebounce.ts create mode 100644 src/hooks/useIsMobile.ts create mode 100644 src/hooks/useOverlayRouter.ts create mode 100644 src/hooks/usePing.ts create mode 100644 src/hooks/useProgressBar.ts create mode 100644 src/hooks/useProviderScrape.tsx create mode 100644 src/hooks/useQueryParams.ts create mode 100644 src/hooks/useRandomTranslation.ts create mode 100644 src/hooks/useSearchQuery.ts create mode 100644 src/hooks/useSettingsState.ts create mode 100644 src/index.tsx create mode 100644 src/pages/About.tsx create mode 100644 src/pages/DeveloperPage.tsx create mode 100644 src/pages/Discover.tsx create mode 100644 src/pages/Dmca.tsx create mode 100644 src/pages/HomePage.tsx create mode 100644 src/pages/Jip.tsx create mode 100644 src/pages/Login.tsx create mode 100644 src/pages/PlayerView.tsx create mode 100644 src/pages/Register.tsx create mode 100644 src/pages/Settings.tsx create mode 100644 src/pages/Support.tsx create mode 100644 src/pages/admin/AdminPage.tsx create mode 100644 src/pages/developer/TestView.tsx create mode 100644 src/pages/developer/VideoTesterView.tsx create mode 100644 src/pages/errors/ErrorBoundary.tsx create mode 100644 src/pages/errors/MaintenancePage.tsx create mode 100644 src/pages/errors/NotFoundPage.tsx create mode 100644 src/pages/layouts/ErrorLayout.tsx create mode 100644 src/pages/layouts/HomeLayout.tsx create mode 100644 src/pages/layouts/MinimalPageLayout.tsx create mode 100644 src/pages/layouts/PageLayout.tsx create mode 100644 src/pages/layouts/SubPageLayout.tsx create mode 100644 src/pages/onboarding/Onboarding.tsx create mode 100644 src/pages/onboarding/OnboardingExtension.tsx create mode 100644 src/pages/onboarding/OnboardingProxy.tsx create mode 100644 src/pages/onboarding/onboardingHooks.ts create mode 100644 src/pages/onboarding/utils.tsx create mode 100644 src/pages/parts/admin/BackendTestPart.tsx create mode 100644 src/pages/parts/admin/ConfigValuesPart.tsx create mode 100644 src/pages/parts/admin/TMDBTestPart.tsx create mode 100644 src/pages/parts/admin/WorkerTestPart.tsx create mode 100644 src/pages/parts/auth/AccountCreatePart.tsx create mode 100644 src/pages/parts/auth/LoginFormPart.tsx create mode 100644 src/pages/parts/auth/PassphraseGeneratePart.tsx create mode 100644 src/pages/parts/auth/TrustBackendPart.tsx create mode 100644 src/pages/parts/auth/VerifyPassphrasePart.tsx create mode 100644 src/pages/parts/errors/ErrorCard.tsx create mode 100644 src/pages/parts/errors/ErrorPart.tsx create mode 100644 src/pages/parts/errors/NotFoundPart.tsx create mode 100644 src/pages/parts/home/BookmarksPart.tsx create mode 100644 src/pages/parts/home/HeroPart.tsx create mode 100644 src/pages/parts/home/WatchingPart.tsx create mode 100644 src/pages/parts/migrations/MigrationPart.tsx create mode 100644 src/pages/parts/player/MetaPart.tsx create mode 100644 src/pages/parts/player/PlaybackErrorPart.tsx create mode 100644 src/pages/parts/player/PlayerPart.tsx create mode 100644 src/pages/parts/player/ScrapeErrorPart.tsx create mode 100644 src/pages/parts/player/ScrapingPart.tsx create mode 100644 src/pages/parts/search/SearchListPart.tsx create mode 100644 src/pages/parts/search/SearchLoadingPart.tsx create mode 100644 src/pages/parts/settings/AccountActionsPart.tsx create mode 100644 src/pages/parts/settings/AccountEditPart.tsx create mode 100644 src/pages/parts/settings/AdminPanel.tsx create mode 100644 src/pages/parts/settings/CaptionsPart.tsx create mode 100644 src/pages/parts/settings/ConnectionsPart.tsx create mode 100644 src/pages/parts/settings/DeviceListPart.tsx create mode 100644 src/pages/parts/settings/PreferencesPart.tsx create mode 100644 src/pages/parts/settings/ProfileEditModal.tsx create mode 100644 src/pages/parts/settings/RegisterCalloutPart.tsx create mode 100644 src/pages/parts/settings/SetupPart.tsx create mode 100644 src/pages/parts/settings/SidebarPart.tsx create mode 100644 src/pages/parts/settings/ThemePart.tsx create mode 100644 src/pages/parts/util/LargeTextPart.tsx create mode 100644 src/pages/parts/util/PageTitle.tsx create mode 100644 src/pages/parts/util/WarningPart.tsx create mode 100644 src/setup/App.tsx create mode 100644 src/setup/Layout.tsx create mode 100644 src/setup/chromecast.ts create mode 100644 src/setup/config.ts create mode 100644 src/setup/constants.ts create mode 100644 src/setup/ga.ts create mode 100644 src/setup/i18n.ts create mode 100644 src/setup/pwa.ts create mode 100644 src/stores/__old/DONT_TOUCH_THIS_FOLDER create mode 100644 src/stores/__old/bookmark/store.ts create mode 100644 src/stores/__old/bookmark/types.ts create mode 100644 src/stores/__old/imports.ts create mode 100644 src/stores/__old/migrations.ts create mode 100644 src/stores/__old/settings/store.ts create mode 100644 src/stores/__old/settings/types.ts create mode 100644 src/stores/__old/utils.ts create mode 100644 src/stores/__old/volume/store.ts create mode 100644 src/stores/__old/watched/migrations/v2.ts create mode 100644 src/stores/__old/watched/migrations/v3.ts create mode 100644 src/stores/__old/watched/migrations/v4.ts create mode 100644 src/stores/__old/watched/store.ts create mode 100644 src/stores/__old/watched/types.ts create mode 100644 src/stores/auth/index.ts create mode 100644 src/stores/banner/BannerLocation.tsx create mode 100644 src/stores/banner/index.ts create mode 100644 src/stores/bookmarks/BookmarkSyncer.tsx create mode 100644 src/stores/bookmarks/index.ts create mode 100644 src/stores/history/index.ts create mode 100644 src/stores/language/index.tsx create mode 100644 src/stores/onboarding/index.tsx create mode 100644 src/stores/overlay/store.ts create mode 100644 src/stores/player/slices/casting.ts create mode 100644 src/stores/player/slices/display.ts create mode 100644 src/stores/player/slices/interface.ts create mode 100644 src/stores/player/slices/playing.ts create mode 100644 src/stores/player/slices/progress.ts create mode 100644 src/stores/player/slices/source.ts create mode 100644 src/stores/player/slices/thumbnails.ts create mode 100644 src/stores/player/slices/types.ts create mode 100644 src/stores/player/store.ts create mode 100644 src/stores/player/types.ts create mode 100644 src/stores/player/utils/qualities.ts create mode 100644 src/stores/preferences/index.tsx create mode 100644 src/stores/progress/ProgressSyncer.tsx create mode 100644 src/stores/progress/index.ts create mode 100644 src/stores/progress/utils.ts create mode 100644 src/stores/quality/index.ts create mode 100644 src/stores/subtitles/SettingsSyncer.tsx create mode 100644 src/stores/subtitles/index.ts create mode 100644 src/stores/theme/index.tsx create mode 100644 src/stores/turnstile/index.tsx create mode 100644 src/stores/volume/index.ts create mode 100644 src/utils/autoplay.ts create mode 100644 src/utils/cache.ts create mode 100644 src/utils/cdn.ts create mode 100644 src/utils/detectFeatures.ts create mode 100644 src/utils/discover.ts create mode 100644 src/utils/events.ts create mode 100644 src/utils/extension.ts create mode 100644 src/utils/formatSeconds.ts create mode 100644 src/utils/language.ts create mode 100644 src/utils/mediaTypes.ts create mode 100644 src/utils/onboarding.ts create mode 100644 src/utils/proxyUrls.ts create mode 100644 src/utils/setup/App.tsx create mode 100644 src/utils/setup/Layout.tsx create mode 100644 src/utils/setup/chromecast.ts create mode 100644 src/utils/setup/config.ts create mode 100644 src/utils/setup/constants.ts create mode 100644 src/utils/setup/ga.ts create mode 100644 src/utils/setup/i18n.ts create mode 100644 src/utils/setup/pwa.ts create mode 100644 src/utils/timestamp.ts create mode 100644 src/utils/typeguard.ts delete mode 100644 sw.js delete mode 100644 sw.js.map create mode 100644 tailwind.config.ts create mode 100644 themes/all.ts create mode 100644 themes/default.ts create mode 100644 themes/index.ts create mode 100644 themes/list/blck.ts create mode 100644 themes/list/blue.ts create mode 100644 themes/list/gray.ts create mode 100644 themes/list/red.ts create mode 100644 themes/list/teal.ts create mode 100644 themes/types.ts create mode 100644 tsconfig.json create mode 100644 vercel.json create mode 100644 vite.config.mts diff --git a/.bkp/CODE_OF_CONDUCT.md b/.bkp/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..3c612da --- /dev/null +++ b/.bkp/CODE_OF_CONDUCT.md @@ -0,0 +1,128 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +our [Discord](https://movie-web.github.io/links/discord). +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. \ No newline at end of file diff --git a/.bkp/README.md b/.bkp/README.md new file mode 100644 index 0000000..a71c88e --- /dev/null +++ b/.bkp/README.md @@ -0,0 +1,19 @@ +# film.kace.dev +film.kace.dev is a fork of movie-web with some changes... + +## philosophy +if digital purchase isn't ownership, then piracy isn't theft. + +## features +- automatic saving of progress - optionally synced to an account. +- bookmark shows or movies, keep track of what you want to watch. +- minimalistic interface that only shows whats required - no algorithm to consume you. + +## technologies + +![html](https://img.shields.io/badge/HTML5-E34F26?style=for-the-badge&logo=html5&logoColor=white) +![css](https://img.shields.io/badge/CSS3-1572B6?style=for-the-badge&logo=css3&logoColor=white) +![js](https://img.shields.io/badge/JavaScript-F7DF1E?style=for-the-badge&logo=JavaScript&logoColor=333) + + + diff --git a/.bkp/SECURITY.md b/.bkp/SECURITY.md new file mode 100644 index 0000000..dfb9a50 --- /dev/null +++ b/.bkp/SECURITY.md @@ -0,0 +1,10 @@ +# Security Policy + +## Supported Versions + +The latest version of movie-web is the only version that is supported, as it is the only version that is being actively developed. + +## Reporting a Vulnerability + +You can contact the movie-web maintainers to report a vulnerability: + - Report the vulnerability in the [movie-web Discord server](https://movie-web.github.io/links/discord) \ No newline at end of file diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..bb73799 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +.git +node_modules +build +.env.local +.github +.vscode diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..6c2eeb8 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,7 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true +indent_size = 2 +indent_style = space diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 0000000..e9b5459 --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,108 @@ +const a11yOff = Object.keys(require("eslint-plugin-jsx-a11y").rules).reduce( + (acc, rule) => { + acc[`jsx-a11y/${rule}`] = "off"; + return acc; + }, + {} +); + +module.exports = { + env: { + browser: true + }, + extends: [ + "airbnb", + "airbnb/hooks", + "plugin:@typescript-eslint/recommended", + "plugin:prettier/recommended" + ], + ignorePatterns: [ + "public/*", + "dist/*", + "/*.js", + "/*.ts", + "/*.mts", + "/plugins/*.ts", + "/plugins/*.mjs", + "/themes/**/*.ts" + ], + parser: "@typescript-eslint/parser", + parserOptions: { + project: "./tsconfig.json", + tsconfigRootDir: "./" + }, + settings: { + "import/resolver": { + typescript: { + project: "./tsconfig.json" + } + } + }, + plugins: ["@typescript-eslint", "import", "prettier"], + rules: { + "react/jsx-uses-react": "off", + "react/react-in-jsx-scope": "off", + "react/require-default-props": "off", + "react/destructuring-assignment": "off", + "no-underscore-dangle": "off", + "@typescript-eslint/no-explicit-any": "off", + "no-console": ["warn", { allow: ["warn", "error", "debug", "info"] }], + "@typescript-eslint/no-this-alias": "off", + "import/prefer-default-export": "off", + "@typescript-eslint/no-empty-function": "off", + "no-shadow": "off", + "@typescript-eslint/no-shadow": ["error"], + "no-restricted-syntax": "off", + "import/no-unresolved": ["error", { ignore: ["^virtual:"] }], + "react/jsx-props-no-spreading": "off", + "consistent-return": "off", + "no-continue": "off", + "no-eval": "off", + "no-await-in-loop": "off", + "no-nested-ternary": "off", + "prefer-destructuring": "off", + "no-param-reassign": "off", + "@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }], + "react/jsx-filename-extension": [ + "error", + { extensions: [".js", ".tsx", ".jsx"] } + ], + "import/extensions": [ + "error", + "ignorePackages", + { + ts: "never", + tsx: "never" + } + ], + "import/order": [ + "error", + { + groups: [ + "builtin", + "external", + "internal", + ["sibling", "parent"], + "index", + "unknown" + ], + "newlines-between": "always", + alphabetize: { + order: "asc", + caseInsensitive: true + } + } + ], + "sort-imports": [ + "error", + { + ignoreCase: false, + ignoreDeclarationSort: true, + ignoreMemberSort: false, + memberSyntaxSortOrder: ["none", "all", "multiple", "single"], + allowSeparatedGroups: true + } + ], + ...a11yOff + } +}; diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..6313b56 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..55dc5f0 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +* Maintainers: [MW-Exodus Team](https://github.com/MW-Legacy) +* Founder: (sussy-code)[https://github.com/sussy-code] diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..4732ee9 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,91 @@ +# Contributing Guidelines for sudo-flix + +Thank you for investing your time in contributing to our project! Your contribution will be reflected on all of the community hosted instances that are on the latest version. + +Please read our [Code of Conduct](./CODE_OF_CONDUCT.md) to keep our community approachable and respectable. + +## Contents +- [Contributing Guidelines for sudo-flix](#contributing-guidelines-for-sudo-flix) + - [Contents](#contents) + - [New contributor guide](#new-contributor-guide) + - [Requesting a feature or reporting a bug](#requesting-a-feature-or-reporting-a-bug) + - [Discord Server](#discord-server) + - [GitHub Issues](#github-issues) + - [Before you start!](#before-you-start) + - [Contributing](#contributing) + - [Recommended Development Environment](#recommended-development-environment) + - [Tips](#tips) + - [Language Contributions](#language-contributions) + +## New contributor guide + +To get an overview of the project, read the [README](README.md). Here are some resources to help you get started with open-source contributions: + +- [Finding ways to contribute to open-source on GitHub](https://docs.github.com/en/get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github) +- [Set up Git](https://docs.github.com/en/get-started/quickstart/set-up-git) +- [GitHub flow](https://docs.github.com/en/get-started/quickstart/github-flow) +- [Collaborating with pull requests](https://docs.github.com/en/github/collaborating-with-pull-requests) + + +## Requesting a feature or reporting a bug +There are two places where to request features or report bugs: + - GitHub Issues + - The sudo-flix Discord server + +### Discord Server +If you do not have a GitHub account or want to discuss a feature or bug with us before making an issue, you can join our Discord server. +[Join bruh](https://docs.undi.rest/links/discord) + +### GitHub Issues +To make a GitHub issue for sudo-flix, please visit the [new issue page](https://github.com/sussy-code/smov/issues/new/choose) where you can pick either the "Bug Report" or "Feature Request" template. + +When filling out an issue template, please include as much detail as possible and any screenshots or console logs as appropriate. + +After an issue is created, it will be assigned either the https://github.com/sussy-code/smov/labels/bug or https://github.com/sussy-code/smov/labels/feature label, along with https://github.com/sussy-code/smov/labels/awaiting-approval. One of our maintainers will review your issue and, if it's accepted, will set the https://github.com/sussy-code/smov/labels/approved label. + +## Before you start! +Before starting a contribution, please check your contribution is part of an open issue on [our issues page](https://github.com/sussy-code/smov/issues?q=is%3Aopen+is%3Aissue+label%3Aapproved). + +GitHub issues are how we track our bugs and feature requests that will be implemented into sudo-flix - all contributions **must** have an issue and be approved by a maintainer before a pull request can be worked on. + +If a pull request is opened before an issue is created and accepted, you may risk having your pull request rejected! Always check with us before starting work on a feature - we don't want to waste your time! + +> **Note** +> The exception to this are language contributions, which are discussed in [this section](#language-contributions) + +Also, make sure that the issue you would like to work on has been given the https://github.com/sussy-code/smov/labels/approved label by a maintainer. Otherwise, if we reject the issue, it means your work will have gone to waste! + +## Contributing +If you're here because you'd like to work on an issue, amazing! Thank you for even considering contributing to sudo-flix; it means a lot :heart: + +Firstly, make sure you've read the [Before you start!](#before-you-start) section! + +When you have found a GitHub issue you would like to work on, you can request to be assigned to the issue by commenting on the GitHub issue. + +If you are assigned to an issue but can't complete it for whatever reason, no problem! Just let us know, and we will open up the issue to have someone else assigned. + +### Recommended Development Environment +Our recommended development environment to work on sudo-flix is: +- [Visual Studio Code](https://code.visualstudio.com/) +- [ESLint Extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) +- [EditorConfig Extension](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig) + +When opening Visual Studio Code, you will be prompted to install our recommended extensions if they are not installed for you. + +Our project is set up to enforce formatting and code style standards using ESLint. + +### Tips +Here are some tips to make sure that your pull requests are :pinched_fingers: first time: + +- KISS - Keep It Simple Soldier! - Simple code makes readable and efficient code! +- Follow standard best practices for TypeScript and React. +- Keep as much as possible to the style of sudo-flix. Look around our codebase to familiarise yourself with how we do things! +- Ensure to take note of the ESLint errors and warnings! **Do not ignore them!** They are there for a reason. +- Test, test, test! Make sure you thoroughly test the features you are contributing. + +### Language Contributions +Language contributions help sudo-flix massively, allowing people worldwide to use our app! + +1. Create a new langague json file +2. Implement the langague file into settings +3. Thats it make a PR diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 0000000..3bf7111 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,50 @@ +name: Bug Report +description: File a bug report +title: "[Bug]: " +labels: ["bug", "awaiting-approval"] +assignees: [] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + + Please fill out with as much detail as possible + - type: textarea + id: what-happened + attributes: + label: What happened? + description: Also tell us, what did you expect to happen? + placeholder: Tell us what you see! + validations: + required: true + - type: dropdown + id: browsers + attributes: + label: What browsers are you seeing the problem on? + multiple: true + options: + - Firefox + - Chrome + - Safari + - Microsoft Edge + - Other (tell us in input box below) + - type: textarea + id: reproduce + attributes: + label: Steps to reproduce? + description: What steps have you taken to see the bug? (OPTIONAL) + placeholder: 1. ... + validations: + required: false + - type: textarea + id: other-info + attributes: + label: Other relevant information + description: | + Feel free to give us any more information that doesn't fit the above text boxes. + + Tip: You can attach files by clicking this textbox and dragging in files + validations: + required: false + diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml new file mode 100644 index 0000000..9d5bb8b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -0,0 +1,26 @@ +name: Feature Request +description: Suggest a new feature +title: "[Feature]: " +labels: ["feature", "awaiting-approval"] +assignees: [] +body: + - type: textarea + id: what-feature + attributes: + label: What feature do you want to add? + placeholder: A new button! + validations: + required: true + - type: textarea + id: why-feature + attributes: + label: Why do you want to have this feature? + placeholder: A new button! + validations: + required: true + - type: textarea + id: other-details + attributes: + label: Any other details to share? + validations: + required: false diff --git a/.github/README.md b/.github/README.md new file mode 100644 index 0000000..a71c88e --- /dev/null +++ b/.github/README.md @@ -0,0 +1,19 @@ +# film.kace.dev +film.kace.dev is a fork of movie-web with some changes... + +## philosophy +if digital purchase isn't ownership, then piracy isn't theft. + +## features +- automatic saving of progress - optionally synced to an account. +- bookmark shows or movies, keep track of what you want to watch. +- minimalistic interface that only shows whats required - no algorithm to consume you. + +## technologies + +![html](https://img.shields.io/badge/HTML5-E34F26?style=for-the-badge&logo=html5&logoColor=white) +![css](https://img.shields.io/badge/CSS3-1572B6?style=for-the-badge&logo=css3&logoColor=white) +![js](https://img.shields.io/badge/JavaScript-F7DF1E?style=for-the-badge&logo=JavaScript&logoColor=333) + + + diff --git a/.github/Sudo-Flix.png b/.github/Sudo-Flix.png new file mode 100644 index 0000000000000000000000000000000000000000..4bf156f6ba71f063b45fefb383abb69b2b7ffa98 GIT binary patch literal 14535 zcmcJ0Wl&tvvhLvS?he7--Gc^qcX#*TP6!Y@5Zv8^ySrPE;O-80=bWln_3G98d21ME zYR_J^dUy9~`MNtwNl_XJ9v>bA0wKwKmQVqKz^Z`n5wOs}e?_v6Y2bs@^s|Zr2;@Tz z0tJPFK+nLXphFPIodpCsHUfe8(m)^_r>r(*0pJH{6FF%K(8s@5Zbxwva0Slkv$iV; zgxvq{4VFTWOaNSjag$MyggJ!7#)0N7f`MrUfxz>9)U@1Gj6F%6TpTT|?aWEtyq(NR zz3iPppwB~v8oKD2EQqg5v_6m&E8lsMA@-};-%hW7vrS#X+xPW{*67IC%7}CYzUPrV zauB8$G&5wI6EPg-j^uF>zUufgQU`p2=CbEFE~$`dJNm#9tdsdQ?ffVpGQpy9gg%6O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yos6CGVcX4QEtUa%5A4nP%*M;&TP;P9YVHNPfe70iAe#1Ct=o=f4O_ zGdk!0H{)SIw_jXHJu&0-A$F9tc?Ohistv zAC(!(u&9tadwMZwNv;Rz#fK813-a0T%uK~Y&SJ9_1jaBJsW=%qOL+|`HpRXJ&*2S% zwzbV49#l+24lharh9SO$GQ~l*ag2_5yZouFionHR-?gSP^5F@$NGFZdnJ5A1+->8S zmuUf!(j3Ud>gp%#gH|;Jq`^9vK^dk%qd4;zAR;#p=y~n`-qHX}N*IF9)DqYcAr>f4 zk{vg+lBWvf>#a24f=k@(6yy}}i>IJ`;Bay=nSDXoSVLwBnkm^#;b0W>PUh!uwMwHW zAt}`s)=d9yXONdu$SAmwTnNB_euTb-tRWH!DVx;PaZmhaE!DUF4ekd(q%5_WuMSPQ zD{HmpFY3P}hcHGl&*|5*v4q8)@Dv=RIRpcGBNlNIK!do>h!p630gJKw^F0kPHL(O@ zfIu}l$0GwcZ$l{!HVzOM&DlVa-#Pp82<-;Ng5J#!BAj67{x{EpM26GN1QG_sgI7tN zIAW&^jKmOuxj{~&iBD+@gf3m*%M z=Sm9l|Fyv0(ahSy`~SZHI+U>vSn%op?BHf?Z|>@53{2|%KbvrJ|92BqKLI>o4eq}+ zPG%N-qV8^1jxHc^M@J`f7g7~t2Ukb?aikYT;2zR{_W)ymeB%EIcXUy6bhHDB8#{Oy flYUY$cQ7+|F?XSz^7an_?ghz6DoRv|83q3j`5U6c literal 0 HcmV?d00001 diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..3b6d63d --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,6 @@ +This pull request resolves #XXX + + - [ ] I have read and agreed to the [code of conduct](https://github.com/sussy-code/smov/blob/dev/.github/CODE_OF_CONDUCT.md). + - [ ] I have read and complied with the [contributing guidelines](https://github.com/sussy-code/smov/blob/dev/.github/CONTRIBUTING.md). + - [ ] I have tested all of my changes. + - Enter discord user: `` (we require this for the contributor role) diff --git a/.github/workflows/deploying.yml b/.github/workflows/deploying.yml new file mode 100644 index 0000000..a19c0ca --- /dev/null +++ b/.github/workflows/deploying.yml @@ -0,0 +1,181 @@ +name: Deploying + +on: + push: + branches: + - main + +jobs: + build_pwa: + name: Build PWA + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v2 + with: + version: 8 + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'pnpm' + + - name: Install pnpm packages + run: pnpm install + + - name: Build project + run: pnpm run build:pwa + + - name: Upload production-ready build files + uses: actions/upload-artifact@v4 + with: + name: pwa + path: ./dist + + build: + name: Build + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v2 + with: + version: 8 + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'pnpm' + + - name: Install pnpm packages + run: pnpm install + + - name: Build project + run: pnpm run build + + - name: Upload production-ready build files + uses: actions/upload-artifact@v4 + with: + name: normal + path: ./dist + + release: + name: Release + needs: [build, build_pwa] + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Download PWA artifact + uses: actions/download-artifact@v4 + with: + name: pwa + path: ./dist_pwa + + - name: Zip PWA files + run: cd dist_pwa && zip -r ../movie-web.pwa.zip . + + - name: Download normal artifact + uses: actions/download-artifact@v4 + with: + name: normal + path: ./dist_normal + + - name: Zip normal files + run: cd dist_normal && zip -r ../movie-web.zip . + + - name: Get version + id: package-version + uses: martinbeentjes/npm-get-version-action@main + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + PAT_TOKEN: ${{ secrets.PAT_TOKEN }} + with: + tag_name: ${{ steps.package-version.outputs.current-version }} + release_name: Movie web v${{ steps.package-version.outputs.current-version }} + draft: false + prerelease: false + + - name: Upload release (PWA) + uses: actions/upload-release-asset@v1 + env: + PAT_TOKEN: ${{ secrets.PAT_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./movie-web.pwa.zip + asset_name: movie-web.pwa.zip + asset_content_type: application/zip + + - name: Upload Release (Normal) + uses: actions/upload-release-asset@v1 + env: + PAT_TOKEN: ${{ secrets.PAT_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./movie-web.zip + asset_name: movie-web.zip + asset_content_type: application/zip + + registry: + name: Push to registry + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + id-token: write + + env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Docker buildx + uses: docker/setup-buildx-action@v3 + + - name: Get version + id: package-version + uses: martinbeentjes/npm-get-version-action@main + + - name: Log into registry ${{ env.REGISTRY }} + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.PAT_TOKEN }} + + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + flavor: | + latest=auto + tags: | + type=semver,pattern={{version}},value=v${{ steps.package-version.outputs.current-version }} + + - name: Build and push Docker image + id: build-and-push + uses: docker/build-push-action@v5 + with: + push: true + platforms: linux/amd64,linux/arm64 + context: . + labels: ${{ steps.meta.outputs.labels }} + tags: ${{ steps.meta.outputs.tags }} + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/.github/workflows/linting_testing.yml b/.github/workflows/linting_testing.yml new file mode 100644 index 0000000..993ea89 --- /dev/null +++ b/.github/workflows/linting_testing.yml @@ -0,0 +1,73 @@ +name: Linting and Testing + +on: + push: + branches: + - main + pull_request: + +jobs: + linting: + name: Run Linters + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v2 + with: + version: 8 + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'pnpm' + + - name: Install pnpm packages + run: pnpm install + + - name: Run ESLint + run: pnpm run lint + + building: + name: Build project + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v2 + with: + version: 8 + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'pnpm' + + - name: Install pnpm packages + run: pnpm install + + - name: Build Project + run: pnpm run build + + docker: + name: Build Docker + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Docker buildx + uses: docker/setup-buildx-action@v3 + + - name: Build Docker image + uses: docker/build-push-action@v5 + with: + push: false + context: . diff --git a/.gitignore b/.gitignore index 2db5d79..9259432 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,30 @@ -.bkp/ -/.vscode +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# production +/dist +dev-dist +/stats.html + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* + +# other package managers +yarn.lock +package-lock.json + +# config +.env diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..bf2e764 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +shamefully-hoist=true diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..118c0ef --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,6 @@ +{ + "recommendations": [ + "dbaeumer.vscode-eslint", + "editorconfig.editorconfig" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..741f0c0 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "editor.formatOnSave": true, + "editor.defaultFormatter": "dbaeumer.vscode-eslint", + "eslint.format.enable": true, + "[json]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[typescriptreact]": { + "editor.defaultFormatter": "dbaeumer.vscode-eslint" + } +} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..90587a9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,52 @@ +FROM node:20-alpine as build +WORKDIR /app +ENV PNPM_HOME="/pnpm" +ENV PATH="$PNPM_HOME:$PATH" +RUN corepack enable + +COPY package.json ./ +COPY pnpm-lock.yaml ./ +RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile + +ARG PWA_ENABLED="true" +ARG GA_ID +ARG APP_DOMAIN +ARG OPENSEARCH_ENABLED="false" +ARG TMDB_READ_API_KEY +ARG CORS_PROXY_URL +ARG DMCA_EMAIL +ARG NORMAL_ROUTER="false" +ARG BACKEND_URL +ARG HAS_ONBOARDING="false" +ARG ONBOARDING_CHROME_EXTENSION_INSTALL_LINK +ARG ONBOARDING_PROXY_INSTALL_LINK +ARG DISALLOWED_IDS +ARG CDN_REPLACEMENTS +ARG TURNSTILE_KEY +ARG ALLOW_AUTOPLAY="false" + +ENV VITE_PWA_ENABLED=${PWA_ENABLED} +ENV VITE_GA_ID=${GA_ID} +ENV VITE_APP_DOMAIN=${APP_DOMAIN} +ENV VITE_OPENSEARCH_ENABLED=${OPENSEARCH_ENABLED} +ENV VITE_TMDB_READ_API_KEY=${TMDB_READ_API_KEY} +ENV VITE_CORS_PROXY_URL=${CORS_PROXY_URL} +ENV VITE_DMCA_EMAIL=${DMCA_EMAIL} +ENV VITE_NORMAL_ROUTER=${NORMAL_ROUTER} +ENV VITE_BACKEND_URL=${BACKEND_URL} +ENV VITE_HAS_ONBOARDING=${HAS_ONBOARDING} +ENV VITE_ONBOARDING_CHROME_EXTENSION_INSTALL_LINK=${ONBOARDING_CHROME_EXTENSION_INSTALL_LINK} +ENV VITE_ONBOARDING_PROXY_INSTALL_LINK=${ONBOARDING_PROXY_INSTALL_LINK} +ENV VITE_DISALLOWED_IDS=${DISALLOWED_IDS} +ENV VITE_CDN_REPLACEMENTS=${CDN_REPLACEMENTS} +ENV VITE_TURNSTILE_KEY=${TURNSTILE_KEY} +ENV VITE_ALLOW_AUTOPLAY=${ALLOW_AUTOPLAY} + +COPY . ./ +RUN pnpm run build + +# production environment +FROM nginx:stable-alpine +COPY --from=build /app/dist /usr/share/nginx/html +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"] diff --git a/README.md b/README.md index a71c88e..aae9e35 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,61 @@ # film.kace.dev -film.kace.dev is a fork of movie-web with some changes... +film.kace.dev is an online streaming website for movies and tv shows.
+a predecessor to the late movie-web. ## philosophy -if digital purchase isn't ownership, then piracy isn't theft. +"culture shouldn't exist only for those who can afford it." ## features - automatic saving of progress - optionally synced to an account. - bookmark shows or movies, keep track of what you want to watch. - minimalistic interface that only shows whats required - no algorithm to consume you. +- no ads! - enjoy ad free content watching. + +## extension +due to the removal of the extension from both chromium and firefox the extension must now be installed locally.
+extension installation guide can be found [here](https://github.com/userkace/film-ext). + +## disclaimer +film.kace.dev does not host any files, it merely links to 3rd party services. Legal issues should be taken up with the file hosts and providers. film.kace.dev is not responsible for any media files shown by the video providers. ## technologies +![react](https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB) +![vite](https://img.shields.io/badge/Vite-0f0f0f?style=for-the-badge&logo=vite&logoColor=ffca22) ![html](https://img.shields.io/badge/HTML5-E34F26?style=for-the-badge&logo=html5&logoColor=white) ![css](https://img.shields.io/badge/CSS3-1572B6?style=for-the-badge&logo=css3&logoColor=white) -![js](https://img.shields.io/badge/JavaScript-F7DF1E?style=for-the-badge&logo=JavaScript&logoColor=333) +![ts](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge&logo=typescript&logoColor=white) +## links And resources +| service | link | source code | +|----------------|------------------------------------------------------------------|----------------------------------------------------------| +| Sudo-Flix Docs | [sudo-docs](https://docs.undi.rest) | [source code](https://github.com/sussy-code/docs) | +| Extension | [extension](https://docs.undi.rest/extension) | [source code](https://github.com/sussy-code/browser-ext) | +| Proxy | [sudo-proxy](https://sudo-proxy.up.railway.app) | [source code](https://github.com/sussy-code/sudo-proxy) | +| Backend | [sudo-backend](https://backend.undi.rest) | [source code](https://github.com/sussy-code/backend) | +| Frontend | [sudo-flix](https://docs.undi.rest/instances) | [source code](https://github.com/sussy-code/smov) | +| Weblate | [sudo-weblate](https://docs.undi.rest/links/weblate) | [source code](https://github.com/sussy-code/docs) | +## running Locally +Type the following commands into your terminal / command line to run Sudo-Flix locally +```bash +git clone https://github.com/sussy-code/smov.git +cd smov +git pull +pnpm install +pnpm run dev +``` +Then you can visit the local instance [here](http://localhost:5173) or, at local host on port 5173. +## updating a sudo-flix Instance +To update a sudo-flix instance you can type the below commands into a terminal at the root of your project. +```bash +git remote add upstream https://github.com/sussy-code/smov.git +git fetch upstream # Grab the contents of the new remote source +git checkout # Most likely this would be `origin/main` +git merge upstream/main +# * Fix any conflicts present during merge * +git add . # Add all changes made during merge and conflict fixing +git commit -m "Update sudo-flix instance (merge upstream/main)" +git push # Push to YOUR repository +``` diff --git a/assets/DeveloperPage--1rV1y1n.js b/assets/DeveloperPage--1rV1y1n.js deleted file mode 100644 index e9d0bb0..0000000 --- a/assets/DeveloperPage--1rV1y1n.js +++ /dev/null @@ -1,2 +0,0 @@ -import{j as t}from"./vendor-Dkz3gcSC.js";import{N as c,T as x,a as m}from"./index-DYBNcHgS.js";import{L as d}from"./react-dom-DpNJ2UNC.js";import{I as r,a as s}from"./Icons-Ct84pi7p.js";import"./auth-72H9TcpW.js";import"./caption-parsing-BABN6jyO.js";import"./locales-BXkJCeK5.js";import"./hls-2_Gpnevg.js";import"./language-db-DxKZVAm4.js";function o(e){const i=e.direction||"right",l=!!e.url,a=!!e.to,n=t.jsxs("span",{className:"group mt-1 inline-flex cursor-pointer items-center space-x-1 pr-1 font-bold text-type-link hover:text-type-linkHover active:scale-95",children:[i==="left"?t.jsx("span",{className:"text-xl transition-transform group-hover:-translate-x-1",children:t.jsx(r,{icon:s.ARROW_LEFT})}):null,t.jsx("span",{className:"flex-1",children:e.linkText}),i==="right"?t.jsx("span",{className:"text-xl transition-transform group-hover:translate-x-1",children:t.jsx(r,{icon:s.ARROW_RIGHT})}):null]});return l?t.jsx("a",{href:e.url,children:n}):a?t.jsx(d,{to:e.to,children:n}):t.jsx("span",{onClick:()=>e.onClick&&e.onClick(),children:n})}function N(){return t.jsxs("div",{className:"py-48",children:[t.jsx(c,{}),t.jsxs(x,{classNames:"flex flex-col space-y-4",children:[t.jsx(m,{children:"Developer tools"}),t.jsx(o,{to:"/dev/video",direction:"right",linkText:"Video tester"}),t.jsx(o,{to:"/dev/test",direction:"right",linkText:"Test page"})]})]})}export{N as default}; -//# sourceMappingURL=DeveloperPage--1rV1y1n.js.map diff --git a/assets/DeveloperPage--1rV1y1n.js.map b/assets/DeveloperPage--1rV1y1n.js.map deleted file mode 100644 index 8bb9f99..0000000 --- a/assets/DeveloperPage--1rV1y1n.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeveloperPage--1rV1y1n.js","sources":[],"sourcesContent":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/assets/Icons-7LetCtYR.css b/assets/Icons-7LetCtYR.css deleted file mode 100644 index 0476746..0000000 --- a/assets/Icons-7LetCtYR.css +++ /dev/null @@ -1 +0,0 @@ -.fib,.fi{background-size:contain;background-position:50%;background-repeat:no-repeat}.fi{position:relative;display:inline-block;width:1.333333em;line-height:1em}.fi:before{content:" "}.fi.fis{width:1em}.fi-xx{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-xx'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20stroke='%23adb5bd'%20stroke-width='1.1'%20d='M.5.5h638.9v478.9H.5z'/%3e%3cpath%20fill='none'%20stroke='%23adb5bd'%20stroke-width='1.1'%20d='m.5.5%20639%20479m0-479-639%20479'/%3e%3c/svg%3e")}.fi-xx.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-xx'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20stroke='%23adb5bd'%20d='M.5.5h511v511H.5z'/%3e%3cpath%20fill='none'%20stroke='%23adb5bd'%20d='m.5.5%20511%20511m0-511-511%20511'/%3e%3c/svg%3e")}.fi-ad{background-image:url(/assets/ad-BOo-tPI4.svg)}.fi-ad.fis{background-image:url(/assets/ad-CDtWnnSA.svg)}.fi-ae{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ae'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%2300732f'%20d='M0%200h640v160H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20160h640v160H0z'/%3e%3cpath%20fill='%23000001'%20d='M0%20320h640v160H0z'/%3e%3cpath%20fill='red'%20d='M0%200h220v480H0z'/%3e%3c/svg%3e")}.fi-ae.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ae'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%2300732f'%20d='M0%200h512v170.7H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20170.7h512v170.6H0z'/%3e%3cpath%20fill='%23000001'%20d='M0%20341.3h512V512H0z'/%3e%3cpath%20fill='red'%20d='M0%200h180v512H0z'/%3e%3c/svg%3e")}.fi-af{background-image:url(/assets/af-BReSbsTq.svg)}.fi-af.fis{background-image:url(/assets/af-Cc32fsDB.svg)}.fi-ag{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ag'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='ag-a'%3e%3cpath%20fill-opacity='.7'%20d='M-79.7%200H603v512H-79.7z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23ag-a)'%20transform='translate(74.7)scale(.9375)'%3e%3cpath%20fill='%23fff'%20d='M-79.7%200H603v512H-79.7z'/%3e%3cpath%20fill='%23000001'%20d='M-79.6%200H603v204.8H-79.7z'/%3e%3cpath%20fill='%230072c6'%20d='M21.3%20203.2h480v112h-480z'/%3e%3cpath%20fill='%23ce1126'%20d='M603%20.1V512H261.6L603%200zM-79.7.1V512h341.3L-79.7%200z'/%3e%3cpath%20fill='%23fcd116'%20d='M440.4%20203.3%20364%20184l64.9-49-79.7%2011.4%2041-69.5-70.7%2041L332.3%2037l-47.9%2063.8-19.3-74-21.7%2076.3-47.8-65%2013.7%2083.2L138.5%2078l41%2069.5-77.4-12.5%2063.8%2047.8L86%20203.3z'/%3e%3c/g%3e%3c/svg%3e")}.fi-ag.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ag'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='ag-a'%3e%3cpath%20fill='%2325ff01'%20d='M109%2047.6h464.8v464.9H109z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23ag-a)'%20transform='translate(-120%20-52.4)scale(1.1014)'%3e%3cpath%20fill='%23fff'%20d='M0%2047.6h693V512H0z'/%3e%3cpath%20fill='%23000001'%20d='M109%2047.6h464.8v186.1H109z'/%3e%3cpath%20fill='%230072c6'%20d='M128.3%20232.1h435.8v103.5H128.3z'/%3e%3cpath%20fill='%23ce1126'%20d='M692.5%2049.2v463.3H347zm-691.3%200v463.3h345.7z'/%3e%3cpath%20fill='%23fcd116'%20d='m508.8%20232.2-69.3-17.6%2059-44.4-72.5%2010.3%2037.3-63-64.1%2037.2%2011.3-73.5-43.4%2058-17.6-67.3-19.6%2069.3-43.4-59%2012.4%2075.6-64.1-39.3%2037.2%2063-70.3-11.3%2057.9%2043.4-72.4%2018.6z'/%3e%3c/g%3e%3c/svg%3e")}.fi-ai{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-ai'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cpath%20id='ai-b'%20fill='%23f90'%20d='M271%2087c1.5%203.6%206.5%207.6%207.8%209.6-1.7%202-2%201.8-1.8%205.4%203-3.1%203-3.5%205-3%204.2%204.2.8%2013.3-2.8%2015.3-3.4%202.1-2.8%200-8%202.6%202.3%202%205.1-.3%207.4.3%201.2%201.5-.6%204.1.4%206.7%202-.2%201.8-4.3%202.2-5.8%201.5-5.4%2010.4-9.1%2010.8-14.1%201.9-.9%203.7-.3%206%201-1.1-4.6-4.9-4.6-5.9-6-2.4-3.7-4.5-7.8-9.6-9-3.8-.7-3.5.3-6-1.4-1.6-1.2-6.3-3.4-5.5-1.6'/%3e%3c/defs%3e%3cclipPath%20id='ai-a'%3e%3cpath%20d='M0%200v120h373.3v120H320zm320%200H160v280H0v-40z'/%3e%3c/clipPath%3e%3cpath%20fill='%23012169'%20d='M0%200h640v480H0z'/%3e%3cpath%20stroke='%23fff'%20stroke-width='50'%20d='m0%200%20320%20240m0-240L0%20240'/%3e%3cpath%20stroke='%23c8102e'%20stroke-width='30'%20d='m0%200%20320%20240m0-240L0%20240'%20clip-path='url(%23ai-a)'/%3e%3cpath%20stroke='%23fff'%20stroke-width='75'%20d='M160%200v280M0%20120h373.3'/%3e%3cpath%20stroke='%23c8102e'%20stroke-width='50'%20d='M160%200v280M0%20120h373.3'/%3e%3cpath%20fill='%23012169'%20d='M0%20240h320V0h106.7v320H0z'/%3e%3cpath%20fill='%23fff'%20d='M424%20191.8c0%2090.4%209.7%20121.5%2029.3%20142.5a179.4%20179.4%200%200%200%2035%2030%20179.7%20179.7%200%200%200%2035-30c19.5-21%2029.3-52.1%2029.3-142.5-14.2%206.5-22.3%209.7-34%209.5a78.4%2078.4%200%200%201-30.3-9.5%2078.4%2078.4%200%200%201-30.3%209.5c-11.7.2-19.8-3-34-9.5'/%3e%3cg%20transform='matrix(1.96%200%200%202.002%20-40.8%2062.9)'%3e%3cuse%20xlink:href='%23ai-b'/%3e%3ccircle%20cx='281.3'%20cy='91.1'%20r='.8'%20fill='%23fff'%20fill-rule='evenodd'/%3e%3c/g%3e%3cg%20transform='matrix(-.916%20-1.77%201.733%20-.935%20563.4%20829)'%3e%3cuse%20xlink:href='%23ai-b'/%3e%3ccircle%20cx='281.3'%20cy='91.1'%20r='.8'%20fill='%23fff'%20fill-rule='evenodd'/%3e%3c/g%3e%3cg%20transform='matrix(-1.01%201.716%20-1.68%20-1.031%20925.4%20-103.2)'%3e%3cuse%20xlink:href='%23ai-b'/%3e%3ccircle%20cx='281.3'%20cy='91.1'%20r='.8'%20fill='%23fff'%20fill-rule='evenodd'/%3e%3c/g%3e%3cpath%20fill='%239cf'%20d='M440%20315.1a78%2078%200%200%200%2013.3%2019.2%20179.4%20179.4%200%200%200%2035%2030%20180%20180%200%200%200%2035-30%2078%2078%200%200%200%2013.2-19.2z'/%3e%3cpath%20fill='%23fdc301'%20d='M421.2%20188.2c0%2094.2%2010.2%20126.6%2030.6%20148.5a187%20187%200%200%200%2036.5%2031.1%20186.3%20186.3%200%200%200%2036.4-31.1c20.4-21.9%2030.6-54.3%2030.6-148.5-14.8%206.8-23.3%2010.1-35.5%2010-11-.3-22.6-5.7-31.5-10-9%204.3-20.6%209.7-31.5%2010-12.3.1-20.7-3.2-35.6-10m4%205c14%206.5%2022%209.6%2033.5%209.4a76.4%2076.4%200%200%200%2029.6-9.4c8.4%204%2019.3%209.2%2029.6%209.4%2011.5.2%2019.4-3%2033.4-9.4%200%2089-9.6%20119.6-28.8%20140.2a176%20176%200%200%201-34.2%2029.4%20175.6%20175.6%200%200%201-34.3-29.4c-19.2-20.6-28.7-51.3-28.7-140.2z'/%3e%3c/svg%3e")}.fi-ai.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-ai'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cpath%20id='ai-b'%20fill='%23f90'%20d='M271%2087c1.5%203.6%206.5%207.6%207.8%209.6-1.7%202-2%201.8-1.8%205.4%203-3.1%203-3.5%205-3%204.2%204.2.8%2013.3-2.8%2015.3-3.4%202.1-2.8%200-8%202.6%202.3%202%205.1-.3%207.4.3%201.2%201.5-.6%204.1.4%206.7%202-.2%201.8-4.3%202.2-5.8%201.5-5.4%2010.4-9.1%2010.8-14.1%201.9-.9%203.7-.3%206%201-1.1-4.6-4.9-4.6-5.9-6-2.4-3.7-4.5-7.8-9.6-9-3.8-.7-3.5.3-6-1.4-1.6-1.2-6.3-3.4-5.5-1.6'/%3e%3c/defs%3e%3cclipPath%20id='ai-a'%3e%3cpath%20d='M0%200v128h298.7v128H256zm256%200H128v298.7H0V256z'/%3e%3c/clipPath%3e%3cpath%20fill='%23012169'%20d='M0%200h512v512H0z'/%3e%3cpath%20stroke='%23fff'%20stroke-width='50'%20d='m0%200%20256%20256m0-256L0%20256'/%3e%3cpath%20stroke='%23c8102e'%20stroke-width='30'%20d='m0%200%20256%20256m0-256L0%20256'%20clip-path='url(%23ai-a)'/%3e%3cpath%20stroke='%23fff'%20stroke-width='75'%20d='M128%200v298.7M0%20128h298.7'/%3e%3cpath%20stroke='%23c8102e'%20stroke-width='50'%20d='M128%200v298.7M0%20128h298.7'/%3e%3cpath%20fill='%23012169'%20d='M0%20256h256V0h85.3v341.3H0z'/%3e%3cpath%20fill='%23fff'%20d='M323.6%20224.1c0%2090.4%209.8%20121.5%2029.4%20142.5a179.4%20179.4%200%200%200%2035%2030%20179.7%20179.7%200%200%200%2035-30c19.5-21%2029.3-52.1%2029.3-142.5-14.2%206.5-22.3%209.7-34%209.5a78.4%2078.4%200%200%201-30.3-9.5%2078.4%2078.4%200%200%201-30.3%209.5c-11.7.2-19.8-3-34-9.5z'/%3e%3cg%20transform='matrix(1.96%200%200%202.002%20-141.1%2095.2)'%3e%3cuse%20xlink:href='%23ai-b'/%3e%3ccircle%20cx='281.3'%20cy='91.1'%20r='.8'%20fill='%23fff'%20fill-rule='evenodd'/%3e%3c/g%3e%3cg%20transform='matrix(-.916%20-1.77%201.733%20-.935%20463.1%20861.4)'%3e%3cuse%20xlink:href='%23ai-b'/%3e%3ccircle%20cx='281.3'%20cy='91.1'%20r='.8'%20fill='%23fff'%20fill-rule='evenodd'/%3e%3c/g%3e%3cg%20transform='matrix(-1.01%201.716%20-1.68%20-1.031%20825%20-71)'%3e%3cuse%20xlink:href='%23ai-b'/%3e%3ccircle%20cx='281.3'%20cy='91.1'%20r='.8'%20fill='%23fff'%20fill-rule='evenodd'/%3e%3c/g%3e%3cpath%20fill='%239cf'%20d='M339.8%20347.4a78%2078%200%200%200%2013.2%2019.2%20179.4%20179.4%200%200%200%2035%2030%20180%20180%200%200%200%2035-30%2078%2078%200%200%200%2013.2-19.2z'/%3e%3cpath%20fill='%23fdc301'%20d='M321%20220.5c0%2094.2%2010.1%20126.6%2030.5%20148.5a187%20187%200%200%200%2036.5%2031%20186.3%20186.3%200%200%200%2036.4-31.1C444.8%20347%20455%20314.7%20455%20220.5c-14.8%206.8-23.3%2010.1-35.5%2010-11-.3-22.6-5.7-31.5-10-9%204.3-20.6%209.7-31.5%2010-12.3.1-20.7-3.2-35.6-10zm4%205c13.9%206.5%2021.9%209.6%2033.4%209.4a76.4%2076.4%200%200%200%2029.6-9.4c8.4%204%2019.3%209.2%2029.6%209.4%2011.5.2%2019.4-3%2033.4-9.4%200%2089-9.6%20119.6-28.8%20140.2a176%20176%200%200%201-34.2%2029.4%20175.6%20175.6%200%200%201-34.3-29.4c-19.2-20.6-28.7-51.3-28.7-140.2'/%3e%3c/svg%3e")}.fi-al{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-al'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='red'%20d='M0%200h640v480H0z'/%3e%3cpath%20id='al-a'%20fill='%23000001'%20d='M272%2093.3c-4.6%200-12.3%201.5-12.2%205-13-2.1-14.3%203.2-13.5%208%201.2-1.9%202.7-3%203.9-3.1%201.7-.3%203.5.3%205.4%201.4a21.6%2021.6%200%200%201%204.8%204.1c-4.6%201.1-8.2.4-11.8-.2a16.5%2016.5%200%200%201-5.7-2.4c-1.5-1-2-2-4.3-4.3-2.7-2.8-5.6-2-4.7%202.3%202.1%204%205.6%205.8%2010%206.6%202.1.3%205.3%201%208.9%201%203.6%200%207.6-.5%209.8%200-1.3.8-2.8%202.3-5.8%202.8-3%20.6-7.5-1.8-10.3-2.4.3%202.3%203.3%204.5%209.1%205.7%209.6%202%2017.5%203.6%2022.8%206.5a37.3%2037.3%200%200%201%2010.9%209.2c4.7%205.5%205%209.8%205.2%2010.8%201%208.8-2.1%2013.8-7.9%2015.4-2.8.7-8-.7-9.8-2.9-2-2.2-3.7-6-3.2-12%20.5-2.2%203.1-8.3.9-9.5a273.7%20273.7%200%200%200-32.3-15.1c-2.5-1-4.5%202.4-5.3%203.8a50.2%2050.2%200%200%201-36-23.7c-4.2-7.6-11.3%200-10.1%207.3%201.9%208%208%2013.8%2015.4%2018%207.5%204.1%2017%208.2%2026.5%208%205.2%201%205.1%207.6-1%208.9-12.1%200-21.8-.2-30.9-9-6.9-6.3-10.7%201.2-8.8%205.4%203.4%2013.1%2022.1%2016.8%2041%2012.6%207.4-1.2%203%206.6%201%206.7-8%205.7-22.1%2011.2-34.6%200-5.7-4.4-9.6-.8-7.4%205.5%205.5%2016.5%2026.7%2013%2041.2%205%203.7-2.1%207.1%202.7%202.6%206.4-18.1%2012.6-27.1%2012.8-35.3%208-10.2-4.1-11%207.2-5%2011%206.7%204%2023.8%201%2036.4-7%205.4-4%205.6%202.3%202.2%204.8-14.9%2012.9-20.8%2016.3-36.3%2014.2-7.7-.6-7.6%208.9-1.6%2012.6%208.3%205.1%2024.5-3.3%2037-13.8%205.3-2.8%206.2%201.8%203.6%207.3a53.9%2053.9%200%200%201-21.8%2018c-7%202.7-13.6%202.3-18.3.7-5.8-2-6.5%204-3.3%209.4%201.9%203.3%209.8%204.3%2018.4%201.3%208.6-3%2017.8-10.2%2024.1-18.5%205.5-4.9%204.9%201.6%202.3%206.2-12.6%2020-24.2%2027.4-39.5%2026.2-6.7-1.2-8.3%204-4%209%207.6%206.2%2017%206%2025.4-.2%207.3-7%2021.4-22.4%2028.8-30.6%205.2-4.1%206.9%200%205.3%208.4-1.4%204.8-4.8%2010-14.3%2013.6-6.5%203.7-1.6%208.8%203.2%209%202.7%200%208.1-3.2%2012.3-7.8%205.4-6.2%205.8-10.3%208.8-19.9%202.8-4.6%207.9-2.4%207.9%202.4-2.5%209.6-4.5%2011.3-9.5%2015.2-4.7%204.5%203.3%206%206%204.1%207.8-5.2%2010.6-12%2013.2-18.2%202-4.4%207.4-2.3%204.8%205-6%2017.4-16%2024.2-33.3%2027.8-1.7.3-2.8%201.3-2.2%203.3l7%207c-10.7%203.2-19.4%205-30.2%208l-14.8-9.8c-1.3-3.2-2-8.2-9.8-4.7-5.2-2.4-7.7-1.5-10.6%201%204.2%200%206%201.2%207.7%203.1%202.2%205.7%207.2%206.3%2012.3%204.7%203.3%202.7%205%204.9%208.4%207.7l-16.7-.5c-6-6.3-10.6-6-14.8-1-3.3.5-4.6.5-6.8%204.4%203.4-1.4%205.6-1.8%207.1-.3%206.3%203.7%2010.4%202.9%2013.5%200l17.5%201.1c-2.2%202-5.2%203-7.5%204.8-9-2.6-13.8%201-15.4%208.3a17%2017%200%200%200-1.2%209.3c.8-3%202.3-5.5%204.9-7%208%202%2011-1.3%2011.5-6.1%204-3.2%209.8-3.9%2013.7-7.1%204.6%201.4%206.8%202.3%2011.4%203.8%201.6%205%205.3%206.9%2011.3%205.6%207%20.2%205.8%203.2%206.4%205.5%202-3.3%201.9-6.6-2.5-9.6-1.6-4.3-5.2-6.3-9.8-3.8-4.4-1.2-5.5-3-9.9-4.3%2011-3.5%2018.8-4.3%2029.8-7.8l7.7%206.8c1.5.9%202.9%201.1%203.8%200%206.9-10%2010-18.7%2016.3-25.3%202.5-2.8%205.6-6.4%209-7.3%201.7-.5%203.8-.2%205.2%201.3%201.3%201.4%202.4%204.1%202%208.2-.7%205.7-2.1%207.6-3.7%2011-1.7%203.5-3.6%205.6-5.7%208.3-4%205.3-9.4%208.4-12.6%2010.5-6.4%204.1-9%202.3-14%202-6.4.7-8%203.8-2.8%208.1%204.8%202.6%209.2%202.9%2012.8%202.2%203-.6%206.6-4.5%209.2-6.6%202.8-3.3%207.6.6%204.3%204.5-5.9%207-11.7%2011.6-19%2011.5-7.7%201-6.2%205.3-1.2%207.4%209.2%203.7%2017.4-3.3%2021.6-8%203.2-3.5%205.5-3.6%205%201.9-3.3%209.9-7.6%2013.7-14.8%2014.2-5.8-.6-5.9%204-1.6%207%209.6%206.6%2016.6-4.8%2019.9-11.6%202.3-6.2%205.9-3.3%206.3%201.8%200%206.9-3%2012.4-11.3%2019.4%206.3%2010.1%2013.7%2020.4%2020%2030.5l19.2-214L320%20139c-2-1.8-8.8-9.8-10.5-11-.7-.6-1-1-.1-1.4.9-.4%203-.8%204.5-1-4-4.1-7.6-5.4-15.3-7.6%201.9-.8%203.7-.4%209.3-.6a30.2%2030.2%200%200%200-13.5-10.2c4.2-3%205-3.2%209.2-6.7a86.3%2086.3%200%200%201-19.5-3.8%2037.4%2037.4%200%200%200-12-3.4zm.8%208.4c3.8%200%206.1%201.3%206.1%202.9%200%201.6-2.3%202.9-6.1%202.9s-6.2-1.5-6.2-3c0-1.6%202.4-2.8%206.2-2.8'/%3e%3cuse%20xlink:href='%23al-a'%20width='100%25'%20height='100%25'%20transform='matrix(-1%200%200%201%20640%200)'/%3e%3c/svg%3e")}.fi-al.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-al'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='red'%20d='M0%200h512v512H0z'/%3e%3cpath%20id='al-a'%20fill='%23000001'%20d='M204.9%2099.5c-5%200-13.2%201.6-13%205.4-14-2.3-15.4%203.4-14.6%208.5%201.4-2%203-3.1%204.2-3.3%201.9-.3%203.8.3%205.8%201.5a23%2023%200%200%201%205%204.4c-4.8%201.1-8.6.4-12.4-.3a17.6%2017.6%200%200%201-6.1-2.5c-1.6-1.1-2.1-2.1-4.6-4.7-2.9-3-6-2.1-5%202.5%202.2%204.3%206%206.3%2010.7%207%202.2.4%205.6%201.2%209.4%201.2%203.8%200%208.1-.5%2010.5%200-1.4.8-3%202.4-6.2%203-3.2.6-8-2-11-2.6.4%202.5%203.5%204.8%209.7%206%2010.2%202.2%2018.7%204%2024.3%207%205.6%203%209.1%206.8%2011.6%209.8%205%206%205.3%2010.5%205.6%2011.5%201%209.5-2.2%2014.8-8.4%2016.4-3%20.8-8.5-.7-10.5-3-2-2.4-4-6.4-3.4-12.7.5-2.5%203.4-9%201-10.3a291.6%20291.6%200%200%200-34.4-16c-2.7-1.1-5%202.5-5.8%204A53.5%2053.5%200%200%201%20129%20107c-4.6-8.1-12.1%200-10.9%207.7%202.1%208.6%208.6%2014.8%2016.5%2019.2%208%204.5%2018.1%208.8%2028.3%208.6%205.5%201%205.5%208.2-1.1%209.5-13%200-23.2-.2-32.9-9.6-7.4-6.7-11.5%201.3-9.4%205.8%203.6%2014%2023.6%2018%2043.8%2013.4%207.8-1.3%203.1%207%20.9%207.2-8.4%206-23.5%2012-36.8-.1-6.1-4.7-10.2-.7-8%206%206%2017.5%2028.5%2013.8%2044%205.2%204-2.2%207.6%203%202.7%206.9-19.2%2013.4-28.9%2013.6-37.6%208.4-10.8-4.3-11.8%207.8-5.3%2011.8%207.2%204.4%2025.4%201%2038.9-7.4%205.7-4.2%206%202.4%202.3%205-15.9%2013.8-22.2%2017.5-38.8%2015.2-8.2-.6-8%209.5-1.6%2013.5%208.8%205.4%2026.1-3.6%2039.5-14.7%205.6-3%206.6%202%203.8%207.8a57.4%2057.4%200%200%201-23.3%2019.2%2029.1%2029.1%200%200%201-19.5.7c-6.2-2.2-7%204.2-3.6%2010%202%203.5%2010.6%204.7%2019.7%201.4%209.2-3.2%2019-10.8%2025.7-19.8%206-5.1%205.2%201.8%202.5%206.7-13.5%2021.3-25.9%2029.2-42.1%2027.9-7.3-1.2-8.9%204.4-4.3%209.6%208%206.7%2018.2%206.4%2027-.2a751%20751%200%200%200%2030.8-32.6c5.5-4.4%207.3%200%205.7%209-1.5%205.1-5.2%2010.5-15.3%2014.5-7%204-1.8%209.4%203.4%209.5%202.9%200%208.7-3.3%2013-8.3%205.9-6.5%206.2-11%209.5-21.1%203-5%208.4-2.7%208.4%202.5-2.6%2010.2-4.8%2012-10%2016.2-5.1%204.7%203.4%206.3%206.3%204.4%208.3-5.6%2011.3-12.8%2014.1-19.4%202-4.8%207.8-2.5%205.1%205.3-6.4%2018.5-17%2025.8-35.5%2029.6-1.9.3-3%201.4-2.4%203.6l7.5%207.5c-11.5%203.3-20.8%205.2-32.2%208.5L142%20300.6c-1.5-3.4-2.2-8.7-10.4-5-5.7-2.6-8.2-1.6-11.4%201%204.5.1%206.5%201.3%208.3%203.4%202.3%206%207.6%206.6%2013%205%203.5%202.9%205.4%205.2%209%208.2l-17.8-.6c-6.3-6.7-11.3-6.3-15.8-1-3.5.5-5%20.5-7.3%204.7%203.7-1.5%206-2%207.7-.3%206.6%203.9%2011%203%2014.3%200l18.7%201.1c-2.3%202-5.6%203.1-8%205.2-9.7-2.8-14.7%201-16.4%208.8a18.2%2018.2%200%200%200-1.4%2010c1-3.2%202.5-5.9%205.3-7.6%208.6%202.2%2011.8-1.3%2012.3-6.5%204.2-3.4%2010.5-4.1%2014.6-7.6%204.9%201.6%207.2%202.6%2012.1%204.1%201.7%205.3%205.7%207.4%2012%206%207.7.3%206.3%203.4%207%205.9%202-3.6%202-7-2.8-10.3-1.7-4.6-5.5-6.7-10.4-4-4.7-1.3-5.9-3.2-10.5-4.6%2011.7-3.7%2020-4.5%2031.8-8.3%203%202.8%205.2%204.8%208.2%207.2%201.6%201%203%201.2%204%200%207.3-10.6%2010.6-20%2017.4-27%202.6-2.9%206-6.8%209.6-7.8%201.8-.4%204-.2%205.5%201.4%201.4%201.6%202.6%204.4%202%208.7-.6%206.2-2%208.2-3.8%2011.8-1.7%203.7-3.9%206-6%208.8-4.4%205.7-10.1%209-13.5%2011.2-6.8%204.4-9.7%202.5-15%202.2-6.7.8-8.5%204.1-3%208.7a21%2021%200%200%200%2013.7%202.3c3.3-.6%207-4.8%209.8-7%203-3.6%208.1.6%204.7%204.7-6.3%207.5-12.6%2012.4-20.3%2012.3-8.2%201-6.7%205.7-1.3%207.9%209.8%204%2018.6-3.5%2023-8.5%203.5-3.7%206-3.9%205.3%202-3.4%2010.5-8.1%2014.6-15.7%2015.1-6.2-.5-6.3%204.2-1.7%207.5%2010.3%207%2017.7-5%2021.2-12.4%202.5-6.6%206.3-3.5%206.7%202%200%207.3-3.2%2013.2-12%2020.7%206.7%2010.7%2014.5%2021.7%2021.3%2032.5l20.5-228.2-20.5-36c-2.1-2-9.3-10.5-11.2-11.7-.7-.7-1.1-1.2-.1-1.6%201-.4%203.2-.8%204.8-1-4.4-4.4-8-5.8-16.3-8.2%202-.8%204-.3%209.9-.6a32.3%2032.3%200%200%200-14.4-11c4.5-3%205.3-3.3%209.8-7-7.7-.6-14.3-2-20.8-4a41%2041%200%200%200-12.8-3.7m.7%209c4%200%206.6%201.4%206.6%203%200%201.7-2.5%203.1-6.6%203.1-4%200-6.6-1.5-6.6-3.2%200-1.7%202.6-3%206.6-3z'/%3e%3cuse%20xlink:href='%23al-a'%20width='100%25'%20height='100%25'%20transform='matrix(-1%200%200%201%20512%200)'/%3e%3c/svg%3e")}.fi-am{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-am'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23d90012'%20d='M0%200h640v160H0z'/%3e%3cpath%20fill='%230033a0'%20d='M0%20160h640v160H0z'/%3e%3cpath%20fill='%23f2a800'%20d='M0%20320h640v160H0z'/%3e%3c/svg%3e")}.fi-am.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-am'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23d90012'%20d='M0%200h512v170.7H0z'/%3e%3cpath%20fill='%230033a0'%20d='M0%20170.7h512v170.6H0z'/%3e%3cpath%20fill='%23f2a800'%20d='M0%20341.3h512V512H0z'/%3e%3c/svg%3e")}.fi-ao{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ao'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='red'%20d='M0%200h640v243.6H0z'/%3e%3cpath%20fill='%23000001'%20d='M0%20236.4h640V480H0z'/%3e%3c/g%3e%3cpath%20fill='%23ffec00'%20fill-rule='evenodd'%20d='M228.7%20148.2c165.2%2043.3%2059%20255.6-71.3%20167.2l-8.8%2013.6c76.7%2054.6%20152.6%2010.6%20174-46.4%2022.2-58.8-7.6-141.5-92.6-150z'/%3e%3cpath%20fill='%23ffec00'%20fill-rule='evenodd'%20d='m170%20330.8%2021.7%2010.1-10.2%2021.8-21.7-10.2zm149-99.5h24v24h-24zm-11.7-38.9%2022.3-8.6%208.7%2022.3-22.3%208.7zm-26-29.1%2017.1-16.9%2016.9%2017-17%2016.9zm-26.2-39.8%2022.4%208.4-8.5%2022.4-22.4-8.4zM316%20270l22.3%208.9-9%2022.2-22.2-8.9zm-69.9%2070%2022-9.3%209.5%2022-22%209.4zm-39.5%202.8h24v24h-24zm41.3-116-20.3-15-20.3%2014.6%208-23-20.3-15h24.5l8.5-22.6%207.8%2022.7%2024.7-.3-19.6%2015.3z'/%3e%3cpath%20fill='%23fe0'%20fill-rule='evenodd'%20d='M336%20346.4c-1.2.4-6.2%2012.4-9.7%2018.2l3.7%201c13.6%204.8%2020.4%209.2%2026.2%2017.5a7.9%207.9%200%200%200%2010.2.7s2.8-1%206.4-5c3-4.5%202.2-8-1.4-11.1-11-8-22.9-14-35.4-21.3'/%3e%3cpath%20fill='%23000001'%20fill-rule='evenodd'%20d='M365.3%20372.8a4.3%204.3%200%201%201-8.7%200%204.3%204.3%200%200%201%208.6%200zm-21.4-13.6a4.3%204.3%200%201%201-8.7%200%204.3%204.3%200%200%201%208.7%200m10.9%207a4.3%204.3%200%201%201-8.7%200%204.3%204.3%200%200%201%208.7%200'/%3e%3cpath%20fill='%23fe0'%20fill-rule='evenodd'%20d='M324.5%20363.7c-42.6-24.3-87.3-50.5-130-74.8-18.7-11.7-19.6-33.4-7-49.9%201.2-2.3%202.8-1.8%203.4-.5%201.5%208%206%2016.3%2011.4%2021.5A5288%205288%200%200%201%20334%20345.6c-3.4%205.8-6%2012.3-9.5%2018z'/%3e%3cpath%20fill='%23ffec00'%20fill-rule='evenodd'%20d='m297.2%20305.5%2017.8%2016-16%2017.8-17.8-16z'/%3e%3cpath%20fill='none'%20stroke='%23000'%20stroke-width='3'%20d='m331.5%20348.8-125-75.5m109.6%2058.1L274%20304.1m18.2%2042.7L249.3%20322'/%3e%3c/svg%3e")}.fi-ao.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ao'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='red'%20d='M0%200h512v259.8H0z'/%3e%3cpath%20fill='%23000001'%20d='M0%20252.2h512V512H0z'/%3e%3c/g%3e%3cpath%20fill='%23ffec00'%20fill-rule='evenodd'%20d='M228.7%20148.2c165.2%2043.3%2059%20255.6-71.3%20167.2l-8.8%2013.6c76.7%2054.6%20152.6%2010.6%20174-46.4%2022.2-58.8-7.6-141.5-92.6-150z'/%3e%3cpath%20fill='%23ffec00'%20fill-rule='evenodd'%20d='m170%20330.8%2021.7%2010.1-10.2%2021.8-21.7-10.2zm149-99.5h24v24h-24zm-11.7-38.9%2022.3-8.6%208.7%2022.3-22.3%208.7zm-26-29.1%2017.1-16.9%2016.9%2017-17%2016.9zm-26.2-39.8%2022.4%208.4-8.5%2022.4-22.4-8.4zM316%20270l22.3%208.9-9%2022.2-22.2-8.9zm-69.9%2070%2022-9.3%209.5%2022-22%209.4zm-39.5%202.8h24v24h-24zm41.3-116-20.3-15-20.3%2014.6%208-23-20.3-15h24.5l8.5-22.6%207.8%2022.7%2024.7-.3-19.6%2015.3z'/%3e%3cpath%20fill='%23fe0'%20fill-rule='evenodd'%20d='M336%20346.4c-1.2.4-6.2%2012.4-9.7%2018.2l3.7%201c13.6%204.8%2020.4%209.2%2026.2%2017.5a7.9%207.9%200%200%200%2010.2.7s2.8-1%206.4-5c3-4.5%202.2-8-1.4-11.1-11-8-22.9-14-35.4-21.3'/%3e%3cpath%20fill='%23000001'%20fill-rule='evenodd'%20d='M365.3%20372.8a4.3%204.3%200%201%201-8.7%200%204.3%204.3%200%200%201%208.6%200zm-21.4-13.6a4.3%204.3%200%201%201-8.7%200%204.3%204.3%200%200%201%208.7%200m10.9%207a4.3%204.3%200%201%201-8.7%200%204.3%204.3%200%200%201%208.7%200'/%3e%3cpath%20fill='%23fe0'%20fill-rule='evenodd'%20d='M324.5%20363.7c-42.6-24.3-87.3-50.5-130-74.8-18.7-11.7-19.6-33.4-7-49.9%201.2-2.3%202.8-1.8%203.4-.5%201.5%208%206%2016.3%2011.4%2021.5A5288%205288%200%200%201%20334%20345.6c-3.4%205.8-6%2012.3-9.5%2018z'/%3e%3cpath%20fill='%23ffec00'%20fill-rule='evenodd'%20d='m297.2%20305.5%2017.8%2016-16%2017.8-17.8-16z'/%3e%3cpath%20fill='none'%20stroke='%23000'%20stroke-width='3'%20d='m331.5%20348.8-125-75.5m109.6%2058.1L274%20304.1m18.2%2042.7L249.3%20322'/%3e%3c/svg%3e")}.fi-aq{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-aq'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%233a7dce'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23fff'%20d='M157.7%20230.8c-3.5-7.8-3.5-7.8-3.5-15.6-1.8%200-2%20.3-3%200-1.1-.3-1.5%207.2-4.8%205.8-.5-.8%202.4-6.2-.7-8.5-1-.7.2-5.2-.2-7.2%200%200-4%202.4-7-5.8-1.5-2.2-3.5%202-3.5%202s.9%202.4-.7%203c-2.2-1.8-3.9-.8-6.7-3.4-2.8-2.5.6-5.4-4.8-7.5%203.5-9.8%203.5-7.9%2012.2-11.8-5.2-4-5.2-4-8.7-9.8-5.2-2-7-4-12.2-7.8-7-9.9-10.5-29.5-10.5-43.2%204.4-4.6%2010.5%2015.7%2019.2%2021.6l12.2%205.9c7%203.9%208.7%207.8%2014%2011.7l15.6%206c7%205.8%2010.5%2013.6%2015.7%2015.6%205.7%200%206.8-3.7%208.6-3.9%2010.3-.6%2015.5-2%2017.5-5.5%202.1-2.8%207%201.6%2021-4.3l-1.7-7.9s3.7-3.4%208.7-2c-.1-3.5-.5-13%204.5-17.4-3-3.5%201.8-9%202-10.7-1.4-8.6%201.4-8.7%202-11.3.6-2.5-2.4-1.7-1.6-5.2.9-3.5%206-4.3%206.6-7.2.7-2.9-1.1-14.3-1.3-16.8%209.4-2.8%2012.4-11.4%2015.7-7.8C264%2070%20265.8%2066%20276.3%2066c1.4-3.6-3.9-6.7-1.8-7.9%203.5-.5%206.1-.2%2010.2%205.7%201.3%202%201.6-2.7%202.9-3.2%201.3-.5%204.4-.5%204.9-2.8.5-2.4%201.2-5.6%203-9.5%201.4-3.2%202.5%201.3%203.8%207.5%207.4.3%2024%202.1%2031%204.3%205.2%201.5%208.7-1.5%2013.7-2.2%203.7%204.2%207.2%201%209.2%2010%202.7%204.8%207.3.4%208.3%201.8%205.8%2018.1%2025.8%205.9%2027.4%206.2%202.5%200%205.6%208%207.7%207.9%203.2-.6%202.3-3.1%205.2-2.1-.8%206.8%205.6%2014.6%205.6%2019.7%200%200%201.5.9%203-.6%201.4-1.6%202.7-5.4%204-5.3%203%20.5%2022%206%2025.8%207.9%201.7%203.5%203.3%205.3%206.8%204.7%202.8%202.1.8%205%202.4%205.1%203.5-2%204.7-4%208.2-2.1%203.5%202%207%205.9%208.7%209.8%200%202-1.8%209.8%200%2021.6.9%203.9%209.7%2032.3%209.7%2035.2%200%204-2.7%206-4.5%209.9%207%205.9%200%2015.7-3.5%2021.6%2026.2%205.9%2014%2017.6%2034.9%2011.7-5.2%2013.8-3.4%2012.7%201.8%2026.4-10.4%207.8-.2%2010.2-7.1%2020-.5.7%204.1%208.6%2010.5%208.6-1.7%2015.6-7%209.8-5.2%2033.3-13.7-.3-8.2%2017.6-17.4%2015.7.5%2011.2%205.2%2012.2%203.4%2023.5-7%202-7%202-10.4%207.9l-5.2-2c-1.8%209.8-5.3%2011.8%200%2021.6%200%200-6.8.2-8.8%200-.1%203.4%203%204.3%203.5%207.8-.2%201.4-9.9%207.6-17.4%207.9-2%204.8%205.2%2010%204.8%2012.4-8.2%201.8-11.8%2013-11.8%2013s4.2%202%203.5%204c-2.2-1.8-3.5-2-7-2-1.7.5-6%200-10%207.7-4.5%201.6-6.6%201-10%206-1.5-4.7-3.7.1-6.3%202-2.7%201.8-6.2%206.5-6.7%206.3.1-1.4%201.6-6.3%201.6-6.3L399%20437c-.7.1-.5-5.7-2.2-5.5-1.7.2-6.4%207.3-8%207.5-1.6.2-2.1-2.2-3.5-2-1.4.2-4%207.5-5%207.7-1%20.1-5-4.5-8.3-3.8-17.1%206.8-19.9-13.4-22.5-2-3.6-2.2-3-1-6.7.1-2.3.7-2.5-3.4-4.6-3.4-4.1.2-4%204.6-6.2%203.3-1.8-9.2-13-7.6-14-11.5-1-4%204.8-4%206.6-6.8%201.4-4-1.5-5.6%204.3-9.4%207.5-5.7%206.8-19.8%204.9-25.3%200%200-5.9-17.7-7-17.7-3.5-1-3.5%206.5-8.6%208.6-10.5%204-29-9.9-32.2-9.9-2.9%200-16.5%203.6-16-4-2%207.4-9.5%201.7-10%201.7-7%200-4.3%206.1-9%205.9-2.1-.8-23.6-2.3-23.6-2.3v4l-26.1-11.8c-10.5-4-5.3-13.7-22.7-7.8v-11.8h-8.7c3.5-23.6%200-11.8-1.8-33.4l-7%202c-7-10.6%209.8-8.6-5.2-15.7%200%200%20.3-11.7-3.5-7.8-.7.5%201.8%205.8%201.8%205.8-14-2-17.4-5.8-17.4-21.5%200%200%2011.4%201.8%2010.4%200-1.6-3-3.7-22-3.4-23.4-.1-2.6%2010.7-9%208.6-15.2%201.4-.6%205.3-.7%205.3-.7'/%3e%3cpath%20fill='none'%20stroke='%23fff'%20stroke-linejoin='round'%20stroke-width='2.5'%20d='M595.5%20297.6c-.6%201.3-.5%202.6.1%203.6%201.1-1.7.2-2.4%200-3.6zm-476-149.4s-3-.4-2.4%202.3c1-2%202.3-2.2%202.4-2.3zm-.3-6.4c-1.7%200-3.8-.2-3%202.5%201-2.1%203-2.4%203-2.5zm12.7%2036.3s2.6-.2%202%202.5c-1-2-2-2.4-2-2.5z'%20transform='scale(.86021%20.96774)'/%3e%3c/svg%3e")}.fi-aq.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-aq'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%233a7dce'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fff'%20d='M107.7%20240.9c-3.5-7.9-3.5-7.9-3.5-15.7-1.8%200-2.1.4-3.1%200-1-.3-1.4%207.3-4.7%205.8-.5-.7%202.4-6.2-.8-8.4-1-.8.3-5.3-.2-7.2%200%200-4%202.3-7-5.9-1.4-2.1-3.4%202-3.4%202s.9%202.5-.7%203c-2.3-1.8-3.9-.8-6.7-3.3-2.9-2.5.6-5.4-4.8-7.6%203.5-9.8%203.5-7.8%2012.2-11.8-5.2-3.9-5.2-3.9-8.7-9.8-5.3-2-7-3.9-12.2-7.8-7-9.8-10.5-29.4-10.5-43.2%204.4-4.6%2010.5%2015.7%2019.2%2021.6l12.2%205.9c7%204%208.7%207.8%2014%2011.8l15.6%205.9c7%205.8%2010.5%2013.7%2015.7%2015.6%205.7%200%206.8-3.6%208.6-3.9%2010.2-.5%2015.5-2%2017.5-5.5%202-2.8%207%201.6%2021-4.3l-1.8-7.8s3.8-3.5%208.8-2c-.2-3.6-.5-13.1%204.4-17.5-3-3.5-1-6-1-6s2.8-3%203.2-4.6c-1.5-8.7%201.2-8.8%201.9-11.3.6-2.6-2.4-1.7-1.6-5.2.9-3.5%206-4.4%206.6-7.3.7-2.8-1.5-4.3-1.3-5%201-2.7.1-9.2%200-11.7%209.3-2.9%2012.4-11.4%2015.7-7.9%201.7-11.8%203.5-15.7%2014-15.7%201.4-3.6-3.9-6.7-1.8-7.8%203.5-.5%206.1-.3%2010.2%205.7%201.3%201.9%201.5-2.8%202.8-3.3%201.4-.5%204.5-.5%205-2.8.4-2.4%201.1-5.5%202.9-9.4%201.5-3.2%202.6%201.2%204%207.4%207.3.3%2023.9%202.2%2030.9%204.3%205.2%201.6%208.7-1.5%2013.7-2.1%203.7%204.2%207.2%201%209.1%2010%202.8%204.7%207.3.3%208.3%201.8%205.9%2018%2026%205.8%2027.4%206.1%202.6%200%205.7%208.1%207.7%208%203.3-.7%202.4-3.2%205.2-2.2-.7%206.8%205.7%2014.7%205.7%2019.7%200%200%201.5.9%203-.6%201.4-1.5%202.7-5.4%204-5.3%203%20.5%204.3%201%207.8%201.6%209.4%203.7%2014.3%204.5%2018%206.3%201.6%203.6%203.3%205.4%206.8%204.7%202.8%202.2.7%205%202.4%205.2%203.5-2%204.7-4.1%208.1-2.2%203.5%202%207%206%208.8%209.8%200%202-1.8%209.8%200%2021.6.8%204%201.3%207%205%2013.8-1%206.9%204.7%2018.5%204.7%2021.5%200%203.9-2.8%206-4.5%209.8%207%206%200%2015.7-3.5%2021.6%2026.2%205.9%2014%2017.7%2034.9%2011.8-5.3%2013.7-3.4%2012.6%201.8%2026.3-10.4%207.9-.2%2010.3-7.2%2020-.4.7%204.2%208.6%2010.6%208.6-1.7%2015.7-7%209.8-5.2%2033.3-13.8-.3-8.2%2017.6-17.5%2015.7.6%2011.3%205.3%2012.2%203.5%2023.6-7%202-7%202-10.4%207.8l-5.3-2c-1.7%209.9-5.2%2011.8%200%2021.6%200%200-6.7.3-8.7%200-.1%203.4%203%204.3%203.5%207.9-.3%201.4-10%207.6-17.4%207.8-2%204.9%205.2%2010%204.8%2012.5-8.2%201.7-11.8%2013-11.8%2013s4.2%202%203.5%204c-2.3-1.9-3.5-2-7-2-1.7.5-6-.1-10%207.6-4.5%201.7-6.6%201-10%206.1-1.5-4.8-3.7%200-6.3%202-2.7%201.8-6.2%206.4-6.7%206.2.1-1.3%201.6-6.2%201.6-6.2l-8.7%202h-1c-.8.1-.6-5.7-2.2-5.5-1.7.3-6.4%207.3-8%207.6-1.6.2-2.1-2.3-3.5-2-1.4.1-4.1%207.4-5%207.6-1%20.2-5-4.4-8.3-3.8-17.2%206.8-19.9-13.4-22.6-2-3.6-2.1-3-.9-6.6.2-2.3.7-2.5-3.5-4.6-3.4-4.2.1-4%204.5-6.2%203.2-1.8-9.2-13-7.5-14.1-11.5-.9-4%204.8-4%206.7-6.8%201.4-4-1.5-5.5%204.3-9.4%207.4-5.7%203.1-7.8%204.4-12.1%202.4-6.2%202.4-7.7.4-13.2%200%200-5.8-17.6-7-17.6-3.4-1.1-3.4%206.5-8.5%208.6-10.5%203.9-29-10-32.2-10-3%20.1-16.5%203.7-16-4-2%207.5-9.6%201.8-10%201.8-7%200-4.3%206-9%205.8-2.1-.8-23.6-2.2-23.6-2.2v4l-14-8-12.2-3.9c-10.4-3.9-5.2-13.7-22.6-7.8v-11.8h-8.7c3.4-23.5%200-11.7-1.8-33.3l-7%202c-7-10.7%209.7-8.6-5.2-15.8%200%200%20.3-11.7-3.5-7.8-.7.5%201.8%205.9%201.8%205.9-14-2-17.5-5.9-17.5-21.6%200%200%2011.5%201.9%2010.5%200-1.6-3-3.8-22-3.4-23.3-.2-2.6%2010.7-9.1%208.6-15.3%201.3-.6%205.3-.6%205.3-.6'/%3e%3cpath%20fill='none'%20stroke='%23fff'%20stroke-linejoin='round'%20stroke-width='2.5'%20d='M595.5%20297.6c-.6%201.3-.5%202.6.1%203.6%201.1-1.7.2-2.4%200-3.6zm-476-149.4s-3-.4-2.4%202.3c1-2%202.3-2.2%202.4-2.3zm-.3-6.4c-1.7%200-3.8-.2-3%202.5%201-2.1%203-2.4%203-2.5zm12.7%2036.3s2.6-.2%202%202.5c-1-2-2-2.4-2-2.5z'%20transform='matrix(.86021%200%200%20.96774%20-50%2010)'/%3e%3c/svg%3e")}.fi-ar{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-ar'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%2374acdf'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20160h640v160H0z'/%3e%3cg%20id='ar-c'%20transform='translate(-64)scale(.96)'%3e%3cpath%20id='ar-a'%20fill='%23f6b40e'%20stroke='%2385340a'%20stroke-width='1.1'%20d='m396.8%20251.3%2028.5%2062s.5%201.2%201.3.9c.8-.4.3-1.6.3-1.6l-23.7-64m-.7%2024.2c-.4%209.4%205.4%2014.6%204.7%2023-.8%208.5%203.8%2013.2%205%2016.5%201%203.3-1.2%205.2-.3%205.7%201%20.5%203-2.1%202.4-6.8-.7-4.6-4.2-6-3.4-16.3.8-10.3-4.2-12.7-3-22'/%3e%3cuse%20xlink:href='%23ar-a'%20width='100%25'%20height='100%25'%20transform='rotate(22.5%20400%20250)'/%3e%3cuse%20xlink:href='%23ar-a'%20width='100%25'%20height='100%25'%20transform='rotate(45%20400%20250)'/%3e%3cuse%20xlink:href='%23ar-a'%20width='100%25'%20height='100%25'%20transform='rotate(67.5%20400%20250)'/%3e%3cpath%20id='ar-b'%20fill='%2385340a'%20d='M404.3%20274.4c.5%209%205.6%2013%204.6%2021.3%202.2-6.5-3.1-11.6-2.8-21.2m-7.7-23.8%2019.5%2042.6-16.3-43.9'/%3e%3cuse%20xlink:href='%23ar-b'%20width='100%25'%20height='100%25'%20transform='rotate(22.5%20400%20250)'/%3e%3cuse%20xlink:href='%23ar-b'%20width='100%25'%20height='100%25'%20transform='rotate(45%20400%20250)'/%3e%3cuse%20xlink:href='%23ar-b'%20width='100%25'%20height='100%25'%20transform='rotate(67.5%20400%20250)'/%3e%3c/g%3e%3cuse%20xlink:href='%23ar-c'%20width='100%25'%20height='100%25'%20transform='rotate(90%20320%20240)'/%3e%3cuse%20xlink:href='%23ar-c'%20width='100%25'%20height='100%25'%20transform='rotate(180%20320%20240)'/%3e%3cuse%20xlink:href='%23ar-c'%20width='100%25'%20height='100%25'%20transform='rotate(-90%20320%20240)'/%3e%3ccircle%20cx='320'%20cy='240'%20r='26.7'%20fill='%23f6b40e'%20stroke='%2385340a'%20stroke-width='1.4'/%3e%3cpath%20id='ar-h'%20fill='%23843511'%20stroke-width='1'%20d='M329%20234.3c-1.7%200-3.5.8-4.5%202.4%202%201.9%206.6%202%209.7-.2a7%207%200%200%200-5.1-2.2zm0%20.4c1.8%200%203.5.8%203.7%201.6-2%202.3-5.3%202-7.4.4%201-1.4%202.4-2%203.8-2z'/%3e%3cuse%20xlink:href='%23ar-d'%20width='100%25'%20height='100%25'%20transform='matrix(-1%200%200%201%20640.2%200)'/%3e%3cuse%20xlink:href='%23ar-e'%20width='100%25'%20height='100%25'%20transform='matrix(-1%200%200%201%20640.2%200)'/%3e%3cuse%20xlink:href='%23ar-f'%20width='100%25'%20height='100%25'%20transform='translate(18.1)'/%3e%3cuse%20xlink:href='%23ar-g'%20width='100%25'%20height='100%25'%20transform='matrix(-1%200%200%201%20640.2%200)'/%3e%3cpath%20fill='%2385340a'%20d='M316%20243.7a1.8%201.8%200%201%200%201.8%202.9%204%204%200%200%200%202.2.6h.2c.6%200%201.6-.1%202.3-.6.3.5.9.7%201.5.7a1.8%201.8%200%200%200%20.3-3.6c.5.2.8.6.8%201.2a1.2%201.2%200%200%201-2.4%200%203%203%200%200%201-2.6%201.7%203%203%200%200%201-2.5-1.7c0%20.7-.6%201.2-1.3%201.2-.6%200-1.2-.6-1.2-1.2s.3-1%20.8-1.2zm2%205.4c-2.1%200-3%202-4.8%203.1%201-.4%201.8-1.2%203.3-2%201.4-.8%202.6.2%203.5.2.8%200%202-1%203.5-.2%201.4.8%202.3%201.6%203.3%202-1.9-1.2-2.7-3-4.8-3-.4%200-1.2.2-2%20.6z'/%3e%3cpath%20fill='%2385340a'%20d='M317.2%20251.6c-.8%200-1.8.2-3.4.6%203.7-.8%204.5.5%206.2.5%201.6%200%202.5-1.3%206.1-.5-4-1.2-4.9-.4-6.1-.4-.8%200-1.4-.3-2.8-.2'/%3e%3cpath%20fill='%2385340a'%20d='M314%20252.2h-.8c4.3.5%202.3%203%206.8%203s2.5-2.5%206.8-3c-4.5-.4-3.1%202.3-6.8%202.3-3.5%200-2.4-2.3-6-2.3'/%3e%3cpath%20fill='%2385340a'%20d='M323.7%20258.9a3.7%203.7%200%200%200-7.4%200%203.8%203.8%200%200%201%207.4%200'/%3e%3cpath%20id='ar-e'%20fill='%2385340a'%20stroke-width='1'%20d='M303.4%20234.3c4.7-4.1%2010.7-4.8%2014-1.7a8%208%200%200%201%201.5%203.4c.4%202.4-.3%204.9-2.1%207.5l.8.4c1.6-3.1%202.2-6.3%201.6-9.4l-.6-2.3c-4.5-3.7-10.7-4-15.2%202z'/%3e%3cpath%20id='ar-d'%20fill='%2385340a'%20stroke-width='1'%20d='M310.8%20233c2.7%200%203.3.6%204.5%201.7%201.2%201%201.9.8%202%201%20.3.2%200%20.8-.3.6-.5-.2-1.3-.6-2.5-1.6s-2.5-1-3.7-1c-3.7%200-5.7%203-6.1%202.8-.5-.2%202-3.5%206.1-3.5'/%3e%3cuse%20xlink:href='%23ar-h'%20width='100%25'%20height='100%25'%20transform='translate(-18.4)'/%3e%3ccircle%20id='ar-f'%20cx='310.9'%20cy='236.3'%20r='1.8'%20fill='%2385340a'%20stroke-width='1'/%3e%3cpath%20id='ar-g'%20fill='%2385340a'%20stroke-width='1'%20d='M305.9%20237.5c3.5%202.7%207%202.5%209%201.3%202-1.3%202-1.7%201.6-1.7-.4%200-.8.4-2.4%201.3-1.7.8-4.1.8-8.2-.9'/%3e%3c/svg%3e")}.fi-ar.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-ar'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%2374acdf'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20170.7h512v170.7H0z'/%3e%3cg%20id='ar-c'%20transform='translate(-153.6)scale(1.024)'%3e%3cpath%20id='ar-a'%20fill='%23f6b40e'%20stroke='%2385340a'%20stroke-width='1.1'%20d='m396.8%20251.3%2028.5%2062s.5%201.2%201.3.9c.8-.4.3-1.6.3-1.6l-23.7-64m-.7%2024.2c-.4%209.4%205.4%2014.6%204.7%2023-.8%208.5%203.8%2013.2%205%2016.5%201%203.3-1.2%205.2-.3%205.7%201%20.5%203-2.1%202.4-6.8-.7-4.6-4.2-6-3.4-16.3.8-10.3-4.2-12.7-3-22'/%3e%3cuse%20xlink:href='%23ar-a'%20width='100%25'%20height='100%25'%20transform='rotate(22.5%20400%20250)'/%3e%3cuse%20xlink:href='%23ar-a'%20width='100%25'%20height='100%25'%20transform='rotate(45%20400%20250)'/%3e%3cuse%20xlink:href='%23ar-a'%20width='100%25'%20height='100%25'%20transform='rotate(67.5%20400%20250)'/%3e%3cpath%20id='ar-b'%20fill='%2385340a'%20d='M404.3%20274.4c.5%209%205.6%2013%204.6%2021.3%202.2-6.5-3.1-11.6-2.8-21.2m-7.7-23.8%2019.5%2042.6-16.3-43.9'/%3e%3cuse%20xlink:href='%23ar-b'%20width='100%25'%20height='100%25'%20transform='rotate(22.5%20400%20250)'/%3e%3cuse%20xlink:href='%23ar-b'%20width='100%25'%20height='100%25'%20transform='rotate(45%20400%20250)'/%3e%3cuse%20xlink:href='%23ar-b'%20width='100%25'%20height='100%25'%20transform='rotate(67.5%20400%20250)'/%3e%3c/g%3e%3cuse%20xlink:href='%23ar-c'%20width='100%25'%20height='100%25'%20transform='rotate(90%20256%20256)'/%3e%3cuse%20xlink:href='%23ar-c'%20width='100%25'%20height='100%25'%20transform='rotate(180%20256%20256)'/%3e%3cuse%20xlink:href='%23ar-c'%20width='100%25'%20height='100%25'%20transform='rotate(-90%20256%20256)'/%3e%3ccircle%20cx='256'%20cy='256'%20r='28.4'%20fill='%23f6b40e'%20stroke='%2385340a'%20stroke-width='1.5'/%3e%3cpath%20id='ar-h'%20fill='%23843511'%20stroke-width='1'%20d='M265.7%20250c-2%200-3.8.8-4.9%202.5%202.2%202%207%202.2%2010.3-.2a7.5%207.5%200%200%200-5.4-2.4zm0%20.4c1.9%200%203.6.8%203.9%201.7-2.2%202.4-5.7%202.2-7.9.4%201-1.5%202.5-2.1%204-2.1'/%3e%3cuse%20xlink:href='%23ar-d'%20width='100%25'%20height='100%25'%20transform='matrix(-1%200%200%201%20512.3%200)'/%3e%3cuse%20xlink:href='%23ar-e'%20width='100%25'%20height='100%25'%20transform='matrix(-1%200%200%201%20512.3%200)'/%3e%3cuse%20xlink:href='%23ar-f'%20width='100%25'%20height='100%25'%20transform='translate(19.3)'/%3e%3cuse%20xlink:href='%23ar-g'%20width='100%25'%20height='100%25'%20transform='matrix(-1%200%200%201%20512.3%200)'/%3e%3cpath%20fill='%2385340a'%20d='M251.6%20260a2%202%200%201%200%202%203c.8.6%201.8.6%202.4.6h.3c.5%200%201.6%200%202.3-.6.4.5%201%20.8%201.6.8a2%202%200%200%200%20.4-3.9c.5.2.9.7.9%201.3a1.3%201.3%200%200%201-2.7%200%203%203%200%200%201-2.7%201.8%203.3%203.3%200%200%201-2.7-1.8c0%20.7-.6%201.3-1.3%201.3a1.3%201.3%200%200%201-.4-2.6zm2.2%205.8c-2.2%200-3%202-5%203.3%201-.5%202-1.3%203.5-2.2%201.5-.9%202.8.2%203.7.2.9%200%202.2-1.1%203.7-.2%201.5.9%202.4%201.7%203.5%202.2-2-1.4-2.8-3.3-5-3.3a6%206%200%200%200-2.2.6c-1-.4-1.8-.6-2.2-.6'/%3e%3cpath%20fill='%2385340a'%20d='M253%20268.3c-.8%200-2%20.3-3.6.8%204-1%204.8.4%206.6.4%201.7%200%202.6-1.3%206.6-.4-4.4-1.4-5.3-.5-6.6-.5-.9%200-1.5-.3-3-.3'/%3e%3cpath%20fill='%2385340a'%20d='M249.6%20269h-.8c4.6.5%202.4%203.1%207.2%203.1%204.8%200%202.6-2.6%207.2-3-4.8-.5-3.3%202.4-7.2%202.4-3.7%200-2.6-2.5-6.4-2.5'/%3e%3cpath%20fill='%2385340a'%20d='M260%20276.1a4%204%200%200%200-8%200%204%204%200%200%201%208%200'/%3e%3cpath%20id='ar-e'%20fill='%2385340a'%20stroke-width='1'%20d='M238.3%20249.9c5-4.4%2011.4-5%2014.9-1.8a8.6%208.6%200%200%201%201.6%203.7c.5%202.5-.3%205.2-2.3%208%20.3%200%20.7.1%201%20.4%201.7-3.4%202.3-6.8%201.7-10l-.7-2.5c-4.8-4-11.4-4.4-16.2%202.2'/%3e%3cpath%20id='ar-d'%20fill='%2385340a'%20stroke-width='1'%20d='M246.2%20248.6c2.8%200%203.5.6%204.8%201.7%201.3%201.1%202%20.9%202.2%201.1.2.2%200%20.9-.4.7-.5-.3-1.4-.7-2.7-1.8-1.3-1-2.6-1-4-1-3.8%200-6%203.2-6.5%203-.4-.2%202.2-3.7%206.6-3.7'/%3e%3cuse%20xlink:href='%23ar-h'%20width='100%25'%20height='100%25'%20transform='translate(-19.6)'/%3e%3ccircle%20id='ar-f'%20cx='246.3'%20cy='252.1'%20r='2'%20fill='%2385340a'%20stroke-width='1'/%3e%3cpath%20id='ar-g'%20fill='%2385340a'%20stroke-width='1'%20d='M241%20253.4c3.7%202.8%207.4%202.6%209.6%201.3%202.2-1.3%202.2-1.8%201.7-1.8-.4%200-.9.5-2.6%201.4-1.8.8-4.4.8-8.8-1z'/%3e%3c/svg%3e")}.fi-as{background-image:url(/assets/as-D2gsNMrP.svg)}.fi-as.fis{background-image:url(/assets/as-_t1IQUdv.svg)}.fi-at{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-at'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%23fff'%20d='M640%20480H0V0h640z'/%3e%3cpath%20fill='%23c8102e'%20d='M640%20480H0V320h640zm0-319.9H0V.1h640z'/%3e%3c/g%3e%3c/svg%3e")}.fi-at.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-at'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%23fff'%20d='M512%20512H0V0h512z'/%3e%3cpath%20fill='%23c8102e'%20d='M512%20512H0V341.3h512zm0-341.2H0V.1h512z'/%3e%3c/g%3e%3c/svg%3e")}.fi-au{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-au'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%2300008B'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23fff'%20d='m37.5%200%20122%2090.5L281%200h39v31l-120%2089.5%20120%2089V240h-40l-120-89.5L40.5%20240H0v-30l119.5-89L0%2032V0z'/%3e%3cpath%20fill='red'%20d='M212%20140.5%20320%20220v20l-135.5-99.5zm-92%2010%203%2017.5-96%2072H0zM320%200v1.5l-124.5%2094%201-22L295%200zM0%200l119.5%2088h-30L0%2021z'/%3e%3cpath%20fill='%23fff'%20d='M120.5%200v240h80V0zM0%2080v80h320V80z'/%3e%3cpath%20fill='red'%20d='M0%2096.5v48h320v-48zM136.5%200v240h48V0z'/%3e%3cpath%20fill='%23fff'%20d='m527%20396.7-20.5%202.6%202.2%2020.5-14.8-14.4-14.7%2014.5%202-20.5-20.5-2.4%2017.3-11.2-10.9-17.5%2019.6%206.5%206.9-19.5%207.1%2019.4%2019.5-6.7-10.7%2017.6zm-3.7-117.2%202.7-13-9.8-9%2013.2-1.5%205.5-12.1%205.5%2012.1%2013.2%201.5-9.8%209%202.7%2013-11.6-6.6zm-104.1-60-20.3%202.2%201.8%2020.3-14.4-14.5-14.8%2014.1%202.4-20.3-20.2-2.7%2017.3-10.8-10.5-17.5%2019.3%206.8L387%20178l6.7%2019.3%2019.4-6.3-10.9%2017.3%2017.1%2011.2ZM623%20186.7l-20.9%202.7%202.3%2020.9-15.1-14.7-15%2014.8%202.1-21-20.9-2.4%2017.7-11.5-11.1-17.9%2020%206.7%207-19.8%207.2%2019.8%2019.9-6.9-11%2018zm-96.1-83.5-20.7%202.3%201.9%2020.8-14.7-14.8-15.1%2014.4%202.4-20.7-20.7-2.8%2017.7-11L467%2073.5l19.7%206.9%207.3-19.5%206.8%2019.7%2019.8-6.5-11.1%2017.6zM234%20385.7l-45.8%205.4%204.6%2045.9-32.8-32.4-33%2032.2%204.9-45.9-45.8-5.8%2038.9-24.8-24-39.4%2043.6%2015%2015.8-43.4%2015.5%2043.5%2043.7-14.7-24.3%2039.2%2038.8%2025.1Z'/%3e%3c/svg%3e")}.fi-au.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-au'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%2300008B'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fff'%20d='M256%200v32l-95%2096%2095%2093.5V256h-33.5L127%20162l-93%2094H0v-34l93-93.5L0%2037V0h31l96%2094%2093-94z'/%3e%3cpath%20fill='red'%20d='m92%20162%205.5%2017L21%20256H0v-1.5zm62-6%2027%204%2075%2073.5V256zM256%200l-96%2098-2-22%2075-76zM0%20.5%2096.5%2095%2067%2091%200%2024.5z'/%3e%3cpath%20fill='%23fff'%20d='M88%200v256h80V0zM0%2088v80h256V88z'/%3e%3cpath%20fill='red'%20d='M0%20104v48h256v-48zM104%200v256h48V0z'/%3e%3cpath%20fill='%23fff'%20d='m202%20402.8-45.8%205.4%204.6%2045.9-32.8-32.4-33%2032.2%204.9-45.9-45.8-5.8L93%20377.4%2069%20338l43.6%2015%2015.8-43.4%2015.5%2043.5%2043.7-14.7-24.3%2039.2%2038.8%2025.1Zm222.7%208-20.5%202.6%202.2%2020.5-14.8-14.4-14.7%2014.5%202-20.5-20.5-2.4%2017.3-11.2-10.9-17.5%2019.6%206.5%206.9-19.5%207.1%2019.4%2019.5-6.7-10.7%2017.6zM415%20293.6l2.7-13-9.8-9%2013.2-1.5%205.5-12.1%205.5%2012.1%2013.2%201.5-9.8%209%202.7%2013-11.6-6.6zm-84.1-60-20.3%202.2%201.8%2020.3-14.4-14.5-14.8%2014.1%202.4-20.3-20.2-2.7%2017.3-10.8-10.5-17.5%2019.3%206.8%207.2-19.1%206.7%2019.3%2019.4-6.3-10.9%2017.3zm175.8-32.8-20.9%202.7%202.3%2020.9-15.1-14.7-15%2014.8%202.1-21-20.9-2.4%2017.7-11.5-11.1-17.9%2020%206.7%207-19.8%207.2%2019.8%2019.9-6.9-11%2018zm-82.1-83.5-20.7%202.3%201.9%2020.8-14.7-14.8L376%20140l2.4-20.7-20.7-2.8%2017.7-11-10.7-17.9%2019.7%206.9%207.3-19.5%206.8%2019.7%2019.8-6.5-11.1%2017.6z'/%3e%3c/svg%3e")}.fi-aw{background-image:url(/assets/aw-W0PWLK5p.svg)}.fi-aw.fis{background-image:url(/assets/aw-CLCX8uk5.svg)}.fi-ax{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ax'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='ax-a'%3e%3cpath%20fill-opacity='.7'%20d='M106.3%200h1133.3v850H106.3z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23ax-a)'%20transform='matrix(.56472%200%200%20.56482%20-60%20-.1)'%3e%3cpath%20fill='%230053a5'%20d='M0%200h1300v850H0z'/%3e%3cg%20fill='%23ffce00'%3e%3cpath%20d='M400%200h250v850H400z'/%3e%3cpath%20d='M0%20300h1300v250H0z'/%3e%3c/g%3e%3cg%20fill='%23d21034'%3e%3cpath%20d='M475%200h100v850H475z'/%3e%3cpath%20d='M0%20375h1300v100H0z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}.fi-ax.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ax'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='ax-a'%3e%3cpath%20fill-opacity='.7'%20d='M166%200h850v850H166z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23ax-a)'%20transform='translate(-100)scale(.6024)'%3e%3cpath%20fill='%230053a5'%20d='M0%200h1300v850H0z'/%3e%3cg%20fill='%23ffce00'%3e%3cpath%20d='M400%200h250v850H400z'/%3e%3cpath%20d='M0%20300h1300v250H0z'/%3e%3c/g%3e%3cg%20fill='%23d21034'%3e%3cpath%20d='M475%200h100v850H475z'/%3e%3cpath%20d='M0%20375h1300v100H0z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}.fi-az{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-az'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%233f9c35'%20d='M.1%200h640v480H.1z'/%3e%3cpath%20fill='%23ed2939'%20d='M.1%200h640v320H.1z'/%3e%3cpath%20fill='%2300b9e4'%20d='M.1%200h640v160H.1z'/%3e%3ccircle%20cx='304'%20cy='240'%20r='72'%20fill='%23fff'/%3e%3ccircle%20cx='320'%20cy='240'%20r='60'%20fill='%23ed2939'/%3e%3cpath%20fill='%23fff'%20d='m384%20200%207.7%2021.5%2020.6-9.8-9.8%2020.7L424%20240l-21.5%207.7%209.8%2020.6-20.6-9.8L384%20280l-7.7-21.5-20.6%209.8%209.8-20.6L344%20240l21.5-7.7-9.8-20.6%2020.6%209.8z'/%3e%3c/svg%3e")}.fi-az.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-az'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%233f9c35'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23ed2939'%20d='M0%200h512v341.3H0z'/%3e%3cpath%20fill='%2300b9e4'%20d='M0%200h512v170.7H0z'/%3e%3ccircle%20cx='238.8'%20cy='256'%20r='76.8'%20fill='%23fff'/%3e%3ccircle%20cx='255.9'%20cy='256'%20r='64'%20fill='%23ed2939'/%3e%3cpath%20fill='%23fff'%20d='m324.2%20213.3%208.1%2023%2022-10.5-10.4%2022%2023%208.2-23%208.2%2010.4%2022-22-10.5-8.1%2023-8.2-23-22%2010.5%2010.5-22-23-8.2%2023-8.2-10.5-22%2022%2010.5z'/%3e%3c/svg%3e")}.fi-ba{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ba'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='ba-a'%3e%3cpath%20fill-opacity='.7'%20d='M-85.3%200h682.6v512H-85.3z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23ba-a)'%20transform='translate(80)scale(.9375)'%3e%3cpath%20fill='%23009'%20d='M-85.3%200h682.6v512H-85.3z'/%3e%3cpath%20fill='%23FC0'%20d='m56.5%200%20511%20512.3V.3z'/%3e%3cpath%20fill='%23FFF'%20d='M439.9%20481.5%20412%20461.2l-28.6%2020.2%2010.8-33.2-28.2-20.5h35l10.8-33.2%2010.7%2033.3h35l-28%2020.7zm81.3%2010.4-35-.1-10.7-33.3-10.8%2033.2h-35l28.2%2020.5-10.8%2033.2%2028.6-20.2%2028%2020.3-10.5-33zM365.6%20384.7l28-20.7-35-.1-10.7-33.2-10.8%2033.2-35-.1%2028.2%2020.5-10.8%2033.3%2028.6-20.3%2028%2020.4zm-64.3-64.5%2028-20.6-35-.1-10.7-33.3-10.9%2033.2h-34.9l28.2%2020.5-10.8%2033.2%2028.6-20.2%2027.9%2020.3zm-63.7-63.6%2028-20.7h-35L220%20202.5l-10.8%2033.2h-35l28.2%2020.4-10.8%2033.3%2028.6-20.3%2028%2020.4-10.5-33zm-64.4-64.3%2028-20.6-35-.1-10.7-33.3-10.9%2033.2h-34.9L138%20192l-10.8%2033.2%2028.6-20.2%2027.9%2020.3-10.4-33zm-63.6-63.9%2027.9-20.7h-35L91.9%2074.3%2081%20107.6H46L74.4%20128l-10.9%2033.2L92.1%20141l27.8%2020.4zm-64-64%2027.9-20.7h-35L27.9%2010.3%2017%2043.6h-35L10.4%2064l-11%2033.3L28.1%2077l27.8%2020.4zm-64-64L9.4-20.3h-35l-10.7-33.3L-47-20.4h-35L-53.7%200l-10.8%2033.2L-35.9%2013l27.8%2020.4z'/%3e%3c/g%3e%3c/svg%3e")}.fi-ba.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ba'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='ba-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h512v512H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23ba-a)'%3e%3cpath%20fill='%23009'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fc0'%20d='m77%200%20437%20437V0z'/%3e%3cpath%20fill='%23FFF'%20d='m461.4%20470.4-26.1-19.1-26.9%2019%2010.2-31.2-26.4-19.2h32.7l10.2-31%2010%2031.1%2032.8.1-26.2%2019.4zm76.7%2010.4h-32.7l-10-31.2-10.2%2031.1h-32.8l26.4%2019.2-10.1%2031.2%2026.8-19%2026.2%2019-9.8-30.9zM391.8%20379.6l26.2-19.4h-32.7L375.2%20329%20365%20360h-32.7l26.4%2019.3-10.1%2031.1%2026.8-19%2026.1%2019.1zm-60.3-60.4%2026.2-19.4-32.8-.1-10-31.2-10.2%2031.2-32.7-.1%2026.4%2019.2-10.2%2031.2%2026.9-19%2026.1%2019.1zm-59.7-59.7%2026.2-19.4h-32.7l-10.1-31.2L245%20240h-32.7l26.4%2019.2-10.1%2031.2%2026.8-19%2026.1%2019zm-60.4-60.3%2026.2-19.3-32.8-.1-10-31.2-10.2%2031.2-32.7-.1%2026.4%2019.2-10.2%2031.2%2026.9-19%2026.1%2019-9.7-30.8zm-59.7-59.9L178%20120l-32.7-.1-10-31.2-10.3%2031.1H92.2l26.4%2019.2-10.1%2031.2%2026.8-19%2026.1%2019zm-60-60L118%2060l-32.7-.1-10-31.2L65%2059.8H32.2L58.6%2079l-10.1%2031.2%2026.8-19%2026.2%2019zm-60-60L58%200%2025.2-.1l-10-31.2L4.8-.2h-32.7L-1.4%2019l-10.1%2031.2%2026.8-19%2026.1%2019z'/%3e%3c/g%3e%3c/svg%3e")}.fi-bb{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-bb'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%2300267f'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23ffc726'%20d='M213.3%200h213.4v480H213.3z'/%3e%3cpath%20id='bb-a'%20fill='%23000001'%20d='M319.8%20135.5c-7%2019-14%2038.6-29.2%2053.7%204.7-1.6%2013-3%2018.2-2.8v79.5l-22.4%203.3c-.8%200-1-1.3-1-3-2.2-24.7-8-45.5-14.8-67-.5-2.9-9-14-2.4-12%20.8%200%209.5%203.6%208.2%201.9a85%2085%200%200%200-46.4-24c-1.5-.3-2.4.5-1%202.2%2022.4%2034.6%2041.3%2075.5%2041.1%20124%208.8%200%2030-5.2%2038.7-5.2v56.1H320l2.5-156.7z'/%3e%3cuse%20xlink:href='%23bb-a'%20width='100%25'%20height='100%25'%20transform='matrix(-1%200%200%201%20639.5%200)'/%3e%3c/svg%3e")}.fi-bb.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-bb'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%2300267f'%20d='M0-.2h512V512H0z'/%3e%3cpath%20fill='%23ffc726'%20d='M170.7-.2h170.6V512H170.7z'/%3e%3cpath%20id='bb-a'%20fill='%23000001'%20d='M256%20173.3c-5.5%2015.1-11.2%2030.9-23.3%2043a51.7%2051.7%200%200%201%2014.6-2.3v63.6l-18%202.7c-.7%200-.9-1-.9-2.4a243.6%20243.6%200%200%200-11.7-53.6c-.4-2.3-7.2-11.3-2-9.7.7%200%207.7%203%206.6%201.6a68%2068%200%200%200-37.1-19.2c-1.2-.3-2%20.3-.9%201.7%2018%2027.7%2033.1%2060.4%2033%2099.2%207%200%2024-4.1%2031-4.1v44.9h8.8l2-125.4z'/%3e%3cuse%20xlink:href='%23bb-a'%20width='100%25'%20height='100%25'%20transform='matrix(-1%200%200%201%20512%200)'/%3e%3c/svg%3e")}.fi-bd{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-bd'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23006a4e'%20d='M0%200h640v480H0z'/%3e%3ccircle%20cx='280'%20cy='240'%20r='160'%20fill='%23f42a41'/%3e%3c/svg%3e")}.fi-bd.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-bd'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23006a4e'%20d='M0%200h512v512H0z'/%3e%3ccircle%20cx='230'%20cy='256'%20r='170.7'%20fill='%23f42a41'/%3e%3c/svg%3e")}.fi-be{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-be'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23000001'%20d='M0%200h213.3v480H0z'/%3e%3cpath%20fill='%23ffd90c'%20d='M213.3%200h213.4v480H213.3z'/%3e%3cpath%20fill='%23f31830'%20d='M426.7%200H640v480H426.7z'/%3e%3c/g%3e%3c/svg%3e")}.fi-be.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-be'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23000001'%20d='M0%200h170.7v512H0z'/%3e%3cpath%20fill='%23ffd90c'%20d='M170.7%200h170.6v512H170.7z'/%3e%3cpath%20fill='%23f31830'%20d='M341.3%200H512v512H341.3z'/%3e%3c/g%3e%3c/svg%3e")}.fi-bf{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-bf'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%23de0000'%20d='M640%20479.6H.4V0H640z'/%3e%3cpath%20fill='%2335a100'%20d='M639.6%20480H0V240.2h639.6z'/%3e%3cpath%20fill='%23fff300'%20d='m254.6%20276.2-106-72.4h131L320%2086.6%20360.4%20204l131-.1-106%2072.4%2040.5%20117.3-106-72.6L214%20393.4'/%3e%3c/g%3e%3c/svg%3e")}.fi-bf.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-bf'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%23de0000'%20d='M512%20511.6H.5V0H512z'/%3e%3cpath%20fill='%2335a100'%20d='M511.8%20512H0V256.2h511.7z'/%3e%3c/g%3e%3cpath%20fill='%23fff300'%20fill-rule='evenodd'%20d='m389%20223.8-82.9%2056.5%2031.7%2091.6-82.7-56.7-82.8%2056.7%2031.7-91.6-82.8-56.6%20102.3.2%2031.6-91.7%2031.5%2091.6'/%3e%3c/svg%3e")}.fi-bg{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-bg'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23d62612'%20d='M0%20320h640v160H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%200h640v160H0z'/%3e%3cpath%20fill='%2300966e'%20d='M0%20160h640v160H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-bg.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-bg'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23d62612'%20d='M0%20341.3h512V512H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%200h512v170.7H0z'/%3e%3cpath%20fill='%2300966e'%20d='M0%20170.7h512v170.6H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-bh{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-bh'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0'/%3e%3cpath%20fill='%23ce1126'%20d='M640%200H96l110.7%2048L96%2096l110.7%2048L96%20192l110.7%2048L96%20288l110.7%2048L96%20384l110.7%2048L96%20480h544'/%3e%3c/svg%3e")}.fi-bh.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-bh'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23fff'%20d='M0%200h512v512H0'/%3e%3cpath%20fill='%23ce1126'%20d='M512%200H102.4l83.4%2051.2-83.4%2051.2%2083.4%2051.2-83.4%2051.2%2083.4%2051.2-83.4%2051.2%2083.4%2051.2-83.4%2051.2%2083.4%2051.2-83.4%2051.2H512'/%3e%3c/svg%3e")}.fi-bi{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-bi'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='bi-a'%3e%3cpath%20fill-opacity='.7'%20d='M-90.5%200H592v512H-90.5z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23bi-a)'%20transform='translate(84.9)scale(.9375)'%3e%3cpath%20fill='%2318b637'%20d='m-178%200%20428.8%20256L-178%20512zm857.6%200L250.8%20256l428.8%20256z'/%3e%3cpath%20fill='%23cf0921'%20d='m-178%200%20428.8%20256L679.6%200zm0%20512%20428.8-256%20428.8%20256z'/%3e%3cpath%20fill='%23fff'%20d='M679.6%200h-79.9L-178%20464.3V512h79.9L679.6%2047.7z'/%3e%3cpath%20fill='%23fff'%20d='M398.9%20256a148%20148%200%201%201-296.1%200%20148%20148%200%200%201%20296%200z'/%3e%3cpath%20fill='%23fff'%20d='M-178%200v47.7L599.7%20512h79.9v-47.7L-98.1%200z'/%3e%3cpath%20fill='%23cf0921'%20stroke='%2318b637'%20stroke-width='3.9'%20d='m280%20200.2-19.3.3-10%2016.4-9.9-16.4-19.2-.4%209.3-16.9-9.2-16.8%2019.2-.4%2010-16.4%209.9%2016.5%2019.2.4-9.3%2016.8zm-64.6%20111.6-19.2.3-10%2016.4-9.9-16.4-19.2-.4%209.3-16.9-9.2-16.8%2019.2-.4%2010-16.4%209.9%2016.5%2019.2.4-9.3%2016.8zm130.6%200-19.2.3-10%2016.4-10-16.4-19.1-.4%209.3-16.9-9.3-16.8%2019.2-.4%2010-16.4%2010%2016.5%2019.2.4-9.4%2016.8z'/%3e%3c/g%3e%3c/svg%3e")}.fi-bi.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-bi'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='bi-a'%3e%3cpath%20fill='gray'%20d='M60.8%20337h175v175h-175z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23bi-a)'%20transform='translate(-178%20-986)scale(2.9257)'%3e%3cpath%20fill='%2318b637'%20d='m0%20337%20146.6%2087.5L0%20512zm293.1%200-146.5%2087.5L293%20512z'/%3e%3cpath%20fill='%23cf0921'%20d='m0%20337%20146.6%2087.5L293%20337zm0%20175%20146.6-87.5L293%20512z'/%3e%3cpath%20fill='%23fff'%20d='M293.1%20337h-27.3L0%20495.7V512h27.3l265.8-158.7z'/%3e%3cpath%20fill='%23fff'%20d='M197.2%20424.5a50.6%2050.6%200%201%201-101.2%200%2050.6%2050.6%200%200%201%20101.2%200'/%3e%3cpath%20fill='%23fff'%20d='M0%20337v16.3L265.8%20512h27.3v-16.3L27.3%20337z'/%3e%3cpath%20fill='%23cf0921'%20stroke='%2318b637'%20stroke-width='1pt'%20d='m156.5%20405.4-6.6.1-3.4%205.6-3.4-5.6-6.5-.1%203.2-5.8-3.2-5.7%206.6-.2%203.4-5.6%203.4%205.7h6.5l-3.1%205.8zm-22%2038.2h-6.6l-3.4%205.7-3.4-5.6-6.6-.2%203.2-5.7-3.1-5.8%206.5-.1%203.4-5.6%203.4%205.6%206.6.2-3.2%205.7zm44.6%200h-6.6l-3.4%205.7-3.4-5.6-6.5-.2%203.1-5.7-3.1-5.8%206.6-.1%203.4-5.6%203.4%205.6%206.5.2-3.2%205.7z'/%3e%3c/g%3e%3c/svg%3e")}.fi-bj{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-bj'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='bj-a'%3e%3cpath%20fill='gray'%20d='M67.6-154h666v666h-666z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23bj-a)'%20transform='matrix(.961%200%200%20.7207%20-65%20111)'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23319400'%20d='M0-154h333v666H0z'/%3e%3cpath%20fill='%23ffd600'%20d='M333-154h666v333H333z'/%3e%3cpath%20fill='%23de2110'%20d='M333%20179h666v333H333z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}.fi-bj.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-bj'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='bj-a'%3e%3cpath%20fill='gray'%20d='M67.6-154h666v666h-666z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23bj-a)'%20transform='translate(-52%20118.4)scale(.7688)'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23319400'%20d='M0-154h333v666H0z'/%3e%3cpath%20fill='%23ffd600'%20d='M333-154h666v333H333z'/%3e%3cpath%20fill='%23de2110'%20d='M333%20179h666v333H333z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}.fi-bl{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-bl'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23000091'%20d='M0%200h213.3v480H0z'/%3e%3cpath%20fill='%23e1000f'%20d='M426.7%200H640v480H426.7z'/%3e%3c/svg%3e")}.fi-bl.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-bl'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23fff'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%2300267f'%20d='M0%200h170.7v512H0z'/%3e%3cpath%20fill='%23f31830'%20d='M341.3%200H512v512H341.3z'/%3e%3c/g%3e%3c/svg%3e")}.fi-bm{background-image:url(/assets/bm-BoWRAtUx.svg)}.fi-bm.fis{background-image:url(/assets/bm-CyW69jd8.svg)}.fi-bn{background-image:url(/assets/bn-BDKbSv-u.svg)}.fi-bn.fis{background-image:url(/assets/bn-CEevvwJS.svg)}.fi-bo{background-image:url(/assets/bo-BE5mqlGv.svg)}.fi-bo.fis{background-image:url(/assets/bo-Cvfzpazb.svg)}.fi-bq{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-bq'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%2321468b'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%200h640v320H0z'/%3e%3cpath%20fill='%23ae1c28'%20d='M0%200h640v160H0z'/%3e%3c/svg%3e")}.fi-bq.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-bq'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%2321468b'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%200h512v341.3H0z'/%3e%3cpath%20fill='%23ae1c28'%20d='M0%200h512v170.7H0z'/%3e%3c/svg%3e")}.fi-br{background-image:url(/assets/br-DFzUeaDV.svg)}.fi-br.fis{background-image:url(/assets/br-Dbh3w8z9.svg)}.fi-bs{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-bs'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='bs-a'%3e%3cpath%20fill-opacity='.7'%20d='M-12%200h640v480H-12z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23bs-a)'%20transform='translate(12)'%3e%3cpath%20fill='%23fff'%20d='M968.5%20480h-979V1.8h979z'/%3e%3cpath%20fill='%23ffe900'%20d='M968.5%20344.5h-979V143.3h979z'/%3e%3cpath%20fill='%2308ced6'%20d='M968.5%20480h-979V320.6h979zm0-318.7h-979V2h979z'/%3e%3cpath%20fill='%23000001'%20d='M-11%200c2.3%200%20391.8%20236.8%20391.8%20236.8L-12%20479.2z'/%3e%3c/g%3e%3c/svg%3e")}.fi-bs.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-bs'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='bs-a'%3e%3cpath%20fill-opacity='.7'%20d='M56.6%2026.4H537v480.3H56.6z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23bs-a)'%20transform='matrix(1.066%200%200%201.067%20-60.4%20-28.1)'%3e%3cpath%20fill='%23fff'%20d='M990%20506.2H9.4V27.6H990z'/%3e%3cpath%20fill='%23ffe900'%20d='M990%20370.6H9.4V169.2H990z'/%3e%3cpath%20fill='%2308ced6'%20d='M990%20506.2H9.4V346.7H990zm0-319H9.4V27.9H990z'/%3e%3cpath%20fill='%23000001'%20d='M9%2025.9c2.1%200%20392.3%20237%20392.3%20237L7.8%20505.3z'/%3e%3c/g%3e%3c/svg%3e")}.fi-bt{background-image:url(/assets/bt-Csq9bKsA.svg)}.fi-bt.fis{background-image:url(/assets/bt-Cm0R6rAQ.svg)}.fi-bv{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-bv'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='bv-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h640v480H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%20clip-path='url(%23bv-a)'%3e%3cpath%20fill='%23fff'%20d='M-28%200h699.7v512H-28z'/%3e%3cpath%20fill='%23d72828'%20d='M-53-77.8h218.7v276.2H-53zM289.4-.6h381v199h-381zM-27.6%20320h190.4v190.3H-27.6zm319.6%202.1h378.3v188.2H292z'/%3e%3cpath%20fill='%23003897'%20d='M196.7-25.4H261v535.7h-64.5z'/%3e%3cpath%20fill='%23003897'%20d='M-27.6%20224.8h698v63.5h-698z'/%3e%3c/g%3e%3c/svg%3e")}.fi-bv.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-bv'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='bv-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h512v512H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%20clip-path='url(%23bv-a)'%3e%3cpath%20fill='%23fff'%20d='M-68%200h699.7v512H-68z'/%3e%3cpath%20fill='%23d72828'%20d='M-93-77.8h218.7v276.2H-93zM249.4-.6h381v199h-381zM-67.6%20320h190.4v190.3H-67.5zm319.6%202.1h378.3v188.2H252z'/%3e%3cpath%20fill='%23003897'%20d='M156.7-25.4H221v535.7h-64.5z'/%3e%3cpath%20fill='%23003897'%20d='M-67.5%20224.8h697.8v63.5H-67.5z'/%3e%3c/g%3e%3c/svg%3e")}.fi-bw{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-bw'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%2300cbff'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20160h640v160H0z'/%3e%3cpath%20fill='%23000001'%20d='M0%20186h640v108H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-bw.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-bw'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%2300cbff'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20192h512v128H0z'/%3e%3cpath%20fill='%23000001'%20d='M0%20212.7h512V299H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-by{background-image:url(/assets/by-oPm0zKcB.svg)}.fi-by.fis{background-image:url(/assets/by-EkqhOCLw.svg)}.fi-bz{background-image:url(/assets/bz-YpwBidLU.svg)}.fi-bz.fis{background-image:url(/assets/bz-CqiVUvof.svg)}.fi-ca{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ca'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23fff'%20d='M150.1%200h339.7v480H150z'/%3e%3cpath%20fill='%23d52b1e'%20d='M-19.7%200h169.8v480H-19.7zm509.5%200h169.8v480H489.9zM201%20232l-13.3%204.4%2061.4%2054c4.7%2013.7-1.6%2017.8-5.6%2025l66.6-8.4-1.6%2067%2013.9-.3-3.1-66.6%2066.7%208c-4.1-8.7-7.8-13.3-4-27.2l61.3-51-10.7-4c-8.8-6.8%203.8-32.6%205.6-48.9%200%200-35.7%2012.3-38%205.8l-9.2-17.5-32.6%2035.8c-3.5.9-5-.5-5.9-3.5l15-74.8-23.8%2013.4c-2%20.9-4%20.1-5.2-2.2l-23-46-23.6%2047.8c-1.8%201.7-3.6%201.9-5%20.7L264%20130.8l13.7%2074.1c-1.1%203-3.7%203.8-6.7%202.2l-31.2-35.3c-4%206.5-6.8%2017.1-12.2%2019.5-5.4%202.3-23.5-4.5-35.6-7%204.2%2014.8%2017%2039.6%209%2047.7'/%3e%3c/svg%3e")}.fi-ca.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ca'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23fff'%20d='M81.1%200h362.3v512H81.1z'/%3e%3cpath%20fill='%23d52b1e'%20d='M-100%200H81.1v512H-100zm543.4%200h181.1v512H443.4zM135.3%20247.4l-14%204.8%2065.4%2057.5c5%2014.8-1.7%2019.1-6%2026.9l71-9-1.8%2071.5%2014.8-.5-3.3-70.9%2071.2%208.4c-4.4-9.3-8.3-14.2-4.3-29l65.4-54.5-11.4-4.1c-9.4-7.3%204-34.8%206-52.2%200%200-38.1%2013.1-40.6%206.2l-9.9-18.5-34.6%2038c-3.8%201-5.4-.6-6.3-3.8l16-79.7-25.4%2014.3c-2.1.9-4.2%200-5.6-2.4l-24.5-49-25.2%2050.9c-1.9%201.8-3.8%202-5.4.8l-24.2-13.6%2014.5%2079.2c-1.1%203-3.9%204-7.1%202.3l-33.3-37.8c-4.3%207-7.3%2018.4-13%2021-5.7%202.3-25-4.9-37.9-7.7%204.4%2015.9%2018.2%2042.3%209.5%2051z'/%3e%3c/svg%3e")}.fi-cc{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-cc'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cpath%20id='cc-a'%20d='m0-360%2069.4%20215.8%20212-80.3L156-35.6%20351%2080.1%20125%2099.8l31.1%20224.6L0%20160l-156.2%20164.3%2031.1-224.5L-351%2080l195-115.7-125.5-188.9%20212%2080.3z'/%3e%3cpath%20id='cc-b'%20d='M0-210%2054.9-75.5l144.8%2010.6-111%2093.8%2034.7%20141L0%2093.3-123.4%20170l34.6-141-111-93.8%20145-10.6z'/%3e%3c/defs%3e%3cpath%20fill='green'%20d='M0%200h640v480H0z'/%3e%3ccircle%20cx='320'%20cy='240'%20r='66.7'%20fill='%23ffe000'/%3e%3ccircle%20cx='340.8'%20cy='240'%20r='54.9'%20fill='green'/%3e%3ccircle%20cx='109.8'%20cy='173.3'%20r='69.8'%20fill='%23ffe000'/%3e%3cpath%20fill='%23802000'%20stroke='%237b3100'%20stroke-width='1.5'%20d='M105%20226h17.5s.7-1.6-.2-2.4c-1-.8-4.7-1-3.7-3.8%202-5.8%202.4-4%203.7-17.8a739%20739%200%200%200%202-35.5h-2.6s.5%206.7-1%2015.5c-1.4%208.8-1.9%209.5-3.5%2016.3a63.5%2063.5%200%200%201-3.3%2011.2c-1.4%204-1.6%204.1-3.8%207.8-2.3%203.6-1.5%202.2-2.7%204.4-.7%201.1-1.4.8-1.9%201.6-.4.8-.5%202.7-.5%202.7z'/%3e%3cpath%20fill='green'%20d='M118.3%20122.5a23%2023%200%200%201-1.2%209.2%2026.5%2026.5%200%200%200-2.3%209.8c-1.8.6-3.7-3.9-5.5-1.2%201.3%203.7%204.4%206.6%206.4%209.9.4%201%203.4%203.7%201.6%204.3-4.3-1.5-5.4-7-8-10.3a19%2019%200%200%200-15.5-10c-2.5.1-10.4-.5-8.4%203.7%203%202%206.8%203.4%209.8%205.7%202.3.2%206.3%204%206.1%205.4-4-1.6-5.8-3.5-10-5.2-5.8-2.2-13.7-.9-17%204.8-.5%201.5-1.4%205.8.5%206.3%202.2-3.4%205.3-7.3%209.9-6.2%203.6.3-4%206.7-1.1%205.4%201-.4%203-1.8%204.6-2%201.5%200%202.3%201%203.4%201.2%202.3.3%203%201.2%202.7%201.8-.2.6-1%200-3.3.8-1.1.4-1.7%201.4-3%201.9-1.4.4-4.2.5-5.2%200-3.7-1.5-9.7-1.3-10.8%203.3%200%202-1.8-.2-2.6.7-.7%202.2-.8%204.4-4%204.2-2%202-4%204.2-6.6%205.7%201.5%203.4%207.3-3.4%207-.5-2.5%203.5%201.4%204.2%203%201.5%202.9-3%206.5-6.7%2010.7-3.6%202%201.9%203.2-1%204.7-1%201%202.5%202.1.2%203.2-.5%201.7-.2%201.2%202.2%203.2.7%204.1-2.7%209.1-.4%2013.1-3%204.3-2%20.6%201.5-.5%202.9-1.9%203.6-.3%208.4-4.3%2010.6-1.7%204.3%201.9%2010-1.7%2013.2-.5%202%204.6%201.8%206%202.6%202.6%200%200-5.8%202.5-6.6%203.4%202%203.2-3.8%202.5-5.6.4-4%20.6-8.6%202.6-12.3%202.2-4.5%204.2%201.9%201.8%203.7-1.4%204.1-3.4%209.4-.3%2013.3%201%20.2%201.7%202.4%202.8%203%201.2.7%202.8-.1%203-2.1%201.6-6%20.8-12.4%203-18.3%201.5-1.8%203.6-.3%204.5%201.4%203%203.5%205.1%207.8%208.7%2010.7a15%2015%200%200%201%207.8%207.3c0%202.6%207.4%203%205.2%200-2.1-2.7-.7-5.6%201.4-7.5%201.2.3.9-1.8%200-1-1.5-.3-1.6-3%20.4-1.7%203.5%201.1-.2-2.5-1.5-2.6-2.9-1.8-6.2-3.8-7.6-7%203.8%200%207.7%202.1%2011.5.9%203.1-1.6%206.2%200%207.3%202.8%202.4-.4%201.4-2.8%200-3.6%201.7-.7%203-2.2.8-3.5-1-1.4%201.5-4-1.7-3.8.1-2.5-.8-4.7-3.5-5.6-2.7-2.2-10.6%203.4-10.3-1.7-.8-2.8%203.2-.4%204.3-1.8%201.1-3-5.5-2.6-3.3-5%201.4-.8%208.1-2.1%202.9-3.1a8.3%208.3%200%200%201-7-1.1c-1.9%203.1-7.2-1.8-6.3%203.8-.7%202.1-5.5%207.6-6.8%203.4%201-3.3%206.8-4.3%205-8.8-.3-2.7-2.6.5-3.6.3-.6-1.7%201.6-3.8%203.2-4.2%203%202.4%203-3%206-2.5%202.1-.5-.7-1.4-1.3-1.8.6-1.5%203.9-2.3.7-3.7-2.9-2-5%202.1-7.3%202.3-2.2-2.5%202-3.7%203.2-5%20.1-1-2.4-.3-1.7-1.2.7-1.1%205.2-1.2%203-3a14.7%2014.7%200%200%200-10.2.6c-2%20.6-2.5%205-4.2%204.8-.7-2%20.3-5.8-2.4-6.3m15%2042.3c2.4-.4%200%203.7-1%203.6%200-1.4-3.6-1.3-1.3-2.6a7.3%207.3%200%200%201%202.3-1'/%3e%3cg%20fill='%23ffe000'%20transform='translate(0%2080)scale(.0635)'%3e%3cuse%20xlink:href='%23cc-a'%20width='100%25'%20height='100%25'%20x='7560'%20y='4200'/%3e%3cuse%20xlink:href='%23cc-a'%20width='100%25'%20height='100%25'%20x='6300'%20y='2205'/%3e%3cuse%20xlink:href='%23cc-a'%20width='100%25'%20height='100%25'%20x='7560'%20y='840'/%3e%3cuse%20xlink:href='%23cc-a'%20width='100%25'%20height='100%25'%20x='8680'%20y='1869'/%3e%3cuse%20xlink:href='%23cc-b'%20width='100%25'%20height='100%25'%20x='8064'%20y='2730'/%3e%3c/g%3e%3c/svg%3e")}.fi-cc.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-cc'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cpath%20id='cc-a'%20d='m0-360%2069.4%20215.8%20212-80.3L156-35.6%20351%2080.1%20125%2099.8l31.1%20224.6L0%20160l-156.2%20164.3%2031.1-224.5L-351%2080l195-115.7-125.5-188.9%20212%2080.3z'/%3e%3cpath%20id='cc-b'%20d='M0-210%2054.9-75.5l144.8%2010.6-111%2093.8%2034.7%20141L0%2093.3-123.4%20170l34.6-141-111-93.8%20145-10.6z'/%3e%3c/defs%3e%3cpath%20fill='green'%20d='M0%200h512v512H0z'/%3e%3ccircle%20cx='268.2'%20cy='250.4'%20r='61.2'%20fill='%23ffe000'/%3e%3ccircle%20cx='287.3'%20cy='250.4'%20r='50.4'%20fill='green'/%3e%3ccircle%20cx='75.2'%20cy='189.2'%20r='64.2'%20fill='%23ffe000'/%3e%3cpath%20fill='%23802000'%20stroke='%237b3100'%20stroke-width='1.4'%20d='M70.7%20237.6h16s.8-1.5-.1-2.2c-.9-.8-4.3-1-3.4-3.5%202-5.4%202.2-3.7%203.4-16.4%201.2-12.7%201.7-32.6%201.7-32.6H86s.5%206.2-.9%2014.3c-1.3%208-1.7%208.7-3.2%2015-1.4%206.1-1.7%206.6-3%2010.3-1.3%203.6-1.5%203.7-3.5%207l-2.5%204.2c-.6%201-1.3.7-1.7%201.4-.4.8-.5%202.5-.5%202.5z'/%3e%3cpath%20fill='green'%20d='M83%20142.5c0%202.5-.2%205.7-1.2%208.4-1%203-2.2%206-2.1%209-1.7.7-3.4-3.5-5-1%201.2%203.3%204%206%205.9%209%20.3%201%203%203.5%201.5%204-4-1.3-5-6.4-7.5-9.5a17.5%2017.5%200%200%200-14.2-9c-2.3%200-9.6-.6-7.7%203.2%202.8%202%206.3%203.2%209%205.3%202.1.2%205.8%203.6%205.6%205-3.6-1.5-5.3-3.3-9.2-4.8-5.3-2-12.6-.9-15.5%204.4-.6%201.4-1.4%205.3.3%205.7%202-3.1%205-6.6%209.2-5.7%203.3.3-3.8%206.3-1%205%20.8-.3%202.8-1.6%204.1-1.7%201.4-.2%202.2.8%203.2%201%202.1.3%202.7%201.1%202.5%201.6-.2.6-1%20.1-3%20.8-1%20.3-1.6%201.3-2.9%201.7-1.2.4-3.8.4-4.7%200-3.4-1.4-8.9-1.1-10%203%200%202-1.6-.1-2.3.7-.6%202-.8%204-3.8%203.9-1.8%201.9-3.6%203.9-6%205.2%201.4%203.1%206.8-3.1%206.5-.5-2.3%203.2%201.2%203.9%202.8%201.4%202.6-2.8%205.9-6.1%209.8-3.3%201.9%201.7%203-1%204.3-.8.9%202.2%202%200%203-.5%201.5-.2%201%202%203%20.6%203.7-2.5%208.3-.4%2012-2.8%203.8-1.8.5%201.4-.6%202.7-1.7%203.3-.2%207.7-4%209.7-1.4%204%201.8%209.2-1.5%2012.1-.5%201.9%204.3%201.7%205.6%202.4%202.4.1%200-5.3%202.2-6%203.1%201.9%203-3.5%202.4-5.2.3-3.7.5-7.8%202.3-11.3%202-4.1%203.9%201.7%201.6%203.4-1.2%203.8-3%208.7-.2%2012.2.9.2%201.5%202.2%202.6%202.8%201%20.7%202.5-.1%202.8-2%201.4-5.4.7-11.4%202.7-16.7%201.3-1.7%203.3-.3%204.1%201.2%202.8%203.2%204.7%207.2%208%209.9a14%2014%200%200%201%207.2%206.7c0%202.4%206.8%202.7%204.8%200-2-2.5-.7-5.2%201.3-6.9%201%20.3.7-1.6%200-.9-1.4-.3-1.5-2.8.3-1.6%203.2%201-.2-2.3-1.3-2.4-2.7-1.6-5.7-3.5-7-6.4%203.4%200%207%202%2010.5.8%202.9-1.5%205.7.1%206.7%202.6%202.2-.4%201.3-2.5%200-3.3%201.6-.6%202.7-2%20.8-3.2-1-1.4%201.4-3.6-1.6-3.5.1-2.3-.8-4.3-3.2-5.1-2.5-2.1-9.7%203-9.5-1.7-.7-2.5%203-.3%204-1.6%201-2.7-5-2.4-3-4.5%201.2-.8%207.4-2%202.6-3a7.6%207.6%200%200%201-6.4-1c-1.7%203-6.7-1.6-5.8%203.6-.7%202-5%207-6.3%203.1%201-3%206.3-4%204.6-8-.2-2.6-2.3.4-3.3.2-.5-1.6%201.5-3.5%203-3.9%202.7%202.2%202.8-2.7%205.5-2.3%202-.4-.7-1.2-1.2-1.6.5-1.4%203.5-2.2.6-3.4-2.6-2-4.5%202-6.6%202.1-2-2.3%201.8-3.4%202.9-4.6%200-1-2.3-.3-1.6-1%20.6-1.2%204.8-1.3%202.8-2.9-2.9-1-6.6-.7-9.4.5-1.8.6-2.3%204.6-3.8%204.4-.8-1.7.2-5.2-2.2-5.8zm13.7%2038.9c2.3-.4%200%203.3-1%203.3.1-1.3-3.2-1.2-1.1-2.4a6.7%206.7%200%200%201%202.1-1z'/%3e%3cg%20fill='%23ffe000'%20transform='translate(-25.8%20103.5)scale(.05833)'%3e%3cuse%20xlink:href='%23cc-a'%20width='100%25'%20height='100%25'%20x='7560'%20y='4200'/%3e%3cuse%20xlink:href='%23cc-a'%20width='100%25'%20height='100%25'%20x='6300'%20y='2205'/%3e%3cuse%20xlink:href='%23cc-a'%20width='100%25'%20height='100%25'%20x='7560'%20y='840'/%3e%3cuse%20xlink:href='%23cc-a'%20width='100%25'%20height='100%25'%20x='8680'%20y='1869'/%3e%3cuse%20xlink:href='%23cc-b'%20width='100%25'%20height='100%25'%20x='8064'%20y='2730'/%3e%3c/g%3e%3c/svg%3e")}.fi-cd{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-cd'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23007fff'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23f7d618'%20d='M28.8%2096H96l20.8-67.2L137.6%2096h67.2l-54.4%2041.6%2020.8%2067.2-54.4-41.6-54.4%2041.6%2020.8-67.2zM600%200%200%20360v120h40l600-360V0z'/%3e%3cpath%20fill='%23ce1021'%20d='M640%200%200%20384v96L640%2096z'/%3e%3c/svg%3e")}.fi-cd.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-cd'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='cd-a'%3e%3cpath%20fill='%23fff'%20d='M0-88h600v600H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23cd-a)'%20transform='translate(0%2075.1)scale(.853)'%3e%3cpath%20fill='%23007fff'%20d='M0-88h800v600H0z'/%3e%3cpath%20fill='%23f7d618'%20d='M36%2032h84l26-84%2026%2084h84l-68%2052%2026%2084-68-52-68%2052%2026-84zM750-88%200%20362v150h50L800%2062V-88z'/%3e%3cpath%20fill='%23ce1021'%20d='M800-88%200%20392v120L800%2032z'/%3e%3c/g%3e%3c/svg%3e")}.fi-cf{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-cf'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='cf-a'%3e%3cpath%20fill-opacity='.7'%20d='M-12.4%2032h640v480h-640z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23cf-a)'%20transform='translate(12.4%20-32)'%3e%3cpath%20fill='%2300f'%20d='M-52%2032h719.3v119H-52z'/%3e%3cpath%20fill='%23ff0'%20d='M-52%20391.6h719.3V512H-52z'/%3e%3cpath%20fill='%23009a00'%20d='M-52%20271.3h719.3v120.3H-52z'/%3e%3cpath%20fill='%23fff'%20d='M-52%20151h719.3v120.3H-52z'/%3e%3cpath%20fill='red'%20d='M247.7%2032.5h119.9V512H247.7z'/%3e%3cpath%20fill='%23ff0'%20d='m99.3%20137.7-31.5-21.8-31.3%2022L47.4%20101%2016.9%2078l38.2-1%2012.5-36.3L80.3%2077l38.1.7L88.2%20101'/%3e%3c/g%3e%3c/svg%3e")}.fi-cf.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-cf'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='cf-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h512v512H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23cf-a)'%3e%3cpath%20fill='%2300f'%20d='M-52-.5h768v127H-52z'/%3e%3cpath%20fill='%23ff0'%20d='M-52%20383.5h768V512H-52z'/%3e%3cpath%20fill='%23009a00'%20d='M-52%20255h768v128.5H-52z'/%3e%3cpath%20fill='%23fff'%20d='M-52%20126.5h768V255H-52z'/%3e%3cpath%20fill='red'%20d='M268%200h128v512H268z'/%3e%3cpath%20fill='%23ff0'%20d='M109.5%20112.3%2075.9%2089.1l-33.4%2023.4%2011.6-39.2-32.5-24.6%2040.7-1L75.7%208.8l13.5%2038.6%2040.8.8L97.6%2073'/%3e%3c/g%3e%3c/svg%3e")}.fi-cg{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-cg'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='cg-a'%3e%3cpath%20fill-opacity='.7'%20d='M-79.5%2032h640v480h-640z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%20clip-path='url(%23cg-a)'%20transform='translate(79.5%20-32)'%3e%3cpath%20fill='%23ff0'%20d='M-119.5%2032h720v480h-720z'/%3e%3cpath%20fill='%2300ca00'%20d='M-119.5%2032v480l480-480z'/%3e%3cpath%20fill='red'%20d='M120.5%20512h480V32z'/%3e%3c/g%3e%3c/svg%3e")}.fi-cg.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-cg'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='cg-a'%3e%3cpath%20fill-opacity='.7'%20d='M115.7%200h496.1v496h-496z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%20clip-path='url(%23cg-a)'%20transform='translate(-119.5)scale(1.032)'%3e%3cpath%20fill='%23ff0'%20d='M0%200h744v496H0z'/%3e%3cpath%20fill='%2300ca00'%20d='M0%200v496L496%200z'/%3e%3cpath%20fill='red'%20d='M248%20496h496V0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-ch{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ch'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='red'%20d='M0%200h640v480H0z'/%3e%3cg%20fill='%23fff'%3e%3cpath%20d='M170%20195h300v90H170z'/%3e%3cpath%20d='M275%2090h90v300h-90z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}.fi-ch.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ch'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='red'%20d='M0%200h512v512H0z'/%3e%3cg%20fill='%23fff'%3e%3cpath%20d='M96%20208h320v96H96z'/%3e%3cpath%20d='M208%2096h96v320h-96z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}.fi-ci{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ci'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%2300cd00'%20d='M426.8%200H640v480H426.8z'/%3e%3cpath%20fill='%23ff9a00'%20d='M0%200h212.9v480H0z'/%3e%3cpath%20fill='%23fff'%20d='M212.9%200h214v480h-214z'/%3e%3c/g%3e%3c/svg%3e")}.fi-ci.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ci'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%2300cd00'%20d='M341.5%200H512v512H341.5z'/%3e%3cpath%20fill='%23ff9a00'%20d='M0%200h170.3v512H0z'/%3e%3cpath%20fill='%23fff'%20d='M170.3%200h171.2v512H170.3z'/%3e%3c/g%3e%3c/svg%3e")}.fi-ck{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ck'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23006'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='m471.6%20213%205.2-16.7-14-10.6%2017.6-.2%206-16.5%205.6%2016.5%2017.7.5-14.1%2010.5%205%2016.7-14.5-10m27.1%2013%2010.4-13.9-9.7-14.8%2016.7%205.8%2011-13.5v17.6l16.4%206.4-16.8%205-.8%2017.5-10.2-14.4m-98.4%2015-.7-17.5-16.8-5.2L431%20198v-17.4l10.9%2013.5%2016.8-5.6-9.8%2014.7%2010.3%2014-17-4.5m-39.6%2040.9-7.4-15.8-17.4%201.8%2012.8-12.3L384%20211l15.2%208.2%2013.3-11.8-3.4%2017.4%2014.9%208.9-17.3%202.5M389%20291.8l-13.3-11.1-15%209.2%206.4-16.7-12.9-11.6%2017.3.7%207-16.4%204.3%2017.2%2017.2%201.5-14.6%209.8m3.2%2060.4-16.5-4.8-10.1%2014.5-.7-17.9-16.4-5.5%2016.1-6.2v-18l10.7%2014.1%2016.4-5.6-9.6%2015m29.5%2050.8-17%202.4-3.5%2017.4-7.8-16-17.1%201.6%2012.2-12.3-7.1-16.4%2015.3%208.5%2012.8-11.8L393%20362m45%2038-15.1%208.2%202.6%2017.6-12.7-12.4-15.6%207.6%207.3-15.9-12.3-12.9%2017.3%202.6%208-15.5%203.4%2017.4m53.8%209-8.3%2015.3%2011.7%2013.2-17.4-3.3-8.9%2015-2.4-17.3-17.2-4%2015.8-7.4-1.7-17.5%2012.2%2012.8m57.4-13.1-.5%2017.4%2016.3%206.4-17%205-1.2%2017.5-10-14.3-17%204.4%2010.8-13.9-9.4-14.7%2016.6%205.7M559%20209.8l12%2012.6%2015.9-7.4-8.3%2015.8%2011.5%2013.1-17-2.8-9%2015.5L562%20239l-17-3.5%2015.7-8m34.2%2021%205.5%2016.6%2017.5.3-14.2%2010.7%204.7%2016.8-14.1-10-14.6%2010.1%205.4-16.8-13.8-10.6%2017.6-.4m19.5%2033.2-2%2017.4%2015.7%207.7-17.3%203.6-2.7%2017.3-8.7-15.1-17.4%202.9%2012-13-8.1-15.5%2016%207.2m3%2039.8-7.8%2015.6L603%20379l-17.4-2.7-8.4%2015.3-3-17.3-17.4-3.3%2015.6-8-2.3-17.4%2012.6%2012.3m-9.8%2039.1-14.7%209.2%203.8%2017.3-13.5-11.5-15%208.6%206.3-16.3-13.1-12.1%2017.4%201.5%207-16%204.4%2017.2'/%3e%3cpath%20fill='%23006'%20d='M0%200h320v240H0z'/%3e%3cpath%20fill='%23fff'%20d='m37.5%200%20122%2090.5L281%200h39v31l-120%2089.5%20120%2089V240h-40l-120-89.5L40.5%20240H0v-30l119.5-89L0%2032V0z'/%3e%3cpath%20fill='%23c8102e'%20d='M212%20140.5%20320%20220v20l-135.5-99.5zm-92%2010%203%2017.5-96%2072H0zM320%200v1.5l-124.5%2094%201-22L295%200zM0%200l119.5%2088h-30L0%2021z'/%3e%3cpath%20fill='%23fff'%20d='M120.5%200v240h80V0zM0%2080v80h320V80z'/%3e%3cpath%20fill='%23c8102e'%20d='M0%2096.5v48h320v-48zM136.5%200v240h48V0z'/%3e%3c/svg%3e")}.fi-ck.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ck'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23006'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='m344.8%20250.1%205.7-18.3-15.4-11.7%2019.4-.2%206.5-18.1%206.3%2018.1%2019.4.6-15.6%2011.4%205.6%2018.4-15.9-11m29.7%2014.4%2011.4-15.3-10.6-16.3%2018.4%206.4%2012-14.8V233l18%207.1-18.4%205.5-.9%2019.2-11.3-15.8m-108%2016.5-.8-19.2-18.4-5.7%2018.2-7v-19.1l12%2014.9%2018.4-6.2-10.8%2016.1%2011.4%2015.4-18.6-5m-43.6%2045-8-17.4-19.2%202%2014-13.5-7.2-17.7%2016.7%209%2014.6-13-3.7%2019.1%2016.3%209.7-19%202.8m-19.2%2061-14.6-12.1-16.5%2010%207-18.3-14-12.8%2018.9.9%207.7-18%204.7%2018.8%2018.9%201.7-16%2010.8m3.5%2066.3-18.2-5.3-11%2016-.8-19.7-18-6%2017.7-6.9v-19.7l11.7%2015.5%2018-6.1-10.5%2016.3m32.4%2055.9-18.7%202.6-3.8%2019.1L244%20428l-18.8%201.8%2013.5-13.5-7.9-18%2016.9%209.3%2014-13-3%2019.3m49.4%2041.7-16.7%209%203%2019.3-14.1-13.6-17%208.3%208-17.4-13.5-14.1%2019%202.8%208.7-17%203.7%2019m59.1%2010-9%2016.8%2012.8%2014.5-19.1-3.6-9.8%2016.4-2.7-19-18.9-4.4%2017.4-8.2-1.9-19%2013.5%2013.9m63-14.4-.7%2019.2%2018%207-18.6%205.6-1.3%2019.1-11-15.7-18.8%204.9%2011.9-15.4-10.3-16.1%2018.3%206.2m59.8-223.2%2013.1%2013.9%2017.5-8.1-9%2017.4L475%20284l-18.7-3-9.8%2017-2.5-19.3-18.6-4%2017.2-8.7m37.6%2023.1%206%2018.3%2019.1.3-15.5%2011.7L495%20338l-15.6-11-16%2011.1%206-18.5-15.2-11.6%2019.3-.5m21.4%2036.5-2.2%2019%2017.3%208.6-19%204-3%2019-9.5-16.7-19.1%203.2%2013-14.3-8.8-17%2017.7%207.9m3.2%2043.7-8.5%2017.1%2013.3%2014-19.1-2.8-9.3%2016.7-3.3-18.9-19-3.7%2017-8.8-2.5-19%2014%2013.5m-10.9%2043-16.1%2010%204.1%2019-14.8-12.6-16.5%209.4%207-18-14.4-13.2%2019.1%201.6%207.7-17.6%204.9%2019'/%3e%3cpath%20fill='%23006'%20d='M0-.5h256v256H0z'/%3e%3cpath%20fill='%23fff'%20d='M256-.5v32l-95%2096%2095%2093.5v34.5h-33.5l-95.5-94-93%2094H0v-34L93%20128%200%2036.5v-37h31l96%2094%2093-94z'/%3e%3cpath%20fill='%23c8102e'%20d='m92%20161.5%205.5%2017-76.5%2077H0V254zm62-6%2027%204%2075%2073.5v22.5zM256-.5l-96%2098-2-22%2075-76zM0%200l96.5%2094.5-29.5-4L0%2024z'/%3e%3cpath%20fill='%23fff'%20d='M88-.5v256h80V-.5zm-88%2088v80h256v-80z'/%3e%3cpath%20fill='%23c8102e'%20d='M0%20103.5v48h256v-48zM104-.5v256h48V-.5z'/%3e%3c/svg%3e")}.fi-cl{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-cl'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='cl-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h682.7v512H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23cl-a)'%20transform='scale(.9375)'%3e%3cpath%20fill='%23fff'%20d='M256%200h512v256H256z'/%3e%3cpath%20fill='%230039a6'%20d='M0%200h256v256H0z'/%3e%3cpath%20fill='%23fff'%20d='M167.8%20191.7%20128.2%20162l-39.5%2030%2014.7-48.8L64%20113.1l48.7-.5L127.8%2064l15.5%2048.5%2048.7.1-39.2%2030.4z'/%3e%3cpath%20fill='%23d52b1e'%20d='M0%20256h768v256H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-cl.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-cl'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='cl-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h708.7v708.7H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23cl-a)'%20transform='scale(.722)'%3e%3cpath%20fill='%23fff'%20d='M354.3%200H1063v354.3H354.3z'/%3e%3cpath%20fill='%230039a6'%20d='M0%200h354.3v354.3H0z'/%3e%3cpath%20fill='%23fff'%20d='m232.3%20265.3-55-41.1-54.5%2041.5%2020.3-67.5-54.5-41.7%2067.4-.6%2021-67.3%2021.3%2067.2h67.5L211.4%20198z'/%3e%3cpath%20fill='%23d52b1e'%20d='M0%20354.3h1063v354.4H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-cm{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-cm'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23007a5e'%20d='M0%200h213.3v480H0z'/%3e%3cpath%20fill='%23ce1126'%20d='M213.3%200h213.4v480H213.3z'/%3e%3cpath%20fill='%23fcd116'%20d='M426.7%200H640v480H426.7z'/%3e%3cg%20fill='%23fcd116'%20transform='translate(320%20240)scale(7.1111)'%3e%3cg%20id='cm-b'%3e%3cpath%20id='cm-a'%20d='M0-8-2.5-.4%201.3.9z'/%3e%3cuse%20xlink:href='%23cm-a'%20width='100%25'%20height='100%25'%20transform='scale(-1%201)'/%3e%3c/g%3e%3cuse%20xlink:href='%23cm-b'%20width='100%25'%20height='100%25'%20transform='rotate(72)'/%3e%3cuse%20xlink:href='%23cm-b'%20width='100%25'%20height='100%25'%20transform='rotate(144)'/%3e%3cuse%20xlink:href='%23cm-b'%20width='100%25'%20height='100%25'%20transform='rotate(-144)'/%3e%3cuse%20xlink:href='%23cm-b'%20width='100%25'%20height='100%25'%20transform='rotate(-72)'/%3e%3c/g%3e%3c/svg%3e")}.fi-cm.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-cm'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23007a5e'%20d='M0%200h170.7v512H0z'/%3e%3cpath%20fill='%23ce1126'%20d='M170.7%200h170.6v512H170.7z'/%3e%3cpath%20fill='%23fcd116'%20d='M341.3%200H512v512H341.3z'/%3e%3cg%20fill='%23fcd116'%20transform='translate(256%20256)scale(5.6889)'%3e%3cg%20id='cm-b'%3e%3cpath%20id='cm-a'%20d='M0-8-2.5-.4%201.3.9z'/%3e%3cuse%20xlink:href='%23cm-a'%20width='100%25'%20height='100%25'%20transform='scale(-1%201)'/%3e%3c/g%3e%3cuse%20xlink:href='%23cm-b'%20width='100%25'%20height='100%25'%20transform='rotate(72)'/%3e%3cuse%20xlink:href='%23cm-b'%20width='100%25'%20height='100%25'%20transform='rotate(144)'/%3e%3cuse%20xlink:href='%23cm-b'%20width='100%25'%20height='100%25'%20transform='rotate(-144)'/%3e%3cuse%20xlink:href='%23cm-b'%20width='100%25'%20height='100%25'%20transform='rotate(-72)'/%3e%3c/g%3e%3c/svg%3e")}.fi-cn{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-cn'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cpath%20id='cn-a'%20fill='%23ff0'%20d='M-.6.8%200-1%20.6.8-1-.3h2z'/%3e%3c/defs%3e%3cpath%20fill='%23ee1c25'%20d='M0%200h640v480H0z'/%3e%3cuse%20xlink:href='%23cn-a'%20width='30'%20height='20'%20transform='matrix(71.9991%200%200%2072%20120%20120)'/%3e%3cuse%20xlink:href='%23cn-a'%20width='30'%20height='20'%20transform='matrix(-12.33562%20-20.5871%2020.58684%20-12.33577%20240.3%2048)'/%3e%3cuse%20xlink:href='%23cn-a'%20width='30'%20height='20'%20transform='matrix(-3.38573%20-23.75998%2023.75968%20-3.38578%20288%2095.8)'/%3e%3cuse%20xlink:href='%23cn-a'%20width='30'%20height='20'%20transform='matrix(6.5991%20-23.0749%2023.0746%206.59919%20288%20168)'/%3e%3cuse%20xlink:href='%23cn-a'%20width='30'%20height='20'%20transform='matrix(14.9991%20-18.73557%2018.73533%2014.99929%20240%20216)'/%3e%3c/svg%3e")}.fi-cn.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-cn'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cpath%20id='cn-a'%20fill='%23ff0'%20d='M1-.3-.7.8%200-1%20.6.8-1-.3z'/%3e%3c/defs%3e%3cpath%20fill='%23ee1c25'%20d='M0%200h512v512H0z'/%3e%3cuse%20xlink:href='%23cn-a'%20width='30'%20height='20'%20transform='translate(128%20128)scale(76.8)'/%3e%3cuse%20xlink:href='%23cn-a'%20width='30'%20height='20'%20transform='rotate(-121%20142.6%20-47)scale(25.5827)'/%3e%3cuse%20xlink:href='%23cn-a'%20width='30'%20height='20'%20transform='rotate(-98.1%20198%20-82)scale(25.6)'/%3e%3cuse%20xlink:href='%23cn-a'%20width='30'%20height='20'%20transform='rotate(-74%20272.4%20-114)scale(25.6137)'/%3e%3cuse%20xlink:href='%23cn-a'%20width='30'%20height='20'%20transform='matrix(16%20-19.968%2019.968%2016%20256%20230.4)'/%3e%3c/svg%3e")}.fi-co{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-co'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23ffe800'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%2300148e'%20d='M0%20240h640v240H0z'/%3e%3cpath%20fill='%23da0010'%20d='M0%20360h640v120H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-co.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-co'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23ffe800'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%2300148e'%20d='M0%20256h512v256H0z'/%3e%3cpath%20fill='%23da0010'%20d='M0%20384h512v128H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-cr{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-cr'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%230000b4'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%2075.4h640v322.3H0z'/%3e%3cpath%20fill='%23d90000'%20d='M0%20157.7h640v157.7H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-cr.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-cr'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%230000b4'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%2080.5h512v343.7H0z'/%3e%3cpath%20fill='%23d90000'%20d='M0%20168.2h512v168.2H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-cu{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-cu'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='cu-a'%3e%3cpath%20fill-opacity='.7'%20d='M-32%200h682.7v512H-32z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23cu-a)'%20transform='translate(30)scale(.94)'%3e%3cpath%20fill='%23002a8f'%20d='M-32%200h768v512H-32z'/%3e%3cpath%20fill='%23fff'%20d='M-32%20102.4h768v102.4H-32zm0%20204.8h768v102.4H-32z'/%3e%3cpath%20fill='%23cb1515'%20d='m-32%200%20440.7%20255.7L-32%20511z'/%3e%3cpath%20fill='%23fff'%20d='M161.8%20325.5%20114.3%20290l-47.2%2035.8%2017.6-58.1-47.2-36%2058.3-.4%2018.1-58%2018.5%2057.8%2058.3.1-46.9%2036.3z'/%3e%3c/g%3e%3c/svg%3e")}.fi-cu.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-cu'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='cu-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h512v512H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23cu-a)'%3e%3cpath%20fill='%23002a8f'%20d='M-32%200h768v512H-32z'/%3e%3cpath%20fill='%23fff'%20d='M-32%20102.4h768v102.4H-32zm0%20204.8h768v102.4H-32z'/%3e%3cpath%20fill='%23cb1515'%20d='m-32%200%20440.7%20255.7L-32%20511z'/%3e%3cpath%20fill='%23fff'%20d='M161.8%20325.5%20114.3%20290l-47.2%2035.8%2017.6-58.1-47.2-36%2058.3-.4%2018.1-58%2018.5%2057.8%2058.3.1-46.9%2036.3z'/%3e%3c/g%3e%3c/svg%3e")}.fi-cv{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-cv'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='cv-a'%3e%3cpath%20fill-opacity='.7'%20d='M-123.4%200h682.6v512h-682.6z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23cv-a)'%20transform='translate(115.7)scale(.94)'%3e%3cpath%20fill='%23fff'%20d='M-123.4%20233H723v206h-846.5z'/%3e%3cpath%20fill='%23081873'%20d='M-122.8%200h846v256.6h-846zm.3%20385.9h852.1V512h-852.1z'/%3e%3cpath%20fill='%23de3929'%20d='M-122.5%20302.6h846v39.6h-846z'/%3e%3cpath%20fill='%23ffce08'%20d='m131%20399.2%206.6%2020.4H159l-17.4%2012.7%206.6%2020.5L131%20440l-17.4%2012.7%206.7-20.5-17.4-12.7h21.5M317%20250.4l6.7%2020.5H345l-17.4%2012.6%206.6%2020.5-17.4-12.7-17.4%2012.7%206.6-20.5-17.4-12.6h21.6m-222%2064.4%206.6%2020.5h21.5L99%20368.6l6.7%2020.4-17.4-12.6L70.9%20389l6.6-20.4-17.4-12.7h21.5M317%20329.5l6.7%2020.4H345l-17.4%2012.7%206.6%2020.4-17.4-12.6-17.4%2012.7%206.6-20.5-17.4-12.7h21.6m-40.5-161.7%206.7%2020.4H298l-17.4%2012.7%206.6%2020.5-17.4-12.7-17.4%2012.7%206.7-20.5-17.5-12.7h21.6m-64.5-45.2%206.7%2020.5h21.5l-17.4%2012.6%206.6%2020.5-17.4-12.6-17.4%2012.6%206.7-20.5-17.4-12.6H192m-64.5%202.9%206.7%2020.5h21.5l-17.4%2012.6%206.7%2020.5-17.5-12.7-17.4%2012.7%206.7-20.5-17.4-12.6H121m-34.8%2043.2%206.6%2020.5h21.6l-17.5%2012.6%206.7%2020.5-17.4-12.7-17.4%2012.7%206.6-20.5L58%20271h21.5m119.2%20149.4%206.7%2020.5h21.5l-17.4%2012.6%206.7%2020.5-17.5-12.7-17.4%2012.7%206.7-20.5-17.4-12.6H192m82.2-41.7%206.6%2020.4h21.5L285%20432.3l6.7%2020.5-17.4-12.7-17.5%2012.7%206.7-20.5-17.4-12.7h21.5'/%3e%3c/g%3e%3c/svg%3e")}.fi-cv.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-cv'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='cv-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h512v512H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23cv-a)'%3e%3cpath%20fill='%23fff'%20d='M-123.4%20233H723v206h-846.5z'/%3e%3cpath%20fill='%23081873'%20d='M-122.8%200h846v256.6h-846zm.3%20385.9h852.1V512h-852.1z'/%3e%3cpath%20fill='%23de3929'%20d='M-122.5%20302.6h846v39.6h-846z'/%3e%3cpath%20fill='%23ffce08'%20d='m131%20399.2%206.6%2020.4H159l-17.4%2012.7%206.6%2020.5L131%20440l-17.4%2012.7%206.7-20.5-17.4-12.7h21.5M317%20250.4l6.7%2020.5H345l-17.4%2012.6%206.6%2020.5-17.4-12.7-17.4%2012.7%206.6-20.5-17.4-12.6h21.6m-222%2064.4%206.6%2020.5h21.5L99%20368.6l6.7%2020.4-17.4-12.6L70.9%20389l6.6-20.4-17.4-12.7h21.5M317%20329.5l6.7%2020.4H345l-17.4%2012.7%206.6%2020.4-17.4-12.6-17.4%2012.7%206.6-20.5-17.4-12.7h21.6m-40.5-161.7%206.7%2020.4H298l-17.4%2012.7%206.6%2020.5-17.4-12.7-17.4%2012.7%206.7-20.5-17.5-12.7h21.6m-64.5-45.2%206.7%2020.5h21.5l-17.4%2012.6%206.6%2020.5-17.4-12.6-17.4%2012.6%206.7-20.5-17.4-12.6H192m-64.5%202.9%206.7%2020.5h21.5l-17.4%2012.6%206.7%2020.5-17.5-12.7-17.4%2012.7%206.7-20.5-17.4-12.6H121m-34.8%2043.2%206.6%2020.5h21.6l-17.5%2012.6%206.7%2020.5-17.4-12.7-17.4%2012.7%206.6-20.5L58%20271h21.5m119.2%20149.4%206.7%2020.5h21.5l-17.4%2012.6%206.7%2020.5-17.5-12.7-17.4%2012.7%206.7-20.5-17.4-12.6H192m82.2-41.7%206.6%2020.4h21.5L285%20432.3l6.7%2020.5-17.4-12.7-17.5%2012.7%206.7-20.5-17.4-12.7h21.5'/%3e%3c/g%3e%3c/svg%3e")}.fi-cw{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-cw'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='cw-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h682.7v512H0z'/%3e%3c/clipPath%3e%3cpath%20id='cw-b'%20d='m0-1%20.2.7H1L.3%200l.2.7L0%20.4l-.6.4.2-.7-.5-.4h.7z'/%3e%3c/defs%3e%3cg%20clip-path='url(%23cw-a)'%20transform='scale(.94)'%3e%3cpath%20fill='%23002b7f'%20d='M0%200h768v512H0z'/%3e%3cpath%20fill='%23f9e814'%20d='M0%20320h768v64H0z'/%3e%3cuse%20xlink:href='%23cw-b'%20width='13500'%20height='9000'%20x='2'%20y='2'%20fill='%23fff'%20transform='scale(42.67)'/%3e%3cuse%20xlink:href='%23cw-b'%20width='13500'%20height='9000'%20x='3'%20y='3'%20fill='%23fff'%20transform='scale(56.9)'/%3e%3c/g%3e%3c/svg%3e")}.fi-cw.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-cw'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='cw-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h9000v9000H0z'/%3e%3c/clipPath%3e%3cpath%20id='cw-b'%20d='m0-1%20.2.7H1L.3%200l.2.7L0%20.4l-.6.4.2-.7-.5-.4h.7z'/%3e%3c/defs%3e%3cg%20clip-path='url(%23cw-a)'%20transform='scale(.057)'%3e%3cpath%20fill='%23002b7f'%20d='M0%200h13500v9000H0z'/%3e%3cpath%20fill='%23f9e814'%20d='M0%205625h13500v1125H0z'/%3e%3cuse%20xlink:href='%23cw-b'%20width='13500'%20height='9000'%20x='2'%20y='2'%20fill='%23fff'%20transform='scale(750)'/%3e%3cuse%20xlink:href='%23cw-b'%20width='13500'%20height='9000'%20x='3'%20y='3'%20fill='%23fff'%20transform='scale(1000)'/%3e%3c/g%3e%3c/svg%3e")}.fi-cx{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-cx'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%230021ad'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%231c8a42'%20d='M0%200h640v480z'/%3e%3ccircle%20cx='320'%20cy='240'%20r='57.8'%20fill='%23ffc639'/%3e%3cpath%20fill='%231c8a42'%20d='M284.7%20214c4%205.5%2010%2014.6%2014.8%2012.2%203.7%200%205.7.3%206.2%202.8a37%2037%200%200%200%2033-14.3s.8%200%20.5-4.5c0-2%202.8-1.6%202.8-1%20.4%201%20.4%201.7.9%201.8%201-.4%202.7-3%204-4.6.3-.7.1-1.5.2-2.4.7-1.7%202.4-1.3%202.8-.4l.6%201.6c1.8%201.2%205%200%205.2%200%20.3-1.4%201.2-1.2%201.2-1.2%201.2-.3.7-.2%201.5.2-.7%207.7%201.5%208%201.3%2012%20.1%204.4-1.3%205.6-1.3%207.3.4%202%207%202.1%204.6%203.9-2%201%200%203-3%203.8-8.8%204.5-10.4%208.3-10.4%208.3s-2.2%204.2-2.5%204.2c-1.5%202.8-3.3%201.2-4.4%202.6-.5%201.7-1%205.5%200%207.4.5%202.7%200%204.2-.7%206.9-.6%205.6-2.8%206.5-3.1%208.4-1%202.2.2%2012-.8%2012-6.5.2-11.5-1.2-14.1-1.7%202.5-10.9%201.5-20.4%201.5-21.4-.6-7.8-11.6-5.9-13.3-7-1.4-.2-2.3-1.3-2.7-1.8-1.6-.2-2.2-.6-3.7-.7-.8.4-.3.8-2%201.3-4.5.5-6.4-3.8-6.4-3.8.2-1.5-9.9.3-15.3-1-2.3%201.3-3.3%205-5.1%205.4%200%201.1-3-1-3.6-2-.2-3.4%202.8-4.8%202.8-4.8%202.4-1.7%203.8-2%205-3.1.5-2.9.2-5%201.5-7.1%201-1.7%202.5-1%203.5-1.6%201.1-.8%201.6-5.6.6-7l-4.7-4.2c-1.4-4.1%201.7-6.8%202.6-6.5'/%3e%3cpath%20fill='%23ffc639'%20d='M561.9%20142.4c-2.6-10.3-26-32.7-43.7-46.9-4.2-2.8-7-1.1-6.4%203%202.2%203.6%203.8%207.6%206%2011.3.6%202.5%201.8%204.2%202.4%206.6%200%200%20.2%204.2.6%204.6%205.4%206%206.2%2011.1%206.2%2011.1a49%2049%200%200%200%2011.5%2015.6c6.2%203.9%201.6%2016%201.8%2022.5%200%204-2.9%203.6-5.5%203-20.1-18.5-40.1-18.5-57.8-23.9-6.8-.7-7%202.6-4.7%204.4a129%20129%200%200%200%2039.1%2029.6l7.7%204.8%208.8%207.3c6.8%204.4%207.3%208.4%207.3%208.8.2%208.2-4.2%2014.6-5.5%2017.2-2.3%208.7-7%2010.2-7%2010.2-37.6%2025.4-57.4%2032-118.4%2024.1-1-.4-6.8.5%200%203%2015.5%205.2%2053.7%2013.5%2090.6-4%209-6.2%2014.8-4.2%2021.3-8a287.3%20287.3%200%200%201%2028.3-15.4c8.3-4.5%2031.3-9.4%2036.6-13.8%206.1-.5%2012.4-1.3%2012.8-6.5%202-1.3%205-.3%207.2-4.6%204.8-.9%204-2.6%204-2.6-1.2-3.4-5.8-4.8-9-7.3-4.8-1.6-8-2-11.5-.4l-3.3%201.5s-5.1-.7-5.1-1.1c-11.4-.6-10.3-38.3-14.3-54z'/%3e%3cpath%20fill='%231c8a42'%20d='M588.6%20204.2a2.8%201.8%2016%201%201-5.4-1.7%202.8%201.8%2016%200%201%205.4%201.7'/%3e%3cg%20fill='%23fff'%20transform='matrix(.64%200%200%20.64%200%2080)'%3e%3cpath%20id='cx-a'%20d='m188.2%20191-12.8-12-12.9%2011.8%201.4-17.4-17.3-2.8%2014.5-9.8-8.6-15.2%2016.7%205.3%206.5-16.2L182%20151l16.7-5-8.8%2015%2014.4%2010-17.3%202.5z'/%3e%3cpath%20d='m233.4%20335.5-13.8-9.1-13.4%209.6%204.8-15.5-13.6-9.5%2016.6-.4%205-15.5%205.6%2015.3%2016.7-.1L228%20320l5.3%2015.4z'/%3e%3cuse%20xlink:href='%23cx-a'%20width='100%25'%20height='100%25'%20x='2.5'%20y='269.1'/%3e%3cuse%20xlink:href='%23cx-a'%20width='100%25'%20height='100%25'%20x='-112.1'%20y='123.2'/%3e%3cuse%20xlink:href='%23cx-a'%20width='100%25'%20height='100%25'%20x='108.4'%20y='85'/%3e%3c/g%3e%3c/svg%3e")}.fi-cx.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-cx'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%230021ad'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%231c8a42'%20d='M0%200h512v512z'/%3e%3ccircle%20cx='256'%20cy='256'%20r='61.7'%20fill='%23ffc639'/%3e%3cpath%20fill='%231c8a42'%20d='M218.3%20228.3c4.3%205.8%2010.6%2015.5%2015.8%2013%204%200%206%20.3%206.6%203A39.5%2039.5%200%200%200%20276%20229s.8%200%20.5-4.8c0-2.2%203-1.7%203-1%20.4%201%20.3%201.8.9%201.8%201.2-.4%202.9-3.1%204.3-4.8.3-.8.1-1.6.2-2.6.8-1.8%202.6-1.4%203-.4.3.6.3%201%20.7%201.7%201.8%201.2%205.2%200%205.5%200%20.3-1.5%201.3-1.3%201.3-1.3%201.2-.3.7-.2%201.6.2-.8%208.2%201.6%208.6%201.4%2012.8%200%204.7-1.4%206-1.4%207.8.4%202.2%207.3%202.3%205%204.1-2.2%201.2%200%203.3-3.3%204.1-9.4%204.8-11.2%208.9-11.2%208.9s-2.3%204.4-2.6%204.4c-1.6%203-3.5%201.4-4.7%202.8-.5%201.8-1.1%205.9%200%208%20.5%202.8%200%204.4-.8%207.3-.6%206-3%206.9-3.3%209-1%202.2.3%2012.8-.8%2012.8-7%20.1-12.3-1.3-15-1.9%202.6-11.6%201.6-21.8%201.6-22.8-.7-8.3-12.4-6.3-14.2-7.4-1.5-.3-2.4-1.5-3-2-1.6-.2-2.2-.6-3.9-.8-.8.4-.3.9-2.2%201.4-4.6.6-6.7-4-6.7-4%20.2-1.6-10.5.3-16.4-1-2.4%201.3-3.4%205.2-5.4%205.7%200%201.2-3.2-1-3.9-2.2%200-3.5%203.1-5%203.1-5%202.5-1.9%204-2.2%205.3-3.4.6-3%20.3-5.3%201.6-7.6%201-1.7%202.7-1%203.8-1.7%201.2-.8%201.7-6%20.6-7.3l-5-4.5c-1.6-4.5%201.8-7.3%202.7-7'/%3e%3cpath%20fill='%23ffc639'%20d='M452.3%2063.7c-2.8-11-27.9-34.8-46.6-50-4.5-3-7.4-1.2-6.9%203.1%202.4%204%204.1%208.2%206.5%2012.1.6%202.6%201.9%204.4%202.5%207%200%200%20.2%204.5.6%205a25%2025%200%200%201%206.6%2011.8%2052.4%2052.4%200%200%200%2012.3%2016.6c6.6%204.2%201.8%2017.1%202%2024%200%204.3-3.2%203.8-5.9%203.3-21.5-19.8-42.8-19.8-61.6-25.5-7.4-.8-7.5%202.7-5.1%204.6%2013.1%2014%2025.5%2023.6%2041.7%2031.6l8.2%205.1%209.4%207.8c7.2%204.7%207.8%209%207.8%209.4.2%208.8-4.5%2015.6-5.8%2018.3-2.5%209.3-7.5%2011-7.5%2011-40.1%2027-61.2%2034-126.4%2025.7-1-.5-7.2.5%200%203.1%2016.6%205.5%2057.3%2014.4%2096.7-4.3%209.5-6.6%2015.9-4.4%2022.7-8.4%2011.3-7%2027.3-15.6%2030.3-16.5%208.7-4.7%2033.3-10%2039-14.7%206.5-.5%2013.2-1.4%2013.7-7%202.1-1.3%205.2-.3%207.5-4.9%205.2-.9%204.3-2.7%204.3-2.7-1.3-3.7-6-5.2-9.5-7.8-5.1-1.7-8.6-2.2-12.3-.4l-3.5%201.6s-5.5-.8-5.5-1.2c-12.1-.7-11-41-15.2-57.7'/%3e%3cpath%20fill='%231c8a42'%20d='M542.5%20217.8a3%201.9%2016%201%201-5.8-1.8%203%201.9%2016%200%201%205.8%201.8'/%3e%3cg%20fill='%23fff'%20transform='translate(-11.8%20182.4)scale(.68267)'%3e%3cpath%20id='cx-a'%20d='m188.2%20191-12.8-12-12.9%2011.8%201.4-17.4-17.3-2.8%2014.5-9.8-8.6-15.2%2016.7%205.3%206.5-16.2L182%20151l16.7-5-8.8%2015%2014.4%2010-17.3%202.5z'/%3e%3cpath%20d='m233.4%20335.5-13.8-9.1-13.4%209.6%204.8-15.5-13.6-9.5%2016.6-.4%205-15.5%205.6%2015.3%2016.7-.1L228%20320l5.3%2015.4z'/%3e%3cuse%20xlink:href='%23cx-a'%20width='100%25'%20height='100%25'%20x='2.5'%20y='269.1'/%3e%3cuse%20xlink:href='%23cx-a'%20width='100%25'%20height='100%25'%20x='-112.1'%20y='123.2'/%3e%3cuse%20xlink:href='%23cx-a'%20width='100%25'%20height='100%25'%20x='108.4'%20y='85'/%3e%3c/g%3e%3c/svg%3e")}.fi-cy{background-image:url(/assets/cy-VQFkW-qk.svg)}.fi-cy.fis{background-image:url(/assets/cy-Bgo0XIP0.svg)}.fi-cz{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-cz'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v240H0z'/%3e%3cpath%20fill='%23d7141a'%20d='M0%20240h640v240H0z'/%3e%3cpath%20fill='%2311457e'%20d='M360%20240%200%200v480z'/%3e%3c/svg%3e")}.fi-cz.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-cz'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23fff'%20d='M0%200h512v256H0z'/%3e%3cpath%20fill='%23d7141a'%20d='M0%20256h512v256H0z'/%3e%3cpath%20fill='%2311457e'%20d='M300%20256%200%2056v400z'/%3e%3c/svg%3e")}.fi-de{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-de'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23ffce00'%20d='M0%20320h640v160H0z'/%3e%3cpath%20fill='%23000001'%20d='M0%200h640v160H0z'/%3e%3cpath%20fill='red'%20d='M0%20160h640v160H0z'/%3e%3c/svg%3e")}.fi-de.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-de'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23ffce00'%20d='M0%20341.3h512V512H0z'/%3e%3cpath%20fill='%23000001'%20d='M0%200h512v170.7H0z'/%3e%3cpath%20fill='red'%20d='M0%20170.7h512v170.6H0z'/%3e%3c/svg%3e")}.fi-dj{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-dj'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='dj-a'%3e%3cpath%20fill-opacity='.7'%20d='M-40%200h682.7v512H-40z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23dj-a)'%20transform='translate(37.5)scale(.94)'%3e%3cpath%20fill='%230c0'%20d='M-40%200h768v512H-40z'/%3e%3cpath%20fill='%2369f'%20d='M-40%200h768v256H-40z'/%3e%3cpath%20fill='%23fffefe'%20d='m-40%200%20382.7%20255.7L-40%20511z'/%3e%3cpath%20fill='red'%20d='M119.8%20292%2089%20270l-30.7%2022.4L69.7%20256l-30.6-22.5%2037.9-.3%2011.7-36.3%2012%2036.2h37.9l-30.5%2022.7%2011.7%2036.4z'/%3e%3c/g%3e%3c/svg%3e")}.fi-dj.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-dj'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='dj-a'%3e%3cpath%20fill-opacity='.7'%20d='M55.4%200H764v708.7H55.4z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23dj-a)'%20transform='translate(-40)scale(.722)'%3e%3cpath%20fill='%230c0'%20d='M0%200h1063v708.7H0z'/%3e%3cpath%20fill='%2369f'%20d='M0%200h1063v354.3H0z'/%3e%3cpath%20fill='%23fffefe'%20d='m0%200%20529.7%20353.9L0%20707.3z'/%3e%3cpath%20fill='red'%20d='m221.2%20404.3-42.7-30.8-42.4%2031%2015.8-50.3-42.4-31.2%2052.4-.4%2016.3-50.2%2016.6%2050%2052.4.2-42.1%2031.4z'/%3e%3c/g%3e%3c/svg%3e")}.fi-dk{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-dk'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23c8102e'%20d='M0%200h640.1v480H0z'/%3e%3cpath%20fill='%23fff'%20d='M205.7%200h68.6v480h-68.6z'/%3e%3cpath%20fill='%23fff'%20d='M0%20205.7h640.1v68.6H0z'/%3e%3c/svg%3e")}.fi-dk.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-dk'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23c8102e'%20d='M0%200h512.1v512H0z'/%3e%3cpath%20fill='%23fff'%20d='M144%200h73.1v512H144z'/%3e%3cpath%20fill='%23fff'%20d='M0%20219.4h512.1v73.2H0z'/%3e%3c/svg%3e")}.fi-dm{background-image:url(/assets/dm-BlhP-6zy.svg)}.fi-dm.fis{background-image:url(/assets/dm-ClJ_IDld.svg)}.fi-do{background-image:url(/assets/do-_FYrCblZ.svg)}.fi-do.fis{background-image:url(/assets/do-B91cOUCO.svg)}.fi-dz{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-dz'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23fff'%20d='M320%200h320v480H320z'/%3e%3cpath%20fill='%23006233'%20d='M0%200h320v480H0z'/%3e%3cpath%20fill='%23d21034'%20d='M424%20180a120%20120%200%201%200%200%20120%2096%2096%200%201%201%200-120m4%2060-108-35.2%2067.2%2092V183.2l-67.2%2092z'/%3e%3c/svg%3e")}.fi-dz.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-dz'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23fff'%20d='M256%200h256v512H256z'/%3e%3cpath%20fill='%23006233'%20d='M0%200h256v512H0z'/%3e%3cpath%20fill='%23d21034'%20d='M367%20192a128%20128%200%201%200%200%20128%20102.4%20102.4%200%201%201%200-128m4.2%2064L256%20218.4l71.7%2098.2V195.4L256%20293.6z'/%3e%3c/svg%3e")}.fi-ec{background-image:url(/assets/ec-LNhQ9L4k.svg)}.fi-ec.fis{background-image:url(/assets/ec-sTVr1A3S.svg)}.fi-ee{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ee'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3crect%20width='640'%20height='477.9'%20fill='%23000001'%20rx='0'%20ry='0'/%3e%3crect%20width='640'%20height='159.3'%20y='320.7'%20fill='%23fff'%20rx='0'%20ry='0'/%3e%3cpath%20fill='%231791ff'%20d='M0%200h640v159.3H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-ee.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ee'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%20transform='scale(.482%20.72)'%3e%3crect%20width='1063'%20height='708.7'%20fill='%23000001'%20rx='0'%20ry='0'/%3e%3crect%20width='1063'%20height='236.2'%20y='475.6'%20fill='%23fff'%20rx='0'%20ry='0'/%3e%3cpath%20fill='%231791ff'%20d='M0%200h1063v236.2H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-eg{background-image:url(/assets/eg-BIzzVp3n.svg)}.fi-eg.fis{background-image:url(/assets/eg-C1MYAOXe.svg)}.fi-eh{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-eh'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='eh-a'%3e%3cpath%20fill-opacity='.7'%20d='M-158.7%200H524v512h-682.7z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23eh-a)'%20transform='translate(148.8)scale(.94)'%3e%3cpath%20fill='%23000001'%20d='M-158.3%200h680.9v255.3h-680.9z'/%3e%3cpath%20fill='%23007a3d'%20d='M-158.3%20255.3h680.9v255.3h-680.9z'/%3e%3cpath%20fill='%23fff'%20d='M-158.3%20148.9h680.9v212.8h-680.9z'/%3e%3cpath%20fill='%23c4111b'%20d='m-158.3%200%20340.4%20255.3-340.4%20255.3Z'/%3e%3ccircle%20cx='352.3'%20cy='255.3'%20r='68.1'%20fill='%23c4111b'/%3e%3ccircle%20cx='377.9'%20cy='255.3'%20r='68.1'%20fill='%23fff'/%3e%3cpath%20fill='%23c4111b'%20d='m334%20296.5%2029.1-20.7%2028.8%2021-10.8-34%2029-20.9-35.7-.2-11-34-11.2%2033.9-35.7-.2%2028.7%2021.2-11.1%2034z'/%3e%3c/g%3e%3c/svg%3e")}.fi-eh.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-eh'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23000001'%20d='M0%200h512v256H0z'/%3e%3cpath%20fill='%23007a3d'%20d='M0%20256h512v256H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20149.3h512v213.3H0z'/%3e%3cpath%20fill='%23c4111b'%20d='m0%200%20256%20256L0%20512Z'/%3e%3cg%20stroke-width='1.7'%20transform='translate(-135%20-6.5)scale(1.02539)'%3e%3ccircle%20cx='512'%20cy='256'%20r='68.3'%20fill='%23c4111b'/%3e%3ccircle%20cx='537.6'%20cy='256'%20r='68.3'%20fill='%23fff'/%3e%3cpath%20fill='%23c4111b'%20d='m493.7%20297.3%2029-20.8%2029%2021.2-10.8-34.2%2029-21-35.8-.2-11-34-11.3%2033.9-35.7-.1%2028.7%2021.2z'/%3e%3c/g%3e%3c/svg%3e")}.fi-er{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-er'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%23be0027'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23b4d7f4'%20d='m0%20480%20640-.3V240z'/%3e%3cpath%20fill='%23239e46'%20d='m0%200%20640%20.3V240z'/%3e%3cpath%20fill='%23f3e295'%20d='M186.2%20360.4c-10.7%203-16.8%2011.3-16.7%2019.1l52.8-.2c.4-8.4-6.5-16.2-17-19.3%2051.6-1%2096.4-20.4%20104.6-32.8-8-3.5-17.4%202.1-24%20.8%2015.7-7.3%2063-37.9%2055.3-70.7-6%2018.2-24%2033.3-31.8%2037.4%2017.7-26.8%2041.8-54.8%2020.9-76.4%201%2012.5-8%2026.3-12%2027.4%2010.3-28.4%2020-64-2.1-87.4%202.9%208.5%201.7%2032.4-2.3%2033.5-1.2-19.3-4.5-59.8-24.8-59.3%206.4%205.8%209.2%2021.4%209.4%2037.2a57.5%2057.5%200%200%200-21.1-27%20118.3%20118.3%200%200%200-41.5-42.2c1.8%2012.7%203.3%2022.7%2021%2035.9-9.2-.6-18.4-18.1-28.3-18.6-7.9-.4-14%207.1-26.9%202.8%201.4%204.2%207.4%206.1%208.7%209.2-2.8%202-9.3-.3-14.7-3%207.5%2010%2019%2016%2028.8%2014%2011.7-2.2%2024.2-1%2036.2%205.8a63%2063%200%200%201-22.5.6c6.9%207%2011.5%2011.7%2023.6%2011.6%2010.7%200%2016.4-5.8%2019.1-2.2%206.8%208%2011.3%2016%2017%2025.4-12.5%201.3-8.7-14.1-22.6-22-7.9%2016%209%2035.2%2020.3%2043.2a65%2065%200%200%200%207.1%2031.5c3.5%206.5%208%2013.2%206.3%2027.9-6.9-5-13.5-21.8-11-35.1-8.6%202.3-12%2017.4-8%2025%203%205.7%205%2016.8%201.6%2021.7-3.4%204.6-3.7%204-3.7%2014%20.1%205.8-3.2%2012.8-8.5%2017.7a35.5%2035.5%200%200%200%201.1-15.8c-4.2%207.2-14.9%2014.6-18.2%2022.4-3.3%207.7-4.1%2021.2-20%2024.3-20.6%204-27.7%207.6-40.8%2013-1.5-10%202.9-31%2011.3-29.7%208.1%201.4%2033-8.6%2024-29.5-1.7%206.6-7.5%2013-13.9%2013.3%206.9-8.8%2019-18%2013.1-32.8a42.6%2042.6%200%200%201-16.3%2018c8.4-16%201-21-9-7.6-3.8%205.1-6.1%2015.4-8.5%2028.5-4-10.6-3.7-24.6-8.4-36-4.8-12.3%206.5-15.5%2011.8-14.5%2013%203.5%2034.9%203.5%2033.3-18.1-5.7%207.3-15.5%209.5-26.2%207%2012-8.8%2021.4-25.3%208-34a31%2031%200%200%201-16.9%2024.1%2050.8%2050.8%200%200%201-.3-24.8c-5.2%205.6-9%2017-12.1%2030.2-.3-13%202.2-22.3%204-29.3%202.8-10.1%209.6-3.5%2020-2.8%2010.2.6%2024-5%2021.4-18.7-3.4%205.5-10.5%207.6-17.7%207%208.7-5.3%2023.8-14.6%2015.5-29-3.5%205.4-4.6%2010-14.7%2011.7%202.6-6%203-14.7%2011-18-14-2.9-22%206.3-26.2%2020.7-1.6-10-3.6-13.6-4-21%207.6-8.3%208.4-24.8-8-28.4a35%2035%200%200%200%201.2%2017.4c-7.7-4.6-18.5-7.1-25.8-.7%205%205.3%2012.5%2010%2024.2%204.2-2.8%209-10%207.5-19.8%204%206%2011.3%2013.6%2013.3%2022%2012%204.4%2011.6%204.6%2020.4-8.3%2037.2.6-10.4-.1-18.2-8.4-26.7-7.2-7-13%20.3-1.8%2015.8-6.8-5-14.4-15-16.7-25.1-2.2%2012.4-.2%2027.1%206.7%2035.4-3.3%203.5-7-.4-12.5-9%202%2027.4%2013.7%2032.7%2029.4%2026.6.4%2015%20.4%2028.9%201.3%2047-9.1-13.2-20.7-23-27.1-25.4-2%207.3%205.5%2017%209.8%2022.3-6.5-1.4-20.5-12-20.5-12-1.4%2012.1%2014.3%2023.4%2024.5%2028.4-12-.5-17.3-5-25-12.4.2%2033.8%2036.6%2027.9%2043.5%2022.7l3%2052.5c-10.3-1.8-9.5-5-18.3-5.7-24.5-1-43.9-29.4-50.3-50.3-1.9%203.4-.4%207-2.1%2011.3-4-10.3-9-23.6-15.9-29.8%201.8%206%202%2012.1%201.4%2023.3-2.4-7.2-4.5-9.5-4.7-18%20.1-6.5%206.3-11.3%206-20.5-.3-6.7-6.4-21.3-7.3-32.5-3%2011.6-4.8%2023.8-9.4%2031%202.3-12.4%201.6-21%205.4-29.3%204.4-8.7%208.1-16.6%205.2-25.4-2.8%203.4-1.9%206.5-9%2014.8-1.5-9%209.2-23.5%2019.6-29.3%207.3-3.8%2016.5-17.6%2010.5-27-6.9%205-10%2011.6-19.7%2023%207-27%2025-34.2%2046.5-34.3%204.7%200%2014.3-1.7%2017-8-6%202.3-13.2%202.6-19.6%201.4%204.7-6.9%2014.4-6%2023.6-6%207.1%200%2018.3-1%2022.8-11.2a50.8%2050.8%200%200%201-31%201.9c13.7-7%2035-7.8%2046-17.1-12.5-9.3-43.7%202.2-63.4%2015.7%205.5-5%2014.2-14%2019-21.2-10.8-5.2-38%2025-47.4%2043-9%205-12.5%2013-16%2018.5%204.7-16.1%205.2-27.8%209.2-41C80%20138%2092.6%20194.6%2086%20208.2c.8-15%20.1-34.1-6-44-9.4%207.2-10.2%2049.5-1.4%2084.7-3.2-9.4-9.2-18.2-11.1-29.7-14%2025.4%208.2%2055.5%2026.7%2079.2-14-7.3-27.7-22.9-36.8-36%202.5%2045.6%2050%2055%2057.4%2066.2-10-4.7-29.1-13.9-37.3-4.2a99%2099%200%200%201%2032.3%2012.1c12.4%2015.4%2035.7%2022.2%2076.4%2023.9'/%3e%3c/g%3e%3c/svg%3e")}.fi-er.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-er'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='er-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h512v512H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23er-a)'%3e%3cpath%20fill='%23be0027'%20d='M-48%200h591.5v512H-48z'/%3e%3cpath%20fill='%23b4d7f4'%20d='m-48%20512%20591.5-.3V256z'/%3e%3cpath%20fill='%23239e46'%20d='m-48%200%20591.5.3V256z'/%3e%3cpath%20fill='%23f3e295'%20d='M148.8%20351.4c-8.7%202.4-13.7%209.2-13.6%2015.6l42.8-.2c.4-6.9-5.2-13.2-13.8-15.7%2042-.8%2078.4-16.6%2085-26.6-6.5-2.9-14.1%201.7-19.5.6%2012.8-5.9%2051.2-30.8%2045-57.4a62.3%2062.3%200%200%201-25.8%2030.3c14.3-21.8%2034-44.5%2017-62%20.8%2010.2-6.6%2021.4-9.8%2022.2%208.3-23%2016.3-52-1.8-71%202.4%206.9%201.5%2026.3-1.8%2027.2-1-15.7-3.7-48.6-20.2-48.1%205.3%204.6%207.5%2017.4%207.7%2030.2-3.8-8.8-8-15.4-17.2-22a96.1%2096.1%200%200%200-33.7-34.3%2036.1%2036.1%200%200%200%2017.1%2029.2c-7.5-.5-15-14.7-23-15.1-6.4-.3-11.4%205.8-21.9%202.3%201.2%203.4%206%205%207%207.5-2.1%201.5-7.5-.2-11.9-2.5%206.1%208.2%2015.5%2013%2023.5%2011.4%209.5-1.8%2019.7-.8%2029.4%204.7a51.6%2051.6%200%200%201-18.4.5c5.7%205.7%209.4%209.5%2019.2%209.4%208.8%200%2013.4-4.6%2015.6-1.8%205.5%206.5%209.2%2013%2013.8%2020.6-10.2%201.2-7.1-11.4-18.4-17.9-6.3%2013.2%207.3%2028.7%2016.6%2035.2%200%209.9%201.5%2018%205.7%2025.6%202.8%205.3%206.5%2010.7%205.1%2022.7-5.5-4-11-17.7-9-28.5-7%201.9-9.6%2014-6.4%2020.2%202.5%204.7%204.1%2013.7%201.3%2017.7-2.8%203.7-3%203.3-3%2011.3%200%204.8-2.6%2010.5-7%2014.4%201-3.3%202-9.2%201-12.8-3.5%205.9-12.1%2011.9-14.8%2018.2-2.7%206.3-3.4%2017.2-16.3%2019.7-16.7%203.3-22.5%206.2-33.2%2010.6-1.2-8.1%202.4-25.1%209.2-24.1%206.7%201.2%2026.8-7%2019.6-24-1.4%205.4-6.2%2010.6-11.3%2010.9%205.5-7.2%2015.4-14.7%2010.6-26.7a34.5%2034.5%200%200%201-13.3%2014.7c6.9-13.1.8-17-7.3-6.3-3%204.2-5%2012.6-6.9%2023.2-3.2-8.6-3-20-6.8-29.2-4-10%205.3-12.7%209.6-11.9%2010.6%202.9%2028.4%202.9%2027-14.7-4.5%206-12.6%207.8-21.3%205.7%209.8-7.2%2017.5-20.5%206.6-27.5a25.2%2025.2%200%200%201-13.7%2019.5%2041%2041%200%200%201-.3-20.1c-4.3%204.5-7.4%2013.8-9.9%2024.5a81.8%2081.8%200%200%201%203.3-23.8c2.2-8.3%207.8-2.9%2016.3-2.3%208.2.5%2019.5-4%2017.4-15.2-2.8%204.4-8.6%206.1-14.5%205.7%207.1-4.3%2019.4-12%2012.7-23.6-2.9%204.4-3.8%208.2-12%209.6%202.1-5%202.5-12%208.9-14.7-11.4-2.3-17.9%205.2-21.2%2016.8-1.4-8-3-11-3.3-17%206.2-6.8%206.8-20.2-6.5-23.1-.8%206.8-.5%208.5%201%2014-6.3-3.6-15-5.7-21-.4%204%204.3%2010.2%208%2019.7%203.4-2.3%207.3-8.1%206-16.1%203.2%204.9%209.2%2011%2010.9%2017.9%209.8%203.5%209.4%203.7%2016.5-6.7%2030.2.4-8.5-.2-14.8-7-21.7-5.7-5.7-10.4.3-1.4%2012.9A38.7%2038.7%200%200%201%20127%20200c-1.8%2010.1-.2%2022%205.4%2028.8-2.7%202.8-5.7-.3-10.1-7.2%201.6%2022.2%2011.1%2026.4%2023.9%2021.5.3%2012.2.3%2023.5%201%2038.2a61.3%2061.3%200%200%200-22-20.6c-1.7%206%204.5%2013.7%208%2018-5.3-1-16.7-9.7-16.7-9.7-1.2%209.9%2011.6%2019%2019.9%2023.1-9.7-.4-14-4-20.3-10%20.1%2027.4%2029.7%2022.6%2035.3%2018.4l2.5%2042.6c-8.4-1.4-7.7-4-14.9-4.6-19.9-.8-35.7-23.9-40.9-40.9-1.5%202.8-.3%205.7-1.7%209.2-3.2-8.4-7.3-19.1-12.9-24.1%201.4%204.8%201.6%209.8%201.1%2018.8-1.9-5.9-3.7-7.7-3.8-14.6.1-5.3%205.1-9.2%204.9-16.7-.2-5.4-5.2-17.2-6-26.4-2.4%209.5-3.9%2019.4-7.6%2025.2%201.9-10%201.3-17%204.4-23.7%203.6-7.2%206.6-13.5%204.2-20.7-2.3%202.8-1.5%205.3-7.2%2012-1.3-7.3%207.4-19%2015.8-23.8%206-3%2013.4-14.3%208.6-22-5.6%204-8.1%209.5-16%2018.7%205.6-22%2020.2-27.7%2037.7-27.8%204%200%2011.7-1.4%2014-6.5-5%201.9-10.9%202.1-16%201%203.7-5.4%2011.7-4.7%2019.1-4.8%205.8%200%2014.9-.8%2018.6-9a42%2042%200%200%201-25.2%201.5c11.1-5.8%2028.5-6.4%2037.4-14-10.2-7.5-35.6%201.9-51.6%2012.9%204.5-4.1%2011.6-11.4%2015.5-17.3-8.8-4.2-31%2020.4-38.6%2035-7.2%204-10.1%2010.5-13%2015%204-13.1%204.3-22.6%207.5-33.3-24.8%208.5-14.5%2054.5-19.9%2065.5.6-12.2.1-27.8-4.9-35.8-7.6%205.8-8.3%2040.2-1%2068.9-2.7-7.7-7.6-14.9-9.1-24.2-11.4%2020.7%206.6%2045%2021.6%2064.3a95.7%2095.7%200%200%201-29.8-29.2c2%2037%2040.7%2044.7%2046.7%2053.8-8.2-3.8-23.7-11.3-30.4-3.4a80.2%2080.2%200%200%201%2026.3%209.9c10%2012.5%2029%2018%2062%2019.4'/%3e%3c/g%3e%3c/svg%3e")}.fi-es{background-image:url(/assets/es-DTsPkOCa.svg)}.fi-es.fis{background-image:url(/assets/es-CYT-Z8U_.svg)}.fi-et{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-et'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='et-a'%3e%3cpath%20fill-opacity='.7'%20d='M-61.3%200h682.7v512H-61.3z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%20clip-path='url(%23et-a)'%20transform='translate(57.5)scale(.94)'%3e%3cpath%20fill='%23ffc621'%20d='M-238%203.5H800v498H-238z'/%3e%3cpath%20fill='%23ef2118'%20d='M-240%20342.5H799.3V512H-240z'/%3e%3cpath%20fill='%23298c08'%20d='M-238%200H800v180H-238z'/%3e%3ccircle%20cx='534.2'%20cy='353'%20r='199.7'%20fill='%23006bc6'%20transform='matrix(.54%200%200%20.54%20-25.8%2074)'/%3e%3cpath%20fill='%23ffc621'%20d='m214.3%20188.2-6.5%204.5%2023.5%2033%206.3-4zm29.4%2078-9.7-6.8%204-12.7-48.1.7-14-10.7%2065.7-.7%2012.2-36.9%206.6%2015zm76.5-70.7-6.3-4.8-24.3%2032.4%205.6%204.7zM254.8%20247l3.5-11.2h13.3L256.4%20190l6-16.5%2020.5%2062.4%2038.8.5-12.2%2010.7zm90.6%2051.2%202.7-7.4-38.3-13.3-2.8%207zm-69.1-46.4%2011.7-.1%204.1%2012.6%2038.8-28.5%2017.6.6-53.1%2038.7%2011.5%2037.2-14-8.4zm-19.8%20102%207.9.2.3-40.5-7.4-.5zm22-80.3%203.8%2011.1-10.7%208%2039.4%2027.7%205%2016.8-53.6-38-31.5%2022.7%203.5-16%2044-32.3zm-103.3%2013%202.3%207.5%2038.7-12.2-2-7.2zm83.2-4-9.4%207.1-10.8-7.7-14.2%2046-14.4%2010%2019.5-62.7-31.4-23%2016.3-1.6z'/%3e%3c/g%3e%3c/svg%3e")}.fi-et.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-et'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='et-a'%3e%3cpath%20fill-opacity='.7'%20d='M229.3%206.3h489.3v489.3H229.3z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%20clip-path='url(%23et-a)'%20transform='translate(-240%20-6.6)scale(1.046)'%3e%3cpath%20fill='%23ffc621'%20d='M2%209.7h991.8v475.9H1.9z'/%3e%3cpath%20fill='%23ef2118'%20d='M0%20333.6h993.2v162H0z'/%3e%3cpath%20fill='%23298c08'%20d='M2%206.3h991.8v172H2z'/%3e%3ccircle%20cx='534.2'%20cy='353'%20r='199.7'%20fill='%23006bc6'%20transform='translate(204.7%2077)scale(.515)'/%3e%3cpath%20fill='%23ffc621'%20d='m434%20186.2-6%204.3%2022.4%2031.6%206-3.9zm28.2%2074.5-9.2-6.5%203.8-12-46%20.6-13.3-10.2%2062.7-.7%2011.7-35.3L478%20211l-16%2049.8zm73.1-67.6-6-4.5-23.3%2031%205.5%204.5zm-62.5%2049.3%203.3-10.7h12.7L474.3%20188l5.7-15.8%2019.6%2059.7%2037.2.4-11.7%2010.3zm86.6%2049%202.5-7.2-36.6-12.6-2.6%206.5%2036.7%2013.2zm-66-44.4%2011.2-.2%204%2012.1%2037-27.2%2016.7.6-50.7%2037%2011%2035.5-13.4-8-15.9-49.8zm-19%2097.5%207.6.1.3-38.7-7-.4-.8%2039zm21-76.8%203.7%2010.6L489%20286l37.6%2026.5%204.8%2016-51.2-36.2-30.1%2021.7%203.3-15.2%2042.1-31zm-98.7%2012.4%202.3%207.2%2036.9-11.7-1.8-6.8zm79.6-3.8-9%206.8-10.4-7.4-13.5%2044-13.8%209.5%2018.7-60-30-21.8%2015.5-1.6z'/%3e%3c/g%3e%3c/svg%3e")}.fi-fi{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-fi'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23002f6c'%20d='M0%20174.5h640v131H0z'/%3e%3cpath%20fill='%23002f6c'%20d='M175.5%200h130.9v480h-131z'/%3e%3c/svg%3e")}.fi-fi.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-fi'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23fff'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23002f6c'%20d='M0%20186.2h512v139.6H0z'/%3e%3cpath%20fill='%23002f6c'%20d='M123.2%200h139.6v512H123.1z'/%3e%3c/svg%3e")}.fi-fj{background-image:url(/assets/fj-LI4FYNBW.svg)}.fi-fj.fis{background-image:url(/assets/fj-B6MkAYsu.svg)}.fi-fk{background-image:url(/assets/fk-Ck9cznm4.svg)}.fi-fk.fis{background-image:url(/assets/fk-Be42QBCW.svg)}.fi-fm{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-fm'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='fm-a'%3e%3cpath%20fill-opacity='.7'%20d='M-81.3%200h682.6v512H-81.3z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%20clip-path='url(%23fm-a)'%20transform='translate(76.3)scale(.94)'%3e%3cpath%20fill='%236797d6'%20d='M-252%200H772v512H-252z'/%3e%3cpath%20fill='%23fff'%20d='m259.8%20123-32.4%2022.2%2012.4-35.9-32.5-22.2h40.1l12.4-35.9%2012.4%2036h40l-32.4%2022.1%2012.4%2035.9M259.8%20390l-32.4-22.2%2012.4%2036-32.5%2022.1h40.1l12.4%2035.9%2012.4-36%2040%20.1-32.4-22.2%2012.4-35.9m-188.4-92.4L79.3%20306l1.4-38-37.5-11.7%2038.4-11.7%201.3-38%2022.3%2030.8%2038.4-11.8-24.6%2030.7%2022.4%2030.7m274.2-11.7%2024.6%2030.7-1.4-38%2037.5-11.7-38.4-11.7-1.3-38-22.3%2030.8-38.4-11.8%2024.6%2030.7-22.4%2030.7'/%3e%3c/g%3e%3c/svg%3e")}.fi-fm.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-fm'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='fm-a'%3e%3cpath%20fill-opacity='.7'%20d='M244.2%200h496v496h-496z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%20clip-path='url(%23fm-a)'%20transform='translate(-252)scale(1.032)'%3e%3cpath%20fill='%236797d6'%20d='M0%200h992.1v496H0z'/%3e%3cpath%20fill='%23fff'%20d='M507.9%2084.5h38.8l-31.5%2021.4%2012%2034.8-31.3-21.5-31.5%2021.5%2012-34.8L445%2084.4h39l12-34.7m12%20363h38.8l-31.5-21.5%2012-34.8-31.3%2021.5-31.5-21.5%2012%2034.8-31.4%2021.5H484l12%2034.7M346%20230.1l37.2-11.4-23.9%2029.8%2021.7%2029.7-36.3-11.4-23.8%2029.8%201.4-36.8-36.4-11.4%2037.2-11.3%201.3-36.8m321%2029.8-37.1-11.4%2023.8%2029.7-21.7%2029.8%2036.4-11.4%2023.7%2029.8-1.3-36.8%2036.4-11.4-37.2-11.3-1.3-36.8'/%3e%3c/g%3e%3c/svg%3e")}.fi-fo{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-fo'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='fo-a'%3e%3cpath%20fill-opacity='.7'%20d='M-78%2032h640v480H-78z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='0'%20clip-path='url(%23fo-a)'%20transform='translate(78%20-32)'%3e%3cpath%20fill='%23fff'%20d='M-78%2032h663.9v480H-78z'/%3e%3cpath%20fill='%23003897'%20d='M-76%20218.7h185.9V32H216v186.7h371.8v106.6H216V512H109.9V325.3h-186z'/%3e%3cpath%20fill='%23d72828'%20d='M-76%20245.3h212.4V32h53.1v213.3H588v53.4H189.5V512h-53V298.7H-76z'/%3e%3c/g%3e%3c/svg%3e")}.fi-fo.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-fo'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='fo-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h512v512H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='0'%20clip-path='url(%23fo-a)'%3e%3cpath%20fill='%23fff'%20d='M-78%200h708.2v512H-78z'/%3e%3cpath%20fill='%23003897'%20d='M-75.9%20199.1h198.3V0h113.3v199.1h396.6V313H235.7v199H122.4V312.9H-76z'/%3e%3cpath%20fill='%23d72828'%20d='M-75.9%20227.6h226.6V0h56.7v227.6h424.9v56.9h-425V512h-56.6V284.4H-75.9z'/%3e%3c/g%3e%3c/svg%3e")}.fi-fr{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-fr'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23000091'%20d='M0%200h213.3v480H0z'/%3e%3cpath%20fill='%23e1000f'%20d='M426.7%200H640v480H426.7z'/%3e%3c/svg%3e")}.fi-fr.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-fr'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23fff'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23000091'%20d='M0%200h170.7v512H0z'/%3e%3cpath%20fill='%23e1000f'%20d='M341.3%200H512v512H341.3z'/%3e%3c/svg%3e")}.fi-ga{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ga'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%23ffe700'%20d='M640%20480H0V0h640z'/%3e%3cpath%20fill='%2336a100'%20d='M640%20160H0V0h640z'/%3e%3cpath%20fill='%23006dbc'%20d='M640%20480H0V320h640z'/%3e%3c/g%3e%3c/svg%3e")}.fi-ga.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ga'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%23ffe700'%20d='M512%20512H0V0h512z'/%3e%3cpath%20fill='%2336a100'%20d='M512%20170.7H0V0h512z'/%3e%3cpath%20fill='%23006dbc'%20d='M512%20512H0V341.3h512z'/%3e%3c/g%3e%3c/svg%3e")}.fi-gb{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-gb'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23012169'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23FFF'%20d='m75%200%20244%20181L562%200h78v62L400%20241l240%20178v61h-80L320%20301%2081%20480H0v-60l239-178L0%2064V0z'/%3e%3cpath%20fill='%23C8102E'%20d='m424%20281%20216%20159v40L369%20281zm-184%2020%206%2035L54%20480H0zM640%200v3L391%20191l2-44L590%200zM0%200l239%20176h-60L0%2042z'/%3e%3cpath%20fill='%23FFF'%20d='M241%200v480h160V0zM0%20160v160h640V160z'/%3e%3cpath%20fill='%23C8102E'%20d='M0%20193v96h640v-96zM273%200v480h96V0z'/%3e%3c/svg%3e")}.fi-gb.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-gb'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23012169'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23FFF'%20d='M512%200v64L322%20256l190%20187v69h-67L254%20324%2068%20512H0v-68l186-187L0%2074V0h62l192%20188L440%200z'/%3e%3cpath%20fill='%23C8102E'%20d='m184%20324%2011%2034L42%20512H0v-3zm124-12%2054%208%20150%20147v45zM512%200%20320%20196l-4-44L466%200zM0%201l193%20189-59-8L0%2049z'/%3e%3cpath%20fill='%23FFF'%20d='M176%200v512h160V0zM0%20176v160h512V176z'/%3e%3cpath%20fill='%23C8102E'%20d='M0%20208v96h512v-96zM208%200v512h96V0z'/%3e%3c/svg%3e")}.fi-gd{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-gd'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cg%20id='gd-c'%3e%3cg%20id='gd-b'%3e%3cpath%20id='gd-a'%20fill='%23fcd116'%20d='M0-1v1h.5'%20transform='rotate(18%200%20-1)'/%3e%3cuse%20xlink:href='%23gd-a'%20transform='scale(-1%201)'/%3e%3c/g%3e%3cuse%20xlink:href='%23gd-b'%20transform='rotate(72)'/%3e%3cuse%20xlink:href='%23gd-b'%20transform='rotate(144)'/%3e%3cuse%20xlink:href='%23gd-b'%20transform='rotate(216)'/%3e%3cuse%20xlink:href='%23gd-b'%20transform='rotate(288)'/%3e%3c/g%3e%3c/defs%3e%3cpath%20fill='%23ce1126'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23007a5e'%20d='M67.2%2067.2h505.6v345.6H67.2z'/%3e%3cpath%20fill='%23fcd116'%20d='M67.2%2067.3h505.6L67.2%20412.9h505.6z'/%3e%3ccircle%20cx='319.9'%20cy='240.1'%20r='57.6'%20fill='%23ce1126'/%3e%3cuse%20xlink:href='%23gd-c'%20width='100%25'%20height='100%25'%20transform='translate(320%20240)scale(52.8)'/%3e%3cuse%20xlink:href='%23gd-d'%20width='100%25'%20height='100%25'%20x='-100'%20transform='translate(-30.3)'/%3e%3cuse%20xlink:href='%23gd-c'%20id='gd-d'%20width='100%25'%20height='100%25'%20transform='translate(320%2033.6)scale(31.2)'/%3e%3cuse%20xlink:href='%23gd-d'%20width='100%25'%20height='100%25'%20x='100'%20transform='translate(30.3)'/%3e%3cpath%20fill='%23ce1126'%20d='M102.3%20240.7a80.4%2080.4%200%200%200%2033.5%2033.2%20111%20111%200%200%200-11.3-45z'/%3e%3cpath%20fill='%23fcd116'%20d='M90.1%20194.7c10.4%2021.7-27.1%2073.7%2035.5%2085.9a63.2%2063.2%200%200%201-10.9-41.9%2070%2070%200%200%201%2032.5%2030.8c16.4-59.5-42-55.8-57.1-74.8'/%3e%3cuse%20xlink:href='%23gd-d'%20width='100%25'%20height='100%25'%20x='-100'%20transform='translate(-30.3%20414.6)'/%3e%3cuse%20xlink:href='%23gd-c'%20width='100%25'%20height='100%25'%20transform='translate(320%20448.2)scale(31.2)'/%3e%3cuse%20xlink:href='%23gd-d'%20width='100%25'%20height='100%25'%20x='100'%20transform='translate(30.3%20414.6)'/%3e%3c/svg%3e")}.fi-gd.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-gd'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cg%20id='gd-c'%3e%3cg%20id='gd-b'%3e%3cpath%20id='gd-a'%20fill='%23fcd116'%20d='M0-1v1h.5'%20transform='rotate(18%200%20-1)'/%3e%3cuse%20xlink:href='%23gd-a'%20width='100%25'%20height='100%25'%20transform='scale(-1%201)'/%3e%3c/g%3e%3cuse%20xlink:href='%23gd-b'%20width='100%25'%20height='100%25'%20transform='rotate(72)'/%3e%3cuse%20xlink:href='%23gd-b'%20width='100%25'%20height='100%25'%20transform='rotate(144)'/%3e%3cuse%20xlink:href='%23gd-b'%20width='100%25'%20height='100%25'%20transform='rotate(-144)'/%3e%3cuse%20xlink:href='%23gd-b'%20width='100%25'%20height='100%25'%20transform='rotate(-72)'/%3e%3c/g%3e%3c/defs%3e%3cpath%20fill='%23ce1126'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23007a5e'%20d='M71.7%2071.7h368.6v368.6H71.7z'/%3e%3cpath%20fill='%23fcd116'%20d='M71.7%2071.7h368.6L71.7%20440.4h368.6z'/%3e%3ccircle%20cx='255.9'%20cy='256.1'%20r='61.4'%20fill='%23ce1126'/%3e%3cuse%20xlink:href='%23gd-c'%20width='100%25'%20height='100%25'%20transform='translate(256%20256)scale(56.32)'/%3e%3cuse%20xlink:href='%23gd-d'%20width='100%25'%20height='100%25'%20x='-100'%20transform='translate(-16.4%20-.1)'/%3e%3cuse%20xlink:href='%23gd-c'%20id='gd-d'%20width='100%25'%20height='100%25'%20transform='translate(256%2035.9)scale(33.28)'/%3e%3cuse%20xlink:href='%23gd-d'%20width='100%25'%20height='100%25'%20x='100'%20transform='translate(16.4)'/%3e%3cpath%20fill='%23ce1126'%20d='M99.8%20256.8c7.7%2014.3%2022.6%2029.8%2035.7%2035.3.2-14.5-5-33.2-12-48z'/%3e%3cpath%20fill='%23fcd116'%20d='M86.8%20207.6c11.1%2023.3-29%2078.7%2037.8%2091.7a67.5%2067.5%200%200%201-11.5-44.7%2075.5%2075.5%200%200%201%2034.6%2032.8c17.5-63.4-44.8-59.5-61-79.8z'/%3e%3cuse%20xlink:href='%23gd-d'%20width='100%25'%20height='100%25'%20x='-100'%20transform='translate(-16.4%20442)'/%3e%3cuse%20xlink:href='%23gd-c'%20width='100%25'%20height='100%25'%20transform='translate(256%20478)scale(33.28)'/%3e%3cuse%20xlink:href='%23gd-d'%20width='100%25'%20height='100%25'%20x='100'%20transform='translate(16.4%20442.2)'/%3e%3c/svg%3e")}.fi-ge{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ge'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='red'%20d='M272%200h96v480h-96z'/%3e%3cpath%20fill='red'%20d='M0%20192h640v96H0z'/%3e%3cpath%20fill='red'%20fill-rule='evenodd'%20d='M146.8%20373.1c1-16.8%204-31.1%204-31.1s-9.8%201-14.8%201c-4.9%200-14.8-1-14.8-1s3%2014.3%204%2031.2c-16.9-1-31.2-4-31.2-4s1%207.4%201%2014.8-1%2014.8-1%2014.8%2014.3-3%2031.2-4c-1%2016.9-4%2031.2-4%2031.2s7.4-1%2014.8-1%2014.8%201%2014.8%201-3-14.3-4-31.2c16.9%201%2031.2%204%2031.2%204s-1-9.8-1-14.8c0-4.9%201-14.8%201-14.8s-14.3%203-31.1%204zm368-288c1-16.8%204-31.1%204-31.1s-9.8%201-14.8%201c-4.9%200-14.8-1-14.8-1s3%2014.3%204%2031.1c-16.9-1-31.2-3.9-31.2-3.9s1%207.4%201%2014.8-1%2014.8-1%2014.8%2014.3-3%2031.2-4c-1%2016.9-4%2031.2-4%2031.2s7.4-1%2014.8-1%2014.8%201%2014.8%201-3-14.3-4-31.1c16.9%201%2031.2%204%2031.2%204s-1-10-1-14.9%201-14.8%201-14.8-14.3%203-31.2%204zm-368%200c1-16.8%204-31.1%204-31.1s-9.8%201-14.8%201c-4.9%200-14.8-1-14.8-1s3%2014.3%204%2031.2c-16.9-1-31.2-4-31.2-4s1%207.4%201%2014.8-1%2014.8-1%2014.8%2014.3-3%2031.2-4c-1%2016.9-4%2031.2-4%2031.2s7.4-1%2014.8-1%2014.8%201%2014.8%201-3-14.3-4-31.2c16.9%201%2031.2%204%2031.2%204s-1-9.8-1-14.8c0-4.9%201-14.8%201-14.8s-14.3%203-31.1%204zm368%20288c1-16.8%204-31.1%204-31.1s-9.8%201-14.8%201c-4.9%200-14.8-1-14.8-1s3%2014.3%204%2031.2c-16.9-1-31.2-4-31.2-4s1%207.4%201%2014.8-1%2014.8-1%2014.8%2014.3-3%2031.2-4c-1%2016.9-4%2031.2-4%2031.2s7.4-1%2014.8-1%2014.8%201%2014.8%201-3-14.3-4-31.2c16.9%201%2031.2%204%2031.2%204s-1-9.8-1-14.8c0-4.9%201-14.8%201-14.8s-14.3%203-31.2%204z'/%3e%3c/svg%3e")}.fi-ge.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ge'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23fff'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='red'%20d='M205%200h102v512H205z'/%3e%3cpath%20fill='red'%20d='M0%20205h512v102H0z'/%3e%3cpath%20fill='red'%20fill-rule='evenodd'%20d='M114.1%20397.9c1.1-18%204.3-33.4%204.3-33.4s-10.6%201-15.9%201c-5.3%200-15.9-1-15.9-1s3.2%2015.3%204.3%2033.4c-18-1.1-33.4-4.3-33.4-4.3s1%208%201%2015.9-1%2015.9-1%2015.9%2015.3-3.2%2033.4-4.3c-1.1%2018-4.3%2033.4-4.3%2033.4s8-1%2015.9-1c8%200%2015.9%201%2015.9%201s-3.2-15.3-4.3-33.4c18%201.1%2033.4%204.3%2033.4%204.3s-1-10.6-1-15.9c0-5.3%201-15.9%201-15.9s-15.3%203.2-33.4%204.3m307-307c1.1-18%204.3-33.4%204.3-33.4s-10.6%201-15.9%201c-5.3%200-15.9-1-15.9-1s3.2%2015.4%204.3%2033.4c-18-1.1-33.4-4.3-33.4-4.3s1%208%201%2015.9c0%208-1%2015.9-1%2015.9s15.3-3.2%2033.4-4.3c-1.1%2018-4.3%2033.4-4.3%2033.4s8-1%2015.9-1%2015.9%201%2015.9%201-3.2-15.3-4.3-33.4c18%201.1%2033.4%204.3%2033.4%204.3s-1-10.6-1-15.9c0-5.2%201-15.9%201-15.9s-15.4%203.2-33.4%204.3m-307%200c1.1-18%204.3-33.4%204.3-33.4s-10.6%201-15.9%201c-5.3%200-15.9-1-15.9-1s3.2%2015.4%204.3%2033.4c-18-1.1-33.4-4.3-33.4-4.3s1%208%201%2015.9c0%208-1%2015.9-1%2015.9s15.3-3.2%2033.4-4.3c-1.1%2018-4.3%2033.4-4.3%2033.4s8-1%2015.9-1c8%200%2015.9%201%2015.9%201s-3.2-15.3-4.3-33.4c18%201.1%2033.4%204.3%2033.4%204.3s-1-10.6-1-15.9c0-5.2%201-15.9%201-15.9s-15.3%203.2-33.4%204.3m307%20307c1.1-18%204.3-33.4%204.3-33.4s-10.6%201-15.9%201c-5.3%200-15.9-1-15.9-1s3.2%2015.3%204.3%2033.4c-18-1.1-33.4-4.3-33.4-4.3s1%208%201%2015.9-1%2015.9-1%2015.9%2015.3-3.2%2033.4-4.3c-1.1%2018-4.3%2033.4-4.3%2033.4s8-1%2015.9-1%2015.9%201%2015.9%201-3.2-15.3-4.3-33.4c18%201.1%2033.4%204.3%2033.4%204.3s-1-10.6-1-15.9c0-5.3%201-15.9%201-15.9s-15.4%203.2-33.4%204.3'/%3e%3c/svg%3e")}.fi-gf{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-gf'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23000091'%20d='M0%200h213.3v480H0z'/%3e%3cpath%20fill='%23e1000f'%20d='M426.7%200H640v480H426.7z'/%3e%3c/svg%3e")}.fi-gf.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-gf'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23fff'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23000091'%20d='M0%200h170.7v512H0z'/%3e%3cpath%20fill='%23e1000f'%20d='M341.3%200H512v512H341.3z'/%3e%3c/svg%3e")}.fi-gg{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-gg'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23e8112d'%20d='M256%200h128v480H256z'/%3e%3cpath%20fill='%23e8112d'%20d='M0%20176h640v128H0z'/%3e%3cpath%20id='gg-a'%20fill='%23f9dd16'%20d='m110%20286.7%2023.3-23.4h210v-46.6h-210L110%20193.3z'/%3e%3cuse%20xlink:href='%23gg-a'%20width='36'%20height='24'%20transform='rotate(90%20320%20240)'/%3e%3cuse%20xlink:href='%23gg-a'%20width='36'%20height='24'%20transform='rotate(-90%20320%20240)'/%3e%3cuse%20xlink:href='%23gg-a'%20width='36'%20height='24'%20transform='rotate(180%20320%20240)'/%3e%3c/svg%3e")}.fi-gg.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-gg'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23fff'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23e8112d'%20d='M192%200h128v512H192z'/%3e%3cpath%20fill='%23e8112d'%20d='M0%20187.7h512v136.6H0z'/%3e%3cpath%20id='gg-a'%20fill='%23f9dd16'%20d='m46%20305.8%2023.3-25h210v-49.7h-210L46%20206.2z'/%3e%3cuse%20xlink:href='%23gg-a'%20width='36'%20height='24'%20transform='matrix(0%201.06667%20-.9375%200%20496%20-17)'/%3e%3cuse%20xlink:href='%23gg-a'%20width='36'%20height='24'%20transform='matrix(0%20-1.06667%20.9375%200%2016%20529)'/%3e%3cuse%20xlink:href='%23gg-a'%20width='36'%20height='24'%20transform='rotate(180%20256%20256)'/%3e%3c/svg%3e")}.fi-gh{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-gh'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23006b3f'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23fcd116'%20d='M0%200h640v320H0z'/%3e%3cpath%20fill='%23ce1126'%20d='M0%200h640v160H0z'/%3e%3cpath%20fill='%23000001'%20d='m320%20160%2052%20160-136.1-98.9H404L268%20320z'/%3e%3c/svg%3e")}.fi-gh.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-gh'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23006b3f'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fcd116'%20d='M0%200h512v341.3H0z'/%3e%3cpath%20fill='%23ce1126'%20d='M0%200h512v170.7H0z'/%3e%3cpath%20fill='%23000001'%20d='m256%20170.7%2055.5%20170.6L166.3%20236h179.4L200.6%20341.3z'/%3e%3c/svg%3e")}.fi-gi{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-gi'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23da000c'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%200h640v321.6H0z'/%3e%3cg%20stroke='%23000'%20transform='translate(-160)scale(1.875)'%3e%3cg%20id='gi-a'%20fill='%23da000c'%20stroke-linecap='square'%3e%3cpath%20fill='%23000001'%20stroke='none'%20d='M196.6%20116.3h64v44h-64z'/%3e%3cpath%20d='M229.8%20153.9h-39l-8.7%205.7v6h47.7m-16.3-37c5.6%200%2010.2%204.7%2010.2%2010.5v14.7h7.3v-56h-40.3v56h12.6v-14.7c0-5.6%204.5-10.5%2010.2-10.5z'/%3e%3cpath%20fill='%23000001'%20stroke='none'%20d='M204.5%2060h18.6v34h-18.6z'/%3e%3cpath%20d='M223%2088.7h-16.2v-5.8h-11.9v5.8h-8v-5.8H182v10.4h41m-36.2%200h35v4.5h-35zm14-45.7V83h6v-9.7c0-3.6%202.5-6.6%206.1-6.8h.4a6.8%206.8%200%200%201%206.8%206.8V83h5.7V47.6zm-2.3-4.8v4.8h29.3v-4.8zm-3.7-9.1v9.1h35v-9.1h-5.3v4.7h-6.6v-4.7h-10v4.7h-6.5v-4.7zM182%20159.6h48m31-2.8h-32.4l-9.8%204.7v7H261'/%3e%3cpath%20stroke-linecap='butt'%20d='M218.8%20161.5H262'/%3e%3c/g%3e%3cuse%20xlink:href='%23gi-a'%20width='100%25'%20height='100%25'%20transform='matrix(-1%200%200%201%20512%200)'/%3e%3cg%20fill='%23f8d80e'%3e%3cg%20stroke-linecap='round'%3e%3cpath%20stroke-width='.8'%20d='M273.3%20150c-2.7%201-5%202.4-7.5%203.8a72.4%2072.4%200%200%200-8.9%206c-1%20.7-2%201.4-2.7%202.4-1%20.8-2%202-1.8%203.5%200%20.6.8-.8%201.4-.9a4.4%204.4%200%200%201%203.1-.4c1.3-1.4%203-2.3%204.4-3.4a77.4%2077.4%200%200%201%2013-7.6z'/%3e%3cpath%20d='M260.4%20157.4v3.9m2.4-5.6v3.9m2.4-5.4v3.8m2.5-5.3v4'/%3e%3cpath%20stroke-width='.8'%20d='m238.9%20150.2-1.2%203.3a86.6%2086.6%200%200%201%2015.8%208c1.7%201.2%203.5%202.3%204.8%203.9.3.8-.5%201.5-1.3%201.2-.7-.2-1.5-.5-2.2%200-1.1.5-2.1%202.2-.5%202.7%202.4%201.6%206.1.9%207.2-1.8.6-1.4.7-3.2-.5-4.4-2-2.3-4.8-4-7.4-5.7a89.2%2089.2%200%200%200-14.7-7.2z'/%3e%3cpath%20d='m254%20158-.3%203.4m3.1-1.7-.8%203.3m3.8-1-1.8%202.6m2.7%203.6-2.6-1.4m3.4-1.4-3%20.3m-.8%204-.2-2.6m-1-.3-2.4%201.8m-9.4-15.7v3.1m6.3.3v3.5m-3.2-5.2v3.3'/%3e%3c/g%3e%3cpath%20d='M235.8%20227.6v8h5v-4h6.9v4h5.4v-8zm0%2011v8H253v-8h-5.4v4h-6.9v-4z'/%3e%3cpath%20d='M253%20193.7h5v58h-5z'/%3e%3cpath%20d='M253%20198.7h5v50h-5zm2.6-19.3%2010.6%206.2-10.6%206.2-10.7-6.2zm-14.3%204h-2.7v4.4h2.7l14.3%208.3%2014.2-8.3h2.8v-4.4h-2.8l-14.2-8.3z'/%3e%3cpath%20d='M255.3%20164.3a5%205%200%200%200-4%205.1v11.2a5%205%200%200%200%204.6%204.6%204.9%204.9%200%200%200%204.8-2.8l-1.7-1a2.9%202.9%200%200%201-3%201.8c-1.6%200-2.9-1.6-2.7-3.1v-11.2a2.9%202.9%200%200%201%203-2.6c.6-.2%201.5.7%201.9%200%20.6-.9-.4-1.5-1-2zm5.8%203.9a5%205%200%200%201-1.9%201.6v7.5l2%201.1v-10.2z'/%3e%3c/g%3e%3cg%20fill='%23da000c'%3e%3cpath%20fill='%23000001'%20stroke='none'%20d='M240.8%2038.4h29.3v53.2h-29.3z'/%3e%3cpath%20d='M238.8%2038.4v44.5h9.3V69.7c0-3%202-7.3%207.9-7.3s8%204.3%208%207.3V83h9.2V38.4zm15.8%205h2.8v15.2h-2.8zm-8.3%203h3v11.1h-3zm16.5%200h2.9v11.1h-3zM235.6%2032v6.3h40.8V32zm-3.8-7.4V32h48.5v-7.4h-6.1v4h-7v-4h-7.8v4h-6.8v-4h-7.9v4H238v-4zm-9%2073.2v4.6h66.5v-4.6z'/%3e%3cpath%20d='M220%2082.9v15h72v-15h-6.8v5.8H276v-5.8h-12.2v5.8H248v-5.8h-12.2v5.8h-9v-5.8z'/%3e%3cpath%20stroke-linejoin='round'%20d='M228.7%20102.4v54.4h12.8v-20.4c0-9.5%206.4-14%2014.5-14%207.8%200%2014.5%204.5%2014.5%2014v20.4h12.8v-54.4z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}.fi-gi.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-gi'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23da000c'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%200h512v343H0z'/%3e%3cg%20stroke='%23000'%20transform='matrix(2%200%200%202%20-256%200)'%3e%3cg%20id='gi-a'%20fill='%23da000c'%20stroke-linecap='square'%3e%3cpath%20fill='%23000001'%20stroke='none'%20d='M196.6%20116.3h64v44h-64z'/%3e%3cpath%20d='M229.8%20153.9h-39l-8.7%205.7v6h47.7m-16.3-37c5.6%200%2010.2%204.7%2010.2%2010.5v14.7h7.3v-56h-40.3v56h12.6v-14.7c0-5.6%204.5-10.5%2010.2-10.5z'/%3e%3cpath%20fill='%23000001'%20stroke='none'%20d='M204.5%2060h18.6v34h-18.6z'/%3e%3cpath%20d='M223%2088.7h-16.2v-5.8h-11.9v5.8h-8v-5.8H182v10.4h41m-36.2%200h35v4.5h-35zm14-45.7V83h6v-9.7c0-3.6%202.5-6.6%206.1-6.8h.4a6.8%206.8%200%200%201%206.8%206.8V83h5.7V47.6zm-2.3-4.8v4.8h29.3v-4.8zm-3.7-9.1v9.1h35v-9.1h-5.3v4.7h-6.6v-4.7h-10v4.7h-6.5v-4.7zM182%20159.6h48m31-2.8h-32.4l-9.8%204.7v7H261'/%3e%3cpath%20stroke-linecap='butt'%20d='M218.8%20161.5H262'/%3e%3c/g%3e%3cuse%20xlink:href='%23gi-a'%20width='100%25'%20height='100%25'%20transform='matrix(-1%200%200%201%20512%200)'/%3e%3cg%20fill='%23f8d80e'%3e%3cg%20stroke-linecap='round'%3e%3cpath%20stroke-width='.8'%20d='M273.3%20150c-2.7%201-5%202.4-7.5%203.8a72.4%2072.4%200%200%200-8.9%206c-1%20.7-2%201.4-2.7%202.4-1%20.8-2%202-1.8%203.5%200%20.6.8-.8%201.4-.9a4.4%204.4%200%200%201%203.1-.4c1.3-1.4%203-2.3%204.4-3.4a77.4%2077.4%200%200%201%2013-7.6z'/%3e%3cpath%20d='M260.4%20157.4v3.9m2.4-5.6v3.9m2.4-5.4v3.8m2.5-5.3v4'/%3e%3cpath%20stroke-width='.8'%20d='m238.9%20150.2-1.2%203.3a86.6%2086.6%200%200%201%2015.8%208c1.7%201.2%203.5%202.3%204.8%203.9.3.8-.5%201.5-1.3%201.2-.7-.2-1.5-.5-2.2%200-1.1.5-2.1%202.2-.5%202.7%202.4%201.6%206.1.9%207.2-1.8.6-1.4.7-3.2-.5-4.4-2-2.3-4.8-4-7.4-5.7a89.2%2089.2%200%200%200-14.7-7.2z'/%3e%3cpath%20d='m254%20158-.3%203.4m3.1-1.7-.8%203.3m3.8-1-1.8%202.6m2.7%203.6-2.6-1.4m3.4-1.4-3%20.3m-.8%204-.2-2.6m-1-.3-2.4%201.8m-9.4-15.7v3.1m6.3.3v3.5m-3.2-5.2v3.3'/%3e%3c/g%3e%3cpath%20d='M235.8%20227.6v8h5v-4h6.9v4h5.4v-8zm0%2011v8H253v-8h-5.4v4h-6.9v-4z'/%3e%3cpath%20d='M253%20193.7h5v58h-5z'/%3e%3cpath%20d='M253%20198.7h5v50h-5zm2.6-19.3%2010.6%206.2-10.6%206.2-10.7-6.2zm-14.3%204h-2.7v4.4h2.7l14.3%208.3%2014.2-8.3h2.8v-4.4h-2.8l-14.2-8.3z'/%3e%3cpath%20d='M255.3%20164.3a5%205%200%200%200-4%205.1v11.2a5%205%200%200%200%204.6%204.6%204.9%204.9%200%200%200%204.8-2.8l-1.7-1a2.9%202.9%200%200%201-3%201.8c-1.6%200-2.9-1.6-2.7-3.1v-11.2a2.9%202.9%200%200%201%203-2.6c.6-.2%201.5.7%201.9%200%20.6-.9-.4-1.5-1-2zm5.8%203.9a5%205%200%200%201-1.9%201.6v7.5l2%201.1v-10.2z'/%3e%3c/g%3e%3cg%20fill='%23da000c'%3e%3cpath%20fill='%23000001'%20stroke='none'%20d='M240.8%2038.4h29.3v53.2h-29.3z'/%3e%3cpath%20d='M238.8%2038.4v44.5h9.3V69.7c0-3%202-7.3%207.9-7.3s8%204.3%208%207.3V83h9.2V38.4zm15.8%205h2.8v15.2h-2.8zm-8.3%203h3v11.1h-3zm16.5%200h2.9v11.1h-3zM235.6%2032v6.3h40.8V32zm-3.8-7.4V32h48.5v-7.4h-6.1v4h-7v-4h-7.8v4h-6.8v-4h-7.9v4H238v-4zm-9%2073.2v4.6h66.5v-4.6z'/%3e%3cpath%20d='M220%2082.9v15h72v-15h-6.8v5.8H276v-5.8h-12.2v5.8H248v-5.8h-12.2v5.8h-9v-5.8z'/%3e%3cpath%20stroke-linejoin='round'%20d='M228.7%20102.4v54.4h12.8v-20.4c0-9.5%206.4-14%2014.5-14%207.8%200%2014.5%204.5%2014.5%2014v20.4h12.8v-54.4z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}.fi-gl{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-gl'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23d00c33'%20d='M0%20240h640v240H0zm80%200a160%20160%200%201%200%20320%200%20160%20160%200%200%200-320%200'/%3e%3c/svg%3e")}.fi-gl.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-gl'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23fff'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23d00c33'%20d='M0%20256h512v256H0zm53.3%200a170.7%20170.7%200%201%200%20341.4%200%20170.7%20170.7%200%200%200-341.4%200'/%3e%3c/svg%3e")}.fi-gm{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-gm'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='gm-a'%3e%3cpath%20fill-opacity='.7'%20d='M0-48h640v480H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%20clip-path='url(%23gm-a)'%20transform='translate(0%2048)'%3e%3cpath%20fill='red'%20d='M0-128h640V85.3H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%2085.3h640V121H0z'/%3e%3cpath%20fill='%23009'%20d='M0%20120.9h640V263H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20263.1h640v35.6H0z'/%3e%3cpath%20fill='%23090'%20d='M0%20298.7h640V512H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-gm.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-gm'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='red'%20d='M0%200h512v170.7H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20170.7h512V199H0z'/%3e%3cpath%20fill='%23009'%20d='M0%20199.1h512V313H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20312.9h512v28.4H0z'/%3e%3cpath%20fill='%23090'%20d='M0%20341.3h512V512H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-gn{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-gn'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='red'%20d='M0%200h213.3v480H0z'/%3e%3cpath%20fill='%23ff0'%20d='M213.3%200h213.4v480H213.3z'/%3e%3cpath%20fill='%23090'%20d='M426.7%200H640v480H426.7z'/%3e%3c/g%3e%3c/svg%3e")}.fi-gn.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-gn'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='red'%20d='M0%200h170.7v512H0z'/%3e%3cpath%20fill='%23ff0'%20d='M170.7%200h170.6v512H170.7z'/%3e%3cpath%20fill='%23090'%20d='M341.3%200H512v512H341.3z'/%3e%3c/g%3e%3c/svg%3e")}.fi-gp{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-gp'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23000091'%20d='M0%200h213.3v480H0z'/%3e%3cpath%20fill='%23e1000f'%20d='M426.7%200H640v480H426.7z'/%3e%3c/svg%3e")}.fi-gp.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-gp'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23fff'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23000091'%20d='M0%200h170.7v512H0z'/%3e%3cpath%20fill='%23e1000f'%20d='M341.3%200H512v512H341.3z'/%3e%3c/svg%3e")}.fi-gq{background-image:url(/assets/gq-OBiOttRB.svg)}.fi-gq.fis{background-image:url(/assets/gq-BvOxIUGP.svg)}.fi-gr{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-gr'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%230d5eaf'%20fill-rule='evenodd'%20d='M0%200h640v53.3H0z'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M0%2053.3h640v53.4H0z'/%3e%3cpath%20fill='%230d5eaf'%20fill-rule='evenodd'%20d='M0%20106.7h640V160H0z'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M0%20160h640v53.3H0z'/%3e%3cpath%20fill='%230d5eaf'%20d='M0%200h266.7v266.7H0z'/%3e%3cpath%20fill='%230d5eaf'%20fill-rule='evenodd'%20d='M0%20213.3h640v53.4H0z'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M0%20266.7h640V320H0z'/%3e%3cpath%20fill='%230d5eaf'%20fill-rule='evenodd'%20d='M0%20320h640v53.3H0z'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M0%20373.3h640v53.4H0z'/%3e%3cg%20fill='%23fff'%20fill-rule='evenodd'%20stroke-width='1.3'%3e%3cpath%20d='M106.7%200H160v266.7h-53.3z'/%3e%3cpath%20d='M0%20106.7h266.7V160H0z'/%3e%3c/g%3e%3cpath%20fill='%230d5eaf'%20d='M0%20426.7h640V480H0z'/%3e%3c/svg%3e")}.fi-gr.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-gr'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%230d5eaf'%20fill-rule='evenodd'%20d='M0%200h512v57H0z'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M0%2057h512v57H0z'/%3e%3cpath%20fill='%230d5eaf'%20fill-rule='evenodd'%20d='M0%20114h512v57H0z'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M0%20171h512v57H0z'/%3e%3cpath%20fill='%230d5eaf'%20fill-rule='evenodd'%20d='M0%20228h512v56.9H0z'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M0%20284.9h512v57H0z'/%3e%3cpath%20fill='%230d5eaf'%20fill-rule='evenodd'%20d='M0%20341.9h512v57H0z'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M0%20398.9h512v57H0z'/%3e%3cpath%20fill='%230d5eaf'%20d='M0%200h284.9v284.9H0z'/%3e%3cg%20fill='%23fff'%20fill-rule='evenodd'%20stroke-width='1.3'%3e%3cpath%20d='M114%200h57v284.9h-57z'/%3e%3cpath%20d='M0%20114h284.9v57H0z'/%3e%3c/g%3e%3cpath%20fill='%230d5eaf'%20fill-rule='evenodd'%20d='M0%20455h512v57H0z'/%3e%3c/svg%3e")}.fi-gs{background-image:url(/assets/gs-Di8hLP4g.svg)}.fi-gs.fis{background-image:url(/assets/gs-YFymFo8z.svg)}.fi-gt{background-image:url(/assets/gt-CovS1bZs.svg)}.fi-gt.fis{background-image:url(/assets/gt-Ufdm0MFv.svg)}.fi-gu{background-image:url(/assets/gu-Bkjkorus.svg)}.fi-gu.fis{background-image:url(/assets/gu-wFhsTC1Y.svg)}.fi-gw{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-gw'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23ce1126'%20d='M0%200h220v480H0z'/%3e%3cpath%20fill='%23fcd116'%20d='M220%200h420v240H220z'/%3e%3cpath%20fill='%23009e49'%20d='M220%20240h420v240H220z'/%3e%3cg%20id='gw-b'%20transform='matrix(80%200%200%2080%20110%20240)'%3e%3cpath%20id='gw-a'%20fill='%23000001'%20d='M0-1v1h.5'%20transform='rotate(18%200%20-1)'/%3e%3cuse%20xlink:href='%23gw-a'%20width='100%25'%20height='100%25'%20transform='scale(-1%201)'/%3e%3c/g%3e%3cuse%20xlink:href='%23gw-b'%20width='100%25'%20height='100%25'%20transform='rotate(72%20110%20240)'/%3e%3cuse%20xlink:href='%23gw-b'%20width='100%25'%20height='100%25'%20transform='rotate(144%20110%20240)'/%3e%3cuse%20xlink:href='%23gw-b'%20width='100%25'%20height='100%25'%20transform='rotate(-144%20110%20240)'/%3e%3cuse%20xlink:href='%23gw-b'%20width='100%25'%20height='100%25'%20transform='rotate(-72%20110%20240)'/%3e%3c/svg%3e")}.fi-gw.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-gw'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23ce1126'%20d='M0%200h160v512H0z'/%3e%3cpath%20fill='%23fcd116'%20d='M160%200h352v256H160z'/%3e%3cpath%20fill='%23009e49'%20d='M160%20256h352v256H160z'/%3e%3cg%20transform='translate(-46.2%2072.8)scale(.7886)'%3e%3cg%20id='gw-b'%20transform='matrix(80%200%200%2080%20160%20240)'%3e%3cpath%20id='gw-a'%20fill='%23000001'%20d='M0-1v1h.5'%20transform='rotate(18%200%20-1)'/%3e%3cuse%20xlink:href='%23gw-a'%20width='100%25'%20height='100%25'%20transform='scale(-1%201)'/%3e%3c/g%3e%3cuse%20xlink:href='%23gw-b'%20width='100%25'%20height='100%25'%20transform='rotate(72%20160%20240)'/%3e%3cuse%20xlink:href='%23gw-b'%20width='100%25'%20height='100%25'%20transform='rotate(144%20160%20240)'/%3e%3cuse%20xlink:href='%23gw-b'%20width='100%25'%20height='100%25'%20transform='rotate(-144%20160%20240)'/%3e%3cuse%20xlink:href='%23gw-b'%20width='100%25'%20height='100%25'%20transform='rotate(-72%20160%20240)'/%3e%3c/g%3e%3c/svg%3e")}.fi-gy{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-gy'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%23399408'%20d='M2.4%200H640v480H2.4z'/%3e%3cpath%20fill='%23fff'%20d='M.2%200c-.9%200%20619.6%20241.5%20619.6%20241.5L0%20479.8z'/%3e%3cpath%20fill='%23ffde08'%20d='M.3%2020.2c3.4%200%20559%20217.9%20555.9%20220L1.9%20463.2.3%2020.3z'/%3e%3cpath%20fill='%23000001'%20d='M1.9.8c1.8%200%20290.9%20240.9%20290.9%20240.9L1.8%20477z'/%3e%3cpath%20fill='%23de2110'%20d='M.3%2033.9c1.6-15%20260.9%20208.4%20260.9%20208.4L.2%20451.7V33.9z'/%3e%3c/g%3e%3c/svg%3e")}.fi-gy.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-gy'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%23399408'%20d='M2%200h510v512H2z'/%3e%3cpath%20fill='%23fff'%20d='M.1%200c-.6%200%20495.7%20257.6%20495.7%20257.6L0%20511.7z'/%3e%3cpath%20fill='%23ffde08'%20d='M.2%2021.5C3%2021.5%20447.5%20254%20445%20256.2L1.5%20494.2.2%2021.4z'/%3e%3cpath%20fill='%23000001'%20d='M1.5.8c1.5%200%20232.8%20257%20232.8%20257L1.5%20508.8z'/%3e%3cpath%20fill='%23de2110'%20d='M.2%2036.2C1.6%2020.2%20209%20258.5%20209%20258.5L.2%20481.8z'/%3e%3c/g%3e%3c/svg%3e")}.fi-hk{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-hk'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23EC1B2E'%20d='M0%200h640v480H0'/%3e%3cpath%20id='hk-a'%20fill='%23fff'%20d='M346.3%20103.1C267%2098%20230.6%20201.9%20305.6%20240.3c-26-22.4-20.6-55.3-10.1-72.4l1.9%201.1c-13.8%2023.5-11.2%2052.7%2011.1%2071-12.7-12.3-9.5-39%2012.1-48.9s23.6-39.3%2016.4-49.1q-14.7-25.6%209.3-38.9M307.9%20164l-4.7%207.4-1.8-8.6-8.6-2.3%207.8-4.3-.6-8.9%206.5%206.1%208.3-3.3-3.7%208.1%205.6%206.8z'/%3e%3cuse%20xlink:href='%23hk-a'%20transform='rotate(72%20312.5%20243.5)'/%3e%3cuse%20xlink:href='%23hk-a'%20transform='rotate(144%20312.5%20243.5)'/%3e%3cuse%20xlink:href='%23hk-a'%20transform='rotate(216%20312.5%20243.5)'/%3e%3cuse%20xlink:href='%23hk-a'%20transform='rotate(288%20312.5%20243.5)'/%3e%3c/svg%3e")}.fi-hk.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-hk'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23EC1B2E'%20d='M0%200h512v512H0'/%3e%3cpath%20id='hk-a'%20fill='%23fff'%20d='M282.3%20119.2C203%20114%20166.6%20218%20241.6%20256.4%20215.6%20234%20221%20201%20231.5%20184l1.9%201c-13.8%2023.6-11.2%2052.8%2011%2071-12.6-12.2-9.4-39%2012.2-48.8s23.6-39.3%2016.4-49.1q-14.7-25.6%209.3-39zM243.9%20180l-4.7%207.4-1.8-8.6-8.6-2.3%207.8-4.3-.6-9%206.5%206.2%208.3-3.3-3.7%208%205.6%206.9z'/%3e%3cuse%20xlink:href='%23hk-a'%20transform='rotate(72%20248.5%20259.5)'/%3e%3cuse%20xlink:href='%23hk-a'%20transform='rotate(144%20248.5%20259.5)'/%3e%3cuse%20xlink:href='%23hk-a'%20transform='rotate(216%20248.5%20259.5)'/%3e%3cuse%20xlink:href='%23hk-a'%20transform='rotate(288%20248.5%20259.5)'/%3e%3c/svg%3e")}.fi-hm{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-hm'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%2300008B'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23fff'%20d='m37.5%200%20122%2090.5L281%200h39v31l-120%2089.5%20120%2089V240h-40l-120-89.5L40.5%20240H0v-30l119.5-89L0%2032V0z'/%3e%3cpath%20fill='red'%20d='M212%20140.5%20320%20220v20l-135.5-99.5zm-92%2010%203%2017.5-96%2072H0zM320%200v1.5l-124.5%2094%201-22L295%200zM0%200l119.5%2088h-30L0%2021z'/%3e%3cpath%20fill='%23fff'%20d='M120.5%200v240h80V0zM0%2080v80h320V80z'/%3e%3cpath%20fill='red'%20d='M0%2096.5v48h320v-48zM136.5%200v240h48V0z'/%3e%3cpath%20fill='%23fff'%20d='m527%20396.7-20.5%202.6%202.2%2020.5-14.8-14.4-14.7%2014.5%202-20.5-20.5-2.4%2017.3-11.2-10.9-17.5%2019.6%206.5%206.9-19.5%207.1%2019.4%2019.5-6.7-10.7%2017.6zm-3.7-117.2%202.7-13-9.8-9%2013.2-1.5%205.5-12.1%205.5%2012.1%2013.2%201.5-9.8%209%202.7%2013-11.6-6.6zm-104.1-60-20.3%202.2%201.8%2020.3-14.4-14.5-14.8%2014.1%202.4-20.3-20.2-2.7%2017.3-10.8-10.5-17.5%2019.3%206.8L387%20178l6.7%2019.3%2019.4-6.3-10.9%2017.3%2017.1%2011.2ZM623%20186.7l-20.9%202.7%202.3%2020.9-15.1-14.7-15%2014.8%202.1-21-20.9-2.4%2017.7-11.5-11.1-17.9%2020%206.7%207-19.8%207.2%2019.8%2019.9-6.9-11%2018zm-96.1-83.5-20.7%202.3%201.9%2020.8-14.7-14.8-15.1%2014.4%202.4-20.7-20.7-2.8%2017.7-11L467%2073.5l19.7%206.9%207.3-19.5%206.8%2019.7%2019.8-6.5-11.1%2017.6zM234%20385.7l-45.8%205.4%204.6%2045.9-32.8-32.4-33%2032.2%204.9-45.9-45.8-5.8%2038.9-24.8-24-39.4%2043.6%2015%2015.8-43.4%2015.5%2043.5%2043.7-14.7-24.3%2039.2%2038.8%2025.1Z'/%3e%3c/svg%3e")}.fi-hm.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-hm'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%2300008B'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fff'%20d='M256%200v32l-95%2096%2095%2093.5V256h-33.5L127%20162l-93%2094H0v-34l93-93.5L0%2037V0h31l96%2094%2093-94z'/%3e%3cpath%20fill='red'%20d='m92%20162%205.5%2017L21%20256H0v-1.5zm62-6%2027%204%2075%2073.5V256zM256%200l-96%2098-2-22%2075-76zM0%20.5%2096.5%2095%2067%2091%200%2024.5z'/%3e%3cpath%20fill='%23fff'%20d='M88%200v256h80V0zM0%2088v80h256V88z'/%3e%3cpath%20fill='red'%20d='M0%20104v48h256v-48zM104%200v256h48V0z'/%3e%3cpath%20fill='%23fff'%20d='m202%20402.8-45.8%205.4%204.6%2045.9-32.8-32.4-33%2032.2%204.9-45.9-45.8-5.8L93%20377.4%2069%20338l43.6%2015%2015.8-43.4%2015.5%2043.5%2043.7-14.7-24.3%2039.2%2038.8%2025.1Zm222.7%208-20.5%202.6%202.2%2020.5-14.8-14.4-14.7%2014.5%202-20.5-20.5-2.4%2017.3-11.2-10.9-17.5%2019.6%206.5%206.9-19.5%207.1%2019.4%2019.5-6.7-10.7%2017.6zM415%20293.6l2.7-13-9.8-9%2013.2-1.5%205.5-12.1%205.5%2012.1%2013.2%201.5-9.8%209%202.7%2013-11.6-6.6zm-84.1-60-20.3%202.2%201.8%2020.3-14.4-14.5-14.8%2014.1%202.4-20.3-20.2-2.7%2017.3-10.8-10.5-17.5%2019.3%206.8%207.2-19.1%206.7%2019.3%2019.4-6.3-10.9%2017.3zm175.8-32.8-20.9%202.7%202.3%2020.9-15.1-14.7-15%2014.8%202.1-21-20.9-2.4%2017.7-11.5-11.1-17.9%2020%206.7%207-19.8%207.2%2019.8%2019.9-6.9-11%2018zm-82.1-83.5-20.7%202.3%201.9%2020.8-14.7-14.8L376%20140l2.4-20.7-20.7-2.8%2017.7-11-10.7-17.9%2019.7%206.9%207.3-19.5%206.8%2019.7%2019.8-6.5-11.1%2017.6z'/%3e%3c/svg%3e")}.fi-hn{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-hn'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%2318c3df'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20160h640v160H0z'/%3e%3cg%20id='hn-c'%20fill='%2318c3df'%20transform='translate(320%20240)scale(26.66665)'%3e%3cg%20id='hn-b'%3e%3cpath%20id='hn-a'%20d='m-.3%200%20.5.1L0-1z'/%3e%3cuse%20xlink:href='%23hn-a'%20width='100%25'%20height='100%25'%20transform='scale(-1%201)'/%3e%3c/g%3e%3cuse%20xlink:href='%23hn-b'%20width='100%25'%20height='100%25'%20transform='rotate(72)'/%3e%3cuse%20xlink:href='%23hn-b'%20width='100%25'%20height='100%25'%20transform='rotate(-72)'/%3e%3cuse%20xlink:href='%23hn-b'%20width='100%25'%20height='100%25'%20transform='rotate(144)'/%3e%3cuse%20xlink:href='%23hn-b'%20width='100%25'%20height='100%25'%20transform='rotate(-144)'/%3e%3c/g%3e%3cuse%20xlink:href='%23hn-c'%20width='100%25'%20height='100%25'%20transform='translate(133.3%20-42.7)'/%3e%3cuse%20xlink:href='%23hn-c'%20width='100%25'%20height='100%25'%20transform='translate(133.3%2037.3)'/%3e%3cuse%20xlink:href='%23hn-c'%20width='100%25'%20height='100%25'%20transform='translate(-133.3%20-42.7)'/%3e%3cuse%20xlink:href='%23hn-c'%20width='100%25'%20height='100%25'%20transform='translate(-133.3%2037.3)'/%3e%3c/svg%3e")}.fi-hn.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-hn'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%2318c3df'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20170.7h512v170.6H0z'/%3e%3cg%20id='hn-c'%20fill='%2318c3df'%20transform='translate(256%20256)scale(28.44446)'%3e%3cg%20id='hn-b'%3e%3cpath%20id='hn-a'%20d='m0-1-.3%201%20.5.1z'/%3e%3cuse%20xlink:href='%23hn-a'%20width='100%25'%20height='100%25'%20transform='scale(-1%201)'/%3e%3c/g%3e%3cuse%20xlink:href='%23hn-b'%20width='100%25'%20height='100%25'%20transform='rotate(72)'/%3e%3cuse%20xlink:href='%23hn-b'%20width='100%25'%20height='100%25'%20transform='rotate(-72)'/%3e%3cuse%20xlink:href='%23hn-b'%20width='100%25'%20height='100%25'%20transform='rotate(144)'/%3e%3cuse%20xlink:href='%23hn-b'%20width='100%25'%20height='100%25'%20transform='rotate(-144)'/%3e%3c/g%3e%3cuse%20xlink:href='%23hn-c'%20width='100%25'%20height='100%25'%20transform='translate(142.2%20-45.5)'/%3e%3cuse%20xlink:href='%23hn-c'%20width='100%25'%20height='100%25'%20transform='translate(142.2%2039.8)'/%3e%3cuse%20xlink:href='%23hn-c'%20width='100%25'%20height='100%25'%20transform='translate(-142.2%20-45.5)'/%3e%3cuse%20xlink:href='%23hn-c'%20width='100%25'%20height='100%25'%20transform='translate(-142.2%2039.8)'/%3e%3c/svg%3e")}.fi-hr{background-image:url(/assets/hr-K104hqQF.svg)}.fi-hr.fis{background-image:url(/assets/hr-C9VaLqwu.svg)}.fi-ht{background-image:url(/assets/ht-C3TTQpK4.svg)}.fi-ht.fis{background-image:url(/assets/ht-Dv-spnGk.svg)}.fi-hu{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-hu'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%23fff'%20d='M640%20480H0V0h640z'/%3e%3cpath%20fill='%23388d00'%20d='M640%20480H0V320h640z'/%3e%3cpath%20fill='%23d43516'%20d='M640%20160.1H0V.1h640z'/%3e%3c/g%3e%3c/svg%3e")}.fi-hu.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-hu'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%23fff'%20d='M512%20512H0V0h512z'/%3e%3cpath%20fill='%23388d00'%20d='M512%20512H0V341.3h512z'/%3e%3cpath%20fill='%23d43516'%20d='M512%20170.8H0V.1h512z'/%3e%3c/g%3e%3c/svg%3e")}.fi-id{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-id'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23e70011'%20d='M0%200h640v240H0Z'/%3e%3cpath%20fill='%23fff'%20d='M0%20240h640v240H0Z'/%3e%3c/svg%3e")}.fi-id.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-id'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23e70011'%20d='M0%200h512v256H0Z'/%3e%3cpath%20fill='%23fff'%20d='M0%20256h512v256H0Z'/%3e%3c/svg%3e")}.fi-ie{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ie'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23009A49'%20d='M0%200h213.3v480H0z'/%3e%3cpath%20fill='%23FF7900'%20d='M426.7%200H640v480H426.7z'/%3e%3c/g%3e%3c/svg%3e")}.fi-ie.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ie'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23fff'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23009A49'%20d='M0%200h170.7v512H0z'/%3e%3cpath%20fill='%23FF7900'%20d='M341.3%200H512v512H341.3z'/%3e%3c/g%3e%3c/svg%3e")}.fi-il{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-il'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='il-a'%3e%3cpath%20fill-opacity='.7'%20d='M-87.6%200H595v512H-87.6z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23il-a)'%20transform='translate(82.1)scale(.94)'%3e%3cpath%20fill='%23fff'%20d='M619.4%20512H-112V0h731.4z'/%3e%3cpath%20fill='%230038b8'%20d='M619.4%20115.2H-112V48h731.4zm0%20350.5H-112v-67.2h731.4zm-483-275%20110.1%20191.6L359%20191.6z'/%3e%3cpath%20fill='%23fff'%20d='m225.8%20317.8%2020.9%2035.5%2021.4-35.3z'/%3e%3cpath%20fill='%230038b8'%20d='M136%20320.6%20246.2%20129l112.4%20190.8z'/%3e%3cpath%20fill='%23fff'%20d='m225.8%20191.6%2020.9-35.5%2021.4%2035.4zM182%20271.1l-21.7%2036%2041-.1-19.3-36zm-21.3-66.5%2041.2.3-19.8%2036.3zm151.2%2067%2020.9%2035.5-41.7-.5zm20.5-67-41.2.3%2019.8%2036.3zm-114.3%200L189.7%20256l28.8%2050.3%2052.8%201.2%2032-51.5-29.6-52z'/%3e%3c/g%3e%3c/svg%3e")}.fi-il.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-il'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='il-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h512v512H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23il-a)'%3e%3cpath%20fill='%23fff'%20d='M619.4%20512H-112V0h731.4z'/%3e%3cpath%20fill='%230038b8'%20d='M619.4%20115.2H-112V48h731.4zm0%20350.5H-112v-67.2h731.4zm-483-275%20110.1%20191.6L359%20191.6z'/%3e%3cpath%20fill='%23fff'%20d='m225.8%20317.8%2020.9%2035.5%2021.4-35.3z'/%3e%3cpath%20fill='%230038b8'%20d='M136%20320.6%20246.2%20129l112.4%20190.8z'/%3e%3cpath%20fill='%23fff'%20d='m225.8%20191.6%2020.9-35.5%2021.4%2035.4zM182%20271.1l-21.7%2036%2041-.1-19.3-36zm-21.3-66.5%2041.2.3-19.8%2036.3zm151.2%2067%2020.9%2035.5-41.7-.5zm20.5-67-41.2.3%2019.8%2036.3zm-114.3%200L189.7%20256l28.8%2050.3%2052.8%201.2%2032-51.5-29.6-52z'/%3e%3c/g%3e%3c/svg%3e")}.fi-im{background-image:url(/assets/im-BAoxVCMv.svg)}.fi-im.fis{background-image:url(/assets/im-deD7ny0b.svg)}.fi-in{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-in'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23f93'%20d='M0%200h640v160H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20160h640v160H0z'/%3e%3cpath%20fill='%23128807'%20d='M0%20320h640v160H0z'/%3e%3cg%20transform='matrix(3.2%200%200%203.2%20320%20240)'%3e%3ccircle%20r='20'%20fill='%23008'/%3e%3ccircle%20r='17.5'%20fill='%23fff'/%3e%3ccircle%20r='3.5'%20fill='%23008'/%3e%3cg%20id='in-d'%3e%3cg%20id='in-c'%3e%3cg%20id='in-b'%3e%3cg%20id='in-a'%20fill='%23008'%3e%3ccircle%20r='.9'%20transform='rotate(7.5%20-8.8%20133.5)'/%3e%3cpath%20d='M0%2017.5.6%207%200%202l-.6%205z'/%3e%3c/g%3e%3cuse%20xlink:href='%23in-a'%20width='100%25'%20height='100%25'%20transform='rotate(15)'/%3e%3c/g%3e%3cuse%20xlink:href='%23in-b'%20width='100%25'%20height='100%25'%20transform='rotate(30)'/%3e%3c/g%3e%3cuse%20xlink:href='%23in-c'%20width='100%25'%20height='100%25'%20transform='rotate(60)'/%3e%3c/g%3e%3cuse%20xlink:href='%23in-d'%20width='100%25'%20height='100%25'%20transform='rotate(120)'/%3e%3cuse%20xlink:href='%23in-d'%20width='100%25'%20height='100%25'%20transform='rotate(-120)'/%3e%3c/g%3e%3c/svg%3e")}.fi-in.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-in'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23f93'%20d='M0%200h512v170.7H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20170.7h512v170.6H0z'/%3e%3cpath%20fill='%23128807'%20d='M0%20341.3h512V512H0z'/%3e%3cg%20transform='translate(256%20256)scale(3.41333)'%3e%3ccircle%20r='20'%20fill='%23008'/%3e%3ccircle%20r='17.5'%20fill='%23fff'/%3e%3ccircle%20r='3.5'%20fill='%23008'/%3e%3cg%20id='in-d'%3e%3cg%20id='in-c'%3e%3cg%20id='in-b'%3e%3cg%20id='in-a'%20fill='%23008'%3e%3ccircle%20r='.9'%20transform='rotate(7.5%20-8.8%20133.5)'/%3e%3cpath%20d='M0%2017.5.6%207%200%202l-.6%205z'/%3e%3c/g%3e%3cuse%20xlink:href='%23in-a'%20width='100%25'%20height='100%25'%20transform='rotate(15)'/%3e%3c/g%3e%3cuse%20xlink:href='%23in-b'%20width='100%25'%20height='100%25'%20transform='rotate(30)'/%3e%3c/g%3e%3cuse%20xlink:href='%23in-c'%20width='100%25'%20height='100%25'%20transform='rotate(60)'/%3e%3c/g%3e%3cuse%20xlink:href='%23in-d'%20width='100%25'%20height='100%25'%20transform='rotate(120)'/%3e%3cuse%20xlink:href='%23in-d'%20width='100%25'%20height='100%25'%20transform='rotate(-120)'/%3e%3c/g%3e%3c/svg%3e")}.fi-io{background-image:url(/assets/io-Bkx8USW1.svg)}.fi-io.fis{background-image:url(/assets/io-BzKkDPkD.svg)}.fi-iq{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-iq'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23fff'%20d='M0%20160h640v160H0z'/%3e%3cpath%20fill='%23ce1126'%20d='M0%200h640v160H0z'/%3e%3cpath%20fill='%23000001'%20d='M0%20320h640v160H0z'/%3e%3cg%20fill='%23007a3d'%20transform='translate(-179.3%20-92.8)scale(1.75182)'%3e%3cpath%20d='M325.5%20173.2a5%205%200%200%201-1.4-1c-.3-.5-.1-.5%201.2-.2%202.3.7%203.8.4%205.3-.8l1.3-1.1%201.5.7c.9.5%201.8.8%202%20.7.7-.2%202.1-2%202-2.6%200-.7.6-.5%201%20.3.6%201.6-.3%203.5-2%203.9-.7.2-1.4.1-2.6-.3-1.4-.5-1.7-.5-2.4%200a5.4%205.4%200%200%201-5.9.4m5.8-5.3a8%208%200%200%201-1-4c.1-.6.3-.8.8-.6%201%20.3%201.2%201%201%203%200%201.8-.3%202.3-.8%201.6m-67.6-1.9c-.1%201.3%202.4%204.6%203.5%205.2-.8.3-1.7.2-2.4.5-4%204-18.4%2018-21%2021.4%207.8.2%2016.4-.1%2023.7-.4%200-5.3%205-5.6%208.4-7.5%201.7%202.7%206%202.5%206.6%206.6v17.6H216a9.7%209.7%200%200%201-12.3%207.5c2-2%205.4-2.8%206.6-5.7%201-6.4-2-10.3-4-14a24%2024%200%200%200%207-3.6c-2.3%207%206.2%206.3%2012.4%206.1.2-2.4.1-5.2-1.7-5.6%202.3-.9%202.7-1.2%206.6-4.4v9.6l46.1-.1c0-3%20.8-7.9-1.6-7.9-2.2%200%200%206.2-1.8%206.2h-35.7v-6c1.5-1.6%201.3-1.5%2011.6-11.8%201-1%208.3-7.6%2014.6-13.7zm89.1-.3c2.5%201.4%204.5%203.2%207.5%204-.3%201.3-1.5%201.8-1.8%203.1v27c3.4.7%204.2-1.3%205.8-2.3.4%204.3%203.2%208.5%203%2012h-14.5zm-19.4%2014.5s5.3-4.5%205.3-4.7V199h3.8l-.1-26.3c1.5-1.6%204.6-3.8%205.3-5.4v42h-33.4c-.5-8.7-.6-17.7%209.6-15.8V190c-.3-.6-.9.1-1-.7%201.6-1.6%202.1-2%206.5-5.8l.1%2015.5h3.9zm-12.6%2018.6c.7%201%203.2%201%203-.8-.3-1.5-3.5-1-3%20.8'/%3e%3ccircle%20cx='224'%20cy='214.4'%20r='2'/%3e%3cpath%20d='M287%20165.8c2.5%201.3%204.5%203.2%207.6%204-.4%201.2-1.5%201.7-1.8%203v27c3.4.7%204.1-1.2%205.7-2.3.5%204.3%203.2%208.6%203.1%2012H287z'/%3e%3c/g%3e%3c/svg%3e")}.fi-iq.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-iq'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23fff'%20d='M0%20170.7h512v170.6H0z'/%3e%3cpath%20fill='%23ce1126'%20d='M0%200h512v170.7H0z'/%3e%3cpath%20fill='%23000001'%20d='M0%20341.3h512V512H0z'/%3e%3cg%20fill='%23007a3d'%20transform='translate(-276.6%20-99)scale(1.8686)'%3e%3cpath%20d='M325.5%20173.2a5%205%200%200%201-1.4-1c-.3-.5-.1-.5%201.2-.2%202.3.7%203.8.4%205.3-.8l1.3-1.1%201.5.7c.9.5%201.8.8%202%20.7.7-.2%202.1-2%202-2.6%200-.7.6-.5%201%20.3.6%201.6-.3%203.5-2%203.9-.7.2-1.4.1-2.6-.3-1.4-.5-1.7-.5-2.4%200a5.4%205.4%200%200%201-5.9.4m5.8-5.3a8%208%200%200%201-1-4c.1-.6.3-.8.8-.6%201%20.3%201.2%201%201%203%200%201.8-.3%202.3-.8%201.6m-67.6-1.9c-.1%201.3%202.4%204.6%203.5%205.2-.8.3-1.7.2-2.4.5-4%204-18.4%2018-21%2021.4%207.8.2%2016.4-.1%2023.7-.4%200-5.3%205-5.6%208.4-7.5%201.7%202.7%206%202.5%206.6%206.6v17.6H216a9.7%209.7%200%200%201-12.3%207.5c2-2%205.4-2.8%206.6-5.7%201-6.4-2-10.3-4-14a24%2024%200%200%200%207-3.6c-2.3%207%206.2%206.3%2012.4%206.1.2-2.4.1-5.2-1.7-5.6%202.3-.9%202.7-1.2%206.6-4.4v9.6l46.1-.1c0-3%20.8-7.9-1.6-7.9-2.2%200%200%206.2-1.8%206.2h-35.7v-6c1.5-1.6%201.3-1.5%2011.6-11.8%201-1%208.3-7.6%2014.6-13.7zm89.1-.3c2.5%201.4%204.5%203.2%207.5%204-.3%201.3-1.5%201.8-1.8%203.1v27c3.4.7%204.2-1.3%205.8-2.3.4%204.3%203.2%208.5%203%2012h-14.5zm-19.4%2014.5s5.3-4.5%205.3-4.7V199h3.8l-.1-26.3c1.5-1.6%204.6-3.8%205.3-5.4v42h-33.4c-.5-8.7-.6-17.7%209.6-15.8V190c-.3-.6-.9.1-1-.7%201.6-1.6%202.1-2%206.5-5.8l.1%2015.5h3.9zm-12.6%2018.6c.7%201%203.2%201%203-.8-.3-1.5-3.5-1-3%20.8'/%3e%3ccircle%20cx='224'%20cy='214.4'%20r='2'/%3e%3cpath%20d='M287%20165.8c2.5%201.3%204.5%203.2%207.6%204-.4%201.2-1.5%201.7-1.8%203v27c3.4.7%204.1-1.2%205.7-2.3.5%204.3%203.2%208.6%203.1%2012H287z'/%3e%3c/g%3e%3c/svg%3e")}.fi-ir{background-image:url(/assets/ir-cCIgaNf6.svg)}.fi-ir.fis{background-image:url(/assets/ir-CXFV1BFU.svg)}.fi-is{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-is'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='is-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h640v480H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='0'%20clip-path='url(%23is-a)'%3e%3cpath%20fill='%23003897'%20d='M0%200h666.7v480H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20186.7h186.7V0h106.6v186.7h373.4v106.6H293.3V480H186.7V293.3H0z'/%3e%3cpath%20fill='%23d72828'%20d='M0%20213.3h213.3V0h53.4v213.3h400v53.4h-400V480h-53.4V266.7H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-is.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-is'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='is-a'%3e%3cpath%20fill-opacity='.7'%20d='M85.4%200h486v486h-486z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='0'%20clip-path='url(%23is-a)'%20transform='translate(-90)scale(1.0535)'%3e%3cpath%20fill='%23003897'%20d='M0%200h675v486H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20189h189V0h108v189h378v108H297v189H189V297H0z'/%3e%3cpath%20fill='%23d72828'%20d='M0%20216h216V0h54v216h405v54H270v216h-54V270H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-it{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-it'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23009246'%20d='M0%200h213.3v480H0z'/%3e%3cpath%20fill='%23ce2b37'%20d='M426.7%200H640v480H426.7z'/%3e%3c/g%3e%3c/svg%3e")}.fi-it.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-it'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23fff'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23009246'%20d='M0%200h170.7v512H0z'/%3e%3cpath%20fill='%23ce2b37'%20d='M341.3%200H512v512H341.3z'/%3e%3c/g%3e%3c/svg%3e")}.fi-je{background-image:url(/assets/je-PUw16g1j.svg)}.fi-je.fis{background-image:url(/assets/je-DavEsnCV.svg)}.fi-jm{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-jm'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%23000001'%20d='m0%200%20320%20240L0%20480zm640%200L320%20240l320%20240z'/%3e%3cpath%20fill='%23090'%20d='m0%200%20320%20240L640%200zm0%20480%20320-240%20320%20240z'/%3e%3cpath%20fill='%23fc0'%20d='M640%200h-59.6L0%20435.3V480h59.6L640%2044.7z'/%3e%3cpath%20fill='%23fc0'%20d='M0%200v44.7L580.4%20480H640v-44.7L59.6%200z'/%3e%3c/g%3e%3c/svg%3e")}.fi-jm.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-jm'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%23000001'%20d='m0%200%20256%20256L0%20512zm512%200L256%20256l256%20256z'/%3e%3cpath%20fill='%23090'%20d='m0%200%20256%20256L512%200zm0%20512%20256-256%20256%20256z'/%3e%3cpath%20fill='%23fc0'%20d='M512%200h-47.7L0%20464.3V512h47.7L512%2047.7z'/%3e%3cpath%20fill='%23fc0'%20d='M0%200v47.7L464.3%20512H512v-47.7L47.7%200z'/%3e%3c/g%3e%3c/svg%3e")}.fi-jo{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-jo'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='jo-a'%3e%3cpath%20fill-opacity='.7'%20d='M-117.8%200h682.6v512h-682.6z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23jo-a)'%20transform='translate(110.5)scale(.9375)'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23000001'%20d='M-117.8%200h1024v170.7h-1024z'/%3e%3cpath%20fill='%23fff'%20d='M-117.8%20170.7h1024v170.6h-1024z'/%3e%3cpath%20fill='%23090'%20d='M-117.8%20341.3h1024V512h-1024z'/%3e%3cpath%20fill='red'%20d='m-117.8%20512%20512-256-512-256z'/%3e%3cpath%20fill='%23fff'%20d='m24.5%20289%205.7-24.9H4.7l23-11-15.9-19.9%2023%2011%205.6-24.8%205.7%2024.9L69%20233.2l-16%2019.9%2023%2011H50.6l5.7%2024.9-15.9-20z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}.fi-jo.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-jo'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='jo-a'%3e%3cpath%20fill-opacity='.7'%20d='M113.6%200H607v493.5H113.6z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23jo-a)'%20transform='translate(-117.8)scale(1.0375)'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23000001'%20d='M0%200h987v164.5H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20164.5h987V329H0z'/%3e%3cpath%20fill='%23090'%20d='M0%20329h987v164.5H0z'/%3e%3cpath%20fill='red'%20d='m0%20493.5%20493.5-246.8L0%200z'/%3e%3cpath%20fill='%23fff'%20d='m164.8%20244%2022%2010.6h-24.5l5.5%2024-15.3-19.3-15.3%2019.2%205.5-23.9H118l22.1-10.7-15.3-19.1%2022.1%2010.6%205.5-23.9%205.5%2024%2022-10.7z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}.fi-jp{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-jp'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='jp-a'%3e%3cpath%20fill-opacity='.7'%20d='M-88%2032h640v480H-88z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%20clip-path='url(%23jp-a)'%20transform='translate(88%20-32)'%3e%3cpath%20fill='%23fff'%20d='M-128%2032h720v480h-720z'/%3e%3ccircle%20cx='523.1'%20cy='344.1'%20r='194.9'%20fill='%23bc002d'%20transform='translate(-168.4%208.6)scale(.76554)'/%3e%3c/g%3e%3c/svg%3e")}.fi-jp.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-jp'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='jp-a'%3e%3cpath%20fill-opacity='.7'%20d='M177.2%200h708.6v708.7H177.2z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%20clip-path='url(%23jp-a)'%20transform='translate(-128)scale(.72249)'%3e%3cpath%20fill='%23fff'%20d='M0%200h1063v708.7H0z'/%3e%3ccircle%20cx='523.1'%20cy='344.1'%20r='194.9'%20fill='%23bc002d'%20transform='translate(-59.7%20-34.5)scale(1.1302)'/%3e%3c/g%3e%3c/svg%3e")}.fi-ke{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-ke'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cpath%20id='ke-a'%20stroke-miterlimit='10'%20d='m-28.6%2047.5%201.8%201%2046.7-81c2.7-.6%204.2-3.2%205.7-5.8%201-1.8%205-8.7%206.7-17.7a58%2058%200%200%200-11.9%2014.7c-1.5%202.6-3%205.2-2.3%207.9z'/%3e%3c/defs%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23000001'%20d='M0%200h640v144H0z'/%3e%3cpath%20fill='%23060'%20d='M0%20336h640v144H0z'/%3e%3cg%20id='ke-b'%20transform='matrix(3%200%200%203%20320%20240)'%3e%3cuse%20xlink:href='%23ke-a'%20width='100%25'%20height='100%25'%20stroke='%23000'/%3e%3cuse%20xlink:href='%23ke-a'%20width='100%25'%20height='100%25'%20fill='%23fff'/%3e%3c/g%3e%3cuse%20xlink:href='%23ke-b'%20width='100%25'%20height='100%25'%20transform='matrix(-1%200%200%201%20640%200)'/%3e%3cpath%20fill='%23b00'%20d='M640.5%20168H377c-9-24-39-72-57-72s-48%2048-57%2072H-.2v144H263c9%2024%2039%2072%2057%2072s48-48%2057-72h263.5z'/%3e%3cpath%20id='ke-c'%20d='M377%20312c9-24%2015-48%2015-72s-6-48-15-72c-9%2024-15%2048-15%2072s6%2048%2015%2072'/%3e%3cuse%20xlink:href='%23ke-c'%20width='100%25'%20height='100%25'%20transform='matrix(-1%200%200%201%20640%200)'/%3e%3cg%20fill='%23fff'%20transform='matrix(3%200%200%203%20320%20240)'%3e%3cellipse%20rx='4'%20ry='6'/%3e%3cpath%20id='ke-d'%20d='M1%205.8s4%208%204%2021-4%2021-4%2021z'/%3e%3cuse%20xlink:href='%23ke-d'%20width='100%25'%20height='100%25'%20transform='scale(-1)'/%3e%3cuse%20xlink:href='%23ke-d'%20width='100%25'%20height='100%25'%20transform='scale(-1%201)'/%3e%3cuse%20xlink:href='%23ke-d'%20width='100%25'%20height='100%25'%20transform='scale(1%20-1)'/%3e%3c/g%3e%3c/svg%3e")}.fi-ke.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-ke'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cpath%20id='ke-a'%20stroke-miterlimit='10'%20d='m-28.6%2047.5%201.8%201%2046.7-81c2.7-.6%204.2-3.2%205.7-5.8%201-1.8%205-8.7%206.7-17.7a58%2058%200%200%200-11.9%2014.7c-1.5%202.6-3%205.2-2.3%207.9z'/%3e%3c/defs%3e%3cpath%20fill='%23fff'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23000001'%20d='M0%200h512v153.6H0z'/%3e%3cpath%20fill='%23060'%20d='M0%20358.4h512V512H0z'/%3e%3cg%20id='ke-b'%20transform='matrix(3.2%200%200%203.2%20255.8%20256)'%3e%3cuse%20xlink:href='%23ke-a'%20width='100%25'%20height='100%25'%20stroke='%23000'/%3e%3cuse%20xlink:href='%23ke-a'%20width='100%25'%20height='100%25'%20fill='%23fff'/%3e%3c/g%3e%3cuse%20xlink:href='%23ke-b'%20width='100%25'%20height='100%25'%20transform='matrix(-1%200%200%201%20511.7%200)'/%3e%3cpath%20fill='%23b00'%20d='M255.8%20102.4c-19.2%200-51.2%2051.2-60.8%2076.8H0v153.6h195c9.7%2025.6%2041.7%2076.8%2060.9%2076.8%2019.2%200%2051.2-51.2%2060.8-76.8H512V179.2H316.6c-9.6-25.6-41.6-76.8-60.8-76.8'/%3e%3cpath%20id='ke-c'%20d='M316.6%20332.8a220%20220%200%200%200%2016-76.8%20220%20220%200%200%200-16-76.8%20220%20220%200%200%200-16%2076.8%20220%20220%200%200%200%2016%2076.8'/%3e%3cuse%20xlink:href='%23ke-c'%20width='100%25'%20height='100%25'%20transform='matrix(-1%200%200%201%20511.7%200)'/%3e%3cg%20fill='%23fff'%20transform='matrix(3.2%200%200%203.2%20255.8%20256)'%3e%3cellipse%20rx='4'%20ry='6'/%3e%3cpath%20id='ke-d'%20d='M1%205.8s4%208%204%2021-4%2021-4%2021z'/%3e%3cuse%20xlink:href='%23ke-d'%20width='100%25'%20height='100%25'%20transform='scale(-1)'/%3e%3cuse%20xlink:href='%23ke-d'%20width='100%25'%20height='100%25'%20transform='scale(-1%201)'/%3e%3cuse%20xlink:href='%23ke-d'%20width='100%25'%20height='100%25'%20transform='scale(1%20-1)'/%3e%3c/g%3e%3c/svg%3e")}.fi-kg{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-kg'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='kg-a'%3e%3cpath%20fill-opacity='.7'%20d='M-85%200h682.7v512H-85z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23kg-a)'%20transform='translate(79.6)scale(.9375)'%3e%3cpath%20fill='red'%20d='M-128%200h768.8v512H-128z'/%3e%3cpath%20fill='%23ff0'%20d='M105.5%20261.1c13.6-16.6%2041.9-.4%2065-12.3-27.4%201.5-42.3-13.2-63.9-11.1%2022.4-13.8%2041.5%204.5%2066.5-2.8-33.1-2.8-31.7-17.7-61.9-19.8%2026.8-11.4%2040%2011.8%2066.3%206.5-31-7.1-35-25.3-58-29.2%2033.6-5%2031.4%2014.8%2064.3%2017.2-33.4-14.3-24.7-26.8-52.6-37.7%2031.3-.7%2029.2%2021%2061%2026.6-27.2-17.2-23.9-32.9-46.2-45.2%2026.5.5%2029%2027.6%2056.1%2036-24.1-19.1-17.8-35.3-38.6-52.4%2026.4%206.2%2022.5%2029.6%2050%2044.6-20.4-22.6-12.6-38.8-30.3-57.3%2025.4%208.1%2015.7%2030.4%2042%2051.6-15-24.9-5.7-40.8-20.6-61.7%2023.6%2012.1%2012.2%2034.9%2034%2057.5-10.3-25.5%200-41.3-10.5-63.9%2020.2%2015%208.2%2039.3%2024.5%2062.5-6-32%207.8-37.2%203.5-65.2%2015.3%2018.8-1.8%2037.6%2010%2065.3-1.5-31.5%2015.3-38.8%2012.4-64%2015.1%2022.6-8.5%2042.3%201.4%2066.5%202.5-29.8%2022.1-37.6%2022.4-60.8%2012%2021.3-14%2036.7-9.8%2065%208.5-31.2%2029.4-35%2032-56%207.1%2024.6-21.4%2036-19.7%2063.4%208.5-27.7%2034.6-31%2040-51.4%203.3%2026-22.4%2030.7-29.7%2059.5%2013.5-23.5%2037.2-25.4%2047.8-44-.8%2025.8-29.8%2029.2-38.7%2053.3%2016.7-20.5%2037.7-17%2054.4-35.1-1.8%2023.3-31.3%2022-47%2046.1%2018.1-16.7%2045.4-11.7%2059.3-26.1-.7%2020.6-36.9%2019-54%2037.5%2021-11.6%2047.8-4.8%2063.2-15.5-2.8%2018-41%2013.8-59.3%2028%2025.2-7%2044.7%203.7%2065-4-9.9%2017.5-44.6%206.4-63%2017.8%2022-3.7%2045.2%209.6%2065.1%205.3-6.5%2015.2-44.6-1-65%208.5%2024.4-.2%2040.3%2015.5%2063%2014.4-12.3%2013.8-45.7-5.1-65.2-1.9%2023.8%205%2042%2024.6%2060%2025.6-14.9%2011.3-42.5-14.5-65-11.3%2023.2%206.2%2042.6%2032.5%2055.8%2033.1-14.3%209.8-42.5-22.5-61.8-21.3%2023.5%2010.6%2034.2%2037.5%2049.7%2041.3-19.1%206.1-37.9-29.2-58.4-30.5%2023.8%2015%2025.1%2038%2043.4%2048.2-19.3%204.7-33-35.2-53.3-38.6%2019.5%2014.3%2022.5%2045%2035.4%2054.6-19.6%201-26.7-40.7-46.8-46.7%2017.2%2014.4%2013.1%2045.6%2026.5%2059-20.4-4.3-17.8-40.6-39.1-52.9%2015.3%2019.4%207.5%2046.9%2017.5%2062.4-19.9-8-11.3-40.6-30.2-59%2010.3%2020.6-.8%2044.6%207.4%2064.5-18.2-8.9-6-47.4-19.9-62.7%206.4%2023.8-5.4%2043.5-.6%2064.8-18.6-21.5%202.8-43.2-13.3-65.1%204.2%2025.1-13.4%2042.7-10.6%2063.7-14.7-17.2%208-44.7-3.5-66.4%202.4%2024.7-20.3%2046.4-18.7%2062-12-20%2013.3-43.6%206.5-66.3-1.4%2023.6-24.4%2036.4-28.7%2057.9-7.7-23.7%2019.6-40.8%2017.2-64.1-7.8%2022.1-30%2031-37.8%2052.5-6.4-23.7%2026-36.2%2026.8-61-10%2023.2-36.5%2028.4-45.3%2046.2-3.3-23.5%2033.8-34%2035.2-56.3-12%2021.4-41%2022.3-51%2039.3-1.5-23.4%2037.6-26.3%2043.7-50.8-11.9%2018.2-43.7%2015.9-57%2030.7%202.1-21.7%2044.4-23%2051.2-42.6-15.8%2015.2-45%209-61.5%2021%209.2-21.4%2048.9-16.9%2057.8-32.3-17.5%209.1-48.6.2-64%209.4%2014-20.2%2044.8-8.1%2062.3-22-28.4%204.1-45.5-7.2-65.2-2z'/%3e%3cpath%20fill='%23ff0'%20d='M356%20256.1a99.2%2099.2%200%201%201-198.5%200%2099.2%2099.2%200%200%201%20198.4%200z'/%3e%3cpath%20fill='red'%20d='M343.2%20256.3a86.3%2086.3%200%201%201-172.6%200%2086.3%2086.3%200%200%201%20172.6%200'/%3e%3cpath%20fill='%23ff0'%20d='M331.2%20256.5a74%2074%200%201%201-148.2%200%2074%2074%200%200%201%20148.2%200'/%3e%3cpath%20fill='red'%20d='M194%20208c20.5-.5%2046%201.4%2062.9%2014.8a97.1%2097.1%200%200%201%2060.5-14.3l11%2020.1a101%20101%200%200%200-50%208.2%2085.3%2085.3%200%200%201%2034.6%2072.1c-2.7%203.4-7%207.1-9.7%2010.5%204-28.5-11-60.3-32.9-77%2017.8%2025.6%2028.3%2048.6%2025.4%2080.4l-10%206.4c4.6-28-2-61-22.7-80%2012%2017.5%2023.8%2049%2016.4%2081-3.2%201-8.2%203.7-11.4%204.6a96%2096%200%200%200-10.8-78.7c-13.8%2019.8-18.3%2050-10.5%2078-3.8-1-6.7-2.2-10.6-3.1-5.7-30%202.2-64%2015.9-81.7-14%208.1-27.1%2042.7-23.4%2078l-9.3-4.3c-4.5-26.3%207.4-60.6%2024.5-80.4-19.4%2012.2-35.2%2042.3-32.5%2074.6-3-2.6-5.7-3.9-8.7-6.6-3.4-28.2%2013-56.6%2032.1-73.6-16.1-7.3-30-8.7-50-8.4%203.1-6.5%206-14.1%209.2-20.7z'/%3e%3c/g%3e%3c/svg%3e")}.fi-kg.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-kg'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='kg-a'%3e%3cpath%20fill-opacity='.7'%20d='M104%200h416.3v416.3H104.1z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23kg-a)'%20transform='translate(-128)scale(1.23)'%3e%3cpath%20fill='red'%20d='M0%200h625v416.3H0z'/%3e%3cpath%20fill='%23ff0'%20d='M189.8%20212.3c11.1-13.5%2034.1-.3%2052.9-10-22.3%201.2-34.4-10.7-52-9%2018.2-11.2%2033.7%203.6%2054.1-2.4-27-2.2-25.8-14.3-50.3-16%2021.8-9.3%2032.5%209.6%2053.9%205.3-25.2-5.8-28.5-20.6-47.2-23.8%2027.3-4.1%2025.5%2012%2052.3%2014-27.2-11.6-20-21.8-42.8-30.6%2025.5-.6%2023.8%2017%2049.5%2021.6-22-14-19.3-26.8-37.5-36.8%2021.6.4%2023.7%2022.5%2045.7%2029.3-19.6-15.5-14.5-28.7-31.4-42.6%2021.4%205%2018.3%2024.1%2040.6%2036.2-16.5-18.3-10.2-31.5-24.6-46.6%2020.6%206.7%2012.8%2024.8%2034.2%2042-12.3-20.2-4.7-33.1-16.8-50.2%2019.2%2010%209.9%2028.4%2027.7%2046.8-8.4-20.7%200-33.6-8.6-52%2016.4%2012.3%206.7%2032%2019.9%2050.9-4.8-26%206.4-30.3%202.9-53%2012.4%2015.3-1.5%2030.6%208%2053-1-25.5%2012.5-31.5%2010.1-52%2012.4%2018.4-6.9%2034.4%201.2%2054.1%202-24.3%2018-30.5%2018.3-49.4%209.7%2017.3-11.5%2029.8-8%2052.8%206.9-25.4%2023.9-28.5%2026-45.6%205.8%2020-17.4%2029.4-16%2051.6%206.9-22.5%2028.1-25.2%2032.5-41.8%202.6%2021.2-18.3%2025-24.1%2048.4%2011-19%2030.2-20.7%2038.8-35.8-.7%2021-24.3%2023.7-31.5%2043.4%2013.6-16.7%2030.6-13.8%2044.2-28.6-1.4%2019-25.4%2017.9-38.2%2037.5%2014.8-13.6%2037-9.5%2048.3-21.2-.6%2016.7-30%2015.5-44%2030.4%2017.2-9.3%2038.9-3.8%2051.5-12.6C427%20184.3%20396%20181%20381%20192.4c20.5-5.7%2036.3%203%2053-3.3-8.1%2014.3-36.3%205.3-51.3%2014.6%2017.8-3%2036.7%207.7%2052.9%204.3-5.3%2012.3-36.2-.8-53%207%2020-.3%2033%2012.5%2051.4%2011.6-10%2011.2-37.2-4.2-53-1.6%2019.3%204%2034%2020%2048.7%2020.8-12%209.2-34.5-11.8-52.8-9.1%2018.8%205%2034.6%2026.4%2045.4%2026.9-11.6%208-34.6-18.3-50.3-17.4%2019%208.7%2027.8%2030.5%2040.4%2033.6-15.5%205-30.8-23.7-47.5-24.7%2019.3%2012.2%2020.4%2030.8%2035.3%2039-15.6%204-26.8-28.5-43.3-31.2%2015.9%2011.6%2018.2%2036.5%2028.8%2044.4-16%20.8-21.7-33.1-38-38%2014%2011.7%2010.6%2037%2021.4%2047.9-16.5-3.4-14.4-33-31.7-43%2012.4%2015.8%206%2038.1%2014.2%2050.7-16.2-6.5-9.1-33-24.6-48%208.4%2016.8-.6%2036.3%206%2052.5-14.7-7.2-4.8-38.5-16.1-51%205.2%2019.4-4.4%2035.4-.5%2052.7-15.1-17.5%202.3-35-10.8-53%203.4%2020.6-10.9%2034.8-8.6%2052-12-14%206.4-36.5-2.9-54.1%202%2020.1-16.5%2037.7-15.2%2050.4-9.7-16.2%2010.8-35.4%205.3-53.9-1.2%2019.2-19.8%2029.6-23.3%2047-6.3-19.2%2015.9-33.1%2014-52-6.4%2018-24.4%2025.2-30.8%2042.6-5.2-19.2%2021.1-29.4%2021.8-49.6-8.1%2019-29.7%2023.1-36.8%2037.6-2.7-19%2027.5-27.6%2028.6-45.7-9.7%2017.4-33.3%2018-41.5%2031.9-1.2-19%2030.6-21.4%2035.6-41.3-9.7%2014.8-35.6%2013-46.3%2025%201.7-17.7%2036-18.8%2041.5-34.6-12.8%2012.3-36.5%207.2-50%2017%207.5-17.4%2039.8-13.7%2047-26.3-14.2%207.5-39.5.3-52%207.7%2011.4-16.4%2036.5-6.6%2050.7-18-23.1%203.4-37-5.8-53-1.5z'/%3e%3cpath%20fill='%23ff0'%20d='M393.4%20208.2a80.7%2080.7%200%201%201-161.3%200%2080.7%2080.7%200%200%201%20161.3%200'/%3e%3cpath%20fill='red'%20d='M383%20208.4a70.1%2070.1%200%201%201-140.2%200%2070.1%2070.1%200%200%201%20140.3%200z'/%3e%3cpath%20fill='%23ff0'%20d='M373.3%20208.5a60.2%2060.2%200%201%201-120.5%200%2060.2%2060.2%200%200%201%20120.5%200'/%3e%3cpath%20fill='red'%20d='M261.8%20169c16.7-.3%2037.4%201.2%2051.1%2012.2a79%2079%200%200%201%2049.2-11.7l9%2016.4c-13-1.3-25.7.5-40.7%206.6a69.3%2069.3%200%200%201%2028.1%2058.6c-2.2%202.8-5.6%205.8-7.8%208.5%203.2-23.1-9-49-26.8-62.6%2014.4%2020.9%2023%2039.6%2020.6%2065.5l-8.2%205.1c3.8-22.8-1.5-49.5-18.4-65a87.5%2087.5%200%200%201%2013.4%2065.8c-2.6.8-6.6%203-9.3%203.8a78%2078%200%200%200-8.8-64%2077.6%2077.6%200%200%200-8.5%2063.4l-8.6-2.5c-4.6-24.5%201.8-52%2012.9-66.4-11.3%206.6-22%2034.7-19%2063.4l-7.6-3.5c-3.7-21.4%206-49.3%2020-65.4-15.8%2010-28.7%2034.4-26.4%2060.7-2.4-2.1-4.7-3.2-7.1-5.3-2.8-23%2010.5-46.1%2026-60a87.6%2087.6%200%200%200-40.6-6.7c2.5-5.3%205-11.5%207.5-16.8z'/%3e%3c/g%3e%3c/svg%3e")}.fi-kh{background-image:url(/assets/kh-V4Sa3vlt.svg)}.fi-kh.fis{background-image:url(/assets/kh-CAffWc0R.svg)}.fi-ki{background-image:url(/assets/ki-COZ8g898.svg)}.fi-ki.fis{background-image:url(/assets/ki-CM44VBPm.svg)}.fi-km{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-km'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='km-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h682.7v512H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23km-a)'%20transform='scale(.9375)'%3e%3cpath%20fill='%23ff0'%20d='M0%200h768.8v128H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20128h768.8v128H0z'/%3e%3cpath%20fill='%23be0027'%20d='M0%20256h768.8v128H0z'/%3e%3cpath%20fill='%233b5aa3'%20d='M0%20384h768.8v128H0z'/%3e%3cpath%20fill='%23239e46'%20d='M0%200v512l381.9-255.3z'/%3e%3cpath%20fill='%23fff'%20d='M157.2%20141.4c-85-4.3-123.9%2063.5-123.8%20115.9-.2%2062%2058.6%20113%20112.8%20110C117%20353.5%2081.2%20314.6%2081%20257c-.3-52.1%2029.5-97.5%2076.3-115.6z'/%3e%3cpath%20fill='%23fff'%20d='m156%20197-12-9.3-14.6%204.6%205.2-14.4-8.8-12.4%2015.2.6%209-12.3%204.3%2014.7%2014.4%204.8-12.6%208.5zm-.3%2052.1-12-9.4-14.6%204.6%205.3-14.3-8.9-12.4%2015.3.5%209-12.2%204.2%2014.6%2014.5%204.9-12.7%208.5zm.2%2052.6-12-9.4-14.5%204.6%205.2-14.3-8.8-12.4%2015.2.5%209-12.2%204.3%2014.6%2014.4%204.8-12.6%208.6zm-.2%2053-12-9.3L129%20350l5.3-14.4-8.9-12.4%2015.3.6%209-12.3%204.2%2014.7%2014.5%204.8-12.7%208.5z'/%3e%3c/g%3e%3c/svg%3e")}.fi-km.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-km'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='km-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h416.3v416.3H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23km-a)'%20transform='scale(1.23)'%3e%3cpath%20fill='%23ff0'%20d='M0%200h625v104H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20104h625v104.1H0z'/%3e%3cpath%20fill='%23be0027'%20d='M0%20208.1h625v104H0z'/%3e%3cpath%20fill='%233b5aa3'%20d='M0%20312.2h625v104H0z'/%3e%3cpath%20fill='%23239e46'%20d='M0%200v416.2l310.4-207.5z'/%3e%3cpath%20fill='%23fff'%20d='M127.8%20115c-69.2-3.5-100.7%2051.6-100.6%2094.2-.2%2050.4%2047.6%2092%2091.7%2089.4A100%20100%200%200%201%2065.8%20209a98.3%2098.3%200%200%201%2062-94'/%3e%3cpath%20fill='%23fff'%20d='m126.8%20160.2-9.8-7.6-11.8%203.7%204.2-11.6-7.1-10.1%2012.3.4%207.4-10%203.4%2012%2011.8%203.9-10.3%207zm-.2%2042.3-9.8-7.6-11.8%203.7%204.2-11.6-7.2-10.1%2012.4.4%207.4-10%203.4%2012%2011.8%204-10.3%206.9zm.2%2042.8-9.8-7.6-11.8%203.7%204.2-11.7-7.1-10%2012.3.4%207.4-10%203.4%2012%2011.8%203.9-10.3%206.9zm-.2%2043.1-9.8-7.6-11.8%203.7%204.2-11.6-7.2-10.1%2012.4.4%207.4-10%203.4%2012%2011.8%204-10.3%206.9z'/%3e%3c/g%3e%3c/svg%3e")}.fi-kn{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-kn'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='kn-a'%3e%3cpath%20fill-opacity='.7'%20d='M-80.1%200h682.7v512H-80.1z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23kn-a)'%20transform='translate(75.1)scale(.9375)'%3e%3cpath%20fill='%23ffe900'%20d='M-107.8.2h737.6v511.3h-737.6z'/%3e%3cpath%20fill='%2335a100'%20d='m-108.2.2.8%20368.6L466.6%200z'/%3e%3cpath%20fill='%23c70000'%20d='m630.7%20511.5-1.4-383.2-579%20383.5z'/%3e%3cpath%20fill='%23000001'%20d='m-107.9%20396.6.5%20115.4%20125.3-.2%20611.7-410.1L629%201.4%20505.2.2z'/%3e%3cpath%20fill='%23fff'%20d='m380.4%20156.6-9.8-42.2%2033.3%2027%2038-24.6-17.4%2041.3%2033.4%2027-44.2-1.5-17.3%2041.3-9.9-42.2-44.1-1.5zm-275.2%20179-9.9-42.3%2033.3%2027%2038-24.6-17.4%2041.3%2033.4%2027-44.1-1.5-17.4%2041.3-9.8-42.2-44.1-1.5z'/%3e%3c/g%3e%3c/svg%3e")}.fi-kn.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-kn'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='kn-a'%3e%3cpath%20fill-opacity='.7'%20d='M151.7-.3h745.1v745H151.7z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23kn-a)'%20transform='translate(-104.2%20.2)scale(.68714)'%3e%3cpath%20fill='%23ffe900'%20d='M-5.3%200h1073.5v744H-5.3z'/%3e%3cpath%20fill='%2335a100'%20d='m-5.8%200%201.2%20536.4L830.7-.4z'/%3e%3cpath%20fill='%23c70000'%20d='m1069.5%20744-1.9-557.7L225%20744.5l844.5-.4z'/%3e%3cpath%20fill='%23000001'%20d='m-5.3%20576.9.7%20167.9%20182.3-.3L1068%20147.6l-1-146L886.9%200z'/%3e%3cpath%20fill='%23fff'%20d='m818%20269-64.2-2.2-25.3%2060.2-14.3-61.5-64.2-2.2%2055.4-35.7L691%20166l48.5%2039.4%2055.3-35.9-25.4%2060.2zM417.5%20529.6l-64.3-2.3-25.2%2060.2-14.3-61.5-64.3-2.2%2055.4-35.8-14.4-61.4%2048.5%2039.4%2055.3-35.9-25.3%2060.1z'/%3e%3c/g%3e%3c/svg%3e")}.fi-kp{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-kp'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='kp-a'%3e%3cpath%20fill-opacity='.7'%20d='M5%20.1h682.6V512H5.1z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23kp-a)'%20transform='translate(-4.8%20-.1)scale(.93768)'%3e%3cpath%20fill='%23fff'%20stroke='%23000'%20d='M776%20511.5H-76V.5h852z'/%3e%3cpath%20fill='%233e5698'%20d='M776%20419H-76v92.5h852z'/%3e%3cpath%20fill='%23c60000'%20d='M776%20397.6H-76V114.4h852z'/%3e%3cpath%20fill='%233e5698'%20d='M776%20.6H-76V93h852z'/%3e%3cpath%20fill='%23fff'%20d='M328.5%20256c0%2063.5-53%20115-118.6%20115S91.3%20319.5%2091.3%20256s53-114.8%20118.6-114.8c65.5%200%20118.6%2051.4%20118.6%20114.9z'/%3e%3cpath%20fill='%23c40000'%20d='m175.8%20270.6-57-40.7%2071-.2%2022.7-66.4%2021.1%2066.1%2071-.4-57.9%2041.2%2021.3%2066.1-57-40.7-58%2041.3z'/%3e%3c/g%3e%3c/svg%3e")}.fi-kp.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-kp'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='kp-a'%3e%3cpath%20fill-opacity='.7'%20d='M92.2%207.8h593.6v485.5H92.2z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23kp-a)'%20transform='matrix(.86254%200%200%201.0546%20-79.5%20-8.3)'%3e%3cpath%20fill='%23fff'%20stroke='%23000'%20stroke-width='1.1'%20d='M991.8%20492.9H4.2V8.4h987.6z'/%3e%3cpath%20fill='%233e5698'%20d='M991.8%20405.2H4.2V493h987.6z'/%3e%3cpath%20fill='%23c60000'%20d='M991.8%20384.9H4.2V116.4h987.6z'/%3e%3cpath%20fill='%233e5698'%20d='M991.8%208.4H4.2V96h987.6z'/%3e%3cpath%20fill='%23fff'%20d='M473%20250.7c0%2060.1-61.5%20108.9-137.4%20108.9-76%200-137.6-48.8-137.6-109%200-60.1%2061.6-108.9%20137.6-108.9S473%20190.5%20473%20250.7'/%3e%3cpath%20fill='%23c40000'%20d='m402.9%20326.8-66.1-38.6-67.1%2039%2026.3-62.8-66.1-38.5%2082.4-.3%2026.2-63%2024.5%2062.8%2082.4-.4-67.2%2039z'/%3e%3c/g%3e%3c/svg%3e")}.fi-kr{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-kr'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='kr-a'%3e%3cpath%20fill-opacity='.7'%20d='M-95.8-.4h682.7v512H-95.8z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23kr-a)'%20transform='translate(89.8%20.4)scale(.9375)'%3e%3cpath%20fill='%23fff'%20d='M-95.8-.4H587v512H-95.8Z'/%3e%3cg%20transform='rotate(-56.3%20361.6%20-101.3)scale(10.66667)'%3e%3cg%20id='kr-c'%3e%3cpath%20id='kr-b'%20fill='%23000001'%20d='M-6-26H6v2H-6Zm0%203H6v2H-6Zm0%203H6v2H-6Z'/%3e%3cuse%20xlink:href='%23kr-b'%20width='100%25'%20height='100%25'%20y='44'/%3e%3c/g%3e%3cpath%20stroke='%23fff'%20d='M0%2017v10'/%3e%3cpath%20fill='%23cd2e3a'%20d='M0-12a12%2012%200%200%201%200%2024Z'/%3e%3cpath%20fill='%230047a0'%20d='M0-12a12%2012%200%200%200%200%2024A6%206%200%200%200%200%200Z'/%3e%3ccircle%20cy='-6'%20r='6'%20fill='%23cd2e3a'/%3e%3c/g%3e%3cg%20transform='rotate(-123.7%20191.2%2062.2)scale(10.66667)'%3e%3cuse%20xlink:href='%23kr-c'%20width='100%25'%20height='100%25'/%3e%3cpath%20stroke='%23fff'%20d='M0-23.5v3M0%2017v3.5m0%203v3'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}.fi-kr.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-kr'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M0%200h512v512H0Z'/%3e%3cg%20fill-rule='evenodd'%20transform='rotate(-56.3%20367.2%20-111.2)scale(9.375)'%3e%3cg%20id='kr-b'%3e%3cpath%20id='kr-a'%20fill='%23000001'%20d='M-6-26H6v2H-6Zm0%203H6v2H-6Zm0%203H6v2H-6Z'/%3e%3cuse%20xlink:href='%23kr-a'%20width='100%25'%20height='100%25'%20y='44'/%3e%3c/g%3e%3cpath%20stroke='%23fff'%20d='M0%2017v10'/%3e%3cpath%20fill='%23cd2e3a'%20d='M0-12a12%2012%200%200%201%200%2024Z'/%3e%3cpath%20fill='%230047a0'%20d='M0-12a12%2012%200%200%200%200%2024A6%206%200%200%200%200%200Z'/%3e%3ccircle%20cy='-6'%20r='6'%20fill='%23cd2e3a'/%3e%3c/g%3e%3cg%20fill-rule='evenodd'%20transform='rotate(-123.7%20196.5%2059.5)scale(9.375)'%3e%3cuse%20xlink:href='%23kr-b'%20width='100%25'%20height='100%25'/%3e%3cpath%20stroke='%23fff'%20d='M0-23.5v3M0%2017v3.5m0%203v3'/%3e%3c/g%3e%3c/svg%3e")}.fi-kw{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-kw'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='kw-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h682.7v512H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%20clip-path='url(%23kw-a)'%20transform='scale(.9375)'%3e%3cpath%20fill='%23fff'%20d='M0%20170.6h1024v170.7H0z'/%3e%3cpath%20fill='%23f31830'%20d='M0%20341.3h1024V512H0z'/%3e%3cpath%20fill='%2300d941'%20d='M0%200h1024v170.7H0z'/%3e%3cpath%20fill='%23000001'%20d='M0%200v512l255.4-170.7.6-170.8z'/%3e%3c/g%3e%3c/svg%3e")}.fi-kw.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-kw'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='kw-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h496v496H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%20clip-path='url(%23kw-a)'%20transform='scale(1.0321)'%3e%3cpath%20fill='%23fff'%20d='M0%20165.3h992.1v165.4H0z'/%3e%3cpath%20fill='%23f31830'%20d='M0%20330.7h992.1v165.4H0z'/%3e%3cpath%20fill='%2300d941'%20d='M0%200h992.1v165.4H0z'/%3e%3cpath%20fill='%23000001'%20d='M0%200v496l247.5-165.3.5-165.5z'/%3e%3c/g%3e%3c/svg%3e")}.fi-ky{background-image:url(/assets/ky-BqProAqG.svg)}.fi-ky.fis{background-image:url(/assets/ky-D_l3blFP.svg)}.fi-kz{background-image:url(/assets/kz-DBjWpOlG.svg)}.fi-kz.fis{background-image:url(/assets/kz-BBCbe9jj.svg)}.fi-la{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-la'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='la-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h640v480H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23la-a)'%3e%3cpath%20fill='%23ce1126'%20d='M-40%200h720v480H-40z'/%3e%3cpath%20fill='%23002868'%20d='M-40%20119.3h720v241.4H-40z'/%3e%3cpath%20fill='%23fff'%20d='M423.4%20240a103.4%20103.4%200%201%201-206.8%200%20103.4%20103.4%200%201%201%20206.8%200'/%3e%3c/g%3e%3c/svg%3e")}.fi-la.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-la'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='la-a'%3e%3cpath%20fill-opacity='.7'%20d='M177.2%200h708.6v708.7H177.2z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23la-a)'%20transform='translate(-128)scale(.72249)'%3e%3cpath%20fill='%23ce1126'%20d='M0%200h1063v708.7H0z'/%3e%3cpath%20fill='%23002868'%20d='M0%20176h1063v356.6H0z'/%3e%3cpath%20fill='%23fff'%20d='M684.2%20354.3a152.7%20152.7%200%201%201-305.4%200%20152.7%20152.7%200%200%201%20305.4%200'/%3e%3c/g%3e%3c/svg%3e")}.fi-lb{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-lb'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='lb-a'%3e%3cpath%20fill-opacity='.7'%20d='M-85.3%200h682.6v512H-85.3z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23lb-a)'%20transform='translate(80)scale(.9375)'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23EE161F'%20d='M-128%20384h768v128h-768zm0-384h768v128h-768z'/%3e%3cpath%20fill='%23fff'%20d='M-128%20128h768v256h-768z'/%3e%3c/g%3e%3cpath%20fill='%2300A850'%20d='M252.1%20130c-7.8%2015.5-13%2015.5-26%2026-5.2%205.1-13%207.7-2.6%2013-10.5%205.1-15.7%207.7-20.9%2018.1l2.6%202.6s10-4.8%2010.4-2.6c1.8%202.1-13%2010-14.9%2011.3l-11%207c-13.1%2010.3-21%207.7-28.7%2023.3l26-2.6c5.2%2018.2-13%2020.8-26%2028.6l-20.9%2013c5.3%2018.2%2020.9%207.8%2033.9%202.6l2.6%202.6v5.2l-26%2013s-30.8%2017.6-31.3%2018.2c-.2%201%200%205.2%200%205.2%2010.4%202.6%2026%205.2%2036.5%200%2013-5.2%2015.6-10.4%2031.2-10.4a100.6%20100.6%200%200%201-52%2020.8v10.4c15.6%200%2026%200%2039-2.6l33.8-10.4c7.8%200%2015.7%207.8%2013%2015.6-7.7%2028.6-39%2023.4-49.4%2046.8L213%20369c10.4-5.2%2020.8-10.3%2033.8-7.7%2015.6%205.2%2015.6%2015.6%2036.4%2020.8l-5.2-13c5.2%202.6%2010.4%202.6%2015.7%205.2%2013%205.2%2015.6%2010.4%2031.2%207.8-13-15.6-15.6-13-26-23.4-10.4-15.6-15.7-39%200-41.6l18.2%205.2c18.2%202.6%2018.2-2.6%2044.2%207.8%2015.7%205.2%2020.9%2013%2039%207.8-7.7-18.2-36.3-31.2-54.6-36.4%2020.9-13%2015.6%205.2%2044.3-2.6v-5.2C369.3%20278%20361.4%20265%20332.8%20265l44.3-5.2v-5.2s-43.7-11.4-44.7-11.9c.3-1.3%201.4-3.3%204.3-4.5%208.3%205.4%2033.3%204.8%2034.8%204.7-.8-6.4-12.7-11.7-23-16.9%200%200-44.7-27.5-44.9-29.9.9-7%2018.3%201.1%2037%206.5-5.2-10.4-15.6-15.6-26-18.2l15.6-2.6c-10.4-23.4-36.4-20.8-52-31.2-10.5-7.8-10.5-13-26.1-20.7z'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20stroke='%23fff'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='3.2'%20d='M224%20303c1.9-6.1%204.4-11.6-7.2-16.9-11.6-5.3%205.8%2021.1%207.2%2017zm13.7-12.3c-2.3.3-3.6%208.8%201.1%2011.2%205.2.8%201-11.1-1.1-11.2m13.5-1c-2.4.8-2.5%2012.8%206%2010.6%208.6-2.1%200-11.5-6-10.5zM267%20259c1.8-3-.1-15-7.4-10-7.4%205.1%205%2010.8%207.4%2010m-16-10c2.3-.9%202.5-8.3-4-6.3-6.3%201.9%202.3%207.8%204%206.3m-14.4%202.9s-4.5-6.2-8-4.9c-4.3%204.2%208.3%205%208%204.9M187%20271.7c1.9.2%2016-2.3%2020.9-7.8%204.9-5.5-25.1%202.3-25.1%202.4%200%20.1%202.8%204.9%204.2%205.4m141.1-35c.7-1.3-7.5-7.1-12.4-4.8-1.3%204.3%2012.4%205.7%2012.4%204.8m-27.8-14c1.6-2.2-3.5-11.3-13.7-6.2-10.2%205%2010.7%209.8%2013.7%206.3zm-32.1-5.3s2.5-8.2%208.6-6.6c7%205.3-8.3%206.9-8.6%206.6m-6-6.2c-1-2.3-7.3-1-14.6%203.9-7.4%204.7%2016.8%201.4%2014.6-4zm18.7-22.1s6.5-3%208.5%200c2.7%204.3-8.6%200-8.5%200m-5.5-2.9c-1.3-2.6-8.5-2.9-8.3%201-1.2%203%209.4%202.4%208.3-1m-17.2%200c-.7-1.5-11%200-14%206.2%205%202.4%2016.3-2.3%2014-6.2m-22%206.3s-13.4%208.3-14.3%2014.3c.4%205.2%2016.8-9.4%2016.8-9.4s1.4-5.8-2.4-4.9zm-14.9-7.5c.4-1.7%206.7-5.6%207.2-5.3.5%201.7-5.1%206.3-7.2%205.3m4.3%2031.6c.3-2.5-16-2.3-9.9%205.2%205.2%206.3%2011-4.1%209.9-5.2m-15%2010.7c-.8-1.6-2-6-4.2-6.4-1.9%200-11.7%202-12.5%203.6-.4%201.3%204.1%209.4%205.6%209.6%201.8.7%2010.9-6%2011.2-6.8zm88.4%2055.2c.5-1.8%2017.3-7.5%2023-2%206.8%209.3-23.4%205-23%202m46%2010.9c3.7-6.2-11.3-13.6-17.6-6.5%202.2%208.5%2014.6%2011.6%2017.6%206.5'/%3e%3c/g%3e%3c/svg%3e")}.fi-lb.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-lb'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='lb-a'%3e%3cpath%20fill-opacity='.7'%20d='M124%200h496v496H124z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23lb-a)'%20transform='translate(-128)scale(1.0321)'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23EE161F'%20d='M0%20372h744v124H0zM0%200h744v124H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20124h744v248H0z'/%3e%3c/g%3e%3cpath%20fill='%2300A850'%20d='M368.3%20125.9c-7.6%2015.1-12.7%2015.1-25.3%2025.2-5%205-12.6%207.5-2.5%2012.6-10%205-15.1%207.5-20.2%2017.6l2.6%202.5s9.5-4.7%2010-2.5c1.7%202-12.6%209.7-14.4%2011s-10.8%206.6-10.8%206.6c-12.6%2010.1-20.2%207.6-27.7%2022.7l25.2-2.5c5%2017.6-12.6%2020.1-25.2%2027.7l-20.2%2012.6c5%2017.6%2020.2%207.5%2032.8%202.5l2.5%202.5v5L270%20282s-29.8%2017-30.3%2017.6c-.2%201%200%205%200%205%2010.1%202.6%2025.2%205.1%2035.3%200%2012.6-5%2015.2-10%2030.3-10a97.4%2097.4%200%200%201-50.5%2020.2v10c15.2%200%2025.3%200%2037.9-2.5l32.8-10c7.5%200%2015.1%207.5%2012.6%2015-7.6%2027.7-37.8%2022.7-48%2045.4l40.4-15.1c10.1-5%2020.2-10.1%2032.8-7.6%2015.1%205%2015.1%2015.1%2035.3%2020.1l-5-12.5c5%202.5%2010%202.5%2015.1%205%2012.6%205%2015.1%2010%2030.3%207.5-12.6-15-15.2-12.5-25.2-22.6-10.1-15.1-15.2-37.8%200-40.3l17.6%205c17.7%202.6%2017.7-2.5%2042.9%207.6%2015.1%205%2020.2%2012.6%2037.8%207.5-7.5-17.6-35.3-30.2-53-35.2%2020.2-12.6%2015.2%205%2043-2.5v-5c-20.2-15.2-27.8-27.8-55.6-27.8l43-5v-5S447%20235.7%20446%20235.3a6.3%206.3%200%200%201%204.1-4.4c8%205.2%2032.3%204.6%2033.7%204.5-.7-6.2-12.2-11.3-22.3-16.3%200%200-43.2-26.7-43.4-29%20.8-6.8%2017.7%201%2035.8%206.3-5-10-15.1-15.1-25.2-17.6l15.1-2.5c-10-22.7-35.3-20.2-50.4-30.3-10.1-7.5-10.1-12.6-25.2-20.1z'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20stroke='%23fff'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='3.1'%20d='M341%20293.6c1.9-6%204.3-11.3-6.9-16.4-11.2-5.1%205.6%2020.5%207%2016.4zm13.3-12c-2.3.3-3.4%208.6%201%2010.8%205.1.8%201-10.7-1-10.8m13.1-.9c-2.3.7-2.4%2012.4%205.8%2010.3%208.3-2%200-11.2-5.8-10.2zm15.3-29.8c1.8-2.8-.1-14.5-7.2-9.6-7.1%205%205%2010.4%207.2%209.6m-15.5-9.7c2.2-.8%202.4-8-3.8-6-6.2%201.8%202.2%207.5%203.8%206m-14%202.9s-4.3-6-7.7-4.8c-4.2%204%208%204.9%207.7%204.8m-48%2019.1c1.8.2%2015.5-2.2%2020.2-7.5%204.8-5.3-24.3%202.2-24.3%202.3s2.7%204.7%204%205.2zm136.7-33.8c.7-1.3-7.3-7-12-4.7-1.2%204.2%2012%205.5%2012%204.7M415%20215.8c1.5-2.1-3.5-11-13.3-6s10.3%209.5%2013.3%206m-31.1-5.2s2.4-8%208.4-6.4c6.6%205.1-8.1%206.7-8.4%206.4m-5.8-6c-1-2.2-7.1-.9-14.2%203.8-7.1%204.6%2016.3%201.3%2014.2-3.8m18-21.4s6.4-2.9%208.3%200c2.6%204.2-8.3%200-8.2%200zm-5.2-2.8c-1.3-2.5-8.3-2.8-8.1%201-1.2%202.8%209%202.3%208-1zm-16.7%200c-.7-1.5-10.6%200-13.6%206%204.8%202.3%2015.8-2.2%2013.6-6m-21.3%206.1s-13%208-13.9%2013.9c.4%205%2016.3-9.2%2016.3-9.2s1.4-5.6-2.4-4.7m-14.5-7.3c.4-1.6%206.5-5.4%207-5%20.5%201.6-5%206-7%205m4.2%2030.6c.3-2.3-15.6-2.1-9.6%205.1%205%206.1%2010.7-4%209.6-5zM328%20220.3c-.8-1.6-2-5.9-4.2-6.3-1.7%200-11.3%202-12%203.5-.4%201.3%204%209.2%205.4%209.4%201.7.6%2010.5-5.8%2010.8-6.6m85.6%2053.4c.5-1.7%2016.7-7.3%2022.3-2%206.6%209-22.7%204.8-22.3%202m44.6%2010.6c3.5-6-11-13.2-17-6.3%202%208.2%2014.1%2011.2%2017%206.3'/%3e%3c/g%3e%3c/svg%3e")}.fi-lc{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-lc'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%2365cfff'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23fff'%20d='m318.9%2042%20162.7%20395.3-322.6.9z'/%3e%3cpath%20fill='%23000001'%20d='m319%2096.5%20140.8%20340-279%20.8z'/%3e%3cpath%20fill='%23ffce00'%20d='m318.9%20240.1%20162.7%20197.6-322.6.5z'/%3e%3c/g%3e%3c/svg%3e")}.fi-lc.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-lc'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%2365cfff'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fff'%20d='m254.8%2044.8%20173.5%20421.6-344%201L254.7%2044.8z'/%3e%3cpath%20fill='%23000001'%20d='m255%20103%20150%20362.6-297.5.8z'/%3e%3cpath%20fill='%23ffce00'%20d='m254.8%20256.1%20173.5%20210.8-344%20.5z'/%3e%3c/g%3e%3c/svg%3e")}.fi-li{background-image:url(/assets/li-DgeenFRc.svg)}.fi-li.fis{background-image:url(/assets/li-y6TPS81M.svg)}.fi-lk{background-image:url(/assets/lk-B2IfFxoh.svg)}.fi-lk.fis{background-image:url(/assets/lk-DIvkWByA.svg)}.fi-lr{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-lr'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='lr-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h682.7v512H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23lr-a)'%20transform='scale(.9375)'%3e%3cpath%20fill='%23fff'%20d='M0%200h767.9v512H0z'/%3e%3cpath%20fill='%23006'%20d='M0%200h232.7v232.8H0z'/%3e%3cpath%20fill='%23c00'%20d='M0%20464.9h767.9V512H0z'/%3e%3cpath%20fill='%23c00'%20d='M0%20465.4h767.9V512H0zm0-92.9h767.9v46.2H0zm0-93.2h766V326H0zM232.7%200h535.1v46.5H232.7zm0%20186h535.1v46.8H232.7zm0-92.7h535.1v46.5H232.7z'/%3e%3cpath%20fill='%23fff'%20d='m166.3%20177.5-50.7-31-50.4%2031.3%2018.7-50.9-50.3-31.4%2062.3-.4%2019.3-50.7L135%2095h62.3l-50.1%2031.7z'/%3e%3c/g%3e%3c/svg%3e")}.fi-lr.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-lr'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='lr-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h512v512H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23lr-a)'%3e%3cpath%20fill='%23fff'%20d='M0%200h767.9v512H0z'/%3e%3cpath%20fill='%23006'%20d='M0%200h232.7v232.8H0z'/%3e%3cpath%20fill='%23c00'%20d='M0%20464.9h767.9V512H0z'/%3e%3cpath%20fill='%23c00'%20d='M0%20465.4h767.9V512H0zm0-92.9h767.9v46.2H0zm0-93.2h766V326H0zM232.7%200h535.1v46.5H232.7zm0%20186h535.1v46.8H232.7zm0-92.7h535.1v46.5H232.7z'/%3e%3cpath%20fill='%23fff'%20d='m166.3%20177.5-50.7-31-50.4%2031.3%2018.7-50.9-50.3-31.4%2062.3-.4%2019.3-50.7L135%2095h62.3l-50.1%2031.7z'/%3e%3c/g%3e%3c/svg%3e")}.fi-ls{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ls'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23009543'%20d='M0%20336h640v144H0z'/%3e%3cpath%20fill='%2300209f'%20d='M0%200h640v144H0z'/%3e%3cpath%20stroke='%23000'%20stroke-width='1.6'%20d='M319.6%20153c-2.7%200-5.4%203-5.4%203l.3%2032.4-10.3%2010.7h8.3v18.5l-49%2066-7.2-2.6-12.7%2027s31.3%2019.6%2076.7%2019c49.8-.5%2076.9-19.9%2076.9-19.9l-13-26.6-6.5%202.8-49.6-65.6v-19.1h8.2L325.1%20188v-32.2s-2.7-3-5.5-2.9z'/%3e%3cpath%20fill='none'%20stroke='%23000'%20stroke-width='8'%20d='M336.7%20230.4h-33.9s-12.2-25.9-10.3-44c2-18.4%2012.6-27.1%2026.6-27.3%2016.6-.1%2025.2%208.1%2027.8%2026.6%202.6%2018.3-10.2%2044.7-10.2%2044.7z'/%3e%3cpath%20fill='%23fff'%20d='M260.5%20292.1c-.6.7-4.7%208.9-4.7%208.9l7-1.5zm4%2010.5-7.4%202.4%208.9%203.5zm3.3-10.3%203.7%2010.9%209-2.6-2.3-5.2zm5.8%2014.8%201.2%204.4%2012%203-4.8-10.2zm13.2-9.3%204.3%2010.2%209-3.5-3-4.5zm6%2013.9%201.4%203.8%2014%202-5.9-9.2-9.6%203.4zm13.4-11%205.2%209.1%2013-4.8-1.4-3.5-16.8-.7zm7.6%2012.4%202.7%204.8%2016.2-.5-6-9-13%204.7zm17.1-12%204.4%207.6%2010.4-5-2.8-4zm17%205.8-10.3%205.1%202.7%204.5%2013.8-2.2zm3.3-8%205.3%206.7%208.7-6.9-3-3zm15.9%203.5-8.3%206.3%202.2%203.9%2011.4-3zm11.4-13%202%202.9-5.7%208.5-5.9-7.6zm3.9%207.3%203.5%207-7%202.4-.6-3.3%204-6z'/%3e%3c/svg%3e")}.fi-ls.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ls'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23fff'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23009543'%20d='M0%20358.4h512V512H0z'/%3e%3cpath%20fill='%2300209f'%20d='M0%200h512v153.6H0z'/%3e%3cpath%20stroke='%23000'%20stroke-width='1.7'%20d='M257.6%20163.1c-3%200-5.8%203.3-5.8%203.3l.3%2034.5-11%2011.5h9l-.2%2019.7-52.2%2070.4-7.7-2.7-13.5%2028.8s33.4%2020.9%2081.8%2020.3c53.2-.7%2082-21.3%2082-21.3l-13.9-28.4-6.8%203-53-70v-20.4h8.8l-12-11.3.1-34.4s-3-3-5.9-3z'/%3e%3cpath%20fill='none'%20stroke='%23000'%20stroke-width='8.5'%20d='M275.8%20245.8h-36.1s-13.1-27.6-11-47c2.2-19.6%2013.4-28.9%2028.4-29%2017.6-.3%2026.8%208.6%2029.6%2028.3%202.8%2019.5-10.9%2047.7-10.9%2047.7z'/%3e%3cpath%20fill='%23fff'%20d='M194.5%20311.6c-.6.8-5%209.4-5%209.4l7.5-1.6zm4.3%2011.2-7.9%202.6%209.5%203.7zm3.6-11%203.9%2011.6%209.6-2.8-2.5-5.5zm6%2015.7%201.4%204.7%2012.8%203.2-5-10.8-9.1%203zm14.2-9.8%204.5%2010.8%209.7-3.7-3.2-4.8zm6.3%2014.7%201.6%204.2%2015%202.1-6.4-9.8zm14.4-11.6%205.5%209.7%2014-5.1-1.6-3.8-18-.8zm8%2013.2%203%205.1%2017.3-.6-6.5-9.6zm18.3-12.8%204.8%208%2011-5.2-3-4.3zm18.1%206.1-11%205.5%203%204.8%2014.7-2.4zm3.6-8.4%205.7%207%209.2-7.2-3.1-3.4zm16.9%203.7-8.9%206.7%202.4%204.1%2012.2-3.1zm12.2-14%202.2%203.2-6.1%209-6.3-8zm4.1%207.9%203.8%207.5-7.5%202.5-.6-3.5z'/%3e%3c/svg%3e")}.fi-lt{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-lt'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%20transform='scale(.64143%20.96773)'%3e%3crect%20width='1063'%20height='708.7'%20fill='%23006a44'%20rx='0'%20ry='0'%20transform='scale(.93865%20.69686)'/%3e%3crect%20width='1063'%20height='236.2'%20y='475.6'%20fill='%23c1272d'%20rx='0'%20ry='0'%20transform='scale(.93865%20.69686)'/%3e%3cpath%20fill='%23fdb913'%20d='M0%200h997.8v164.6H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-lt.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-lt'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%20transform='scale(.51314%201.0322)'%3e%3crect%20width='1063'%20height='708.7'%20fill='%23006a44'%20rx='0'%20ry='0'%20transform='scale(.93865%20.69686)'/%3e%3crect%20width='1063'%20height='236.2'%20y='475.6'%20fill='%23c1272d'%20rx='0'%20ry='0'%20transform='scale(.93865%20.69686)'/%3e%3cpath%20fill='%23fdb913'%20d='M0%200h997.8v164.6H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-lu{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-lu'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%2300a1de'%20d='M0%20240h640v240H0z'/%3e%3cpath%20fill='%23ed2939'%20d='M0%200h640v240H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20160h640v160H0z'/%3e%3c/svg%3e")}.fi-lu.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-lu'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%2300a1de'%20d='M0%20256h512v256H0z'/%3e%3cpath%20fill='%23ed2939'%20d='M0%200h512v256H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20170.7h512v170.6H0z'/%3e%3c/svg%3e")}.fi-lv{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-lv'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23981e32'%20d='M0%200h640v192H0zm0%20288h640v192H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-lv.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-lv'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%23fff'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23981e32'%20d='M0%200h512v204.8H0zm0%20307.2h512V512H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-ly{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ly'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='ly-a'%3e%3cpath%20d='M166.7-20h666.6v500H166.7z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23ly-a)'%20transform='matrix(.96%200%200%20.96%20-160%2019.2)'%3e%3cpath%20fill='%23239e46'%20d='M0-20h1000v500H0z'/%3e%3cpath%20fill='%23000001'%20d='M0-20h1000v375H0z'/%3e%3cpath%20fill='%23e70013'%20d='M0-20h1000v125H0z'/%3e%3cpath%20fill='%23fff'%20d='M544.2%20185.8a54.3%2054.3%200%201%200%200%2088.4%2062.5%2062.5%200%201%201%200-88.4M530.4%20230l84.1-27.3-52%2071.5v-88.4l52%2071.5z'/%3e%3c/g%3e%3c/svg%3e")}.fi-ly.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ly'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='ly-a'%3e%3cpath%20d='M250%2012h500v500H250z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23ly-a)'%20transform='translate(-256%20-12.3)scale(1.024)'%3e%3cpath%20fill='%23239e46'%20d='M0%2012h1000v500H0z'/%3e%3cpath%20fill='%23000001'%20d='M0%2012h1000v375H0z'/%3e%3cpath%20fill='%23e70013'%20d='M0%2012h1000v125H0z'/%3e%3cpath%20fill='%23fff'%20d='M544.2%20217.8a54.3%2054.3%200%201%200%200%2088.4%2062.5%2062.5%200%201%201%200-88.4M530.4%20262l84.1-27.3-52%2071.5v-88.4l52%2071.5z'/%3e%3c/g%3e%3c/svg%3e")}.fi-ma{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ma'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23c1272d'%20d='M640%200H0v480h640z'/%3e%3cpath%20fill='none'%20stroke='%23006233'%20stroke-width='11.7'%20d='M320%20179.4%20284.4%20289l93.2-67.6H262.4l93.2%2067.6z'/%3e%3c/svg%3e")}.fi-ma.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ma'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23c1272d'%20d='M512%200H0v512h512z'/%3e%3cpath%20fill='none'%20stroke='%23006233'%20stroke-width='12.5'%20d='m256%20191.4-38%20116.8%2099.4-72.2H194.6l99.3%2072.2z'/%3e%3c/svg%3e")}.fi-mc{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-mc'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23f31830'%20d='M0%200h640v240H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20240h640v240H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-mc.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-mc'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23f31830'%20d='M0%200h512v256H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20256h512v256H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-md{background-image:url(/assets/md-DArlF80d.svg)}.fi-md.fis{background-image:url(/assets/md-DRw6DF0o.svg)}.fi-me{background-image:url(/assets/me-B32CQdRA.svg)}.fi-me.fis{background-image:url(/assets/me-Btx9w4B_.svg)}.fi-mf{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-mf'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23000091'%20d='M0%200h213.3v480H0z'/%3e%3cpath%20fill='%23e1000f'%20d='M426.7%200H640v480H426.7z'/%3e%3c/svg%3e")}.fi-mf.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-mf'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23fff'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23000091'%20d='M0%200h170.7v512H0z'/%3e%3cpath%20fill='%23e1000f'%20d='M341.3%200H512v512H341.3z'/%3e%3c/svg%3e")}.fi-mg{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-mg'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23fc3d32'%20d='M213.3%200H640v240H213.3z'/%3e%3cpath%20fill='%23007e3a'%20d='M213.3%20240H640v240H213.3z'/%3e%3cpath%20fill='%23fff'%20d='M0%200h213.3v480H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-mg.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-mg'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23fc3d32'%20d='M170.7%200H512v256H170.7z'/%3e%3cpath%20fill='%23007e3a'%20d='M170.7%20256H512v256H170.7z'/%3e%3cpath%20fill='%23fff'%20d='M0%200h170.7v512H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-mh{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-mh'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%233b5aa3'%20d='M0%200h639.9v480H0z'/%3e%3cpath%20fill='%23e2ae57'%20d='M0%20467%20639.9%200v87L0%20480z'/%3e%3cpath%20fill='%23fff'%20d='M22.4%20480%20640%20179.2l-.1-95.5L0%20480zm153-464.8L169%20118l-27-65.6%2010.4%2069.8-41.9-56.4%2027.5%2064.3-55-42.6%2042.8%2053.6-62.1-27.6%2054.4%2041.2-67.7-9%2064%2025.4L14%20180.3l100.6%206.7-63.7%2026.2%2067-9-54.3%2040%2063-27.6-43%2054%2054.6-41.3-27%2062.9%2043.6-54.7-11.8%2068.1%2027.5-63.7%206.2%20100.7%209.7-100.4%2023.7%2064-9-69%2043.4%2054.8-28.6-64%2054.6%2044-43.4-54.9%2064.9%2027-57.4-41.9%2069.9%2011.8-67-25.7%20104.1-6.5-104-9.7%2068.5-22.8-71%209%2058.6-41-66%2026.5%2045.6-55.3-55.6%2043.4%2026.7-66.4-43.1%2056.4%209.3-70.4-25.7%2066.5-9.6-102.8z'/%3e%3c/g%3e%3c/svg%3e")}.fi-mh.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-mh'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%233b5aa3'%20d='M0%200h511.9v512H0z'/%3e%3cpath%20fill='%23fff'%20d='m139%201.2-5.3%2088-23.2-56.1%209%2059.7-35.9-48.2%2023.5%2055-47-36.5L96.7%20109%2043.5%2085.4l46.6%2035.3-58-7.7L87%20134.7l-86%207.9%2086%205.7-54.5%2022.4L90%20163l-46.4%2034.2%2053.8-23.6-36.7%2046.2%2046.7-35.4-23.4%2054%2037.4-46.8-10%2058.3%2023.4-54.5%205.4%2086.1%208.2-85.9%2020.3%2054.9-7.7-59.1%2037.2%2046.8-24.5-54.7%2046.7%2037.6-37-47%2055.4%2023.1-49.1-35.8%2059.8%2010-57.3-22%2089-5.5-89-8.3L251%20116l-60.7%207.6%2050.2-35-56.6%2022.7%2039-47.3-47.5%2037.1%2023-56.8-37%2048.3%208-60.3-22%2056.9-8.2-88z'/%3e%3cpath%20fill='%23e2ae57'%20d='M0%20498.2%20512%200v92.7L0%20512z'/%3e%3cpath%20fill='%23fff'%20d='m18%20512%20494-320.8-.1-101.9L-.1%20512h18z'/%3e%3c/g%3e%3c/svg%3e")}.fi-mk{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-mk'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23d20000'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23ffe600'%20d='M0%200h96l224%20231.4L544%200h96L0%20480h96l224-231.4L544%20480h96zm640%20192v96L0%20192v96zM280%200l40%20205.7L360%200zm0%20480%2040-205.7L360%20480z'/%3e%3ccircle%20cx='320'%20cy='240'%20r='77.1'%20fill='%23ffe600'%20stroke='%23d20000'%20stroke-width='17.1'/%3e%3c/svg%3e")}.fi-mk.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-mk'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23d20000'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23ffe600'%20d='M0%200h86.8L256%20246.9%20425.2%200H512L0%20512h86.8L256%20265.1%20425.2%20512H512zm512%20204.8v102.4L0%20204.8v102.4zM204.8%200%20256%20219.4%20307.2%200zm0%20512L256%20292.6%20307.2%20512z'/%3e%3ccircle%20cx='256'%20cy='256'%20r='82.3'%20fill='%23ffe600'%20stroke='%23d20000'%20stroke-width='18.3'/%3e%3c/svg%3e")}.fi-ml{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ml'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='red'%20d='M425.8%200H640v480H425.7z'/%3e%3cpath%20fill='%23009a00'%20d='M0%200h212.9v480H0z'/%3e%3cpath%20fill='%23ff0'%20d='M212.9%200h214v480h-214z'/%3e%3c/g%3e%3c/svg%3e")}.fi-ml.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ml'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='red'%20d='M340.6%200H512v512H340.6z'/%3e%3cpath%20fill='%23009a00'%20d='M0%200h170.3v512H0z'/%3e%3cpath%20fill='%23ff0'%20d='M170.3%200h171.2v512H170.3z'/%3e%3c/g%3e%3c/svg%3e")}.fi-mm{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-mm'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23fecb00'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%2334b233'%20d='M0%20160h640v320H0z'/%3e%3cpath%20fill='%23ea2839'%20d='M0%20320h640v160H0z'/%3e%3cg%20transform='translate(320%20256.9)scale(176.87999)'%3e%3cpath%20id='mm-a'%20fill='%23fff'%20d='m0-1%20.3%201h-.6z'/%3e%3cuse%20xlink:href='%23mm-a'%20width='100%25'%20height='100%25'%20transform='rotate(-144)'/%3e%3cuse%20xlink:href='%23mm-a'%20width='100%25'%20height='100%25'%20transform='rotate(-72)'/%3e%3cuse%20xlink:href='%23mm-a'%20width='100%25'%20height='100%25'%20transform='rotate(72)'/%3e%3cuse%20xlink:href='%23mm-a'%20width='100%25'%20height='100%25'%20transform='rotate(144)'/%3e%3c/g%3e%3c/svg%3e")}.fi-mm.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-mm'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23fecb00'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%2334b233'%20d='M0%20170.7h512V512H0z'/%3e%3cpath%20fill='%23ea2839'%20d='M0%20341.3h512V512H0z'/%3e%3cpath%20id='mm-a'%20fill='%23fff'%20stroke-width='188.7'%20d='M312.6%20274H199.4L256%2085.3Z'/%3e%3cuse%20xlink:href='%23mm-a'%20width='100%25'%20height='100%25'%20transform='rotate(-144%20256%20274)'/%3e%3cuse%20xlink:href='%23mm-a'%20width='100%25'%20height='100%25'%20transform='rotate(-72%20256%20274)'/%3e%3cuse%20xlink:href='%23mm-a'%20width='100%25'%20height='100%25'%20transform='rotate(72%20256%20274)'/%3e%3cuse%20xlink:href='%23mm-a'%20width='100%25'%20height='100%25'%20transform='rotate(144%20256%20274)'/%3e%3c/svg%3e")}.fi-mn{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='%23ffd900'%20id='flag-icons-mn'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23da2032'%20d='M0%200h640v480H0Z'/%3e%3cpath%20fill='%230066b3'%20d='M213.3%200h213.4v480H213.3Z'/%3e%3ccircle%20cx='106.7'%20cy='181.8'%20r='40'/%3e%3ccircle%20cx='106.7'%20cy='163.6'%20r='43.6'%20fill='%23da2032'/%3e%3ccircle%20cx='106.7'%20cy='170.9'%20r='29.1'/%3e%3cpath%20d='M109.7%2076.4a8.7%208.7%200%200%200-5.2%207.5c-.2%202.5.9%205.3%201%207.7%200%204.2-4.3%205.6-4.3%2011.5%200%202%201.9%204.3%201.9%209.6-.4%202.8-2%203.5-3.7%203.7a3.6%203.6%200%200%201-3.6-3.7%203.6%203.6%200%200%201%201-2.5%203.6%203.6%200%200%201%20.4-.3c.8-.9%202-1.2%202-3.4%200-1.1-.8-2.2-1.5-4.2s-.2-5.2%201.4-7.1c-2.6%201-4.1%203.4-5%205.6-.8%202.7%200%204.2-1.2%206.5-.7%201.4-1.5%202-2.3%203.2-1%201.4-2%204.4-2%205.9a18.2%2018.2%200%200%200%2036.3%200c0-1.5-1.1-4.5-2-5.9-.9-1.2-1.7-1.8-2.4-3.2-1.2-2.3-.4-3.8-1.3-6.5-.8-2.2-2.3-4.6-4.9-5.6%201.6%202%202%205.2%201.4%207.1-.7%202-1.4%203-1.4%204.2%200%202.2%201.1%202.5%202%203.4a3.6%203.6%200%200%201%20.3.3%203.6%203.6%200%200%201%201%202.5%203.6%203.6%200%200%201-3.6%203.7c-2-.3-3.5-1.2-3.7-3.7%200-7%203-7.4%203-12.6%200-7.4-6.6-10.9-6.6-16.3%200-1.8.4-5%203-7.4M26.7%20229H63v174.5H26.7Zm123.6%200h36.4v174.5h-36.4zm-80%200H143l-36.3%2021.8Zm0%2029H143v14.6H70.3Zm0%20101.9H143v14.6H70.3Zm0%2021.8H143l-36.3%2021.8Z'/%3e%3ccircle%20cx='106.7'%20cy='316.4'%20r='36.4'/%3e%3cg%20fill='%23da2032'%20transform='translate(-38.8%2032.7)scale(.72727)'%3e%3ccircle%20cx='200'%20cy='363.5'%20r='10'/%3e%3ccircle%20cx='200'%20cy='416.5'%20r='10'/%3e%3cpath%20d='M200%20334a29.5%2029.5%200%200%201%200%2059%2023.5%2023.5%200%200%200%200%2047v6a29.5%2029.5%200%200%201%200-59%2023.5%2023.5%200%200%200%200-47z'/%3e%3c/g%3e%3c/svg%3e")}.fi-mn.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='%23ffd900'%20id='flag-icons-mn'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23da2032'%20d='M0%200h512v512H0Z'/%3e%3cpath%20fill='%230066b3'%20d='M170.7%200h170.6v512H170.7Z'/%3e%3ccircle%20cx='85.3'%20cy='196.6'%20r='35'/%3e%3ccircle%20cx='85.3'%20cy='180.7'%20r='38.2'%20fill='%23da2032'/%3e%3ccircle%20cx='85.3'%20cy='187'%20r='25.5'/%3e%3cpath%20d='M88%20104.3a7.6%207.6%200%200%200-4.6%206.6c-.2%202.2.8%204.6.9%206.7%200%203.7-3.8%204.9-3.8%2010.1%200%201.8%201.7%203.8%201.7%208.4-.3%202.5-1.7%203-3.2%203.2a3.2%203.2%200%200%201-3.2-3.2%203.2%203.2%200%200%201%20.9-2.2%203.2%203.2%200%200%201%20.3-.3c.7-.7%201.7-1%201.7-3%200-1-.6-1.8-1.2-3.6a7.3%207.3%200%200%201%201.2-6.2c-2.2.8-3.6%203-4.3%204.9-.7%202.3-.1%203.7-1.1%205.7-.6%201.2-1.4%201.7-2%202.8-.9%201.2-1.8%203.8-1.8%205.1a16%2016%200%200%200%2031.8%200c0-1.3-1-4-1.8-5.1-.7-1-1.5-1.6-2-2.8-1-2-.4-3.4-1.2-5.7-.7-2-2-4-4.3-5a7.3%207.3%200%200%201%201.3%206.3c-.7%201.8-1.3%202.7-1.3%203.7%200%201.9%201%202.2%201.7%203a3.2%203.2%200%200%201%20.3.2%203.2%203.2%200%200%201%201%202.2%203.2%203.2%200%200%201-3.3%203.2c-1.7-.2-3-1-3.2-3.2%200-6.1%202.7-6.5%202.7-11%200-6.5-5.8-9.6-5.8-14.3%200-1.6.3-4.3%202.6-6.5M15.3%20237.9h31.9v152.8H15.3Zm108.2%200h31.8v152.8h-31.8zm-70%200h63.7L85.3%20257Zm0%2025.5h63.7V276H53.5Zm0%2089h63.7v12.8H53.5Zm0%2019.2h63.7l-31.9%2019Z'/%3e%3ccircle%20cx='85.3'%20cy='314.3'%20r='31.8'/%3e%3cg%20fill='%23da2032'%20transform='translate(-42%2066.1)scale(.63636)'%3e%3ccircle%20cx='200'%20cy='363.5'%20r='10'/%3e%3ccircle%20cx='200'%20cy='416.5'%20r='10'/%3e%3cpath%20d='M200%20334a29.5%2029.5%200%200%201%200%2059%2023.5%2023.5%200%200%200%200%2047v6a29.5%2029.5%200%200%201%200-59%2023.5%2023.5%200%200%200%200-47z'/%3e%3c/g%3e%3c/svg%3e")}.fi-mo{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-mo'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%2300785e'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23fbd116'%20d='m295%20108.7%2040.5%2029.5L320%2090.5l-15.5%2047.7%2040.6-29.5z'/%3e%3cg%20id='mo-a'%3e%3cpath%20fill='%23fff'%20d='M320%20331.6H217.5a146.3%20146.3%200%200%201-3.8-4H320a2.1%202.1%200%200%201%201.4%202c0%20.8-.5%201.7-1.4%202m0-31.3a13%2013%200%200%200%201.2-7.6%2012.4%2012.4%200%200%200-1.2-3.8%2082%2082%200%200%201-32.5%2019%2081%2081%200%200%201-23.5%203.5h-63.1a144.4%20144.4%200%200%200%205.8%208h61c20%200%2038.2-7.2%2052.3-19.1m-109.6-24.7a32.3%2032.3%200%200%201-9.7%202%2081%2081%200%200%200%2060.8%2027.5%2080.9%2080.9%200%200%200%2058.5-25%20441%20441%200%200%200%204.5-58.8%20441%20441%200%200%200-4.5-67.7c-6.6%206-19%2018.7-24.8%2038.3A81%2081%200%200%200%20292%20215a80.7%2080.7%200%200%200%2013.7%2045%2080.7%2080.7%200%200%201-17-49.5c0-12.4%202.8-24.2%207.8-34.7a32.5%2032.5%200%200%201-7.5-13%2080.7%2080.7%200%200%200-10.5%2040c0%2018%205.9%2034.7%2015.9%2048.1a95%2095%200%200%200-73.4-29.4%2032.6%2032.6%200%200%201%206.8%208.9%2095%2095%200%200%201%2068.6%2029.4%2095%2095%200%200%200-61-22.2%2095%2095%200%200%200-36.7%207.3%2081.2%2081.2%200%200%200%2082.6%2052.2c-4.7.8-9.5%201.3-14.4%201.3a80.8%2080.8%200%200%201-56.4-22.8zM320%20364.4h-53.1a143.5%20143.5%200%200%200%2053.1%2010.1%2011%2011%200%200%200%201.3-5%2011%2011%200%200%200-1.3-5.1m0-24.5h-93.6a143.8%20143.8%200%200%200%207.8%206.2H320a4.6%204.6%200%200%200%201.3-3.1%204%204%200%200%200-1.3-3.1m0%2012.5h-76.7a143.6%20143.6%200%200%200%2014.4%208H320a7.6%207.6%200%200%200%201.2-4.2%207.5%207.5%200%200%200-1.2-3.8'/%3e%3cpath%20fill='%23fbd116'%20d='m200.5%20174.8%2025.4%2023.6-6.7-34-14.6%2031.4%2030.3-16.8zm36.9-32%2034.7.6-27.7-21%2010.1%2033.3%2011.3-32.9z'/%3e%3c/g%3e%3cuse%20xlink:href='%23mo-a'%20width='100%25'%20height='100%25'%20transform='matrix(-1%200%200%201%20640%200)'/%3e%3c/svg%3e")}.fi-mo.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-mo'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%2300785e'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fbd116'%20d='M272.5%20147.4%20256%2096.5l-16.5%2051%2043.3-31.5h-53.6z'/%3e%3cg%20id='mo-a'%3e%3cpath%20fill='%23fff'%20d='M256%20353.7H146.7a156%20156%200%200%201-4-4.2H256a2.3%202.3%200%200%201%201.5%202c0%201-.6%201.9-1.5%202.2m0-33.4c.6-1.3%201.9-4.3%201.3-8a13.2%2013.2%200%200%200-1.3-4.1%2087.4%2087.4%200%200%201-34.7%2020.2%2086.4%2086.4%200%200%201-25%203.7h-67.4a154%20154%200%200%200%206.3%208.6h65a86.2%2086.2%200%200%200%2055.8-20.4M139.1%20294a34.4%2034.4%200%200%201-10.3%202.2%2086.3%2086.3%200%200%200%2064.8%2029.3%2086.3%2086.3%200%200%200%2062.4-26.6%20470.3%20470.3%200%200%200%204.8-62.9%20470.3%20470.3%200%200%200-4.8-72.2c-7%206.3-20.2%2020-26.4%2040.9a86.5%2086.5%200%200%200-3.6%2024.6%2086.1%2086.1%200%200%200%2014.6%2048.1%2086.1%2086.1%200%200%201-18-52.9%2086.1%2086.1%200%200%201%208.2-37%2034.7%2034.7%200%200%201-8-13.8%2086%2086%200%200%200-11.2%2042.6%2086.1%2086.1%200%200%200%2017%2051.4%20101.4%20101.4%200%200%200-78.3-31.5%2034.8%2034.8%200%200%201%207.2%209.5%20101.4%20101.4%200%200%201%2073.3%2031.4%20101.3%20101.3%200%200%200-65.2-23.6c-13.8%200-27%202.7-39%207.8a86.6%2086.6%200%200%200%2088%2055.6%2087%2087%200%200%201-15.4%201.4%2086.2%2086.2%200%200%201-60.1-24.3M256%20388.7h-56.6a153%20153%200%200%200%2056.6%2010.8%2011.6%2011.6%200%200%200%201.3-5.3%2011.7%2011.7%200%200%200-1.3-5.5m0-26.2h-99.9a154%20154%200%200%200%208.4%206.7H256a4.9%204.9%200%200%200%201.4-3.3c0-2-1.2-3.1-1.4-3.4m0%2013.4h-81.8a153.2%20153.2%200%200%200%2015.4%208.5H256a8%208%200%200%200%201.2-4.5%208%208%200%200%200-1.2-4'/%3e%3cpath%20fill='%23fbd116'%20d='m155.6%20211.7-7-36.4-15.7%2033.6%2032.4-18-36.8-4.5zm49.3-58.8-29.6-22.3%2010.8%2035.4%2012.1-35-30.3%2021.3z'/%3e%3c/g%3e%3cuse%20xlink:href='%23mo-a'%20width='100%25'%20height='100%25'%20transform='matrix(-1%200%200%201%20512%200)'/%3e%3c/svg%3e")}.fi-mp{background-image:url(/assets/mp-xI88Vk3c.svg)}.fi-mp.fis{background-image:url(/assets/mp-DOjKDFJv.svg)}.fi-mq{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-mq'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23231f1e'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%2300a650'%20d='M0%200h640v240H0z'/%3e%3cpath%20fill='%23ef1923'%20d='m0%200%20320%20240L0%20480z'/%3e%3c/svg%3e")}.fi-mq.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-mq'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23231f1e'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%2300a650'%20d='M0%200h512v256H0z'/%3e%3cpath%20fill='%23ef1923'%20d='M256%20256%200%20512V0z'/%3e%3c/svg%3e")}.fi-mr{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-mr'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23cd2a3e'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23006233'%20d='M0%2072h640v336H0z'/%3e%3cpath%20fill='%23ffc400'%20d='M470%20154.6a150%20150%200%200%201-300%200%20154.9%20154.9%200%200%200-5%2039.2%20155%20155%200%201%200%20310%200%20154.4%20154.4%200%200%200-5-39.2'%20class='mr-st1'/%3e%3cpath%20fill='%23ffc400'%20d='m320%2093.8-13.5%2041.5H263l35.3%2025.6-13.5%2041.4%2035.3-25.6%2035.3%2025.6-13.5-41.4%2035.3-25.6h-43.6z'/%3e%3c/svg%3e")}.fi-mr.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-mr'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23cd2a3e'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23006233'%20d='M0%2076.8h512v358.4H0z'/%3e%3cpath%20fill='%23ffc400'%20d='M416%20164.9a160%20160%200%200%201-320%200%20165.2%20165.2%200%200%200-5.4%2041.8A165.4%20165.4%200%201%200%20416%20165z'%20class='mr-st1'/%3e%3cpath%20fill='%23ffc400'%20d='m256%20100-14.4%2044.3h-46.5l37.6%2027.3-14.3%2044.2%2037.6-27.3%2037.6%2027.3-14.4-44.2%2037.7-27.3h-46.5z'/%3e%3c/svg%3e")}.fi-ms{background-image:url(/assets/ms-7tNehsjt.svg)}.fi-ms.fis{background-image:url(/assets/ms-D--tLJBo.svg)}.fi-mt{background-image:url(/assets/mt-Tc-Y-wNN.svg)}.fi-mt.fis{background-image:url(/assets/mt-B9RzfhuG.svg)}.fi-mu{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-mu'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%2300a04d'%20d='M0%20360h640v120H0z'/%3e%3cpath%20fill='%23151f6d'%20d='M0%20120h640v120H0z'/%3e%3cpath%20fill='%23ee2737'%20d='M0%200h640v120H0z'/%3e%3cpath%20fill='%23ffcd00'%20d='M0%20240h640v120H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-mu.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-mu'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%23009f4d'%20d='M0%20384h512v128H0z'/%3e%3cpath%20fill='%23151f6d'%20d='M0%20128h512v128H0z'/%3e%3cpath%20fill='%23ee2737'%20d='M0%200h512v128H0z'/%3e%3cpath%20fill='%23ffcd00'%20d='M0%20256h512v128H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-mv{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-mv'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23d21034'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23007e3a'%20d='M120%20120h400v240H120z'/%3e%3ccircle%20cx='350'%20cy='240'%20r='80'%20fill='%23fff'/%3e%3ccircle%20cx='380'%20cy='240'%20r='80'%20fill='%23007e3a'/%3e%3c/svg%3e")}.fi-mv.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-mv'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23d21034'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23007e3a'%20d='M128%20128h256v256H128z'/%3e%3ccircle%20cx='288'%20cy='256'%20r='85.3'%20fill='%23fff'/%3e%3cellipse%20cx='308.6'%20cy='256'%20fill='%23007e3a'%20rx='73.9'%20ry='85.3'/%3e%3c/svg%3e")}.fi-mw{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-mw'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23f41408'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%2321873b'%20d='M0%20320h640v160H0z'/%3e%3cpath%20fill='%23000001'%20d='M0%200h640v160H0z'/%3e%3cpath%20fill='%23f31509'%20d='M220.5%20141c22.3-49.2%2084.5-72.8%20138.8-52.5a98.4%2098.4%200%200%201%2058%2052.5zm-26%206.4a332.3%20332.3%200%200%201-52.4-7.8c-4.1-1.3-4.3-3.6-3.8-5.3.5-1.7%203.1-3.6%206.2-3%205.6%201.4%2028.8%207%2050%2016.1m124.6-85.9c-4.2-21-5.2-44-4.8-48C314.7%209.6%20317%209%20319%209s4.7%201.8%204.7%204.7c0%205.3-.1%2027-4.6%2048zm11.6.5a249%20249%200%200%201-.3-48.2c.8-3.9%203.2-4.4%205.1-4.2%202%20.1%204.5%202.1%204.2%205-.5%205.3-2.6%2026.9-9%2047.4m10.4%201.3c-.2-21.3%203-44.3%204.1-48%201.1-3.9%203.6-4.2%205.5-3.9%202%20.3%204.3%202.5%203.8%205.3-1%205.3-5.2%2026.6-13.4%2046.6m11%202.2c1.8-21.2%207.3-43.8%208.8-47.5%201.5-3.7%204-3.8%205.8-3.4%202%20.5%204%202.8%203.3%205.6-1.6%205.1-7.7%2026-17.8%2045.3zm10.9%203.2c3.9-21%2011.5-43.1%2013.3-46.7%201.9-3.5%204.3-3.5%206.2-2.9%201.8.6%203.7%203.2%202.7%205.8A264%20264%200%200%201%20363%2068.7m10.1%203.8c5.8-20.7%2015.5-42%2017.7-45.5%202.2-3.4%204.6-3.1%206.4-2.3%201.8.7%203.4%203.4%202.1%206-2.5%204.8-12.5%2024.4-26.2%2041.8m10%204.7a262.9%20262.9%200%200%201%2022-43.9c2.4-3.2%204.9-2.7%206.6-1.8a4.4%204.4%200%200%201%201.5%206.1c-3%204.6-14.9%2023.4-30.1%2039.6m9.4%205.5c9.7-19.4%2023.3-39%2026.1-42%202.8-3%205.2-2.3%206.8-1.3a4.4%204.4%200%200%201%201%206.2c-3.5%204.4-17.2%2022.1-34%2037zm8.8%206.2c11.6-18.6%2027-37%2030.1-39.7%203-2.8%205.4-2%206.9-.8a4.3%204.3%200%200%201%20.3%206.2c-3.8%204.1-19.1%2020.7-37.3%2034.3m8.3%206.9a284%20284%200%200%201%2033.8-37.2c3.3-2.5%205.5-1.5%206.9-.3a4.3%204.3%200%200%201-.3%206.3c-4.1%203.8-21%2019.1-40.4%2031.2m7.6%207.5A278.4%20278.4%200%200%201%20454.4%2069c3.6-2.3%205.7-1.1%207%20.3%201.2%201.3%201.5%204.4-1%206.2a306%20306%200%200%201-43.2%2027.8m6.5%207.8A297.1%20297.1%200%200%201%20464%2079.6c3.7-2%205.7-.6%206.8.9%201.2%201.4%201.1%204.5-1.4%206.1-4.8%203-24.3%2015.6-45.7%2024.5m5.9%208.3a307%20307%200%200%201%2043-28.1c4-1.7%205.9-.2%206.9%201.3%201%201.6.6%204.6-2%206a320.8%20320.8%200%200%201-48%2020.8zm5.4%209.6a313.4%20313.4%200%200%201%2045.8-24.4c4.1-1.4%205.8.3%206.6%201.9.9%201.6.3%204.6-2.6%205.8-5.3%202.2-27%2011.4-49.8%2016.7m4.2%209.2a320%20320%200%200%201%2048-20.8c4.2-1%205.7.8%206.4%202.5.6%201.6-.3%204.6-3.2%205.5-5.5%201.9-28%209.3-51.2%2012.8m3.4%209.8a324.5%20324.5%200%200%201%2049.8-16.9c4.2-.6%205.6%201.2%206.1%203%20.5%201.7-.7%204.5-3.7%205.3-5.7%201.3-28.8%207-52.2%208.6M307.8%2062a252.4%20252.4%200%200%201-9.7-47.4c0-3.9%202.3-4.8%204.2-5%202-.1%205%201.5%205.2%204.3.5%205.3%202.6%2026.9.4%2048.1zm-11%201.3a251%20251%200%200%201-14.3-46.4c-.4-4%201.8-5%203.7-5.3%202-.3%205%201%205.6%203.8a263%20263%200%200%201%205%2047.9m-11%202.2A259%20259%200%200%201%20267%2020.3c-.8-3.9%201.3-5.1%203.2-5.6%201.9-.4%205%20.6%205.9%203.4%201.5%205.1%207.7%2026%209.6%2047.3zm-10.5%203A264%20264%200%200%201%20252.5%2025c-1.1-3.8.8-5.2%202.6-5.8%201.9-.6%205.1.2%206.2%202.8%202%205%2010.2%2025.4%2014%2046.4zM265.2%2072a270.4%20270.4%200%200%201-27-41.5c-1.4-3.7.4-5.3%202.2-6%201.8-.8%205-.2%206.4%202.4%202.5%204.8%2012.5%2024.5%2018.4%2045.1m-10.3%205a275.6%20275.6%200%200%201-31-39.2c-1.7-3.5-.1-5.2%201.6-6.1%201.7-.9%205-.6%206.6%201.9%203%204.6%2015%2023.3%2022.8%2043.4m-9.4%205.4A285.2%20285.2%200%200%201%20211%2045.7c-2.1-3.4-.7-5.2%201-6.3%201.5-1%205-1%206.7%201.4%203.4%204.3%2017.1%2022%2026.8%2041.5zm-8.7%206a292.2%20292.2%200%200%201-37.9-33.9c-2.4-3.2-1.1-5%20.4-6.2a5.5%205.5%200%200%201%206.8.8c3.8%204%2019.2%2020.7%2030.7%2039.3m-8.5%207a299%20299%200%200%201-41-30.7c-2.8-3-1.7-5-.3-6.3a5.5%205.5%200%200%201%206.9.3c4.2%203.7%2021%2019%2034.4%2036.6zm-7.4%207A306.6%20306.6%200%200%201%20177.2%2075c-3-2.8-2.1-4.8-.8-6.2%201.2-1.4%204.5-2.1%206.9-.3a292%20292%200%200%201%2037.6%2034zm-7%208.2a313%20313%200%200%201-46.2-23.8c-3.3-2.5-2.6-4.7-1.5-6.1%201.1-1.5%204.3-2.5%206.9-.9%204.8%203.1%2024.3%2015.5%2040.8%2030.8m-6.3%208.8c-22.2-7-44.9-17.6-48.4-19.9-3.6-2.2-3-4.4-2.1-6s4-2.8%206.8-1.4c5%202.7%2025.8%2013.5%2043.7%2027.3m-5.3%209c-22.8-5.3-46.3-14-50.1-16-3.7-2-3.5-4.2-2.6-5.8.8-1.6%203.7-3.1%206.6-2%205.3%202.3%2027%2011.4%2046.1%2023.8m-4.2%209a328.5%20328.5%200%200%201-51.4-12.2c-4-1.6-3.8-3.9-3.2-5.5.7-1.7%203.5-3.4%206.4-2.5%205.6%201.9%2028%209.3%2048.2%2020.2'/%3e%3cpath%20fill='%23f31509'%20d='M194.5%20147.4a332.4%20332.4%200%200%201-52.4-7.8c-4.1-1.3-4.3-3.6-3.8-5.3.5-1.7%203.1-3.6%206.2-3%205.6%201.4%2028.8%207%2050%2016.1'/%3e%3cpath%20d='M129.4%20141.5h381.2v12.6H129.4z'/%3e%3c/g%3e%3c/svg%3e")}.fi-mw.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-mw'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='mw-a'%3e%3cpath%20fill-opacity='.7'%20d='M179.7%200h708.7v708.7H179.7z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%20clip-path='url(%23mw-a)'%20transform='translate(-129.8)scale(.72249)'%3e%3cpath%20fill='%23f41408'%20d='M0%200h1063v708.7H0z'/%3e%3cpath%20fill='%2321873b'%20d='M0%20472.4h1063v236.3H0z'/%3e%3cpath%20fill='%23000001'%20d='M0%200h1063v236.2H0z'/%3e%3cpath%20fill='%23f31509'%20d='M401.4%20214a147.3%20147.3%200%200%201%20192.2-80.3%20142%20142%200%200%201%2080.2%2080.3zm-36%209.8a419.9%20419.9%200%200%201-72.5-12c-5.6-2-5.9-5.4-5.2-8a7%207%200%200%201%208.5-4.5c7.9%202%2039.9%2010.5%2069.3%2024.5zM538%2092.6c-5.8-32-7.3-67.3-6.7-73.2.5-6%203.8-7%206.5-7a7%207%200%200%201%206.5%207c0%208.2-.2%2041.3-6.3%2073.2m16%20.8a427.9%20427.9%200%200%201-.5-73.6c1.1-5.9%204.4-6.7%207.1-6.4%202.7.2%206.3%203.3%205.9%207.6-.7%208-3.7%2041-12.5%2072.4m14.4%202c-.4-32.6%204-67.6%205.7-73.4%201.5-5.8%204.9-6.3%207.6-5.8a7%207%200%200%201%205.2%208c-1.4%208-7.1%2040.6-18.5%2071.1zm15.3%203.3c2.5-32.4%2010-66.9%2012-72.5%202-5.6%205.5-5.8%208.1-5.1a7%207%200%200%201%204.5%208.4c-2.1%207.9-10.6%2039.9-24.6%2069.2m15%204.8A421.6%20421.6%200%200%201%20617%2032.3c2.6-5.4%206-5.3%208.6-4.4a7%207%200%200%201%203.7%208.9c-2.8%207.6-14.2%2038.7-30.7%2066.7zm14%205.9c8-31.6%2021.4-64.2%2024.5-69.4%203-5.2%206.4-4.8%208.8-3.6a7%207%200%200%201%203%209c-3.5%207.5-17.4%2037.5-36.3%2064m13.8%207.2a432%20432%200%200%201%2030.4-67c3.4-4.9%206.8-4.2%209.2-2.8a7%207%200%200%201%202%209.3c-4%207-20.5%2035.7-41.6%2060.5m13%208.3a419.9%20419.9%200%200%201%2036.2-64c3.8-4.6%207.1-3.6%209.3-2a7%207%200%200%201%201.3%209.4c-4.7%206.7-23.6%2033.8-46.8%2056.6m12.2%209.5c16-28.4%2037.4-56.4%2041.7-60.7%204.2-4.2%207.4-3%209.5-1.2%202%201.8%203.2%206.3.4%209.6-5.2%206.2-26.4%2031.6-51.6%2052.3m11.5%2010.5a424%20424%200%200%201%2046.7-56.8c4.6-3.8%207.7-2.3%209.6-.4a7%207%200%200%201-.4%209.6%20410%20410%200%200%201-56%2047.6zm10.4%2011.5c20.7-25.1%2046.7-49%2051.6-52.4%205-3.4%207.8-1.6%209.6.4a7%207%200%200%201-1.2%209.5%20421.5%20421.5%200%200%201-60%2042.5m9%2011.8a422%20422%200%200%201%2055.8-48c5.2-3%208-.9%209.5%201.4%201.6%202.2%201.6%206.8-2%209.3a415.9%20415.9%200%200%201-63.2%2037.3zm8.2%2012.8a421.7%20421.7%200%200%201%2059.7-43c5.4-2.5%208-.2%209.4%202.1%201.3%202.3%201%207-2.8%209.2-7%204-35.6%2020.8-66.3%2031.7m7.6%2014.6a431.5%20431.5%200%200%201%2063.4-37.3c5.6-2%208%20.5%209.1%203a7%207%200%200%201-3.6%208.8%20417.9%20417.9%200%200%201-68.9%2025.5m5.8%2014.1a413%20413%200%200%201%2066.3-31.7c5.8-1.5%208%201.2%208.9%203.7%201%202.5-.3%207-4.4%208.5a412.8%20412.8%200%200%201-70.8%2019.5m4.6%2015a421%20421%200%200%201%2069-25.8c5.8-1%207.7%201.8%208.4%204.5a7%207%200%200%201-5%208c-8%202.2-39.9%2010.7-72.4%2013.2zM522.4%2093.1A421.2%20421.2%200%200%201%20508.9%2021c0-6%203.1-7.3%205.8-7.6a7%207%200%200%201%207.1%206.5c.8%208%203.7%2041%20.6%2073.4zm-15.4%202a418.8%20418.8%200%200%201-19.7-70.8c-.5-6%202.5-7.6%205.1-8.1a7%207%200%200%201%207.7%205.8c1.4%208%207.2%2040.6%206.9%2073.1m-15.3%203.4a421.5%20421.5%200%200%201-25.9-68.9c-1-5.9%201.9-7.8%204.5-8.5a7%207%200%200%201%208%205.1c2.2%207.9%2010.8%2039.8%2013.4%2072.3m-14.4%204.5a420.4%20420.4%200%200%201-31.6-66.4c-1.5-5.8%201.2-8%203.7-8.9a7%207%200%200%201%208.5%204.4c2.8%207.7%2014.1%2038.7%2019.4%2070.9m-14%205.7A419.8%20419.8%200%200%201%20426%2045.4c-2-5.7.4-8%202.9-9.1a7%207%200%200%201%208.9%203.6c3.4%207.4%2017.3%2037.4%2025.4%2069zm-14.2%207.4a420%20420%200%200%201-42.8-59.9c-2.5-5.4-.3-8%202-9.3a7%207%200%200%201%209.2%202.8c4.1%207%2020.7%2035.7%2031.6%2066.4m-13%208.2a422%20422%200%200%201-47.8-56c-3-5.2-1-8%201.3-9.5a7.2%207.2%200%200%201%209.4%202c4.7%206.7%2023.6%2033.8%2037.1%2063.5m-12.1%209a419.3%20419.3%200%200%201-52.4-51.6c-3.4-4.9-1.6-7.8.5-9.5a7%207%200%200%201%209.5%201.2c5.2%206.2%2026.4%2031.6%2042.4%2060zM412.2%20144a421.6%20421.6%200%200%201-56.8-46.8c-3.8-4.6-2.3-7.7-.4-9.6a7%207%200%200%201%209.6.4c5.8%205.8%2029.2%2029.1%2047.6%2056M402%20154.9a421%20421%200%200%201-60.5-41.8c-4.2-4.2-2.9-7.4-1.1-9.5a7%207%200%200%201%209.5-.4c6.3%205.2%2031.5%2026.5%2052.1%2051.7m-9.7%2012.5a421.4%20421.4%200%200%201-64-36.3c-4.6-3.9-3.6-7.2-2-9.4a7%207%200%200%201%209.5-1.3%20423%20423%200%200%201%2056.5%2047m-8.7%2013.4a420.5%20420.5%200%200%201-67-30.3c-5-3.5-4.3-6.8-2.9-9.2a7%207%200%200%201%209.3-2.1c7.1%204%2035.8%2020.5%2060.6%2041.6m-7.3%2013.7c-31.5-8-64.2-21.4-69.4-24.4-5.1-3-4.8-6.4-3.6-8.8a7.1%207.1%200%200%201%209.1-3c7.4%203.4%2037.4%2017.4%2064%2036.2zm-5.8%2013.8a415%20415%200%200%201-71.2-18.6c-5.4-2.5-5.3-6-4.4-8.5%201-2.5%204.8-5.2%208.9-3.7%207.6%202.8%2038.7%2014.2%2066.7%2030.8'/%3e%3cpath%20fill='%23f31509'%20d='M365.5%20223.8c-32.5-2.5-67-9.9-72.6-12-5.6-2-5.9-5.4-5.2-8a7%207%200%200%201%208.5-4.5c7.9%202%2039.9%2010.5%2069.3%2024.5'/%3e%3cpath%20d='M275.3%20214.7H803V234H275.3z'/%3e%3c/g%3e%3c/svg%3e")}.fi-mx{background-image:url(/assets/mx-Cwlb0I_O.svg)}.fi-mx.fis{background-image:url(/assets/mx-BB6Demq1.svg)}.fi-my{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-my'%20viewBox='0%200%20640%20480'%3e%3cg%20clip-path='url(%23my-a)'%3e%3cpath%20fill='%23C00'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%200h640v34.3H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%2034.3h640v34.3H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%2068.6h640v34.3H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20102.9h640V137H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%20137.1h640v34.3H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20171.4h640v34.3H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%20205.7h640V240H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20240h640v34.3H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%20274.3h640v34.3H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20308.6h640v34.3H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%20342.9h640V377H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20377.1h640v34.3H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%20411.4h640v34.3H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20445.7h640V480H0z'/%3e%3cpath%20fill='%23006'%20d='M0%20.5h320v274.3H0z'/%3e%3cpath%20fill='%23FC0'%20d='m207.5%2073.8%206%2040.7%2023-34-12.4%2039.2%2035.5-20.8-28.1%2030%2041-3.2-38.3%2014.8%2038.3%2014.8-41-3.2%2028.1%2030-35.5-20.8%2012.3%2039.3-23-34.1-6%2040.7-5.9-40.7-23%2034%2012.4-39.2-35.5%2020.8%2028-30-41%203.2%2038.4-14.8-38.3-14.8%2041%203.2-28.1-30%2035.5%2020.8-12.4-39.3%2023%2034.1zm-33.3%201.7a71.1%2071.1%200%200%200-100%2065%2071.1%2071.1%200%200%200%20100%2065%2080%2080%200%200%201-83.2%206.2%2080%2080%200%200%201-43.4-71.2%2080%2080%200%200%201%20126.6-65'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='my-a'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e")}.fi-my.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-my'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23C00'%20d='M0%200h512v36.6H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%2036.6h512V73H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%2073.1h512v36.6H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20109.7h512v36.6H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%20146.3h512v36.6H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20182.9h512v36.5H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%20219.4h512V256H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20256h512v36.6H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%20292.6h512V329H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20329.1h512v36.6H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%20365.7h512v36.6H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20402.3h512v36.6H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%20438.9h512v36.5H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20475.4h512V512H0z'/%3e%3cpath%20fill='%23006'%20d='M0%200h256v292.6H0z'/%3e%3cpath%20fill='%23FC0'%20d='m166%2093%204.8%2032.5%2018.4-27.2-10%2031.3%2028.5-16.6-22.5%2024%2032.8-2.6-30.7%2011.9L218%20158l-32.8-2.5%2022.5%2024-28.4-16.7%209.8%2031.5-18.4-27.3-4.8%2032.5-4.7-32.5-18.4%2027.2%209.9-31.4-28.4%2016.7%2022.4-24-32.8%202.5%2030.7-11.8-30.6-11.9%2032.8%202.6-22.5-24%2028.4%2016.6-10-31.4%2018.5%2027.3%204.8-32.6Zm-26.7%201.3a56.9%2056.9%200%200%200-73%2024.9%2056.9%2056.9%200%200%200%2045.5%2083.8%2056.9%2056.9%200%200%200%2027.5-4.7%2064%2064%200%201%201%200-104'/%3e%3c/svg%3e")}.fi-mz{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-mz'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='mz-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h682.7v512H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23mz-a)'%20transform='scale(.9375)'%3e%3cpath%20fill='%23009a00'%20fill-rule='evenodd'%20d='M0%200h768v160H0z'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M0%20160h768v16H0z'/%3e%3cpath%20fill='%23000001'%20fill-rule='evenodd'%20d='M0%20176h768v160H0z'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M0%20336h768v16H0z'/%3e%3cpath%20fill='%23ffca00'%20fill-rule='evenodd'%20d='M0%20352h768v160H0z'/%3e%3cpath%20fill='red'%20fill-rule='evenodd'%20d='M0%200v512l336-256z'/%3e%3cpath%20fill='%23ffca00'%20fill-rule='evenodd'%20d='m198.5%20333-51.2-37.5L96.1%20333l19.9-60.3-51.5-37.1%2063.5.2%2019.3-60.4%2019.4%2060.5%2063.5-.3-51.5%2037.1z'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20stroke='%23000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.1'%20d='M102.8%20290.9h37c3%203.3%209.5%204.7%2015.8%200%2011.6-6.4%2034%200%2034%200l4.4-4.7-10.7-35.2-3.9-4.2s-8.3-5-24-3.3c-15.7%201.7-21.2-.5-21.2-.5s-13.7%201.6-17.6%203.6l-4.4%204.4z'/%3e%3cpath%20fill='none'%20stroke='%23000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.1'%20d='M110.3%20281.8s35.2-4.4%2045.4%209.1c-5.7%204-10.8%204.3-16.2.3.8-1.5%2012.6-13.8%2042.7-9.7'/%3e%3cpath%20fill='none'%20stroke='%23000'%20stroke-width='1.2'%20d='m148%20246.6-.3%2038.8m31.7-38.3L186%20278'/%3e%3cpath%20fill='none'%20stroke='%23000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.1'%20d='m117%20246.6-3.7%2016'/%3e%3cpath%20fill-rule='evenodd'%20stroke='%23000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.1'%20d='m78.9%20295.1%208.6%2010.2c1%20.6%202%20.6%202.9%200l12.8-15.4%205.4-6.7c.9-1%201.1-2.1%201-3l10.4-9.3%202.2.2c-1-.2-1.7-.7-1-1.8l2.4-1.8%201.8%202.3s-2.6%203.4-2.9%203.4h-2.8l-5.4%204.9%202.4%202%203.5%209.8%204.4-3.1-2.8-10%206.1-6.7-2.3-3.6%201.6-2s21.3%2013.4%2029.6%209.8c.2%200%20.5-9.6.5-9.6s-22.2-2.3-22.7-6.7%205-5%205-5l-2.4-3.2.5-1.8%203.9%204.8%208.7-7.4%2051.5%2058.6c2.8-1.1%203.4-1.8%203.6-4.6L155%20241.5l3.8-4.1c.8-.9%201-1.2%201-2.6l6-5.1a7.3%207.3%200%200%201%203.8%203L186%20219c.4.4%201.7.8%202.6.4l26.9-25.9-29.3%2020.7-1-.7c0-.9%201-1%200-2.6-1.2-1.4-2.9%201.3-3.1%201.3-.3%200-4.3-1.4-5.2-3.2l-.2%204.7-7.5%207-5.7-.3-8.2%208-1%203%201.3%202.7s-4.4%203.8-4.4%203.6c0-.3-.9-1.2-1-1.3l3.8-3.4.5-2.3-1.2-2c-.4.3-5.2%205.4-5.5%204.8l-14-15.5.8-2.9-8.7-9.5c-3.2-1.1-8.3-1.3-9.3%205.7-.8%201.6-7.4.2-7.4.2l-3.6.8L85.2%20241l11.3%2013.6%2023.2-29.3.7-8.3%204.8%205.4c1.7.2%203.2.3%204.7-.5l13.7%2015.3-2.3%202.3%202%202.2%202.4-1.6.9%201.3c-1.1.6-2%201.5-3.1%202.1-1.8-1.2-3.6-2.7-3.5-5l-7.7%206.4-.3%201.2-22.9%2019-2%20.3-.5%206%2014.9-12.4v-1.8l1.5%201.3%2011.6-9.3s.8%201%20.5%201-10.3%209.3-10.3%209.3l-.2%201-1.8%201.6-1-.8-14%2012.4h-2l-7.7%207.7c-2%20.2-3.7.4-5.4%201.5z'/%3e%3c/g%3e%3c/svg%3e")}.fi-mz.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-mz'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='mz-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h496v496H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23mz-a)'%20transform='scale(1.0321)'%3e%3cpath%20fill='%23009a00'%20fill-rule='evenodd'%20d='M0%200h744v155H0z'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M0%20155h744v15.5H0z'/%3e%3cpath%20fill='%23000001'%20fill-rule='evenodd'%20d='M0%20170.5h744v155H0z'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M0%20325.5h744V341H0z'/%3e%3cpath%20fill='%23ffca00'%20fill-rule='evenodd'%20d='M0%20341h744v155H0z'/%3e%3cpath%20fill='red'%20fill-rule='evenodd'%20d='M0%200v496l325.6-248z'/%3e%3cpath%20fill='%23ffca00'%20fill-rule='evenodd'%20d='m192.3%20322.6-49.6-36.3-49.5%2036.3%2019.2-58.4-50-36%2061.6.3%2018.7-58.5%2018.8%2058.5%2061.5-.3-50%2036z'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20stroke='%23000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.1'%20d='M99.6%20281.9h35.8c2.9%203.2%209.3%204.5%2015.4%200%2011.2-6.2%2032.9%200%2032.9%200l4.3-4.6-10.4-34.1-3.8-4s-8-4.8-23.2-3.2c-15.2%201.6-20.5-.6-20.5-.6S116.7%20237%20113%20239l-4.3%204.3-9%2038.7z'/%3e%3cpath%20fill='none'%20stroke='%23000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.1'%20d='M106.8%20273s34.2-4.2%2044%208.9c-5.5%203.8-10.4%204-15.7.2.9-1.4%2012.3-13.3%2041.4-9.3'/%3e%3cpath%20fill='none'%20stroke='%23000'%20stroke-width='1.1'%20d='m143.4%20238.9-.3%2037.6m30.7-37%206.4%2029.8'/%3e%3cpath%20fill='none'%20stroke='%23000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.1'%20d='m113.3%20239-3.5%2015.4'/%3e%3cpath%20fill-rule='evenodd'%20stroke='%23000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.1'%20d='m76.4%20286%208.4%209.8c1%20.6%201.9.6%202.8%200l12.4-15%205.3-6.4a4.1%204.1%200%200%200%201-3l10-9c.8.2%201.3.3%202%20.3-.9-.3-1.6-.7-.8-1.8l2.2-1.7%201.8%202.2s-2.5%203.3-2.8%203.3H116l-5.3%204.7%202.3%202%203.5%209.5%204.2-3-2.7-9.7%206-6.5-2.3-3.5%201.5-2s20.7%2013%2028.7%209.5c.2.1.5-9.3.5-9.3s-21.5-2.2-22-6.4c-.5-4.3%204.8-4.8%204.8-4.8l-2.3-3.2.5-1.8%203.8%204.8%208.4-7.3%2049.9%2056.9c2.7-1.1%203.3-1.8%203.5-4.5L150%20234l3.8-4c.7-.8%201-1.2%201-2.5l5.7-5a7.1%207.1%200%200%201%203.7%203l15.8-13.3c.4.4%201.7.8%202.5.3l26-25-28.3%2020-1-.7c0-.8%201-1%200-2.5-1.1-1.3-2.8%201.3-3%201.3s-4.1-1.4-5-3.1l-.2%204.6-7.3%206.7-5.5-.2-8%207.7-1%203%201.3%202.5s-4.2%203.7-4.2%203.5c0-.3-.9-1.1-1-1.3l3.7-3.2.5-2.3-1.2-1.9c-.4.3-5%205.2-5.3%204.7L129.7%20211l.7-2.8-8.5-9.2c-3-1-8-1.2-9%205.5-.7%201.6-7.2.2-7.2.2l-3.4.8-19.7%2027.9%2011%2013.2%2022.4-28.4.6-8%204.7%205.2c1.6.2%203.1.2%204.5-.5l13.3%2014.8-2.2%202.2%202%202.2%202.2-1.6%201%201.3c-1.2.6-2%201.4-3%202-1.9-1.1-3.6-2.6-3.4-4.9l-7.5%206.2-.3%201.3-22.2%2018.4-2%20.3-.5%205.7%2014.5-12v-1.7l1.5%201.2%2011.2-9s.8%201%20.5%201-10%209-10%209l-.2%201-1.7%201.5-1-.7-13.5%2012h-2l-7.5%207.4c-1.9.2-3.6.4-5.2%201.5z'/%3e%3c/g%3e%3c/svg%3e")}.fi-na{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-na'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='na-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h640v480H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23na-a)'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%233662a2'%20d='m-26.4.2.8%20345.6L512.5%200z'/%3e%3cpath%20fill='%2338a100'%20d='M666.4%20479.6%20665%20120.3%20122.3%20479.8l544-.2z'/%3e%3cpath%20fill='%23c70000'%20d='m-26%20371.8.4%20108.2%20117.5-.1L665.4%2095.4l-.7-94.1-116-1L-26%20371.7z'/%3e%3cpath%20fill='%23ffe700'%20d='m219.6%20172-21.8-13.2-12.6%2022.1-12.2-22.2-22%2012.9.6-25.4-25.4.2%2013.2-21.8-22.1-12.5%2022.2-12.3-12.8-22%2025.4.6-.1-25.5%2021.7%2013.2L186.3%2044l12.2%2022.2%2022-12.9-.6%2025.4%2025.4-.2-13.2%2021.8%2022.1%2012.5-22.2%2012.3%2012.8%2022-25.4-.6z'/%3e%3cpath%20fill='%233662a2'%20d='M232.4%20112.4c0%2025.6-20.9%2046.3-46.6%2046.3s-46.6-20.7-46.6-46.3%2020.8-46.2%2046.6-46.2%2046.6%2020.7%2046.6%2046.2'/%3e%3cpath%20fill='%23ffe700'%20d='M222.3%20112.4a36.5%2036.5%200%201%201-73%200%2036.5%2036.5%200%200%201%2073%200'/%3e%3c/g%3e%3c/svg%3e")}.fi-na.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-na'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='na-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h512v512H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23na-a)'%3e%3cpath%20fill='%23fff'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%233662a2'%20d='m-108.2.2.8%20368.6L466.6%200z'/%3e%3cpath%20fill='%2338a100'%20d='m630.7%20511.5-1.4-383.2-579%20383.5z'/%3e%3cpath%20fill='%23c70000'%20d='m-107.9%20396.6.5%20115.4%20125.3-.2%20611.7-410.1L629%201.4%20505.2.2z'/%3e%3cpath%20fill='%23ffe700'%20d='m154%20183.4-23.1-14-13.4%2023.6-13-23.8L81%20183l.6-27.1-27%20.2%2014-23.2L45%20119.5l23.8-13L55%2083l27%20.6-.1-27.1%2023.2%2014%2013.4-23.6%2013%2023.7L155.2%2057l-.6%2027%2027-.1-14%2023.2%2023.6%2013.3-23.8%2013.1%2013.7%2023.4-27-.5z'/%3e%3cpath%20fill='%233662a2'%20d='M167.8%20120c0%2027.2-22.3%2049.3-49.8%2049.3s-49.7-22.1-49.7-49.4%2022.3-49.3%2049.8-49.3%2049.7%2022%2049.7%2049.3z'/%3e%3cpath%20fill='%23ffe700'%20d='M157%20120a39%2039%200%201%201-77.9%200%2039%2039%200%200%201%2077.9%200'/%3e%3c/g%3e%3c/svg%3e")}.fi-nc{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-nc'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23009543'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23ed4135'%20d='M0%200h640v320H0z'/%3e%3cpath%20fill='%230035ad'%20d='M0%200h640v160H0z'/%3e%3ccircle%20cx='240'%20cy='240'%20r='157.3'%20fill='%23fae600'%20stroke='%23000'%20stroke-width='5.3'/%3e%3cpath%20stroke='%23000'%20stroke-width='6.4'%20d='M213.3%20263.5h53.3M213.3%20224h53.3M240%2083.2V352'/%3e%3cpath%20fill='%23000001'%20d='M176.6%20384.4c64.2%2026.3%20124.4%201.7%20124.4%201.7s-22.7-24.6-34.3-34.2c-11.4-9.4-44.8-9-56.2%200a488.7%20488.7%200%200%200-33.9%2032.5'/%3e%3cellipse%20cx='240'%20cy='312.5'%20fill='%23000001'%20rx='17.6'%20ry='25.6'/%3e%3cellipse%20cx='240'%20cy='243.7'%20fill='%23000001'%20rx='21.3'%20ry='13.5'/%3e%3ccircle%20cx='240'%20cy='181.3'%20r='21.3'%20fill='%23000001'/%3e%3cpath%20fill='%23000001'%20d='M265.6%20101.9s1.8%203-2%2010c-18.6%2033.5-37.3%2034.2-40.8%2037.1-4%203.2-5.6%203-5.6%203%20.3-2.9.5-14.6.7-15.7%202.9-15.7%2026.5-15.5%2045-31.5%202.9-2.5%202.7-3%202.7-3zm-62.4%2072s4.3%2012%204.8%2024c1%2019.2%2019.4%2019.7%2032%2019.7v-10.7c-9.5%200-17.7-1.4-24.5-15.4a122.7%20122.7%200%200%200-12.3-17.6m-.5%20154.6s6.7-8.3%2014.6-27.7c4-10.1%2013.8-16%2022.7-16v-15c-20.3%200-30%207.5-31%2018.6a329%20329%200%200%201-6.3%2040.1'/%3e%3cpath%20d='M276.8%20173.9s-4.3%2012-4.8%2024c-1%2019.2-19.4%2019.7-32%2019.7V207c9.5%200%2017.7-1.4%2024.5-15.5%203.6-6.2%207.7-12.1%2012.3-17.6m.5%20154.7s-6.7-8.4-14.6-27.8c-4-10.1-13.8-16-22.7-16V270c20.3%200%2030%207.5%2031%2018.6a329%20329%200%200%200%206.3%2040'/%3e%3c/svg%3e")}.fi-nc.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-nc'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23009543'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23ed4135'%20d='M0%200h512v341.3H0z'/%3e%3cpath%20fill='%230035ad'%20d='M0%200h512v170.7H0z'/%3e%3ccircle%20cx='225.6'%20cy='256'%20r='167.8'%20fill='%23fae600'%20stroke='%23000'%20stroke-width='5.7'/%3e%3cpath%20stroke='%23000'%20stroke-width='6.8'%20d='M197.2%20281h56.9m-56.9-42h56.9M225.6%2088.6v286.8'/%3e%3cpath%20fill='%23000001'%20d='M158%20410c68.6%2028%20132.8%201.8%20132.8%201.8s-24.3-26.2-36.7-36.5c-12.1-10-47.8-9.6-60%200-10%208-39.2%2037.5-36%2034.8z'/%3e%3cellipse%20cx='225.6'%20cy='333.4'%20fill='%23000001'%20rx='18.8'%20ry='27.3'/%3e%3cellipse%20cx='225.6'%20cy='260'%20fill='%23000001'%20rx='22.8'%20ry='14.4'/%3e%3ccircle%20cx='225.6'%20cy='193.4'%20r='22.8'%20fill='%23000001'/%3e%3cpath%20fill='%23000001'%20d='M253%20108.7s2%203.2-2.2%2010.7c-19.9%2035.7-39.7%2036.5-43.5%2039.5-4.2%203.4-6%203.2-6%203.2.4-3%20.6-15.6.8-16.8%203-16.6%2028.3-16.4%2048-33.5%203-2.7%202.8-3.2%202.8-3.2zm-66.6%2076.8s4.5%2012.7%205.1%2025.6c1.1%2020.4%2020.7%2021%2034.1%2021v-11.4c-10%200-18.9-1.4-26.1-16.5a130.8%20130.8%200%200%200-13.1-18.7m-.6%20165s7.2-9%2015.6-29.6a27%2027%200%200%201%2024.2-17.1v-16c-21.6%200-32%208-33%2019.9-2.4%2024-6.8%2042.7-6.8%2042.7zm79.2-165s-4.6%2012.7-5.2%2025.6c-1.1%2020.5-20.7%2021-34.1%2021v-11.3c10.1%200%2018.9-1.5%2026.2-16.5%203.8-6.7%208.2-13%2013-18.8zm.5%20165s-7.1-8.9-15.6-29.6a27%2027%200%200%200-24.2-17v-16c21.6%200%2032%208%2033.1%2019.8a351%20351%200%200%200%206.7%2042.8'/%3e%3c/svg%3e")}.fi-ne{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ne'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%230db02b'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%200h640v320H0z'/%3e%3cpath%20fill='%23e05206'%20d='M0%200h640v160H0z'/%3e%3ccircle%20cx='320'%20cy='240'%20r='68'%20fill='%23e05206'/%3e%3c/svg%3e")}.fi-ne.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ne'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%230db02b'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%200h512v341.3H0z'/%3e%3cpath%20fill='%23e05206'%20d='M0%200h512v170.7H0z'/%3e%3ccircle%20cx='256'%20cy='256'%20r='72.5'%20fill='%23e05206'/%3e%3c/svg%3e")}.fi-nf{background-image:url(/assets/nf-COchEj81.svg)}.fi-nf.fis{background-image:url(/assets/nf--j2oelto.svg)}.fi-ng{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ng'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23008753'%20d='M426.6%200H640v480H426.6zM0%200h213.3v480H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-ng.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ng'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23fff'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23008753'%20d='M341.3%200H512v512H341.3zM0%200h170.7v512H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-ni{background-image:url(/assets/ni-CC3zFI7h.svg)}.fi-ni.fis{background-image:url(/assets/ni-ChnV2lR-.svg)}.fi-nl{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-nl'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%2321468b'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%200h640v320H0z'/%3e%3cpath%20fill='%23ae1c28'%20d='M0%200h640v160H0z'/%3e%3c/svg%3e")}.fi-nl.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-nl'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%2321468b'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%200h512v341.3H0z'/%3e%3cpath%20fill='%23ae1c28'%20d='M0%200h512v170.7H0z'/%3e%3c/svg%3e")}.fi-no{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-no'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23ed2939'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23fff'%20d='M180%200h120v480H180z'/%3e%3cpath%20fill='%23fff'%20d='M0%20180h640v120H0z'/%3e%3cpath%20fill='%23002664'%20d='M210%200h60v480h-60z'/%3e%3cpath%20fill='%23002664'%20d='M0%20210h640v60H0z'/%3e%3c/svg%3e")}.fi-no.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-no'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23ed2939'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fff'%20d='M128%200h128v512H128z'/%3e%3cpath%20fill='%23fff'%20d='M0%20192h512v128H0z'/%3e%3cpath%20fill='%23002664'%20d='M160%200h64v512h-64z'/%3e%3cpath%20fill='%23002664'%20d='M0%20224h512v64H0z'/%3e%3c/svg%3e")}.fi-np{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-np'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='np-a'%3e%3cpath%20fill-opacity='.7'%20d='M0-16h512v512H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23np-a)'%20transform='translate(0%2015)scale(.9375)'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%23ce0000'%20stroke='%23000063'%20stroke-width='13.8'%20d='M6.5%20489.5h378.8L137.4%20238.1l257.3.3L6.6-9.5v499z'/%3e%3cpath%20fill='%23fff'%20d='m180.7%20355.8-27%209%2021.2%2019.8-28.5-1.8%2011.7%2026.2-25.5-12.3.5%2028.6-18.8-20.9-10.7%2026.6-9.2-26.3-20.3%2020.6%201.8-27.7L49%20409l12.6-25-29.3.6%2021.5-18.3-27.3-10.5%2027-9L32.2%20327l28.4%201.8L49%20302.6l25.6%2012.3-.5-28.6%2018.8%2020.9%2010.7-26.6%209.1%2026.3%2020.4-20.6-1.9%2027.7%2027-11.4-12.7%2025%2029.4-.6-21.5%2018.3zm-32.4-184.7-11.3%208.4%205.6%204.6a93.8%2093.8%200%200%200%2030.7-36c1.8%2021.3-17.7%2069-68.7%2069.5a70.6%2070.6%200%200%201-71.5-70.3c10%2018.2%2016.2%2027%2032%2036.5l4.7-4.4-10.6-8.9%2013.7-3.6-7.4-12.4%2014.4%201-1.8-14.4%2012.6%207.4%204-13.5%209%2010.8%208.5-10.3%204.6%2014%2011.8-8.2-1.5%2014.3%2014.2-1.7-6.7%2013.2z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}.fi-np.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-np'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='np-b'%3e%3cpath%20fill-opacity='.7'%20d='M0-16h512v512H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='np-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h512v512H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23np-a)'%3e%3cg%20clip-path='url(%23np-b)'%20transform='translate(0%2016)'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%23ce0000'%20stroke='%23000063'%20stroke-width='13'%20d='M6.5%20489.5h378.8L137.4%20238.1l257.3.3L6.6-9.5v499z'/%3e%3cpath%20fill='%23fff'%20d='m180.7%20355.8-27%209%2021.2%2019.8-28.5-1.8%2011.7%2026.2-25.5-12.3.5%2028.6-18.8-20.9-10.7%2026.6-9.2-26.3-20.3%2020.6%201.8-27.7L49%20409l12.6-25-29.3.6%2021.5-18.3-27.3-10.5%2027-9L32.2%20327l28.4%201.8L49%20302.6l25.6%2012.3-.5-28.6%2018.8%2020.9%2010.7-26.6%209.1%2026.3%2020.4-20.6-1.9%2027.7%2027-11.4-12.7%2025%2029.4-.6-21.5%2018.3zm-32.4-184.7-11.3%208.4%205.6%204.6a93.8%2093.8%200%200%200%2030.7-36c1.8%2021.3-17.7%2069-68.7%2069.5a70.6%2070.6%200%200%201-71.5-70.3c10%2018.2%2016.2%2027%2032%2036.5l4.7-4.4-10.6-8.9%2013.7-3.6-7.4-12.4%2014.4%201-1.8-14.4%2012.6%207.4%204-13.5%209%2010.8%208.5-10.3%204.6%2014%2011.8-8.2-1.5%2014.3%2014.2-1.7-6.7%2013.2z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}.fi-nr{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-nr'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='nr-a'%3e%3cpath%20fill-opacity='.7'%20d='M-54.7%200H628v512H-54.7z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%20clip-path='url(%23nr-a)'%20transform='translate(51.3)scale(.9375)'%3e%3cpath%20fill='%23002170'%20d='M-140%200H884v512H-140z'/%3e%3cpath%20fill='%23ffb20d'%20d='M-140%20234.1H884V278H-140z'/%3e%3cpath%20fill='%23fff'%20d='m161.8%20438-33-33-10.5%2045.4-12-45-31.9%2034%2012.1-45L42%20407.9l33-33-45.4-10.6%2045-12-34-31.8%2045%2012L72%20288l33%2033%2010.6-45.4%2012%2045%2031.8-34-12%2045%2044.5-13.5-33%2033%2045.4%2010.5-45%2012%2034%2032-45-12.2z'/%3e%3c/g%3e%3c/svg%3e")}.fi-nr.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-nr'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='nr-a'%3e%3cpath%20fill-opacity='.7'%20d='M135.6%200h496.1v496h-496z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%20clip-path='url(%23nr-a)'%20transform='translate(-140)scale(1.0321)'%3e%3cpath%20fill='%23002170'%20d='M0%200h992.1v496H0z'/%3e%3cpath%20fill='%23ffb20d'%20d='M0%20226.8h992.1v42.4H0z'/%3e%3cpath%20fill='%23fff'%20d='m292.4%20424.4-31.9-32-10.2%2044-11.7-43.7-30.9%2033%2011.8-43.6-43.2%2013%2032-31.8-44-10.3%2043.6-11.6-33-31%2043.6%2011.8-13-43.2%2031.8%2032%2010.3-44%2011.7%2043.6%2030.8-32.9-11.7%2043.6%2043.2-13-32%2031.8%2044%2010.3L290%20362l33%2030.9-43.7-11.7z'/%3e%3c/g%3e%3c/svg%3e")}.fi-nu{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-nu'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23fedd00'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23012169'%20d='M0%200h320v240H0z'/%3e%3cpath%20fill='%23fff'%20d='m37.5%200%20122%2090.5L281%200h39v31l-120%2089.5%20120%2089V240h-40l-120-89.5L40.5%20240H0v-30l119.5-89L0%2032V0z'/%3e%3cpath%20fill='%23c8102e'%20d='M212%20140.5%20320%20220v20l-135.5-99.5zm-92%2010%203%2017.5-96%2072H0zM320%200v1.5l-124.5%2094%201-22L295%200zM0%200l119.5%2088h-30L0%2021z'/%3e%3cpath%20fill='%23fff'%20d='M120.5%200v240h80V0zM0%2080v80h320V80z'/%3e%3cpath%20fill='%23c8102e'%20d='M0%2096.5v48h320v-48zM136.5%200v240h48V0z'/%3e%3ccircle%20cx='160'%20cy='120'%20r='40.8'%20fill='%23012169'/%3e%3cpath%20fill='%23fedd00'%20d='m160%2079.2%2024%2073.8-62.8-45.6h77.6L136%20153M66.7%2098.3l14%2043.4L43.9%20115h45.7l-37%2026.8m200.7-43.5%2014.1%2043.4-36.9-26.8h45.7l-37%2026.8M160%20178.3l14.1%2043.4-37-26.8h45.7l-37%2026.8M160%2018.3l14.1%2043.4-37-26.8h45.7l-37%2026.8'/%3e%3c/svg%3e")}.fi-nu.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-nu'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23fedd00'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23012169'%20d='M0%200h256v256H0z'/%3e%3cpath%20fill='%23fff'%20d='M256%200v32l-95%2096%2095%2093.5V256h-33.5L127%20162l-93%2094H0v-34l93-93.5L0%2037V0h31l96%2094%2093-94z'/%3e%3cpath%20fill='%23c8102e'%20d='m92%20162%205.5%2017L21%20256H0v-1.5zm62-6%2027%204%2075%2073.5V256zM256%200l-96%2098-2-22%2075-76zM0%20.5%2096.5%2095%2067%2091%200%2024.5z'/%3e%3cpath%20fill='%23fff'%20d='M88%200v256h80V0zM0%2088v80h256V88z'/%3e%3cpath%20fill='%23c8102e'%20d='M0%20104v48h256v-48zM104%200v256h48V0z'/%3e%3ccircle%20cx='128'%20cy='128'%20r='43.6'%20fill='%23012169'/%3e%3cpath%20fill='%23fedd00'%20d='m128%2084.4%2025.6%2078.8-67-48.7h82.8l-67%2048.7m-49.1-58.3%2015%2046.3L29%20122.6h48.7l-39.4%2028.6m164.4-46.3%2015%2046.3-39.4-28.6H227l-39.4%2028.6m-59.6%2039%2015%2046.3-39.3-28.6h48.6L113%20236.5m15-217L143%2066l-39.3-28.7h48.6L113%2066'/%3e%3c/svg%3e")}.fi-nz{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-nz'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cg%20id='nz-b'%3e%3cg%20id='nz-a'%3e%3cpath%20d='M0-.3v.5l1-.5z'/%3e%3cpath%20d='M.2.3%200-.1l1-.2z'/%3e%3c/g%3e%3cuse%20xlink:href='%23nz-a'%20transform='scale(-1%201)'/%3e%3cuse%20xlink:href='%23nz-a'%20transform='rotate(72%200%200)'/%3e%3cuse%20xlink:href='%23nz-a'%20transform='rotate(-72%200%200)'/%3e%3cuse%20xlink:href='%23nz-a'%20transform='scale(-1%201)rotate(72)'/%3e%3c/g%3e%3c/defs%3e%3cpath%20fill='%2300247d'%20fill-rule='evenodd'%20d='M0%200h640v480H0z'/%3e%3cg%20transform='translate(-111%2036.1)scale(.66825)'%3e%3cuse%20xlink:href='%23nz-b'%20width='100%25'%20height='100%25'%20fill='%23fff'%20transform='translate(900%20120)scale(45.4)'/%3e%3cuse%20xlink:href='%23nz-b'%20width='100%25'%20height='100%25'%20fill='%23cc142b'%20transform='matrix(30%200%200%2030%20900%20120)'/%3e%3c/g%3e%3cg%20transform='rotate(82%20525.2%20114.6)scale(.66825)'%3e%3cuse%20xlink:href='%23nz-b'%20width='100%25'%20height='100%25'%20fill='%23fff'%20transform='rotate(-82%20519%20-457.7)scale(40.4)'/%3e%3cuse%20xlink:href='%23nz-b'%20width='100%25'%20height='100%25'%20fill='%23cc142b'%20transform='rotate(-82%20519%20-457.7)scale(25)'/%3e%3c/g%3e%3cg%20transform='rotate(82%20525.2%20114.6)scale(.66825)'%3e%3cuse%20xlink:href='%23nz-b'%20width='100%25'%20height='100%25'%20fill='%23fff'%20transform='rotate(-82%20668.6%20-327.7)scale(45.4)'/%3e%3cuse%20xlink:href='%23nz-b'%20width='100%25'%20height='100%25'%20fill='%23cc142b'%20transform='rotate(-82%20668.6%20-327.7)scale(30)'/%3e%3c/g%3e%3cg%20transform='translate(-111%2036.1)scale(.66825)'%3e%3cuse%20xlink:href='%23nz-b'%20width='100%25'%20height='100%25'%20fill='%23fff'%20transform='translate(900%20480)scale(50.4)'/%3e%3cuse%20xlink:href='%23nz-b'%20width='100%25'%20height='100%25'%20fill='%23cc142b'%20transform='matrix(35%200%200%2035%20900%20480)'/%3e%3c/g%3e%3cpath%20fill='%23012169'%20d='M0%200h320v240H0z'/%3e%3cpath%20fill='%23fff'%20d='m37.5%200%20122%2090.5L281%200h39v31l-120%2089.5%20120%2089V240h-40l-120-89.5L40.5%20240H0v-30l119.5-89L0%2032V0z'/%3e%3cpath%20fill='%23c8102e'%20d='M212%20140.5%20320%20220v20l-135.5-99.5zm-92%2010%203%2017.5-96%2072H0zM320%200v1.5l-124.5%2094%201-22L295%200zM0%200l119.5%2088h-30L0%2021z'/%3e%3cpath%20fill='%23fff'%20d='M120.5%200v240h80V0zM0%2080v80h320V80z'/%3e%3cpath%20fill='%23c8102e'%20d='M0%2096.5v48h320v-48zM136.5%200v240h48V0z'/%3e%3c/svg%3e")}.fi-nz.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-nz'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cg%20id='nz-b'%3e%3cg%20id='nz-a'%3e%3cpath%20d='M0-.3v.5l1-.5z'/%3e%3cpath%20d='M.2.3%200-.1l1-.2z'/%3e%3c/g%3e%3cuse%20xlink:href='%23nz-a'%20transform='scale(-1%201)'/%3e%3cuse%20xlink:href='%23nz-a'%20transform='rotate(72%200%200)'/%3e%3cuse%20xlink:href='%23nz-a'%20transform='rotate(-72%200%200)'/%3e%3cuse%20xlink:href='%23nz-a'%20transform='scale(-1%201)rotate(72)'/%3e%3c/g%3e%3c/defs%3e%3cpath%20fill='%2300247d'%20fill-rule='evenodd'%20d='M0%200h512v512H0z'/%3e%3cg%20transform='translate(-148.7%2090.5)scale(.60566)'%3e%3cuse%20xlink:href='%23nz-b'%20width='100%25'%20height='100%25'%20fill='%23fff'%20transform='translate(900%20120)scale(45.4)'/%3e%3cuse%20xlink:href='%23nz-b'%20width='100%25'%20height='100%25'%20fill='%23cc142b'%20transform='matrix(30%200%200%2030%20900%20120)'/%3e%3c/g%3e%3cg%20transform='rotate(82%20418.7%20105.1)scale(.60566)'%3e%3cuse%20xlink:href='%23nz-b'%20width='100%25'%20height='100%25'%20fill='%23fff'%20transform='rotate(-82%20519%20-457.7)scale(40.4)'/%3e%3cuse%20xlink:href='%23nz-b'%20width='100%25'%20height='100%25'%20fill='%23cc142b'%20transform='rotate(-82%20519%20-457.7)scale(25)'/%3e%3c/g%3e%3cg%20transform='rotate(82%20418.7%20105.1)scale(.60566)'%3e%3cuse%20xlink:href='%23nz-b'%20width='100%25'%20height='100%25'%20fill='%23fff'%20transform='rotate(-82%20668.6%20-327.7)scale(45.4)'/%3e%3cuse%20xlink:href='%23nz-b'%20width='100%25'%20height='100%25'%20fill='%23cc142b'%20transform='rotate(-82%20668.6%20-327.7)scale(30)'/%3e%3c/g%3e%3cg%20transform='translate(-148.7%2090.5)scale(.60566)'%3e%3cuse%20xlink:href='%23nz-b'%20width='100%25'%20height='100%25'%20fill='%23fff'%20transform='translate(900%20480)scale(50.4)'/%3e%3cuse%20xlink:href='%23nz-b'%20width='100%25'%20height='100%25'%20fill='%23cc142b'%20transform='matrix(35%200%200%2035%20900%20480)'/%3e%3c/g%3e%3cpath%20fill='%23012169'%20d='M0%200h256v256H0z'/%3e%3cpath%20fill='%23fff'%20d='M256%200v32l-95%2096%2095%2093.5V256h-33.5L127%20162l-93%2094H0v-34l93-93.5L0%2037V0h31l96%2094%2093-94z'/%3e%3cpath%20fill='%23c8102e'%20d='m92%20162%205.5%2017L21%20256H0v-1.5zm62-6%2027%204%2075%2073.5V256zM256%200l-96%2098-2-22%2075-76zM0%20.5%2096.5%2095%2067%2091%200%2024.5z'/%3e%3cpath%20fill='%23fff'%20d='M88%200v256h80V0zM0%2088v80h256V88z'/%3e%3cpath%20fill='%23c8102e'%20d='M0%20104v48h256v-48zM104%200v256h48V0z'/%3e%3c/svg%3e")}.fi-om{background-image:url(/assets/om-DnUPbroW.svg)}.fi-om.fis{background-image:url(/assets/om-Ri__rIwP.svg)}.fi-pa{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-pa'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='pa-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h640v480H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23pa-a)'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M92.5%200h477.2v480H92.4z'/%3e%3cpath%20fill='%23db0000'%20fill-rule='evenodd'%20d='M323%203.6h358v221.7H323z'/%3e%3cpath%20fill='%230000ab'%20fill-rule='evenodd'%20d='M3.2%20225.3h319.9V480H3.2zm211.6-47.6-42-29.4-41.7%2029.6%2015.5-48L105%20100l51.6-.4%2016-48%2016.3%2047.9h51.6l-41.5%2030%2015.9%2048z'/%3e%3cpath%20fill='%23d80000'%20fill-rule='evenodd'%20d='m516.9%20413.9-42.4-27.7-42.1%2028%2015.6-45.6-42-28%2052-.5%2016.2-45.4%2016.4%2045.3h52l-41.8%2028.5%2016%2045.4z'/%3e%3c/g%3e%3c/svg%3e")}.fi-pa.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-pa'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='pa-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h512v512H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23pa-a)'%3e%3cpath%20fill='%23fff'%20d='M-26-25h592.5v596H-26z'/%3e%3cpath%20fill='%23db0000'%20d='M255.3-20.4h312.1v275.2h-312z'/%3e%3cpath%20fill='%230000ab'%20d='M-54.5%20254.8h309.9V571H-54.5zM179%20181.6l-46.5-29.2-46.2%2029.5%2017.2-48-46.2-29.6%2057.1-.4%2017.7-47.8%2018.1%2047.7h57.1l-45.9%2030z'/%3e%3cpath%20fill='%23d80000'%20d='m435.2%20449-46.4-29.2-46.3%2029.5%2017.2-48-46.2-29.5%2057.2-.4%2017.7-47.8%2018%2047.7h57.2l-46%2030z'/%3e%3c/g%3e%3c/svg%3e")}.fi-pe{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-pe'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23D91023'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23fff'%20d='M213.3%200h213.4v480H213.3z'/%3e%3c/svg%3e")}.fi-pe.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-pe'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23D91023'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fff'%20d='M170.7%200h170.6v512H170.7z'/%3e%3c/svg%3e")}.fi-pf{background-image:url(/assets/pf-CMTHIumB.svg)}.fi-pf.fis{background-image:url(/assets/pf-CEX9Vx76.svg)}.fi-pg{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-pg'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%23000001'%20d='m1.6%200-.5%20480h640z'/%3e%3cpath%20fill='red'%20d='m640.6%20480%20.5-480H1.1z'/%3e%3c/g%3e%3cpath%20fill='%23fc0'%20stroke='%23fc0'%20stroke-width='1.1'%20d='m178%2054-3.8-.2c-1.2-2.8-4.5-3.8-6.6-2.6A333%20333%200%200%201%20156%2051l7.1%203.1C165%2059%20171%2060%20171%2060c-.6%208.8-8.9-1.1-15.9%203.9-5%203-5%206.5-7.7%2012.3-.9%201.6-4.4%205.8-4.4%205.8l5.9-.5L147%2084l7-1-1.5%201.4c1%20.2%208-1.7%208-1.7L160%2085l8-2.9s1.6%201.3%203%201.9l1-4%204%201%201-4c6%208%208%2016%2019%2018l-1-4a262.2%20262.2%200%200%201%208.7%204l.9-1.7c4.8%203.4%208.7%203.3%2011.4%203.7l-2-5%202%201-3-8%203%201-4-6%201.5-1-.5-3c6%202%2014%205%2015%2012%201%2011-11%2014-19%2013%206%205%2017%203%2022-2%202-2%203-5%204-8%201%203%203%207%203%2011-1%209-13%2012-21%2013%209%205%2025-1%2026-14%200-11-7-16-10-21l-1-5.4%203%201.4s-1.8-3.3-2-4c0%200-3.1-8.5-4.2-10.4l2.2.4-8.2-10.3%202.3-.2S215.6%2044%20213%2043l3-1c-6-3-13-1-19%203l1-3-1.8.2v-3.5L198%2036l-3-1%202-5-3%201%201-5s-2.2%201-3.6.9a51.7%2051.7%200%200%200%201.6-3.4c-1-1.5%200-4.5%200-4.5-7%201-8%202-12%208-6%2011-4%2016-3%2027z'%20transform='matrix(2.21989%200%200%202.21194%201.1%200)'/%3e%3cpath%20fill='red'%20fill-rule='evenodd'%20stroke='red'%20stroke-width='1.4'%20d='M215.8%2070.4c.5.9%206.2%203.6%2010.4%206-1.1-4.6-9.4-5.6-10.4-6z'%20transform='matrix(2.21989%200%200%202.21194%201.1%200)'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='m175%20399-14.2-9-19%209.1%204.3-16.2-14.5-15.1%2016.7-1%2010-18.4%206.1%2015.5%2020.7%203.8-13%2010.6zm36.2-79-6.6-3-6.3%203.6%201-7.2-5.4-4.9%207.1-1.3%203-6.6%203.5%206.4%207.2.8-5%205.2zm32-45.2-14.5-7-13.9%207.8%202.3-15.7-11.8-10.8%2015.7-2.8%206.6-14.4%207.6%2014%2015.8%201.8-11%2011.5zm-65.8-63-17-8.5-16.5%209.1%202.8-18.6-13.8-13%2018.7-3%208-17%208.7%2016.7%2018.8%202.3-13.3%2013.4zm-60.8%2065.4-17-10-17%2010.3%204.3-19.3-15.1-13%2019.7-1.8%207.7-18.3%207.9%2018.2%2019.8%201.6-14.9%2013z'/%3e%3c/svg%3e")}.fi-pg.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-pg'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='pg-a'%3e%3cpath%20fill-opacity='.7'%20d='M81.4%200h496v496h-496z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23pg-a)'%20transform='translate(-84)scale(1.0321)'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%23000001'%20d='M.5%200%200%20496h659z'/%3e%3cpath%20fill='red'%20d='M658.5%20496%20659%200H0z'/%3e%3c/g%3e%3cpath%20fill='%23fc0'%20stroke='%23fc0'%20stroke-width='2.3'%20d='m406.9%20123.4-8.8-.4c-2.7-6.4-10.3-8.8-15-6-4.2.3-26.5-.4-26.5-.4l16.3%207.1c4%2010.9%2018%2013.5%2018%2013.5-1.2%2020-20.3-2.6-36.3%208.8-11.4%206.9-11.6%2015-17.8%2028.3a119%20119%200%200%201-10%2013.1l13.5-1-4.3%205.6%2016-2.3s-2.1%201.8-3.4%203.2c2.4.5%2018.3-3.7%2018.3-3.7l-1.1%205.1c8.1-3.3%2018.2-6.6%2018.2-6.6s3.6%203%206.9%204.3l2.3-9.1%209.1%202.3%202.3-9.2c13.7%2018.3%2018.3%2036.6%2043.4%2041.2l-2.3-9.2c7%203%2020%209.4%2020%209.4l2-4.2c10.9%207.8%2020%207.7%2026%208.5l-4.5-11.4%204.6%202.3-6.9-18.3%206.9%202.3-9.2-13.7%203.4-2.3-1-6.9c13.6%204.6%2032%2011.5%2034.2%2027.5%202.3%2025.1-25.2%2032-43.4%2029.7%2013.7%2011.4%2038.8%206.8%2050.3-4.6a47%2047%200%200%200%209.1-18.3c2.3%206.9%206.9%2016%206.9%2025.2-2.3%2020.5-29.8%2027.4-48%2029.7%2020.5%2011.4%2057.1-2.3%2059.4-32%200-25.2-16-36.6-22.9-48a231%20231%200%200%201-2.3-12.3c1%20.2%206.9%203.2%206.9%203.2s-4-7.6-4.6-9.2c0%200-7.1-19.4-9.7-23.7.4-.3%205.2.8%205.2.8l-18.8-23.5%205.3-.6S493%20100.5%20487%2098.3l6.9-2.3c-13.8-6.8-29.8-2.3-43.5%206.9l2.3-6.9-4.2.4v-7.8l4.2-6.3-6.8-2.3%204.5-11.4-6.8%202.3%202.3-11.5s-5.2%202.4-8.3%202c.1.3%203.7-7.7%203.7-7.7-2.2-3.4%200-10.3%200-10.3-16%202.3-18.3%204.6-27.4%2018.3-13.8%2025.2-9.2%2036.6-6.9%2061.7z'/%3e%3cpath%20fill='red'%20fill-rule='evenodd'%20stroke='red'%20stroke-width='3'%20d='M493.3%20161c1.2%202%2014.1%208.2%2023.9%2013.8-2.6-10.6-21.7-12.9-24-13.8z'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='m179%20412.4-14.6-9.3-19.5%209.4%204.4-16.7-15-15.7%2017.3-1%2010.3-19%206.3%2016%2021.2%203.9-13.3%2011zm37.3-81.6-6.8-3.2-6.4%203.7%201-7.4-5.6-5%207.4-1.4%203-6.8%203.6%206.6%207.4.8-5.2%205.4zm32.9-46.8-14.8-7.2-14.4%208%202.3-16.2-12.1-11.2%2016.2-2.8%206.8-15%207.8%2014.6%2016.3%201.8-11.3%2012zm-67.7-65-17.4-8.8-17%209.4%202.8-19.2-14.2-13.4%2019.2-3.1%208.3-17.7%209%2017.3%2019.3%202.4-13.7%2014zM119%20286.5l-17.6-10.4-17.5%2010.7%204.5-20-15.6-13.3%2020.4-2%207.9-18.9%208%2018.8%2020.5%201.7-15.3%2013.5z'/%3e%3c/g%3e%3c/svg%3e")}.fi-ph{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ph'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%230038a8'%20d='M0%200h640v240H0z'/%3e%3cpath%20fill='%23ce1126'%20d='M0%20240h640v240H0z'/%3e%3cpath%20fill='%23fff'%20d='M415.7%20240%200%20480V0'/%3e%3cpath%20fill='%23fcd116'%20d='M26.7%2042.4%2041%2055l16.6-9.2-7.4%2017.5%2014%2013-19-1.6-8.1%2017.2-4.3-18.5L14%2071l16.3-10zm323.8%20172.3.4%2019%2018%206.3-18%206.2-.4%2019-11.5-15.1-18.2%205.5%2010.8-15.6-10.8-15.6%2018.2%205.5zM37.2%20388.1l8%2017.2%2019-1.6-13.9%2013%207.4%2017.5-16.6-9.1-14.4%2012.4%203.6-18.7L14%20409l18.9-2.4zm114.2-249-6.2%206.2%203.1%2047-3%20.3-5.7-42.9-5.1%205%207.6%2038.4a47.5%2047.5%200%200%200-17.2%207.1l-21.7-32.4H96l26.4%2034.3a48%2048%200%200%200-2.4%202l-31.1-35.5h-8.8v8.8l35.4%2031-2%202.5-34.3-26.3v7.1l32.5%2021.7c-3.4%205.2-5.9%2011-7.1%2017.2L66.3%20223l-5.1%205%2042.9%205.7c-.2%201-.3%202.1-.3%203.1l-47-3-6.2%206.2%206.2%206.2%2047-3.1.3%203.1-42.9%205.7%205%205%2038.4-7.6a47.5%2047.5%200%200%200%207.1%2017.2l-32.5%2021.7v7.2l34.3-26.3a48%2048%200%200%200%202%202.4l-35.4%2031v8.8H89l31-35.4%202.5%202L96%20312.2h7.2l21.7-32.5c5.1%203.4%2011%205.9%2017.2%207.1l-7.6%2038.4%205%205%205.7-42.9c1%20.2%202%20.3%203.1.3l-3%2047%206.1%206.2%206.3-6.2-3.1-47%203-.3%205.7%2043%205.1-5.1-7.6-38.4a47.5%2047.5%200%200%200%2017.2-7.1l21.7%2032.5h7.2l-26.4-34.3a48%2048%200%200%200%202.4-2l31.1%2035.4h8.8v-8.8l-35.4-31%202-2.4%2034.3%2026.3v-7.2l-32.5-21.7c3.4-5.1%205.9-11%207.1-17.2l38.3%207.6%205.1-5-42.9-5.7c.2-1%20.3-2%20.3-3.1l47%203%206.2-6.1-6.2-6.2-47%203-.3-3%2042.9-5.7-5-5-38.4%207.5a47.5%2047.5%200%200%200-7.1-17.2l32.5-21.7v-7.1l-34.3%2026.3a48%2048%200%200%200-2-2.4l35.4-31v-8.9H214l-31%2035.5a48%2048%200%200%200-2.5-2l26.4-34.3h-7.2L178%20200.2c-5.1-3.4-11-5.9-17.2-7.1l7.6-38.3-5-5-5.7%2042.8-3.1-.3%203-47z'/%3e%3c/svg%3e")}.fi-ph.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ph'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%230038a8'%20d='M0%200h512v256H0z'/%3e%3cpath%20fill='%23ce1126'%20d='M0%20256h512v256H0z'/%3e%3cpath%20fill='%23fff'%20d='M443.4%20256%200%20512V0'/%3e%3cpath%20fill='%23fcd116'%20d='m25.2%2044.4%2015.4%2013.3%2017.9-9.8-8%2018.7%2015%2014L45%2078.9l-8.6%2018.4-4.7-19.8-20.2-2.6L29%2064.4zM372.1%20229l.4%2020.3%2019.3%206.7-19.3%206.7-.4%2020.3-12.3-16.2-19.5%206L352%20256l-11.7-16.7%2019.5%205.9zM36.5%20414.7l8.6%2018.4%2020.3-1.7-14.8%2014%207.9%2018.7-17.9-9.8-15.4%2013.3%203.9-20-17.5-10.5%2020.2-2.6zM158.9%20148l-6.6%206.6%203.2%2050.3-3.3.3-6-45.9-5.5%205.4%208.2%2041a51%2051%200%200%200-18.4%207.7l-23.3-34.8h-7.7l28.2%2036.8-2.5%202.1-33.3-38h-9.4v9.5l38%2033.3-2.2%202.5-36.8-28.2v7.7l34.8%2023.3a50.9%2050.9%200%200%200-7.6%2018.4l-41-8.2-5.5%205.5%2046%206-.4%203.4-50.3-3.3-6.7%206.6%206.7%206.6%2050.3-3.2.3%203.3-45.9%206%205.4%205.5%2041-8.2a51%2051%200%200%200%207.7%2018.4l-34.8%2023.3v7.7l36.8-28.2%202.1%202.5-38%2033.3v9.4H92l33.3-38%202.5%202.2-28.2%2036.8h7.7l23.3-34.8a50.8%2050.8%200%200%200%2018.4%207.6l-8.2%2041%205.5%205.5%206-46%203.3.4-3.2%2050.3%206.6%206.7%206.6-6.7-3.2-50.3%203.3-.3%206%2045.9%205.5-5.4-8.2-41a51%2051%200%200%200%2018.4-7.7l23.3%2034.8h7.7L190%20296.6l2.5-2.1%2033.3%2038h9.4V323l-38-33.3%202.2-2.5%2036.8%2028.2v-7.7l-34.8-23.3A50.9%2050.9%200%200%200%20209%20266l41%208.2%205.5-5.5-46-6%20.4-3.3%2050.3%203.2%206.7-6.6-6.7-6.6-50.3%203.3c0-1.2-.2-2.3-.3-3.4l45.9-6-5.4-5.5-41%208.2a51%2051%200%200%200-7.7-18.4l34.8-23.3v-7.7l-36.8%2028.2-2.1-2.5%2038-33.3v-9.4h-9.5l-33.3%2038-2.5-2.2%2028.2-36.8h-7.7l-23.3%2034.8a50.9%2050.9%200%200%200-18.4-7.6l8.2-41-5.5-5.5-6%2046-3.3-.4%203.2-50.3z'/%3e%3c/svg%3e")}.fi-pk{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-pk'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='pk-a'%3e%3cpath%20fill-opacity='.7'%20d='M-52.3%200h682.6v512H-52.3z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%20clip-path='url(%23pk-a)'%20transform='translate(49)scale(.9375)'%3e%3cpath%20fill='%230c590b'%20d='M-95%200h768v512H-95z'/%3e%3cpath%20fill='%23fff'%20d='M-95%200H97.5v512H-95z'/%3e%3cg%20fill='%23fff'%3e%3cpath%20d='m403.7%20225.4-31.2-6.6-16.4%2027.3-3.4-31.6-31-7.2%2029-13-2.7-31.7%2021.4%2023.6%2029.3-12.4-15.9%2027.6%2021%2024z'/%3e%3cpath%20d='M415.4%20306a121.2%20121.2%200%200%201-161.3%2059.4%20122.1%20122.1%200%200%201-59.5-162.1A118.6%20118.6%200%200%201%20266%20139a156.2%20156.2%200%200%200-11.8%2010.9A112.3%20112.3%200%200%200%20415.5%20306z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}.fi-pk.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-pk'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='pk-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h512v512H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%20clip-path='url(%23pk-a)'%3e%3cpath%20fill='%230c590b'%20d='M-95%200h768v512H-95z'/%3e%3cpath%20fill='%23fff'%20d='M-95%200H97.5v512H-95z'/%3e%3cg%20fill='%23fff'%3e%3cpath%20d='m403.7%20225.4-31.2-6.6-16.4%2027.3-3.4-31.6-31-7.2%2029-13-2.7-31.7%2021.4%2023.6%2029.3-12.4-15.9%2027.6%2021%2024z'/%3e%3cpath%20d='M415.4%20306a121.2%20121.2%200%200%201-161.3%2059.4%20122.1%20122.1%200%200%201-59.5-162.1A118.6%20118.6%200%200%201%20266%20139a156.2%20156.2%200%200%200-11.8%2010.9A112.3%20112.3%200%200%200%20415.5%20306z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}.fi-pl{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-pl'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%23fff'%20d='M640%20480H0V0h640z'/%3e%3cpath%20fill='%23dc143c'%20d='M640%20480H0V240h640z'/%3e%3c/g%3e%3c/svg%3e")}.fi-pl.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-pl'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%23fff'%20d='M512%20512H0V0h512z'/%3e%3cpath%20fill='%23dc143c'%20d='M512%20512H0V256h512z'/%3e%3c/g%3e%3c/svg%3e")}.fi-pm{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-pm'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23000091'%20d='M0%200h213.3v480H0z'/%3e%3cpath%20fill='%23e1000f'%20d='M426.7%200H640v480H426.7z'/%3e%3c/svg%3e")}.fi-pm.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-pm'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23fff'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23000091'%20d='M0%200h170.7v512H0z'/%3e%3cpath%20fill='%23e1000f'%20d='M341.3%200H512v512H341.3z'/%3e%3c/svg%3e")}.fi-pn{background-image:url(/assets/pn-vyD5VXw1.svg)}.fi-pn.fis{background-image:url(/assets/pn-DEs-Vj71.svg)}.fi-pr{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-pr'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='pr-a'%3e%3cpath%20fill-opacity='.7'%20d='M-37.3%200h682.7v512H-37.3z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23pr-a)'%20transform='translate(35)scale(.9375)'%3e%3cpath%20fill='%23ed0000'%20d='M-37.3%200h768v512h-768z'/%3e%3cpath%20fill='%23fff'%20d='M-37.3%20102.4h768v102.4h-768zm0%20204.8h768v102.4h-768z'/%3e%3cpath%20fill='%230050f0'%20d='m-37.3%200%20440.7%20255.7L-37.3%20511z'/%3e%3cpath%20fill='%23fff'%20d='M156.4%20325.5%20109%20290l-47.2%2035.8%2017.6-58.1-47.2-36%2058.3-.4%2018.1-58%2018.5%2057.8%2058.3.1-46.9%2036.3z'/%3e%3c/g%3e%3c/svg%3e")}.fi-pr.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-pr'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='pr-a'%3e%3cpath%20fill-opacity='.7'%20d='M51.6%200h708.7v708.7H51.6z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23pr-a)'%20transform='translate(-37.3)scale(.72249)'%3e%3cpath%20fill='%23ed0000'%20d='M0%200h1063v708.7H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20141.7h1063v141.8H0zm0%20283.5h1063v141.7H0z'/%3e%3cpath%20fill='%230050f0'%20d='m0%200%20610%20353.9L0%20707.3z'/%3e%3cpath%20fill='%23fff'%20d='m268.2%20450.5-65.7-49-65.3%2049.5%2024.3-80.5-65.3-49.7%2080.7-.7%2025-80.2%2025.6%2080%2080.7.1-64.9%2050.2z'/%3e%3c/g%3e%3c/svg%3e")}.fi-ps{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ps'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='ps-a'%3e%3cpath%20fill-opacity='.7'%20d='M-118%200h682.7v512H-118z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23ps-a)'%20transform='translate(110.6)scale(.9375)'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23000001'%20d='M-246%200H778v170.7H-246z'/%3e%3cpath%20fill='%23fff'%20d='M-246%20170.7H778v170.6H-246z'/%3e%3cpath%20fill='%23090'%20d='M-246%20341.3H778V512H-246z'/%3e%3cpath%20fill='red'%20d='m-246%20512%20512-256L-246%200z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}.fi-ps.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ps'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='ps-a'%3e%3cpath%20fill-opacity='.7'%20d='M237.1%200h493.5v493.5H237.1z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23ps-a)'%20transform='translate(-246)scale(1.0375)'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23000001'%20d='M0%200h987v164.5H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20164.5h987V329H0z'/%3e%3cpath%20fill='%23090'%20d='M0%20329h987v164.5H0z'/%3e%3cpath%20fill='red'%20d='m0%20493.5%20493.5-246.8L0%200z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}.fi-pt{background-image:url(/assets/pt-BV5okG4O.svg)}.fi-pt.fis{background-image:url(/assets/pt-BLLm3V0o.svg)}.fi-pw{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-pw'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='pw-a'%3e%3cpath%20fill-opacity='.7'%20d='M-70.3%200h640v480h-640z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%20clip-path='url(%23pw-a)'%20transform='translate(70.3)'%3e%3cpath%20fill='%234aadd6'%20d='M-173.4%200h846.3v480h-846.3z'/%3e%3cpath%20fill='%23ffde00'%20d='M335.6%20232.1a135.9%20130.1%200%201%201-271.7%200%20135.9%20130.1%200%201%201%20271.7%200'/%3e%3c/g%3e%3c/svg%3e")}.fi-pw.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-pw'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='pw-a'%3e%3cpath%20fill-opacity='.7'%20d='M61.7%204.2h170.8V175H61.7z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%20clip-path='url(%23pw-a)'%20transform='translate(-185%20-12.5)scale(2.9973)'%3e%3cpath%20fill='%234aadd6'%20d='M0%204.2h301.2V175H0z'/%3e%3cpath%20fill='%23ffde00'%20d='M185.9%2086.8a52%2052%200%200%201-53%2050.8%2052%2052%200%200%201-53.2-50.8c0-28%2023.8-50.8%2053.1-50.8s53%2022.7%2053%2050.8z'/%3e%3c/g%3e%3c/svg%3e")}.fi-py{background-image:url(/assets/py-BfpB8kRi.svg)}.fi-py.fis{background-image:url(/assets/py-CRTEf2ay.svg)}.fi-qa{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-qa'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%238d1b3d'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%200v480h158.4l97.8-26.7-97.8-26.6%2097.7-26.7-97.7-26.7%2097.7-26.6-97.7-26.7%2097.8-26.7-97.8-26.6%2097.7-26.7-97.7-26.7%2097.7-26.6-97.7-26.7%2097.8-26.7-97.8-26.6L256.1%2080l-97.7-26.7%2097.8-26.6L158.3%200z'/%3e%3c/svg%3e")}.fi-qa.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-qa'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%238d1b3d'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%200v512h113l104.2-28.4L113%20455l104.2-28.4L113%20398.2l104.2-28.4L113%20341.3%20217.2%20313%20113%20284.4%20217.2%20256%20113%20227.6%20217.2%20199%20113%20170.7l104.2-28.5L113%20113.8l104.2-28.5L113%2057l104.2-28.4L113%200z'/%3e%3c/svg%3e")}.fi-re{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-re'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23000091'%20d='M0%200h213.3v480H0z'/%3e%3cpath%20fill='%23e1000f'%20d='M426.7%200H640v480H426.7z'/%3e%3c/svg%3e")}.fi-re.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-re'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23fff'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%2300267f'%20d='M0%200h170.7v512H0z'/%3e%3cpath%20fill='%23f31830'%20d='M341.3%200H512v512H341.3z'/%3e%3c/g%3e%3c/svg%3e")}.fi-ro{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ro'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%2300319c'%20d='M0%200h213.3v480H0z'/%3e%3cpath%20fill='%23ffde00'%20d='M213.3%200h213.4v480H213.3z'/%3e%3cpath%20fill='%23de2110'%20d='M426.7%200H640v480H426.7z'/%3e%3c/g%3e%3c/svg%3e")}.fi-ro.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ro'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%2300319c'%20d='M0%200h170.7v512H0z'/%3e%3cpath%20fill='%23ffde00'%20d='M170.7%200h170.6v512H170.7z'/%3e%3cpath%20fill='%23de2110'%20d='M341.3%200H512v512H341.3z'/%3e%3c/g%3e%3c/svg%3e")}.fi-rs{background-image:url(/assets/rs-DBaCzDQy.svg)}.fi-rs.fis{background-image:url(/assets/rs-D31ZZnI-.svg)}.fi-ru{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ru'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%230039a6'%20d='M0%20160h640v320H0z'/%3e%3cpath%20fill='%23d52b1e'%20d='M0%20320h640v160H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-ru.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ru'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23fff'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%230039a6'%20d='M0%20170.7h512V512H0z'/%3e%3cpath%20fill='%23d52b1e'%20d='M0%20341.3h512V512H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-rw{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-rw'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%2320603d'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23fad201'%20d='M0%200h640v360H0z'/%3e%3cpath%20fill='%2300a1de'%20d='M0%200h640v240H0z'/%3e%3cg%20transform='translate(511%20125.4)scale(.66667)'%3e%3cg%20id='rw-b'%3e%3cpath%20id='rw-a'%20fill='%23e5be01'%20d='M116.1%200%2035.7%204.7l76.4%2025.4-78.8-16.3L100.6%2058l-72-36.2L82%2082.1%2021.9%2028.6l36.2%2072-44.3-67.3L30%20112%204.7%2035.7%200%20116.1-1-1z'/%3e%3cuse%20xlink:href='%23rw-a'%20width='100%25'%20height='100%25'%20transform='scale(1%20-1)'/%3e%3c/g%3e%3cuse%20xlink:href='%23rw-b'%20width='100%25'%20height='100%25'%20transform='scale(-1%201)'/%3e%3ccircle%20r='34.3'%20fill='%23e5be01'%20stroke='%2300a1de'%20stroke-width='3.4'/%3e%3c/g%3e%3c/svg%3e")}.fi-rw.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-rw'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%2320603d'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fad201'%20d='M0%200h512v384H0z'/%3e%3cpath%20fill='%2300a1de'%20d='M0%200h512v256H0z'/%3e%3cg%20transform='translate(374.4%20133.8)scale(.7111)'%3e%3cg%20id='rw-b'%3e%3cpath%20id='rw-a'%20fill='%23e5be01'%20d='M116.1%200%2035.7%204.7l76.4%2025.4-78.8-16.3L100.6%2058l-72-36.2L82%2082.1%2021.9%2028.6l36.2%2072-44.3-67.3L30%20112%204.7%2035.7%200%20116.1-1-1z'/%3e%3cuse%20xlink:href='%23rw-a'%20width='100%25'%20height='100%25'%20transform='scale(1%20-1)'/%3e%3c/g%3e%3cuse%20xlink:href='%23rw-b'%20width='100%25'%20height='100%25'%20transform='scale(-1%201)'/%3e%3ccircle%20r='34.3'%20fill='%23e5be01'%20stroke='%2300a1de'%20stroke-width='3.4'/%3e%3c/g%3e%3c/svg%3e")}.fi-sa{background-image:url(/assets/sa-DLf2NaXn.svg)}.fi-sa.fis{background-image:url(/assets/sa-eH5F7cXy.svg)}.fi-sb{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-sb'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='sb-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h682.7v512H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%20clip-path='url(%23sb-a)'%20transform='scale(.9375)'%3e%3cpath%20fill='%230000d6'%20d='M0%20507.2%20987.4%200H0z'/%3e%3cpath%20fill='%23006000'%20d='M1024%200%2027.2%20512H1024z'/%3e%3cpath%20fill='%23fc0'%20d='M1024%200h-54.9L0%20485.4V512h54.9L1024%2027.6z'/%3e%3cpath%20fill='%23fff'%20d='m71.4%209.1%2011.8%2034.5h38.5L90.6%2064.7l11.9%2034.4L71.4%2078%2040.3%2099.2l11.9-34.4-31.1-21.3h38.4zm191.1%200%2011.9%2034.5h38.5l-31.2%2021.2%2012%2034.4L262.4%2078l-31%2021.3%2011.9-34.4-31.2-21.3h38.5zm0%20144.5%2011.9%2034.5h38.5l-31.2%2021.2%2012%2034.4-31.2-21.3-31%2021.3%2011.9-34.4-31.2-21.3h38.5zm-95-71.4%2011.9%2034.4h38.4l-31%2021.3%2011.8%2034.4-31-21.3-31.2%2021.3%2012-34.4-31.2-21.3h38.5zm-96.1%2071.4%2011.8%2034.5h38.5l-31.1%2021.2%2011.9%2034.4-31.1-21.3-31.1%2021.3%2012-34.4L21%20188h38.4z'/%3e%3c/g%3e%3c/svg%3e")}.fi-sb.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-sb'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='sb-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h496v496H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%20clip-path='url(%23sb-a)'%20transform='scale(1.0321)'%3e%3cpath%20fill='%230000d6'%20d='M0%20491.4%20956.7%200H0z'/%3e%3cpath%20fill='%23006000'%20d='M992.1%200%2026.3%20496h965.8z'/%3e%3cpath%20fill='%23fc0'%20d='M992.2%200H939L0%20470.3V496h53.1l939-469.4V0z'/%3e%3cpath%20fill='%23fff'%20d='m39%2096.1%2011.6-33.3-30.2-20.6h37.3L69.2%208.8l11.5%2033.4h37.2L87.8%2062.8%2099.3%2096%2069.2%2075.5zm185.2%200%2011.6-33.3-30.2-20.6h37.3l11.5-33.4%2011.5%2033.4H303l-30%2020.6L284.5%2096l-30.1-20.6zm0%20140%2011.6-33.3-30.2-20.6h37.3l11.5-33.4%2011.5%2033.4H303l-30%2020.6%2011.6%2033.3-30.1-20.6zm-92-69.2%2011.5-33.3-30.1-20.6h37.2l11.5-33.3%2011.5%2033.3h37.3l-30.2%2020.6%2011.5%2033.3-30-20.6zM39%20236.1l11.6-33.3-30.2-20.6h37.3l11.5-33.4%2011.5%2033.4h37.2l-30.1%2020.6L99.3%20236l-30.1-20.6z'/%3e%3c/g%3e%3c/svg%3e")}.fi-sc{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-sc'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0Z'/%3e%3cpath%20fill='%23d92223'%20d='M0%20480V0h640v160z'/%3e%3cpath%20fill='%23fcd955'%20d='M0%20480V0h426.7z'/%3e%3cpath%20fill='%23003d88'%20d='M0%20480V0h213.3z'/%3e%3cpath%20fill='%23007a39'%20d='m0%20480%20640-160v160z'/%3e%3c/svg%3e")}.fi-sc.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-sc'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23fff'%20d='M0%200h512v512H0Z'/%3e%3cpath%20fill='%23d92223'%20d='M0%20512V0h512v170.7z'/%3e%3cpath%20fill='%23fcd955'%20d='M0%20512V0h341.3z'/%3e%3cpath%20fill='%23003d88'%20d='M0%20512V0h170.7z'/%3e%3cpath%20fill='%23007a39'%20d='m0%20512%20512-170.7V512Z'/%3e%3c/svg%3e")}.fi-sd{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-sd'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='sd-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h682.7v512H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%20clip-path='url(%23sd-a)'%20transform='scale(.9375)'%3e%3cpath%20fill='%23000001'%20d='M0%20341.3h1024V512H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20170.6h1024v170.7H0z'/%3e%3cpath%20fill='red'%20d='M0%200h1024.8v170.7H0z'/%3e%3cpath%20fill='%23009a00'%20d='M0%200v512l341.3-256z'/%3e%3c/g%3e%3c/svg%3e")}.fi-sd.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-sd'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='sd-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h496v496H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%20clip-path='url(%23sd-a)'%20transform='scale(1.0321)'%3e%3cpath%20fill='%23000001'%20d='M0%20330.7h992.1v165.4H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20165.3h992.1v165.4H0z'/%3e%3cpath%20fill='red'%20d='M0%200h992.9v165.4H0z'/%3e%3cpath%20fill='%23009a00'%20d='M0%200v496l330.7-248z'/%3e%3c/g%3e%3c/svg%3e")}.fi-se{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-se'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23005293'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23fecb00'%20d='M176%200v192H0v96h176v192h96V288h368v-96H272V0z'/%3e%3c/svg%3e")}.fi-se.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-se'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23005293'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fecb00'%20d='M134%200v204.8H0v102.4h134V512h102.4V307.2H512V204.8H236.4V0z'/%3e%3c/svg%3e")}.fi-sg{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-sg'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='sg-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h640v480H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23sg-a)'%3e%3cpath%20fill='%23fff'%20d='M-20%200h720v480H-20z'/%3e%3cpath%20fill='%23df0000'%20d='M-20%200h720v240H-20z'/%3e%3cpath%20fill='%23fff'%20d='M146%2040.2a84.4%2084.4%200%200%200%20.8%20165.2%2086%2086%200%200%201-106.6-59%2086%2086%200%200%201%2059-106c16-4.6%2030.8-4.7%2046.9-.2z'/%3e%3cpath%20fill='%23fff'%20d='m133%20110%204.9%2015-13-9.2-12.8%209.4%204.7-15.2-12.8-9.3%2015.9-.2%205-15%205%2015h15.8zm17.5%2052%205%2015.1-13-9.2-12.9%209.3%204.8-15.1-12.8-9.4%2015.9-.1%204.9-15.1%205%2015h16zm58.5-.4%204.9%2015.2-13-9.3-12.8%209.3%204.7-15.1-12.8-9.3%2015.9-.2%205-15%205%2015h15.8zm17.4-51.6%204.9%2015.1-13-9.2-12.8%209.3%204.8-15.1-12.9-9.4%2016-.1%204.8-15.1%205%2015h16zm-46.3-34.3%205%2015.2-13-9.3-12.9%209.4%204.8-15.2-12.8-9.4%2015.8-.1%205-15.1%205%2015h16z'/%3e%3c/g%3e%3c/svg%3e")}.fi-sg.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-sg'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='sg-a'%3e%3cpath%20fill-opacity='.7'%20d='M27.7%200h708.6v708.7H27.7z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23sg-a)'%20transform='translate(-20)scale(.72249)'%3e%3cpath%20fill='%23fff'%20d='M0%200h1063v708.7H0z'/%3e%3cpath%20fill='%23df0000'%20d='M0%200h1063v354.3H0z'/%3e%3cpath%20fill='%23fff'%20d='M245.2%2059.4a124.6%20124.6%200%200%200%201.1%20243.9%20126.9%20126.9%200%201%201-1.1-243.9'/%3e%3cpath%20fill='%23fff'%20d='m202%20162.4-18.9-13.8%2023.5-.2%207.2-22.3%207.5%2022.3h23.4l-18.8%2014%207.2%2022.3L214%20171l-19%2013.8zm26%2076.9-19-13.8%2023.5-.2%207.3-22.3%207.4%2022.2h23.5l-19%2014%207.3%2022.3-19-13.6-19%2013.8zm86.3-.6-19-13.8%2023.4-.2%207.3-22.3%207.4%2022.3H357l-18.9%2014%207.3%2022.3-19.1-13.7-19%2013.8zm25.7-76.2-19-13.8%2023.5-.2%207.2-22.3%207.5%2022.2h23.4l-18.8%2014%207.2%2022.3-19.1-13.6-19%2013.8zM271.7%20112l-19-13.8%2023.5-.2%207.3-22.3%207.4%2022.3h23.5l-19%2014%207.3%2022.2-19-13.6-19%2013.8z'/%3e%3c/g%3e%3c/svg%3e")}.fi-sh{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-sh'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23012169'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23FFF'%20d='m75%200%20244%20181L562%200h78v62L400%20241l240%20178v61h-80L320%20301%2081%20480H0v-60l239-178L0%2064V0z'/%3e%3cpath%20fill='%23C8102E'%20d='m424%20281%20216%20159v40L369%20281zm-184%2020%206%2035L54%20480H0zM640%200v3L391%20191l2-44L590%200zM0%200l239%20176h-60L0%2042z'/%3e%3cpath%20fill='%23FFF'%20d='M241%200v480h160V0zM0%20160v160h640V160z'/%3e%3cpath%20fill='%23C8102E'%20d='M0%20193v96h640v-96zM273%200v480h96V0z'/%3e%3c/svg%3e")}.fi-sh.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-sh'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23012169'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23FFF'%20d='M512%200v64L322%20256l190%20187v69h-67L254%20324%2068%20512H0v-68l186-187L0%2074V0h62l192%20188L440%200z'/%3e%3cpath%20fill='%23C8102E'%20d='m184%20324%2011%2034L42%20512H0v-3zm124-12%2054%208%20150%20147v45zM512%200%20320%20196l-4-44L466%200zM0%201l193%20189-59-8L0%2049z'/%3e%3cpath%20fill='%23FFF'%20d='M176%200v512h160V0zM0%20176v160h512V176z'/%3e%3cpath%20fill='%23C8102E'%20d='M0%20208v96h512v-96zM208%200v512h96V0z'/%3e%3c/svg%3e")}.fi-si{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-si'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='si-a'%3e%3cpath%20fill-opacity='.7'%20d='M-15%200h682.6v512H-15.1z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%20clip-path='url(%23si-a)'%20transform='translate(14.1)scale(.9375)'%3e%3cpath%20fill='%23fff'%20d='M-62%200H962v512H-62z'/%3e%3cpath%20fill='%23d50000'%20d='M-62%20341.3H962V512H-62z'/%3e%3cpath%20fill='%230000bf'%20d='M-62%20170.7H962v170.6H-62z'/%3e%3cpath%20fill='%23d50000'%20d='M228.4%2093c-4%2061.6-6.4%2095.4-15.7%20111-10.2%2016.8-20%2029.1-59.7%2044-39.6-14.9-49.4-27.2-59.6-44-9.4-15.6-11.7-49.4-15.7-111l5.8-2c11.8-3.6%2020.6-6.5%2027.1-7.8%209.3-2%2017.3-4.2%2042.3-4.7%2025%20.4%2033%202.8%2042.3%204.8%206.4%201.4%2015.6%204%2027.3%207.7z'/%3e%3cpath%20fill='%230000bf'%20d='M222.6%2091c-3.8%2061.5-7%2089.7-12%20103.2-9.6%2023.2-24.8%2035.9-57.6%2048-32.8-12.1-48-24.8-57.7-48-5-13.6-8-41.7-11.8-103.3%2011.6-3.6%2020.6-6.4%2027.1-7.7%209.3-2%2017.3-4.3%2042.3-4.7%2025%20.4%2033%202.7%2042.3%204.7a284%20284%200%200%201%2027.4%207.7z'/%3e%3cpath%20fill='%23ffdf00'%20d='m153%20109.8%201.5%203.7%207%201-4.5%202.7%204.3%202.9-6.3%201-2%203.4-2-3.5-6-.8%204-3-4.2-2.7%206.7-1z'/%3e%3cpath%20fill='%23fff'%20d='m208.3%20179.6-3.9-3-2.7-4.6-5.4-4.7-2.9-4.7-5.4-4.9-2.6-4.7-3-2.3-1.8-1.9-5%204.3-2.6%204.7-3.3%203-3.7-2.9-2.7-4.8-10.3-18.3-10.3%2018.3-2.7%204.8-3.7%202.9-3.3-3-2.7-4.7-4.9-4.3-1.9%201.8-2.9%202.4-2.6%204.7-5.4%204.9-2.9%204.7-5.4%204.7-2.7%204.6-3.9%203a65.8%2065.8%200%200%200%2018.6%2036.3%20107%20107%200%200%200%2036.6%2020.5%20104.1%20104.1%200%200%200%2036.8-20.5c5.8-6%2016.6-19.3%2018.6-36.3'/%3e%3cpath%20fill='%23ffdf00'%20d='m169.4%2083.9%201.6%203.7%207%201-4.6%202.7%204.4%202.9-6.3%201-2%203.4-2-3.5-6-.8%204-3-4.2-2.7%206.6-1zm-33%200%201.6%203.7%207%20.9-4.5%202.7%204.3%202.9-6.3%201-2%203.4-2-3.4-6-.9%204-3-4.2-2.7%206.7-1z'/%3e%3cpath%20fill='%230000bf'%20d='M199.7%20203h-7.4l-7-.5-8.3-4h-9.4l-8.1%204-6.5.6-6.4-.6-8.1-4H129l-8.4%204-6.9.6-7.6-.1-3.6-6.2.1-.2%2011.2%201.9%206.9-.5%208.3-4.1h9.4l8.2%204%206.4.6%206.5-.6%208.1-4h9.4l8.4%204%206.9.6%2010.8-2%20.2.4zm-86.4%209.5%207.4-.5%208.3-4h9.4l8.2%204%206.4.5%206.4-.5%208.2-4h9.4l8.3%204%207.5.5%204.8-6h-.1l-5.2%201.4-6.9-.5-8.3-4h-9.4l-8.2%204-6.4.6-6.5-.6-8.1-4H129l-8.4%204-6.9.6-5-1.3v.2l4.5%205.6z'/%3e%3c/g%3e%3c/svg%3e")}.fi-si.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-si'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='si-a'%3e%3cpath%20fill-opacity='.7'%20d='M60.2%200h497.3v497.3H60.2z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%20clip-path='url(%23si-a)'%20transform='translate(-62)scale(1.0295)'%3e%3cpath%20fill='%23fff'%20d='M0%200h994.7v497.3H0z'/%3e%3cpath%20fill='%23d50000'%20d='M0%20331.6h994.7v165.7H0z'/%3e%3cpath%20fill='%230000bf'%20d='M0%20165.8h994.7v165.8H0z'/%3e%3cpath%20fill='%23d50000'%20d='M282%2090.3c-3.9%2059.9-6.1%2092.7-15.2%20107.9-9.9%2016.3-19.5%2028.2-58%2042.6-38.4-14.4-48-26.3-57.9-42.6-9-15.2-11.3-48-15.2-107.9l5.7-1.9c11.4-3.5%2020-6.3%2026.3-7.5%209-2%2016.7-4.1%2041-4.6%2024.3.4%2032%202.7%2041%204.6%206.4%201.3%2015.3%204%2026.6%207.5z'/%3e%3cpath%20fill='%230000bf'%20d='M276.4%2088.3c-3.7%2059.8-6.7%2087.2-11.6%20100.3-9.3%2022.6-24.1%2035-56%2046.7-31.8-11.8-46.6-24.1-56-46.7-4.8-13.1-7.9-40.4-11.4-100.3%2011.2-3.5%2020-6.2%2026.3-7.5%209-1.9%2016.7-4.2%2041-4.6%2024.3.4%2032.1%202.7%2041.1%204.6%206.4%201.3%2015.3%204%2026.6%207.5'/%3e%3cpath%20fill='%23ffdf00'%20d='m208.8%20106.6%201.5%203.7%206.7.9-4.3%202.6%204.2%202.8-6.1%201-1.9%203.3-2-3.4-6-.8%204-2.9-4-2.6%206.4-1z'/%3e%3cpath%20fill='%23fff'%20d='m262.5%20174.5-3.7-3-2.7-4.4-5.2-4.6-2.8-4.6-5.2-4.7-2.6-4.6-2.8-2.3-1.9-1.7-4.7%204.1-2.6%204.6-3.3%202.9-3.5-2.8-2.7-4.7-10-17.7-10%2017.7-2.6%204.7-3.6%202.8-3.2-3-2.6-4.5-4.7-4.1-1.9%201.7-2.8%202.3-2.6%204.6-5.2%204.7-2.8%204.6-5.3%204.6-2.6%204.4-3.7%203a64%2064%200%200%200%2018%2035.2c6.4%206.1%2019.5%2014.4%2035.5%2019.9a101%20101%200%200%200%2035.7-20%2064%2064%200%200%200%2018.1-35.1'/%3e%3cpath%20fill='%23ffdf00'%20d='m224.8%2081.5%201.5%203.6%206.7%201-4.3%202.5%204.2%202.9-6.1%201-1.9%203.3-2-3.4-5.9-.8%204-3-4.1-2.5%206.4-1zm-32%200%201.5%203.5%206.7%201-4.3%202.6%204.2%202.8-6.1%201-1.9%203.3-2.1-3.4-5.8-.8%204-2.9-4.1-2.6%206.4-1%201.5-3.6z'/%3e%3cpath%20fill='%230000bf'%20d='M254.2%20197.2H247l-6.7-.5-8.1-4-9.2.1-7.9%203.9-6.2.5-6.3-.5-7.9-3.9h-9.1l-8.1%204-6.7.4h-7.4l-3.5-6%20.1-.2%2010.9%201.8%206.6-.5%208.1-4h9.2l8%204%206.2.5%206.2-.6%208-3.8h9l8.2%203.9%206.7.5%2010.5-1.9.2.3zm-84%209.3%207.2-.5%208.1-4h9.1l8%203.9%206.2.6%206.2-.6%208-3.9h9.1l8.1%204%207.3.5%204.7-5.8-.2-.2-5%201.5-6.7-.5-8.1-4h-9.1l-8%204-6.2.5-6.2-.5-8-4h-9.1l-8.1%204-6.7.5-5-1.2v.2z'/%3e%3c/g%3e%3c/svg%3e")}.fi-sj{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-sj'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23ef2b2d'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23fff'%20d='M180%200h120v480H180z'/%3e%3cpath%20fill='%23fff'%20d='M0%20180h640v120H0z'/%3e%3cpath%20fill='%23002868'%20d='M210%200h60v480h-60z'/%3e%3cpath%20fill='%23002868'%20d='M0%20210h640v60H0z'/%3e%3c/svg%3e")}.fi-sj.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-sj'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23ef2b2d'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fff'%20d='M128%200h128v512H128z'/%3e%3cpath%20fill='%23fff'%20d='M0%20192h512v128H0z'/%3e%3cpath%20fill='%23002868'%20d='M160%200h64v512h-64z'/%3e%3cpath%20fill='%23002868'%20d='M0%20224h512v64H0z'/%3e%3c/svg%3e")}.fi-sk{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-sk'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23ee1c25'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%230b4ea2'%20d='M0%200h640v320H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%200h640v160H0z'/%3e%3cpath%20fill='%23fff'%20d='M233%20370.8c-43-20.7-104.6-61.9-104.6-143.2%200-81.4%204-118.4%204-118.4h201.3s3.9%2037%203.9%20118.4S276%20350%20233%20370.8'/%3e%3cpath%20fill='%23ee1c25'%20d='M233%20360c-39.5-19-96-56.8-96-131.4s3.6-108.6%203.6-108.6h184.8s3.5%2034%203.5%20108.6C329%20303.3%20272.5%20341%20233%20360'/%3e%3cpath%20fill='%23fff'%20d='M241.4%20209c10.7.2%2031.6.6%2050.1-5.6%200%200-.4%206.7-.4%2014.4s.5%2014.4.5%2014.4c-17-5.7-38.1-5.8-50.2-5.7v41.2h-16.8v-41.2c-12-.1-33.1%200-50.1%205.7%200%200%20.5-6.7.5-14.4%200-7.8-.5-14.4-.5-14.4%2018.5%206.2%2039.4%205.8%2050%205.6v-25.9c-9.7%200-23.7.4-39.6%205.7%200%200%20.5-6.6.5-14.4%200-7.7-.5-14.4-.5-14.4%2015.9%205.3%2029.9%205.8%2039.6%205.7-.5-16.4-5.3-37-5.3-37s9.9.7%2013.8.7c4%200%2013.8-.7%2013.8-.7s-4.8%2020.6-5.3%2037c9.7.1%2023.7-.4%2039.6-5.7%200%200-.5%206.7-.5%2014.4%200%207.8.5%2014.4.5%2014.4a119%20119%200%200%200-39.7-5.7v26z'/%3e%3cpath%20fill='%230b4ea2'%20d='M233%20263.3c-19.9%200-30.5%2027.5-30.5%2027.5s-6-13-22.2-13c-11%200-19%209.7-24.2%2018.8%2020%2031.7%2051.9%2051.3%2076.9%2063.4%2025-12%2057-31.7%2076.9-63.4-5.2-9-13.2-18.8-24.2-18.8-16.2%200-22.2%2013-22.2%2013S253%20263.3%20233%20263.3'/%3e%3c/svg%3e")}.fi-sk.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-sk'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23ee1c25'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%230b4ea2'%20d='M0%200h512v341.3H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%200h512v170.7H0z'/%3e%3cpath%20fill='%23fff'%20d='M203.2%20395.5c-45.9-22-111.5-66-111.5-152.8s4.1-126.2%204.1-126.2h214.8s4.2%2039.4%204.2%20126.2S249%20373.4%20203.2%20395.5'/%3e%3cpath%20fill='%23ee1c25'%20d='M203.2%20384c-42.1-20.3-102.3-60.5-102.3-140.2s3.8-115.8%203.8-115.8h197s3.8%2036.2%203.8%20115.8-60.2%20120-102.3%20140.2'/%3e%3cpath%20fill='%23fff'%20d='M212.2%20223c11.4.2%2033.7.6%2053.5-6%200%200-.6%207-.6%2015.3s.6%2015.3.6%2015.3a172%20172%200%200%200-53.5-6v44h-18v-44a172%20172%200%200%200-53.5%206s.6-7%20.6-15.3-.6-15.3-.6-15.3c19.9%206.6%2042.1%206.2%2053.5%206v-27.7a128%20128%200%200%200-42.3%206.1s.5-7%20.5-15.3-.5-15.4-.5-15.4c17%205.7%2031.9%206.2%2042.2%206-.5-17.4-5.6-39.4-5.6-39.4s10.5.8%2014.7.8c4.2%200%2014.7-.8%2014.7-.8s-5.1%2022-5.7%2039.5a126%20126%200%200%200%2042.3-6s-.5%207-.5%2015.3.5%2015.3.5%2015.3c-17-5.7-31.9-6.1-42.3-6z'/%3e%3cpath%20fill='%230b4ea2'%20d='M203.2%20280.8c-21.2%200-32.6%2029.4-32.6%2029.4s-6.3-14-23.6-14c-11.7%200-20.3%2010.5-25.8%2020.2%2021.3%2033.8%2055.3%2054.7%2082%2067.6%2026.7-12.9%2060.7-33.8%2082-67.7-5.5-9.6-14.1-20-25.8-20-17.3%200-23.6%2014-23.6%2014s-11.4-29.5-32.6-29.5'/%3e%3c/svg%3e")}.fi-sl{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-sl'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%230000cd'%20d='M0%20320.3h640V480H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20160.7h640v159.6H0z'/%3e%3cpath%20fill='%2300cd00'%20d='M0%200h640v160.7H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-sl.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-sl'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='sl-a'%3e%3crect%20width='384'%20height='512'%20rx='4.6'%20ry='7.6'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23sl-a)'%20transform='scale(1.33333%201)'%3e%3cpath%20fill='%230000cd'%20d='M0%20341.7h512V512H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20171.4h512v170.3H0z'/%3e%3cpath%20fill='%2300cd00'%20d='M0%200h512v171.4H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-sm{background-image:url(/assets/sm-1NcqoN_z.svg)}.fi-sm.fis{background-image:url(/assets/sm-DHRSzt4z.svg)}.fi-sn{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-sn'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%230b7226'%20d='M0%200h213.3v480H0z'/%3e%3cpath%20fill='%23ff0'%20d='M213.3%200h213.3v480H213.3z'/%3e%3cpath%20fill='%23bc0000'%20d='M426.6%200H640v480H426.6z'/%3e%3c/g%3e%3cpath%20fill='%230b7226'%20d='M342%20218.8h71.8l-56.6%2043.6%2020.7%2069.3-56.6-43.6-56.6%2041.6%2020.7-67.3-56.6-43.6h69.8l22.7-71.3z'/%3e%3c/svg%3e")}.fi-sn.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-sn'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%230b7226'%20d='M0%200h170.7v512H0z'/%3e%3cpath%20fill='%23ff0'%20d='M170.7%200h170.6v512H170.7z'/%3e%3cpath%20fill='%23bc0000'%20d='M341.3%200H512v512H341.3z'/%3e%3c/g%3e%3cpath%20fill='%230b7226'%20d='m197%20351.7%2022-71.7-60.4-46.5h74.5l24.2-76%2022.1%2076H356L295.6%20280l22.1%2074-60.3-46.5z'/%3e%3c/svg%3e")}.fi-so{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-so'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='so-a'%3e%3cpath%20fill-opacity='.7'%20d='M-85.3%200h682.6v512H-85.3z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23so-a)'%20transform='translate(80)scale(.9375)'%3e%3cpath%20fill='%2340a6ff'%20d='M-128%200h768v512h-768z'/%3e%3cpath%20fill='%23fff'%20d='M336.5%20381.2%20254%20327.7l-82.1%2054%2030.5-87.7-82-54.2L222%20239l31.4-87.5%2032.1%2087.3%20101.4.1-81.5%2054.7z'/%3e%3c/g%3e%3c/svg%3e")}.fi-so.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-so'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='so-a'%3e%3cpath%20fill-opacity='.7'%20d='M177.2%200h708.6v708.7H177.2z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23so-a)'%20transform='translate(-128)scale(.72249)'%3e%3cpath%20fill='%2340a6ff'%20d='M0%200h1063v708.7H0z'/%3e%3cpath%20fill='%23fff'%20d='m643%20527.6-114.3-74-113.6%2074.8%2042.3-121.5-113.5-75%20140.4-1%2043.5-121.1%2044.5%20120.8%20140.3.1-112.9%2075.7z'/%3e%3c/g%3e%3c/svg%3e")}.fi-sr{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-sr'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23377e3f'%20d='M.1%200h640v480H.1z'/%3e%3cpath%20fill='%23fff'%20d='M.1%2096h640v288H.1z'/%3e%3cpath%20fill='%23b40a2d'%20d='M.1%20144h640v192H.1z'/%3e%3cpath%20fill='%23ecc81d'%20d='m320%20153.2%2056.4%20173.6-147.7-107.3h182.6L263.6%20326.8z'/%3e%3c/svg%3e")}.fi-sr.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-sr'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23377e3f'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20102.4h512v307.2H0z'/%3e%3cpath%20fill='%23b40a2d'%20d='M0%20153.6h512v204.8H0z'/%3e%3cpath%20fill='%23ecc81d'%20d='m255.9%20163.4%2060.2%20185.2-157.6-114.5h194.8L195.7%20348.6z'/%3e%3c/svg%3e")}.fi-ss{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ss'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23078930'%20d='M0%20336h640v144H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20144h640v192H0z'/%3e%3cpath%20fill='%23000001'%20d='M0%200h640v144H0z'/%3e%3cpath%20fill='%23da121a'%20d='M0%20168h640v144H0z'/%3e%3cpath%20fill='%230f47af'%20d='m0%200%20415.7%20240L0%20480z'/%3e%3cpath%20fill='%23fcdd09'%20d='M200.7%20194.8%2061.7%20240l139%2045.1L114.9%20167v146z'/%3e%3c/svg%3e")}.fi-ss.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ss'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23078930'%20d='M0%20358.4h512V512H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20153.6h512v204.8H0z'/%3e%3cpath%20fill='%23000001'%20d='M0%200h512v153.6H0z'/%3e%3cpath%20fill='%23da121a'%20d='M0%20179.2h512v153.6H0z'/%3e%3cpath%20fill='%230f47af'%20d='m0%200%20433%20256L0%20512z'/%3e%3cpath%20fill='%23fcdd09'%20d='M209%20207.8%2064.4%20256l144.8%2048.1-89.5-126v155.8z'/%3e%3c/svg%3e")}.fi-st{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-st'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%2312ad2b'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23ffce00'%20d='M0%20137.1h640V343H0z'/%3e%3cpath%20fill='%23d21034'%20d='M0%200v480l240-240'/%3e%3cg%20id='st-c'%20transform='translate(351.6%20240)scale(.34286)'%3e%3cg%20id='st-b'%3e%3cpath%20id='st-a'%20fill='%23000001'%20d='M0-200V0h100'%20transform='rotate(18%200%20-200)'/%3e%3cuse%20xlink:href='%23st-a'%20width='100%25'%20height='100%25'%20transform='scale(-1%201)'/%3e%3c/g%3e%3cuse%20xlink:href='%23st-b'%20width='100%25'%20height='100%25'%20transform='rotate(72)'/%3e%3cuse%20xlink:href='%23st-b'%20width='100%25'%20height='100%25'%20transform='rotate(144)'/%3e%3cuse%20xlink:href='%23st-b'%20width='100%25'%20height='100%25'%20transform='rotate(-144)'/%3e%3cuse%20xlink:href='%23st-b'%20width='100%25'%20height='100%25'%20transform='rotate(-72)'/%3e%3c/g%3e%3cuse%20xlink:href='%23st-c'%20width='100%25'%20height='100%25'%20x='700'%20transform='translate(-523.2)'/%3e%3c/svg%3e")}.fi-st.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-st'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%2312ad2b'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23ffce00'%20d='M0%20146.3h512v219.4H0z'/%3e%3cpath%20fill='%23d21034'%20d='M0%200v512l192-256'/%3e%3cg%20id='st-c'%20transform='translate(276.9%20261.5)scale(.33167)'%3e%3cg%20id='st-b'%3e%3cpath%20id='st-a'%20fill='%23000001'%20d='M0-200V0h100'%20transform='rotate(18%200%20-200)'/%3e%3cuse%20xlink:href='%23st-a'%20width='100%25'%20height='100%25'%20transform='scale(-1%201)'/%3e%3c/g%3e%3cuse%20xlink:href='%23st-b'%20width='100%25'%20height='100%25'%20transform='rotate(72)'/%3e%3cuse%20xlink:href='%23st-b'%20width='100%25'%20height='100%25'%20transform='rotate(144)'/%3e%3cuse%20xlink:href='%23st-b'%20width='100%25'%20height='100%25'%20transform='rotate(-144)'/%3e%3cuse%20xlink:href='%23st-b'%20width='100%25'%20height='100%25'%20transform='rotate(-72)'/%3e%3c/g%3e%3cuse%20xlink:href='%23st-c'%20width='100%25'%20height='100%25'%20x='700'%20transform='translate(-550.9)'/%3e%3c/svg%3e")}.fi-sv{background-image:url(/assets/sv-n55iiUxg.svg)}.fi-sv.fis{background-image:url(/assets/sv-BGK8a8aZ.svg)}.fi-sx{background-image:url(/assets/sx-DsF4D6De.svg)}.fi-sx.fis{background-image:url(/assets/sx-DzlMoqh2.svg)}.fi-sy{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-sy'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23000001'%20d='M0%200h640v480H0Z'/%3e%3cpath%20fill='%23fff'%20d='M0%200h640v320H0Z'/%3e%3cpath%20fill='%23ce1126'%20d='M0%200h640v160H0Z'/%3e%3cpath%20fill='%23007a3d'%20d='m161%20300%2039-120%2039%20120-102-74.2h126M401%20300l39-120%2039%20120-102-74.2h126'/%3e%3c/svg%3e")}.fi-sy.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-sy'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23000001'%20d='M0%200h512v512H0Z'/%3e%3cpath%20fill='%23fff'%20d='M0%200h512v341.3H0Z'/%3e%3cpath%20fill='%23ce1126'%20d='M0%200h512v170.7H0Z'/%3e%3cpath%20fill='%23007a3d'%20d='M86.4%20320%20128%20192l41.6%20128-108.9-79.1h134.6M342.4%20320%20384%20192l41.6%20128-108.9-79.1h134.6'/%3e%3c/svg%3e")}.fi-sz{background-image:url(/assets/sz-BC3w3Gmj.svg)}.fi-sz.fis{background-image:url(/assets/sz-DpZ3V1AK.svg)}.fi-tc{background-image:url(/assets/tc-BB3tFO-G.svg)}.fi-tc.fis{background-image:url(/assets/tc-CYGgqbY-.svg)}.fi-td{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-td'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%23002664'%20d='M0%200h214v480H0z'/%3e%3cpath%20fill='%23c60c30'%20d='M426%200h214v480H426z'/%3e%3cpath%20fill='%23fecb00'%20d='M214%200h212v480H214z'/%3e%3c/g%3e%3c/svg%3e")}.fi-td.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-td'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%23002664'%20d='M0%200h171.2v512H0z'/%3e%3cpath%20fill='%23c60c30'%20d='M340.8%200H512v512H340.8z'/%3e%3cpath%20fill='%23fecb00'%20d='M171.2%200h169.6v512H171.2z'/%3e%3c/g%3e%3c/svg%3e")}.fi-tf{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-tf'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cpath%20id='tf-a'%20fill='%23fff'%20d='m0-21%2012.3%2038L-20-6.5h40L-12.3%2017z'/%3e%3c/defs%3e%3cpath%20fill='%23002395'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%200h292.8v196.8H0z'/%3e%3cpath%20fill='%23002395'%20d='M0%200h96v192H0z'/%3e%3cpath%20fill='%23ed2939'%20d='M192%200h96v192h-96z'/%3e%3cpath%20fill='%23fff'%20d='m426%20219.6%2015.4%2024.6h44V330l-33-51.6-44.4%2070.8h21.6l22.8-40.8%2046.8%2084%2046.8-84%2022.8%2040.8h21.6L546%20278.4%20513%20330v-47.4h19.8l14.7-23.4H513v-15h44l15.4-24.6zm51.6%20105h-48v16.8h48zm91.2%200h-48v16.8h48z'/%3e%3cuse%20xlink:href='%23tf-a'%20width='100%25'%20height='100%25'%20x='416'%20y='362'%20transform='scale(1.2)'/%3e%3cuse%20xlink:href='%23tf-a'%20width='100%25'%20height='100%25'%20x='371'%20y='328'%20transform='scale(1.2)'/%3e%3cuse%20xlink:href='%23tf-a'%20width='100%25'%20height='100%25'%20x='461'%20y='328'%20transform='scale(1.2)'/%3e%3cuse%20xlink:href='%23tf-a'%20width='100%25'%20height='100%25'%20x='333'%20y='227'%20transform='scale(1.2)'/%3e%3cuse%20xlink:href='%23tf-a'%20width='100%25'%20height='100%25'%20x='499'%20y='227'%20transform='scale(1.2)'/%3e%3c/svg%3e")}.fi-tf.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-tf'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cpath%20id='tf-a'%20fill='%23fff'%20d='m0-21%2012.3%2038L-20-6.5h40L-12.3%2017z'/%3e%3c/defs%3e%3cpath%20fill='%23002395'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%200h312.3v210H0z'/%3e%3cpath%20fill='%23002395'%20d='M0%200h102.4v204.8H0z'/%3e%3cpath%20fill='%23ed2939'%20d='M204.8%200h102.4v204.8H204.8z'/%3e%3cpath%20fill='%23fff'%20d='m282.4%20234.2%2016.5%2026.3h46.9V352l-35.3-55-47.3%2075.5h23l24.4-43.5%2049.9%2089.6%2049.9-89.6%2024.3%2043.5h23L410.5%20297l-35.2%2055v-50.6h21.1l15.7-25h-36.8v-16h46.9l16.5-26.2zm55%20112h-51.2v18h51.2zm97.3%200h-51.2v18h51.2z'/%3e%3cuse%20xlink:href='%23tf-a'%20width='100%25'%20height='100%25'%20x='416'%20y='362'%20transform='translate(-172)scale(1.28)'/%3e%3cuse%20xlink:href='%23tf-a'%20width='100%25'%20height='100%25'%20x='371'%20y='328'%20transform='translate(-172)scale(1.28)'/%3e%3cuse%20xlink:href='%23tf-a'%20width='100%25'%20height='100%25'%20x='461'%20y='328'%20transform='translate(-172)scale(1.28)'/%3e%3cuse%20xlink:href='%23tf-a'%20width='100%25'%20height='100%25'%20x='333'%20y='227'%20transform='translate(-172)scale(1.28)'/%3e%3cuse%20xlink:href='%23tf-a'%20width='100%25'%20height='100%25'%20x='499'%20y='227'%20transform='translate(-172)scale(1.28)'/%3e%3c/svg%3e")}.fi-tg{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-tg'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='tg-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h682.7v512H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23tg-a)'%20transform='scale(.9375)'%3e%3cpath%20fill='%23ffe300'%20d='M0%200h767.6v512H0z'/%3e%3cpath%20fill='%23118600'%20d='M0%20208.1h767.6V311H0zM0%20.2h767.6v102.9H0z'/%3e%3cpath%20fill='%23d80000'%20d='M0%20.3h306.5v310.6H0z'/%3e%3cpath%20fill='%23fff'%20d='M134.4%20128.4c0-.8%2018.9-53%2018.9-53l17%2052.2s57.4%201.7%2057.4.8-45.3%2034.3-45.3%2034.3%2021.4%2060%2020.5%2058.2c-.8-1.7-49.6-36-49.6-36s-49.7%2034.3-48.8%2034.3c.8%200%2018.8-56.5%2018.8-56.5l-44.5-33.4z'/%3e%3cpath%20fill='%23118600'%20d='M0%20409.2h767.6V512H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-tg.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-tg'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='tg-a'%3e%3cpath%20fill-opacity='.7'%20d='M0-.2h496.3V496H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23tg-a)'%20transform='translate(0%20.3)scale(1.0316)'%3e%3cpath%20fill='%23ffe300'%20d='M0-.2h744V496H0z'/%3e%3cpath%20fill='%23118600'%20d='M0%20201.5h744v99.7H0zM0%200h744v99.7H0z'/%3e%3cpath%20fill='%23d80000'%20d='M0%200h297.1v301.2H0z'/%3e%3cpath%20fill='%23fff'%20d='M130.3%20124.3c0-.9%2018.3-51.5%2018.3-51.5l16.6%2050.6s55.6%201.7%2055.6.8-44%2033.2-44%2033.2%2020.7%2058.1%2019.9%2056.5c-.8-1.7-48.1-34.9-48.1-34.9s-48.2%2033.2-47.3%2033.2%2018.2-54.7%2018.2-54.7L76.4%20125z'/%3e%3cpath%20fill='%23118600'%20d='M0%20396.4h744v99.7H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-th{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-th'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%23f4f5f8'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%232d2a4a'%20d='M0%20162.5h640v160H0z'/%3e%3cpath%20fill='%23a51931'%20d='M0%200h640v82.5H0zm0%20400h640v80H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-th.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-th'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%23f4f5f8'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%232d2a4a'%20d='M0%20173.4h512V344H0z'/%3e%3cpath%20fill='%23a51931'%20d='M0%200h512v88H0zm0%20426.7h512V512H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-tj{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-tj'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23060'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%200h640v342.9H0z'/%3e%3cpath%20fill='%23c00'%20d='M0%200h640v137.1H0z'/%3e%3cpath%20fill='%23f8c300'%20d='M300.8%20233.6a8.6%208.6%200%200%201%2016%204V272h6.4v-34.3a8.6%208.6%200%200%201%2016-4%2020.2%2020.2%200%201%200-38.4%200'/%3e%3cpath%20fill='%23fff'%20d='M305.4%20224.7a13.7%2013.7%200%200%201%2014.6%206.5%2013.7%2013.7%200%200%201%2014.6-6.5%2014.7%2014.7%200%200%200-29.2%200'/%3e%3cpath%20id='tj-a'%20fill='%23f8c300'%20d='M316.8%20258.3a26%2026%200%200%201-43.8%2016.6%2027%2027%200%200%201-41%2012c2.5%2025%2040%2019.9%2042.8-4.4%2011.7%2020.7%2037.6%2014.7%2045.2-10.6z'/%3e%3cuse%20xlink:href='%23tj-a'%20width='100%25'%20height='100%25'%20fill='%23f8c300'%20transform='matrix(-1%200%200%201%20640%200)'/%3e%3cpath%20id='tj-b'%20fill='%23f8c300'%20d='M291.8%20302.6c-5.3%2011.3-15.7%2013.2-24.8%204.1%200%200%203.6-2.6%207.6-3.3-.8-3.1.7-7.5%202.9-9.8a15%2015%200%200%201%206.1%208.1c5.5-.7%208.2%201%208.2%201z'/%3e%3cuse%20xlink:href='%23tj-b'%20width='100%25'%20height='100%25'%20fill='%23f8c300'%20transform='rotate(9.4%20320%20551.3)'/%3e%3cuse%20xlink:href='%23tj-b'%20width='100%25'%20height='100%25'%20fill='%23f8c300'%20transform='rotate(18.7%20320%20551.3)'/%3e%3cpath%20fill='none'%20stroke='%23f8c300'%20stroke-width='11'%20d='M253.5%20327.8a233.1%20233.1%200%200%201%20133%200'/%3e%3cg%20fill='%23f8c300'%20transform='translate(320%20164.6)scale(.68571)'%3e%3cpath%20id='tj-c'%20d='m301930%20415571-790463-574305h977066l-790463%20574305L0-513674z'%20transform='scale(.00005)'/%3e%3c/g%3e%3cg%20id='tj-d'%20fill='%23f8c300'%20transform='translate(320%20260.6)scale(.68571)'%3e%3cuse%20xlink:href='%23tj-c'%20width='100%25'%20height='100%25'%20transform='translate(-70%20-121.2)'/%3e%3cuse%20xlink:href='%23tj-c'%20width='100%25'%20height='100%25'%20transform='translate(-121.2%20-70)'/%3e%3cuse%20xlink:href='%23tj-c'%20width='100%25'%20height='100%25'%20transform='translate(-140)'/%3e%3c/g%3e%3cuse%20xlink:href='%23tj-d'%20width='100%25'%20height='100%25'%20fill='%23f8c300'%20transform='matrix(-1%200%200%201%20640%200)'/%3e%3c/svg%3e")}.fi-tj.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-tj'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23060'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%200h512v365.7H0z'/%3e%3cpath%20fill='%23c00'%20d='M0%200h512v146.3H0z'/%3e%3cg%20fill='%23f8c300'%20transform='translate(-256)scale(.73143)'%3e%3cpath%20d='M672%20340.7a12.5%2012.5%200%200%201%2023.3%205.9v50h9.4v-50a12.5%2012.5%200%200%201%2023.3-5.9%2029.5%2029.5%200%201%200-56%200'/%3e%3cpath%20fill='%23fff'%20d='M678.7%20327.6a20%2020%200%200%201%2021.3%209.6%2020%2020%200%200%201%2021.3-9.6%2021.5%2021.5%200%200%200-42.6%200'/%3e%3cpath%20id='tj-a'%20d='M695.3%20376.6a38%2038%200%200%201-63.8%2024.3%2039.5%2039.5%200%200%201-59.8%2017.5c3.7%2036.4%2058.3%2029%2062.3-6.4%2017.2%2030.1%2055%2021.5%2066-15.4z'/%3e%3cuse%20xlink:href='%23tj-a'%20width='100%25'%20height='100%25'%20transform='matrix(-1%200%200%201%201400%200)'/%3e%3cpath%20id='tj-b'%20d='M658.8%20441.3c-7.6%2016.5-22.8%2019.3-36.1%206%200%200%205.3-3.8%2011-4.8a18%2018%200%200%201%204.3-14.3%2022%2022%200%200%201%209%2011.8c8-1%2011.8%201.3%2011.8%201.3'/%3e%3cuse%20xlink:href='%23tj-b'%20width='100%25'%20height='100%25'%20transform='rotate(9.4%20700%20804)'/%3e%3cuse%20xlink:href='%23tj-b'%20width='100%25'%20height='100%25'%20transform='rotate(18.7%20700%20804)'/%3e%3cpath%20fill='none'%20stroke='%23f8c300'%20stroke-width='16'%20d='M603%20478a340%20340%200%200%201%20194%200'/%3e%3cg%20transform='translate(700%20380)'%3e%3cg%20transform='translate(0%20-140)'%3e%3cpath%20id='tj-c'%20d='m488533-158734-790463%20574305L0-513674l301930%20929245-790463-574305z'%20transform='scale(.00005)'/%3e%3c/g%3e%3cg%20id='tj-d'%3e%3cuse%20xlink:href='%23tj-c'%20width='100%25'%20height='100%25'%20transform='translate(-70%20-121.2)'/%3e%3cuse%20xlink:href='%23tj-c'%20width='100%25'%20height='100%25'%20transform='translate(-121.2%20-70)'/%3e%3cuse%20xlink:href='%23tj-c'%20width='100%25'%20height='100%25'%20transform='translate(-140)'/%3e%3c/g%3e%3cuse%20xlink:href='%23tj-d'%20width='100%25'%20height='100%25'%20transform='scale(-1%201)'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}.fi-tk{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-tk'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%2300247d'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23fed100'%20d='M108.1%20354.6c-6.7-.1%2062.8-37%20120.9-84.4%2076.2-62.1%20240.3-161.4%20288.6-177.6%205-1.7-10.3%208.6-12.3%2011.9-51.5%2061-10.4%20176%2054%20233.9%2019.4%2014.8%2018.4%2015.6%2054.3%2017v3.4zm-4.2%206.7s-4.9%203.5-4.9%206.1c0%202.9%205.5%206.7%205.5%206.7l498.5%205.5%209.2-6.1-12.8-7.9z'/%3e%3cpath%20fill='%23fff'%20d='m106.8%20109.1-4%2012.2%2010.4-7.5%2010.3%207.5-3.9-12.2%2010.3-7.5h-12.8l-3.9-12.2-4%2012.2H96.4zm78.1%2057.4%208.6-6.3h-10.7l-3.3-10.1-3.3%2010.1h-10.6l8.6%206.3-3.3%2010.1%208.6-6.3%208.7%206.3zm-145.2%2013-4-12.2-3.9%2012.2H19l10.3%207.5-3.9%2012.2%2010.3-7.5%2010.4%207.5-4-12.2%2010.4-7.5zm78.1%20122.3-4.6-14.2-4.6%2014.2h-15l12.1%208.7-4.6%2014.3%2012.1-8.8%2012.1%208.8-4.7-14.3%2012.1-8.7z'/%3e%3c/svg%3e")}.fi-tk.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-tk'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%2300247d'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fed100'%20d='M90.7%20384.2c-5.3%200%2050-29.5%2096.4-67.2%2060.7-49.5%20191.5-128.7%20230-141.5%204-1.3-8.2%206.8-9.8%209.5-41.1%2048.6-8.3%20140.3%2043%20186.4%2015.4%2011.8%2014.6%2012.4%2043.2%2013.6v2.7zm-3.3%205.4s-3.9%202.8-3.9%204.9c0%202.3%204.4%205.4%204.4%205.4l397.3%204.4%207.3-4.9-10.2-6.3z'/%3e%3cpath%20fill='%23fff'%20d='m105.5%20116.6-4%2012.1%2010.4-7.5%2010.3%207.5-4-12.1%2010.4-7.5h-12.8l-3.9-12.2-4%2012.2H95.2zm77.8%2057.1%208.6-6.2h-10.6l-3.3-10.1-3.3%2010.1h-10.6l8.6%206.2-3.3%2010.1%208.6-6.2%208.6%206.2zm-144.7%2013-3.9-12.1-4%2012.1H18l10.3%207.5-4%2012.1%2010.4-7.5%2010.3%207.5-3.9-12.1%2010.3-7.5zm77.9%20121.9-4.6-14.2-4.6%2014.2H92.4l12%208.7-4.6%2014.2%2012.1-8.8%2012%208.8-4.6-14.2%2012-8.7z'/%3e%3c/svg%3e")}.fi-tl{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-tl'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='tl-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h682.7v512H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23tl-a)'%20transform='scale(.9375)'%3e%3cpath%20fill='%23cb000f'%20d='M0%200h1031.2v512H0z'/%3e%3cpath%20fill='%23f8c00c'%20d='M0%200c3.2%200%20512%20256.7%20512%20256.7L0%20512z'/%3e%3cpath%20fill='%23000001'%20d='M0%200c2.1%200%20340.6%20256.7%20340.6%20256.7L0%20512z'/%3e%3cpath%20fill='%23fff'%20d='M187.7%20298.2%20127%20284.7l-31%2052.8-5-59.7-60.7-13.3%2054.9-24.9-3.3-59.3%2040.2%2043.4%2055.4-25.3-28.9%2054%2039.2%2045.8z'/%3e%3c/g%3e%3c/svg%3e")}.fi-tl.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-tl'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='tl-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h496v496H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23tl-a)'%20transform='scale(1.0321)'%3e%3cpath%20fill='%23cb000f'%20d='M0%200h999v496H0z'/%3e%3cpath%20fill='%23f8c00c'%20d='M0%200c3.1%200%20496%20248.7%20496%20248.7L0%20496.1z'/%3e%3cpath%20fill='%23000001'%20d='M0%200c2%200%20330%20248.7%20330%20248.7L0%20496.1z'/%3e%3cpath%20fill='%23fff'%20d='m181.9%20288.9-59-13L93%20327l-5-57.8-58.8-13%2053.1-24-3.2-57.5%2039%2042%2053.6-24.4-28%2052.2%2038%2044.4z'/%3e%3c/g%3e%3c/svg%3e")}.fi-tm{background-image:url(/assets/tm-MQp6IHsv.svg)}.fi-tm.fis{background-image:url(/assets/tm-CCv743R_.svg)}.fi-tn{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-tn'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23e70013'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23fff'%20d='M320%20119.2a1%201%200%200%200-1%20240.3%201%201%200%200%200%201-240.3M392%20293a90%2090%200%201%201%200-107%2072%2072%200%201%200%200%20107m-4.7-21.7-37.4-12.1-23.1%2031.8v-39.3l-37.4-12.2%2037.4-12.2V188l23.1%2031.8%2037.4-12.1-23.1%2031.8z'/%3e%3c/svg%3e")}.fi-tn.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-tn'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23e70013'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fff'%20d='M256%20135a1%201%200%200%200-1%20240%201%201%200%200%200%200-241zm72%20174a90%2090%200%201%201%200-107%2072%2072%200%201%200%200%20107m-4.7-21.7-37.4-12.1-23.1%2031.8v-39.3l-37.3-12.2%2037.3-12.2v-39.4l23.1%2031.9%2037.4-12.1-23.1%2031.8z'/%3e%3c/svg%3e")}.fi-to{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-to'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23c10000'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%200h250v200.3H0z'/%3e%3cg%20fill='%23c10000'%3e%3cpath%20d='M102.8%2031.2h39.9v139.6h-39.8z'/%3e%3cpath%20d='M192.6%2081v40H53V81z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}.fi-to.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-to'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23c10000'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%200h218.3v175H0z'/%3e%3cg%20fill='%23c10000'%3e%3cpath%20d='M89.8%2027.3h34.8v121.9H89.8z'/%3e%3cpath%20d='M168.2%2070.8v34.8H46.3V70.8z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}.fi-tr{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-tr'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%23e30a17'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23fff'%20d='M407%20247.5c0%2066.2-54.6%20119.9-122%20119.9s-122-53.7-122-120%2054.6-119.8%20122-119.8%20122%2053.7%20122%20119.9'/%3e%3cpath%20fill='%23e30a17'%20d='M413%20247.5c0%2053-43.6%2095.9-97.5%2095.9s-97.6-43-97.6-96%2043.7-95.8%2097.6-95.8%2097.6%2042.9%2097.6%2095.9z'/%3e%3cpath%20fill='%23fff'%20d='m430.7%20191.5-1%2044.3-41.3%2011.2%2040.8%2014.5-1%2040.7%2026.5-31.8%2040.2%2014-23.2-34.1%2028.3-33.9-43.5%2012-25.8-37z'/%3e%3c/g%3e%3c/svg%3e")}.fi-tr.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-tr'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%23e30a17'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fff'%20d='M348.8%20264c0%2070.6-58.3%20127.9-130.1%20127.9s-130.1-57.3-130.1-128%2058.2-127.8%20130-127.8S348.9%20193.3%20348.9%20264z'/%3e%3cpath%20fill='%23e30a17'%20d='M355.3%20264c0%2056.5-46.6%20102.3-104.1%20102.3s-104-45.8-104-102.3%2046.5-102.3%20104-102.3%20104%2045.8%20104%20102.3z'/%3e%3cpath%20fill='%23fff'%20d='m374.1%20204.2-1%2047.3-44.2%2012%2043.5%2015.5-1%2043.3%2028.3-33.8%2042.9%2014.8-24.8-36.3%2030.2-36.1-46.4%2012.8z'/%3e%3c/g%3e%3c/svg%3e")}.fi-tt{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-tt'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23e00000'%20fill-rule='evenodd'%20d='M463.7%20480%200%201v478.8zM176.3%200%20640%20479V.2z'/%3e%3cpath%20fill='%23000001'%20fill-rule='evenodd'%20d='M27.7.2h118.6l468.2%20479.3H492.2z'/%3e%3c/svg%3e")}.fi-tt.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-tt'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23fff'%20d='M0%200h512v512H0z'%20style='width:0'/%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%23e00000'%20d='M371%20512%200%201v510.7zM141%200l371%20511V.2z'/%3e%3cpath%20fill='%23000001'%20d='M22.2.2h94.9l374.5%20511.3h-97.9z'/%3e%3c/g%3e%3c/svg%3e")}.fi-tv{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-tv'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23009fca'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23fff40d'%20fill-rule='evenodd'%20d='M593.3%20122.7H621l-22.3%2015.2%208.5%2024.7-22.3-15.3-22.2%2015.3%208.5-24.7-22.3-15.2h27.5l8.5-24.7zm-69.2%20196.8h27.6l-22.3%2015.2%208.5%2024.7-22.3-15.3-22.3%2015.3%208.6-24.7-22.3-15.2H507l8.5-24.7zm69.2-44.6H621l-22.3%2015.2%208.5%2024.7-22.3-15.3-22.2%2015.3%208.5-24.7-22.3-15.2h27.5l8.5-24.7zM295.8%20417.7h27.6L301%20432.8l8.6%2024.6-22.3-15.2-22.3%2015.2%208.6-24.6-22.4-15.3h27.6l8.5-24.6zm62.6-76.5h-27.6l22.3-15.3-8.5-24.6%2022.3%2015.2%2022.3-15.2-8.6%2024.6%2022.3%2015.3h-27.5l-8.5%2024.6zm81.3-112.5H412l22.3-15.2-8.5-24.7%2022.3%2015.3%2022.3-15.3-8.6%2024.7%2022.3%2015.2h-27.5l-8.5%2024.7zm68.3-23.3h-27.6l22.4-15.3-8.6-24.6%2022.3%2015.2%2022.3-15.2-8.6%2024.6%2022.4%2015.3H525l-8.5%2024.6zM439.7%20400H412l22.3-15.2L426%20360l22.3%2015.2%2022.3-15.2-8.6%2024.7%2022.3%2015.2h-27.5l-8.5%2024.7zm-81.3%2019.9h-27.6l22.3-15.2-8.5-24.7%2022.3%2015.2%2022.3-15.2-8.6%2024.6L403%20420h-27.5l-8.5%2024.7z'/%3e%3cpath%20fill='%23012169'%20d='M0%200h320v240H0z'/%3e%3cpath%20fill='%23FFF'%20d='m37.5%200%20122%2090.5L281%200h39v31l-120%2089.5%20120%2089V240h-40l-120-89.5L40.5%20240H0v-30l119.5-89L0%2032V0z'/%3e%3cpath%20fill='%23C8102E'%20d='M212%20140.5%20320%20220v20l-135.5-99.5zm-92%2010%203%2017.5-96%2072H0zM320%200v1.5l-124.5%2094%201-22L295%200zM0%200l119.5%2088h-30L0%2021z'/%3e%3cpath%20fill='%23FFF'%20d='M120.5%200v240h80V0zM0%2080v80h320V80z'/%3e%3cpath%20fill='%23C8102E'%20d='M0%2096.5v48h320v-48zM136.5%200v240h48V0z'/%3e%3c/svg%3e")}.fi-tv.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-tv'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23009fca'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fff40d'%20fill-rule='evenodd'%20d='m478%20226.3%207.1%2020.4-18.4-12.6-18.5%2012.6%207.1-20.4-18.5-12.6h22.9l7-20.4%207%2020.4h22.8zm-57.2%20162.8%207%2020.4-18.4-12.7-18.4%2012.7%207-20.4-18.4-12.7h22.8l7-20.4%207%2020.5h22.9zm57.3-36.9%207%2020.4-18.4-12.6-18.5%2012.6%207.1-20.4-18.5-12.6h22.9l7-20.4%207%2020.4h22.8zm-246.2%20118%207.1%2020.5-18.4-12.7-18.5%2012.7%207.1-20.4-18.5-12.6h22.8l7-20.4%207.1%2020.4h22.8zm43.1-88.4-7-20.4%2018.4%2012.6%2018.4-12.6-7%2020.4%2018.4%2012.6h-22.8l-7%2020.4-7-20.4h-22.8zm67.3-93-7.1-20.4%2018.4%2012.6%2018.5-12.6-7%2020.4%2018.4%2012.6h-22.8l-7%2020.4-7-20.4h-22.9zm56.5-19.3-7-20.4%2018.4%2012.6%2018.4-12.6-7%2020.4%2018.4%2012.6h-22.8l-7%2020.4-7-20.4h-22.9zm-56.5%20161-7.1-20.4%2018.4%2012.6%2018.5-12.6-7%2020.4%2018.4%2012.6h-22.8l-7%2020.4-7-20.4h-22.9zM275%20446.9l-7-20.4%2018.4%2012.6%2018.4-12.6-7%2020.4%2018.4%2012.6h-22.8l-7%2020.4-7-20.4h-22.8z'/%3e%3cpath%20fill='%23012169'%20d='M0%200h256v256H0z'/%3e%3cpath%20fill='%23FFF'%20d='M256%200v32l-95%2096%2095%2093.5V256h-33.5L127%20162l-93%2094H0v-34l93-93.5L0%2037V0h31l96%2094%2093-94z'/%3e%3cpath%20fill='%23C8102E'%20d='m92%20162%205.5%2017L21%20256H0v-1.5zm62-6%2027%204%2075%2073.5V256zM256%200l-96%2098-2-22%2075-76zM0%20.5%2096.5%2095%2067%2091%200%2024.5z'/%3e%3cpath%20fill='%23FFF'%20d='M88%200v256h80V0zM0%2088v80h256V88z'/%3e%3cpath%20fill='%23C8102E'%20d='M0%20104v48h256v-48zM104%200v256h48V0z'/%3e%3c/svg%3e")}.fi-tw{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-tw'%20viewBox='0%200%20640%20480'%3e%3cclipPath%20id='tw-a'%3e%3cpath%20d='M0%200h640v480H0z'/%3e%3c/clipPath%3e%3cg%20clip-path='url(%23tw-a)'%3e%3cpath%20fill='red'%20d='M0%200h720v480H0z'/%3e%3cpath%20fill='%23000095'%20d='M0%200h360v240H0z'/%3e%3cg%20fill='%23fff'%3e%3cpath%20d='m154%20126.9-2.5%209.6%209.4%202.6-1.8-7.1zm46.9%205.1-1.8%207.1%209.4-2.6-2.5-9.6zm-41.8-24-5.1%205.1%201.9%206.9z'/%3e%3cpath%20d='m155.9%20120-1.9%206.9%205.1%205.1z'/%3e%3cpath%20d='m154%20113.1-6.9%206.9%206.9%206.9%201.9-6.9zm14%2027.8%205.1%205.1%206.9-1.9zm18.9%205.1%209.6%202.5%202.6-9.4-7.1%201.8z'/%3e%3cpath%20d='m192%20140.9%207.1-1.8%201.8-7.1zm-31.1-1.8%202.6%209.4%209.6-2.5-5.1-5.1zm19.1%205%206.9%201.9%205.1-5.1z'/%3e%3cpath%20d='m173.1%20146%206.9%206.9%206.9-6.9-6.9-1.9zm-12.2-45.1-9.4%202.6%202.5%209.6%205.1-5.1zm-1.8%2031.1%201.8%207.1%207.1%201.8zm45-12%201.9-6.9-5.1-5.1z'/%3e%3cpath%20d='m168%2099.1-7.1%201.8-1.8%207.1zm32.9%208.9-1.8-7.1-7.1-1.8zm5.1%2018.9%206.9-6.9-6.9-6.9-1.9%206.9z'/%3e%3cpath%20d='m200.9%20108-8.9-8.9-12-3.2-12%203.2-8.9%208.9-3.2%2012%203.2%2012%208.9%208.9%2012%203.2%2012-3.2%208.9-8.9%203.2-12z'/%3e%3cpath%20d='m200.9%20132%205.1-5.1-1.9-6.9zm5.1-18.9%202.5-9.6-9.4-2.6%201.8%207.1zm-6.9-12.2-2.6-9.4-9.6%202.5%205.1%205.1zm-26-6.9-9.6-2.5-2.6%209.4%207.1-1.8zm6.9%201.9-6.9-1.9-5.1%205.1z'/%3e%3cpath%20d='m186.9%2094-6.9-6.9-6.9%206.9%206.9%201.9z'/%3e%3cpath%20d='m192%2099.1-5.1-5.1-6.9%201.9zM173.1%20146l-9.6%202.5%204.5%2016.6%2012-12.2zm-5.1%2019.1%2012%2044.9%2012-44.9-12-12.2zm-7.1-26-9.4-2.6-4.4%2016.4%2016.4-4.4z'/%3e%3cpath%20d='m147.1%20152.9-12%2045.1%2032.9-32.9-4.5-16.6zm-12-20.9L102%20165.1l45.1-12.2%204.4-16.4z'/%3e%3cpath%20d='m154%20126.9-6.9-6.9-12%2012%2016.4%204.5zm0-13.8-2.5-9.6-16.4%204.5%2012%2012z'/%3e%3cpath%20d='M135.1%20108%2090%20120l45.1%2012%2012-12zm90%2024-16.6%204.5%204.4%2016.4%2045.1%2012.2z'/%3e%3cpath%20d='m199.1%20139.1-2.6%209.4%2016.4%204.4-4.4-16.4zm-12.2%206.9-6.9%206.9%2012%2012.2%204.5-16.6zm19.1-19.1%202.5%209.6%2016.6-4.5-12.2-12z'/%3e%3cpath%20d='m192%20165.1%2033.1%2032.9-12.2-45.1-16.4-4.4zm7.1-64.2%209.4%202.6%204.4-16.4-16.4%204.4z'/%3e%3cpath%20d='M225.1%20108%20258%2075.1l-45.1%2012-4.4%2016.4zm-12.2-20.9L225.1%2042%20192%2075.1l4.5%2016.4zm12.2%2044.9%2044.9-12-44.9-12-12.2%2012z'/%3e%3cpath%20d='m206%20113.1%206.9%206.9%2012.2-12-16.6-4.5zm-38-38L135.1%2042l12%2045.1%2016.4%204.4z'/%3e%3cpath%20d='m160.9%20100.9%202.6-9.4-16.4-4.4%204.4%2016.4z'/%3e%3cpath%20d='m147.1%2087.1-45.1-12%2033.1%2032.9%2016.4-4.5zm39.8%206.9%209.6-2.5-4.5-16.4-12%2012z'/%3e%3cpath%20d='M192%2075.1%20180%2030l-12%2045.1%2012%2012z'/%3e%3cpath%20d='m173.1%2094%206.9-6.9-12-12-4.5%2016.4z'/%3e%3c/g%3e%3ccircle%20cx='180'%20cy='120'%20r='51.1'%20fill='%23000095'/%3e%3ccircle%20cx='180'%20cy='120'%20r='45.1'%20fill='%23fff'/%3e%3c/g%3e%3c/svg%3e")}.fi-tw.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-tw'%20viewBox='0%200%20512%20512'%3e%3cclipPath%20id='tw-a'%3e%3cpath%20d='M0%200h512v512H0z'/%3e%3c/clipPath%3e%3cg%20clip-path='url(%23tw-a)'%3e%3cpath%20fill='red'%20d='M0%200h768v512H0z'/%3e%3cpath%20fill='%23000095'%20d='M0%200h384v256H0z'/%3e%3cg%20fill='%23fff'%3e%3cpath%20d='m164.3%20135.4-2.7%2010.2%2010.1%202.7-2-7.4zm50%205.5-2%207.4%2010.1-2.7-2.7-10.2zm-44.6-25.8-5.4%205.5%202%207.4z'/%3e%3cpath%20d='m166.3%20128-2%207.4%205.4%205.5z'/%3e%3cpath%20d='m164.3%20120.6-7.4%207.4%207.4%207.4%202-7.4zm14.8%2029.7%205.5%205.4%207.4-2zm20.3%205.4%2010.2%202.7%202.7-10.1-7.4%202z'/%3e%3cpath%20d='m204.9%20150.3%207.4-2%202-7.4zm-33.2-2%202.7%2010.1%2010.2-2.7-5.5-5.4zm20.3%205.4%207.4%202%205.5-5.4z'/%3e%3cpath%20d='m184.6%20155.7%207.4%207.4%207.4-7.4-7.4-2zm-12.9-48-10.1%202.7%202.7%2010.2%205.4-5.5zm-2%2033.2%202%207.4%207.4%202zm48-12.9%202-7.4-5.4-5.5z'/%3e%3cpath%20d='m179.1%20105.7-7.4%202-2%207.4zm35.2%209.4-2-7.4-7.4-2zm5.4%2020.3%207.4-7.4-7.4-7.4-2%207.4z'/%3e%3cpath%20d='m214.3%20115.1-9.4-9.4-12.9-3.4-12.9%203.4-9.4%209.4-3.4%2012.9%203.4%2012.9%209.4%209.4%2012.9%203.4%2012.9-3.4%209.4-9.4%203.4-12.9z'/%3e%3cpath%20d='m214.3%20140.9%205.4-5.5-2-7.4zm5.4-20.3%202.7-10.2-10.1-2.7%202%207.4zm-7.4-12.9-2.7-10.1-10.2%202.7%205.5%205.4zm-27.7-7.4-10.2-2.7-2.7%2010.1%207.4-2z'/%3e%3cpath%20d='m192%20102.3-7.4-2-5.5%205.4z'/%3e%3cpath%20d='m199.4%20100.3-7.4-7.4-7.4%207.4%207.4%202z'/%3e%3cpath%20d='m204.9%20105.7-5.5-5.4-7.4%202zm-20.3%2050-10.2%202.7%204.7%2017.6%2012.9-12.9zm-5.5%2020.3%2012.9%2048%2012.9-48-12.9-12.9zm-7.4-27.7-10.1-2.7-4.7%2017.5%2017.5-4.7z'/%3e%3cpath%20d='m156.9%20163.1-12.9%2048%2035.1-35.1-4.7-17.6zM144%20140.9%20108.9%20176l48-12.9%204.7-17.5z'/%3e%3cpath%20d='m164.3%20135.4-7.4-7.4-12.9%2012.9%2017.6%204.7zm0-14.8-2.7-10.2-17.6%204.7%2012.9%2012.9z'/%3e%3cpath%20d='M144%20115.1%2096%20128l48%2012.9%2012.9-12.9zm96%2025.8-17.6%204.7%204.7%2017.5%2048%2012.9z'/%3e%3cpath%20d='m212.3%20148.3-2.7%2010.1%2017.5%204.7-4.7-17.5zm-12.9%207.4-7.4%207.4%2012.9%2012.9%204.7-17.6zm20.3-20.3%202.7%2010.2%2017.6-4.7-12.9-12.9zM204.9%20176l35.1%2035.1-12.9-48-17.5-4.7zm7.4-68.3%2010.1%202.7%204.7-17.5-17.5%204.7zm27.7%207.4L275.1%2080l-48%2012.9-4.7%2017.5zm-12.9-22.2%2012.9-48L204.9%2080l4.7%2017.6zm12.9%2048%2048-12.9-48-12.9-12.9%2012.9z'/%3e%3cpath%20d='m219.7%20120.6%207.4%207.4%2012.9-12.9-17.6-4.7zM179.1%2080%20144%2044.9l12.9%2048%2017.5%204.7zm-7.4%2027.7%202.7-10.1-17.5-4.7%204.7%2017.5z'/%3e%3cpath%20d='m156.9%2092.9-48-12.9%2035.1%2035.1%2017.6-4.7zm42.5%207.4%2010.2-2.7-4.7-17.6L192%2092.9z'/%3e%3cpath%20d='M204.9%2080%20192%2032l-12.9%2048L192%2092.9z'/%3e%3cpath%20d='m184.6%20100.3%207.4-7.4L179.1%2080l-4.7%2017.6z'/%3e%3c/g%3e%3ccircle%20cx='192'%20cy='128'%20r='54.4'%20fill='%23000095'/%3e%3ccircle%20cx='192'%20cy='128'%20r='48'%20fill='%23fff'/%3e%3c/g%3e%3c/svg%3e")}.fi-tz{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-tz'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='tz-a'%3e%3cpath%20fill-opacity='.7'%20d='M10%200h160v120H10z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%20clip-path='url(%23tz-a)'%20transform='matrix(4%200%200%204%20-40%200)'%3e%3cpath%20fill='%2309f'%20d='M0%200h180v120H0z'/%3e%3cpath%20fill='%23090'%20d='M0%200h180L0%20120z'/%3e%3cpath%20fill='%23000001'%20d='M0%20120h40l140-95V0h-40L0%2095z'/%3e%3cpath%20fill='%23ff0'%20d='M0%2091.5%20137.2%200h13.5L0%20100.5zM29.3%20120%20180%2019.5v9L42.8%20120z'/%3e%3c/g%3e%3c/svg%3e")}.fi-tz.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-tz'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='tz-a'%3e%3cpath%20fill-opacity='.7'%20d='M102.9%200h496v496H103z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23tz-a)'%20transform='translate(-106.2)scale(1.0321)'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%2309f'%20d='M0%200h744.1v496H0z'/%3e%3cpath%20fill='%23090'%20d='M0%200h744.1L0%20496z'/%3e%3cpath%20fill='%23000001'%20d='M0%20496h165.4L744%20103.4V0H578.7L0%20392.7v103.4z'/%3e%3cpath%20fill='%23ff0'%20d='M0%20378%20567%200h56L0%20415.3v-37.2zm121.1%20118%20623-415.3V118L177%20496z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}.fi-ua{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ua'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='gold'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%230057b8'%20d='M0%200h640v240H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-ua.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ua'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='gold'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%230057b8'%20d='M0%200h512v256H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-ug{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ug'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='ug-a'%3e%3cpath%20fill-opacity='.7'%20d='M-85.3%200h682.6v512H-85.3z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23ug-a)'%20transform='translate(80)scale(.9375)'%3e%3cpath%20fill='%23ffe700'%20fill-rule='evenodd'%20d='M-128%20341.4h768v85.3h-768z'/%3e%3cpath%20fill='%23000001'%20fill-rule='evenodd'%20d='M-128%20256h768v85.3h-768z'/%3e%3cpath%20fill='%23de3908'%20fill-rule='evenodd'%20d='M-128%20170.7h768V256h-768z'/%3e%3cpath%20fill='%23ffe700'%20fill-rule='evenodd'%20d='M-128%2085.4h768v85.3h-768z'/%3e%3cpath%20fill='%23000001'%20fill-rule='evenodd'%20d='M-128%200h768v85.3h-768z'/%3e%3cpath%20fill='%23fffdff'%20fill-rule='evenodd'%20stroke='%23000'%20d='M335.7%20256a79.7%2079.7%200%201%201-159.4%200%2079.7%2079.7%200%200%201%20159.4%200z'/%3e%3cpath%20fill='%23de3108'%20fill-rule='evenodd'%20stroke='%23000'%20d='m242%20194.9-5.2-9.5c2-2%205.3-3.6%2010.7-3.6l-.6%2010.5z'/%3e%3cpath%20fill='%23ffe700'%20fill-rule='evenodd'%20stroke='%23000'%20d='m247%20192.3.7-10.5s10.7-.6%2016.5%206.4l-5.7%208.2z'/%3e%3cpath%20fill='%23de3108'%20fill-rule='evenodd'%20stroke='%23000'%20d='m258.6%20196.3%205.3-8.2c3.5%203.7%205%206.3%205.5%2010.3.1.1-8.3%202.1-8.3%202z'/%3e%3cpath%20fill-rule='evenodd'%20stroke='%23000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='.9'%20d='M244.6%20331.1s9.9-11.3%2029.1-8.9c-2.9-4.7-12.3-4.1-12.3-4.1s-2.8-22-.6-23.2%2012%20.1%2012%20.1c1.2%200%203.4-3.4%201.6-5.6-1.7-2.2-6.8-10.5-4.7-12.2%202.1-1.6%2013.4%201%2013.4%201l-32-41s-3.3-15.5%203.3-23c7.9-6.5%207-13.6%206.8-13.5-1.1-7.2-12-12.3-19.4-5.7-4.3%205.2-1.4%209.2-1.4%209.2s-11.5%203.1-11.9%205.1c-.5%202%2012.9-.3%2012.9-.3l-1.3%209.1s-26%2023.6-6%2044l.6-.8s7%208.6%2014.3%2010.5c7%207%206.3%206%206.3%206s1.3%2011.1%200%2013.3c-1.7-.5-19.3-1.2-21.9-.2-2.4.8-11.4.3-9.2%2015.1l3.3-7.5s-.3%205.3%201.9%207.2c-.4-5.6%202.1-9.4%202.1-9.4s.4%206.2%201.8%207c1.4%201%201.4-10%209-9%207.4.9%2012.9.6%2012.9.6s2.5%2021.4%201.7%2023.4c-5.4-1.3-18.4.5-19.2%203.8%207.6-.5%2011.1.4%2011.1.4s-6.1%205.5-4.2%208.6'/%3e%3cpath%20fill='%239ca69c'%20fill-rule='evenodd'%20stroke='%239ca69c'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='.9'%20d='M247.6%20214.8s-18.9%2020.8-10.7%2036.7c.4-2.2.2-3.6.5-3.5-.5-.3%202.3%201.9%202.1%201.5%200-1.2-.8-3.7-.8-3.7l2.5.7-1.5-2.8%203.7.4s-1.3-3.4-.9-3.4l3%20.2c-5.4-9.6-.3-17.6%202.1-26.2z'/%3e%3cpath%20fill='%239ca69c'%20fill-rule='evenodd'%20stroke='%239ca69c'%20d='M254.2%20196.9s1%207.2-3%209.2c-.5.5-3%201.3-2.6%202.8.4%202%201.5%201.6%203%201.2%204.1-.7%208.9-9.4%202.6-13.2z'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M247.2%20203a1.5%201.5%200%201%201-3%200%201.5%201.5%200%200%201%203%200'/%3e%3cpath%20fill='%23de3108'%20fill-rule='evenodd'%20stroke='%23000'%20d='M241.1%20209c-1%20.9-6.2%206.3-1%208.3%205.3-1.4%203.8-2.4%205-3.6%200-2.5-2.6-3.1-4-4.6z'/%3e%3cpath%20fill='%239ca69c'%20fill-rule='evenodd'%20stroke='%239ca69c'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='.9'%20d='M252.6%20260.5c-.3%201.2-1.5%205.6.1%209%204.6-2%206.7-1.4%208.2-.4-3.7-3-5.2-4.3-8.3-8.6'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20stroke='%23fff'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='.9'%20d='m260.4%20281.1.2%2010.2s3.6.6%205.2%200%200-7-5.4-10.2'/%3e%3cpath%20fill='%239ca69c'%20fill-rule='evenodd'%20stroke='%23000'%20d='M286%20282.4s-6.5-15.8-23.2-19.8-14.5-21.8-13.2-22.9c.8-1.5%201.3-3.9%206.1-1.6s27%2013.4%2030.2%2014%20.4%2030.7.2%2030.3z'/%3e%3cpath%20fill='%23de3108'%20fill-rule='evenodd'%20stroke='%23000'%20stroke-linejoin='round'%20stroke-width='.9'%20d='M270.2%20262.5c-.3.2%2022.3%2013.4%2015.5%2024.7%206.4-4.3%204.4-11.7%204.4-11.7s5.2%2013.7-7.6%2020.4c1.4%201.2%202.3%201%202.3%201l-2.2%202.1s-1%201.7%207.6-2.5c-2.3%201.9-2.5%203.3-2.5%203.3s.6%201.8%206.2-3.1c-4.5%204.9-5.5%207.4-5.5%207.3%2012.3-1%2039-41-8.4-52.7l2.1%202.2z'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20stroke='%23000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='.9'%20d='M271.2%20258.6c3%202.2%204.1%203%204.5%204-2.8-.6-5.3-.4-5.3-.4s-6.1-5.8-7.2-6.3c-.8%200-5.6-3-5.6-3-2.3-1.2-4.5-9.3%204.2-7a93%2093%200%200%200%2010.3%204.6l10.7%203.4%206.2%206.9s-11-5.4-12.4-5.5c3%202.4%204.7%205.8%204.7%205.8-3.5-1-6.5-2-10.1-2.5'/%3e%3cpath%20fill='none'%20stroke='%23fff'%20stroke-linecap='round'%20stroke-width='.9'%20d='M228.4%20209.9s10.5-2.6%2011.8-2.2'/%3e%3cpath%20fill='%23de3908'%20fill-rule='evenodd'%20d='M-128%20426.7h768V512h-768z'/%3e%3c/g%3e%3c/svg%3e")}.fi-ug.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ug'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='ug-a'%3e%3cpath%20fill-opacity='.7'%20d='M124%200h496v496H124z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23ug-a)'%20transform='translate(-128)scale(1.0321)'%3e%3cpath%20fill='%23ffe700'%20fill-rule='evenodd'%20d='M0%20330.7h744v82.7H0z'/%3e%3cpath%20fill='%23000001'%20fill-rule='evenodd'%20d='M0%20248h744v82.7H0z'/%3e%3cpath%20fill='%23de3908'%20fill-rule='evenodd'%20d='M0%20165.4h744V248H0z'/%3e%3cpath%20fill='%23ffe700'%20fill-rule='evenodd'%20d='M0%2082.7h744v82.7H0z'/%3e%3cpath%20fill='%23000001'%20fill-rule='evenodd'%20d='M0%200h744v82.7H0z'/%3e%3cpath%20fill='%23fffdff'%20fill-rule='evenodd'%20stroke='%23000'%20stroke-width='.9'%20d='M449.3%20248a77.2%2077.2%200%201%201-154.5%200%2077.2%2077.2%200%200%201%20154.5%200z'/%3e%3cpath%20fill='%23de3108'%20fill-rule='evenodd'%20stroke='%23000'%20stroke-width='.9'%20d='m358.4%20188.8-5-9.2c2-2%205.2-3.4%2010.4-3.4l-.5%2010z'/%3e%3cpath%20fill='%23ffe700'%20fill-rule='evenodd'%20stroke='%23000'%20stroke-width='.9'%20d='m363.3%20186.4.6-10.2s10.4-.6%2016%206.1l-5.5%208z'/%3e%3cpath%20fill='%23de3108'%20fill-rule='evenodd'%20stroke='%23000'%20stroke-width='.9'%20d='m374.6%20190.2%205.1-8c3.4%203.6%204.8%206.2%205.4%2010%200%20.2-8.1%202-8.1%202z'/%3e%3cpath%20fill-rule='evenodd'%20stroke='%23000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='.8'%20d='M361%20320.9s9.6-11%2028.2-8.7c-2.8-4.5-11.9-4-11.9-4s-2.8-21.4-.6-22.4%2011.5%200%2011.5%200c1.3%200%203.4-3.3%201.7-5.4s-6.6-10.2-4.6-11.8c2-1.6%2013%20.9%2013%20.9l-31-39.8s-3.2-15%203.2-22.1c7.6-6.4%206.8-13.2%206.6-13.1-1-7-11.6-12-18.8-5.6-4.2%205.1-1.4%209-1.4%209s-11%203-11.5%205c-.4%201.8%2012.5-.4%2012.5-.4l-1.2%208.8s-25.2%2023-6%2042.7c.3%200%20.7-.9.7-.9s6.8%208.4%2013.9%2010.2c6.7%206.9%206%205.8%206%205.8s1.4%2010.8.1%2013a93.4%2093.4%200%200%200-21.2-.2c-2.3.7-11.1.3-9%2014.6l3.2-7.3s-.2%205.2%201.9%207c-.4-5.4%202-9.1%202-9.1s.4%206%201.8%206.8c1.3%201%201.3-9.6%208.6-8.8%207.3%201%2012.6.7%2012.6.7s2.4%2020.6%201.6%2022.6c-5.2-1.3-17.8.5-18.6%203.7%207.4-.5%2010.8.4%2010.8.4s-6%205.3-4.1%208.4'/%3e%3cpath%20fill='%239ca69c'%20fill-rule='evenodd'%20stroke='%239ca69c'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='.8'%20d='M364%20208s-18.4%2020.2-10.5%2035.7c.5-2.2.3-3.5.5-3.4-.4-.3%202.3%201.8%202%201.4.2-1.1-.7-3.5-.7-3.5l2.4.6-1.4-2.7%203.5.5s-1.2-3.4-.8-3.4a94%2094%200%200%201%202.9.2c-5.2-9.3-.3-17%202-25.3z'/%3e%3cpath%20fill='%239ca69c'%20fill-rule='evenodd'%20stroke='%239ca69c'%20stroke-width='.9'%20d='M370.3%20190.8s1%207-2.8%209c-.6.4-3%201.2-2.7%202.6.5%201.9%201.5%201.5%203%201.2%204-.7%208.6-9.2%202.5-12.8z'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M363.5%20196.7a1.5%201.5%200%201%201-3%200%201.5%201.5%200%200%201%203%200'/%3e%3cpath%20fill='%23de3108'%20fill-rule='evenodd'%20stroke='%23000'%20stroke-width='.9'%20d='M357.6%20202.5c-1%20.8-6%206.1-1%208%205.2-1.4%203.7-2.3%204.9-3.5%200-2.3-2.6-3-3.9-4.5z'/%3e%3cpath%20fill='%239ca69c'%20fill-rule='evenodd'%20stroke='%239ca69c'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='.8'%20d='M368.7%20252.4c-.3%201.2-1.4%205.4.2%208.6%204.4-1.8%206.4-1.3%207.9-.3-3.6-3-5-4.1-8.1-8.3'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20stroke='%23fff'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='.8'%20d='m376.3%20272.4.2%209.8s3.5.7%205%200c1.6-.6%200-6.8-5.2-9.8'/%3e%3cpath%20fill='%239ca69c'%20fill-rule='evenodd'%20stroke='%23000'%20stroke-width='.9'%20d='M401.2%20273.6s-6.4-15.3-22.5-19.2-14.1-21-12.8-22.1c.7-1.5%201.2-3.8%205.9-1.6%204.7%202.2%2026.1%2013%2029.2%2013.5s.4%2029.8.2%2029.4z'/%3e%3cpath%20fill='%23de3108'%20fill-rule='evenodd'%20stroke='%23000'%20stroke-linejoin='round'%20stroke-width='.8'%20d='M385.8%20254.4c-.3.1%2021.6%2012.9%2015%2023.9%206.3-4.1%204.2-11.4%204.2-11.4s5.1%2013.3-7.3%2019.8c1.4%201.2%202.2.9%202.2.9l-2%202.1s-1%201.6%207.3-2.4c-2.3%201.8-2.5%203.1-2.5%203.1s.7%201.8%206.1-3a30.1%2030.1%200%200%200-5.4%207.2c12-1.1%2037.8-39.7-8.1-51.1l2%202.2z'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20stroke='%23000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='.8'%20d='M386.7%20250.6c3%202%204%202.8%204.4%203.8-2.7-.6-5.2-.4-5.2-.4s-5.8-5.6-6.9-6c-.8%200-5.4-3-5.4-3-2.3-1.1-4.4-9%204-6.7%208.8%204.1%2010%204.4%2010%204.4L398%20246l6%206.7s-10.7-5.3-12-5.4c3%202.4%204.6%205.6%204.6%205.6-3.4-1-6.3-1.8-9.9-2.3'/%3e%3cpath%20fill='none'%20stroke='%23fff'%20stroke-linecap='round'%20stroke-width='.8'%20d='M345.3%20203.3s10.2-2.4%2011.4-2'/%3e%3cpath%20fill='%23de3908'%20fill-rule='evenodd'%20d='M0%20413.4h744v82.7H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-um{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-um'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23bd3d44'%20d='M0%200h640v480H0'/%3e%3cpath%20stroke='%23fff'%20stroke-width='37'%20d='M0%2055.3h640M0%20129h640M0%20203h640M0%20277h640M0%20351h640M0%20425h640'/%3e%3cpath%20fill='%23192f5d'%20d='M0%200h364.8v258.5H0'/%3e%3cmarker%20id='um-a'%20markerHeight='30'%20markerWidth='30'%3e%3cpath%20fill='%23fff'%20d='m14%200%209%2027L0%2010h28L5%2027z'/%3e%3c/marker%3e%3cpath%20fill='none'%20marker-mid='url(%23um-a)'%20d='m0%200%2016%2011h61%2061%2061%2061%2060L47%2037h61%2061%2060%2061L16%2063h61%2061%2061%2061%2060L47%2089h61%2061%2060%2061L16%20115h61%2061%2061%2061%2060L47%20141h61%2061%2060%2061L16%20166h61%2061%2061%2061%2060L47%20192h61%2061%2060%2061L16%20218h61%2061%2061%2061%2060z'/%3e%3c/svg%3e")}.fi-um.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-um'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23bd3d44'%20d='M0%200h512v512H0'/%3e%3cpath%20stroke='%23fff'%20stroke-width='40'%20d='M0%2058h512M0%20137h512M0%20216h512M0%20295h512M0%20374h512M0%20453h512'/%3e%3cpath%20fill='%23192f5d'%20d='M0%200h390v275H0z'/%3e%3cmarker%20id='um-a'%20markerHeight='30'%20markerWidth='30'%3e%3cpath%20fill='%23fff'%20d='m15%200%209.3%2028.6L0%2011h30L5.7%2028.6'/%3e%3c/marker%3e%3cpath%20fill='none'%20marker-mid='url(%23um-a)'%20d='m0%200%2018%2011h65%2065%2065%2065%2066L51%2039h65%2065%2065%2065L18%2066h65%2065%2065%2065%2066L51%2094h65%2065%2065%2065L18%20121h65%2065%2065%2065%2066L51%20149h65%2065%2065%2065L18%20177h65%2065%2065%2065%2066L51%20205h65%2065%2065%2065L18%20232h65%2065%2065%2065%2066z'/%3e%3c/svg%3e")}.fi-us{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-us'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23bd3d44'%20d='M0%200h640v480H0'/%3e%3cpath%20stroke='%23fff'%20stroke-width='37'%20d='M0%2055.3h640M0%20129h640M0%20203h640M0%20277h640M0%20351h640M0%20425h640'/%3e%3cpath%20fill='%23192f5d'%20d='M0%200h364.8v258.5H0'/%3e%3cmarker%20id='us-a'%20markerHeight='30'%20markerWidth='30'%3e%3cpath%20fill='%23fff'%20d='m14%200%209%2027L0%2010h28L5%2027z'/%3e%3c/marker%3e%3cpath%20fill='none'%20marker-mid='url(%23us-a)'%20d='m0%200%2016%2011h61%2061%2061%2061%2060L47%2037h61%2061%2060%2061L16%2063h61%2061%2061%2061%2060L47%2089h61%2061%2060%2061L16%20115h61%2061%2061%2061%2060L47%20141h61%2061%2060%2061L16%20166h61%2061%2061%2061%2060L47%20192h61%2061%2060%2061L16%20218h61%2061%2061%2061%2060z'/%3e%3c/svg%3e")}.fi-us.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-us'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23bd3d44'%20d='M0%200h512v512H0'/%3e%3cpath%20stroke='%23fff'%20stroke-width='40'%20d='M0%2058h512M0%20137h512M0%20216h512M0%20295h512M0%20374h512M0%20453h512'/%3e%3cpath%20fill='%23192f5d'%20d='M0%200h390v275H0z'/%3e%3cmarker%20id='us-a'%20markerHeight='30'%20markerWidth='30'%3e%3cpath%20fill='%23fff'%20d='m15%200%209.3%2028.6L0%2011h30L5.7%2028.6'/%3e%3c/marker%3e%3cpath%20fill='none'%20marker-mid='url(%23us-a)'%20d='m0%200%2018%2011h65%2065%2065%2065%2066L51%2039h65%2065%2065%2065L18%2066h65%2065%2065%2065%2066L51%2094h65%2065%2065%2065L18%20121h65%2065%2065%2065%2066L51%20149h65%2065%2065%2065L18%20177h65%2065%2065%2065%2066L51%20205h65%2065%2065%2065L18%20232h65%2065%2065%2065%2066z'/%3e%3c/svg%3e")}.fi-uy{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-uy'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%230038a8'%20d='M266%2053.3h374v53.4H266zm0%20106.7h374v53.3H266zM0%20266.7h640V320H0zm0%20106.6h640v53.4H0z'/%3e%3cg%20fill='%23fcd116'%20stroke='%23000'%20stroke-miterlimit='20'%20stroke-width='.6'%20transform='translate(133.3%20133.3)scale(2.93333)'%3e%3cg%20id='uy-c'%3e%3cg%20id='uy-b'%3e%3cg%20id='uy-a'%3e%3cpath%20stroke-linecap='square'%20d='m-2%208.9%203%204.5c-12.4%209-4.9%2014.2-13.6%2017%205.4-5.2-.9-5.7%203.7-16.8'/%3e%3cpath%20fill='none'%20d='M-4.2%2010.2c-6.8%2011.2-2.4%2017.4-8.4%2020.3'/%3e%3cpath%20d='M0%200h6L0%2033-6%200h6v33'/%3e%3c/g%3e%3cuse%20xlink:href='%23uy-a'%20width='100%25'%20height='100%25'%20transform='rotate(45)'/%3e%3c/g%3e%3cuse%20xlink:href='%23uy-b'%20width='100%25'%20height='100%25'%20transform='rotate(90)'/%3e%3c/g%3e%3cuse%20xlink:href='%23uy-c'%20width='100%25'%20height='100%25'%20transform='scale(-1)'/%3e%3ccircle%20r='11'/%3e%3c/g%3e%3cg%20transform='translate(133.3%20133.3)scale(.29333)'%3e%3cg%20id='uy-d'%3e%3cpath%20d='M81-44c-7%208-11-6-36-6S16-35%2012-38s21-21%2029-22%2031%207%2040%2016m-29%209c7%206%201%2019-6%2019S26-28%2032-36'/%3e%3cpath%20d='M19-26c1-12%2011-14%2027-14s23%2012%2029%2015c-7%200-13-10-29-10s-16%200-27%2010m3%202c4-6%209%206%2020%206s17-3%2024-8-10%2012-21%2012-26-6-23-10'/%3e%3cpath%20d='M56-17c13-7%205-17%200-19%202%202%2010%2012%200%2019M0%2043c6%200%208-2%2016-2s27%2011%2038%207c-23%209-14%203-54%203h-5m63%206c-4-7-3-5-11-16%208%206%2010%209%2011%2016M0%2067c25%200%2021-5%2054-19-24%203-29%2011-54%2011h-5m5-29c7%200%209-5%2017-5s19%203%2024%207c1%201-3-8-11-9S25%209%2016%207c0%204%203%203%204%209%200%205-9%205-11%200%202%208-4%208-9%208'/%3e%3c/g%3e%3cuse%20xlink:href='%23uy-d'%20width='100%25'%20height='100%25'%20transform='scale(-1%201)'/%3e%3cpath%20d='M0%2076c-5%200-18%203%200%203s5-3%200-3'/%3e%3c/g%3e%3c/svg%3e")}.fi-uy.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-uy'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23fff'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%230038a8'%20d='M284%2056.9h228v56.9H284zm0%20113.8h228v56.9H284zM0%20284.4h512v57H0zm0%20113.8h512v57H0z'/%3e%3cg%20fill='%23fcd116'%20stroke='%23000'%20stroke-miterlimit='20'%20stroke-width='.6'%20transform='translate(142.2%20142.2)scale(3.12889)'%3e%3cg%20id='uy-c'%3e%3cg%20id='uy-b'%3e%3cg%20id='uy-a'%3e%3cpath%20stroke-linecap='square'%20d='m-2%208.9%203%204.5c-12.4%209-4.9%2014.2-13.6%2017%205.4-5.2-.9-5.7%203.7-16.8'/%3e%3cpath%20fill='none'%20d='M-4.2%2010.2c-6.8%2011.2-2.4%2017.4-8.4%2020.3'/%3e%3cpath%20d='M0%200h6L0%2033-6%200h6v33'/%3e%3c/g%3e%3cuse%20xlink:href='%23uy-a'%20width='100%25'%20height='100%25'%20transform='rotate(45)'/%3e%3c/g%3e%3cuse%20xlink:href='%23uy-b'%20width='100%25'%20height='100%25'%20transform='rotate(90)'/%3e%3c/g%3e%3cuse%20xlink:href='%23uy-c'%20width='100%25'%20height='100%25'%20transform='scale(-1)'/%3e%3ccircle%20r='11'/%3e%3c/g%3e%3cg%20transform='translate(142.2%20142.2)scale(.31289)'%3e%3cg%20id='uy-d'%3e%3cpath%20d='M81-44c-7%208-11-6-36-6S16-35%2012-38s21-21%2029-22%2031%207%2040%2016m-29%209c7%206%201%2019-6%2019S26-28%2032-36'/%3e%3cpath%20d='M19-26c1-12%2011-14%2027-14s23%2012%2029%2015c-7%200-13-10-29-10s-16%200-27%2010m3%202c4-6%209%206%2020%206s17-3%2024-8-10%2012-21%2012-26-6-23-10'/%3e%3cpath%20d='M56-17c13-7%205-17%200-19%202%202%2010%2012%200%2019M0%2043c6%200%208-2%2016-2s27%2011%2038%207c-23%209-14%203-54%203h-5m63%206c-4-7-3-5-11-16%208%206%2010%209%2011%2016M0%2067c25%200%2021-5%2054-19-24%203-29%2011-54%2011h-5m5-29c7%200%209-5%2017-5s19%203%2024%207c1%201-3-8-11-9S25%209%2016%207c0%204%203%203%204%209%200%205-9%205-11%200%202%208-4%208-9%208'/%3e%3c/g%3e%3cuse%20xlink:href='%23uy-d'%20width='100%25'%20height='100%25'%20transform='scale(-1%201)'/%3e%3cpath%20d='M0%2076c-5%200-18%203%200%203s5-3%200-3'/%3e%3c/g%3e%3c/svg%3e")}.fi-uz{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-uz'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%231eb53a'%20d='M0%20320h640v160H0z'/%3e%3cpath%20fill='%230099b5'%20d='M0%200h640v160H0z'/%3e%3cpath%20fill='%23ce1126'%20d='M0%20153.6h640v172.8H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20163.2h640v153.6H0z'/%3e%3ccircle%20cx='134.4'%20cy='76.8'%20r='57.6'%20fill='%23fff'/%3e%3ccircle%20cx='153.6'%20cy='76.8'%20r='57.6'%20fill='%230099b5'/%3e%3cg%20fill='%23fff'%20transform='translate(261.1%20122.9)scale(1.92)'%3e%3cg%20id='uz-e'%3e%3cg%20id='uz-d'%3e%3cg%20id='uz-c'%3e%3cg%20id='uz-b'%3e%3cpath%20id='uz-a'%20d='M0-6-1.9-.3%201%20.7'/%3e%3cuse%20xlink:href='%23uz-a'%20width='100%25'%20height='100%25'%20transform='scale(-1%201)'/%3e%3c/g%3e%3cuse%20xlink:href='%23uz-b'%20width='100%25'%20height='100%25'%20transform='rotate(72)'/%3e%3c/g%3e%3cuse%20xlink:href='%23uz-b'%20width='100%25'%20height='100%25'%20transform='rotate(-72)'/%3e%3cuse%20xlink:href='%23uz-c'%20width='100%25'%20height='100%25'%20transform='rotate(144)'/%3e%3c/g%3e%3cuse%20xlink:href='%23uz-d'%20width='100%25'%20height='100%25'%20y='-24'/%3e%3cuse%20xlink:href='%23uz-d'%20width='100%25'%20height='100%25'%20y='-48'/%3e%3c/g%3e%3cuse%20xlink:href='%23uz-e'%20width='100%25'%20height='100%25'%20x='24'/%3e%3cuse%20xlink:href='%23uz-e'%20width='100%25'%20height='100%25'%20x='48'/%3e%3cuse%20xlink:href='%23uz-d'%20width='100%25'%20height='100%25'%20x='-48'/%3e%3cuse%20xlink:href='%23uz-d'%20width='100%25'%20height='100%25'%20x='-24'/%3e%3cuse%20xlink:href='%23uz-d'%20width='100%25'%20height='100%25'%20x='-24'%20y='-24'/%3e%3c/g%3e%3c/svg%3e")}.fi-uz.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-uz'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%231eb53a'%20d='M0%20341.3h512V512H0z'/%3e%3cpath%20fill='%230099b5'%20d='M0%200h512v170.7H0z'/%3e%3cpath%20fill='%23ce1126'%20d='M0%20163.8h512v184.4H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20174h512v164H0z'/%3e%3ccircle%20cx='143.4'%20cy='81.9'%20r='61.4'%20fill='%23fff'/%3e%3ccircle%20cx='163.8'%20cy='81.9'%20r='61.4'%20fill='%230099b5'/%3e%3cg%20fill='%23fff'%20transform='translate(278.5%20131)scale(2.048)'%3e%3cg%20id='uz-e'%3e%3cg%20id='uz-d'%3e%3cg%20id='uz-c'%3e%3cg%20id='uz-b'%3e%3cpath%20id='uz-a'%20d='M0-6-1.9-.3%201%20.7'/%3e%3cuse%20xlink:href='%23uz-a'%20width='100%25'%20height='100%25'%20transform='scale(-1%201)'/%3e%3c/g%3e%3cuse%20xlink:href='%23uz-b'%20width='100%25'%20height='100%25'%20transform='rotate(72)'/%3e%3c/g%3e%3cuse%20xlink:href='%23uz-b'%20width='100%25'%20height='100%25'%20transform='rotate(-72)'/%3e%3cuse%20xlink:href='%23uz-c'%20width='100%25'%20height='100%25'%20transform='rotate(144)'/%3e%3c/g%3e%3cuse%20xlink:href='%23uz-d'%20width='100%25'%20height='100%25'%20y='-24'/%3e%3cuse%20xlink:href='%23uz-d'%20width='100%25'%20height='100%25'%20y='-48'/%3e%3c/g%3e%3cuse%20xlink:href='%23uz-e'%20width='100%25'%20height='100%25'%20x='24'/%3e%3cuse%20xlink:href='%23uz-e'%20width='100%25'%20height='100%25'%20x='48'/%3e%3cuse%20xlink:href='%23uz-d'%20width='100%25'%20height='100%25'%20x='-48'/%3e%3cuse%20xlink:href='%23uz-d'%20width='100%25'%20height='100%25'%20x='-24'/%3e%3cuse%20xlink:href='%23uz-d'%20width='100%25'%20height='100%25'%20x='-24'%20y='-24'/%3e%3c/g%3e%3c/svg%3e")}.fi-va{background-image:url(/assets/va-maDzWwNR.svg)}.fi-va.fis{background-image:url(/assets/va-BntFJQHU.svg)}.fi-vc{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-vc'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%3e%3cpath%20fill='%23f4f100'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23199a00'%20d='M490%200h150v480H490z'/%3e%3cpath%20fill='%230058aa'%20d='M0%200h150v480H0z'/%3e%3cpath%20fill='%23199a00'%20d='m259.3%20130-46.4%2071.3%2044.7%2074.4%2043.8-73.7zm121.2%200-46.3%2071.3%2044.7%2074.4%2043.8-73.7zm-61.2%2097.3-46.4%2071.4%2044.8%2074.4%2043.8-73.7-42.2-72z'/%3e%3c/g%3e%3c/svg%3e")}.fi-vc.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-vc'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23f4f100'%20d='M0%200h510.4v512H0z'/%3e%3cpath%20fill='%23199a00'%20d='M385.6%200H512v512H385.6z'/%3e%3cpath%20fill='%230058aa'%20d='M0%200h126.4v512H0z'/%3e%3c/g%3e%3cpath%20fill='%23199a00'%20fill-rule='evenodd'%20d='m191.2%20138.6-49.5%2076.2%2047.8%2079.3%2046.7-78.6zm129.4%200L271%20214.8l47.7%2079.3%2046.8-78.6-45-76.9zm-65.4%20103.9-49.4%2076.1%2047.7%2079.4%2046.7-78.7z'/%3e%3c/svg%3e")}.fi-ve{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-ve'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cg%20id='ve-d'%20transform='translate(0%20-36)'%3e%3cg%20id='ve-c'%3e%3cg%20id='ve-b'%3e%3cpath%20id='ve-a'%20fill='%23fff'%20d='M0-5-1.5-.2l2.8.9z'/%3e%3cuse%20xlink:href='%23ve-a'%20width='180'%20height='120'%20transform='scale(-1%201)'/%3e%3c/g%3e%3cuse%20xlink:href='%23ve-b'%20width='180'%20height='120'%20transform='rotate(72)'/%3e%3c/g%3e%3cuse%20xlink:href='%23ve-b'%20width='180'%20height='120'%20transform='rotate(-72)'/%3e%3cuse%20xlink:href='%23ve-c'%20width='180'%20height='120'%20transform='rotate(144)'/%3e%3c/g%3e%3c/defs%3e%3cpath%20fill='%23cf142b'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%2300247d'%20d='M0%200h640v320H0z'/%3e%3cpath%20fill='%23fc0'%20d='M0%200h640v160H0z'/%3e%3cg%20id='ve-f'%20transform='matrix(4%200%200%204%20320%20336)'%3e%3cg%20id='ve-e'%3e%3cuse%20xlink:href='%23ve-d'%20width='180'%20height='120'%20transform='rotate(10)'/%3e%3cuse%20xlink:href='%23ve-d'%20width='180'%20height='120'%20transform='rotate(30)'/%3e%3c/g%3e%3cuse%20xlink:href='%23ve-e'%20width='180'%20height='120'%20transform='rotate(40)'/%3e%3c/g%3e%3cuse%20xlink:href='%23ve-f'%20width='180'%20height='120'%20transform='rotate(-80%20320%20336)'/%3e%3c/svg%3e")}.fi-ve.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-ve'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cg%20id='ve-d'%20transform='translate(0%20-36)'%3e%3cg%20id='ve-c'%3e%3cg%20id='ve-b'%3e%3cpath%20id='ve-a'%20fill='%23fff'%20d='M0-5-1.5-.2l2.8.9z'/%3e%3cuse%20xlink:href='%23ve-a'%20width='180'%20height='120'%20transform='scale(-1%201)'/%3e%3c/g%3e%3cuse%20xlink:href='%23ve-b'%20width='180'%20height='120'%20transform='rotate(72)'/%3e%3c/g%3e%3cuse%20xlink:href='%23ve-b'%20width='180'%20height='120'%20transform='rotate(-72)'/%3e%3cuse%20xlink:href='%23ve-c'%20width='180'%20height='120'%20transform='rotate(144)'/%3e%3c/g%3e%3c/defs%3e%3cpath%20fill='%23cf142b'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%2300247d'%20d='M0%200h512v341.3H0z'/%3e%3cpath%20fill='%23fc0'%20d='M0%200h512v170.7H0z'/%3e%3cg%20id='ve-f'%20transform='translate(256.3%20358.4)scale(4.265)'%3e%3cg%20id='ve-e'%3e%3cuse%20xlink:href='%23ve-d'%20width='180'%20height='120'%20transform='rotate(10)'/%3e%3cuse%20xlink:href='%23ve-d'%20width='180'%20height='120'%20transform='rotate(30)'/%3e%3c/g%3e%3cuse%20xlink:href='%23ve-e'%20width='180'%20height='120'%20transform='rotate(40)'/%3e%3c/g%3e%3cuse%20xlink:href='%23ve-f'%20width='180'%20height='120'%20transform='rotate(-80%20256.3%20358.4)'/%3e%3c/svg%3e")}.fi-vg{background-image:url(/assets/vg-DKEU1GdO.svg)}.fi-vg.fis{background-image:url(/assets/vg-qlt33Cv3.svg)}.fi-vi{background-image:url(/assets/vi-DatfOFqY.svg)}.fi-vi.fis{background-image:url(/assets/vi-1FTBesw2.svg)}.fi-vn{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-vn'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='vn-a'%3e%3cpath%20fill-opacity='.7'%20d='M-85.3%200h682.6v512H-85.3z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23vn-a)'%20transform='translate(80)scale(.9375)'%3e%3cpath%20fill='%23da251d'%20d='M-128%200h768v512h-768z'/%3e%3cpath%20fill='%23ff0'%20d='M349.6%20381%20260%20314.3l-89%2067.3L204%20272l-89-67.7%20110.1-1%2034.2-109.4L294%20203l110.1.1-88.5%2068.4%2033.9%20109.6z'/%3e%3c/g%3e%3c/svg%3e")}.fi-vn.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-vn'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='vn-a'%3e%3cpath%20fill-opacity='.7'%20d='M177.2%200h708.6v708.7H177.2z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23vn-a)'%20transform='translate(-128)scale(.72249)'%3e%3cpath%20fill='%23da251d'%20d='M0%200h1063v708.7H0z'/%3e%3cpath%20fill='%23ff0'%20d='m661%20527.5-124-92.6-123.3%2093.5%2045.9-152-123.2-93.8%20152.4-1.3L536%20129.8%20584.3%20281l152.4.2-122.5%2094.7z'/%3e%3c/g%3e%3c/svg%3e")}.fi-vu{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-vu'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='vu-a'%3e%3cpath%20d='M0%200v475l420-195h480v-85H420Z'/%3e%3c/clipPath%3e%3c/defs%3e%3cpath%20fill='%23009543'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23d21034'%20d='M0%200h640v240H0z'/%3e%3cg%20clip-path='url(%23vu-a)'%20transform='scale(.71111%201.01053)'%3e%3cpath%20stroke='%23fdce12'%20stroke-width='110'%20d='m0%200%20420%20195h480v85H420L0%20475'/%3e%3cpath%20fill='none'%20stroke='%23000'%20stroke-width='60'%20d='m0%200%20420%20195h480m0%2085H420L0%20475'/%3e%3c/g%3e%3cg%20fill='%23fdce12'%20transform='translate(-22)scale(1.01053)'%3e%3cpath%20d='M106.9%20283v27c23.5%200%2069.7-18%2069.7-76.1%200-58.1-49.3-68.9-64-68.9-14.8%200-60.3%2010.6-60.3%2058%200%2047.6%2044.7%2052%2053.5%2052%208.8%200%2041.8-8%2038-43.6a35.5%2035.5%200%200%201-35.4%2031.5c-24%200-39-17.8-39-35.4%200-17.6%2014.6-41.2%2039.9-41.2%2025.3%200%2043.8%2022.5%2043.8%2045.1%200%2022.7-17.8%2051.5-46.2%2051.5z'/%3e%3cg%20id='vu-b'%3e%3cpath%20stroke='%23fdce12'%20stroke-width='.8'%20d='m86.2%20247.7%201.4%201s11.2-25.5%2041.1-43.6c-3.8%202-23.8%2012-42.5%2042.6z'/%3e%3cpath%20d='M89.1%20243.3s-3.4-7-.4-10.2c3-3.1%201.7%208.3%201.7%208.3l1.3-1.9s-2-8.6.2-10.4c2.3-1.9%201.2%208.3%201.2%208.3l1.4-1.8s-1.5-8.4.7-10c2.3-1.6.9%208%20.9%208l1.6-2s-1.2-8%201.5-9.9c2.7-1.9.3%207.6.3%207.6l1.8-2s-.8-7.3%201.5-9c2.3-1.6.4%207%20.4%207l1.6-1.8s-.5-6.8%201.7-8.4c2.3-1.6.2%206.5.2%206.5l1.7-1.6s-.4-6.9%202.4-8.2c2.8-1.3-.5%206.4-.5%206.4l2-1.6s.5-8%202.9-8.7c2.4-.8-1%207-1%207l1.7-1.4s.9-6.8%203.5-7.6c2.7-.9-1.6%206.2-1.6%206.2l1.7-1.3s1.9-6.8%204.4-7.6c2.4-.7-2.6%206.5-2.6%206.5l1.7-1.2s2.7-6.2%205-6.6c2.1-.4-2.6%205.1-2.6%205.1l2.1-1.2s3.5-6.4%204.8-4.5c1.2%202-5%204.9-5%204.9l-2%201.2s7.5-3.6%208.4-1.8c.9%201.8-10.3%203-10.3%203l-1.8%201.2s7.5-2%206.6-.1c-1%201.9-8.4%201.5-8.4%201.5l-1.7%201.2s7.5-1.8%206.5%200c-1%201.6-8.3%201.5-8.3%201.5l-1.8%201.5s7.3-2%206.2.3c-1%202.2-9.4%202.1-9.4%202.1l-2%202s7.7-2.7%207-.6c-.6%202-9.4%203-9.4%203l-2%202s8.3-2.7%205.8-.2c-2.4%202.6-8.5%203.2-8.5%203.2l-2.3%203s8.2-5%207-2.2c-1.1%202.8-9.2%204.7-9.2%204.7l-1.6%202s7.4-4.3%206.6-2c-.7%202.5-8.6%205-8.6%205l-1.3%201.8s8.7-5.2%208-2.5c-.8%202.6-9.1%204.5-9.1%204.5l-1%201.7s8-4.7%208-2.4c.2%202.2-9.4%204.4-9.4%204.4z'/%3e%3c/g%3e%3cuse%20xlink:href='%23vu-b'%20width='100%25'%20height='100%25'%20transform='matrix(-1%200%200%201%20220%200)'/%3e%3c/g%3e%3c/svg%3e")}.fi-vu.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-vu'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='vu-a'%3e%3cpath%20d='M0%200v475l420-195h480v-85H420Z'/%3e%3c/clipPath%3e%3c/defs%3e%3cpath%20fill='%23009543'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23d21034'%20d='M0%200h512v256H0z'/%3e%3cg%20clip-path='url(%23vu-a)'%20transform='scale(.56889%201.0779)'%3e%3cpath%20stroke='%23fdce12'%20stroke-width='110'%20d='m0%200%20420%20195h480v85H420L0%20475'/%3e%3cpath%20fill='none'%20stroke='%23000'%20stroke-width='60'%20d='m0%200%20420%20195h480m0%2085H420L0%20475'/%3e%3c/g%3e%3cg%20fill='%23fdce12'%20transform='translate(-35.6%2026.7)scale(.96552)'%3e%3cpath%20d='M106.9%20283v27c23.5%200%2069.7-18%2069.7-76.1%200-58.1-49.3-68.9-64-68.9-14.8%200-60.3%2010.6-60.3%2058%200%2047.6%2044.7%2052%2053.5%2052%208.8%200%2041.8-8%2038-43.6a35.5%2035.5%200%200%201-35.4%2031.5c-24%200-39-17.8-39-35.4%200-17.6%2014.6-41.2%2039.9-41.2%2025.3%200%2043.8%2022.5%2043.8%2045.1%200%2022.7-17.8%2051.5-46.2%2051.5z'/%3e%3cg%20id='vu-b'%3e%3cpath%20stroke='%23fdce12'%20stroke-width='.8'%20d='m86.2%20247.7%201.4%201s11.2-25.5%2041.1-43.6c-3.8%202-23.8%2012-42.5%2042.6z'/%3e%3cpath%20d='M89.1%20243.3s-3.4-7-.4-10.2c3-3.1%201.7%208.3%201.7%208.3l1.3-1.9s-2-8.6.2-10.4c2.3-1.9%201.2%208.3%201.2%208.3l1.4-1.8s-1.5-8.4.7-10c2.3-1.6.9%208%20.9%208l1.6-2s-1.2-8%201.5-9.9c2.7-1.9.3%207.6.3%207.6l1.8-2s-.8-7.3%201.5-9c2.3-1.6.4%207%20.4%207l1.6-1.8s-.5-6.8%201.7-8.4c2.3-1.6.2%206.5.2%206.5l1.7-1.6s-.4-6.9%202.4-8.2c2.8-1.3-.5%206.4-.5%206.4l2-1.6s.5-8%202.9-8.7c2.4-.8-1%207-1%207l1.7-1.4s.9-6.8%203.5-7.6c2.7-.9-1.6%206.2-1.6%206.2l1.7-1.3s1.9-6.8%204.4-7.6c2.4-.7-2.6%206.5-2.6%206.5l1.7-1.2s2.7-6.2%205-6.6c2.1-.4-2.6%205.1-2.6%205.1l2.1-1.2s3.5-6.4%204.8-4.5c1.2%202-5%204.9-5%204.9l-2%201.2s7.5-3.6%208.4-1.8c.9%201.8-10.3%203-10.3%203l-1.8%201.2s7.5-2%206.6-.1c-1%201.9-8.4%201.5-8.4%201.5l-1.7%201.2s7.5-1.8%206.5%200c-1%201.6-8.3%201.5-8.3%201.5l-1.8%201.5s7.3-2%206.2.3c-1%202.2-9.4%202.1-9.4%202.1l-2%202s7.7-2.7%207-.6c-.6%202-9.4%203-9.4%203l-2%202s8.3-2.7%205.8-.2c-2.4%202.6-8.5%203.2-8.5%203.2l-2.3%203s8.2-5%207-2.2c-1.1%202.8-9.2%204.7-9.2%204.7l-1.6%202s7.4-4.3%206.6-2c-.7%202.5-8.6%205-8.6%205l-1.3%201.8s8.7-5.2%208-2.5c-.8%202.6-9.1%204.5-9.1%204.5l-1%201.7s8-4.7%208-2.4c.2%202.2-9.4%204.4-9.4%204.4z'/%3e%3c/g%3e%3cuse%20xlink:href='%23vu-b'%20width='100%25'%20height='100%25'%20transform='matrix(-1%200%200%201%20220%200)'/%3e%3c/g%3e%3c/svg%3e")}.fi-wf{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-wf'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23000091'%20d='M0%200h213.3v480H0z'/%3e%3cpath%20fill='%23e1000f'%20d='M426.7%200H640v480H426.7z'/%3e%3c/svg%3e")}.fi-wf.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-wf'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23fff'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23000091'%20d='M0%200h170.7v512H0z'/%3e%3cpath%20fill='%23e1000f'%20d='M341.3%200H512v512H341.3z'/%3e%3c/svg%3e")}.fi-ws{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ws'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23ce1126'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23002b7f'%20d='M0%200h320v240H0z'/%3e%3cpath%20fill='%23fff'%20d='m180%20229.3-20.7-14-19.9%2014.1%206.5-24.9-19-15.2%2024.5-1.5%208.1-23.6%208.8%2024%2024%20.7-19%2016.3zm-3.6-165.6L159.8%2053l-16%2010.4%204.4-20-14.6-12.7%2019.4-1.6%207.2-18.6%207.4%2018.7%2019.1%201.7L172%2044.3zm-73%2059.5-16-11-16.7%2011%205.2-19.4L60.8%2091%2080%2090l7-19%206.8%2018.9%2019.6%201.1-15%2012.5zM250%20110l-15.4-10-15%2010%204.4-18.3-14-11.8%2018.3-1.5%206.3-17.2%207%2017.4%2017.7%201-13.7%2012.3zm-43.1%2043.4-10.3-6.4-10.3%206.6%202.7-12.3-9.2-8.3%2012-1%204.6-11.6%204.9%2011.6%2011.9%201-9.1%208.3z'/%3e%3c/g%3e%3c/svg%3e")}.fi-ws.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ws'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23ce1126'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23002b7f'%20d='M0%200h256v256H0z'/%3e%3cpath%20fill='%23fff'%20d='m147%20231.4-19.6-13.3-18.9%2013.5%206-23.5-18-14.7%2023.2-1.3%207.7-22.4%208.5%2022.8%2022.8.5-18.2%2015.5zm-3.4-156.8-15.6-10-15.4%2010%204.2-19-13.7-12.1%2018.3-1.6%206.8-17.5%207.1%2017.7%2018%201.4-14%2012.5zM74.3%20131l-15.2-10.8-15.4%2010.4%204.6-18.3L34%20100.2l18.2-.8%206.7-18.1%206.6%2017.8%2018.3%201.1-14.3%2012zm139-12.7-14.7-9.5-14.3%209.7%204-17.4-13-11.2%2017.3-1.4%206-16.4%206.6%2016.6%2016.8%201-13.2%2011.6zm-41.1%2041.3-9.7-6.2-9.6%206.2%202.5-11.6-8.7-7.7%2011.4-1%204.4-11%204.5%2011%2011.2%201-8.5%207.7z'/%3e%3c/g%3e%3c/svg%3e")}.fi-ye{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ye'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v472.8H0z'/%3e%3cpath%20fill='%23f10600'%20d='M0%200h640v157.4H0z'/%3e%3cpath%20fill='%23000001'%20d='M0%20322.6h640V480H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-ye.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ye'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23fff'%20d='M0%200h512v504.3H0z'/%3e%3cpath%20fill='%23f10600'%20d='M0%200h512v167.9H0z'/%3e%3cpath%20fill='%23000001'%20d='M0%20344.1h512V512H0z'/%3e%3c/g%3e%3c/svg%3e")}.fi-yt{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-yt'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23000091'%20d='M0%200h213.3v480H0z'/%3e%3cpath%20fill='%23e1000f'%20d='M426.7%200H640v480H426.7z'/%3e%3c/svg%3e")}.fi-yt.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-yt'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23fff'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23000091'%20d='M0%200h170.7v512H0z'/%3e%3cpath%20fill='%23e1000f'%20d='M341.3%200H512v512H341.3z'/%3e%3c/svg%3e")}.fi-za{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-za'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='za-a'%3e%3cpath%20fill-opacity='.7'%20d='M-71.9%200h682.7v512H-71.9z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23za-a)'%20transform='translate(67.4)scale(.93748)'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23000001'%20d='M-71.9%20407.8V104.4L154%20256.1z'/%3e%3cpath%20fill='%23000c8a'%20d='m82.2%20512.1%20253.6-170.6H696V512H82.2z'/%3e%3cpath%20fill='%23e1392d'%20d='M66%200h630v170.8H335.7S69.3-1.7%2066%200'/%3e%3cpath%20fill='%23ffb915'%20d='M-71.9%2064v40.4L154%20256-72%20407.8v40.3l284.5-192z'/%3e%3cpath%20fill='%23007847'%20d='M-71.9%2064V0h95l301.2%20204h371.8v104.2H324.3L23%20512h-94.9v-63.9l284.4-192L-71.8%2064z'/%3e%3cpath%20fill='%23fff'%20d='M23%200h59.2l253.6%20170.7H696V204H324.3zm0%20512.1h59.2l253.6-170.6H696v-33.2H324.3L23%20512z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}.fi-za.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-za'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cclipPath%20id='za-a'%3e%3cpath%20fill-opacity='.7'%20d='M70.1%200h499.6v499.6H70.1z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23za-a)'%20transform='translate(-71.9)scale(1.0248)'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23000001'%20d='M0%20397.9v-296l220.4%20147.9z'/%3e%3cpath%20fill='%23000c8a'%20d='m150.4%20499.7%20247.4-166.5h351.6v166.5z'/%3e%3cpath%20fill='%23e1392d'%20d='M134.5%200h615v166.6H397.7S137.8-1.6%20134.5%200'/%3e%3cpath%20fill='%23ffb915'%20d='M0%2062.5v39.3l220.4%20148L0%20397.8v39.4l277.6-187.4z'/%3e%3cpath%20fill='%23007847'%20d='M0%2062.5V0h92.6l294%20199h362.8v101.7H386.6l-294%20198.9H0v-62.4l277.6-187.4z'/%3e%3cpath%20fill='%23fff'%20d='M92.6%200h57.8l247.4%20166.6h351.6V199H386.6zm0%20499.7h57.8l247.4-166.5h351.6v-32.4H386.6z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}.fi-zm{background-image:url(/assets/zm-BmHUGSoa.svg)}.fi-zm.fis{background-image:url(/assets/zm-CNg0kgkw.svg)}.fi-zw{background-image:url(/assets/zw-DsbN9cxg.svg)}.fi-zw.fis{background-image:url(/assets/zw-j2YKWgEN.svg)}.fi-arab{background-image:url(/assets/arab-DwNob5Qo.svg)}.fi-arab.fis{background-image:url(/assets/arab-PzQTPYwO.svg)}.fi-cefta{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-cefta'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23039'%20d='M0%200h640v480H0z'/%3e%3ccircle%20cx='320'%20cy='249.8'%20r='30.4'%20fill='none'%20stroke='%23fc0'%20stroke-width='27.5'/%3e%3ccircle%20cx='320'%20cy='249.8'%20r='88.3'%20fill='none'%20stroke='%23fc0'%20stroke-width='27.5'/%3e%3cpath%20fill='%23039'%20d='m404.7%20165.1%2084.7%2084.7-84.7%2084.7-84.7-84.7z'/%3e%3cpath%20fill='%23fc0'%20d='M175.7%20236.1h59.2v27.5h-59.2zm259.1%200h88.3v27.5h-88.3zM363%20187.4l38.8-38.8%2019.4%2019.5-38.7%2038.7zM306.3%2048.6h27.5v107.1h-27.5z'/%3e%3ccircle%20cx='225.1'%20cy='159.6'%20r='13.7'%20fill='%23fc0'/%3e%3ccircle%20cx='144.3'%20cy='249.8'%20r='13.7'%20fill='%23fc0'/%3e%3ccircle%20cx='320'%20cy='381.4'%20r='13.7'%20fill='%23fc0'/%3e%3ccircle%20cx='320'%20cy='425.5'%20r='13.7'%20fill='%23fc0'/%3e%3ccircle%20cx='408.3'%20cy='249.8'%20r='13.7'%20fill='%23fc0'/%3e%3cpath%20fill='%23fc0'%20d='m208.3%20341.5%2019.5-19.4%2019.4%2019.4-19.4%2019.5zm204.7%2021%2019.5-19.5%2019.5%2019.5-19.5%2019.4z'/%3e%3c/svg%3e")}.fi-cefta.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-cefta'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23039'%20d='M0%200h512v512H0z'/%3e%3ccircle%20cx='256'%20cy='266.5'%20r='32.5'%20fill='none'%20stroke='%23fc0'%20stroke-width='29.3'/%3e%3ccircle%20cx='256'%20cy='266.5'%20r='94.2'%20fill='none'%20stroke='%23fc0'%20stroke-width='29.3'/%3e%3cpath%20fill='%23039'%20d='m346.3%20176.1%2090.3%2090.3-90.3%2090.3-90.3-90.3z'/%3e%3cpath%20fill='%23fc0'%20d='M102.1%20251.8h63.2v29.3h-63.2zm276.4%200h94.2v29.3h-94.2zm-76.6-51.9%2041.3-41.3%2020.7%2020.7-41.3%2041.3zM241.3%2051.8h29.3V166h-29.3z'/%3e%3ccircle%20cx='154.8'%20cy='170.3'%20r='14.7'%20fill='%23fc0'/%3e%3ccircle%20cx='68.6'%20cy='266.5'%20r='14.7'%20fill='%23fc0'/%3e%3ccircle%20cx='256'%20cy='406.8'%20r='14.7'%20fill='%23fc0'/%3e%3ccircle%20cx='256'%20cy='453.9'%20r='14.7'%20fill='%23fc0'/%3e%3ccircle%20cx='350.2'%20cy='266.5'%20r='14.7'%20fill='%23fc0'/%3e%3cpath%20fill='%23fc0'%20d='m136.9%20364.3%2020.7-20.7%2020.7%2020.7-20.7%2020.7zm218.5%2022.3L376%20366l20.7%2020.7-20.7%2020.8z'/%3e%3c/svg%3e")}.fi-cp{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-cp'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23000091'%20d='M0%200h213.3v480H0z'/%3e%3cpath%20fill='%23e1000f'%20d='M426.7%200H640v480H426.7z'/%3e%3c/g%3e%3c/svg%3e")}.fi-cp.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-cp'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%23fff'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23000091'%20d='M0%200h170.7v512H0z'/%3e%3cpath%20fill='%23e1000f'%20d='M341.3%200H512v512H341.3z'/%3e%3c/g%3e%3c/svg%3e")}.fi-dg{background-image:url(/assets/dg-B55Nvqqm.svg)}.fi-dg.fis{background-image:url(/assets/dg-CPWO5scz.svg)}.fi-eac{background-image:url(/assets/eac-CZCl_pn7.svg)}.fi-eac.fis{background-image:url(/assets/eac-D_uIzpYR.svg)}.fi-es-ct{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-es-ct'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23fcdd09'%20d='M0%200h640v480H0z'/%3e%3cpath%20stroke='%23da121a'%20stroke-width='60'%20d='M0%2090h810m0%20120H0m0%20120h810m0%20120H0'%20transform='scale(.79012%20.88889)'/%3e%3c/svg%3e")}.fi-es-ct.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-es-ct'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23fcdd09'%20d='M0%200h512v512H0z'/%3e%3cpath%20stroke='%23da121a'%20stroke-width='60'%20d='M0%2090h810m0%20120H0m0%20120h810m0%20120H0'%20transform='scale(.6321%20.94815)'/%3e%3c/svg%3e")}.fi-es-ga{background-image:url(/assets/es-ga-BbFllROk.svg)}.fi-es-ga.fis{background-image:url(/assets/es-ga-RI_ZudJJ.svg)}.fi-es-pv{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-es-pv'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23D52B1E'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23009B48'%20d='M0%200h53.1l133.4%20100.1%20133.5%20100L586.9%200H640v39.9l-133.4%20100L373.2%20240%20640%20440.2V480h-53.1L453.5%20380A69411.7%2069411.7%200%200%200%20320%20279.9L53.1%20480H0v-39.8l133.4-100.1L266.8%20240%200%2039.9v-20z'/%3e%3cpath%20fill='%23FFF'%20d='M288.1%200h63.8v208.1H640v63.8H351.9V480h-63.8V271.9H0v-63.8h288.1v-104z'/%3e%3c/svg%3e")}.fi-es-pv.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-es-pv'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23d52b1e'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23009b48'%20d='M0%200h42.5l106.7%20106.7L256%20213.4%20469.5%200H512v42.5L405.3%20149.2%20298.6%20256%20512%20469.5V512h-42.5L362.8%20405.3%20256%20298.6%2042.5%20512H0v-42.5l106.7-106.7L213.4%20256%200%2042.5V21.3z'/%3e%3cpath%20fill='%23fff'%20d='M221.9%200h68.2v221.9H512v68.2H290.1V512h-68.2V290.1H0v-68.2h221.9v-111z'/%3e%3c/svg%3e")}.fi-eu{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-eu'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cg%20id='eu-d'%3e%3cg%20id='eu-b'%3e%3cpath%20id='eu-a'%20d='m0-1-.3%201%20.5.1z'/%3e%3cuse%20xlink:href='%23eu-a'%20transform='scale(-1%201)'/%3e%3c/g%3e%3cg%20id='eu-c'%3e%3cuse%20xlink:href='%23eu-b'%20transform='rotate(72)'/%3e%3cuse%20xlink:href='%23eu-b'%20transform='rotate(144)'/%3e%3c/g%3e%3cuse%20xlink:href='%23eu-c'%20transform='scale(-1%201)'/%3e%3c/g%3e%3c/defs%3e%3cpath%20fill='%23039'%20d='M0%200h640v480H0z'/%3e%3cg%20fill='%23fc0'%20transform='translate(320%20242.3)scale(23.7037)'%3e%3cuse%20xlink:href='%23eu-d'%20width='100%25'%20height='100%25'%20y='-6'/%3e%3cuse%20xlink:href='%23eu-d'%20width='100%25'%20height='100%25'%20y='6'/%3e%3cg%20id='eu-e'%3e%3cuse%20xlink:href='%23eu-d'%20width='100%25'%20height='100%25'%20x='-6'/%3e%3cuse%20xlink:href='%23eu-d'%20width='100%25'%20height='100%25'%20transform='rotate(-144%20-2.3%20-2.1)'/%3e%3cuse%20xlink:href='%23eu-d'%20width='100%25'%20height='100%25'%20transform='rotate(144%20-2.1%20-2.3)'/%3e%3cuse%20xlink:href='%23eu-d'%20width='100%25'%20height='100%25'%20transform='rotate(72%20-4.7%20-2)'/%3e%3cuse%20xlink:href='%23eu-d'%20width='100%25'%20height='100%25'%20transform='rotate(72%20-5%20.5)'/%3e%3c/g%3e%3cuse%20xlink:href='%23eu-e'%20width='100%25'%20height='100%25'%20transform='scale(-1%201)'/%3e%3c/g%3e%3c/svg%3e")}.fi-eu.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-eu'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cg%20id='eu-d'%3e%3cg%20id='eu-b'%3e%3cpath%20id='eu-a'%20d='m0-1-.3%201%20.5.1z'/%3e%3cuse%20xlink:href='%23eu-a'%20transform='scale(-1%201)'/%3e%3c/g%3e%3cg%20id='eu-c'%3e%3cuse%20xlink:href='%23eu-b'%20transform='rotate(72)'/%3e%3cuse%20xlink:href='%23eu-b'%20transform='rotate(144)'/%3e%3c/g%3e%3cuse%20xlink:href='%23eu-c'%20transform='scale(-1%201)'/%3e%3c/g%3e%3c/defs%3e%3cpath%20fill='%23039'%20d='M0%200h512v512H0z'/%3e%3cg%20fill='%23fc0'%20transform='translate(256%20258.4)scale(25.28395)'%3e%3cuse%20xlink:href='%23eu-d'%20width='100%25'%20height='100%25'%20y='-6'/%3e%3cuse%20xlink:href='%23eu-d'%20width='100%25'%20height='100%25'%20y='6'/%3e%3cg%20id='eu-e'%3e%3cuse%20xlink:href='%23eu-d'%20width='100%25'%20height='100%25'%20x='-6'/%3e%3cuse%20xlink:href='%23eu-d'%20width='100%25'%20height='100%25'%20transform='rotate(-144%20-2.3%20-2.1)'/%3e%3cuse%20xlink:href='%23eu-d'%20width='100%25'%20height='100%25'%20transform='rotate(144%20-2.1%20-2.3)'/%3e%3cuse%20xlink:href='%23eu-d'%20width='100%25'%20height='100%25'%20transform='rotate(72%20-4.7%20-2)'/%3e%3cuse%20xlink:href='%23eu-d'%20width='100%25'%20height='100%25'%20transform='rotate(72%20-5%20.5)'/%3e%3c/g%3e%3cuse%20xlink:href='%23eu-e'%20width='100%25'%20height='100%25'%20transform='scale(-1%201)'/%3e%3c/g%3e%3c/svg%3e")}.fi-gb-eng{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-gb-eng'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23ce1124'%20d='M281.6%200h76.8v480h-76.8z'/%3e%3cpath%20fill='%23ce1124'%20d='M0%20201.6h640v76.8H0z'/%3e%3c/svg%3e")}.fi-gb-eng.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-gb-eng'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23fff'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23ce1124'%20d='M215%200h82v512h-82z'/%3e%3cpath%20fill='%23ce1124'%20d='M0%20215h512v82H0z'/%3e%3c/svg%3e")}.fi-gb-nir{background-image:url(/assets/gb-nir-BOm9QMOa.svg)}.fi-gb-nir.fis{background-image:url(/assets/gb-nir-BZUeOVwE.svg)}.fi-gb-sct{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-gb-sct'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%230065bd'%20d='M0%200h640v480H0z'/%3e%3cpath%20stroke='%23fff'%20stroke-width='.6'%20d='m0%200%205%203M0%203l5-3'%20transform='scale(128%20160)'/%3e%3c/svg%3e")}.fi-gb-sct.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-gb-sct'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%230065bd'%20d='M0%200h512v512H0z'/%3e%3cpath%20stroke='%23fff'%20stroke-width='.6'%20d='m0%200%205%203M0%203l5-3'%20transform='scale(102.4%20170.66667)'/%3e%3c/svg%3e")}.fi-gb-wls{background-image:url(/assets/gb-wls-C4LdH8Nd.svg)}.fi-gb-wls.fis{background-image:url(/assets/gb-wls-lLp_JivI.svg)}.fi-ic{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ic'%20viewBox='0%200%20640%20480'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%230768a9'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%200h213.3v480H0z'/%3e%3cpath%20fill='%23fc0'%20d='M426.7%200H640v480H426.7z'/%3e%3c/g%3e%3c/svg%3e")}.fi-ic.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-ic'%20viewBox='0%200%20512%20512'%3e%3cg%20fill-rule='evenodd'%20stroke-width='1pt'%3e%3cpath%20fill='%230768a9'%20d='M0%200h512v512H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%200h170.7v512H0z'/%3e%3cpath%20fill='%23fc0'%20d='M341.3%200H512v512H341.3z'/%3e%3c/g%3e%3c/svg%3e")}.fi-pc{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-pc'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23003da5'%20d='M0%200h640v480H0z'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(164.3%20311.5%20242.2)'/%3e%3cpath%20id='pc-a'%20fill='%23fff'%20fill-opacity='1'%20fill-rule='nonzero'%20stroke='none'%20stroke-width='.7'%20d='m472.9%20262.8-8.4%201.5-1.1%208.5-4.1-7.5-8.4%201.6%205.8-6.2-4-7.5%207.7%203.6%205.8-6.2-1%208.5z'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-10.3%20311.5%20242.2)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-30.9%20311.5%20242.2)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-20.6%20311.5%20242.2)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-51.5%20311.5%20242.2)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-72.1%20311.5%20242.2)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-61.8%20311.5%20242.2)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-41.2%20311.5%20242.2)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-92.7%20311.5%20242.2)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-113.3%20311.5%20242.2)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-103%20311.5%20242.2)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-133.9%20311.5%20242.2)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-154.5%20311.5%20242.2)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-144.2%20311.5%20242.2)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-123.6%20311.5%20242.2)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-82.4%20311.5%20242.2)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-175.1%20311.5%20242.2)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(174.6%20311.5%20242.2)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(143.7%20311.5%20242.2)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(123.1%20311.5%20242.2)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(133.4%20311.5%20242.2)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(154%20311.5%20242.2)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-164.8%20311.5%20242.2)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(112.8%20311.5%20242.2)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(102.5%20311.5%20242.2)'/%3e%3cpath%20fill='none'%20stroke='%2300aec7'%20stroke-width='13.7'%20d='M444.9%20313A151%20151%200%200%201%20293%20392'/%3e%3cpath%20fill='%23fff'%20d='M474.3%20288.5S449%20277.2%20398%20277c-51-.2-105.2%2013.9-135.1%2013.5-30-.3-38.8-.3-56.7-3.7%200%200%2027%209%2055.8%2011.6%2028.7%202.7%2095.2-10.4%20128.4-12.5%2034-2.1%2060.4-2.1%2083.8%202.6'/%3e%3cpath%20fill='%2300aec7'%20d='M275%20303.2s19.2%201%2056-3c37-4%2063-9.4%2092.1-10.2%2029.1-.7%2061.2%204.4%2068%206.1%200%200-48.5-1.3-68.8%201.6-20.3%203-73%209.5-100.7%2010.2-27.7.6-37.3-3.2-46.6-4.7m-80.5-27.8s51%2013.6%2097.2%204.7c52.3-10.2%2083-10%20106.4-10%2023.4-.2%2047.9%205.7%2047.9%205.7s-96-100.2-196.5-153.3c0%200-7.5%2084.5-55%20152.9'/%3e%3cpath%20fill='%23fff'%20d='M274.2%20197.5s-1.4-5.3-8.3-4.5c0%200%204.4-2%206.4-1%202%201.1%202.4%201.4%202%205.5m-16.8-9.4s1.5-.5%202.2-.3c0%200%201%203.3%203.2%204.5%200%200-3.8-.3-5.4-4.2m22.2%205a12.5%2012.5%200%200%200-8.7-4.8c-1.8%200-6%203.5-6%203.5-1-2-.5-3.4-.5-3.4%202%20.2%203.7%201%203.7%201-.8-2.6-2-3.8-2-3.8%204-1%208.8%202.5%208.8%202.5a16.7%2016.7%200%200%200-11-6.8c-1.2-.1-2.7%201.6-2.7%201.6-7.8%200-9.9%204.3-9.9%204.3%203.3%205.1%2010%206.3%2010%206.3-11.8-1.3-11.5%208-11.5%208l10.9-5.7c-4.2%2024.1-21%2035-22.4%2036.3-1.4%201.4-.5%203%201.5%203.2%201.1%200%202.5%201%206.2-3.4a65%2065%200%200%200%2016.4-35.4l.2.2c1.2%202.9.4%205.4.6%207.3.2%201.9%204.4%206%204.4%206s2.3-4.5%202-7.1c-.5-2.7-5.5-7.6-5.5-7.6%207.8-1.5%208.2%2011.6%208.2%2011.6%203-3.5%202.4-7.3%202.4-7.3s6.3-4.6%204.9-6.4'/%3e%3c/svg%3e")}.fi-pc.fis{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-pc'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23003da5'%20d='M0%200h512v512H0z'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(164.3%20247%20258.3)'/%3e%3cpath%20id='pc-a'%20fill='%23fff'%20fill-opacity='1'%20fill-rule='nonzero'%20stroke='none'%20stroke-width='.7'%20d='m419%20280.3-8.9%201.7-1.1%209-4.4-8-9%201.7%206.3-6.6-4.4-8%208.2%203.9%206.3-6.7-1.2%209z'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-10.3%20247%20258.3)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-30.9%20247%20258.3)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-20.6%20247%20258.3)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-51.5%20247%20258.3)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-72.1%20247%20258.3)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-61.8%20247%20258.3)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-41.2%20247%20258.3)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-92.7%20247%20258.3)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-113.3%20247%20258.3)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-103%20247%20258.3)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-133.9%20247%20258.3)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-154.5%20247%20258.3)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-144.2%20247%20258.3)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-123.6%20247%20258.3)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-82.4%20247%20258.3)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-175.1%20247%20258.3)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(174.6%20247%20258.3)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(143.7%20247%20258.3)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(123.1%20247%20258.3)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(133.4%20247%20258.3)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(154%20247%20258.3)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(-164.8%20247%20258.3)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(112.8%20247%20258.3)'/%3e%3cuse%20xlink:href='%23pc-a'%20width='1000'%20height='700'%20transform='rotate(102.5%20247%20258.3)'/%3e%3cpath%20fill='none'%20stroke='%2300aec7'%20stroke-width='14.6'%20d='M389.2%20334a161%20161%200%200%201-161.9%2084.2'/%3e%3cpath%20fill='%23fff'%20d='M420.6%20307.7s-26.9-12-81.3-12.2c-54.4-.2-112.2%2014.8-144.1%2014.4-32-.4-41.4-.4-60.5-4%200%200%2028.9%209.6%2059.5%2012.4%2030.7%202.9%20101.6-11.1%20137-13.4%2036.2-2.2%2064.4-2.2%2089.4%202.8'/%3e%3cpath%20fill='%2300aec7'%20d='M208%20323.4s20.5%201%2059.8-3.2%2067.2-10%2098.2-10.8c31-.8%2065.3%204.6%2072.5%206.5%200%200-51.7-1.4-73.4%201.7-21.7%203-77.8%2010.1-107.4%2010.8-29.6.7-39.7-3.3-49.7-5m-85.9-29.6s54.4%2014.5%20103.8%205c55.7-10.9%2088.5-10.7%20113.4-10.8%2025-.1%2051%206.2%2051%206.2S288%20187.3%20180.9%20130.7c0%200-8%2090.1-58.7%20163'/%3e%3cpath%20fill='%23fff'%20d='M207.2%20210.7s-1.5-5.7-9-4.9c0%200%204.8-2%207-1%202%201.2%202.5%201.5%202%205.9m-17.9-10s1.7-.6%202.3-.3c0%200%201.2%203.4%203.5%204.7%200%200-4-.3-5.8-4.5M213%20206a13.3%2013.3%200%200%200-9.3-5.1c-1.8%200-6.3%203.6-6.3%203.6-1.1-2-.6-3.6-.6-3.6%202.2.3%204%201%204%201a9%209%200%200%200-2.2-3.9c4.3-1.1%209.4%202.6%209.4%202.6a17.8%2017.8%200%200%200-11.8-7.3c-1.2%200-2.8%201.8-2.8%201.8-8.3%200-10.5%204.6-10.5%204.6%203.4%205.4%2010.6%206.7%2010.6%206.7-12.6-1.4-12.3%208.4-12.3%208.4l11.6-6c-4.4%2025.8-22.4%2037.3-23.9%2038.8-1.4%201.5-.5%203.1%201.7%203.3%201.1.2%202.6%201.1%206.6-3.5a70%2070%200%200%200%2017.5-37.8l.2.2c1.2%203%20.4%205.8.6%207.8.3%202%204.7%206.3%204.7%206.3s2.4-4.7%202-7.5c-.3-2.8-5.8-8.1-5.8-8.1%208.4-1.5%208.9%2012.4%208.9%2012.4%203.2-3.8%202.5-7.8%202.5-7.8s6.7-4.9%205.2-6.9'/%3e%3c/svg%3e")}.fi-sh-ac{background-image:url(/assets/sh-ac-Bxo6e1OQ.svg)}.fi-sh-ac.fis{background-image:url(/assets/sh-ac-6pU0wZVL.svg)}.fi-sh-hl{background-image:url(/assets/sh-hl-a930SJst.svg)}.fi-sh-hl.fis{background-image:url(/assets/sh-hl-DWwv0HRi.svg)}.fi-sh-ta{background-image:url(/assets/sh-ta-BNzkCa6e.svg)}.fi-sh-ta.fis{background-image:url(/assets/sh-ta-DNDOtP8t.svg)}.fi-un{background-image:url(/assets/un-ChThV8ch.svg)}.fi-un.fis{background-image:url(/assets/un-BQ1kEGox.svg)}.fi-xk{background-image:url(/assets/xk-F5dDvX79.svg)}.fi-xk.fis{background-image:url(/assets/xk-B6uU6dIH.svg)} diff --git a/assets/Icons-Ct84pi7p.js b/assets/Icons-Ct84pi7p.js deleted file mode 100644 index 9c9e95c..0000000 --- a/assets/Icons-Ct84pi7p.js +++ /dev/null @@ -1,255 +0,0 @@ -import { - r as w, - j as c, - c as p -} from "./vendor-Dkz3gcSC.js"; -import { - c as m, - a as d -} from "./language-db-DxKZVAm4.js"; -const u = ["en", "hi", "fr", "de", "nl", "pt"], - L = { - zh: "cn", - nv: "us" - }, - x = ["ar-SA", "bg-BG", "bn-BD", "cs-CZ", "ca-AD", "de-DE", "el-GR", "en-US", "es-ES", "et-EE", "fa-IR", "fr-FR", "gl-ES", "gu-IN", "he-IL", "id-ID", "it-IT", "ja-JP", "ko-KR", "lv-LV", "ne-NP", "nl-NL", "pl-PL", "pt-BR", "ru-RU", "sl-SI", "sv-SE", "ta-LK", "th-TH", "tr-TR", "vi-VN", "zh-CN", "nv-US"], - M = { - pirate: { - code: "pirate", - name: "Pirate", - nativeName: "Pirate Tongue" - }, - minion: { - code: "minion", - name: "Minion", - nativeName: "Minionese" - }, - tok: { - code: "tok", - name: "Toki pona", - nativeName: "Toki pona" - } - }; - -function f(e) { - return e.includes("-") || e.length !== 2 ? e : x.find(t => t.startsWith(`${e}-`)) ?? e -} - -function B(e) { - var l, h, n, i; - const t = m.getTag(e, !0), - o = ((h = (l = t == null ? void 0 : t.language) == null ? void 0 : l.Description) == null ? void 0 : h[0]) ?? null; - if (!o) return null; - const s = ((i = (n = t == null ? void 0 : t.region) == null ? void 0 : n.Description) == null ? void 0 : i[0]) ?? null; - let r = ""; - return s && (r = ` (${s})`), `${o}${r}` -} - -function _(e) { - const t = [...u].reverse(); - return e.sort((s, r) => { - const l = t.findIndex(n => s.startsWith(`${n}-`) || s === n), - h = t.findIndex(n => r.startsWith(`${n}-`) || r === n); - return l !== -1 || h !== -1 ? h - l : s.localeCompare(r) - }) -} - -function V(e) { - var l, h; - let t = null; - const o = m.getTag(f(e), !0); - if (!((l = o == null ? void 0 : o.language) != null && l.Subtag) || (d.getLanguage(o.language.Subtag, (n, i) => { - i && (t = i) - }), !t)) return null; - const s = L[t.iso639_1.toLowerCase()]; - if (t.countries.length === 0) return s ?? null; - if (s) { - const n = t.countries.find(i => i.code_2.toLowerCase() === s); - if (n) return n.code_2.toLowerCase() - } - const r = (h = o == null ? void 0 : o.region) == null ? void 0 : h.Subtag.toLowerCase(); - if (r) { - const n = t.countries.find(i => i.code_2.toLowerCase() === r || i.code_3.toLowerCase() === r); - if (n) return n.code_2.toLowerCase() - } - return t.countries[0].code_2.toLowerCase() -} - -function b(e) { - var n, i, C; - const t = f(e), - o = M[t]; - if (o) return o; - const s = m.getTag(t, !0); - if (!((n = s == null ? void 0 : s.language) != null && n.Subtag)) return null; - let r = null; - if (d.getLanguage(s.language.Subtag, (g, v) => { - v && (r = v) - }), !r) return null; - const l = []; - (i = s.region) != null && i.Description && l.push(s.region.Description[0]), (C = s.script) != null && C.Description && l.push(s.script.Description[0]); - const h = l.map(g => `(${g})`).join(" "); - return { - code: s.parts.langtag ?? t, - isRtl: r.direction === "RTL", - name: r.name[0] + (h ? ` ${h}` : ""), - nativeName: r.nativeName[0] ?? void 0 - } -} -let a = function (e) { - return e.SEARCH = "search", e.BOOKMARK = "bookmark", e.BOOKMARK_OUTLINE = "bookmark_outline", e.CLOCK = "clock", e.EYE = "eye", e.EYE_SLASH = "eyeSlash", e.ARROW_LEFT = "arrowLeft", e.ARROW_RIGHT = "arrowRight", e.CHEVRON_DOWN = "chevronDown", e.CHEVRON_UP = "chevronUp", e.CHEVRON_RIGHT = "chevronRight", e.CHEVRON_LEFT = "chevronLeft", e.CLAPPER_BOARD = "clapperBoard", e.FILM = "film", e.DRAGON = "dragon", e.WARNING = "warning", e.MOVIE_WEB = "movieWeb", e.DISCORD = "discord", e.GITHUB = "github", e.PLAY = "play", e.PAUSE = "pause", e.EXPAND = "expand", e.COMPRESS = "compress", e.VOLUME = "volume", e.VOLUME_X = "volume_x", e.X = "x", e.EDIT = "edit", e.AIRPLAY = "airplay", e.EPISODES = "episodes", e.SKIP_FORWARD = "skip_forward", e.SKIP_BACKWARD = "skip_backward", e.FILE = "file", e.CAPTIONS = "captions", e.LINK = "link", e.CASTING = "casting", e.CIRCLE_EXCLAMATION = "circle_exclamation", e.DOWNLOAD = "download", e.GEAR = "gear", e.WATCH_PARTY = "watch_party", e.PICTURE_IN_PICTURE = "pictureInPicture", e.CHECKMARK = "checkmark", e.TACHOMETER = "tachometer", e.MAIL = "mail", e.CIRCLE_CHECK = "circle_check", e.SKIP_EPISODE = "skip_episode", e.MORE_VERTICAL = "more_vertical", e.IOS_SHARE = "ios_share", e.IOS_FILES = "ios_files", e.WAND = "wand", e.COPY = "copy", e.USER = "user", e.UP_DOWN_ARROW = "up_down_arrow", e.RISING_STAR = "rising_star", e.SETTINGS = "settings", e.COINS = "coins", e.LOGOUT = "logout", e.MENU = "menu", e.LOCK = "lock", e.UNLOCK = "unlock", e.DONATION = "donation", e.CIRCLE_QUESTION = "circle_question", e.BRUSH = "brush", e.UPLOAD = "upload", e -}({}); -const y = { - search: '', - bookmark: '', - clock: '', - eye: '', - eyeSlash: '', - arrowLeft: '', - chevronDown: '', - chevronUp: '', - chevronRight: '', - chevronLeft: '', - clapperBoard: '', - film: '', - dragon: '', - warning: '', - arrowRight: '', - movieWeb: '', - discord: '', - github: '', - play: '', - pause: '', - expand: '', - compress: '', - volume: '', - volume_x: '', - x: '', - edit: '', - bookmark_outline: '', - airplay: '', - episodes: '', - skip_forward: '', - skip_backward: '', - file: '', - captions: '', - link: '', - circle_exclamation: '', - casting: "", - download: '', - gear: '', - watch_party: '', - pictureInPicture: '', - checkmark: '', - tachometer: '', - mail: '', - circle_check: '', - skip_episode: '', - more_vertical: '', - ios_share: '', - ios_files: '', - wand: '', - copy: '', - user: '', - up_down_arrow: '', - rising_star: '', - settings: '', - coins: '', - logout: '', - menu: '', - lock: '', - unlock: '', - donation: '', - circle_question: '', - brush: '', - upload: '' -}; - -function H() { - const e = w.useRef(null); - return w.useEffect(() => { - var o; - const t = document.createElement("google-cast-launcher"); - t.setAttribute("id", "castbutton"), (o = e.current) == null || o.appendChild(t) - }, []), c.jsx("div", { - ref: e, - className: "h-6" - }) -} -const k = w.memo(e => { - if (e.icon === a.CASTING) return c.jsx(H, {}); - const t = e.icon === a.ARROW_LEFT || e.icon === a.ARROW_RIGHT || e.icon === a.CHEVRON_LEFT || e.icon === a.CHEVRON_RIGHT ? "rtl:-scale-x-100" : ""; - return c.jsx("span", { - dangerouslySetInnerHTML: { - __html: y[e.icon] - }, - className: p(e.className, t) - }) -}); -let R = function (e) { - return e.USER_GROUP = "userGroup", e.COUCH = "couch", e.MOBILE = "mobile", e.TICKET = "ticket", e.HANDCUFFS = "handcuffs", e -}({}); -const z = { - userGroup: '', - couch: '', - mobile: '', - ticket: '', - handcuffs: '' - }, - E = w.memo(e => { - const t = z[e.icon]; - return t ? c.jsx("span", { - dangerouslySetInnerHTML: { - __html: t - }, - className: e.className - }) : c.jsx(k, { - className: e.className, - icon: a.X - }) - }); - -function N(e) { - let t = e.country ?? null; - if (e.langCode && (t = V(e.langCode)), e.langCode === "tok") return c.jsx("div", { - className: "w-8 h-6 rounded bg-[#c8e1ed] flex justify-center items-center", - children: c.jsx("img", { - src: "/flags/tokiPona.svg", - className: "w-7 h-5" - }) - }); - if (e.langCode === "pirate") return c.jsx("div", { - className: "w-8 h-6 rounded bg-[#2E3439] flex justify-center items-center", - children: c.jsx("img", { - src: "/flags/skull.svg", - className: "w-4 h-4" - }) - }); - if (e.langCode === "minion") return c.jsx("div", { - className: "w-8 h-6 rounded bg-[#ffff1a] flex justify-center items-center", - children: c.jsx("div", { - className: "w-4 h-4 border-2 border-gray-500 rounded-full bg-white flex justify-center items-center", - children: c.jsx("div", { - className: "w-1.5 h-1.5 rounded-full bg-gray-900 relative", - children: c.jsx("div", { - className: "absolute top-0 left-0 w-1 h-1 bg-white rounded-full transform -translate-x-1/3 -translate-y-1/3" - }) - }) - }) - }); - if (e.langCode === "gl-ES") return c.jsx("div", { - className: "w-8 h-6 rounded bg-[#2E3439] flex justify-center items-center", - children: c.jsx("img", { - src: "/flags/galicia.svg", - className: "rounded" - }) - }); - let o = "bg-video-context-flagBg"; - return t === "np" && (o = "bg-white"), c.jsx("span", { - className: p("!w-8 min-w-8 h-6 rounded overflow-hidden bg-cover bg-center block fi", o, t ? `fi-${t}` : void 0) - }) -} -export { - N as F, k as I, E as U, a, B as b, R as c, b as g, _ as s -}; -//# sourceMappingURL=Icons-Ct84pi7p.js.map \ No newline at end of file diff --git a/assets/Icons-Ct84pi7p.js.map b/assets/Icons-Ct84pi7p.js.map deleted file mode 100644 index 0b3251d..0000000 --- a/assets/Icons-Ct84pi7p.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Icons-Ct84pi7p.js","sources":["../../src/utils/language.ts"],"sourcesContent":["import countryLanguages, { LanguageObj } from \"@ladjs/country-language\";\nimport { getTag } from \"@sozialhelden/ietf-language-tags\";\n\nconst languageOrder = [\"en\", \"hi\", \"fr\", \"de\", \"nl\", \"pt\"];\n\n// mapping of language code to country code.\n// multiple mappings can exist, since languages are spoken in multiple countries.\n// This mapping purely exists to prioritize a country over another in languages where the base language code does\n// not contain a region (i.e. if the language code is zh-Hant where Hant is a script) or if the region in the language code is incorrect\n// iso639_1 -> iso3166 Alpha-2\nconst countryPriority: Record = {\n zh: \"cn\",\n nv: \"us\",\n};\n\n// list of iso639_1 Alpha-2 codes used as default languages\nconst defaultLanguageCodes: string[] = [\n \"ar-SA\",\n \"bg-BG\",\n \"bn-BD\",\n \"cs-CZ\",\n \"ca-AD\",\n \"de-DE\",\n \"el-GR\",\n \"en-US\",\n \"es-ES\",\n \"et-EE\",\n \"fa-IR\",\n \"fr-FR\",\n \"gl-ES\",\n \"gu-IN\",\n \"he-IL\",\n \"id-ID\",\n \"it-IT\",\n \"ja-JP\",\n \"ko-KR\",\n \"lv-LV\",\n \"ne-NP\",\n \"nl-NL\",\n \"pl-PL\",\n \"pt-BR\",\n \"ru-RU\",\n \"sl-SI\",\n \"sv-SE\",\n \"ta-LK\",\n \"th-TH\",\n \"tr-TR\",\n \"vi-VN\",\n \"zh-CN\",\n \"nv-US\",\n];\n\nexport interface LocaleInfo {\n name: string;\n nativeName?: string;\n code: string;\n isRtl?: boolean;\n}\n\nconst extraLanguages: Record = {\n pirate: {\n code: \"pirate\",\n name: \"Pirate\",\n nativeName: \"Pirate Tongue\",\n },\n minion: {\n code: \"minion\",\n name: \"Minion\",\n nativeName: \"Minionese\",\n },\n tok: {\n code: \"tok\",\n name: \"Toki pona\",\n nativeName: \"Toki pona\",\n },\n};\n\nfunction populateLanguageCode(language: string): string {\n if (language.includes(\"-\")) return language;\n if (language.length !== 2) return language;\n return (\n defaultLanguageCodes.find((v) => v.startsWith(`${language}-`)) ?? language\n );\n}\n\n/**\n * @param locale idk what kinda code this takes, anything in ietf format I guess\n * @returns pretty format for language, null if it no info can be found for language\n */\nexport function getPrettyLanguageNameFromLocale(locale: string): string | null {\n const tag = getTag(locale, true);\n const lang = tag?.language?.Description?.[0] ?? null;\n if (!lang) return null;\n\n const region = tag?.region?.Description?.[0] ?? null;\n let regionText = \"\";\n if (region) regionText = ` (${region})`;\n\n return `${lang}${regionText}`;\n}\n\n/**\n * Sort locale codes by occurrence, rest on alphabetical order\n * @param langCodes list language codes to sort\n * @returns sorted version of inputted list\n */\nexport function sortLangCodes(langCodes: string[]) {\n const languagesOrder = [...languageOrder].reverse(); // Reverse is necessary, not sure why\n\n const results = langCodes.sort((a, b) => {\n const langOrderA = languagesOrder.findIndex(\n (v) => a.startsWith(`${v}-`) || a === v,\n );\n const langOrderB = languagesOrder.findIndex(\n (v) => b.startsWith(`${v}-`) || b === v,\n );\n if (langOrderA !== -1 || langOrderB !== -1) return langOrderB - langOrderA;\n\n return a.localeCompare(b);\n });\n\n return results;\n}\n\n/**\n * Get country code for locale\n * @param locale input locale\n * @returns country code or null\n */\nexport function getCountryCodeForLocale(locale: string): string | null {\n let output: LanguageObj | null = null as any as LanguageObj;\n const tag = getTag(populateLanguageCode(locale), true);\n\n if (!tag?.language?.Subtag) return null;\n // this function isn't async, so its guaranteed to work like this\n countryLanguages.getLanguage(tag.language.Subtag, (_err, lang) => {\n if (lang) output = lang;\n });\n\n if (!output) return null;\n const priority = countryPriority[output.iso639_1.toLowerCase()];\n if (output.countries.length === 0) {\n return priority ?? null;\n }\n\n if (priority) {\n const prioritizedCountry = output.countries.find(\n (v) => v.code_2.toLowerCase() === priority,\n );\n if (prioritizedCountry) return prioritizedCountry.code_2.toLowerCase();\n }\n\n // If the language contains a region, check that against the countries and\n // return the region if it matches\n const regionSubtag = tag?.region?.Subtag.toLowerCase();\n if (regionSubtag) {\n const regionCode = output.countries.find(\n (c) =>\n c.code_2.toLowerCase() === regionSubtag ||\n c.code_3.toLowerCase() === regionSubtag,\n );\n if (regionCode) return regionCode.code_2.toLowerCase();\n }\n return output.countries[0].code_2.toLowerCase();\n}\n\n/**\n * Get information for a specific local\n * @param locale local code\n * @returns locale object\n */\nexport function getLocaleInfo(locale: string): LocaleInfo | null {\n const realLocale = populateLanguageCode(locale);\n const extraLang = extraLanguages[realLocale];\n if (extraLang) return extraLang;\n\n const tag = getTag(realLocale, true);\n if (!tag?.language?.Subtag) return null;\n\n let output: LanguageObj | null = null as any as LanguageObj;\n // this function isnt async, so its garuanteed to work like this\n countryLanguages.getLanguage(tag.language.Subtag, (_err, lang) => {\n if (lang) output = lang;\n });\n if (!output) return null;\n\n const extras = [];\n if (tag.region?.Description) extras.push(tag.region.Description[0]);\n if (tag.script?.Description) extras.push(tag.script.Description[0]);\n const extraStringified = extras.map((v) => `(${v})`).join(\" \");\n\n return {\n code: tag.parts.langtag ?? realLocale,\n isRtl: output.direction === \"RTL\",\n name: output.name[0] + (extraStringified ? ` ${extraStringified}` : \"\"),\n nativeName: output.nativeName[0] ?? undefined,\n };\n}\n"],"names":["languageOrder","countryPriority","zh","nv","defaultLanguageCodes","extraLanguages","pirate","code","name","nativeName","minion","tok","populateLanguageCode","language","includes","length","find","v","startsWith","getPrettyLanguageNameFromLocale","locale","tag","getTag","lang","Description","region","regionText","sortLangCodes","langCodes","languagesOrder","reverse","results","sort","a","b","langOrderA","findIndex","langOrderB","localeCompare","getCountryCodeForLocale","output","Subtag","countryLanguages","getLanguage","_err","priority","iso639_1","toLowerCase","countries","prioritizedCountry","code_2","regionSubtag","regionCode","c","code_3","getLocaleInfo","realLocale","extraLang","extras","push","script","extraStringified","map","join","parts","langtag","isRtl","direction","undefined"],"mappings":"4GAGA,MAAMA,EAAgB,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,IAAI,EAOnDC,EAA0C,CAC9CC,GAAI,KACJC,GAAI,IACN,EAGMC,EAAiC,CACrC,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,OAAO,EAUHC,EAA6C,CACjDC,OAAQ,CACNC,KAAM,SACNC,KAAM,SACNC,WAAY,eACd,EACAC,OAAQ,CACNH,KAAM,SACNC,KAAM,SACNC,WAAY,WACd,EACAE,IAAK,CACHJ,KAAM,MACNC,KAAM,YACNC,WAAY,WACd,CACF,EAEA,SAASG,EAAqBC,EAA0B,CAEtD,OADIA,EAASC,SAAS,GAAG,GACrBD,EAASE,SAAW,EAAUF,EAEhCT,EAAqBY,KAAYC,GAAAA,EAAEC,WAAY,GAAEL,CAAS,GAAE,CAAC,GAAKA,CAEtE,CAMO,SAASM,EAAgCC,EAA+B,aACvEC,MAAAA,EAAMC,EAAAA,OAAOF,EAAQ,EAAI,EACzBG,IAAOF,GAAAA,EAAAA,GAAAA,YAAAA,EAAKR,WAALQ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AKqD,EAAoB,IAAGA,CAAiB,GAAI,IACpEpD,WAAY+B,EAAO/B,WAAW,CAAC,GAAK2D,MAAAA,CAExC"} \ No newline at end of file diff --git a/assets/PlayerView-CHau_TOb.js b/assets/PlayerView-CHau_TOb.js deleted file mode 100644 index e520613..0000000 --- a/assets/PlayerView-CHau_TOb.js +++ /dev/null @@ -1,9 +0,0 @@ -import{ar as $,p as L,j as e,q as T,r as d,c as D,ax as _}from"./vendor-Dkz3gcSC.js";import{e as K,i as q,g as U,f as J,s as Q,b as F,d as Y,c as X,M as Z,E as b,h as v,I as P,a as C,P as I,B as E,j as G,L as W,k as V,u as ee,l as te,m as ne,n as re,o as ae,p as O,q as se,r as B,t as k,v as ie,w as ce,x as oe,y as de,z as le,A as ue,C as me,D as pe,F as fe,G as he,H as xe,J as ge,K as ye,O as je,Q as M,R as Se}from"./index-DYBNcHgS.js";import{a as N,I as we}from"./Icons-Ct84pi7p.js";import{b as R,a as z,T as Ee,l as be}from"./react-dom-DpNJ2UNC.js";import{S as Ne}from"./StatusCircle-D7h8AcdR.js";import"./auth-72H9TcpW.js";import"./caption-parsing-BABN6jyO.js";import"./locales-BXkJCeK5.js";import"./hls-2_Gpnevg.js";import"./language-db-DxKZVAm4.js";function ve(n,t){return!!V().DISALLOWED_IDS.map(a=>a.split("-")).find(a=>n===a[1]&&t===a[0])}function Pe(n){const{t}=R(),c=$(),a=L(),{error:l,value:x,loading:u}=z(async()=>{var s;const f=await K(),p=(f==null?void 0:f.success)&&q(f.version)&&f.allowed;if(p&&!f.hasPermission)throw new Error("extension-no-permission");const j=U();if(j&&!p)try{await J(j)}catch{throw new Error("failed-api-metadata")}else Q([...F().listSources(),...F().listEmbeds()]);let o=null;try{if(!c.media)throw new Error("no media params");o=Y(c.media)}catch{}if(!o)return null;if(ve(o.id,o.type))throw new Error("dmca");let g=null;try{g=await X(o.type,o.id,c.season)}catch(r){if(r.status===404)return null;throw r}if(!g)return null;let S=c.episode;if(g.meta.type===Z.SERIES){let r=g.meta.seasonData.episodes.find(i=>i.id===c.episode);r||(r=g.meta.seasonData.episodes[0]),S=r.id,(c.season!==g.meta.seasonData.id||c.episode!==r.id)&&a(`/media/${c.media}/${g.meta.seasonData.id}/${r.id}`,{replace:!0})}(s=n.onGetMeta)==null||s.call(n,g,S)},[]);return l&&l.message==="extension-no-permission"?e.jsx(b,{children:e.jsxs(v,{children:[e.jsx(P,{icon:N.WAND,children:t("player.metadata.extensionPermission.badge")}),e.jsx(C,{children:t("player.metadata.extensionPermission.title")}),e.jsx(I,{children:t("player.metadata.extensionPermission.text")}),e.jsx(E,{onClick:()=>{G({page:"PermissionGrant",redirectUrl:window.location.href})},theme:"purple",padding:"md:px-12 p-2.5",className:"mt-6",children:t("player.metadata.extensionPermission.button")})]})}):l&&l.message==="dmca"?e.jsx(b,{children:e.jsxs(v,{children:[e.jsx(P,{icon:N.DRAGON,children:t("player.metadata.dmca.badge")}),e.jsx(C,{children:t("player.metadata.dmca.title")}),e.jsx(I,{children:t("player.metadata.dmca.text")}),e.jsx(E,{href:"/",theme:"purple",padding:"md:px-12 p-2.5",className:"mt-6",children:t("player.metadata.failed.homeButton")})]})}):l&&l.message==="failed-api-metadata"?e.jsx(b,{children:e.jsxs(v,{children:[e.jsx(P,{icon:N.WAND,children:t("player.metadata.failed.badge")}),e.jsx(C,{children:t("player.metadata.api.text")}),e.jsx(I,{children:t("player.metadata.api.title")}),e.jsx(E,{href:"/",theme:"purple",padding:"md:px-12 p-2.5",className:"mt-6",children:t("player.metadata.failed.homeButton")})]})}):l?e.jsx(b,{children:e.jsxs(v,{children:[e.jsx(P,{icon:N.WAND,children:t("player.metadata.failed.badge")}),e.jsx(C,{children:t("player.metadata.failed.title")}),e.jsx(I,{children:t("player.metadata.failed.text")}),e.jsx(E,{href:"/",theme:"purple",padding:"md:px-12 p-2.5",className:"mt-6",children:t("player.metadata.failed.homeButton")})]})}):!x&&!u?e.jsx(b,{children:e.jsxs(v,{children:[e.jsx(P,{icon:N.WAND,children:t("player.metadata.notFound.badge")}),e.jsx(C,{children:t("player.metadata.notFound.title")}),e.jsx(I,{children:t("player.metadata.notFound.text")}),e.jsx(E,{href:"/",theme:"purple",padding:"md:px-12 p-2.5",className:"mt-6",children:t("player.metadata.notFound.homeButton")})]})}):e.jsx(b,{children:e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(W,{})})})}function Ce(n){const{t}=R(),c=ee("error"),a=T(),[l,x]=d.useState("unknown"),u=d.useMemo(()=>{const f=n.data;let p="";const j=te();return p+=`URL - ${a.pathname} -`,p+=`API - ${j.length>0} - -`,Object.values(f.sources).forEach(o=>{var g;p+=`${o.id}: ${o.status} -`,o.reason&&(p+=`${o.reason} -`),(g=o.error)!=null&&g.message?p+=`${o.error.name??"unknown"}: ${o.error.message} -`:o.error&&(p+=`${o.error.toString()} -`)}),p},[n,a]);return d.useEffect(()=>{ne().then(f=>{x(f)})},[t]),l==="disallowed"?e.jsx(b,{children:e.jsxs(v,{children:[e.jsx(P,{icon:N.LOCK,children:t("player.scraping.extensionFailure.badge")}),e.jsx(C,{children:t("player.scraping.extensionFailure.title")}),e.jsx(I,{children:e.jsx(Ee,{i18nKey:"player.scraping.extensionFailure.text",components:{bold:e.jsx("span",{className:"font-bold",style:{color:"#cfcfcf"}})}})}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(E,{href:"/",theme:"secondary",padding:"md:px-12 p-2.5",className:"mt-6",children:t("player.scraping.extensionFailure.homeButton")}),e.jsx(E,{onClick:()=>{G({page:"PermissionGrant",redirectUrl:window.location.href})},theme:"purple",padding:"md:px-12 p-2.5",className:"mt-6",children:t("player.scraping.extensionFailure.enableExtension")})]})]})}):e.jsxs(b,{children:[e.jsxs(v,{children:[e.jsx(P,{icon:N.WAND,children:t("player.scraping.notFound.badge")}),e.jsx(C,{children:t("player.scraping.notFound.title")}),e.jsx(I,{children:t("player.scraping.notFound.text")}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(E,{href:"/",theme:"secondary",padding:"md:px-12 p-2.5",className:"mt-6",children:t("player.scraping.notFound.homeButton")}),e.jsx(E,{onClick:()=>c.show(),theme:"purple",padding:"md:px-12 p-2.5",className:"mt-6",children:t("player.scraping.notFound.detailsButton")})]})]}),u?e.jsx(re,{id:c.id,onClose:()=>c.hide(),error:u}):null]})}const Ie={notfound:"player.scraping.items.notFound",failure:"player.scraping.items.failure",pending:"player.scraping.items.pending"},Ae={failure:"error",notfound:"noresult",pending:"loading",success:"success",waiting:"waiting"};function H(n){const{t}=R(),c=Ie[n.status],a=Ae[n.status];return e.jsxs("div",{className:"grid gap-4 grid-cols-[auto,1fr]","data-source-id":n.id,children:[e.jsx(Ne,{type:a,percentage:n.percentage??0}),e.jsxs("div",{children:[e.jsx("p",{className:a==="loading"?"text-white":"text-type-secondary",children:n.name}),e.jsx(ae,{animation:"fade",show:!!c,children:e.jsx("p",{className:"text-[15px] mt-1",children:c?t(c):""})}),n.children]})]})}function Me(n){return e.jsx("div",{"data-source-id":n.id,className:"w-80 mb-6",children:e.jsx("div",{className:D({"!bg-opacity-100 py-6":n.hasChildren,"w-80 rounded-md px-6 bg-video-scraping-card bg-opacity-0":!0}),children:e.jsx(H,{...n})})})}function Re(){const[n,t]=d.useState({}),[c,a]=d.useState([]),[l,x]=d.useState(),u=d.useRef(null),f=d.useCallback(s=>{t(s.sourceIds.map(r=>{const i=k().find(h=>h.id===r);if(!i)throw new Error("invalid source id");return{name:i.name,id:i.id,status:"waiting",percentage:0}}).reduce((r,i)=>(r[i.id]=i,r),{})),a(s.sourceIds.map(r=>({id:r,children:[]})))},[]),p=d.useCallback(s=>{const r=u.current;t(i=>(i[s]&&(i[s].status="pending"),r&&i[r]&&i[r].status==="pending"&&(i[r].status="success"),{...i})),x(s),u.current=s},[]),j=d.useCallback(s=>{t(r=>(r[s.id]&&(r[s.id].status=s.status,r[s.id].reason=s.reason,r[s.id].error=s.error,r[s.id].percentage=s.percentage),{...r}))},[]),o=d.useCallback(s=>{t(r=>(s.embeds.forEach(i=>{const m=k().find(y=>y.id===i.embedScraperId);if(!m)throw new Error("invalid source id");const h={embedId:i.embedScraperId,name:m.name,id:i.id,status:"waiting",percentage:0};r[i.id]=h}),{...r})),a(r=>{const i=r.find(m=>m.id===s.sourceId);if(!i)throw new Error("invalid source id");return i.children=s.embeds.map(m=>m.id),[...r]})},[]),g=d.useCallback(()=>{u.current=null},[]),S=d.useCallback(s=>(s&&u.current&&t(r=>u.current?(r[u.current]&&(r[u.current].status="success"),{...r}):r),s),[]);return{initEvent:f,startEvent:p,updateEvent:j,discoverEmbedsEvent:o,startScrape:g,getResult:S,sources:n,sourceOrder:c,currentSource:l}}function Oe(){const{sources:n,sourceOrder:t,currentSource:c,updateEvent:a,discoverEmbedsEvent:l,initEvent:x,getResult:u,startEvent:f,startScrape:p}=Re();return{startScraping:d.useCallback(async o=>{const g=U();if(g&&!O()){p();const r=ie(g),i=await se(r.scrapeAll(o),["completed","noOutput"]);i.on("init",x),i.on("start",f),i.on("update",a),i.on("discoverEmbeds",l);const m=await i.promise();return m&&O()&&await B(m.stream),u(m===""?null:m)}p();const s=await F().runAll({media:o,events:{init:x,start:f,update:a,discoverEmbeds:l}});return s&&O()&&await B(s.stream),u(s)},[x,f,a,l,u,p]),sourceOrder:t,sources:n,currentSource:c}}function De(n,t,c,a){const[l,x]=d.useState(!1),u=d.useCallback(()=>{if(!n.current||!t.current)return;const p=[...t.current.querySelectorAll("div[data-source-id]")],j=p.findIndex(A=>A.getAttribute("data-source-id")===a),o=p[j];if(!o)return;const g=n.current.getBoundingClientRect().width,S=t.current.getBoundingClientRect().width,s=n.current.getBoundingClientRect().height,r=t.current.getBoundingClientRect().top,i=o.getBoundingClientRect().top,m=o.getBoundingClientRect().height,h=i-r,y=g/2-S/2,w=s/2-h-m/2;t.current.style.transform=`translateY(${w}px) translateX(${y}px)`,setTimeout(()=>{x(!0)},150)},[a,n,t,x]),f=d.useRef(u);return d.useEffect(()=>{u(),f.current=u},[u,c]),d.useEffect(()=>{function p(){f.current()}return window.addEventListener("resize",p),()=>{window.removeEventListener("resize",p)}},[]),l}function Fe(n){return e.jsxs("div",{className:"flex flex-col justify-center items-center h-screen text-center font-medium",children:[e.jsx(ce,{}),e.jsx(we,{className:"text-type-danger text-2xl",icon:N.WARNING}),e.jsx("div",{className:"max-w-[19rem] mt-3 mb-12 text-type-secondary",children:n.children})]})}function Be(n){const{report:t}=oe(),{startScraping:c,sourceOrder:a,sources:l,currentSource:x}=Oe(),u=be(),{t:f}=R(),p=d.useRef(null),j=d.useRef(null),[o,g]=d.useState(!1),S=De(p,j,a,x),s=d.useRef({sourceOrder:a,sources:l});d.useEffect(()=>{s.current={sourceOrder:a,sources:l}},[a,l]);const r=d.useRef(!1);d.useEffect(()=>{r.current||(r.current=!0,(async()=>{var h,y;const m=await c(n.media);u()&&((h=n.onResult)==null||h.call(n,s.current.sources,s.current.sourceOrder),t(de(n.media,s.current.sourceOrder,s.current.sources)),(y=n.onGetStream)==null||y.call(n,m))})().catch(()=>g(!0)))},[c,n,t,u]);let i=a.findIndex(m=>m.id===x||m.children.includes(x??""));return i===-1&&(i=a.length-1),o?e.jsx(Fe,{children:f("player.turnstile.error")}):e.jsxs("div",{className:"h-full w-full relative dir-neutral:origin-top-left flex",ref:p,children:[!a||a.length===0?e.jsxs("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-center flex flex-col justify-center z-0",children:[e.jsx(W,{className:"mb-8"}),e.jsx("p",{children:f("player.turnstile.verifyingHumanity")})]}):null,e.jsx("div",{className:D({"absolute transition-[transform,opacity] opacity-0 dir-neutral:left-0":!0,"!opacity-100":S}),ref:j,children:a.map(m=>{const h=l[m.id],y=Math.abs(a.findIndex(w=>w.id===m.id)-i);return e.jsx("div",{className:"transition-opacity duration-100",style:{opacity:Math.max(0,1-y*.3)},children:e.jsx(Me,{id:m.id,name:h.name,status:h.status,hasChildren:m.children.length>0,percentage:h.percentage,children:e.jsx("div",{className:D({"space-y-6 mt-8":m.children.length>0}),children:m.children.map(w=>{const A=l[w];return e.jsx(H,{id:w,name:A.name,status:A.status,percentage:A.percentage},w)})})})},m.id)})})]})}async function ke(){return!(!V().HAS_ONBOARDING||await le()||ue.getState().proxySet||me.getState().completed)}function $e(n){const t=n??"";if(!!!t.match(/^\d+(:\d+)*$/))return null;const a=t.split(":").map(Number).reverse(),l=a[2]??0,x=Math.min(a[1]??0,59),u=Math.min(a[0]??0,x>0?59:1/0);return l*60*60+x*60+u}function Le(){const n=L(),t=$(),[c,a]=d.useState(null),[l]=pe("t"),{status:x,playMedia:u,reset:f,setScrapeNotFound:p,shouldStartFromBeginning:j,setShouldStartFromBeginning:o}=fe(),{setPlayerMeta:g,scrapeMedia:S}=he(),s=xe(),r=JSON.stringify({media:t.media,season:t.season,episode:t.episode});d.useEffect(()=>{f()},[r,f]);const i=d.useCallback(h=>{var y,w;(h==null?void 0:h.type)==="show"?n(`/media/${t.media}/${(y=h.season)==null?void 0:y.tmdbId}/${(w=h.episode)==null?void 0:w.tmdbId}`):n(`/media/${t.media}`)},[n,t]),m=d.useCallback(h=>{if(!h)return;let y;l&&(y=$e(l)??void 0),u(ge(h),ye(h.stream.captions),h.sourceId,j?0:y),o(!1)},[u,l,j,o]);return e.jsxs(je,{backUrl:s,onMetaChange:i,children:[x===M.IDLE?e.jsx(Pe,{onGetMeta:g}):null,x===M.SCRAPING&&S?e.jsx(Be,{media:S,onResult:(h,y)=>{a({sourceOrder:y,sources:h}),p()},onGetStream:m}):null,x===M.SCRAPE_NOT_FOUND&&c?e.jsx(Ce,{data:c}):null,x===M.PLAYBACK_ERROR?e.jsx(Se,{}):null]})}function Je(){const n=T(),{loading:t,error:c,value:a}=z(()=>ke());if(c)throw new Error("Failed to detect onboarding");return t?null:a?e.jsx(_,{replace:!0,to:{pathname:"/onboarding",search:`redirect=${encodeURIComponent(n.pathname)}`}}):e.jsx(Le,{})}export{Je as PlayerView,Le as RealPlayerView,Je as default}; -//# sourceMappingURL=PlayerView-CHau_TOb.js.map diff --git a/assets/PlayerView-CHau_TOb.js.map b/assets/PlayerView-CHau_TOb.js.map deleted file mode 100644 index fb63634..0000000 --- a/assets/PlayerView-CHau_TOb.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PlayerView-CHau_TOb.js","sources":["../../src/utils/onboarding.ts","../../src/utils/timestamp.ts"],"sourcesContent":["import { isExtensionActive } from \"@/backend/extension/messaging\";\nimport { conf } from \"@/setup/config\";\nimport { useAuthStore } from \"@/stores/auth\";\nimport { useOnboardingStore } from \"@/stores/onboarding\";\n\nexport async function needsOnboarding(): Promise {\n // if onboarding is dislabed, no onboarding needed\n if (!conf().HAS_ONBOARDING) return false;\n\n // if extension is active and working, no onboarding needed\n const extensionActive = await isExtensionActive();\n if (extensionActive) return false;\n\n // if there is any custom proxy urls, no onboarding needed\n const proxyUrls = useAuthStore.getState().proxySet;\n if (proxyUrls) return false;\n\n // if onboarding has been completed, no onboarding needed\n const completed = useOnboardingStore.getState().completed;\n if (completed) return false;\n\n return true;\n}\n","// Convert `t` param to time. Supports having only seconds (like `?t=192`), but also `3:30` or `1:30:02`\nexport function parseTimestamp(str: string | undefined | null): number | null {\n const input = str ?? \"\";\n const isValid = !!input.match(/^\\d+(:\\d+)*$/);\n if (!isValid) return null;\n\n const timeArr = input.split(\":\").map(Number).reverse();\n const hours = timeArr[2] ?? 0;\n const minutes = Math.min(timeArr[1] ?? 0, 59);\n const seconds = Math.min(timeArr[0] ?? 0, minutes > 0 ? 59 : Infinity);\n\n const timeInSeconds = hours * 60 * 60 + minutes * 60 + seconds;\n return timeInSeconds;\n}\n"],"names":["needsOnboarding","completed","conf","HAS_ONBOARDING","isExtensionActive","useAuthStore","getState","proxySet","useOnboardingStore","parseTimestamp","str","input","match","timeArr","split","map","Number","reverse","hours","minutes","Math","min","seconds","Infinity","timeInSeconds"],"mappings":";;;;;;;29NAKA,eAAsBA,IAAoC,CAcpDC,MAZA,GAACC,IAAOC,gBAGY,MAAMC,MAIZC,GAAaC,SAAAA,EAAWC,UAIxBC,GAAmBF,SAAAA,EAAWL,UAIlD,CCrBO,SAASQ,GAAeC,EAA+C,CAC5E,MAAMC,EAAQD,GAAO,GAErB,GAAI,CADY,CAAC,CAACC,EAAMC,MAAM,cAAc,EACvB,OAAA,KAEfC,MAAAA,EAAUF,EAAMG,MAAM,GAAG,EAAEC,IAAIC,MAAM,EAAEC,UACvCC,EAAQL,EAAQ,CAAC,GAAK,EACtBM,EAAUC,KAAKC,IAAIR,EAAQ,CAAC,GAAK,EAAG,EAAE,EACtCS,EAAUF,KAAKC,IAAIR,EAAQ,CAAC,GAAK,EAAGM,EAAU,EAAI,GAAKI,GAAQ,EAG9DC,OADeN,EAAQ,GAAK,GAAKC,EAAU,GAAKG,CAEzD"} \ No newline at end of file diff --git a/assets/Settings-CEKoIO_M.js b/assets/Settings-CEKoIO_M.js deleted file mode 100644 index 0ce2f26..0000000 --- a/assets/Settings-CEKoIO_M.js +++ /dev/null @@ -1,2043 +0,0 @@ -import { - r as N, - j as t, - c as L, - p as Ht -} from "./vendor-Dkz3gcSC.js"; -import { - S as ct, - U as je, - A as U, - V as un, - u as Kt, - W as gn, - X as He, - Y as ot, - B as q, - Z as zt, - _ as Ft, - $ as hn, - a0 as Gt, - a1 as It, - a2 as mn, - a3 as $t, - a4 as dt, - a5 as we, - a6 as it, - a7 as fn, - a8 as xn, - a9 as pn, - o as Wt, - aa as bn, - L as qt, - z as yn, - ab as vn, - ac as Xt, - ad as Ke, - ae as ut, - af as Yt, - ag as lt, - ah as jn, - ai as Zt, - aj as wn, - k as Nn, - ak as Bt, - al as Cn, - am as Sn, - an as _n, - ao as Ut, - ap as Lt, - aq as Ot, - ar as Me, - as as Tn, - at as An, - au as Pn, - av as kn, - aw as En, - ax as In, - ay as Bn -} from "./index-DYBNcHgS.js"; -import { - c as Re, - g as Un -} from "./auth-72H9TcpW.js"; -import { - b as C, - d as gt, - H as Ln, - a as Jt, - T as Qt, - k as On -} from "./react-dom-DpNJ2UNC.js"; -import { - I as ie, - a as k, - s as Dn, - F as Mn, - g as Rn -} from "./Icons-Ct84pi7p.js"; -import "./hls-2_Gpnevg.js"; -import "./language-db-DxKZVAm4.js"; -import "./caption-parsing-BABN6jyO.js"; -import { - S as Hn -} from "./StatusCircle-D7h8AcdR.js"; -import "./locales-BXkJCeK5.js"; -var ze = { - exports: {} -}; -ze.exports; -(function (s, i) { - var r = 200, - o = "__lodash_hash_undefined__", - c = 1, - f = 2, - g = 9007199254740991, - u = "[object Arguments]", - x = "[object Array]", - D = "[object AsyncFunction]", - E = "[object Boolean]", - w = "[object Date]", - M = "[object Error]", - z = "[object Function]", - V = "[object GeneratorFunction]", - F = "[object Map]", - I = "[object Number]", - v = "[object Null]", - B = "[object Object]", - X = "[object Promise]", - ee = "[object Proxy]", - R = "[object RegExp]", - Y = "[object Set]", - re = "[object String]", - h = "[object Symbol]", - me = "[object Undefined]", - te = "[object WeakMap]", - d = "[object ArrayBuffer]", - S = "[object DataView]", - T = "[object Float32Array]", - Ne = "[object Float64Array]", - Fe = "[object Int8Array]", - Ge = "[object Int16Array]", - $e = "[object Int32Array]", - Ce = "[object Uint8Array]", - We = "[object Uint8ClampedArray]", - qe = "[object Uint16Array]", - Xe = "[object Uint32Array]", - Se = /[\\^$.*+?()[\]{}|]/g, - Ye = /^\[object .+?Constructor\]$/, - Ze = /^(?:0|[1-9]\d*)$/, - p = {}; - p[T] = p[Ne] = p[Fe] = p[Ge] = p[$e] = p[Ce] = p[We] = p[qe] = p[Xe] = !0, p[u] = p[x] = p[d] = p[E] = p[S] = p[w] = p[M] = p[z] = p[F] = p[I] = p[B] = p[R] = p[Y] = p[re] = p[te] = !1; - var fe = typeof Re == "object" && Re && Re.Object === Object && Re, - Je = typeof self == "object" && self && self.Object === Object && self, - G = fe || Je || Function("return this")(), - _e = i && !i.nodeType && i, - xe = _e && !0 && s && !s.nodeType && s, - Te = xe && xe.exports === _e, - Ae = Te && fe.process, - Pe = function () { - try { - return Ae && Ae.binding && Ae.binding("util") - } catch {} - }(), - ht = Pe && Pe.isTypedArray; - - function es(e, n) { - for (var a = -1, l = e == null ? 0 : e.length, b = 0, m = []; ++a < l;) { - var j = e[a]; - n(j, a, e) && (m[b++] = j) - } - return m - } - - function ts(e, n) { - for (var a = -1, l = n.length, b = e.length; ++a < l;) e[b + a] = n[a]; - return e - } - - function ss(e, n) { - for (var a = -1, l = e == null ? 0 : e.length; ++a < l;) - if (n(e[a], a, e)) return !0; - return !1 - } - - function ns(e, n) { - for (var a = -1, l = Array(e); ++a < e;) l[a] = n(a); - return l - } - - function as(e) { - return function (n) { - return e(n) - } - } - - function is(e, n) { - return e.has(n) - } - - function rs(e, n) { - return e == null ? void 0 : e[n] - } - - function cs(e) { - var n = -1, - a = Array(e.size); - return e.forEach(function (l, b) { - a[++n] = [b, l] - }), a - } - - function ls(e, n) { - return function (a) { - return e(n(a)) - } - } - - function os(e) { - var n = -1, - a = Array(e.size); - return e.forEach(function (l) { - a[++n] = l - }), a - } - var ds = Array.prototype, - us = Function.prototype, - ke = Object.prototype, - Qe = G["__core-js_shared__"], - mt = us.toString, - W = ke.hasOwnProperty, - ft = function () { - var e = /[^.]+$/.exec(Qe && Qe.keys && Qe.keys.IE_PROTO || ""); - return e ? "Symbol(src)_1." + e : "" - }(), - xt = ke.toString, - gs = RegExp("^" + mt.call(W).replace(Se, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), - pt = Te ? G.Buffer : void 0, - Ee = G.Symbol, - bt = G.Uint8Array, - yt = ke.propertyIsEnumerable, - hs = ds.splice, - ce = Ee ? Ee.toStringTag : void 0, - vt = Object.getOwnPropertySymbols, - ms = pt ? pt.isBuffer : void 0, - fs = ls(Object.keys, Object), - Ve = ge(G, "DataView"), - pe = ge(G, "Map"), - et = ge(G, "Promise"), - tt = ge(G, "Set"), - st = ge(G, "WeakMap"), - be = ge(Object, "create"), - xs = de(Ve), - ps = de(pe), - bs = de(et), - ys = de(tt), - vs = de(st), - jt = Ee ? Ee.prototype : void 0, - nt = jt ? jt.valueOf : void 0; - - function le(e) { - var n = -1, - a = e == null ? 0 : e.length; - for (this.clear(); ++n < a;) { - var l = e[n]; - this.set(l[0], l[1]) - } - } - - function js() { - this.__data__ = be ? be(null) : {}, this.size = 0 - } - - function ws(e) { - var n = this.has(e) && delete this.__data__[e]; - return this.size -= n ? 1 : 0, n - } - - function Ns(e) { - var n = this.__data__; - if (be) { - var a = n[e]; - return a === o ? void 0 : a - } - return W.call(n, e) ? n[e] : void 0 - } - - function Cs(e) { - var n = this.__data__; - return be ? n[e] !== void 0 : W.call(n, e) - } - - function Ss(e, n) { - var a = this.__data__; - return this.size += this.has(e) ? 0 : 1, a[e] = be && n === void 0 ? o : n, this - } - le.prototype.clear = js, le.prototype.delete = ws, le.prototype.get = Ns, le.prototype.has = Cs, le.prototype.set = Ss; - - function Z(e) { - var n = -1, - a = e == null ? 0 : e.length; - for (this.clear(); ++n < a;) { - var l = e[n]; - this.set(l[0], l[1]) - } - } - - function _s() { - this.__data__ = [], this.size = 0 - } - - function Ts(e) { - var n = this.__data__, - a = Be(n, e); - if (a < 0) return !1; - var l = n.length - 1; - return a == l ? n.pop() : hs.call(n, a, 1), --this.size, !0 - } - - function As(e) { - var n = this.__data__, - a = Be(n, e); - return a < 0 ? void 0 : n[a][1] - } - - function Ps(e) { - return Be(this.__data__, e) > -1 - } - - function ks(e, n) { - var a = this.__data__, - l = Be(a, e); - return l < 0 ? (++this.size, a.push([e, n])) : a[l][1] = n, this - } - Z.prototype.clear = _s, Z.prototype.delete = Ts, Z.prototype.get = As, Z.prototype.has = Ps, Z.prototype.set = ks; - - function oe(e) { - var n = -1, - a = e == null ? 0 : e.length; - for (this.clear(); ++n < a;) { - var l = e[n]; - this.set(l[0], l[1]) - } - } - - function Es() { - this.size = 0, this.__data__ = { - hash: new le, - map: new(pe || Z), - string: new le - } - } - - function Is(e) { - var n = Ue(this, e).delete(e); - return this.size -= n ? 1 : 0, n - } - - function Bs(e) { - return Ue(this, e).get(e) - } - - function Us(e) { - return Ue(this, e).has(e) - } - - function Ls(e, n) { - var a = Ue(this, e), - l = a.size; - return a.set(e, n), this.size += a.size == l ? 0 : 1, this - } - oe.prototype.clear = Es, oe.prototype.delete = Is, oe.prototype.get = Bs, oe.prototype.has = Us, oe.prototype.set = Ls; - - function Ie(e) { - var n = -1, - a = e == null ? 0 : e.length; - for (this.__data__ = new oe; ++n < a;) this.add(e[n]) - } - - function Os(e) { - return this.__data__.set(e, o), this - } - - function Ds(e) { - return this.__data__.has(e) - } - Ie.prototype.add = Ie.prototype.push = Os, Ie.prototype.has = Ds; - - function se(e) { - var n = this.__data__ = new Z(e); - this.size = n.size - } - - function Ms() { - this.__data__ = new Z, this.size = 0 - } - - function Rs(e) { - var n = this.__data__, - a = n.delete(e); - return this.size = n.size, a - } - - function Hs(e) { - return this.__data__.get(e) - } - - function Ks(e) { - return this.__data__.has(e) - } - - function zs(e, n) { - var a = this.__data__; - if (a instanceof Z) { - var l = a.__data__; - if (!pe || l.length < r - 1) return l.push([e, n]), this.size = ++a.size, this; - a = this.__data__ = new oe(l) - } - return a.set(e, n), this.size = a.size, this - } - se.prototype.clear = Ms, se.prototype.delete = Rs, se.prototype.get = Hs, se.prototype.has = Ks, se.prototype.set = zs; - - function Fs(e, n) { - var a = Le(e), - l = !a && an(e), - b = !a && !l && at(e), - m = !a && !l && !b && kt(e), - j = a || l || b || m, - _ = j ? ns(e.length, String) : [], - A = _.length; - for (var y in e)(n || W.call(e, y)) && !(j && (y == "length" || b && (y == "offset" || y == "parent") || m && (y == "buffer" || y == "byteLength" || y == "byteOffset") || Vs(y, A))) && _.push(y); - return _ - } - - function Be(e, n) { - for (var a = e.length; a--;) - if (_t(e[a][0], n)) return a; - return -1 - } - - function Gs(e, n, a) { - var l = n(e); - return Le(e) ? l : ts(l, a(e)) - } - - function ye(e) { - return e == null ? e === void 0 ? me : v : ce && ce in Object(e) ? Js(e) : nn(e) - } - - function wt(e) { - return ve(e) && ye(e) == u - } - - function Nt(e, n, a, l, b) { - return e === n ? !0 : e == null || n == null || !ve(e) && !ve(n) ? e !== e && n !== n : $s(e, n, a, l, Nt, b) - } - - function $s(e, n, a, l, b, m) { - var j = Le(e), - _ = Le(n), - A = j ? x : ne(e), - y = _ ? x : ne(n); - A = A == u ? B : A, y = y == u ? B : y; - var O = A == B, - $ = y == B, - P = A == y; - if (P && at(e)) { - if (!at(n)) return !1; - j = !0, O = !1 - } - if (P && !O) return m || (m = new se), j || kt(e) ? Ct(e, n, a, l, b, m) : Ys(e, n, A, a, l, b, m); - if (!(a & c)) { - var H = O && W.call(e, "__wrapped__"), - K = $ && W.call(n, "__wrapped__"); - if (H || K) { - var ae = H ? e.value() : e, - J = K ? n.value() : n; - return m || (m = new se), b(ae, J, a, l, m) - } - } - return P ? (m || (m = new se), Zs(e, n, a, l, b, m)) : !1 - } - - function Ws(e) { - if (!Pt(e) || tn(e)) return !1; - var n = Tt(e) ? gs : Ye; - return n.test(de(e)) - } - - function qs(e) { - return ve(e) && At(e.length) && !!p[ye(e)] - } - - function Xs(e) { - if (!sn(e)) return fs(e); - var n = []; - for (var a in Object(e)) W.call(e, a) && a != "constructor" && n.push(a); - return n - } - - function Ct(e, n, a, l, b, m) { - var j = a & c, - _ = e.length, - A = n.length; - if (_ != A && !(j && A > _)) return !1; - var y = m.get(e); - if (y && m.get(n)) return y == n; - var O = -1, - $ = !0, - P = a & f ? new Ie : void 0; - for (m.set(e, n), m.set(n, e); ++O < _;) { - var H = e[O], - K = n[O]; - if (l) var ae = j ? l(K, H, O, n, e, m) : l(H, K, O, e, n, m); - if (ae !== void 0) { - if (ae) continue; - $ = !1; - break - } - if (P) { - if (!ss(n, function (J, ue) { - if (!is(P, ue) && (H === J || b(H, J, a, l, m))) return P.push(ue) - })) { - $ = !1; - break - } - } else if (!(H === K || b(H, K, a, l, m))) { - $ = !1; - break - } - } - return m.delete(e), m.delete(n), $ - } - - function Ys(e, n, a, l, b, m, j) { - switch (a) { - case S: - if (e.byteLength != n.byteLength || e.byteOffset != n.byteOffset) return !1; - e = e.buffer, n = n.buffer; - case d: - return !(e.byteLength != n.byteLength || !m(new bt(e), new bt(n))); - case E: - case w: - case I: - return _t(+e, +n); - case M: - return e.name == n.name && e.message == n.message; - case R: - case re: - return e == n + ""; - case F: - var _ = cs; - case Y: - var A = l & c; - if (_ || (_ = os), e.size != n.size && !A) return !1; - var y = j.get(e); - if (y) return y == n; - l |= f, j.set(e, n); - var O = Ct(_(e), _(n), l, b, m, j); - return j.delete(e), O; - case h: - if (nt) return nt.call(e) == nt.call(n) - } - return !1 - } - - function Zs(e, n, a, l, b, m) { - var j = a & c, - _ = St(e), - A = _.length, - y = St(n), - O = y.length; - if (A != O && !j) return !1; - for (var $ = A; $--;) { - var P = _[$]; - if (!(j ? P in n : W.call(n, P))) return !1 - } - var H = m.get(e); - if (H && m.get(n)) return H == n; - var K = !0; - m.set(e, n), m.set(n, e); - for (var ae = j; ++$ < A;) { - P = _[$]; - var J = e[P], - ue = n[P]; - if (l) var Et = j ? l(ue, J, P, n, e, m) : l(J, ue, P, e, n, m); - if (!(Et === void 0 ? J === ue || b(J, ue, a, l, m) : Et)) { - K = !1; - break - } - ae || (ae = P == "constructor") - } - if (K && !ae) { - var Oe = e.constructor, - De = n.constructor; - Oe != De && "constructor" in e && "constructor" in n && !(typeof Oe == "function" && Oe instanceof Oe && typeof De == "function" && De instanceof De) && (K = !1) - } - return m.delete(e), m.delete(n), K - } - - function St(e) { - return Gs(e, ln, Qs) - } - - function Ue(e, n) { - var a = e.__data__; - return en(n) ? a[typeof n == "string" ? "string" : "hash"] : a.map - } - - function ge(e, n) { - var a = rs(e, n); - return Ws(a) ? a : void 0 - } - - function Js(e) { - var n = W.call(e, ce), - a = e[ce]; - try { - e[ce] = void 0; - var l = !0 - } catch {} - var b = xt.call(e); - return l && (n ? e[ce] = a : delete e[ce]), b - } - var Qs = vt ? function (e) { - return e == null ? [] : (e = Object(e), es(vt(e), function (n) { - return yt.call(e, n) - })) - } : on, - ne = ye; - (Ve && ne(new Ve(new ArrayBuffer(1))) != S || pe && ne(new pe) != F || et && ne(et.resolve()) != X || tt && ne(new tt) != Y || st && ne(new st) != te) && (ne = function (e) { - var n = ye(e), - a = n == B ? e.constructor : void 0, - l = a ? de(a) : ""; - if (l) switch (l) { - case xs: - return S; - case ps: - return F; - case bs: - return X; - case ys: - return Y; - case vs: - return te - } - return n - }); - - function Vs(e, n) { - return n = n ?? g, !!n && (typeof e == "number" || Ze.test(e)) && e > -1 && e % 1 == 0 && e < n - } - - function en(e) { - var n = typeof e; - return n == "string" || n == "number" || n == "symbol" || n == "boolean" ? e !== "__proto__" : e === null - } - - function tn(e) { - return !!ft && ft in e - } - - function sn(e) { - var n = e && e.constructor, - a = typeof n == "function" && n.prototype || ke; - return e === a - } - - function nn(e) { - return xt.call(e) - } - - function de(e) { - if (e != null) { - try { - return mt.call(e) - } catch {} - try { - return e + "" - } catch {} - } - return "" - } - - function _t(e, n) { - return e === n || e !== e && n !== n - } - var an = wt(function () { - return arguments - }()) ? wt : function (e) { - return ve(e) && W.call(e, "callee") && !yt.call(e, "callee") - }, - Le = Array.isArray; - - function rn(e) { - return e != null && At(e.length) && !Tt(e) - } - var at = ms || dn; - - function cn(e, n) { - return Nt(e, n) - } - - function Tt(e) { - if (!Pt(e)) return !1; - var n = ye(e); - return n == z || n == V || n == D || n == ee - } - - function At(e) { - return typeof e == "number" && e > -1 && e % 1 == 0 && e <= g - } - - function Pt(e) { - var n = typeof e; - return e != null && (n == "object" || n == "function") - } - - function ve(e) { - return e != null && typeof e == "object" - } - var kt = ht ? as(ht) : qs; - - function ln(e) { - return rn(e) ? Fs(e) : Xs(e) - } - - function on() { - return [] - } - - function dn() { - return !1 - } - s.exports = cn -})(ze, ze.exports); -var Kn = ze.exports; -const zn = Un(Kn); - -function Q(s) { - const [i, r] = N.useState(void 0); - N.useEffect(() => { - r(void 0) - }, [s]); - const o = N.useMemo(() => !zn(i, s) && i !== void 0, [i, s]), - c = N.useCallback(u => { - u instanceof Function ? r(x => u(x !== void 0 ? x : s)) : r(u) - }, [s, r]), - f = i === void 0 ? s : i, - g = N.useCallback(() => r(void 0), [r]); - return [f, c, g, o] -} - -function Fn(s, i, r, o, c, f, g, u, x) { - const [D, E, w, M] = Q(c), [z, V, F, I] = Q(f), [v, B, X, ee] = Q(s), R = ct(Pe => Pe.setPreviewTheme), Y = N.useCallback(() => R(s), [R, s]), [re, h, me, te] = Q(i), [d, S, T, Ne] = Q(r), [Fe, Ge, $e, Ce] = Q(o), [We, qe, Xe, Se] = Q(g), [Ye, Ze, p, fe] = Q(u), [Je, G, _e, xe] = Q(x); - - function Te() { - X(), Y(), me(), T(), w(), F(), $e(), Xe(), p(), _e() - } - return { - reset: Te, - changed: ee || te || Ne || Ce || I || M || Se || fe || xe, - theme: { - state: v, - set: B, - changed: ee - }, - appLanguage: { - state: re, - set: h, - changed: te - }, - subtitleStyling: { - state: d, - set: S, - changed: Ne - }, - deviceName: { - state: Fe, - set: Ge, - changed: Ce - }, - proxyUrls: { - state: D, - set: E, - changed: M - }, - backendUrl: { - state: z, - set: V, - changed: I - }, - profile: { - state: We, - set: qe, - changed: Se - }, - enableThumbnails: { - state: Ye, - set: Ze, - changed: fe - }, - enableAutoplay: { - state: Je, - set: G, - changed: xe - } - } -} - -function he(s) { - return t.jsx("div", { - className: L("w-full rounded-lg bg-settings-card-background bg-opacity-[0.15] border border-settings-card-border", s.paddingClass ?? "px-8 py-6", s.className), - children: s.children - }) -} - -function Vt(s) { - return t.jsx("div", { - className: L("w-full rounded-lg bg-settings-card-altBackground bg-opacity-50", s.paddingClass ?? "px-8 py-6", s.className), - children: s.children - }) -} - -function Gn() { - const { - t: s - } = C(), i = je(), r = U(u => u.account), { - logout: o - } = un(), c = Kt("account-delete"), [f, g] = gt(async () => { - !r || !i || (await gn(i, r), await o(), c.hide()) - }, [o, r, i, c.hide]); - return r ? t.jsxs("div", { - children: [t.jsx(He, { - border: !0, - children: s("settings.account.actions.title") - }), t.jsxs(Vt, { - paddingClass: "px-6 py-12", - className: "grid grid-cols-1 lg:grid-cols-2 gap-6 lg:gap-12", - children: [t.jsxs("div", { - children: [t.jsx(ot, { - children: s("settings.account.actions.delete.title") - }), t.jsx("p", { - className: "text-type-text", - children: s("settings.account.actions.delete.text") - })] - }), t.jsx("div", { - className: "flex justify-start lg:justify-end items-center", - children: t.jsx(q, { - theme: "danger", - loading: f.loading, - onClick: c.show, - children: s("settings.account.actions.delete.button") - }) - })] - }), t.jsx(zt, { - id: c.id, - children: t.jsxs(Ft, { - children: [t.jsx(He, { - className: "!mt-0", - children: s("settings.account.actions.delete.confirmTitle") - }), t.jsx(hn, { - children: s("settings.account.actions.delete.confirmDescription") - }), t.jsx(q, { - theme: "danger", - loading: f.loading, - onClick: g, - children: s("settings.account.actions.delete.confirmButton") - })] - }) - })] - }) : null -} - -function $n(s) { - const { - t: i - } = C(); - return t.jsx(zt, { - id: s.id, - children: t.jsxs(Ft, { - children: [t.jsxs("div", { - className: "flex justify-between items-center mb-9", - children: [t.jsx(He, { - className: "!mt-0 !mb-0", - children: i("settings.account.profile.title") - }), t.jsx(Gt, { - profile: { - colorA: s.colorA, - colorB: s.colorB, - icon: s.userIcon - }, - iconClass: "text-2xl", - sizeClass: "w-12 h-12" - })] - }), t.jsxs("div", { - className: "space-y-6", - children: [t.jsx(It, { - label: i("settings.account.profile.firstColor"), - value: s.colorA, - onInput: s.setColorA - }), t.jsx(It, { - label: i("settings.account.profile.secondColor"), - value: s.colorB, - onInput: s.setColorB - }), t.jsx(mn, { - label: i("settings.account.profile.userIcon"), - value: s.userIcon, - onInput: s.setUserIcon - })] - }), t.jsx("div", { - className: "flex justify-center mt-8", - children: t.jsx(q, { - theme: "purple", - className: "!px-20", - onClick: s.close, - children: i("settings.account.profile.finish") - }) - })] - }) - }) -} - -function Wn(s) { - const { - t: i - } = C(), { - logout: r - } = $t(), o = Kt("profile-edit"); - return t.jsxs(he, { - paddingClass: "px-8 py-10", - className: "!mt-8", - children: [t.jsx($n, { - id: o.id, - close: o.hide, - colorA: s.colorA, - setColorA: s.setColorA, - colorB: s.colorB, - setColorB: s.setColorB, - userIcon: s.userIcon, - setUserIcon: s.setUserIcon - }), t.jsxs("div", { - className: "grid lg:grid-cols-[auto,1fr] gap-8", - children: [t.jsx("div", { - children: t.jsx(Gt, { - profile: { - colorA: s.colorA, - colorB: s.colorB, - icon: s.userIcon - }, - iconClass: "text-5xl", - sizeClass: "w-32 h-32", - bottom: t.jsxs("button", { - type: "button", - className: "tabbable text-xs flex gap-2 items-center bg-editBadge-bg text-editBadge-text hover:bg-editBadge-bgHover py-1 px-3 rounded-full cursor-pointer", - onClick: o.show, - children: [t.jsx(ie, { - icon: k.EDIT - }), i("settings.account.accountDetails.editProfile")] - }) - }) - }), t.jsx("div", { - children: t.jsxs("div", { - className: "space-y-8 max-w-xs", - children: [t.jsx(dt, { - label: i("settings.account.accountDetails.deviceNameLabel") ?? void 0, - placeholder: i("settings.account.accountDetails.deviceNamePlaceholder") ?? void 0, - value: s.deviceName, - onChange: c => s.setDeviceName(c) - }), t.jsx("div", { - className: "flex space-x-3", - children: t.jsx(q, { - theme: "danger", - onClick: r, - children: i("settings.account.accountDetails.logoutButton") - }) - })] - }) - })] - })] - }) -} - -function Dt(s) { - const { - t: i - } = C(); - return t.jsxs("div", { - className: L({ - "pointer-events-none overflow-hidden w-full rounded": !0, - "aspect-video relative": !s.fullscreen, - "fixed inset-0 z-[60]": s.fullscreen - }), - children: [s.fullscreen && s.show ? t.jsx(Ln, { - children: t.jsx("html", { - "data-no-scroll": !0 - }) - }) : null, t.jsx(Wt, { - animation: "fade", - show: s.show, - children: t.jsxs("div", { - className: "absolute inset-0 pointer-events-auto", - style: { - backgroundImage: "radial-gradient(102.95% 87.07% at 100% 100%, #EEAA45 0%, rgba(165, 186, 151, 0.56) 54.69%, rgba(74, 207, 254, 0.00) 100%), linear-gradient(180deg, #48D3FF 0%, #3B27B2 100%)" - }, - children: [t.jsx("button", { - type: "button", - className: "tabbable bg-black absolute right-3 top-3 text-white bg-opacity-25 duration-100 transition-[background-color,transform] active:scale-110 hover:bg-opacity-50 p-2 rounded-md cursor-pointer", - onClick: s.onToggle, - children: t.jsx(ie, { - icon: s.fullscreen ? k.X : k.EXPAND - }) - }), t.jsx("div", { - className: "text-white pointer-events-none absolute flex w-full flex-col items-center transition-[bottom] bottom-0 p-4", - children: t.jsx("div", { - className: s.fullscreen ? "" : "transform origin-bottom text-[0.5rem]", - children: t.jsx(bn, { - text: i("settings.subtitles.previewQuote") ?? void 0, - styling: s.styling, - overrideCasing: !1 - }) - }) - })] - }) - })] - }) -} - -function qn(s) { - const { - t: i - } = C(), [r, o] = N.useState(!1); - return t.jsxs("div", { - children: [t.jsx(we, { - border: !0, - children: i("settings.subtitles.title") - }), t.jsxs("div", { - className: "grid md:grid-cols-[1fr,356px] gap-8", - children: [t.jsxs("div", { - className: "space-y-6", - children: [t.jsx(it, { - label: i("settings.subtitles.backgroundLabel"), - max: 100, - min: 0, - onChange: c => s.setStyling({ - ...s.styling, - backgroundOpacity: c / 100 - }), - value: s.styling.backgroundOpacity * 100, - textTransformer: c => `${c}%` - }), t.jsx(it, { - label: i("settings.subtitles.backgroundBlurLabel"), - max: 100, - min: 0, - onChange: c => s.setStyling({ - ...s.styling, - backgroundBlur: c / 100 - }), - value: s.styling.backgroundBlur * 100, - textTransformer: c => `${c}%` - }), t.jsx(it, { - label: i("settings.subtitles.textSizeLabel"), - max: 200, - min: 1, - textTransformer: c => `${c}%`, - onChange: c => s.setStyling({ - ...s.styling, - size: c / 100 - }), - value: s.styling.size * 100 - }), t.jsxs("div", { - className: "flex justify-between items-center", - children: [t.jsx(fn.FieldTitle, { - children: i("settings.subtitles.colorLabel") - }), t.jsx("div", { - className: "flex justify-center items-center", - children: xn.map(c => t.jsx(pn, { - onClick: () => s.setStyling({ - ...s.styling, - color: c - }), - color: c, - active: s.styling.color === c - }, c)) - })] - })] - }), t.jsx(Dt, { - show: !0, - styling: s.styling, - onToggle: () => o(c => !c) - }), t.jsx(Dt, { - show: r, - fullscreen: !0, - styling: s.styling, - onToggle: () => o(c => !c) - })] - })] - }) -} -const Mt = "https://postman-echo.com/get"; - -function Xn(s) { - return new Promise((i, r) => { - setTimeout(() => r(new Error("Timed out!")), 3e3), vn(s, Mt, {}).then(o => { - if (o.url !== Mt) return r(new Error("Not a proxy")); - i() - }).catch(r) - }) -} - -function Yn() { - const s = U(c => c.proxySet), - { - loading: i, - value: r - } = Jt(async () => { - const c = await yn() ? "success" : "unset"; - let f = "unset"; - if (s && s.length > 0) try { - await Xn(s[0]), f = "success" - } catch { - f = "error" - } - return { - extension: c, - proxy: f, - defaultProxy: "success" - } - }, [s]); - let o = "unset"; - return ((r == null ? void 0 : r.extension) === "success" || (r == null ? void 0 : r.proxy) === "success") && (o = "success"), ((r == null ? void 0 : r.proxy) === "error" || (r == null ? void 0 : r.extension) === "error") && (o = "error"), { - setupStates: r, - globalState: o, - loading: i - } -} - -function rt(s) { - const { - t: i - } = C(), r = { - error: "error", - success: "success", - unset: "noresult" - }; - return t.jsxs("div", { - className: "flex items-start text-type-dimmed my-4", - children: [t.jsx(Hn, { - type: r[s.status], - className: L({ - "!text-video-scraping-noresult !bg-video-scraping-noresult opacity-50": s.grey, - "scale-90 mr-3": !0 - }) - }), t.jsxs("div", { - children: [t.jsx("p", { - className: L({ - "!text-white": s.grey && s.highlight, - "!text-type-dimmed opacity-75": s.grey && !s.highlight, - "text-type-danger": s.status === "error", - "text-white": s.status === "success" - }), - children: s.children - }), s.status === "error" ? t.jsx("p", { - className: "max-w-96", - children: i("settings.connections.setup.itemError") - }) : null] - })] - }) -} - -function Zn() { - const { - t: s - } = C(), i = Ht(), { - loading: r, - setupStates: o, - globalState: c - } = Yn(); - if (r || !o) return t.jsx(he, { - children: t.jsx("div", { - className: "flex py-6 items-center justify-center", - children: t.jsx(qt, {}) - }) - }); - const f = { - error: { - title: "settings.connections.setup.errorStatus.title", - desc: "settings.connections.setup.errorStatus.description", - button: "settings.connections.setup.redoSetup" - }, - success: { - title: "settings.connections.setup.successStatus.title", - desc: "settings.connections.setup.successStatus.description", - button: "settings.connections.setup.redoSetup" - }, - unset: { - title: "settings.connections.setup.unsetStatus.title", - desc: "settings.connections.setup.unsetStatus.description", - button: "settings.connections.setup.doSetup" - } - }; - return t.jsx(he, { - children: t.jsxs("div", { - className: "flex flex-col md:flex-row items-start gap-4", - children: [t.jsx("div", { - children: t.jsx("div", { - className: L({ - "rounded-full h-12 w-12 flex bg-opacity-15 justify-center items-center": !0, - "text-type-success bg-type-success": c === "success", - "text-type-danger bg-type-danger": c === "error" || c === "unset" - }), - children: t.jsx(ie, { - icon: c === "success" ? k.CHECKMARK : k.X, - className: "text-xl" - }) - }) - }), t.jsxs("div", { - className: "flex-1", - children: [t.jsx(ot, { - className: "!mb-3", - children: s(f[c].title) - }), t.jsx("p", { - className: "max-w-[20rem] font-medium mb-6", - children: s(f[c].desc) - }), t.jsx(rt, { - status: o.extension, - children: s("settings.connections.setup.items.extension") - }), t.jsx(rt, { - status: o.proxy, - children: s("settings.connections.setup.items.proxy") - }), t.jsx(rt, { - grey: !0, - highlight: c === "unset", - status: o.defaultProxy, - children: s("settings.connections.setup.items.default") - })] - }), t.jsx("div", { - className: "md:mt-5", - children: t.jsx(q, { - theme: "purple", - onClick: () => i("/onboarding"), - children: s(f[c].button) - }) - })] - }) - }) -} - -function Jn(s) { - let { - proxyUrls: i, - setProxyUrls: r - } = s; - const { - t: o - } = C(), c = N.useCallback(() => { - r(u => [...u ?? [], ""]) - }, [r]), f = N.useCallback((u, x) => { - r(D => [...(D ?? []).map((E, w) => w !== u ? E : x)]) - }, [r]), g = N.useCallback(u => { - r(x => [...(x ?? []).filter((D, E) => E !== u)]) - }, [r]); - return t.jsxs(he, { - children: [t.jsxs("div", { - className: "flex justify-between items-center gap-4", - children: [t.jsxs("div", { - className: "my-3", - children: [t.jsx("p", { - className: "text-white font-bold mb-3", - children: o("settings.connections.workers.label") - }), t.jsx("p", { - className: "max-w-[20rem] font-medium", - children: t.jsx(Qt, { - i18nKey: "settings.connections.workers.description", - children: t.jsx(Xt, { - to: "https://movie-web.github.io/docs/proxy/deploy", - children: "Proxy documentation" - }) - }) - })] - }), t.jsx("div", { - children: t.jsx(Ke, { - onClick: () => r(u => u === null ? [] : null), - enabled: i !== null - }) - })] - }), i !== null ? t.jsxs(t.Fragment, { - children: [t.jsx(ut, { - marginClass: "my-6 px-8 box-content -mx-8" - }), t.jsx("p", { - className: "text-white font-bold mb-3", - children: o("settings.connections.workers.urlLabel") - }), t.jsxs("div", { - className: "my-6 space-y-2 max-w-md", - children: [((i == null ? void 0 : i.length) ?? 0) === 0 ? t.jsx("p", { - children: o("settings.connections.workers.emptyState") - }) : null, (i ?? []).map((u, x) => t.jsxs("div", { - className: "grid grid-cols-[1fr,auto] items-center gap-2", - children: [t.jsx(dt, { - value: u, - onChange: D => f(x, D), - placeholder: o("settings.connections.workers.urlPlaceholder") ?? void 0 - }), t.jsx("button", { - type: "button", - onClick: () => g(x), - className: "h-full scale-90 hover:scale-100 rounded-full aspect-square bg-authentication-inputBg hover:bg-authentication-inputBgHover flex justify-center items-center transition-transform duration-200 hover:text-white cursor-pointer", - children: t.jsx(ie, { - className: "text-xl", - icon: k.X - }) - })] - }, x))] - }), t.jsx(q, { - theme: "purple", - onClick: c, - children: o("settings.connections.workers.addButton") - })] - }) : null] - }) -} - -function Qn(s) { - let { - backendUrl: i, - setBackendUrl: r - } = s; - const { - t: o - } = C(); - return t.jsxs(he, { - children: [t.jsxs("div", { - className: "flex justify-between items-center gap-4", - children: [t.jsxs("div", { - className: "my-3", - children: [t.jsx("p", { - className: "text-white font-bold mb-3", - children: o("settings.connections.server.label") - }), t.jsx("p", { - className: "max-w-[20rem] font-medium", - children: t.jsx(Qt, { - i18nKey: "settings.connections.server.description", - children: t.jsx(Xt, { - to: "https://movie-web.github.io/docs/backend/deploy", - children: "Backend documentation" - }) - }) - })] - }), t.jsx("div", { - children: t.jsx(Ke, { - onClick: () => r(c => c === null ? "" : null), - enabled: i !== null - }) - })] - }), i !== null ? t.jsxs(t.Fragment, { - children: [t.jsx(ut, { - marginClass: "my-6 px-8 box-content -mx-8" - }), t.jsx("p", { - className: "text-white font-bold mb-3", - children: o("settings.connections.server.urlLabel") - }), t.jsx(dt, { - onChange: r, - value: i ?? "" - })] - }) : null] - }) -} - -function Vn(s) { - const { - t: i - } = C(); - return t.jsxs("div", { - children: [t.jsx(we, { - border: !0, - children: i("settings.connections.title") - }), t.jsxs("div", { - className: "space-y-6", - children: [t.jsx(Zn, {}), t.jsx(Jn, { - proxyUrls: s.proxyUrls, - setProxyUrls: s.setProxyUrls - }), t.jsx(Qn, { - backendUrl: s.backendUrl, - setBackendUrl: s.setBackendUrl - })] - })] - }) -} - -function ea(s) { - return t.jsx("p", { - className: "text-type-text", - children: s.children - }) -} - -function ta(s) { - const { - t: i - } = C(), r = je(), o = U(g => { - var u; - return (u = g.account) == null ? void 0 : u.token - }), [c, f] = gt(async () => { - var g; - if (!o) throw new Error("No token present"); - if (!r) throw new Error("No backend set"); - await jn(r, o, s.id), (g = s.onRemove) == null || g.call(s) - }, [r, o, s.id]); - return t.jsxs(he, { - className: "flex justify-between items-center", - paddingClass: "px-6 py-4", - children: [t.jsxs("div", { - className: "font-medium", - children: [t.jsx(ea, { - children: i("settings.account.devices.deviceNameLabel") - }), t.jsx("p", { - className: "text-white", - children: s.name - })] - }), s.isCurrent ? null : t.jsx(q, { - theme: "danger", - loading: c.loading, - onClick: f, - children: i("settings.account.devices.removeDevice") - })] - }) -} - -function sa(s) { - const { - t: i - } = C(), r = U(g => { - var u; - return (u = g.account) == null ? void 0 : u.seed - }), o = s.sessions, c = U(g => { - var u; - return (u = g.account) == null ? void 0 : u.sessionId - }), f = N.useMemo(() => { - if (!r) return []; - let g = o.map(u => { - const x = Yt(u.device, lt(r)); - return { - current: u.id === c, - id: u.id, - name: x - } - }); - return g = g.sort((u, x) => u.current ? -1 : x.current ? 1 : u.name.localeCompare(x.name)), g - }, [r, o, c]); - return r ? t.jsxs("div", { - children: [t.jsx(He, { - border: !0, - className: "mt-0 mb-9", - children: i("settings.account.devices.title") - }), s.error ? t.jsx("p", { - children: i("settings.account.devices.failed") - }) : s.loading ? t.jsx(qt, {}) : t.jsx("div", { - className: "space-y-5", - children: f.map(g => t.jsx(ta, { - name: g.name, - id: g.id, - isCurrent: g.current, - onRemove: s.onChange - }, g.id)) - })] - }) : null -} - -function na() { - const s = Ht(), - { - t: i - } = C(); - return t.jsx("div", { - children: t.jsxs(Vt, { - paddingClass: "px-6 py-12", - className: "grid grid-cols-2 gap-12 mt-5", - children: [t.jsxs("div", { - children: [t.jsx(ot, { - children: i("settings.account.register.title") - }), t.jsx("p", { - className: "text-type-text", - children: i("settings.account.register.text") - })] - }), t.jsx("div", { - className: "flex justify-end items-center", - children: t.jsx(q, { - theme: "purple", - onClick: () => s("/register"), - children: i("settings.account.register.cta") - }) - })] - }) - }) -} - -function Rt(s) { - return t.jsxs("section", { - className: s.className ?? "", - children: [t.jsx("p", { - className: "text-sm font-bold uppercase text-settings-sidebar-type-secondary mb-2", - children: s.title - }), s.children] - }) -} - -function aa(s) { - return t.jsxs("button", { - type: "button", - onClick: s.onClick, - className: L("tabbable w-full px-3 py-2 flex items-center space-x-3 cursor-pointer rounded my-2", s.active ? "bg-settings-sidebar-activeLink text-settings-sidebar-type-activated" : null), - children: [t.jsx(ie, { - className: L("text-2xl text-settings-sidebar-type-icon", s.active ? "text-settings-sidebar-type-iconActivated" : null), - icon: s.icon - }), t.jsx("span", { - children: s.children - })] - }) -} -const ia = 16; - -function ra(s) { - const { - t: i - } = C(), r = s.url ? s.url.startsWith("https://") : !1; - return t.jsxs("div", { - className: "flex items-center gap-1 -mx-1 ml-3 px-1 rounded bg-largeCard-background font-bold", - children: [t.jsx(ie, { - icon: r ? k.LOCK : k.UNLOCK - }), i(r ? "settings.sidebar.info.secure" : "settings.sidebar.info.insecure")] - }) -} - -function ca() { - var E; - const { - t: s - } = C(), { - isMobile: i - } = Zt(), { - account: r - } = U(), o = location.hostname, [c, f] = N.useState(""), g = [{ - textKey: "settings.account.title", - id: "settings-account", - icon: k.USER - }, { - textKey: "settings.preferences.title", - id: "settings-preferences", - icon: k.SETTINGS - }, { - textKey: "settings.appearance.title", - id: "settings-appearance", - icon: k.BRUSH - }, { - textKey: "settings.subtitles.title", - id: "settings-captions", - icon: k.CAPTIONS - }, { - textKey: "settings.connections.title", - id: "settings-connection", - icon: k.LINK - }], u = je(), x = Jt(async () => { - if (u) return wn(u) - }, [u]); - N.useEffect(() => { - function w() { - var F; - const z = (window.innerHeight || document.documentElement.clientHeight) / 4, - V = g.map(I => { - const v = document.getElementById(I.id); - if (!v) return { - distance: 1 / 0, - link: I.id - }; - const B = v.getBoundingClientRect(), - X = Math.abs(z - B.top), - ee = Math.abs(z - B.bottom); - return { - distance: Math.min(ee, X), - link: I.id - } - }).sort((I, v) => I.distance - v.distance); - window.innerHeight + window.scrollY >= document.body.offsetHeight ? f(g[g.length - 1].id) : f(((F = V[0]) == null ? void 0 : F.link) ?? "") - } - return document.addEventListener("scroll", w), w(), () => { - document.removeEventListener("scroll", w) - } - }); - const D = N.useCallback(w => { - const M = document.getElementById(w); - if (!M) return null; - const z = M.getBoundingClientRect().top + window.scrollY; - window.scrollTo({ - top: z - 120, - behavior: "smooth" - }) - }, []); - return t.jsx("div", { - className: "text-settings-sidebar-type-inactive sidebar-boundary", - children: t.jsxs(On, { - topOffset: -6 * ia, - stickyClassName: "pt-[6rem]", - disabled: i, - hideOnBoundaryHit: !1, - boundaryElement: ".sidebar-boundary", - children: [t.jsxs("div", { - className: "hidden lg:block", - children: [t.jsx(Rt, { - title: s("global.pages.settings"), - children: g.map(w => t.jsx(aa, { - icon: w.icon, - active: w.id === c, - onClick: () => D(w.id), - children: s(w.textKey) - }, w.id)) - }), t.jsx(ut, {})] - }), t.jsx(Rt, { - className: "text-sm", - title: s("settings.sidebar.info.title"), - children: t.jsxs("div", { - className: "px-3 py-3.5 rounded-lg bg-largeCard-background bg-opacity-50 grid grid-cols-2 gap-4", - children: [t.jsxs("div", { - className: "col-span-2 space-y-1", - children: [t.jsx("p", { - className: "text-type-dimmed font-medium", - children: s("settings.sidebar.info.hostname") - }), t.jsx("p", { - className: "text-white", - children: o - })] - }), t.jsxs("div", { - className: "col-span-2 space-y-1", - children: [t.jsxs("div", { - className: "text-type-dimmed font-medium flex items-center", - children: [t.jsx("p", { - children: s("settings.sidebar.info.backendUrl") - }), t.jsx(ra, { - url: u - })] - }), t.jsx("p", { - className: "text-white", - children: (u == null ? void 0 : u.replace(/https?:\/\//, "")) ?? "—" - })] - }), t.jsxs("div", { - className: "col-span-2 space-y-1", - children: [t.jsx("p", { - className: "text-type-dimmed font-medium", - children: s("settings.sidebar.info.userId") - }), t.jsx("p", { - className: "text-white", - children: (r == null ? void 0 : r.userId) ?? s("settings.sidebar.info.notLoggedIn") - })] - }), t.jsxs("div", { - className: "col-span-1 space-y-1", - children: [t.jsx("p", { - className: "text-type-dimmed font-medium", - children: s("settings.sidebar.info.appVersion") - }), t.jsx("p", { - className: "text-type-dimmed px-2 py-1 rounded bg-settings-sidebar-badge inline-block", - children: Nn().APP_VERSION - })] - }), t.jsxs("div", { - className: "col-span-1 space-y-1", - children: [t.jsx("p", { - className: "text-type-dimmed font-medium", - children: s("settings.sidebar.info.backendVersion") - }), t.jsxs("p", { - className: "text-type-dimmed px-2 py-1 rounded bg-settings-sidebar-badge inline-flex items-center gap-1", - children: [x.error ? t.jsx(ie, { - icon: k.WARNING, - className: "text-type-danger text-base" - }) : null, x.loading ? t.jsx("span", { - className: "block h-4 w-12 bg-type-dimmed/20 rounded" - }) : ((E = x == null ? void 0 : x.value) == null ? void 0 : E.version) || s("settings.sidebar.info.unknownVersion")] - })] - })] - }) - })] - }) - }) -} -const la = [{ - id: "default", - selector: "theme-default", - key: "settings.appearance.themes.default" - }, { - id: "red", - selector: "theme-red", - key: "settings.appearance.themes.red" - }, { - id: "blurple", - selector: "theme-blurple", - key: "settings.appearance.themes.blurple" - }, { - id: "blue", - selector: "theme-blue", - key: "settings.appearance.themes.blue" - }, { - id: "teal", - selector: "theme-teal", - key: "settings.appearance.themes.teal" - }, { - id: "gray", - selector: "theme-gray", - key: "settings.appearance.themes.gray" - }, { - id: "amoled", - selector: "theme-amoled", - key: "settings.appearance.themes.amoled" - }], - oa = function (i) { - const { - t: r - } = C(); - return t.jsxs("div", { - className: L(i.selector, "cursor-pointer group tabbable"), - onClick: i.onClick, - children: [t.jsxs("div", { - tabIndex: 0, - onKeyUp: o => o.key === "Enter" && o.currentTarget.click(), - className: L("tabbable scroll-mt-32 w-full h-32 relative rounded-lg border bg-gradient-to-br from-themePreview-primary/20 to-themePreview-secondary/10 bg-clip-content transition-colors duration-150", i.active ? "border-themePreview-primary" : "border-transparent group-hover:border-white/20"), - children: [t.jsxs("div", { - className: "absolute top-2 left-2", - children: [t.jsx("div", { - className: "h-5 w-5 bg-themePreview-primary rounded-full" - }), t.jsx("div", { - className: "h-5 w-5 bg-themePreview-secondary rounded-full -mt-2" - })] - }), t.jsx(ie, { - icon: k.CHECKMARK, - className: L("absolute top-3 right-3 text-xs text-white transition-opacity duration-150", i.active ? "opacity-100" : "opacity-0") - }), t.jsx("div", { - className: "absolute bottom-0 left-1/2 transform -translate-x-1/2 w-3/5 h-4/5 rounded-t-lg -mb-px bg-background-main overflow-hidden", - children: t.jsxs("div", { - className: "relative w-full h-full", - children: [t.jsx("div", { - className: "bg-themePreview-primary/50 w-[130%] h-10 absolute left-1/2 -top-5 blur-xl transform -translate-x-1/2 rounded-[100%]" - }), t.jsxs("div", { - className: "p-2 flex justify-between items-center", - children: [t.jsxs("div", { - className: "flex space-x-1", - children: [t.jsx("div", { - className: "bg-themePreview-ghost bg-opacity-10 w-4 h-2 rounded-full" - }), t.jsx("div", { - className: "bg-themePreview-ghost bg-opacity-10 w-2 h-2 rounded-full" - }), t.jsx("div", { - className: "bg-themePreview-ghost bg-opacity-10 w-2 h-2 rounded-full" - })] - }), t.jsx("div", { - className: "bg-themePreview-ghost bg-opacity-10 w-2 h-2 rounded-full" - })] - }), t.jsxs("div", { - className: "mt-1 flex items-center flex-col gap-1", - children: [t.jsx("div", { - className: "bg-themePreview-ghost bg-opacity-20 w-8 h-0.5 rounded-full" - }), t.jsx("div", { - className: "bg-themePreview-ghost bg-opacity-20 w-6 h-0.5 rounded-full" - }), t.jsx("div", { - className: "bg-themePreview-ghost bg-opacity-10 w-16 h-2 mt-1 rounded-full" - })] - }), t.jsxs("div", { - className: "mt-5 px-3", - children: [t.jsxs("div", { - className: "flex gap-1 items-center", - children: [t.jsx("div", { - className: "bg-themePreview-ghost bg-opacity-20 w-2 h-2 rounded-full" - }), t.jsx("div", { - className: "bg-themePreview-ghost bg-opacity-20 w-8 h-0.5 rounded-full" - })] - }), t.jsxs("div", { - className: "flex w-full gap-1 mt-1", - children: [t.jsx("div", { - className: "bg-themePreview-ghost bg-opacity-10 w-full h-20 rounded" - }), t.jsx("div", { - className: "bg-themePreview-ghost bg-opacity-10 w-full h-20 rounded" - }), t.jsx("div", { - className: "bg-themePreview-ghost bg-opacity-10 w-full h-20 rounded" - }), t.jsx("div", { - className: "bg-themePreview-ghost bg-opacity-10 w-full h-20 rounded" - })] - })] - })] - }) - })] - }), t.jsxs("div", { - className: "mt-2 flex justify-between items-center", - children: [t.jsx("span", { - className: "font-medium text-white", - children: i.name - }), t.jsx("span", { - className: L("inline-block px-3 py-1 leading-tight text-sm transition-opacity duration-150 rounded-full bg-pill-activeBackground text-white/85", i.inUse ? "opacity-100" : "opacity-0 pointer-events-none"), - children: r("settings.appearance.activeTheme") - })] - })] - }) - }, - da = oa; - -function ua(s) { - const { - t: i - } = C(); - return t.jsxs("div", { - children: [t.jsx(we, { - border: !0, - children: i("settings.appearance.title") - }), t.jsx("div", { - className: "grid grid-cols-[repeat(auto-fill,minmax(160px,1fr))] gap-6 max-w-[700px]", - children: la.map(r => t.jsx(da, { - selector: r.selector, - active: s.active === r.id, - inUse: s.inUse === r.id, - name: i(r.key), - onClick: () => s.setTheme(r.id) - }, r.id)) - })] - }) -} - -function ga(s) { - const { - t: i - } = C(), r = Dn(Bt.map(g => g.code)), o = Cn(), c = Bt.sort((g, u) => r.indexOf(g.code) - r.indexOf(u.code)).map(g => ({ - id: g.code, - name: `${g.name}${g.nativeName?` — ${g.nativeName}`:""}`, - leftIcon: t.jsx(Mn, { - langCode: g.code - }) - })), f = c.find(g => { - var u; - return g.id === ((u = Rn(s.language)) == null ? void 0 : u.code) - }); - return t.jsxs("div", { - className: "space-y-12", - children: [t.jsx(we, { - border: !0, - children: i("settings.preferences.title") - }), t.jsxs("div", { - children: [t.jsx("p", { - className: "text-white font-bold mb-3", - children: i("settings.preferences.language") - }), t.jsx("p", { - className: "max-w-[20rem] font-medium", - children: i("settings.preferences.languageDescription") - }), t.jsx(Sn, { - options: c, - selectedItem: f || c[0], - setSelectedItem: g => s.setLanguage(g.id) - })] - }), t.jsxs("div", { - children: [t.jsx("p", { - className: "text-white font-bold mb-3", - children: i("settings.preferences.thumbnail") - }), t.jsx("p", { - className: "max-w-[25rem] font-medium", - children: i("settings.preferences.thumbnailDescription") - }), t.jsxs("div", { - onClick: () => s.setEnableThumbnails(!s.enableThumbnails), - className: "bg-dropdown-background hover:bg-dropdown-hoverBackground select-none my-4 cursor-pointer space-x-3 flex items-center max-w-[25rem] py-3 px-4 rounded-lg", - children: [t.jsx(Ke, { - enabled: s.enableThumbnails - }), t.jsx("p", { - className: "flex-1 text-white font-bold", - children: i("settings.preferences.thumbnailLabel") - })] - })] - }), t.jsxs("div", { - children: [t.jsx("p", { - className: "text-white font-bold mb-3", - children: i("settings.preferences.autoplay") - }), t.jsx("p", { - className: "max-w-[25rem] font-medium", - children: i("settings.preferences.autoplayDescription") - }), t.jsxs("div", { - onClick: () => o ? s.setEnableAutoplay(!s.enableAutoplay) : null, - className: L("bg-dropdown-background hover:bg-dropdown-hoverBackground select-none my-4 cursor-pointer space-x-3 flex items-center max-w-[25rem] py-3 px-4 rounded-lg", o ? "cursor-pointer opacity-100 pointer-events-auto" : "cursor-not-allowed opacity-50 pointer-events-none"), - children: [t.jsx(Ke, { - enabled: s.enableAutoplay && o - }), t.jsx("p", { - className: "flex-1 text-white font-bold", - children: i("settings.preferences.autoplayLabel") - })] - })] - })] - }) -} - -function ha(s) { - const { - isMobile: i - } = Zt(); - return t.jsx(Bn, { - ultraWide: !0, - classNames: "overflow-visible", - children: t.jsxs("div", { - className: L("grid gap-12", i ? "grid-cols-1" : "lg:grid-cols-[280px,1fr]"), - children: [t.jsx(ca, {}), t.jsx("div", { - children: s.children - })] - }) - }) -} - -function ma(s) { - const i = je(), - { - account: r - } = s, - [o, c] = gt(() => i ? _n(i, r) : Promise.resolve([]), [r, i]); - return N.useEffect(() => { - c() - }, [c]), t.jsxs(t.Fragment, { - children: [t.jsx(Wn, { - deviceName: s.deviceName, - setDeviceName: s.setDeviceName, - colorA: s.colorA, - setColorA: s.setColorA, - colorB: s.colorB, - setColorB: s.setColorB, - userIcon: s.userIcon, - setUserIcon: s.setUserIcon - }), t.jsx(sa, { - error: !!o.error, - loading: o.loading, - sessions: o.value ?? [], - onChange: c - }), t.jsx(Gn, {})] - }) -} - -function Sa() { - const { - t: s - } = C(), i = Ut(d => d.theme), r = Ut(d => d.setTheme), o = ct(d => d.previewTheme), c = ct(d => d.setPreviewTheme), f = Lt(d => d.language), g = Lt(d => d.setLanguage), u = Ot(d => d.styling), x = Ot(d => d.updateStyling), D = U(d => d.proxySet), E = U(d => d.setProxySet), w = U(d => d.backendUrl), M = U(d => d.setBackendUrl), z = Me(d => d.enableThumbnails), V = Me(d => d.setEnableThumbnails), F = Me(d => d.enableAutoplay), I = Me(d => d.setEnableAutoplay), v = U(d => d.account), B = U(d => d.setAccountProfile), X = U(d => d.updateDeviceName), ee = N.useMemo(() => v ? Yt(v.deviceName, lt(v.seed)) : "", [v]), R = je(), { - logout: Y - } = $t(), re = U(), h = Fn(i, f, u, ee, D, w, v == null ? void 0 : v.profile, z, F); - N.useEffect(() => { - c(i ?? "default") - }, [c, i]), N.useEffect(() => () => { - c(null) - }, [c]); - const me = N.useCallback(d => { - h.theme.set(d === "default" ? null : d), c(d) - }, [h.theme, c]), - te = N.useCallback(async () => { - var d, S; - if (v && R) { - if ((h.appLanguage.changed || h.theme.changed || h.proxyUrls.changed) && await Tn(R, v, { - applicationLanguage: h.appLanguage.state, - applicationTheme: h.theme.state, - proxyUrls: ((d = h.proxyUrls.state) == null ? void 0 : d.filter(T => T !== "")) ?? null - }), h.deviceName.changed) { - const T = await An(h.deviceName.state, lt(v.seed)); - await Pn(R, v, { - deviceName: T - }), X(T) - } - h.profile.changed && await kn(R, v, { - profile: h.profile.state - }) - } - if (V(h.enableThumbnails.state), I(h.enableAutoplay.state), g(h.appLanguage.state), r(h.theme.state), x(h.subtitleStyling.state), E(((S = h.proxyUrls.state) == null ? void 0 : S.filter(T => T !== "")) ?? null), h.profile.state && B(h.profile.state), h.backendUrl.changed) { - await Y(); - let T = h.backendUrl.state; - T && !T.startsWith("http://") && !T.startsWith("https://") && (T = `https://${T}`), M(T) - } - }, [v, R, V, h, I, g, r, x, E, X, B, Y, M]); - return t.jsxs(En, { - children: [t.jsx(In, { - subpage: !0, - k: "global.pages.settings" - }), t.jsxs(ha, { - children: [t.jsxs("div", { - id: "settings-account", - children: [t.jsx(we, { - border: !0, - className: "!mb-0", - children: s("settings.account.title") - }), re.account && h.profile.state ? t.jsx(ma, { - account: re.account, - deviceName: h.deviceName.state, - setDeviceName: h.deviceName.set, - colorA: h.profile.state.colorA, - setColorA: d => { - h.profile.set(S => S ? { - ...S, - colorA: d - } : void 0) - }, - colorB: h.profile.state.colorB, - setColorB: d => h.profile.set(S => S ? { - ...S, - colorB: d - } : void 0), - userIcon: h.profile.state.icon, - setUserIcon: d => h.profile.set(S => S ? { - ...S, - icon: d - } : void 0) - }) : t.jsx(na, {})] - }), t.jsx("div", { - id: "settings-preferences", - className: "mt-48", - children: t.jsx(ga, { - language: h.appLanguage.state, - setLanguage: h.appLanguage.set, - enableThumbnails: h.enableThumbnails.state, - setEnableThumbnails: h.enableThumbnails.set, - enableAutoplay: h.enableAutoplay.state, - setEnableAutoplay: h.enableAutoplay.set - }) - }), t.jsx("div", { - id: "settings-appearance", - className: "mt-48", - children: t.jsx(ua, { - active: o ?? "default", - inUse: i ?? "default", - setTheme: me - }) - }), t.jsx("div", { - id: "settings-captions", - className: "mt-48", - children: t.jsx(qn, { - styling: h.subtitleStyling.state, - setStyling: h.subtitleStyling.set - }) - }), t.jsx("div", { - id: "settings-connection", - className: "mt-48", - children: t.jsx(Vn, { - backendUrl: h.backendUrl.state, - setBackendUrl: h.backendUrl.set, - proxyUrls: h.proxyUrls.state, - setProxyUrls: h.proxyUrls.set - }) - })] - }), t.jsxs(Wt, { - animation: "fade", - show: h.changed, - className: "bg-settings-saveBar-background border-t border-settings-card-border/50 py-4 transition-opacity w-full fixed bottom-0 flex justify-between flex-col md:flex-row px-8 items-start md:items-center gap-3", - children: [t.jsx("p", { - className: "text-type-danger", - children: s("settings.unsaved") - }), t.jsxs("div", { - className: "space-x-3 w-full md:w-auto flex", - children: [t.jsx(q, { - className: "w-full md:w-auto", - theme: "secondary", - onClick: h.reset, - children: s("settings.reset") - }), t.jsx(q, { - className: "w-full md:w-auto", - theme: "purple", - onClick: te, - children: s("settings.save") - })] - })] - })] - }) -} -export { - ma as AccountSettings, Sa as SettingsPage, Sa as - default -}; -//# sourceMappingURL=Settings-CEKoIO_M.js.map \ No newline at end of file diff --git a/assets/Settings-CEKoIO_M.js.map b/assets/Settings-CEKoIO_M.js.map deleted file mode 100644 index d3fd4bc..0000000 --- a/assets/Settings-CEKoIO_M.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Settings-CEKoIO_M.js","sources":["../../node_modules/.pnpm/lodash.isequal@4.5.0/node_modules/lodash.isequal/index.js","../../src/hooks/useSettingsState.ts"],"sourcesContent":["/**\n * Lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright JS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\n/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n Map = getNative(root, 'Map'),\n Promise = getNative(root, 'Promise'),\n Set = getNative(root, 'Set'),\n WeakMap = getNative(root, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\n/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = isEqual;\n","import isEqual from \"lodash.isequal\";\nimport {\n Dispatch,\n SetStateAction,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from \"react\";\n\nimport { SubtitleStyling } from \"@/stores/subtitles\";\nimport { usePreviewThemeStore } from \"@/stores/theme\";\n\nexport function useDerived(\n initial: T,\n): [T, Dispatch>, () => void, boolean] {\n const [overwrite, setOverwrite] = useState(undefined);\n useEffect(() => {\n setOverwrite(undefined);\n }, [initial]);\n const changed = useMemo(\n () => !isEqual(overwrite, initial) && overwrite !== undefined,\n [overwrite, initial],\n );\n const setter = useCallback>>(\n (inp) => {\n if (!(inp instanceof Function)) setOverwrite(inp);\n else setOverwrite((s) => inp(s !== undefined ? s : initial));\n },\n [initial, setOverwrite],\n );\n const data = overwrite === undefined ? initial : overwrite;\n\n const reset = useCallback(() => setOverwrite(undefined), [setOverwrite]);\n\n return [data, setter, reset, changed];\n}\n\nexport function useSettingsState(\n theme: string | null,\n appLanguage: string,\n subtitleStyling: SubtitleStyling,\n deviceName: string,\n proxyUrls: string[] | null,\n backendUrl: string | null,\n profile:\n | {\n colorA: string;\n colorB: string;\n icon: string;\n }\n | undefined,\n enableThumbnails: boolean,\n enableAutoplay: boolean,\n) {\n const [proxyUrlsState, setProxyUrls, resetProxyUrls, proxyUrlsChanged] =\n useDerived(proxyUrls);\n const [backendUrlState, setBackendUrl, resetBackendUrl, backendUrlChanged] =\n useDerived(backendUrl);\n const [themeState, setTheme, resetTheme, themeChanged] = useDerived(theme);\n const setPreviewTheme = usePreviewThemeStore((s) => s.setPreviewTheme);\n const resetPreviewTheme = useCallback(\n () => setPreviewTheme(theme),\n [setPreviewTheme, theme],\n );\n const [\n appLanguageState,\n setAppLanguage,\n resetAppLanguage,\n appLanguageChanged,\n ] = useDerived(appLanguage);\n const [subStylingState, setSubStyling, resetSubStyling, subStylingChanged] =\n useDerived(subtitleStyling);\n const [\n deviceNameState,\n setDeviceNameState,\n resetDeviceName,\n deviceNameChanged,\n ] = useDerived(deviceName);\n const [profileState, setProfileState, resetProfile, profileChanged] =\n useDerived(profile);\n const [\n enableThumbnailsState,\n setEnableThumbnailsState,\n resetEnableThumbnails,\n enableThumbnailsChanged,\n ] = useDerived(enableThumbnails);\n const [\n enableAutoplayState,\n setEnableAutoplayState,\n resetEnableAutoplay,\n enableAutoplayChanged,\n ] = useDerived(enableAutoplay);\n\n function reset() {\n resetTheme();\n resetPreviewTheme();\n resetAppLanguage();\n resetSubStyling();\n resetProxyUrls();\n resetBackendUrl();\n resetDeviceName();\n resetProfile();\n resetEnableThumbnails();\n resetEnableAutoplay();\n }\n\n const changed =\n themeChanged ||\n appLanguageChanged ||\n subStylingChanged ||\n deviceNameChanged ||\n backendUrlChanged ||\n proxyUrlsChanged ||\n profileChanged ||\n enableThumbnailsChanged ||\n enableAutoplayChanged;\n\n return {\n reset,\n changed,\n theme: {\n state: themeState,\n set: setTheme,\n changed: themeChanged,\n },\n appLanguage: {\n state: appLanguageState,\n set: setAppLanguage,\n changed: appLanguageChanged,\n },\n subtitleStyling: {\n state: subStylingState,\n set: setSubStyling,\n changed: subStylingChanged,\n },\n deviceName: {\n state: deviceNameState,\n set: setDeviceNameState,\n changed: deviceNameChanged,\n },\n proxyUrls: {\n state: proxyUrlsState,\n set: setProxyUrls,\n changed: proxyUrlsChanged,\n },\n backendUrl: {\n state: backendUrlState,\n set: setBackendUrl,\n changed: backendUrlChanged,\n },\n profile: {\n state: profileState,\n set: setProfileState,\n changed: profileChanged,\n },\n enableThumbnails: {\n state: enableThumbnailsState,\n set: setEnableThumbnailsState,\n changed: enableThumbnailsChanged,\n },\n enableAutoplay: {\n state: enableAutoplayState,\n set: setEnableAutoplayState,\n changed: enableAutoplayChanged,\n },\n };\n}\n"],"names":["LARGE_ARRAY_SIZE","HASH_UNDEFINED","COMPARE_PARTIAL_FLAG","COMPARE_UNORDERED_FLAG","MAX_SAFE_INTEGER","argsTag","arrayTag","asyncTag","boolTag","dateTag","errorTag","funcTag","genTag","mapTag","numberTag","nullTag","objectTag","promiseTag","proxyTag","regexpTag","setTag","stringTag","symbolTag","undefinedTag","weakMapTag","arrayBufferTag","dataViewTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","reRegExpChar","reIsHostCtor","reIsUint","typedArrayTags","freeGlobal","global","freeSelf","root","freeExports","exports","freeModule","module","moduleExports","freeProcess","nodeUtil","nodeIsTypedArray","arrayFilter","array","predicate","index","length","resIndex","result","value","arrayPush","values","offset","arraySome","baseTimes","n","iteratee","baseUnary","func","cacheHas","cache","key","getValue","object","mapToArray","map","overArg","transform","arg","setToArray","set","arrayProto","funcProto","objectProto","coreJsData","funcToString","hasOwnProperty","maskSrcKey","uid","nativeObjectToString","reIsNative","Buffer","Symbol","Uint8Array","propertyIsEnumerable","splice","symToStringTag","nativeGetSymbols","nativeIsBuffer","nativeKeys","DataView","getNative","Map","Promise","Set","WeakMap","nativeCreate","dataViewCtorString","toSource","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","symbolProto","symbolValueOf","Hash","entries","entry","hashClear","hashDelete","hashGet","data","hashHas","hashSet","ListCache","listCacheClear","listCacheDelete","assocIndexOf","lastIndex","listCacheGet","listCacheHas","listCacheSet","MapCache","mapCacheClear","mapCacheDelete","getMapData","mapCacheGet","mapCacheHas","mapCacheSet","size","SetCache","setCacheAdd","setCacheHas","Stack","stackClear","stackDelete","stackGet","stackHas","stackSet","pairs","arrayLikeKeys","inherited","isArr","isArray","isArg","isArguments","isBuff","isBuffer","isType","isTypedArray","skipIndexes","isIndex","eq","baseGetAllKeys","keysFunc","symbolsFunc","baseGetTag","getRawTag","objectToString","baseIsArguments","isObjectLike","baseIsEqual","other","bitmask","customizer","stack","baseIsEqualDeep","equalFunc","objIsArr","othIsArr","objTag","getTag","othTag","objIsObj","othIsObj","isSameTag","equalArrays","equalByTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","equalObjects","baseIsNative","isObject","isMasked","pattern","isFunction","baseIsTypedArray","isLength","baseKeys","isPrototype","isPartial","arrLength","othLength","stacked","seen","arrValue","othValue","compared","othIndex","tag","convert","objProps","getAllKeys","objLength","othProps","skipCtor","objValue","objCtor","othCtor","keys","getSymbols","isKeyable","isOwn","unmasked","symbol","stubArray","Ctor","ctorString","type","proto","isArrayLike","stubFalse","isEqual","useDerived","initial","overwrite","setOverwrite","useState","undefined","useEffect","changed","useMemo","setter","useCallback","inp","Function","s","reset","useSettingsState","theme","appLanguage","subtitleStyling","deviceName","proxyUrls","backendUrl","profile","enableThumbnails","enableAutoplay","proxyUrlsState","setProxyUrls","resetProxyUrls","proxyUrlsChanged","backendUrlState","setBackendUrl","resetBackendUrl","backendUrlChanged","themeState","setTheme","resetTheme","themeChanged","setPreviewTheme","usePreviewThemeStore","resetPreviewTheme","appLanguageState","setAppLanguage","resetAppLanguage","appLanguageChanged","subStylingState","setSubStyling","resetSubStyling","subStylingChanged","deviceNameState","setDeviceNameState","resetDeviceName","deviceNameChanged","profileState","setProfileState","resetProfile","profileChanged","enableThumbnailsState","setEnableThumbnailsState","resetEnableThumbnails","enableThumbnailsChanged","enableAutoplayState","setEnableAutoplayState","resetEnableAutoplay","enableAutoplayChanged","state"],"mappings":"m8BAUA,IAAIA,EAAmB,IAGnBC,EAAiB,4BAGjBC,EAAuB,EACvBC,EAAyB,EAGzBC,EAAmB,iBAGnBC,EAAU,qBACVC,EAAW,iBACXC,EAAW,yBACXC,EAAU,mBACVC,EAAU,gBACVC,E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B,EACnB/D,EAAWwB,CAAc,EAE7B,SAASV,IAAQ,CACJqB,IACOI,IACDG,KACDI,IACDnB,IACCI,IACAmB,KACHI,KACSI,IACFI,IACtB,CAaO,MAAA,CACLhD,MAAAA,GACAP,QAZA6B,IACAO,IACAI,IACAI,IACAnB,GACAJ,GACA2B,IACAI,IACAI,GAKA/C,MAAO,CACLgD,MAAO/B,EACP5L,IAAK6L,EACL3B,QAAS6B,EACX,EACAnB,YAAa,CACX+C,MAAOxB,GACPnM,IAAKoM,EACLlC,QAASoC,EACX,EACAzB,gBAAiB,CACf8C,MAAOpB,EACPvM,IAAKwM,EACLtC,QAASwC,EACX,EACA5B,WAAY,CACV6C,MAAOhB,GACP3M,IAAK4M,GACL1C,QAAS4C,EACX,EACA/B,UAAW,CACT4C,MAAOvC,EACPpL,IAAKqL,EACLnB,QAASqB,CACX,EACAP,WAAY,CACV2C,MAAOnC,EACPxL,IAAKyL,EACLvB,QAASyB,CACX,EACAV,QAAS,CACP0C,MAAOZ,GACP/M,IAAKgN,GACL9C,QAASgD,EACX,EACAhC,iBAAkB,CAChByC,MAAOR,GACPnN,IAAKoN,GACLlD,QAASoD,EACX,EACAnC,eAAgB,CACdwC,MAAOJ,GACPvN,IAAKwN,EACLtD,QAASwD,EACX,CAAA,CAEJ","x_google_ignoreList":[0]} \ No newline at end of file diff --git a/assets/StatusCircle-D7h8AcdR.js b/assets/StatusCircle-D7h8AcdR.js deleted file mode 100644 index d629a2d..0000000 --- a/assets/StatusCircle-D7h8AcdR.js +++ /dev/null @@ -1,2 +0,0 @@ -import{al as c,j as t,c as l,ay as d}from"./vendor-Dkz3gcSC.js";import{e as x}from"./react-dom-DpNJ2UNC.js";import{I as a,a as r}from"./Icons-Ct84pi7p.js";import{o as s}from"./index-DYBNcHgS.js";function n(e){return e.type==="loading"}function h(e){const[i]=c(()=>({percentage:n(e)?e.percentage:0}),[e]);return t.jsxs("div",{className:l({"p-0.5 border-current border-[3px] rounded-full h-6 w-6 relative transition-colors":!0,"text-video-scraping-loading":e.type==="loading","text-video-scraping-noresult text-opacity-50":e.type==="waiting","text-video-scraping-error bg-video-scraping-error":e.type==="error","text-green-500 bg-green-500":e.type==="success","text-video-scraping-noresult bg-video-scraping-noresult":e.type==="noresult"},e.className),children:[t.jsx(s,{animation:"fade",show:n(e),children:t.jsx("svg",{width:"100%",height:"100%",viewBox:"0 0 64 64",xmlns:"http://www.w3.org/2000/svg",className:"rounded-full -rotate-90",children:t.jsx(x.circle,{strokeWidth:"32",strokeDasharray:d(i.percentage,o=>`${o} 100`),r:"25%",cx:"50%",cy:"50%",fill:"transparent",stroke:"currentColor",className:"transition-[strokeDasharray]"})})}),t.jsx(s,{animation:"fade",show:e.type==="error",children:t.jsx(a,{className:"absolute inset-0 flex items-center justify-center text-background-main",icon:r.X})}),t.jsx(s,{animation:"fade",show:e.type==="success",children:t.jsx(a,{className:"absolute inset-0 flex items-center text-sm justify-center text-background-main",icon:r.CHECKMARK})}),t.jsx(s,{animation:"fade",show:e.type==="noresult",children:t.jsx("div",{className:"absolute inset-0 flex items-center",children:t.jsx("div",{className:"h-[3px] flex-1 mx-1 rounded-full bg-background-main"})})})]})}export{h as S}; -//# sourceMappingURL=StatusCircle-D7h8AcdR.js.map diff --git a/assets/StatusCircle-D7h8AcdR.js.map b/assets/StatusCircle-D7h8AcdR.js.map deleted file mode 100644 index 4516ddb..0000000 --- a/assets/StatusCircle-D7h8AcdR.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StatusCircle-D7h8AcdR.js","sources":[],"sourcesContent":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/assets/TestView-C1rlAP4k.js b/assets/TestView-C1rlAP4k.js deleted file mode 100644 index 4cd3b19..0000000 --- a/assets/TestView-C1rlAP4k.js +++ /dev/null @@ -1,2 +0,0 @@ -import{r as o,j as e}from"./vendor-Dkz3gcSC.js";import{B as i}from"./index-DYBNcHgS.js";import"./auth-72H9TcpW.js";import"./caption-parsing-BABN6jyO.js";import"./react-dom-DpNJ2UNC.js";import"./locales-BXkJCeK5.js";import"./Icons-Ct84pi7p.js";import"./language-db-DxKZVAm4.js";import"./hls-2_Gpnevg.js";function x(){const[r,t]=o.useState(!1);if(r)throw new Error("I crashed");return e.jsx(i,{onClick:()=>t(!0),children:"Crash me!"})}export{x as default}; -//# sourceMappingURL=TestView-C1rlAP4k.js.map diff --git a/assets/TestView-C1rlAP4k.js.map b/assets/TestView-C1rlAP4k.js.map deleted file mode 100644 index 76517b8..0000000 --- a/assets/TestView-C1rlAP4k.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TestView-C1rlAP4k.js","sources":[],"sourcesContent":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/assets/ad-BOo-tPI4.svg b/assets/ad-BOo-tPI4.svg deleted file mode 100644 index 067ab77..0000000 --- a/assets/ad-BOo-tPI4.svg +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/ad-CDtWnnSA.svg b/assets/ad-CDtWnnSA.svg deleted file mode 100644 index 4bd91b7..0000000 --- a/assets/ad-CDtWnnSA.svg +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/af-BReSbsTq.svg b/assets/af-BReSbsTq.svg deleted file mode 100644 index 31a20c9..0000000 --- a/assets/af-BReSbsTq.svg +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/af-Cc32fsDB.svg b/assets/af-Cc32fsDB.svg deleted file mode 100644 index 0b7939c..0000000 --- a/assets/af-Cc32fsDB.svg +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/arab-DwNob5Qo.svg b/assets/arab-DwNob5Qo.svg deleted file mode 100644 index 96d2715..0000000 --- a/assets/arab-DwNob5Qo.svg +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/arab-PzQTPYwO.svg b/assets/arab-PzQTPYwO.svg deleted file mode 100644 index 841f11a..0000000 --- a/assets/arab-PzQTPYwO.svg +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/as-D2gsNMrP.svg b/assets/as-D2gsNMrP.svg deleted file mode 100644 index 3543556..0000000 --- a/assets/as-D2gsNMrP.svg +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/as-_t1IQUdv.svg b/assets/as-_t1IQUdv.svg deleted file mode 100644 index b0789e9..0000000 --- a/assets/as-_t1IQUdv.svg +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/auth-72H9TcpW.js b/assets/auth-72H9TcpW.js deleted file mode 100644 index 8b4c0d6..0000000 --- a/assets/auth-72H9TcpW.js +++ /dev/null @@ -1,12212 +0,0 @@ -var ue = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; - -function Gn(e) { - return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e -} - -function Zi(e) { - if (e.__esModule) return e; - var t = e.default; - if (typeof t == "function") { - var a = function r() { - return this instanceof r ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments) - }; - a.prototype = t.prototype - } else a = {}; - return Object.defineProperty(a, "__esModule", { - value: !0 - }), Object.keys(e).forEach(function (r) { - var n = Object.getOwnPropertyDescriptor(e, r); - Object.defineProperty(a, r, n.get ? n : { - enumerable: !0, - get: function () { - return e[r] - } - }) - }), a -} -var Qn = { - exports: {} -}; - -function Ji(e) { - throw new Error('Could not dynamically require "' + e + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.') -} -var Jr = { - exports: {} -}; -const es = {}, - ts = Object.freeze(Object.defineProperty({ - __proto__: null, - default: es - }, Symbol.toStringTag, { - value: "Module" - })), - Kr = Zi(ts); -var Ua; - -function ve() { - return Ua || (Ua = 1, function (e, t) { - (function (a, r) { - e.exports = r() - })(ue, function () { - var a = a || function (r, n) { - var i; - if (typeof window < "u" && window.crypto && (i = window.crypto), typeof self < "u" && self.crypto && (i = self.crypto), typeof globalThis < "u" && globalThis.crypto && (i = globalThis.crypto), !i && typeof window < "u" && window.msCrypto && (i = window.msCrypto), !i && typeof ue < "u" && ue.crypto && (i = ue.crypto), !i && typeof Ji == "function") try { - i = Kr - } catch {} - var s = function () { - if (i) { - if (typeof i.getRandomValues == "function") try { - return i.getRandomValues(new Uint32Array(1))[0] - } catch {} - if (typeof i.randomBytes == "function") try { - return i.randomBytes(4).readInt32LE() - } catch {} - } - throw new Error("Native crypto module could not be used to get secure random number.") - }, - o = Object.create || function () { - function E() {} - return function (m) { - var A; - return E.prototype = m, A = new E, E.prototype = null, A - } - }(), - l = {}, - f = l.lib = {}, - u = f.Base = function () { - return { - extend: function (E) { - var m = o(this); - return E && m.mixIn(E), (!m.hasOwnProperty("init") || this.init === m.init) && (m.init = function () { - m.$super.init.apply(this, arguments) - }), m.init.prototype = m, m.$super = this, m - }, - create: function () { - var E = this.extend(); - return E.init.apply(E, arguments), E - }, - init: function () {}, - mixIn: function (E) { - for (var m in E) E.hasOwnProperty(m) && (this[m] = E[m]); - E.hasOwnProperty("toString") && (this.toString = E.toString) - }, - clone: function () { - return this.init.prototype.extend(this) - } - } - }(), - c = f.WordArray = u.extend({ - init: function (E, m) { - E = this.words = E || [], m != n ? this.sigBytes = m : this.sigBytes = E.length * 4 - }, - toString: function (E) { - return (E || x).stringify(this) - }, - concat: function (E) { - var m = this.words, - A = E.words, - T = this.sigBytes, - S = E.sigBytes; - if (this.clamp(), T % 4) - for (var N = 0; N < S; N++) { - var w = A[N >>> 2] >>> 24 - N % 4 * 8 & 255; - m[T + N >>> 2] |= w << 24 - (T + N) % 4 * 8 - } else - for (var K = 0; K < S; K += 4) m[T + K >>> 2] = A[K >>> 2]; - return this.sigBytes += S, this - }, - clamp: function () { - var E = this.words, - m = this.sigBytes; - E[m >>> 2] &= 4294967295 << 32 - m % 4 * 8, E.length = r.ceil(m / 4) - }, - clone: function () { - var E = u.clone.call(this); - return E.words = this.words.slice(0), E - }, - random: function (E) { - for (var m = [], A = 0; A < E; A += 4) m.push(s()); - return new c.init(m, E) - } - }), - h = l.enc = {}, - x = h.Hex = { - stringify: function (E) { - for (var m = E.words, A = E.sigBytes, T = [], S = 0; S < A; S++) { - var N = m[S >>> 2] >>> 24 - S % 4 * 8 & 255; - T.push((N >>> 4).toString(16)), T.push((N & 15).toString(16)) - } - return T.join("") - }, - parse: function (E) { - for (var m = E.length, A = [], T = 0; T < m; T += 2) A[T >>> 3] |= parseInt(E.substr(T, 2), 16) << 24 - T % 8 * 4; - return new c.init(A, m / 2) - } - }, - d = h.Latin1 = { - stringify: function (E) { - for (var m = E.words, A = E.sigBytes, T = [], S = 0; S < A; S++) { - var N = m[S >>> 2] >>> 24 - S % 4 * 8 & 255; - T.push(String.fromCharCode(N)) - } - return T.join("") - }, - parse: function (E) { - for (var m = E.length, A = [], T = 0; T < m; T++) A[T >>> 2] |= (E.charCodeAt(T) & 255) << 24 - T % 4 * 8; - return new c.init(A, m) - } - }, - g = h.Utf8 = { - stringify: function (E) { - try { - return decodeURIComponent(escape(d.stringify(E))) - } catch { - throw new Error("Malformed UTF-8 data") - } - }, - parse: function (E) { - return d.parse(unescape(encodeURIComponent(E))) - } - }, - v = f.BufferedBlockAlgorithm = u.extend({ - reset: function () { - this._data = new c.init, this._nDataBytes = 0 - }, - _append: function (E) { - typeof E == "string" && (E = g.parse(E)), this._data.concat(E), this._nDataBytes += E.sigBytes - }, - _process: function (E) { - var m, A = this._data, - T = A.words, - S = A.sigBytes, - N = this.blockSize, - w = N * 4, - K = S / w; - E ? K = r.ceil(K) : K = r.max((K | 0) - this._minBufferSize, 0); - var D = K * N, - F = r.min(D * 4, S); - if (D) { - for (var U = 0; U < D; U += N) this._doProcessBlock(T, U); - m = T.splice(0, D), A.sigBytes -= F - } - return new c.init(m, F) - }, - clone: function () { - var E = u.clone.call(this); - return E._data = this._data.clone(), E - }, - _minBufferSize: 0 - }); - f.Hasher = v.extend({ - cfg: u.extend(), - init: function (E) { - this.cfg = this.cfg.extend(E), this.reset() - }, - reset: function () { - v.reset.call(this), this._doReset() - }, - update: function (E) { - return this._append(E), this._process(), this - }, - finalize: function (E) { - E && this._append(E); - var m = this._doFinalize(); - return m - }, - blockSize: 16, - _createHelper: function (E) { - return function (m, A) { - return new E.init(A).finalize(m) - } - }, - _createHmacHelper: function (E) { - return function (m, A) { - return new B.HMAC.init(E, A).finalize(m) - } - } - }); - var B = l.algo = {}; - return l - }(Math); - return a - }) - }(Jr)), Jr.exports -} -var e0 = { - exports: {} - }, - Pa; - -function Hr() { - return Pa || (Pa = 1, function (e, t) { - (function (a, r) { - e.exports = r(ve()) - })(ue, function (a) { - return function (r) { - var n = a, - i = n.lib, - s = i.Base, - o = i.WordArray, - l = n.x64 = {}; - l.Word = s.extend({ - init: function (f, u) { - this.high = f, this.low = u - } - }), l.WordArray = s.extend({ - init: function (f, u) { - f = this.words = f || [], u != r ? this.sigBytes = u : this.sigBytes = f.length * 8 - }, - toX32: function () { - for (var f = this.words, u = f.length, c = [], h = 0; h < u; h++) { - var x = f[h]; - c.push(x.high), c.push(x.low) - } - return o.create(c, this.sigBytes) - }, - clone: function () { - for (var f = s.clone.call(this), u = f.words = this.words.slice(0), c = u.length, h = 0; h < c; h++) u[h] = u[h].clone(); - return f - } - }) - }(), a - }) - }(e0)), e0.exports -} -var t0 = { - exports: {} - }, - Va; - -function rs() { - return Va || (Va = 1, function (e, t) { - (function (a, r) { - e.exports = r(ve()) - })(ue, function (a) { - return function () { - if (typeof ArrayBuffer == "function") { - var r = a, - n = r.lib, - i = n.WordArray, - s = i.init, - o = i.init = function (l) { - if (l instanceof ArrayBuffer && (l = new Uint8Array(l)), (l instanceof Int8Array || typeof Uint8ClampedArray < "u" && l instanceof Uint8ClampedArray || l instanceof Int16Array || l instanceof Uint16Array || l instanceof Int32Array || l instanceof Uint32Array || l instanceof Float32Array || l instanceof Float64Array) && (l = new Uint8Array(l.buffer, l.byteOffset, l.byteLength)), l instanceof Uint8Array) { - for (var f = l.byteLength, u = [], c = 0; c < f; c++) u[c >>> 2] |= l[c] << 24 - c % 4 * 8; - s.call(this, u, f) - } else s.apply(this, arguments) - }; - o.prototype = i - } - }(), a.lib.WordArray - }) - }(t0)), t0.exports -} -var r0 = { - exports: {} - }, - Oa; - -function as() { - return Oa || (Oa = 1, function (e, t) { - (function (a, r) { - e.exports = r(ve()) - })(ue, function (a) { - return function () { - var r = a, - n = r.lib, - i = n.WordArray, - s = r.enc; - s.Utf16 = s.Utf16BE = { - stringify: function (l) { - for (var f = l.words, u = l.sigBytes, c = [], h = 0; h < u; h += 2) { - var x = f[h >>> 2] >>> 16 - h % 4 * 8 & 65535; - c.push(String.fromCharCode(x)) - } - return c.join("") - }, - parse: function (l) { - for (var f = l.length, u = [], c = 0; c < f; c++) u[c >>> 1] |= l.charCodeAt(c) << 16 - c % 2 * 16; - return i.create(u, f * 2) - } - }, s.Utf16LE = { - stringify: function (l) { - for (var f = l.words, u = l.sigBytes, c = [], h = 0; h < u; h += 2) { - var x = o(f[h >>> 2] >>> 16 - h % 4 * 8 & 65535); - c.push(String.fromCharCode(x)) - } - return c.join("") - }, - parse: function (l) { - for (var f = l.length, u = [], c = 0; c < f; c++) u[c >>> 1] |= o(l.charCodeAt(c) << 16 - c % 2 * 16); - return i.create(u, f * 2) - } - }; - - function o(l) { - return l << 8 & 4278255360 | l >>> 8 & 16711935 - } - }(), a.enc.Utf16 - }) - }(r0)), r0.exports -} -var a0 = { - exports: {} - }, - Ka; - -function Ht() { - return Ka || (Ka = 1, function (e, t) { - (function (a, r) { - e.exports = r(ve()) - })(ue, function (a) { - return function () { - var r = a, - n = r.lib, - i = n.WordArray, - s = r.enc; - s.Base64 = { - stringify: function (l) { - var f = l.words, - u = l.sigBytes, - c = this._map; - l.clamp(); - for (var h = [], x = 0; x < u; x += 3) - for (var d = f[x >>> 2] >>> 24 - x % 4 * 8 & 255, g = f[x + 1 >>> 2] >>> 24 - (x + 1) % 4 * 8 & 255, v = f[x + 2 >>> 2] >>> 24 - (x + 2) % 4 * 8 & 255, B = d << 16 | g << 8 | v, E = 0; E < 4 && x + E * .75 < u; E++) h.push(c.charAt(B >>> 6 * (3 - E) & 63)); - var m = c.charAt(64); - if (m) - for (; h.length % 4;) h.push(m); - return h.join("") - }, - parse: function (l) { - var f = l.length, - u = this._map, - c = this._reverseMap; - if (!c) { - c = this._reverseMap = []; - for (var h = 0; h < u.length; h++) c[u.charCodeAt(h)] = h - } - var x = u.charAt(64); - if (x) { - var d = l.indexOf(x); - d !== -1 && (f = d) - } - return o(l, f, c) - }, - _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" - }; - - function o(l, f, u) { - for (var c = [], h = 0, x = 0; x < f; x++) - if (x % 4) { - var d = u[l.charCodeAt(x - 1)] << x % 4 * 2, - g = u[l.charCodeAt(x)] >>> 6 - x % 4 * 2, - v = d | g; - c[h >>> 2] |= v << 24 - h % 4 * 8, h++ - } return i.create(c, h) - } - }(), a.enc.Base64 - }) - }(a0)), a0.exports -} -var n0 = { - exports: {} - }, - Ha; - -function ns() { - return Ha || (Ha = 1, function (e, t) { - (function (a, r) { - e.exports = r(ve()) - })(ue, function (a) { - return function () { - var r = a, - n = r.lib, - i = n.WordArray, - s = r.enc; - s.Base64url = { - stringify: function (l, f) { - f === void 0 && (f = !0); - var u = l.words, - c = l.sigBytes, - h = f ? this._safe_map : this._map; - l.clamp(); - for (var x = [], d = 0; d < c; d += 3) - for (var g = u[d >>> 2] >>> 24 - d % 4 * 8 & 255, v = u[d + 1 >>> 2] >>> 24 - (d + 1) % 4 * 8 & 255, B = u[d + 2 >>> 2] >>> 24 - (d + 2) % 4 * 8 & 255, E = g << 16 | v << 8 | B, m = 0; m < 4 && d + m * .75 < c; m++) x.push(h.charAt(E >>> 6 * (3 - m) & 63)); - var A = h.charAt(64); - if (A) - for (; x.length % 4;) x.push(A); - return x.join("") - }, - parse: function (l, f) { - f === void 0 && (f = !0); - var u = l.length, - c = f ? this._safe_map : this._map, - h = this._reverseMap; - if (!h) { - h = this._reverseMap = []; - for (var x = 0; x < c.length; x++) h[c.charCodeAt(x)] = x - } - var d = c.charAt(64); - if (d) { - var g = l.indexOf(d); - g !== -1 && (u = g) - } - return o(l, u, h) - }, - _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", - _safe_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_" - }; - - function o(l, f, u) { - for (var c = [], h = 0, x = 0; x < f; x++) - if (x % 4) { - var d = u[l.charCodeAt(x - 1)] << x % 4 * 2, - g = u[l.charCodeAt(x)] >>> 6 - x % 4 * 2, - v = d | g; - c[h >>> 2] |= v << 24 - h % 4 * 8, h++ - } return i.create(c, h) - } - }(), a.enc.Base64url - }) - }(n0)), n0.exports -} -var i0 = { - exports: {} - }, - Ma; - -function Mt() { - return Ma || (Ma = 1, function (e, t) { - (function (a, r) { - e.exports = r(ve()) - })(ue, function (a) { - return function (r) { - var n = a, - i = n.lib, - s = i.WordArray, - o = i.Hasher, - l = n.algo, - f = []; - (function () { - for (var g = 0; g < 64; g++) f[g] = r.abs(r.sin(g + 1)) * 4294967296 | 0 - })(); - var u = l.MD5 = o.extend({ - _doReset: function () { - this._hash = new s.init([1732584193, 4023233417, 2562383102, 271733878]) - }, - _doProcessBlock: function (g, v) { - for (var B = 0; B < 16; B++) { - var E = v + B, - m = g[E]; - g[E] = (m << 8 | m >>> 24) & 16711935 | (m << 24 | m >>> 8) & 4278255360 - } - var A = this._hash.words, - T = g[v + 0], - S = g[v + 1], - N = g[v + 2], - w = g[v + 3], - K = g[v + 4], - D = g[v + 5], - F = g[v + 6], - U = g[v + 7], - P = g[v + 8], - Z = g[v + 9], - W = g[v + 10], - J = g[v + 11], - Q = g[v + 12], - ce = g[v + 13], - ge = g[v + 14], - ne = g[v + 15], - k = A[0], - O = A[1], - H = A[2], - V = A[3]; - k = c(k, O, H, V, T, 7, f[0]), V = c(V, k, O, H, S, 12, f[1]), H = c(H, V, k, O, N, 17, f[2]), O = c(O, H, V, k, w, 22, f[3]), k = c(k, O, H, V, K, 7, f[4]), V = c(V, k, O, H, D, 12, f[5]), H = c(H, V, k, O, F, 17, f[6]), O = c(O, H, V, k, U, 22, f[7]), k = c(k, O, H, V, P, 7, f[8]), V = c(V, k, O, H, Z, 12, f[9]), H = c(H, V, k, O, W, 17, f[10]), O = c(O, H, V, k, J, 22, f[11]), k = c(k, O, H, V, Q, 7, f[12]), V = c(V, k, O, H, ce, 12, f[13]), H = c(H, V, k, O, ge, 17, f[14]), O = c(O, H, V, k, ne, 22, f[15]), k = h(k, O, H, V, S, 5, f[16]), V = h(V, k, O, H, F, 9, f[17]), H = h(H, V, k, O, J, 14, f[18]), O = h(O, H, V, k, T, 20, f[19]), k = h(k, O, H, V, D, 5, f[20]), V = h(V, k, O, H, W, 9, f[21]), H = h(H, V, k, O, ne, 14, f[22]), O = h(O, H, V, k, K, 20, f[23]), k = h(k, O, H, V, Z, 5, f[24]), V = h(V, k, O, H, ge, 9, f[25]), H = h(H, V, k, O, w, 14, f[26]), O = h(O, H, V, k, P, 20, f[27]), k = h(k, O, H, V, ce, 5, f[28]), V = h(V, k, O, H, N, 9, f[29]), H = h(H, V, k, O, U, 14, f[30]), O = h(O, H, V, k, Q, 20, f[31]), k = x(k, O, H, V, D, 4, f[32]), V = x(V, k, O, H, P, 11, f[33]), H = x(H, V, k, O, J, 16, f[34]), O = x(O, H, V, k, ge, 23, f[35]), k = x(k, O, H, V, S, 4, f[36]), V = x(V, k, O, H, K, 11, f[37]), H = x(H, V, k, O, U, 16, f[38]), O = x(O, H, V, k, W, 23, f[39]), k = x(k, O, H, V, ce, 4, f[40]), V = x(V, k, O, H, T, 11, f[41]), H = x(H, V, k, O, w, 16, f[42]), O = x(O, H, V, k, F, 23, f[43]), k = x(k, O, H, V, Z, 4, f[44]), V = x(V, k, O, H, Q, 11, f[45]), H = x(H, V, k, O, ne, 16, f[46]), O = x(O, H, V, k, N, 23, f[47]), k = d(k, O, H, V, T, 6, f[48]), V = d(V, k, O, H, U, 10, f[49]), H = d(H, V, k, O, ge, 15, f[50]), O = d(O, H, V, k, D, 21, f[51]), k = d(k, O, H, V, Q, 6, f[52]), V = d(V, k, O, H, w, 10, f[53]), H = d(H, V, k, O, W, 15, f[54]), O = d(O, H, V, k, S, 21, f[55]), k = d(k, O, H, V, P, 6, f[56]), V = d(V, k, O, H, ne, 10, f[57]), H = d(H, V, k, O, F, 15, f[58]), O = d(O, H, V, k, ce, 21, f[59]), k = d(k, O, H, V, K, 6, f[60]), V = d(V, k, O, H, J, 10, f[61]), H = d(H, V, k, O, N, 15, f[62]), O = d(O, H, V, k, Z, 21, f[63]), A[0] = A[0] + k | 0, A[1] = A[1] + O | 0, A[2] = A[2] + H | 0, A[3] = A[3] + V | 0 - }, - _doFinalize: function () { - var g = this._data, - v = g.words, - B = this._nDataBytes * 8, - E = g.sigBytes * 8; - v[E >>> 5] |= 128 << 24 - E % 32; - var m = r.floor(B / 4294967296), - A = B; - v[(E + 64 >>> 9 << 4) + 15] = (m << 8 | m >>> 24) & 16711935 | (m << 24 | m >>> 8) & 4278255360, v[(E + 64 >>> 9 << 4) + 14] = (A << 8 | A >>> 24) & 16711935 | (A << 24 | A >>> 8) & 4278255360, g.sigBytes = (v.length + 1) * 4, this._process(); - for (var T = this._hash, S = T.words, N = 0; N < 4; N++) { - var w = S[N]; - S[N] = (w << 8 | w >>> 24) & 16711935 | (w << 24 | w >>> 8) & 4278255360 - } - return T - }, - clone: function () { - var g = o.clone.call(this); - return g._hash = this._hash.clone(), g - } - }); - - function c(g, v, B, E, m, A, T) { - var S = g + (v & B | ~v & E) + m + T; - return (S << A | S >>> 32 - A) + v - } - - function h(g, v, B, E, m, A, T) { - var S = g + (v & E | B & ~E) + m + T; - return (S << A | S >>> 32 - A) + v - } - - function x(g, v, B, E, m, A, T) { - var S = g + (v ^ B ^ E) + m + T; - return (S << A | S >>> 32 - A) + v - } - - function d(g, v, B, E, m, A, T) { - var S = g + (B ^ (v | ~E)) + m + T; - return (S << A | S >>> 32 - A) + v - } - n.MD5 = o._createHelper(u), n.HmacMD5 = o._createHmacHelper(u) - }(Math), a.MD5 - }) - }(i0)), i0.exports -} -var s0 = { - exports: {} - }, - qa; - -function Wn() { - return qa || (qa = 1, function (e, t) { - (function (a, r) { - e.exports = r(ve()) - })(ue, function (a) { - return function () { - var r = a, - n = r.lib, - i = n.WordArray, - s = n.Hasher, - o = r.algo, - l = [], - f = o.SHA1 = s.extend({ - _doReset: function () { - this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) - }, - _doProcessBlock: function (u, c) { - for (var h = this._hash.words, x = h[0], d = h[1], g = h[2], v = h[3], B = h[4], E = 0; E < 80; E++) { - if (E < 16) l[E] = u[c + E] | 0; - else { - var m = l[E - 3] ^ l[E - 8] ^ l[E - 14] ^ l[E - 16]; - l[E] = m << 1 | m >>> 31 - } - var A = (x << 5 | x >>> 27) + B + l[E]; - E < 20 ? A += (d & g | ~d & v) + 1518500249 : E < 40 ? A += (d ^ g ^ v) + 1859775393 : E < 60 ? A += (d & g | d & v | g & v) - 1894007588 : A += (d ^ g ^ v) - 899497514, B = v, v = g, g = d << 30 | d >>> 2, d = x, x = A - } - h[0] = h[0] + x | 0, h[1] = h[1] + d | 0, h[2] = h[2] + g | 0, h[3] = h[3] + v | 0, h[4] = h[4] + B | 0 - }, - _doFinalize: function () { - var u = this._data, - c = u.words, - h = this._nDataBytes * 8, - x = u.sigBytes * 8; - return c[x >>> 5] |= 128 << 24 - x % 32, c[(x + 64 >>> 9 << 4) + 14] = Math.floor(h / 4294967296), c[(x + 64 >>> 9 << 4) + 15] = h, u.sigBytes = c.length * 4, this._process(), this._hash - }, - clone: function () { - var u = s.clone.call(this); - return u._hash = this._hash.clone(), u - } - }); - r.SHA1 = s._createHelper(f), r.HmacSHA1 = s._createHmacHelper(f) - }(), a.SHA1 - }) - }(s0)), s0.exports -} -var o0 = { - exports: {} - }, - za; - -function na() { - return za || (za = 1, function (e, t) { - (function (a, r) { - e.exports = r(ve()) - })(ue, function (a) { - return function (r) { - var n = a, - i = n.lib, - s = i.WordArray, - o = i.Hasher, - l = n.algo, - f = [], - u = []; - (function () { - function x(B) { - for (var E = r.sqrt(B), m = 2; m <= E; m++) - if (!(B % m)) return !1; - return !0 - } - - function d(B) { - return (B - (B | 0)) * 4294967296 | 0 - } - for (var g = 2, v = 0; v < 64;) x(g) && (v < 8 && (f[v] = d(r.pow(g, 1 / 2))), u[v] = d(r.pow(g, 1 / 3)), v++), g++ - })(); - var c = [], - h = l.SHA256 = o.extend({ - _doReset: function () { - this._hash = new s.init(f.slice(0)) - }, - _doProcessBlock: function (x, d) { - for (var g = this._hash.words, v = g[0], B = g[1], E = g[2], m = g[3], A = g[4], T = g[5], S = g[6], N = g[7], w = 0; w < 64; w++) { - if (w < 16) c[w] = x[d + w] | 0; - else { - var K = c[w - 15], - D = (K << 25 | K >>> 7) ^ (K << 14 | K >>> 18) ^ K >>> 3, - F = c[w - 2], - U = (F << 15 | F >>> 17) ^ (F << 13 | F >>> 19) ^ F >>> 10; - c[w] = D + c[w - 7] + U + c[w - 16] - } - var P = A & T ^ ~A & S, - Z = v & B ^ v & E ^ B & E, - W = (v << 30 | v >>> 2) ^ (v << 19 | v >>> 13) ^ (v << 10 | v >>> 22), - J = (A << 26 | A >>> 6) ^ (A << 21 | A >>> 11) ^ (A << 7 | A >>> 25), - Q = N + J + P + u[w] + c[w], - ce = W + Z; - N = S, S = T, T = A, A = m + Q | 0, m = E, E = B, B = v, v = Q + ce | 0 - } - g[0] = g[0] + v | 0, g[1] = g[1] + B | 0, g[2] = g[2] + E | 0, g[3] = g[3] + m | 0, g[4] = g[4] + A | 0, g[5] = g[5] + T | 0, g[6] = g[6] + S | 0, g[7] = g[7] + N | 0 - }, - _doFinalize: function () { - var x = this._data, - d = x.words, - g = this._nDataBytes * 8, - v = x.sigBytes * 8; - return d[v >>> 5] |= 128 << 24 - v % 32, d[(v + 64 >>> 9 << 4) + 14] = r.floor(g / 4294967296), d[(v + 64 >>> 9 << 4) + 15] = g, x.sigBytes = d.length * 4, this._process(), this._hash - }, - clone: function () { - var x = o.clone.call(this); - return x._hash = this._hash.clone(), x - } - }); - n.SHA256 = o._createHelper(h), n.HmacSHA256 = o._createHmacHelper(h) - }(Math), a.SHA256 - }) - }(o0)), o0.exports -} -var f0 = { - exports: {} - }, - Ga; - -function is() { - return Ga || (Ga = 1, function (e, t) { - (function (a, r, n) { - e.exports = r(ve(), na()) - })(ue, function (a) { - return function () { - var r = a, - n = r.lib, - i = n.WordArray, - s = r.algo, - o = s.SHA256, - l = s.SHA224 = o.extend({ - _doReset: function () { - this._hash = new i.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]) - }, - _doFinalize: function () { - var f = o._doFinalize.call(this); - return f.sigBytes -= 4, f - } - }); - r.SHA224 = o._createHelper(l), r.HmacSHA224 = o._createHmacHelper(l) - }(), a.SHA224 - }) - }(f0)), f0.exports -} -var u0 = { - exports: {} - }, - Qa; - -function Xn() { - return Qa || (Qa = 1, function (e, t) { - (function (a, r, n) { - e.exports = r(ve(), Hr()) - })(ue, function (a) { - return function () { - var r = a, - n = r.lib, - i = n.Hasher, - s = r.x64, - o = s.Word, - l = s.WordArray, - f = r.algo; - - function u() { - return o.create.apply(o, arguments) - } - var c = [u(1116352408, 3609767458), u(1899447441, 602891725), u(3049323471, 3964484399), u(3921009573, 2173295548), u(961987163, 4081628472), u(1508970993, 3053834265), u(2453635748, 2937671579), u(2870763221, 3664609560), u(3624381080, 2734883394), u(310598401, 1164996542), u(607225278, 1323610764), u(1426881987, 3590304994), u(1925078388, 4068182383), u(2162078206, 991336113), u(2614888103, 633803317), u(3248222580, 3479774868), u(3835390401, 2666613458), u(4022224774, 944711139), u(264347078, 2341262773), u(604807628, 2007800933), u(770255983, 1495990901), u(1249150122, 1856431235), u(1555081692, 3175218132), u(1996064986, 2198950837), u(2554220882, 3999719339), u(2821834349, 766784016), u(2952996808, 2566594879), u(3210313671, 3203337956), u(3336571891, 1034457026), u(3584528711, 2466948901), u(113926993, 3758326383), u(338241895, 168717936), u(666307205, 1188179964), u(773529912, 1546045734), u(1294757372, 1522805485), u(1396182291, 2643833823), u(1695183700, 2343527390), u(1986661051, 1014477480), u(2177026350, 1206759142), u(2456956037, 344077627), u(2730485921, 1290863460), u(2820302411, 3158454273), u(3259730800, 3505952657), u(3345764771, 106217008), u(3516065817, 3606008344), u(3600352804, 1432725776), u(4094571909, 1467031594), u(275423344, 851169720), u(430227734, 3100823752), u(506948616, 1363258195), u(659060556, 3750685593), u(883997877, 3785050280), u(958139571, 3318307427), u(1322822218, 3812723403), u(1537002063, 2003034995), u(1747873779, 3602036899), u(1955562222, 1575990012), u(2024104815, 1125592928), u(2227730452, 2716904306), u(2361852424, 442776044), u(2428436474, 593698344), u(2756734187, 3733110249), u(3204031479, 2999351573), u(3329325298, 3815920427), u(3391569614, 3928383900), u(3515267271, 566280711), u(3940187606, 3454069534), u(4118630271, 4000239992), u(116418474, 1914138554), u(174292421, 2731055270), u(289380356, 3203993006), u(460393269, 320620315), u(685471733, 587496836), u(852142971, 1086792851), u(1017036298, 365543100), u(1126000580, 2618297676), u(1288033470, 3409855158), u(1501505948, 4234509866), u(1607167915, 987167468), u(1816402316, 1246189591)], - h = []; - (function () { - for (var d = 0; d < 80; d++) h[d] = u() - })(); - var x = f.SHA512 = i.extend({ - _doReset: function () { - this._hash = new l.init([new o.init(1779033703, 4089235720), new o.init(3144134277, 2227873595), new o.init(1013904242, 4271175723), new o.init(2773480762, 1595750129), new o.init(1359893119, 2917565137), new o.init(2600822924, 725511199), new o.init(528734635, 4215389547), new o.init(1541459225, 327033209)]) - }, - _doProcessBlock: function (d, g) { - for (var v = this._hash.words, B = v[0], E = v[1], m = v[2], A = v[3], T = v[4], S = v[5], N = v[6], w = v[7], K = B.high, D = B.low, F = E.high, U = E.low, P = m.high, Z = m.low, W = A.high, J = A.low, Q = T.high, ce = T.low, ge = S.high, ne = S.low, k = N.high, O = N.low, H = w.high, V = w.low, oe = K, ie = D, me = F, ee = U, Re = P, Fe = Z, Ue = W, we = J, Se = Q, Be = ce, Le = ge, ir = ne, mr = k, sr = O, Zr = H, or = V, ot = 0; ot < 80; ot++) { - var tt, Bt, Br = h[ot]; - if (ot < 16) Bt = Br.high = d[g + ot * 2] | 0, tt = Br.low = d[g + ot * 2 + 1] | 0; - else { - var Sa = h[ot - 15], - Gt = Sa.high, - fr = Sa.low, - Oi = (Gt >>> 1 | fr << 31) ^ (Gt >>> 8 | fr << 24) ^ Gt >>> 7, - Ta = (fr >>> 1 | Gt << 31) ^ (fr >>> 8 | Gt << 24) ^ (fr >>> 7 | Gt << 25), - ba = h[ot - 2], - Qt = ba.high, - ur = ba.low, - Ki = (Qt >>> 19 | ur << 13) ^ (Qt << 3 | ur >>> 29) ^ Qt >>> 6, - Ia = (ur >>> 19 | Qt << 13) ^ (ur << 3 | Qt >>> 29) ^ (ur >>> 6 | Qt << 26), - _a = h[ot - 7], - Hi = _a.high, - Mi = _a.low, - Da = h[ot - 16], - qi = Da.high, - Na = Da.low; - tt = Ta + Mi, Bt = Oi + Hi + (tt >>> 0 < Ta >>> 0 ? 1 : 0), tt = tt + Ia, Bt = Bt + Ki + (tt >>> 0 < Ia >>> 0 ? 1 : 0), tt = tt + Na, Bt = Bt + qi + (tt >>> 0 < Na >>> 0 ? 1 : 0), Br.high = Bt, Br.low = tt - } - var zi = Se & Le ^ ~Se & mr, - Fa = Be & ir ^ ~Be & sr, - Gi = oe & me ^ oe & Re ^ me & Re, - Qi = ie & ee ^ ie & Fe ^ ee & Fe, - Wi = (oe >>> 28 | ie << 4) ^ (oe << 30 | ie >>> 2) ^ (oe << 25 | ie >>> 7), - Ra = (ie >>> 28 | oe << 4) ^ (ie << 30 | oe >>> 2) ^ (ie << 25 | oe >>> 7), - Xi = (Se >>> 14 | Be << 18) ^ (Se >>> 18 | Be << 14) ^ (Se << 23 | Be >>> 9), - Yi = (Be >>> 14 | Se << 18) ^ (Be >>> 18 | Se << 14) ^ (Be << 23 | Se >>> 9), - wa = c[ot], - $i = wa.high, - ka = wa.low, - Ze = or + Yi, - At = Zr + Xi + (Ze >>> 0 < or >>> 0 ? 1 : 0), - Ze = Ze + Fa, - At = At + zi + (Ze >>> 0 < Fa >>> 0 ? 1 : 0), - Ze = Ze + ka, - At = At + $i + (Ze >>> 0 < ka >>> 0 ? 1 : 0), - Ze = Ze + tt, - At = At + Bt + (Ze >>> 0 < tt >>> 0 ? 1 : 0), - La = Ra + Qi, - ji = Wi + Gi + (La >>> 0 < Ra >>> 0 ? 1 : 0); - Zr = mr, or = sr, mr = Le, sr = ir, Le = Se, ir = Be, Be = we + Ze | 0, Se = Ue + At + (Be >>> 0 < we >>> 0 ? 1 : 0) | 0, Ue = Re, we = Fe, Re = me, Fe = ee, me = oe, ee = ie, ie = Ze + La | 0, oe = At + ji + (ie >>> 0 < Ze >>> 0 ? 1 : 0) | 0 - } - D = B.low = D + ie, B.high = K + oe + (D >>> 0 < ie >>> 0 ? 1 : 0), U = E.low = U + ee, E.high = F + me + (U >>> 0 < ee >>> 0 ? 1 : 0), Z = m.low = Z + Fe, m.high = P + Re + (Z >>> 0 < Fe >>> 0 ? 1 : 0), J = A.low = J + we, A.high = W + Ue + (J >>> 0 < we >>> 0 ? 1 : 0), ce = T.low = ce + Be, T.high = Q + Se + (ce >>> 0 < Be >>> 0 ? 1 : 0), ne = S.low = ne + ir, S.high = ge + Le + (ne >>> 0 < ir >>> 0 ? 1 : 0), O = N.low = O + sr, N.high = k + mr + (O >>> 0 < sr >>> 0 ? 1 : 0), V = w.low = V + or, w.high = H + Zr + (V >>> 0 < or >>> 0 ? 1 : 0) - }, - _doFinalize: function () { - var d = this._data, - g = d.words, - v = this._nDataBytes * 8, - B = d.sigBytes * 8; - g[B >>> 5] |= 128 << 24 - B % 32, g[(B + 128 >>> 10 << 5) + 30] = Math.floor(v / 4294967296), g[(B + 128 >>> 10 << 5) + 31] = v, d.sigBytes = g.length * 4, this._process(); - var E = this._hash.toX32(); - return E - }, - clone: function () { - var d = i.clone.call(this); - return d._hash = this._hash.clone(), d - }, - blockSize: 1024 / 32 - }); - r.SHA512 = i._createHelper(x), r.HmacSHA512 = i._createHmacHelper(x) - }(), a.SHA512 - }) - }(u0)), u0.exports -} -var l0 = { - exports: {} - }, - Wa; - -function ss() { - return Wa || (Wa = 1, function (e, t) { - (function (a, r, n) { - e.exports = r(ve(), Hr(), Xn()) - })(ue, function (a) { - return function () { - var r = a, - n = r.x64, - i = n.Word, - s = n.WordArray, - o = r.algo, - l = o.SHA512, - f = o.SHA384 = l.extend({ - _doReset: function () { - this._hash = new s.init([new i.init(3418070365, 3238371032), new i.init(1654270250, 914150663), new i.init(2438529370, 812702999), new i.init(355462360, 4144912697), new i.init(1731405415, 4290775857), new i.init(2394180231, 1750603025), new i.init(3675008525, 1694076839), new i.init(1203062813, 3204075428)]) - }, - _doFinalize: function () { - var u = l._doFinalize.call(this); - return u.sigBytes -= 16, u - } - }); - r.SHA384 = l._createHelper(f), r.HmacSHA384 = l._createHmacHelper(f) - }(), a.SHA384 - }) - }(l0)), l0.exports -} -var c0 = { - exports: {} - }, - Xa; - -function os() { - return Xa || (Xa = 1, function (e, t) { - (function (a, r, n) { - e.exports = r(ve(), Hr()) - })(ue, function (a) { - return function (r) { - var n = a, - i = n.lib, - s = i.WordArray, - o = i.Hasher, - l = n.x64, - f = l.Word, - u = n.algo, - c = [], - h = [], - x = []; - (function () { - for (var v = 1, B = 0, E = 0; E < 24; E++) { - c[v + 5 * B] = (E + 1) * (E + 2) / 2 % 64; - var m = B % 5, - A = (2 * v + 3 * B) % 5; - v = m, B = A - } - for (var v = 0; v < 5; v++) - for (var B = 0; B < 5; B++) h[v + 5 * B] = B + (2 * v + 3 * B) % 5 * 5; - for (var T = 1, S = 0; S < 24; S++) { - for (var N = 0, w = 0, K = 0; K < 7; K++) { - if (T & 1) { - var D = (1 << K) - 1; - D < 32 ? w ^= 1 << D : N ^= 1 << D - 32 - } - T & 128 ? T = T << 1 ^ 113 : T <<= 1 - } - x[S] = f.create(N, w) - } - })(); - var d = []; - (function () { - for (var v = 0; v < 25; v++) d[v] = f.create() - })(); - var g = u.SHA3 = o.extend({ - cfg: o.cfg.extend({ - outputLength: 512 - }), - _doReset: function () { - for (var v = this._state = [], B = 0; B < 25; B++) v[B] = new f.init; - this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32 - }, - _doProcessBlock: function (v, B) { - for (var E = this._state, m = this.blockSize / 2, A = 0; A < m; A++) { - var T = v[B + 2 * A], - S = v[B + 2 * A + 1]; - T = (T << 8 | T >>> 24) & 16711935 | (T << 24 | T >>> 8) & 4278255360, S = (S << 8 | S >>> 24) & 16711935 | (S << 24 | S >>> 8) & 4278255360; - var N = E[A]; - N.high ^= S, N.low ^= T - } - for (var w = 0; w < 24; w++) { - for (var K = 0; K < 5; K++) { - for (var D = 0, F = 0, U = 0; U < 5; U++) { - var N = E[K + 5 * U]; - D ^= N.high, F ^= N.low - } - var P = d[K]; - P.high = D, P.low = F - } - for (var K = 0; K < 5; K++) - for (var Z = d[(K + 4) % 5], W = d[(K + 1) % 5], J = W.high, Q = W.low, D = Z.high ^ (J << 1 | Q >>> 31), F = Z.low ^ (Q << 1 | J >>> 31), U = 0; U < 5; U++) { - var N = E[K + 5 * U]; - N.high ^= D, N.low ^= F - } - for (var ce = 1; ce < 25; ce++) { - var D, F, N = E[ce], - ge = N.high, - ne = N.low, - k = c[ce]; - k < 32 ? (D = ge << k | ne >>> 32 - k, F = ne << k | ge >>> 32 - k) : (D = ne << k - 32 | ge >>> 64 - k, F = ge << k - 32 | ne >>> 64 - k); - var O = d[h[ce]]; - O.high = D, O.low = F - } - var H = d[0], - V = E[0]; - H.high = V.high, H.low = V.low; - for (var K = 0; K < 5; K++) - for (var U = 0; U < 5; U++) { - var ce = K + 5 * U, - N = E[ce], - oe = d[ce], - ie = d[(K + 1) % 5 + 5 * U], - me = d[(K + 2) % 5 + 5 * U]; - N.high = oe.high ^ ~ie.high & me.high, N.low = oe.low ^ ~ie.low & me.low - } - var N = E[0], - ee = x[w]; - N.high ^= ee.high, N.low ^= ee.low - } - }, - _doFinalize: function () { - var v = this._data, - B = v.words; - this._nDataBytes * 8; - var E = v.sigBytes * 8, - m = this.blockSize * 32; - B[E >>> 5] |= 1 << 24 - E % 32, B[(r.ceil((E + 1) / m) * m >>> 5) - 1] |= 128, v.sigBytes = B.length * 4, this._process(); - for (var A = this._state, T = this.cfg.outputLength / 8, S = T / 8, N = [], w = 0; w < S; w++) { - var K = A[w], - D = K.high, - F = K.low; - D = (D << 8 | D >>> 24) & 16711935 | (D << 24 | D >>> 8) & 4278255360, F = (F << 8 | F >>> 24) & 16711935 | (F << 24 | F >>> 8) & 4278255360, N.push(F), N.push(D) - } - return new s.init(N, T) - }, - clone: function () { - for (var v = o.clone.call(this), B = v._state = this._state.slice(0), E = 0; E < 25; E++) B[E] = B[E].clone(); - return v - } - }); - n.SHA3 = o._createHelper(g), n.HmacSHA3 = o._createHmacHelper(g) - }(Math), a.SHA3 - }) - }(c0)), c0.exports -} -var h0 = { - exports: {} - }, - Ya; - -function fs() { - return Ya || (Ya = 1, function (e, t) { - (function (a, r) { - e.exports = r(ve()) - })(ue, function (a) { - /** @preserve - (c) 2012 by Cédric Mesnil. All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - return function (r) { - var n = a, - i = n.lib, - s = i.WordArray, - o = i.Hasher, - l = n.algo, - f = s.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]), - u = s.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]), - c = s.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]), - h = s.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]), - x = s.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), - d = s.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), - g = l.RIPEMD160 = o.extend({ - _doReset: function () { - this._hash = s.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) - }, - _doProcessBlock: function (S, N) { - for (var w = 0; w < 16; w++) { - var K = N + w, - D = S[K]; - S[K] = (D << 8 | D >>> 24) & 16711935 | (D << 24 | D >>> 8) & 4278255360 - } - var F = this._hash.words, - U = x.words, - P = d.words, - Z = f.words, - W = u.words, - J = c.words, - Q = h.words, - ce, ge, ne, k, O, H, V, oe, ie, me; - H = ce = F[0], V = ge = F[1], oe = ne = F[2], ie = k = F[3], me = O = F[4]; - for (var ee, w = 0; w < 80; w += 1) ee = ce + S[N + Z[w]] | 0, w < 16 ? ee += v(ge, ne, k) + U[0] : w < 32 ? ee += B(ge, ne, k) + U[1] : w < 48 ? ee += E(ge, ne, k) + U[2] : w < 64 ? ee += m(ge, ne, k) + U[3] : ee += A(ge, ne, k) + U[4], ee = ee | 0, ee = T(ee, J[w]), ee = ee + O | 0, ce = O, O = k, k = T(ne, 10), ne = ge, ge = ee, ee = H + S[N + W[w]] | 0, w < 16 ? ee += A(V, oe, ie) + P[0] : w < 32 ? ee += m(V, oe, ie) + P[1] : w < 48 ? ee += E(V, oe, ie) + P[2] : w < 64 ? ee += B(V, oe, ie) + P[3] : ee += v(V, oe, ie) + P[4], ee = ee | 0, ee = T(ee, Q[w]), ee = ee + me | 0, H = me, me = ie, ie = T(oe, 10), oe = V, V = ee; - ee = F[1] + ne + ie | 0, F[1] = F[2] + k + me | 0, F[2] = F[3] + O + H | 0, F[3] = F[4] + ce + V | 0, F[4] = F[0] + ge + oe | 0, F[0] = ee - }, - _doFinalize: function () { - var S = this._data, - N = S.words, - w = this._nDataBytes * 8, - K = S.sigBytes * 8; - N[K >>> 5] |= 128 << 24 - K % 32, N[(K + 64 >>> 9 << 4) + 14] = (w << 8 | w >>> 24) & 16711935 | (w << 24 | w >>> 8) & 4278255360, S.sigBytes = (N.length + 1) * 4, this._process(); - for (var D = this._hash, F = D.words, U = 0; U < 5; U++) { - var P = F[U]; - F[U] = (P << 8 | P >>> 24) & 16711935 | (P << 24 | P >>> 8) & 4278255360 - } - return D - }, - clone: function () { - var S = o.clone.call(this); - return S._hash = this._hash.clone(), S - } - }); - - function v(S, N, w) { - return S ^ N ^ w - } - - function B(S, N, w) { - return S & N | ~S & w - } - - function E(S, N, w) { - return (S | ~N) ^ w - } - - function m(S, N, w) { - return S & w | N & ~w - } - - function A(S, N, w) { - return S ^ (N | ~w) - } - - function T(S, N) { - return S << N | S >>> 32 - N - } - n.RIPEMD160 = o._createHelper(g), n.HmacRIPEMD160 = o._createHmacHelper(g) - }(), a.RIPEMD160 - }) - }(h0)), h0.exports -} -var d0 = { - exports: {} - }, - $a; - -function ia() { - return $a || ($a = 1, function (e, t) { - (function (a, r) { - e.exports = r(ve()) - })(ue, function (a) { - (function () { - var r = a, - n = r.lib, - i = n.Base, - s = r.enc, - o = s.Utf8, - l = r.algo; - l.HMAC = i.extend({ - init: function (f, u) { - f = this._hasher = new f.init, typeof u == "string" && (u = o.parse(u)); - var c = f.blockSize, - h = c * 4; - u.sigBytes > h && (u = f.finalize(u)), u.clamp(); - for (var x = this._oKey = u.clone(), d = this._iKey = u.clone(), g = x.words, v = d.words, B = 0; B < c; B++) g[B] ^= 1549556828, v[B] ^= 909522486; - x.sigBytes = d.sigBytes = h, this.reset() - }, - reset: function () { - var f = this._hasher; - f.reset(), f.update(this._iKey) - }, - update: function (f) { - return this._hasher.update(f), this - }, - finalize: function (f) { - var u = this._hasher, - c = u.finalize(f); - u.reset(); - var h = u.finalize(this._oKey.clone().concat(c)); - return h - } - }) - })() - }) - }(d0)), d0.exports -} -var x0 = { - exports: {} - }, - ja; - -function us() { - return ja || (ja = 1, function (e, t) { - (function (a, r, n) { - e.exports = r(ve(), na(), ia()) - })(ue, function (a) { - return function () { - var r = a, - n = r.lib, - i = n.Base, - s = n.WordArray, - o = r.algo, - l = o.SHA256, - f = o.HMAC, - u = o.PBKDF2 = i.extend({ - cfg: i.extend({ - keySize: 128 / 32, - hasher: l, - iterations: 25e4 - }), - init: function (c) { - this.cfg = this.cfg.extend(c) - }, - compute: function (c, h) { - for (var x = this.cfg, d = f.create(x.hasher, c), g = s.create(), v = s.create([1]), B = g.words, E = v.words, m = x.keySize, A = x.iterations; B.length < m;) { - var T = d.update(h).finalize(v); - d.reset(); - for (var S = T.words, N = S.length, w = T, K = 1; K < A; K++) { - w = d.finalize(w), d.reset(); - for (var D = w.words, F = 0; F < N; F++) S[F] ^= D[F] - } - g.concat(T), E[0]++ - } - return g.sigBytes = m * 4, g - } - }); - r.PBKDF2 = function (c, h, x) { - return u.create(x).compute(c, h) - } - }(), a.PBKDF2 - }) - }(x0)), x0.exports -} -var p0 = { - exports: {} - }, - Za; - -function kt() { - return Za || (Za = 1, function (e, t) { - (function (a, r, n) { - e.exports = r(ve(), Wn(), ia()) - })(ue, function (a) { - return function () { - var r = a, - n = r.lib, - i = n.Base, - s = n.WordArray, - o = r.algo, - l = o.MD5, - f = o.EvpKDF = i.extend({ - cfg: i.extend({ - keySize: 128 / 32, - hasher: l, - iterations: 1 - }), - init: function (u) { - this.cfg = this.cfg.extend(u) - }, - compute: function (u, c) { - for (var h, x = this.cfg, d = x.hasher.create(), g = s.create(), v = g.words, B = x.keySize, E = x.iterations; v.length < B;) { - h && d.update(h), h = d.update(u).finalize(c), d.reset(); - for (var m = 1; m < E; m++) h = d.finalize(h), d.reset(); - g.concat(h) - } - return g.sigBytes = B * 4, g - } - }); - r.EvpKDF = function (u, c, h) { - return f.create(h).compute(u, c) - } - }(), a.EvpKDF - }) - }(p0)), p0.exports -} -var v0 = { - exports: {} - }, - Ja; - -function Me() { - return Ja || (Ja = 1, function (e, t) { - (function (a, r, n) { - e.exports = r(ve(), kt()) - })(ue, function (a) { - a.lib.Cipher || function (r) { - var n = a, - i = n.lib, - s = i.Base, - o = i.WordArray, - l = i.BufferedBlockAlgorithm, - f = n.enc; - f.Utf8; - var u = f.Base64, - c = n.algo, - h = c.EvpKDF, - x = i.Cipher = l.extend({ - cfg: s.extend(), - createEncryptor: function (D, F) { - return this.create(this._ENC_XFORM_MODE, D, F) - }, - createDecryptor: function (D, F) { - return this.create(this._DEC_XFORM_MODE, D, F) - }, - init: function (D, F, U) { - this.cfg = this.cfg.extend(U), this._xformMode = D, this._key = F, this.reset() - }, - reset: function () { - l.reset.call(this), this._doReset() - }, - process: function (D) { - return this._append(D), this._process() - }, - finalize: function (D) { - D && this._append(D); - var F = this._doFinalize(); - return F - }, - keySize: 128 / 32, - ivSize: 128 / 32, - _ENC_XFORM_MODE: 1, - _DEC_XFORM_MODE: 2, - _createHelper: function () { - function D(F) { - return typeof F == "string" ? K : S - } - return function (F) { - return { - encrypt: function (U, P, Z) { - return D(P).encrypt(F, U, P, Z) - }, - decrypt: function (U, P, Z) { - return D(P).decrypt(F, U, P, Z) - } - } - } - }() - }); - i.StreamCipher = x.extend({ - _doFinalize: function () { - var D = this._process(!0); - return D - }, - blockSize: 1 - }); - var d = n.mode = {}, - g = i.BlockCipherMode = s.extend({ - createEncryptor: function (D, F) { - return this.Encryptor.create(D, F) - }, - createDecryptor: function (D, F) { - return this.Decryptor.create(D, F) - }, - init: function (D, F) { - this._cipher = D, this._iv = F - } - }), - v = d.CBC = function () { - var D = g.extend(); - D.Encryptor = D.extend({ - processBlock: function (U, P) { - var Z = this._cipher, - W = Z.blockSize; - F.call(this, U, P, W), Z.encryptBlock(U, P), this._prevBlock = U.slice(P, P + W) - } - }), D.Decryptor = D.extend({ - processBlock: function (U, P) { - var Z = this._cipher, - W = Z.blockSize, - J = U.slice(P, P + W); - Z.decryptBlock(U, P), F.call(this, U, P, W), this._prevBlock = J - } - }); - - function F(U, P, Z) { - var W, J = this._iv; - J ? (W = J, this._iv = r) : W = this._prevBlock; - for (var Q = 0; Q < Z; Q++) U[P + Q] ^= W[Q] - } - return D - }(), - B = n.pad = {}, - E = B.Pkcs7 = { - pad: function (D, F) { - for (var U = F * 4, P = U - D.sigBytes % U, Z = P << 24 | P << 16 | P << 8 | P, W = [], J = 0; J < P; J += 4) W.push(Z); - var Q = o.create(W, P); - D.concat(Q) - }, - unpad: function (D) { - var F = D.words[D.sigBytes - 1 >>> 2] & 255; - D.sigBytes -= F - } - }; - i.BlockCipher = x.extend({ - cfg: x.cfg.extend({ - mode: v, - padding: E - }), - reset: function () { - var D; - x.reset.call(this); - var F = this.cfg, - U = F.iv, - P = F.mode; - this._xformMode == this._ENC_XFORM_MODE ? D = P.createEncryptor : (D = P.createDecryptor, this._minBufferSize = 1), this._mode && this._mode.__creator == D ? this._mode.init(this, U && U.words) : (this._mode = D.call(P, this, U && U.words), this._mode.__creator = D) - }, - _doProcessBlock: function (D, F) { - this._mode.processBlock(D, F) - }, - _doFinalize: function () { - var D, F = this.cfg.padding; - return this._xformMode == this._ENC_XFORM_MODE ? (F.pad(this._data, this.blockSize), D = this._process(!0)) : (D = this._process(!0), F.unpad(D)), D - }, - blockSize: 128 / 32 - }); - var m = i.CipherParams = s.extend({ - init: function (D) { - this.mixIn(D) - }, - toString: function (D) { - return (D || this.formatter).stringify(this) - } - }), - A = n.format = {}, - T = A.OpenSSL = { - stringify: function (D) { - var F, U = D.ciphertext, - P = D.salt; - return P ? F = o.create([1398893684, 1701076831]).concat(P).concat(U) : F = U, F.toString(u) - }, - parse: function (D) { - var F, U = u.parse(D), - P = U.words; - return P[0] == 1398893684 && P[1] == 1701076831 && (F = o.create(P.slice(2, 4)), P.splice(0, 4), U.sigBytes -= 16), m.create({ - ciphertext: U, - salt: F - }) - } - }, - S = i.SerializableCipher = s.extend({ - cfg: s.extend({ - format: T - }), - encrypt: function (D, F, U, P) { - P = this.cfg.extend(P); - var Z = D.createEncryptor(U, P), - W = Z.finalize(F), - J = Z.cfg; - return m.create({ - ciphertext: W, - key: U, - iv: J.iv, - algorithm: D, - mode: J.mode, - padding: J.padding, - blockSize: D.blockSize, - formatter: P.format - }) - }, - decrypt: function (D, F, U, P) { - P = this.cfg.extend(P), F = this._parse(F, P.format); - var Z = D.createDecryptor(U, P).finalize(F.ciphertext); - return Z - }, - _parse: function (D, F) { - return typeof D == "string" ? F.parse(D, this) : D - } - }), - N = n.kdf = {}, - w = N.OpenSSL = { - execute: function (D, F, U, P, Z) { - if (P || (P = o.random(64 / 8)), Z) var W = h.create({ - keySize: F + U, - hasher: Z - }).compute(D, P); - else var W = h.create({ - keySize: F + U - }).compute(D, P); - var J = o.create(W.words.slice(F), U * 4); - return W.sigBytes = F * 4, m.create({ - key: W, - iv: J, - salt: P - }) - } - }, - K = i.PasswordBasedCipher = S.extend({ - cfg: S.cfg.extend({ - kdf: w - }), - encrypt: function (D, F, U, P) { - P = this.cfg.extend(P); - var Z = P.kdf.execute(U, D.keySize, D.ivSize, P.salt, P.hasher); - P.iv = Z.iv; - var W = S.encrypt.call(this, D, F, Z.key, P); - return W.mixIn(Z), W - }, - decrypt: function (D, F, U, P) { - P = this.cfg.extend(P), F = this._parse(F, P.format); - var Z = P.kdf.execute(U, D.keySize, D.ivSize, F.salt, P.hasher); - P.iv = Z.iv; - var W = S.decrypt.call(this, D, F, Z.key, P); - return W - } - }) - }() - }) - }(v0)), v0.exports -} -var y0 = { - exports: {} - }, - en; - -function ls() { - return en || (en = 1, function (e, t) { - (function (a, r, n) { - e.exports = r(ve(), Me()) - })(ue, function (a) { - return a.mode.CFB = function () { - var r = a.lib.BlockCipherMode.extend(); - r.Encryptor = r.extend({ - processBlock: function (i, s) { - var o = this._cipher, - l = o.blockSize; - n.call(this, i, s, l, o), this._prevBlock = i.slice(s, s + l) - } - }), r.Decryptor = r.extend({ - processBlock: function (i, s) { - var o = this._cipher, - l = o.blockSize, - f = i.slice(s, s + l); - n.call(this, i, s, l, o), this._prevBlock = f - } - }); - - function n(i, s, o, l) { - var f, u = this._iv; - u ? (f = u.slice(0), this._iv = void 0) : f = this._prevBlock, l.encryptBlock(f, 0); - for (var c = 0; c < o; c++) i[s + c] ^= f[c] - } - return r - }(), a.mode.CFB - }) - }(y0)), y0.exports -} -var g0 = { - exports: {} - }, - tn; - -function cs() { - return tn || (tn = 1, function (e, t) { - (function (a, r, n) { - e.exports = r(ve(), Me()) - })(ue, function (a) { - return a.mode.CTR = function () { - var r = a.lib.BlockCipherMode.extend(), - n = r.Encryptor = r.extend({ - processBlock: function (i, s) { - var o = this._cipher, - l = o.blockSize, - f = this._iv, - u = this._counter; - f && (u = this._counter = f.slice(0), this._iv = void 0); - var c = u.slice(0); - o.encryptBlock(c, 0), u[l - 1] = u[l - 1] + 1 | 0; - for (var h = 0; h < l; h++) i[s + h] ^= c[h] - } - }); - return r.Decryptor = n, r - }(), a.mode.CTR - }) - }(g0)), g0.exports -} -var C0 = { - exports: {} - }, - rn; - -function hs() { - return rn || (rn = 1, function (e, t) { - (function (a, r, n) { - e.exports = r(ve(), Me()) - })(ue, function (a) { - /** @preserve - * Counter block mode compatible with Dr Brian Gladman fileenc.c - * derived from CryptoJS.mode.CTR - * Jan Hruby jhruby.web@gmail.com - */ - return a.mode.CTRGladman = function () { - var r = a.lib.BlockCipherMode.extend(); - - function n(o) { - if ((o >> 24 & 255) === 255) { - var l = o >> 16 & 255, - f = o >> 8 & 255, - u = o & 255; - l === 255 ? (l = 0, f === 255 ? (f = 0, u === 255 ? u = 0 : ++u) : ++f) : ++l, o = 0, o += l << 16, o += f << 8, o += u - } else o += 1 << 24; - return o - } - - function i(o) { - return (o[0] = n(o[0])) === 0 && (o[1] = n(o[1])), o - } - var s = r.Encryptor = r.extend({ - processBlock: function (o, l) { - var f = this._cipher, - u = f.blockSize, - c = this._iv, - h = this._counter; - c && (h = this._counter = c.slice(0), this._iv = void 0), i(h); - var x = h.slice(0); - f.encryptBlock(x, 0); - for (var d = 0; d < u; d++) o[l + d] ^= x[d] - } - }); - return r.Decryptor = s, r - }(), a.mode.CTRGladman - }) - }(C0)), C0.exports -} -var E0 = { - exports: {} - }, - an; - -function ds() { - return an || (an = 1, function (e, t) { - (function (a, r, n) { - e.exports = r(ve(), Me()) - })(ue, function (a) { - return a.mode.OFB = function () { - var r = a.lib.BlockCipherMode.extend(), - n = r.Encryptor = r.extend({ - processBlock: function (i, s) { - var o = this._cipher, - l = o.blockSize, - f = this._iv, - u = this._keystream; - f && (u = this._keystream = f.slice(0), this._iv = void 0), o.encryptBlock(u, 0); - for (var c = 0; c < l; c++) i[s + c] ^= u[c] - } - }); - return r.Decryptor = n, r - }(), a.mode.OFB - }) - }(E0)), E0.exports -} -var m0 = { - exports: {} - }, - nn; - -function xs() { - return nn || (nn = 1, function (e, t) { - (function (a, r, n) { - e.exports = r(ve(), Me()) - })(ue, function (a) { - return a.mode.ECB = function () { - var r = a.lib.BlockCipherMode.extend(); - return r.Encryptor = r.extend({ - processBlock: function (n, i) { - this._cipher.encryptBlock(n, i) - } - }), r.Decryptor = r.extend({ - processBlock: function (n, i) { - this._cipher.decryptBlock(n, i) - } - }), r - }(), a.mode.ECB - }) - }(m0)), m0.exports -} -var B0 = { - exports: {} - }, - sn; - -function ps() { - return sn || (sn = 1, function (e, t) { - (function (a, r, n) { - e.exports = r(ve(), Me()) - })(ue, function (a) { - return a.pad.AnsiX923 = { - pad: function (r, n) { - var i = r.sigBytes, - s = n * 4, - o = s - i % s, - l = i + o - 1; - r.clamp(), r.words[l >>> 2] |= o << 24 - l % 4 * 8, r.sigBytes += o - }, - unpad: function (r) { - var n = r.words[r.sigBytes - 1 >>> 2] & 255; - r.sigBytes -= n - } - }, a.pad.Ansix923 - }) - }(B0)), B0.exports -} -var A0 = { - exports: {} - }, - on; - -function vs() { - return on || (on = 1, function (e, t) { - (function (a, r, n) { - e.exports = r(ve(), Me()) - })(ue, function (a) { - return a.pad.Iso10126 = { - pad: function (r, n) { - var i = n * 4, - s = i - r.sigBytes % i; - r.concat(a.lib.WordArray.random(s - 1)).concat(a.lib.WordArray.create([s << 24], 1)) - }, - unpad: function (r) { - var n = r.words[r.sigBytes - 1 >>> 2] & 255; - r.sigBytes -= n - } - }, a.pad.Iso10126 - }) - }(A0)), A0.exports -} -var S0 = { - exports: {} - }, - fn; - -function ys() { - return fn || (fn = 1, function (e, t) { - (function (a, r, n) { - e.exports = r(ve(), Me()) - })(ue, function (a) { - return a.pad.Iso97971 = { - pad: function (r, n) { - r.concat(a.lib.WordArray.create([2147483648], 1)), a.pad.ZeroPadding.pad(r, n) - }, - unpad: function (r) { - a.pad.ZeroPadding.unpad(r), r.sigBytes-- - } - }, a.pad.Iso97971 - }) - }(S0)), S0.exports -} -var T0 = { - exports: {} - }, - un; - -function gs() { - return un || (un = 1, function (e, t) { - (function (a, r, n) { - e.exports = r(ve(), Me()) - })(ue, function (a) { - return a.pad.ZeroPadding = { - pad: function (r, n) { - var i = n * 4; - r.clamp(), r.sigBytes += i - (r.sigBytes % i || i) - }, - unpad: function (r) { - for (var n = r.words, i = r.sigBytes - 1, i = r.sigBytes - 1; i >= 0; i--) - if (n[i >>> 2] >>> 24 - i % 4 * 8 & 255) { - r.sigBytes = i + 1; - break - } - } - }, a.pad.ZeroPadding - }) - }(T0)), T0.exports -} -var b0 = { - exports: {} - }, - ln; - -function Cs() { - return ln || (ln = 1, function (e, t) { - (function (a, r, n) { - e.exports = r(ve(), Me()) - })(ue, function (a) { - return a.pad.NoPadding = { - pad: function () {}, - unpad: function () {} - }, a.pad.NoPadding - }) - }(b0)), b0.exports -} -var I0 = { - exports: {} - }, - cn; - -function Es() { - return cn || (cn = 1, function (e, t) { - (function (a, r, n) { - e.exports = r(ve(), Me()) - })(ue, function (a) { - return function (r) { - var n = a, - i = n.lib, - s = i.CipherParams, - o = n.enc, - l = o.Hex, - f = n.format; - f.Hex = { - stringify: function (u) { - return u.ciphertext.toString(l) - }, - parse: function (u) { - var c = l.parse(u); - return s.create({ - ciphertext: c - }) - } - } - }(), a.format.Hex - }) - }(I0)), I0.exports -} -var _0 = { - exports: {} - }, - hn; - -function ms() { - return hn || (hn = 1, function (e, t) { - (function (a, r, n) { - e.exports = r(ve(), Ht(), Mt(), kt(), Me()) - })(ue, function (a) { - return function () { - var r = a, - n = r.lib, - i = n.BlockCipher, - s = r.algo, - o = [], - l = [], - f = [], - u = [], - c = [], - h = [], - x = [], - d = [], - g = [], - v = []; - (function () { - for (var m = [], A = 0; A < 256; A++) A < 128 ? m[A] = A << 1 : m[A] = A << 1 ^ 283; - for (var T = 0, S = 0, A = 0; A < 256; A++) { - var N = S ^ S << 1 ^ S << 2 ^ S << 3 ^ S << 4; - N = N >>> 8 ^ N & 255 ^ 99, o[T] = N, l[N] = T; - var w = m[T], - K = m[w], - D = m[K], - F = m[N] * 257 ^ N * 16843008; - f[T] = F << 24 | F >>> 8, u[T] = F << 16 | F >>> 16, c[T] = F << 8 | F >>> 24, h[T] = F; - var F = D * 16843009 ^ K * 65537 ^ w * 257 ^ T * 16843008; - x[N] = F << 24 | F >>> 8, d[N] = F << 16 | F >>> 16, g[N] = F << 8 | F >>> 24, v[N] = F, T ? (T = w ^ m[m[m[D ^ w]]], S ^= m[m[S]]) : T = S = 1 - } - })(); - var B = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], - E = s.AES = i.extend({ - _doReset: function () { - var m; - if (!(this._nRounds && this._keyPriorReset === this._key)) { - for (var A = this._keyPriorReset = this._key, T = A.words, S = A.sigBytes / 4, N = this._nRounds = S + 6, w = (N + 1) * 4, K = this._keySchedule = [], D = 0; D < w; D++) D < S ? K[D] = T[D] : (m = K[D - 1], D % S ? S > 6 && D % S == 4 && (m = o[m >>> 24] << 24 | o[m >>> 16 & 255] << 16 | o[m >>> 8 & 255] << 8 | o[m & 255]) : (m = m << 8 | m >>> 24, m = o[m >>> 24] << 24 | o[m >>> 16 & 255] << 16 | o[m >>> 8 & 255] << 8 | o[m & 255], m ^= B[D / S | 0] << 24), K[D] = K[D - S] ^ m); - for (var F = this._invKeySchedule = [], U = 0; U < w; U++) { - var D = w - U; - if (U % 4) var m = K[D]; - else var m = K[D - 4]; - U < 4 || D <= 4 ? F[U] = m : F[U] = x[o[m >>> 24]] ^ d[o[m >>> 16 & 255]] ^ g[o[m >>> 8 & 255]] ^ v[o[m & 255]] - } - } - }, - encryptBlock: function (m, A) { - this._doCryptBlock(m, A, this._keySchedule, f, u, c, h, o) - }, - decryptBlock: function (m, A) { - var T = m[A + 1]; - m[A + 1] = m[A + 3], m[A + 3] = T, this._doCryptBlock(m, A, this._invKeySchedule, x, d, g, v, l); - var T = m[A + 1]; - m[A + 1] = m[A + 3], m[A + 3] = T - }, - _doCryptBlock: function (m, A, T, S, N, w, K, D) { - for (var F = this._nRounds, U = m[A] ^ T[0], P = m[A + 1] ^ T[1], Z = m[A + 2] ^ T[2], W = m[A + 3] ^ T[3], J = 4, Q = 1; Q < F; Q++) { - var ce = S[U >>> 24] ^ N[P >>> 16 & 255] ^ w[Z >>> 8 & 255] ^ K[W & 255] ^ T[J++], - ge = S[P >>> 24] ^ N[Z >>> 16 & 255] ^ w[W >>> 8 & 255] ^ K[U & 255] ^ T[J++], - ne = S[Z >>> 24] ^ N[W >>> 16 & 255] ^ w[U >>> 8 & 255] ^ K[P & 255] ^ T[J++], - k = S[W >>> 24] ^ N[U >>> 16 & 255] ^ w[P >>> 8 & 255] ^ K[Z & 255] ^ T[J++]; - U = ce, P = ge, Z = ne, W = k - } - var ce = (D[U >>> 24] << 24 | D[P >>> 16 & 255] << 16 | D[Z >>> 8 & 255] << 8 | D[W & 255]) ^ T[J++], - ge = (D[P >>> 24] << 24 | D[Z >>> 16 & 255] << 16 | D[W >>> 8 & 255] << 8 | D[U & 255]) ^ T[J++], - ne = (D[Z >>> 24] << 24 | D[W >>> 16 & 255] << 16 | D[U >>> 8 & 255] << 8 | D[P & 255]) ^ T[J++], - k = (D[W >>> 24] << 24 | D[U >>> 16 & 255] << 16 | D[P >>> 8 & 255] << 8 | D[Z & 255]) ^ T[J++]; - m[A] = ce, m[A + 1] = ge, m[A + 2] = ne, m[A + 3] = k - }, - keySize: 256 / 32 - }); - r.AES = i._createHelper(E) - }(), a.AES - }) - }(_0)), _0.exports -} -var D0 = { - exports: {} - }, - dn; - -function Bs() { - return dn || (dn = 1, function (e, t) { - (function (a, r, n) { - e.exports = r(ve(), Ht(), Mt(), kt(), Me()) - })(ue, function (a) { - return function () { - var r = a, - n = r.lib, - i = n.WordArray, - s = n.BlockCipher, - o = r.algo, - l = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4], - f = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32], - u = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], - c = [{ - 0: 8421888, - 268435456: 32768, - 536870912: 8421378, - 805306368: 2, - 1073741824: 512, - 1342177280: 8421890, - 1610612736: 8389122, - 1879048192: 8388608, - 2147483648: 514, - 2415919104: 8389120, - 2684354560: 33280, - 2952790016: 8421376, - 3221225472: 32770, - 3489660928: 8388610, - 3758096384: 0, - 4026531840: 33282, - 134217728: 0, - 402653184: 8421890, - 671088640: 33282, - 939524096: 32768, - 1207959552: 8421888, - 1476395008: 512, - 1744830464: 8421378, - 2013265920: 2, - 2281701376: 8389120, - 2550136832: 33280, - 2818572288: 8421376, - 3087007744: 8389122, - 3355443200: 8388610, - 3623878656: 32770, - 3892314112: 514, - 4160749568: 8388608, - 1: 32768, - 268435457: 2, - 536870913: 8421888, - 805306369: 8388608, - 1073741825: 8421378, - 1342177281: 33280, - 1610612737: 512, - 1879048193: 8389122, - 2147483649: 8421890, - 2415919105: 8421376, - 2684354561: 8388610, - 2952790017: 33282, - 3221225473: 514, - 3489660929: 8389120, - 3758096385: 32770, - 4026531841: 0, - 134217729: 8421890, - 402653185: 8421376, - 671088641: 8388608, - 939524097: 512, - 1207959553: 32768, - 1476395009: 8388610, - 1744830465: 2, - 2013265921: 33282, - 2281701377: 32770, - 2550136833: 8389122, - 2818572289: 514, - 3087007745: 8421888, - 3355443201: 8389120, - 3623878657: 0, - 3892314113: 33280, - 4160749569: 8421378 - }, { - 0: 1074282512, - 16777216: 16384, - 33554432: 524288, - 50331648: 1074266128, - 67108864: 1073741840, - 83886080: 1074282496, - 100663296: 1073758208, - 117440512: 16, - 134217728: 540672, - 150994944: 1073758224, - 167772160: 1073741824, - 184549376: 540688, - 201326592: 524304, - 218103808: 0, - 234881024: 16400, - 251658240: 1074266112, - 8388608: 1073758208, - 25165824: 540688, - 41943040: 16, - 58720256: 1073758224, - 75497472: 1074282512, - 92274688: 1073741824, - 109051904: 524288, - 125829120: 1074266128, - 142606336: 524304, - 159383552: 0, - 176160768: 16384, - 192937984: 1074266112, - 209715200: 1073741840, - 226492416: 540672, - 243269632: 1074282496, - 260046848: 16400, - 268435456: 0, - 285212672: 1074266128, - 301989888: 1073758224, - 318767104: 1074282496, - 335544320: 1074266112, - 352321536: 16, - 369098752: 540688, - 385875968: 16384, - 402653184: 16400, - 419430400: 524288, - 436207616: 524304, - 452984832: 1073741840, - 469762048: 540672, - 486539264: 1073758208, - 503316480: 1073741824, - 520093696: 1074282512, - 276824064: 540688, - 293601280: 524288, - 310378496: 1074266112, - 327155712: 16384, - 343932928: 1073758208, - 360710144: 1074282512, - 377487360: 16, - 394264576: 1073741824, - 411041792: 1074282496, - 427819008: 1073741840, - 444596224: 1073758224, - 461373440: 524304, - 478150656: 0, - 494927872: 16400, - 511705088: 1074266128, - 528482304: 540672 - }, { - 0: 260, - 1048576: 0, - 2097152: 67109120, - 3145728: 65796, - 4194304: 65540, - 5242880: 67108868, - 6291456: 67174660, - 7340032: 67174400, - 8388608: 67108864, - 9437184: 67174656, - 10485760: 65792, - 11534336: 67174404, - 12582912: 67109124, - 13631488: 65536, - 14680064: 4, - 15728640: 256, - 524288: 67174656, - 1572864: 67174404, - 2621440: 0, - 3670016: 67109120, - 4718592: 67108868, - 5767168: 65536, - 6815744: 65540, - 7864320: 260, - 8912896: 4, - 9961472: 256, - 11010048: 67174400, - 12058624: 65796, - 13107200: 65792, - 14155776: 67109124, - 15204352: 67174660, - 16252928: 67108864, - 16777216: 67174656, - 17825792: 65540, - 18874368: 65536, - 19922944: 67109120, - 20971520: 256, - 22020096: 67174660, - 23068672: 67108868, - 24117248: 0, - 25165824: 67109124, - 26214400: 67108864, - 27262976: 4, - 28311552: 65792, - 29360128: 67174400, - 30408704: 260, - 31457280: 65796, - 32505856: 67174404, - 17301504: 67108864, - 18350080: 260, - 19398656: 67174656, - 20447232: 0, - 21495808: 65540, - 22544384: 67109120, - 23592960: 256, - 24641536: 67174404, - 25690112: 65536, - 26738688: 67174660, - 27787264: 65796, - 28835840: 67108868, - 29884416: 67109124, - 30932992: 67174400, - 31981568: 4, - 33030144: 65792 - }, { - 0: 2151682048, - 65536: 2147487808, - 131072: 4198464, - 196608: 2151677952, - 262144: 0, - 327680: 4198400, - 393216: 2147483712, - 458752: 4194368, - 524288: 2147483648, - 589824: 4194304, - 655360: 64, - 720896: 2147487744, - 786432: 2151678016, - 851968: 4160, - 917504: 4096, - 983040: 2151682112, - 32768: 2147487808, - 98304: 64, - 163840: 2151678016, - 229376: 2147487744, - 294912: 4198400, - 360448: 2151682112, - 425984: 0, - 491520: 2151677952, - 557056: 4096, - 622592: 2151682048, - 688128: 4194304, - 753664: 4160, - 819200: 2147483648, - 884736: 4194368, - 950272: 4198464, - 1015808: 2147483712, - 1048576: 4194368, - 1114112: 4198400, - 1179648: 2147483712, - 1245184: 0, - 1310720: 4160, - 1376256: 2151678016, - 1441792: 2151682048, - 1507328: 2147487808, - 1572864: 2151682112, - 1638400: 2147483648, - 1703936: 2151677952, - 1769472: 4198464, - 1835008: 2147487744, - 1900544: 4194304, - 1966080: 64, - 2031616: 4096, - 1081344: 2151677952, - 1146880: 2151682112, - 1212416: 0, - 1277952: 4198400, - 1343488: 4194368, - 1409024: 2147483648, - 1474560: 2147487808, - 1540096: 64, - 1605632: 2147483712, - 1671168: 4096, - 1736704: 2147487744, - 1802240: 2151678016, - 1867776: 4160, - 1933312: 2151682048, - 1998848: 4194304, - 2064384: 4198464 - }, { - 0: 128, - 4096: 17039360, - 8192: 262144, - 12288: 536870912, - 16384: 537133184, - 20480: 16777344, - 24576: 553648256, - 28672: 262272, - 32768: 16777216, - 36864: 537133056, - 40960: 536871040, - 45056: 553910400, - 49152: 553910272, - 53248: 0, - 57344: 17039488, - 61440: 553648128, - 2048: 17039488, - 6144: 553648256, - 10240: 128, - 14336: 17039360, - 18432: 262144, - 22528: 537133184, - 26624: 553910272, - 30720: 536870912, - 34816: 537133056, - 38912: 0, - 43008: 553910400, - 47104: 16777344, - 51200: 536871040, - 55296: 553648128, - 59392: 16777216, - 63488: 262272, - 65536: 262144, - 69632: 128, - 73728: 536870912, - 77824: 553648256, - 81920: 16777344, - 86016: 553910272, - 90112: 537133184, - 94208: 16777216, - 98304: 553910400, - 102400: 553648128, - 106496: 17039360, - 110592: 537133056, - 114688: 262272, - 118784: 536871040, - 122880: 0, - 126976: 17039488, - 67584: 553648256, - 71680: 16777216, - 75776: 17039360, - 79872: 537133184, - 83968: 536870912, - 88064: 17039488, - 92160: 128, - 96256: 553910272, - 100352: 262272, - 104448: 553910400, - 108544: 0, - 112640: 553648128, - 116736: 16777344, - 120832: 262144, - 124928: 537133056, - 129024: 536871040 - }, { - 0: 268435464, - 256: 8192, - 512: 270532608, - 768: 270540808, - 1024: 268443648, - 1280: 2097152, - 1536: 2097160, - 1792: 268435456, - 2048: 0, - 2304: 268443656, - 2560: 2105344, - 2816: 8, - 3072: 270532616, - 3328: 2105352, - 3584: 8200, - 3840: 270540800, - 128: 270532608, - 384: 270540808, - 640: 8, - 896: 2097152, - 1152: 2105352, - 1408: 268435464, - 1664: 268443648, - 1920: 8200, - 2176: 2097160, - 2432: 8192, - 2688: 268443656, - 2944: 270532616, - 3200: 0, - 3456: 270540800, - 3712: 2105344, - 3968: 268435456, - 4096: 268443648, - 4352: 270532616, - 4608: 270540808, - 4864: 8200, - 5120: 2097152, - 5376: 268435456, - 5632: 268435464, - 5888: 2105344, - 6144: 2105352, - 6400: 0, - 6656: 8, - 6912: 270532608, - 7168: 8192, - 7424: 268443656, - 7680: 270540800, - 7936: 2097160, - 4224: 8, - 4480: 2105344, - 4736: 2097152, - 4992: 268435464, - 5248: 268443648, - 5504: 8200, - 5760: 270540808, - 6016: 270532608, - 6272: 270540800, - 6528: 270532616, - 6784: 8192, - 7040: 2105352, - 7296: 2097160, - 7552: 0, - 7808: 268435456, - 8064: 268443656 - }, { - 0: 1048576, - 16: 33555457, - 32: 1024, - 48: 1049601, - 64: 34604033, - 80: 0, - 96: 1, - 112: 34603009, - 128: 33555456, - 144: 1048577, - 160: 33554433, - 176: 34604032, - 192: 34603008, - 208: 1025, - 224: 1049600, - 240: 33554432, - 8: 34603009, - 24: 0, - 40: 33555457, - 56: 34604032, - 72: 1048576, - 88: 33554433, - 104: 33554432, - 120: 1025, - 136: 1049601, - 152: 33555456, - 168: 34603008, - 184: 1048577, - 200: 1024, - 216: 34604033, - 232: 1, - 248: 1049600, - 256: 33554432, - 272: 1048576, - 288: 33555457, - 304: 34603009, - 320: 1048577, - 336: 33555456, - 352: 34604032, - 368: 1049601, - 384: 1025, - 400: 34604033, - 416: 1049600, - 432: 1, - 448: 0, - 464: 34603008, - 480: 33554433, - 496: 1024, - 264: 1049600, - 280: 33555457, - 296: 34603009, - 312: 1, - 328: 33554432, - 344: 1048576, - 360: 1025, - 376: 34604032, - 392: 33554433, - 408: 34603008, - 424: 0, - 440: 34604033, - 456: 1049601, - 472: 1024, - 488: 33555456, - 504: 1048577 - }, { - 0: 134219808, - 1: 131072, - 2: 134217728, - 3: 32, - 4: 131104, - 5: 134350880, - 6: 134350848, - 7: 2048, - 8: 134348800, - 9: 134219776, - 10: 133120, - 11: 134348832, - 12: 2080, - 13: 0, - 14: 134217760, - 15: 133152, - 2147483648: 2048, - 2147483649: 134350880, - 2147483650: 134219808, - 2147483651: 134217728, - 2147483652: 134348800, - 2147483653: 133120, - 2147483654: 133152, - 2147483655: 32, - 2147483656: 134217760, - 2147483657: 2080, - 2147483658: 131104, - 2147483659: 134350848, - 2147483660: 0, - 2147483661: 134348832, - 2147483662: 134219776, - 2147483663: 131072, - 16: 133152, - 17: 134350848, - 18: 32, - 19: 2048, - 20: 134219776, - 21: 134217760, - 22: 134348832, - 23: 131072, - 24: 0, - 25: 131104, - 26: 134348800, - 27: 134219808, - 28: 134350880, - 29: 133120, - 30: 2080, - 31: 134217728, - 2147483664: 131072, - 2147483665: 2048, - 2147483666: 134348832, - 2147483667: 133152, - 2147483668: 32, - 2147483669: 134348800, - 2147483670: 134217728, - 2147483671: 134219808, - 2147483672: 134350880, - 2147483673: 134217760, - 2147483674: 134219776, - 2147483675: 0, - 2147483676: 133120, - 2147483677: 2080, - 2147483678: 131104, - 2147483679: 134350848 - }], - h = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679], - x = o.DES = s.extend({ - _doReset: function () { - for (var B = this._key, E = B.words, m = [], A = 0; A < 56; A++) { - var T = l[A] - 1; - m[A] = E[T >>> 5] >>> 31 - T % 32 & 1 - } - for (var S = this._subKeys = [], N = 0; N < 16; N++) { - for (var w = S[N] = [], K = u[N], A = 0; A < 24; A++) w[A / 6 | 0] |= m[(f[A] - 1 + K) % 28] << 31 - A % 6, w[4 + (A / 6 | 0)] |= m[28 + (f[A + 24] - 1 + K) % 28] << 31 - A % 6; - w[0] = w[0] << 1 | w[0] >>> 31; - for (var A = 1; A < 7; A++) w[A] = w[A] >>> (A - 1) * 4 + 3; - w[7] = w[7] << 5 | w[7] >>> 27 - } - for (var D = this._invSubKeys = [], A = 0; A < 16; A++) D[A] = S[15 - A] - }, - encryptBlock: function (B, E) { - this._doCryptBlock(B, E, this._subKeys) - }, - decryptBlock: function (B, E) { - this._doCryptBlock(B, E, this._invSubKeys) - }, - _doCryptBlock: function (B, E, m) { - this._lBlock = B[E], this._rBlock = B[E + 1], d.call(this, 4, 252645135), d.call(this, 16, 65535), g.call(this, 2, 858993459), g.call(this, 8, 16711935), d.call(this, 1, 1431655765); - for (var A = 0; A < 16; A++) { - for (var T = m[A], S = this._lBlock, N = this._rBlock, w = 0, K = 0; K < 8; K++) w |= c[K][((N ^ T[K]) & h[K]) >>> 0]; - this._lBlock = N, this._rBlock = S ^ w - } - var D = this._lBlock; - this._lBlock = this._rBlock, this._rBlock = D, d.call(this, 1, 1431655765), g.call(this, 8, 16711935), g.call(this, 2, 858993459), d.call(this, 16, 65535), d.call(this, 4, 252645135), B[E] = this._lBlock, B[E + 1] = this._rBlock - }, - keySize: 64 / 32, - ivSize: 64 / 32, - blockSize: 64 / 32 - }); - - function d(B, E) { - var m = (this._lBlock >>> B ^ this._rBlock) & E; - this._rBlock ^= m, this._lBlock ^= m << B - } - - function g(B, E) { - var m = (this._rBlock >>> B ^ this._lBlock) & E; - this._lBlock ^= m, this._rBlock ^= m << B - } - r.DES = s._createHelper(x); - var v = o.TripleDES = s.extend({ - _doReset: function () { - var B = this._key, - E = B.words; - if (E.length !== 2 && E.length !== 4 && E.length < 6) throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192."); - var m = E.slice(0, 2), - A = E.length < 4 ? E.slice(0, 2) : E.slice(2, 4), - T = E.length < 6 ? E.slice(0, 2) : E.slice(4, 6); - this._des1 = x.createEncryptor(i.create(m)), this._des2 = x.createEncryptor(i.create(A)), this._des3 = x.createEncryptor(i.create(T)) - }, - encryptBlock: function (B, E) { - this._des1.encryptBlock(B, E), this._des2.decryptBlock(B, E), this._des3.encryptBlock(B, E) - }, - decryptBlock: function (B, E) { - this._des3.decryptBlock(B, E), this._des2.encryptBlock(B, E), this._des1.decryptBlock(B, E) - }, - keySize: 192 / 32, - ivSize: 64 / 32, - blockSize: 64 / 32 - }); - r.TripleDES = s._createHelper(v) - }(), a.TripleDES - }) - }(D0)), D0.exports -} -var N0 = { - exports: {} - }, - xn; - -function As() { - return xn || (xn = 1, function (e, t) { - (function (a, r, n) { - e.exports = r(ve(), Ht(), Mt(), kt(), Me()) - })(ue, function (a) { - return function () { - var r = a, - n = r.lib, - i = n.StreamCipher, - s = r.algo, - o = s.RC4 = i.extend({ - _doReset: function () { - for (var u = this._key, c = u.words, h = u.sigBytes, x = this._S = [], d = 0; d < 256; d++) x[d] = d; - for (var d = 0, g = 0; d < 256; d++) { - var v = d % h, - B = c[v >>> 2] >>> 24 - v % 4 * 8 & 255; - g = (g + x[d] + B) % 256; - var E = x[d]; - x[d] = x[g], x[g] = E - } - this._i = this._j = 0 - }, - _doProcessBlock: function (u, c) { - u[c] ^= l.call(this) - }, - keySize: 256 / 32, - ivSize: 0 - }); - - function l() { - for (var u = this._S, c = this._i, h = this._j, x = 0, d = 0; d < 4; d++) { - c = (c + 1) % 256, h = (h + u[c]) % 256; - var g = u[c]; - u[c] = u[h], u[h] = g, x |= u[(u[c] + u[h]) % 256] << 24 - d * 8 - } - return this._i = c, this._j = h, x - } - r.RC4 = i._createHelper(o); - var f = s.RC4Drop = o.extend({ - cfg: o.cfg.extend({ - drop: 192 - }), - _doReset: function () { - o._doReset.call(this); - for (var u = this.cfg.drop; u > 0; u--) l.call(this) - } - }); - r.RC4Drop = i._createHelper(f) - }(), a.RC4 - }) - }(N0)), N0.exports -} -var F0 = { - exports: {} - }, - pn; - -function Ss() { - return pn || (pn = 1, function (e, t) { - (function (a, r, n) { - e.exports = r(ve(), Ht(), Mt(), kt(), Me()) - })(ue, function (a) { - return function () { - var r = a, - n = r.lib, - i = n.StreamCipher, - s = r.algo, - o = [], - l = [], - f = [], - u = s.Rabbit = i.extend({ - _doReset: function () { - for (var h = this._key.words, x = this.cfg.iv, d = 0; d < 4; d++) h[d] = (h[d] << 8 | h[d] >>> 24) & 16711935 | (h[d] << 24 | h[d] >>> 8) & 4278255360; - var g = this._X = [h[0], h[3] << 16 | h[2] >>> 16, h[1], h[0] << 16 | h[3] >>> 16, h[2], h[1] << 16 | h[0] >>> 16, h[3], h[2] << 16 | h[1] >>> 16], - v = this._C = [h[2] << 16 | h[2] >>> 16, h[0] & 4294901760 | h[1] & 65535, h[3] << 16 | h[3] >>> 16, h[1] & 4294901760 | h[2] & 65535, h[0] << 16 | h[0] >>> 16, h[2] & 4294901760 | h[3] & 65535, h[1] << 16 | h[1] >>> 16, h[3] & 4294901760 | h[0] & 65535]; - this._b = 0; - for (var d = 0; d < 4; d++) c.call(this); - for (var d = 0; d < 8; d++) v[d] ^= g[d + 4 & 7]; - if (x) { - var B = x.words, - E = B[0], - m = B[1], - A = (E << 8 | E >>> 24) & 16711935 | (E << 24 | E >>> 8) & 4278255360, - T = (m << 8 | m >>> 24) & 16711935 | (m << 24 | m >>> 8) & 4278255360, - S = A >>> 16 | T & 4294901760, - N = T << 16 | A & 65535; - v[0] ^= A, v[1] ^= S, v[2] ^= T, v[3] ^= N, v[4] ^= A, v[5] ^= S, v[6] ^= T, v[7] ^= N; - for (var d = 0; d < 4; d++) c.call(this) - } - }, - _doProcessBlock: function (h, x) { - var d = this._X; - c.call(this), o[0] = d[0] ^ d[5] >>> 16 ^ d[3] << 16, o[1] = d[2] ^ d[7] >>> 16 ^ d[5] << 16, o[2] = d[4] ^ d[1] >>> 16 ^ d[7] << 16, o[3] = d[6] ^ d[3] >>> 16 ^ d[1] << 16; - for (var g = 0; g < 4; g++) o[g] = (o[g] << 8 | o[g] >>> 24) & 16711935 | (o[g] << 24 | o[g] >>> 8) & 4278255360, h[x + g] ^= o[g] - }, - blockSize: 128 / 32, - ivSize: 64 / 32 - }); - - function c() { - for (var h = this._X, x = this._C, d = 0; d < 8; d++) l[d] = x[d]; - x[0] = x[0] + 1295307597 + this._b | 0, x[1] = x[1] + 3545052371 + (x[0] >>> 0 < l[0] >>> 0 ? 1 : 0) | 0, x[2] = x[2] + 886263092 + (x[1] >>> 0 < l[1] >>> 0 ? 1 : 0) | 0, x[3] = x[3] + 1295307597 + (x[2] >>> 0 < l[2] >>> 0 ? 1 : 0) | 0, x[4] = x[4] + 3545052371 + (x[3] >>> 0 < l[3] >>> 0 ? 1 : 0) | 0, x[5] = x[5] + 886263092 + (x[4] >>> 0 < l[4] >>> 0 ? 1 : 0) | 0, x[6] = x[6] + 1295307597 + (x[5] >>> 0 < l[5] >>> 0 ? 1 : 0) | 0, x[7] = x[7] + 3545052371 + (x[6] >>> 0 < l[6] >>> 0 ? 1 : 0) | 0, this._b = x[7] >>> 0 < l[7] >>> 0 ? 1 : 0; - for (var d = 0; d < 8; d++) { - var g = h[d] + x[d], - v = g & 65535, - B = g >>> 16, - E = ((v * v >>> 17) + v * B >>> 15) + B * B, - m = ((g & 4294901760) * g | 0) + ((g & 65535) * g | 0); - f[d] = E ^ m - } - h[0] = f[0] + (f[7] << 16 | f[7] >>> 16) + (f[6] << 16 | f[6] >>> 16) | 0, h[1] = f[1] + (f[0] << 8 | f[0] >>> 24) + f[7] | 0, h[2] = f[2] + (f[1] << 16 | f[1] >>> 16) + (f[0] << 16 | f[0] >>> 16) | 0, h[3] = f[3] + (f[2] << 8 | f[2] >>> 24) + f[1] | 0, h[4] = f[4] + (f[3] << 16 | f[3] >>> 16) + (f[2] << 16 | f[2] >>> 16) | 0, h[5] = f[5] + (f[4] << 8 | f[4] >>> 24) + f[3] | 0, h[6] = f[6] + (f[5] << 16 | f[5] >>> 16) + (f[4] << 16 | f[4] >>> 16) | 0, h[7] = f[7] + (f[6] << 8 | f[6] >>> 24) + f[5] | 0 - } - r.Rabbit = i._createHelper(u) - }(), a.Rabbit - }) - }(F0)), F0.exports -} -var R0 = { - exports: {} - }, - vn; - -function Ts() { - return vn || (vn = 1, function (e, t) { - (function (a, r, n) { - e.exports = r(ve(), Ht(), Mt(), kt(), Me()) - })(ue, function (a) { - return function () { - var r = a, - n = r.lib, - i = n.StreamCipher, - s = r.algo, - o = [], - l = [], - f = [], - u = s.RabbitLegacy = i.extend({ - _doReset: function () { - var h = this._key.words, - x = this.cfg.iv, - d = this._X = [h[0], h[3] << 16 | h[2] >>> 16, h[1], h[0] << 16 | h[3] >>> 16, h[2], h[1] << 16 | h[0] >>> 16, h[3], h[2] << 16 | h[1] >>> 16], - g = this._C = [h[2] << 16 | h[2] >>> 16, h[0] & 4294901760 | h[1] & 65535, h[3] << 16 | h[3] >>> 16, h[1] & 4294901760 | h[2] & 65535, h[0] << 16 | h[0] >>> 16, h[2] & 4294901760 | h[3] & 65535, h[1] << 16 | h[1] >>> 16, h[3] & 4294901760 | h[0] & 65535]; - this._b = 0; - for (var v = 0; v < 4; v++) c.call(this); - for (var v = 0; v < 8; v++) g[v] ^= d[v + 4 & 7]; - if (x) { - var B = x.words, - E = B[0], - m = B[1], - A = (E << 8 | E >>> 24) & 16711935 | (E << 24 | E >>> 8) & 4278255360, - T = (m << 8 | m >>> 24) & 16711935 | (m << 24 | m >>> 8) & 4278255360, - S = A >>> 16 | T & 4294901760, - N = T << 16 | A & 65535; - g[0] ^= A, g[1] ^= S, g[2] ^= T, g[3] ^= N, g[4] ^= A, g[5] ^= S, g[6] ^= T, g[7] ^= N; - for (var v = 0; v < 4; v++) c.call(this) - } - }, - _doProcessBlock: function (h, x) { - var d = this._X; - c.call(this), o[0] = d[0] ^ d[5] >>> 16 ^ d[3] << 16, o[1] = d[2] ^ d[7] >>> 16 ^ d[5] << 16, o[2] = d[4] ^ d[1] >>> 16 ^ d[7] << 16, o[3] = d[6] ^ d[3] >>> 16 ^ d[1] << 16; - for (var g = 0; g < 4; g++) o[g] = (o[g] << 8 | o[g] >>> 24) & 16711935 | (o[g] << 24 | o[g] >>> 8) & 4278255360, h[x + g] ^= o[g] - }, - blockSize: 128 / 32, - ivSize: 64 / 32 - }); - - function c() { - for (var h = this._X, x = this._C, d = 0; d < 8; d++) l[d] = x[d]; - x[0] = x[0] + 1295307597 + this._b | 0, x[1] = x[1] + 3545052371 + (x[0] >>> 0 < l[0] >>> 0 ? 1 : 0) | 0, x[2] = x[2] + 886263092 + (x[1] >>> 0 < l[1] >>> 0 ? 1 : 0) | 0, x[3] = x[3] + 1295307597 + (x[2] >>> 0 < l[2] >>> 0 ? 1 : 0) | 0, x[4] = x[4] + 3545052371 + (x[3] >>> 0 < l[3] >>> 0 ? 1 : 0) | 0, x[5] = x[5] + 886263092 + (x[4] >>> 0 < l[4] >>> 0 ? 1 : 0) | 0, x[6] = x[6] + 1295307597 + (x[5] >>> 0 < l[5] >>> 0 ? 1 : 0) | 0, x[7] = x[7] + 3545052371 + (x[6] >>> 0 < l[6] >>> 0 ? 1 : 0) | 0, this._b = x[7] >>> 0 < l[7] >>> 0 ? 1 : 0; - for (var d = 0; d < 8; d++) { - var g = h[d] + x[d], - v = g & 65535, - B = g >>> 16, - E = ((v * v >>> 17) + v * B >>> 15) + B * B, - m = ((g & 4294901760) * g | 0) + ((g & 65535) * g | 0); - f[d] = E ^ m - } - h[0] = f[0] + (f[7] << 16 | f[7] >>> 16) + (f[6] << 16 | f[6] >>> 16) | 0, h[1] = f[1] + (f[0] << 8 | f[0] >>> 24) + f[7] | 0, h[2] = f[2] + (f[1] << 16 | f[1] >>> 16) + (f[0] << 16 | f[0] >>> 16) | 0, h[3] = f[3] + (f[2] << 8 | f[2] >>> 24) + f[1] | 0, h[4] = f[4] + (f[3] << 16 | f[3] >>> 16) + (f[2] << 16 | f[2] >>> 16) | 0, h[5] = f[5] + (f[4] << 8 | f[4] >>> 24) + f[3] | 0, h[6] = f[6] + (f[5] << 16 | f[5] >>> 16) + (f[4] << 16 | f[4] >>> 16) | 0, h[7] = f[7] + (f[6] << 8 | f[6] >>> 24) + f[5] | 0 - } - r.RabbitLegacy = i._createHelper(u) - }(), a.RabbitLegacy - }) - }(R0)), R0.exports -} -var w0 = { - exports: {} - }, - yn; - -function bs() { - return yn || (yn = 1, function (e, t) { - (function (a, r, n) { - e.exports = r(ve(), Ht(), Mt(), kt(), Me()) - })(ue, function (a) { - return function () { - var r = a, - n = r.lib, - i = n.BlockCipher, - s = r.algo; - const o = 16, - l = [608135816, 2242054355, 320440878, 57701188, 2752067618, 698298832, 137296536, 3964562569, 1160258022, 953160567, 3193202383, 887688300, 3232508343, 3380367581, 1065670069, 3041331479, 2450970073, 2306472731], - f = [ - [3509652390, 2564797868, 805139163, 3491422135, 3101798381, 1780907670, 3128725573, 4046225305, 614570311, 3012652279, 134345442, 2240740374, 1667834072, 1901547113, 2757295779, 4103290238, 227898511, 1921955416, 1904987480, 2182433518, 2069144605, 3260701109, 2620446009, 720527379, 3318853667, 677414384, 3393288472, 3101374703, 2390351024, 1614419982, 1822297739, 2954791486, 3608508353, 3174124327, 2024746970, 1432378464, 3864339955, 2857741204, 1464375394, 1676153920, 1439316330, 715854006, 3033291828, 289532110, 2706671279, 2087905683, 3018724369, 1668267050, 732546397, 1947742710, 3462151702, 2609353502, 2950085171, 1814351708, 2050118529, 680887927, 999245976, 1800124847, 3300911131, 1713906067, 1641548236, 4213287313, 1216130144, 1575780402, 4018429277, 3917837745, 3693486850, 3949271944, 596196993, 3549867205, 258830323, 2213823033, 772490370, 2760122372, 1774776394, 2652871518, 566650946, 4142492826, 1728879713, 2882767088, 1783734482, 3629395816, 2517608232, 2874225571, 1861159788, 326777828, 3124490320, 2130389656, 2716951837, 967770486, 1724537150, 2185432712, 2364442137, 1164943284, 2105845187, 998989502, 3765401048, 2244026483, 1075463327, 1455516326, 1322494562, 910128902, 469688178, 1117454909, 936433444, 3490320968, 3675253459, 1240580251, 122909385, 2157517691, 634681816, 4142456567, 3825094682, 3061402683, 2540495037, 79693498, 3249098678, 1084186820, 1583128258, 426386531, 1761308591, 1047286709, 322548459, 995290223, 1845252383, 2603652396, 3431023940, 2942221577, 3202600964, 3727903485, 1712269319, 422464435, 3234572375, 1170764815, 3523960633, 3117677531, 1434042557, 442511882, 3600875718, 1076654713, 1738483198, 4213154764, 2393238008, 3677496056, 1014306527, 4251020053, 793779912, 2902807211, 842905082, 4246964064, 1395751752, 1040244610, 2656851899, 3396308128, 445077038, 3742853595, 3577915638, 679411651, 2892444358, 2354009459, 1767581616, 3150600392, 3791627101, 3102740896, 284835224, 4246832056, 1258075500, 768725851, 2589189241, 3069724005, 3532540348, 1274779536, 3789419226, 2764799539, 1660621633, 3471099624, 4011903706, 913787905, 3497959166, 737222580, 2514213453, 2928710040, 3937242737, 1804850592, 3499020752, 2949064160, 2386320175, 2390070455, 2415321851, 4061277028, 2290661394, 2416832540, 1336762016, 1754252060, 3520065937, 3014181293, 791618072, 3188594551, 3933548030, 2332172193, 3852520463, 3043980520, 413987798, 3465142937, 3030929376, 4245938359, 2093235073, 3534596313, 375366246, 2157278981, 2479649556, 555357303, 3870105701, 2008414854, 3344188149, 4221384143, 3956125452, 2067696032, 3594591187, 2921233993, 2428461, 544322398, 577241275, 1471733935, 610547355, 4027169054, 1432588573, 1507829418, 2025931657, 3646575487, 545086370, 48609733, 2200306550, 1653985193, 298326376, 1316178497, 3007786442, 2064951626, 458293330, 2589141269, 3591329599, 3164325604, 727753846, 2179363840, 146436021, 1461446943, 4069977195, 705550613, 3059967265, 3887724982, 4281599278, 3313849956, 1404054877, 2845806497, 146425753, 1854211946], - [1266315497, 3048417604, 3681880366, 3289982499, 290971e4, 1235738493, 2632868024, 2414719590, 3970600049, 1771706367, 1449415276, 3266420449, 422970021, 1963543593, 2690192192, 3826793022, 1062508698, 1531092325, 1804592342, 2583117782, 2714934279, 4024971509, 1294809318, 4028980673, 1289560198, 2221992742, 1669523910, 35572830, 157838143, 1052438473, 1016535060, 1802137761, 1753167236, 1386275462, 3080475397, 2857371447, 1040679964, 2145300060, 2390574316, 1461121720, 2956646967, 4031777805, 4028374788, 33600511, 2920084762, 1018524850, 629373528, 3691585981, 3515945977, 2091462646, 2486323059, 586499841, 988145025, 935516892, 3367335476, 2599673255, 2839830854, 265290510, 3972581182, 2759138881, 3795373465, 1005194799, 847297441, 406762289, 1314163512, 1332590856, 1866599683, 4127851711, 750260880, 613907577, 1450815602, 3165620655, 3734664991, 3650291728, 3012275730, 3704569646, 1427272223, 778793252, 1343938022, 2676280711, 2052605720, 1946737175, 3164576444, 3914038668, 3967478842, 3682934266, 1661551462, 3294938066, 4011595847, 840292616, 3712170807, 616741398, 312560963, 711312465, 1351876610, 322626781, 1910503582, 271666773, 2175563734, 1594956187, 70604529, 3617834859, 1007753275, 1495573769, 4069517037, 2549218298, 2663038764, 504708206, 2263041392, 3941167025, 2249088522, 1514023603, 1998579484, 1312622330, 694541497, 2582060303, 2151582166, 1382467621, 776784248, 2618340202, 3323268794, 2497899128, 2784771155, 503983604, 4076293799, 907881277, 423175695, 432175456, 1378068232, 4145222326, 3954048622, 3938656102, 3820766613, 2793130115, 2977904593, 26017576, 3274890735, 3194772133, 1700274565, 1756076034, 4006520079, 3677328699, 720338349, 1533947780, 354530856, 688349552, 3973924725, 1637815568, 332179504, 3949051286, 53804574, 2852348879, 3044236432, 1282449977, 3583942155, 3416972820, 4006381244, 1617046695, 2628476075, 3002303598, 1686838959, 431878346, 2686675385, 1700445008, 1080580658, 1009431731, 832498133, 3223435511, 2605976345, 2271191193, 2516031870, 1648197032, 4164389018, 2548247927, 300782431, 375919233, 238389289, 3353747414, 2531188641, 2019080857, 1475708069, 455242339, 2609103871, 448939670, 3451063019, 1395535956, 2413381860, 1841049896, 1491858159, 885456874, 4264095073, 4001119347, 1565136089, 3898914787, 1108368660, 540939232, 1173283510, 2745871338, 3681308437, 4207628240, 3343053890, 4016749493, 1699691293, 1103962373, 3625875870, 2256883143, 3830138730, 1031889488, 3479347698, 1535977030, 4236805024, 3251091107, 2132092099, 1774941330, 1199868427, 1452454533, 157007616, 2904115357, 342012276, 595725824, 1480756522, 206960106, 497939518, 591360097, 863170706, 2375253569, 3596610801, 1814182875, 2094937945, 3421402208, 1082520231, 3463918190, 2785509508, 435703966, 3908032597, 1641649973, 2842273706, 3305899714, 1510255612, 2148256476, 2655287854, 3276092548, 4258621189, 236887753, 3681803219, 274041037, 1734335097, 3815195456, 3317970021, 1899903192, 1026095262, 4050517792, 356393447, 2410691914, 3873677099, 3682840055], - [3913112168, 2491498743, 4132185628, 2489919796, 1091903735, 1979897079, 3170134830, 3567386728, 3557303409, 857797738, 1136121015, 1342202287, 507115054, 2535736646, 337727348, 3213592640, 1301675037, 2528481711, 1895095763, 1721773893, 3216771564, 62756741, 2142006736, 835421444, 2531993523, 1442658625, 3659876326, 2882144922, 676362277, 1392781812, 170690266, 3921047035, 1759253602, 3611846912, 1745797284, 664899054, 1329594018, 3901205900, 3045908486, 2062866102, 2865634940, 3543621612, 3464012697, 1080764994, 553557557, 3656615353, 3996768171, 991055499, 499776247, 1265440854, 648242737, 3940784050, 980351604, 3713745714, 1749149687, 3396870395, 4211799374, 3640570775, 1161844396, 3125318951, 1431517754, 545492359, 4268468663, 3499529547, 1437099964, 2702547544, 3433638243, 2581715763, 2787789398, 1060185593, 1593081372, 2418618748, 4260947970, 69676912, 2159744348, 86519011, 2512459080, 3838209314, 1220612927, 3339683548, 133810670, 1090789135, 1078426020, 1569222167, 845107691, 3583754449, 4072456591, 1091646820, 628848692, 1613405280, 3757631651, 526609435, 236106946, 48312990, 2942717905, 3402727701, 1797494240, 859738849, 992217954, 4005476642, 2243076622, 3870952857, 3732016268, 765654824, 3490871365, 2511836413, 1685915746, 3888969200, 1414112111, 2273134842, 3281911079, 4080962846, 172450625, 2569994100, 980381355, 4109958455, 2819808352, 2716589560, 2568741196, 3681446669, 3329971472, 1835478071, 660984891, 3704678404, 4045999559, 3422617507, 3040415634, 1762651403, 1719377915, 3470491036, 2693910283, 3642056355, 3138596744, 1364962596, 2073328063, 1983633131, 926494387, 3423689081, 2150032023, 4096667949, 1749200295, 3328846651, 309677260, 2016342300, 1779581495, 3079819751, 111262694, 1274766160, 443224088, 298511866, 1025883608, 3806446537, 1145181785, 168956806, 3641502830, 3584813610, 1689216846, 3666258015, 3200248200, 1692713982, 2646376535, 4042768518, 1618508792, 1610833997, 3523052358, 4130873264, 2001055236, 3610705100, 2202168115, 4028541809, 2961195399, 1006657119, 2006996926, 3186142756, 1430667929, 3210227297, 1314452623, 4074634658, 4101304120, 2273951170, 1399257539, 3367210612, 3027628629, 1190975929, 2062231137, 2333990788, 2221543033, 2438960610, 1181637006, 548689776, 2362791313, 3372408396, 3104550113, 3145860560, 296247880, 1970579870, 3078560182, 3769228297, 1714227617, 3291629107, 3898220290, 166772364, 1251581989, 493813264, 448347421, 195405023, 2709975567, 677966185, 3703036547, 1463355134, 2715995803, 1338867538, 1343315457, 2802222074, 2684532164, 233230375, 2599980071, 2000651841, 3277868038, 1638401717, 4028070440, 3237316320, 6314154, 819756386, 300326615, 590932579, 1405279636, 3267499572, 3150704214, 2428286686, 3959192993, 3461946742, 1862657033, 1266418056, 963775037, 2089974820, 2263052895, 1917689273, 448879540, 3550394620, 3981727096, 150775221, 3627908307, 1303187396, 508620638, 2975983352, 2726630617, 1817252668, 1876281319, 1457606340, 908771278, 3720792119, 3617206836, 2455994898, 1729034894, 1080033504], - [976866871, 3556439503, 2881648439, 1522871579, 1555064734, 1336096578, 3548522304, 2579274686, 3574697629, 3205460757, 3593280638, 3338716283, 3079412587, 564236357, 2993598910, 1781952180, 1464380207, 3163844217, 3332601554, 1699332808, 1393555694, 1183702653, 3581086237, 1288719814, 691649499, 2847557200, 2895455976, 3193889540, 2717570544, 1781354906, 1676643554, 2592534050, 3230253752, 1126444790, 2770207658, 2633158820, 2210423226, 2615765581, 2414155088, 3127139286, 673620729, 2805611233, 1269405062, 4015350505, 3341807571, 4149409754, 1057255273, 2012875353, 2162469141, 2276492801, 2601117357, 993977747, 3918593370, 2654263191, 753973209, 36408145, 2530585658, 25011837, 3520020182, 2088578344, 530523599, 2918365339, 1524020338, 1518925132, 3760827505, 3759777254, 1202760957, 3985898139, 3906192525, 674977740, 4174734889, 2031300136, 2019492241, 3983892565, 4153806404, 3822280332, 352677332, 2297720250, 60907813, 90501309, 3286998549, 1016092578, 2535922412, 2839152426, 457141659, 509813237, 4120667899, 652014361, 1966332200, 2975202805, 55981186, 2327461051, 676427537, 3255491064, 2882294119, 3433927263, 1307055953, 942726286, 933058658, 2468411793, 3933900994, 4215176142, 1361170020, 2001714738, 2830558078, 3274259782, 1222529897, 1679025792, 2729314320, 3714953764, 1770335741, 151462246, 3013232138, 1682292957, 1483529935, 471910574, 1539241949, 458788160, 3436315007, 1807016891, 3718408830, 978976581, 1043663428, 3165965781, 1927990952, 4200891579, 2372276910, 3208408903, 3533431907, 1412390302, 2931980059, 4132332400, 1947078029, 3881505623, 4168226417, 2941484381, 1077988104, 1320477388, 886195818, 18198404, 3786409e3, 2509781533, 112762804, 3463356488, 1866414978, 891333506, 18488651, 661792760, 1628790961, 3885187036, 3141171499, 876946877, 2693282273, 1372485963, 791857591, 2686433993, 3759982718, 3167212022, 3472953795, 2716379847, 445679433, 3561995674, 3504004811, 3574258232, 54117162, 3331405415, 2381918588, 3769707343, 4154350007, 1140177722, 4074052095, 668550556, 3214352940, 367459370, 261225585, 2610173221, 4209349473, 3468074219, 3265815641, 314222801, 3066103646, 3808782860, 282218597, 3406013506, 3773591054, 379116347, 1285071038, 846784868, 2669647154, 3771962079, 3550491691, 2305946142, 453669953, 1268987020, 3317592352, 3279303384, 3744833421, 2610507566, 3859509063, 266596637, 3847019092, 517658769, 3462560207, 3443424879, 370717030, 4247526661, 2224018117, 4143653529, 4112773975, 2788324899, 2477274417, 1456262402, 2901442914, 1517677493, 1846949527, 2295493580, 3734397586, 2176403920, 1280348187, 1908823572, 3871786941, 846861322, 1172426758, 3287448474, 3383383037, 1655181056, 3139813346, 901632758, 1897031941, 2986607138, 3066810236, 3447102507, 1393639104, 373351379, 950779232, 625454576, 3124240540, 4148612726, 2007998917, 544563296, 2244738638, 2330496472, 2058025392, 1291430526, 424198748, 50039436, 29584100, 3605783033, 2429876329, 2791104160, 1057563949, 3255363231, 3075367218, 3463963227, 1469046755, 985887462] - ]; - var u = { - pbox: [], - sbox: [] - }; - - function c(v, B) { - let E = B >> 24 & 255, - m = B >> 16 & 255, - A = B >> 8 & 255, - T = B & 255, - S = v.sbox[0][E] + v.sbox[1][m]; - return S = S ^ v.sbox[2][A], S = S + v.sbox[3][T], S - } - - function h(v, B, E) { - let m = B, - A = E, - T; - for (let S = 0; S < o; ++S) m = m ^ v.pbox[S], A = c(v, m) ^ A, T = m, m = A, A = T; - return T = m, m = A, A = T, A = A ^ v.pbox[o], m = m ^ v.pbox[o + 1], { - left: m, - right: A - } - } - - function x(v, B, E) { - let m = B, - A = E, - T; - for (let S = o + 1; S > 1; --S) m = m ^ v.pbox[S], A = c(v, m) ^ A, T = m, m = A, A = T; - return T = m, m = A, A = T, A = A ^ v.pbox[1], m = m ^ v.pbox[0], { - left: m, - right: A - } - } - - function d(v, B, E) { - for (let N = 0; N < 4; N++) { - v.sbox[N] = []; - for (let w = 0; w < 256; w++) v.sbox[N][w] = f[N][w] - } - let m = 0; - for (let N = 0; N < o + 2; N++) v.pbox[N] = l[N] ^ B[m], m++, m >= E && (m = 0); - let A = 0, - T = 0, - S = 0; - for (let N = 0; N < o + 2; N += 2) S = h(v, A, T), A = S.left, T = S.right, v.pbox[N] = A, v.pbox[N + 1] = T; - for (let N = 0; N < 4; N++) - for (let w = 0; w < 256; w += 2) S = h(v, A, T), A = S.left, T = S.right, v.sbox[N][w] = A, v.sbox[N][w + 1] = T; - return !0 - } - var g = s.Blowfish = i.extend({ - _doReset: function () { - if (this._keyPriorReset !== this._key) { - var v = this._keyPriorReset = this._key, - B = v.words, - E = v.sigBytes / 4; - d(u, B, E) - } - }, - encryptBlock: function (v, B) { - var E = h(u, v[B], v[B + 1]); - v[B] = E.left, v[B + 1] = E.right - }, - decryptBlock: function (v, B) { - var E = x(u, v[B], v[B + 1]); - v[B] = E.left, v[B + 1] = E.right - }, - blockSize: 64 / 32, - keySize: 128 / 32, - ivSize: 64 / 32 - }); - r.Blowfish = i._createHelper(g) - }(), a.Blowfish - }) - }(w0)), w0.exports -}(function (e, t) { - (function (a, r, n) { - e.exports = r(ve(), Hr(), rs(), as(), Ht(), ns(), Mt(), Wn(), na(), is(), Xn(), ss(), os(), fs(), ia(), us(), kt(), Me(), ls(), cs(), hs(), ds(), xs(), ps(), vs(), ys(), gs(), Cs(), Es(), ms(), Bs(), As(), Ss(), Ts(), bs()) - })(ue, function (a) { - return a - }) -})(Qn); -var Is = Qn.exports; -const yl = Gn(Is); -var le = { - options: { - usePureJavaScript: !1 - } - }, - sa = {}, - _s = sa, - gn = {}; -sa.encode = function (e, t, a) { - if (typeof t != "string") throw new TypeError('"alphabet" must be a string.'); - if (a !== void 0 && typeof a != "number") throw new TypeError('"maxline" must be a number.'); - var r = ""; - if (!(e instanceof Uint8Array)) r = Ds(e, t); - else { - var n = 0, - i = t.length, - s = t.charAt(0), - o = [0]; - for (n = 0; n < e.length; ++n) { - for (var l = 0, f = e[n]; l < o.length; ++l) f += o[l] << 8, o[l] = f % i, f = f / i | 0; - for (; f > 0;) o.push(f % i), f = f / i | 0 - } - for (n = 0; e[n] === 0 && n < e.length - 1; ++n) r += s; - for (n = o.length - 1; n >= 0; --n) r += t[o[n]] - } - if (a) { - var u = new RegExp(".{1," + a + "}", "g"); - r = r.match(u).join(`\r -`) - } - return r -}; -sa.decode = function (e, t) { - if (typeof e != "string") throw new TypeError('"input" must be a string.'); - if (typeof t != "string") throw new TypeError('"alphabet" must be a string.'); - var a = gn[t]; - if (!a) { - a = gn[t] = []; - for (var r = 0; r < t.length; ++r) a[t.charCodeAt(r)] = r - } - e = e.replace(/\s/g, ""); - for (var n = t.length, i = t.charAt(0), s = [0], r = 0; r < e.length; r++) { - var o = a[e.charCodeAt(r)]; - if (o === void 0) return; - for (var l = 0, f = o; l < s.length; ++l) f += s[l] * n, s[l] = f & 255, f >>= 8; - for (; f > 0;) s.push(f & 255), f >>= 8 - } - for (var u = 0; e[u] === i && u < e.length - 1; ++u) s.push(0); - return typeof Buffer < "u" ? Buffer.from(s.reverse()) : new Uint8Array(s.reverse()) -}; - -function Ds(e, t) { - var a = 0, - r = t.length, - n = t.charAt(0), - i = [0]; - for (a = 0; a < e.length(); ++a) { - for (var s = 0, o = e.at(a); s < i.length; ++s) o += i[s] << 8, i[s] = o % r, o = o / r | 0; - for (; o > 0;) i.push(o % r), o = o / r | 0 - } - var l = ""; - for (a = 0; e.at(a) === 0 && a < e.length() - 1; ++a) l += n; - for (a = i.length - 1; a >= 0; --a) l += t[i[a]]; - return l -} -var Cn = le, - En = _s, - _ = Cn.util = Cn.util || {}; -(function () { - if (typeof process < "u" && process.nextTick && !process.browser) { - _.nextTick = process.nextTick, typeof setImmediate == "function" ? _.setImmediate = setImmediate : _.setImmediate = _.nextTick; - return - } - if (typeof setImmediate == "function") { - _.setImmediate = function () { - return setImmediate.apply(void 0, arguments) - }, _.nextTick = function (s) { - return setImmediate(s) - }; - return - } - if (_.setImmediate = function (s) { - setTimeout(s, 0) - }, typeof window < "u" && typeof window.postMessage == "function") { - let s = function (o) { - if (o.source === window && o.data === e) { - o.stopPropagation(); - var l = t.slice(); - t.length = 0, l.forEach(function (f) { - f() - }) - } - }; - var e = "forge.setImmediate", - t = []; - _.setImmediate = function (o) { - t.push(o), t.length === 1 && window.postMessage(e, "*") - }, window.addEventListener("message", s, !0) - } - if (typeof MutationObserver < "u") { - var a = Date.now(), - r = !0, - n = document.createElement("div"), - t = []; - new MutationObserver(function () { - var o = t.slice(); - t.length = 0, o.forEach(function (l) { - l() - }) - }).observe(n, { - attributes: !0 - }); - var i = _.setImmediate; - _.setImmediate = function (o) { - Date.now() - a > 15 ? (a = Date.now(), i(o)) : (t.push(o), t.length === 1 && n.setAttribute("a", r = !r)) - } - } - _.nextTick = _.setImmediate -})(); -_.isNodejs = typeof process < "u" && process.versions && process.versions.node; -_.globalScope = function () { - return _.isNodejs ? ue : typeof self > "u" ? window : self -}(); -_.isArray = Array.isArray || function (e) { - return Object.prototype.toString.call(e) === "[object Array]" -}; -_.isArrayBuffer = function (e) { - return typeof ArrayBuffer < "u" && e instanceof ArrayBuffer -}; -_.isArrayBufferView = function (e) { - return e && _.isArrayBuffer(e.buffer) && e.byteLength !== void 0 -}; - -function gr(e) { - if (!(e === 8 || e === 16 || e === 24 || e === 32)) throw new Error("Only 8, 16, 24, or 32 bits supported: " + e) -} -_.ByteBuffer = oa; - -function oa(e) { - if (this.data = "", this.read = 0, typeof e == "string") this.data = e; - else if (_.isArrayBuffer(e) || _.isArrayBufferView(e)) - if (typeof Buffer < "u" && e instanceof Buffer) this.data = e.toString("binary"); - else { - var t = new Uint8Array(e); - try { - this.data = String.fromCharCode.apply(null, t) - } catch { - for (var a = 0; a < t.length; ++a) this.putByte(t[a]) - } - } - else(e instanceof oa || typeof e == "object" && typeof e.data == "string" && typeof e.read == "number") && (this.data = e.data, this.read = e.read); - this._constructedStringLength = 0 -} -_.ByteStringBuffer = oa; -var Ns = 4096; -_.ByteStringBuffer.prototype._optimizeConstructedString = function (e) { - this._constructedStringLength += e, this._constructedStringLength > Ns && (this.data.substr(0, 1), this._constructedStringLength = 0) -}; -_.ByteStringBuffer.prototype.length = function () { - return this.data.length - this.read -}; -_.ByteStringBuffer.prototype.isEmpty = function () { - return this.length() <= 0 -}; -_.ByteStringBuffer.prototype.putByte = function (e) { - return this.putBytes(String.fromCharCode(e)) -}; -_.ByteStringBuffer.prototype.fillWithByte = function (e, t) { - e = String.fromCharCode(e); - for (var a = this.data; t > 0;) t & 1 && (a += e), t >>>= 1, t > 0 && (e += e); - return this.data = a, this._optimizeConstructedString(t), this -}; -_.ByteStringBuffer.prototype.putBytes = function (e) { - return this.data += e, this._optimizeConstructedString(e.length), this -}; -_.ByteStringBuffer.prototype.putString = function (e) { - return this.putBytes(_.encodeUtf8(e)) -}; -_.ByteStringBuffer.prototype.putInt16 = function (e) { - return this.putBytes(String.fromCharCode(e >> 8 & 255) + String.fromCharCode(e & 255)) -}; -_.ByteStringBuffer.prototype.putInt24 = function (e) { - return this.putBytes(String.fromCharCode(e >> 16 & 255) + String.fromCharCode(e >> 8 & 255) + String.fromCharCode(e & 255)) -}; -_.ByteStringBuffer.prototype.putInt32 = function (e) { - return this.putBytes(String.fromCharCode(e >> 24 & 255) + String.fromCharCode(e >> 16 & 255) + String.fromCharCode(e >> 8 & 255) + String.fromCharCode(e & 255)) -}; -_.ByteStringBuffer.prototype.putInt16Le = function (e) { - return this.putBytes(String.fromCharCode(e & 255) + String.fromCharCode(e >> 8 & 255)) -}; -_.ByteStringBuffer.prototype.putInt24Le = function (e) { - return this.putBytes(String.fromCharCode(e & 255) + String.fromCharCode(e >> 8 & 255) + String.fromCharCode(e >> 16 & 255)) -}; -_.ByteStringBuffer.prototype.putInt32Le = function (e) { - return this.putBytes(String.fromCharCode(e & 255) + String.fromCharCode(e >> 8 & 255) + String.fromCharCode(e >> 16 & 255) + String.fromCharCode(e >> 24 & 255)) -}; -_.ByteStringBuffer.prototype.putInt = function (e, t) { - gr(t); - var a = ""; - do t -= 8, a += String.fromCharCode(e >> t & 255); while (t > 0); - return this.putBytes(a) -}; -_.ByteStringBuffer.prototype.putSignedInt = function (e, t) { - return e < 0 && (e += 2 << t - 1), this.putInt(e, t) -}; -_.ByteStringBuffer.prototype.putBuffer = function (e) { - return this.putBytes(e.getBytes()) -}; -_.ByteStringBuffer.prototype.getByte = function () { - return this.data.charCodeAt(this.read++) -}; -_.ByteStringBuffer.prototype.getInt16 = function () { - var e = this.data.charCodeAt(this.read) << 8 ^ this.data.charCodeAt(this.read + 1); - return this.read += 2, e -}; -_.ByteStringBuffer.prototype.getInt24 = function () { - var e = this.data.charCodeAt(this.read) << 16 ^ this.data.charCodeAt(this.read + 1) << 8 ^ this.data.charCodeAt(this.read + 2); - return this.read += 3, e -}; -_.ByteStringBuffer.prototype.getInt32 = function () { - var e = this.data.charCodeAt(this.read) << 24 ^ this.data.charCodeAt(this.read + 1) << 16 ^ this.data.charCodeAt(this.read + 2) << 8 ^ this.data.charCodeAt(this.read + 3); - return this.read += 4, e -}; -_.ByteStringBuffer.prototype.getInt16Le = function () { - var e = this.data.charCodeAt(this.read) ^ this.data.charCodeAt(this.read + 1) << 8; - return this.read += 2, e -}; -_.ByteStringBuffer.prototype.getInt24Le = function () { - var e = this.data.charCodeAt(this.read) ^ this.data.charCodeAt(this.read + 1) << 8 ^ this.data.charCodeAt(this.read + 2) << 16; - return this.read += 3, e -}; -_.ByteStringBuffer.prototype.getInt32Le = function () { - var e = this.data.charCodeAt(this.read) ^ this.data.charCodeAt(this.read + 1) << 8 ^ this.data.charCodeAt(this.read + 2) << 16 ^ this.data.charCodeAt(this.read + 3) << 24; - return this.read += 4, e -}; -_.ByteStringBuffer.prototype.getInt = function (e) { - gr(e); - var t = 0; - do t = (t << 8) + this.data.charCodeAt(this.read++), e -= 8; while (e > 0); - return t -}; -_.ByteStringBuffer.prototype.getSignedInt = function (e) { - var t = this.getInt(e), - a = 2 << e - 2; - return t >= a && (t -= a << 1), t -}; -_.ByteStringBuffer.prototype.getBytes = function (e) { - var t; - return e ? (e = Math.min(this.length(), e), t = this.data.slice(this.read, this.read + e), this.read += e) : e === 0 ? t = "" : (t = this.read === 0 ? this.data : this.data.slice(this.read), this.clear()), t -}; -_.ByteStringBuffer.prototype.bytes = function (e) { - return typeof e > "u" ? this.data.slice(this.read) : this.data.slice(this.read, this.read + e) -}; -_.ByteStringBuffer.prototype.at = function (e) { - return this.data.charCodeAt(this.read + e) -}; -_.ByteStringBuffer.prototype.setAt = function (e, t) { - return this.data = this.data.substr(0, this.read + e) + String.fromCharCode(t) + this.data.substr(this.read + e + 1), this -}; -_.ByteStringBuffer.prototype.last = function () { - return this.data.charCodeAt(this.data.length - 1) -}; -_.ByteStringBuffer.prototype.copy = function () { - var e = _.createBuffer(this.data); - return e.read = this.read, e -}; -_.ByteStringBuffer.prototype.compact = function () { - return this.read > 0 && (this.data = this.data.slice(this.read), this.read = 0), this -}; -_.ByteStringBuffer.prototype.clear = function () { - return this.data = "", this.read = 0, this -}; -_.ByteStringBuffer.prototype.truncate = function (e) { - var t = Math.max(0, this.length() - e); - return this.data = this.data.substr(this.read, t), this.read = 0, this -}; -_.ByteStringBuffer.prototype.toHex = function () { - for (var e = "", t = this.read; t < this.data.length; ++t) { - var a = this.data.charCodeAt(t); - a < 16 && (e += "0"), e += a.toString(16) - } - return e -}; -_.ByteStringBuffer.prototype.toString = function () { - return _.decodeUtf8(this.bytes()) -}; - -function Fs(e, t) { - t = t || {}, this.read = t.readOffset || 0, this.growSize = t.growSize || 1024; - var a = _.isArrayBuffer(e), - r = _.isArrayBufferView(e); - if (a || r) { - a ? this.data = new DataView(e) : this.data = new DataView(e.buffer, e.byteOffset, e.byteLength), this.write = "writeOffset" in t ? t.writeOffset : this.data.byteLength; - return - } - this.data = new DataView(new ArrayBuffer(0)), this.write = 0, e != null && this.putBytes(e), "writeOffset" in t && (this.write = t.writeOffset) -} -_.DataBuffer = Fs; -_.DataBuffer.prototype.length = function () { - return this.write - this.read -}; -_.DataBuffer.prototype.isEmpty = function () { - return this.length() <= 0 -}; -_.DataBuffer.prototype.accommodate = function (e, t) { - if (this.length() >= e) return this; - t = Math.max(t || this.growSize, e); - var a = new Uint8Array(this.data.buffer, this.data.byteOffset, this.data.byteLength), - r = new Uint8Array(this.length() + t); - return r.set(a), this.data = new DataView(r.buffer), this -}; -_.DataBuffer.prototype.putByte = function (e) { - return this.accommodate(1), this.data.setUint8(this.write++, e), this -}; -_.DataBuffer.prototype.fillWithByte = function (e, t) { - this.accommodate(t); - for (var a = 0; a < t; ++a) this.data.setUint8(e); - return this -}; -_.DataBuffer.prototype.putBytes = function (e, t) { - if (_.isArrayBufferView(e)) { - var a = new Uint8Array(e.buffer, e.byteOffset, e.byteLength), - r = a.byteLength - a.byteOffset; - this.accommodate(r); - var n = new Uint8Array(this.data.buffer, this.write); - return n.set(a), this.write += r, this - } - if (_.isArrayBuffer(e)) { - var a = new Uint8Array(e); - this.accommodate(a.byteLength); - var n = new Uint8Array(this.data.buffer); - return n.set(a, this.write), this.write += a.byteLength, this - } - if (e instanceof _.DataBuffer || typeof e == "object" && typeof e.read == "number" && typeof e.write == "number" && _.isArrayBufferView(e.data)) { - var a = new Uint8Array(e.data.byteLength, e.read, e.length()); - this.accommodate(a.byteLength); - var n = new Uint8Array(e.data.byteLength, this.write); - return n.set(a), this.write += a.byteLength, this - } - if (e instanceof _.ByteStringBuffer && (e = e.data, t = "binary"), t = t || "binary", typeof e == "string") { - var i; - if (t === "hex") return this.accommodate(Math.ceil(e.length / 2)), i = new Uint8Array(this.data.buffer, this.write), this.write += _.binary.hex.decode(e, i, this.write), this; - if (t === "base64") return this.accommodate(Math.ceil(e.length / 4) * 3), i = new Uint8Array(this.data.buffer, this.write), this.write += _.binary.base64.decode(e, i, this.write), this; - if (t === "utf8" && (e = _.encodeUtf8(e), t = "binary"), t === "binary" || t === "raw") return this.accommodate(e.length), i = new Uint8Array(this.data.buffer, this.write), this.write += _.binary.raw.decode(i), this; - if (t === "utf16") return this.accommodate(e.length * 2), i = new Uint16Array(this.data.buffer, this.write), this.write += _.text.utf16.encode(i), this; - throw new Error("Invalid encoding: " + t) - } - throw Error("Invalid parameter: " + e) -}; -_.DataBuffer.prototype.putBuffer = function (e) { - return this.putBytes(e), e.clear(), this -}; -_.DataBuffer.prototype.putString = function (e) { - return this.putBytes(e, "utf16") -}; -_.DataBuffer.prototype.putInt16 = function (e) { - return this.accommodate(2), this.data.setInt16(this.write, e), this.write += 2, this -}; -_.DataBuffer.prototype.putInt24 = function (e) { - return this.accommodate(3), this.data.setInt16(this.write, e >> 8 & 65535), this.data.setInt8(this.write, e >> 16 & 255), this.write += 3, this -}; -_.DataBuffer.prototype.putInt32 = function (e) { - return this.accommodate(4), this.data.setInt32(this.write, e), this.write += 4, this -}; -_.DataBuffer.prototype.putInt16Le = function (e) { - return this.accommodate(2), this.data.setInt16(this.write, e, !0), this.write += 2, this -}; -_.DataBuffer.prototype.putInt24Le = function (e) { - return this.accommodate(3), this.data.setInt8(this.write, e >> 16 & 255), this.data.setInt16(this.write, e >> 8 & 65535, !0), this.write += 3, this -}; -_.DataBuffer.prototype.putInt32Le = function (e) { - return this.accommodate(4), this.data.setInt32(this.write, e, !0), this.write += 4, this -}; -_.DataBuffer.prototype.putInt = function (e, t) { - gr(t), this.accommodate(t / 8); - do t -= 8, this.data.setInt8(this.write++, e >> t & 255); while (t > 0); - return this -}; -_.DataBuffer.prototype.putSignedInt = function (e, t) { - return gr(t), this.accommodate(t / 8), e < 0 && (e += 2 << t - 1), this.putInt(e, t) -}; -_.DataBuffer.prototype.getByte = function () { - return this.data.getInt8(this.read++) -}; -_.DataBuffer.prototype.getInt16 = function () { - var e = this.data.getInt16(this.read); - return this.read += 2, e -}; -_.DataBuffer.prototype.getInt24 = function () { - var e = this.data.getInt16(this.read) << 8 ^ this.data.getInt8(this.read + 2); - return this.read += 3, e -}; -_.DataBuffer.prototype.getInt32 = function () { - var e = this.data.getInt32(this.read); - return this.read += 4, e -}; -_.DataBuffer.prototype.getInt16Le = function () { - var e = this.data.getInt16(this.read, !0); - return this.read += 2, e -}; -_.DataBuffer.prototype.getInt24Le = function () { - var e = this.data.getInt8(this.read) ^ this.data.getInt16(this.read + 1, !0) << 8; - return this.read += 3, e -}; -_.DataBuffer.prototype.getInt32Le = function () { - var e = this.data.getInt32(this.read, !0); - return this.read += 4, e -}; -_.DataBuffer.prototype.getInt = function (e) { - gr(e); - var t = 0; - do t = (t << 8) + this.data.getInt8(this.read++), e -= 8; while (e > 0); - return t -}; -_.DataBuffer.prototype.getSignedInt = function (e) { - var t = this.getInt(e), - a = 2 << e - 2; - return t >= a && (t -= a << 1), t -}; -_.DataBuffer.prototype.getBytes = function (e) { - var t; - return e ? (e = Math.min(this.length(), e), t = this.data.slice(this.read, this.read + e), this.read += e) : e === 0 ? t = "" : (t = this.read === 0 ? this.data : this.data.slice(this.read), this.clear()), t -}; -_.DataBuffer.prototype.bytes = function (e) { - return typeof e > "u" ? this.data.slice(this.read) : this.data.slice(this.read, this.read + e) -}; -_.DataBuffer.prototype.at = function (e) { - return this.data.getUint8(this.read + e) -}; -_.DataBuffer.prototype.setAt = function (e, t) { - return this.data.setUint8(e, t), this -}; -_.DataBuffer.prototype.last = function () { - return this.data.getUint8(this.write - 1) -}; -_.DataBuffer.prototype.copy = function () { - return new _.DataBuffer(this) -}; -_.DataBuffer.prototype.compact = function () { - if (this.read > 0) { - var e = new Uint8Array(this.data.buffer, this.read), - t = new Uint8Array(e.byteLength); - t.set(e), this.data = new DataView(t), this.write -= this.read, this.read = 0 - } - return this -}; -_.DataBuffer.prototype.clear = function () { - return this.data = new DataView(new ArrayBuffer(0)), this.read = this.write = 0, this -}; -_.DataBuffer.prototype.truncate = function (e) { - return this.write = Math.max(0, this.length() - e), this.read = Math.min(this.read, this.write), this -}; -_.DataBuffer.prototype.toHex = function () { - for (var e = "", t = this.read; t < this.data.byteLength; ++t) { - var a = this.data.getUint8(t); - a < 16 && (e += "0"), e += a.toString(16) - } - return e -}; -_.DataBuffer.prototype.toString = function (e) { - var t = new Uint8Array(this.data, this.read, this.length()); - if (e = e || "utf8", e === "binary" || e === "raw") return _.binary.raw.encode(t); - if (e === "hex") return _.binary.hex.encode(t); - if (e === "base64") return _.binary.base64.encode(t); - if (e === "utf8") return _.text.utf8.decode(t); - if (e === "utf16") return _.text.utf16.decode(t); - throw new Error("Invalid encoding: " + e) -}; -_.createBuffer = function (e, t) { - return t = t || "raw", e !== void 0 && t === "utf8" && (e = _.encodeUtf8(e)), new _.ByteBuffer(e) -}; -_.fillString = function (e, t) { - for (var a = ""; t > 0;) t & 1 && (a += e), t >>>= 1, t > 0 && (e += e); - return a -}; -_.xorBytes = function (e, t, a) { - for (var r = "", n = "", i = "", s = 0, o = 0; a > 0; --a, ++s) n = e.charCodeAt(s) ^ t.charCodeAt(s), o >= 10 && (r += i, i = "", o = 0), i += String.fromCharCode(n), ++o; - return r += i, r -}; -_.hexToBytes = function (e) { - var t = "", - a = 0; - for (e.length & !0 && (a = 1, t += String.fromCharCode(parseInt(e[0], 16))); a < e.length; a += 2) t += String.fromCharCode(parseInt(e.substr(a, 2), 16)); - return t -}; -_.bytesToHex = function (e) { - return _.createBuffer(e).toHex() -}; -_.int32ToBytes = function (e) { - return String.fromCharCode(e >> 24 & 255) + String.fromCharCode(e >> 16 & 255) + String.fromCharCode(e >> 8 & 255) + String.fromCharCode(e & 255) -}; -var bt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", - It = [62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, 64, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51], - Yn = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; -_.encode64 = function (e, t) { - for (var a = "", r = "", n, i, s, o = 0; o < e.length;) n = e.charCodeAt(o++), i = e.charCodeAt(o++), s = e.charCodeAt(o++), a += bt.charAt(n >> 2), a += bt.charAt((n & 3) << 4 | i >> 4), isNaN(i) ? a += "==" : (a += bt.charAt((i & 15) << 2 | s >> 6), a += isNaN(s) ? "=" : bt.charAt(s & 63)), t && a.length > t && (r += a.substr(0, t) + `\r -`, a = a.substr(t)); - return r += a, r -}; -_.decode64 = function (e) { - e = e.replace(/[^A-Za-z0-9\+\/\=]/g, ""); - for (var t = "", a, r, n, i, s = 0; s < e.length;) a = It[e.charCodeAt(s++) - 43], r = It[e.charCodeAt(s++) - 43], n = It[e.charCodeAt(s++) - 43], i = It[e.charCodeAt(s++) - 43], t += String.fromCharCode(a << 2 | r >> 4), n !== 64 && (t += String.fromCharCode((r & 15) << 4 | n >> 2), i !== 64 && (t += String.fromCharCode((n & 3) << 6 | i))); - return t -}; -_.encodeUtf8 = function (e) { - return unescape(encodeURIComponent(e)) -}; -_.decodeUtf8 = function (e) { - return decodeURIComponent(escape(e)) -}; -_.binary = { - raw: {}, - hex: {}, - base64: {}, - base58: {}, - baseN: { - encode: En.encode, - decode: En.decode - } -}; -_.binary.raw.encode = function (e) { - return String.fromCharCode.apply(null, e) -}; -_.binary.raw.decode = function (e, t, a) { - var r = t; - r || (r = new Uint8Array(e.length)), a = a || 0; - for (var n = a, i = 0; i < e.length; ++i) r[n++] = e.charCodeAt(i); - return t ? n - a : r -}; -_.binary.hex.encode = _.bytesToHex; -_.binary.hex.decode = function (e, t, a) { - var r = t; - r || (r = new Uint8Array(Math.ceil(e.length / 2))), a = a || 0; - var n = 0, - i = a; - for (e.length & 1 && (n = 1, r[i++] = parseInt(e[0], 16)); n < e.length; n += 2) r[i++] = parseInt(e.substr(n, 2), 16); - return t ? i - a : r -}; -_.binary.base64.encode = function (e, t) { - for (var a = "", r = "", n, i, s, o = 0; o < e.byteLength;) n = e[o++], i = e[o++], s = e[o++], a += bt.charAt(n >> 2), a += bt.charAt((n & 3) << 4 | i >> 4), isNaN(i) ? a += "==" : (a += bt.charAt((i & 15) << 2 | s >> 6), a += isNaN(s) ? "=" : bt.charAt(s & 63)), t && a.length > t && (r += a.substr(0, t) + `\r -`, a = a.substr(t)); - return r += a, r -}; -_.binary.base64.decode = function (e, t, a) { - var r = t; - r || (r = new Uint8Array(Math.ceil(e.length / 4) * 3)), e = e.replace(/[^A-Za-z0-9\+\/\=]/g, ""), a = a || 0; - for (var n, i, s, o, l = 0, f = a; l < e.length;) n = It[e.charCodeAt(l++) - 43], i = It[e.charCodeAt(l++) - 43], s = It[e.charCodeAt(l++) - 43], o = It[e.charCodeAt(l++) - 43], r[f++] = n << 2 | i >> 4, s !== 64 && (r[f++] = (i & 15) << 4 | s >> 2, o !== 64 && (r[f++] = (s & 3) << 6 | o)); - return t ? f - a : r.subarray(0, f) -}; -_.binary.base58.encode = function (e, t) { - return _.binary.baseN.encode(e, Yn, t) -}; -_.binary.base58.decode = function (e, t) { - return _.binary.baseN.decode(e, Yn, t) -}; -_.text = { - utf8: {}, - utf16: {} -}; -_.text.utf8.encode = function (e, t, a) { - e = _.encodeUtf8(e); - var r = t; - r || (r = new Uint8Array(e.length)), a = a || 0; - for (var n = a, i = 0; i < e.length; ++i) r[n++] = e.charCodeAt(i); - return t ? n - a : r -}; -_.text.utf8.decode = function (e) { - return _.decodeUtf8(String.fromCharCode.apply(null, e)) -}; -_.text.utf16.encode = function (e, t, a) { - var r = t; - r || (r = new Uint8Array(e.length * 2)); - var n = new Uint16Array(r.buffer); - a = a || 0; - for (var i = a, s = a, o = 0; o < e.length; ++o) n[s++] = e.charCodeAt(o), i += 2; - return t ? i - a : r -}; -_.text.utf16.decode = function (e) { - return String.fromCharCode.apply(null, new Uint16Array(e.buffer)) -}; -_.deflate = function (e, t, a) { - if (t = _.decode64(e.deflate(_.encode64(t)).rval), a) { - var r = 2, - n = t.charCodeAt(1); - n & 32 && (r = 6), t = t.substring(r, t.length - 4) - } - return t -}; -_.inflate = function (e, t, a) { - var r = e.inflate(_.encode64(t)).rval; - return r === null ? null : _.decode64(r) -}; -var fa = function (e, t, a) { - if (!e) throw new Error("WebStorage not available."); - var r; - if (a === null ? r = e.removeItem(t) : (a = _.encode64(JSON.stringify(a)), r = e.setItem(t, a)), typeof r < "u" && r.rval !== !0) { - var n = new Error(r.error.message); - throw n.id = r.error.id, n.name = r.error.name, n - } - }, - ua = function (e, t) { - if (!e) throw new Error("WebStorage not available."); - var a = e.getItem(t); - if (e.init) - if (a.rval === null) { - if (a.error) { - var r = new Error(a.error.message); - throw r.id = a.error.id, r.name = a.error.name, r - } - a = null - } else a = a.rval; - return a !== null && (a = JSON.parse(_.decode64(a))), a - }, - Rs = function (e, t, a, r) { - var n = ua(e, t); - n === null && (n = {}), n[a] = r, fa(e, t, n) - }, - ws = function (e, t, a) { - var r = ua(e, t); - return r !== null && (r = a in r ? r[a] : null), r - }, - ks = function (e, t, a) { - var r = ua(e, t); - if (r !== null && a in r) { - delete r[a]; - var n = !0; - for (var i in r) { - n = !1; - break - } - n && (r = null), fa(e, t, r) - } - }, - Ls = function (e, t) { - fa(e, t, null) - }, - Mr = function (e, t, a) { - var r = null; - typeof a > "u" && (a = ["web", "flash"]); - var n, i = !1, - s = null; - for (var o in a) { - n = a[o]; - try { - if (n === "flash" || n === "both") { - if (t[0] === null) throw new Error("Flash local storage not available."); - r = e.apply(this, t), i = n === "flash" - }(n === "web" || n === "both") && (t[0] = localStorage, r = e.apply(this, t), i = !0) - } catch (l) { - s = l - } - if (i) break - } - if (!i) throw s; - return r - }; -_.setItem = function (e, t, a, r, n) { - Mr(Rs, arguments, n) -}; -_.getItem = function (e, t, a, r) { - return Mr(ws, arguments, r) -}; -_.removeItem = function (e, t, a, r) { - Mr(ks, arguments, r) -}; -_.clearItems = function (e, t, a) { - Mr(Ls, arguments, a) -}; -_.isEmpty = function (e) { - for (var t in e) - if (e.hasOwnProperty(t)) return !1; - return !0 -}; -_.format = function (e) { - for (var t = /%./g, a, r, n = 0, i = [], s = 0; a = t.exec(e);) { - r = e.substring(s, t.lastIndex - 2), r.length > 0 && i.push(r), s = t.lastIndex; - var o = a[0][1]; - switch (o) { - case "s": - case "o": - n < arguments.length ? i.push(arguments[n++ + 1]) : i.push(""); - break; - case "%": - i.push("%"); - break; - default: - i.push("<%" + o + "?>") - } - } - return i.push(e.substring(s)), i.join("") -}; -_.formatNumber = function (e, t, a, r) { - var n = e, - i = isNaN(t = Math.abs(t)) ? 2 : t, - s = a === void 0 ? "," : a, - o = r === void 0 ? "." : r, - l = n < 0 ? "-" : "", - f = parseInt(n = Math.abs(+n || 0).toFixed(i), 10) + "", - u = f.length > 3 ? f.length % 3 : 0; - return l + (u ? f.substr(0, u) + o : "") + f.substr(u).replace(/(\d{3})(?=\d)/g, "$1" + o) + (i ? s + Math.abs(n - f).toFixed(i).slice(2) : "") -}; -_.formatSize = function (e) { - return e >= 1073741824 ? e = _.formatNumber(e / 1073741824, 2, ".", "") + " GiB" : e >= 1048576 ? e = _.formatNumber(e / 1048576, 2, ".", "") + " MiB" : e >= 1024 ? e = _.formatNumber(e / 1024, 0) + " KiB" : e = _.formatNumber(e, 0) + " bytes", e -}; -_.bytesFromIP = function (e) { - return e.indexOf(".") !== -1 ? _.bytesFromIPv4(e) : e.indexOf(":") !== -1 ? _.bytesFromIPv6(e) : null -}; -_.bytesFromIPv4 = function (e) { - if (e = e.split("."), e.length !== 4) return null; - for (var t = _.createBuffer(), a = 0; a < e.length; ++a) { - var r = parseInt(e[a], 10); - if (isNaN(r)) return null; - t.putByte(r) - } - return t.getBytes() -}; -_.bytesFromIPv6 = function (e) { - var t = 0; - e = e.split(":").filter(function (s) { - return s.length === 0 && ++t, !0 - }); - for (var a = (8 - e.length + t) * 2, r = _.createBuffer(), n = 0; n < 8; ++n) { - if (!e[n] || e[n].length === 0) { - r.fillWithByte(0, a), a = 0; - continue - } - var i = _.hexToBytes(e[n]); - i.length < 2 && r.putByte(0), r.putBytes(i) - } - return r.getBytes() -}; -_.bytesToIP = function (e) { - return e.length === 4 ? _.bytesToIPv4(e) : e.length === 16 ? _.bytesToIPv6(e) : null -}; -_.bytesToIPv4 = function (e) { - if (e.length !== 4) return null; - for (var t = [], a = 0; a < e.length; ++a) t.push(e.charCodeAt(a)); - return t.join(".") -}; -_.bytesToIPv6 = function (e) { - if (e.length !== 16) return null; - for (var t = [], a = [], r = 0, n = 0; n < e.length; n += 2) { - for (var i = _.bytesToHex(e[n] + e[n + 1]); i[0] === "0" && i !== "0";) i = i.substr(1); - if (i === "0") { - var s = a[a.length - 1], - o = t.length; - !s || o !== s.end + 1 ? a.push({ - start: o, - end: o - }) : (s.end = o, s.end - s.start > a[r].end - a[r].start && (r = a.length - 1)) - } - t.push(i) - } - if (a.length > 0) { - var l = a[r]; - l.end - l.start > 0 && (t.splice(l.start, l.end - l.start + 1, ""), l.start === 0 && t.unshift(""), l.end === 7 && t.push("")) - } - return t.join(":") -}; -_.estimateCores = function (e, t) { - if (typeof e == "function" && (t = e, e = {}), e = e || {}, "cores" in _ && !e.update) return t(null, _.cores); - if (typeof navigator < "u" && "hardwareConcurrency" in navigator && navigator.hardwareConcurrency > 0) return _.cores = navigator.hardwareConcurrency, t(null, _.cores); - if (typeof Worker > "u") return _.cores = 1, t(null, _.cores); - if (typeof Blob > "u") return _.cores = 2, t(null, _.cores); - var a = URL.createObjectURL(new Blob(["(", (function () { - self.addEventListener("message", function (s) { - var o = Date.now(), - l = o + 4; - self.postMessage({ - st: o, - et: l - }) - }) - }).toString(), ")()"], { - type: "application/javascript" - })); - r([], 5, 16); - - function r(s, o, l) { - if (o === 0) { - var f = Math.floor(s.reduce(function (u, c) { - return u + c - }, 0) / s.length); - return _.cores = Math.max(1, f), URL.revokeObjectURL(a), t(null, _.cores) - } - n(l, function (u, c) { - s.push(i(l, c)), r(s, o - 1, l) - }) - } - - function n(s, o) { - for (var l = [], f = [], u = 0; u < s; ++u) { - var c = new Worker(a); - c.addEventListener("message", function (h) { - if (f.push(h.data), f.length === s) { - for (var x = 0; x < s; ++x) l[x].terminate(); - o(null, f) - } - }), l.push(c) - } - for (var u = 0; u < s; ++u) l[u].postMessage(u) - } - - function i(s, o) { - for (var l = [], f = 0; f < s; ++f) - for (var u = o[f], c = l[f] = [], h = 0; h < s; ++h) - if (f !== h) { - var x = o[h]; - (u.st > x.st && u.st < x.et || x.st > u.st && x.st < u.et) && c.push(h) - } return l.reduce(function (d, g) { - return Math.max(d, g.length) - }, 0) - } -}; -var He = le; -He.cipher = He.cipher || {}; -He.cipher.algorithms = He.cipher.algorithms || {}; -He.cipher.createCipher = function (e, t) { - var a = e; - if (typeof a == "string" && (a = He.cipher.getAlgorithm(a), a && (a = a())), !a) throw new Error("Unsupported algorithm: " + e); - return new He.cipher.BlockCipher({ - algorithm: a, - key: t, - decrypt: !1 - }) -}; -He.cipher.createDecipher = function (e, t) { - var a = e; - if (typeof a == "string" && (a = He.cipher.getAlgorithm(a), a && (a = a())), !a) throw new Error("Unsupported algorithm: " + e); - return new He.cipher.BlockCipher({ - algorithm: a, - key: t, - decrypt: !0 - }) -}; -He.cipher.registerAlgorithm = function (e, t) { - e = e.toUpperCase(), He.cipher.algorithms[e] = t -}; -He.cipher.getAlgorithm = function (e) { - return e = e.toUpperCase(), e in He.cipher.algorithms ? He.cipher.algorithms[e] : null -}; -var la = He.cipher.BlockCipher = function (e) { - this.algorithm = e.algorithm, this.mode = this.algorithm.mode, this.blockSize = this.mode.blockSize, this._finish = !1, this._input = null, this.output = null, this._op = e.decrypt ? this.mode.decrypt : this.mode.encrypt, this._decrypt = e.decrypt, this.algorithm.initialize(e) -}; -la.prototype.start = function (e) { - e = e || {}; - var t = {}; - for (var a in e) t[a] = e[a]; - t.decrypt = this._decrypt, this._finish = !1, this._input = He.util.createBuffer(), this.output = e.output || He.util.createBuffer(), this.mode.start(t) -}; -la.prototype.update = function (e) { - for (e && this._input.putBuffer(e); !this._op.call(this.mode, this._input, this.output, this._finish) && !this._finish;); - this._input.compact() -}; -la.prototype.finish = function (e) { - e && (this.mode.name === "ECB" || this.mode.name === "CBC") && (this.mode.pad = function (a) { - return e(this.blockSize, a, !1) - }, this.mode.unpad = function (a) { - return e(this.blockSize, a, !0) - }); - var t = {}; - return t.decrypt = this._decrypt, t.overflow = this._input.length() % this.blockSize, !(!this._decrypt && this.mode.pad && !this.mode.pad(this._input, t) || (this._finish = !0, this.update(), this._decrypt && this.mode.unpad && !this.mode.unpad(this.output, t)) || this.mode.afterFinish && !this.mode.afterFinish(this.output, t)) -}; -var Ke = le; -Ke.cipher = Ke.cipher || {}; -var xe = Ke.cipher.modes = Ke.cipher.modes || {}; -xe.ecb = function (e) { - e = e || {}, this.name = "ECB", this.cipher = e.cipher, this.blockSize = e.blockSize || 16, this._ints = this.blockSize / 4, this._inBlock = new Array(this._ints), this._outBlock = new Array(this._ints) -}; -xe.ecb.prototype.start = function (e) {}; -xe.ecb.prototype.encrypt = function (e, t, a) { - if (e.length() < this.blockSize && !(a && e.length() > 0)) return !0; - for (var r = 0; r < this._ints; ++r) this._inBlock[r] = e.getInt32(); - this.cipher.encrypt(this._inBlock, this._outBlock); - for (var r = 0; r < this._ints; ++r) t.putInt32(this._outBlock[r]) -}; -xe.ecb.prototype.decrypt = function (e, t, a) { - if (e.length() < this.blockSize && !(a && e.length() > 0)) return !0; - for (var r = 0; r < this._ints; ++r) this._inBlock[r] = e.getInt32(); - this.cipher.decrypt(this._inBlock, this._outBlock); - for (var r = 0; r < this._ints; ++r) t.putInt32(this._outBlock[r]) -}; -xe.ecb.prototype.pad = function (e, t) { - var a = e.length() === this.blockSize ? this.blockSize : this.blockSize - e.length(); - return e.fillWithByte(a, a), !0 -}; -xe.ecb.prototype.unpad = function (e, t) { - if (t.overflow > 0) return !1; - var a = e.length(), - r = e.at(a - 1); - return r > this.blockSize << 2 ? !1 : (e.truncate(r), !0) -}; -xe.cbc = function (e) { - e = e || {}, this.name = "CBC", this.cipher = e.cipher, this.blockSize = e.blockSize || 16, this._ints = this.blockSize / 4, this._inBlock = new Array(this._ints), this._outBlock = new Array(this._ints) -}; -xe.cbc.prototype.start = function (e) { - if (e.iv === null) { - if (!this._prev) throw new Error("Invalid IV parameter."); - this._iv = this._prev.slice(0) - } else if ("iv" in e) this._iv = qr(e.iv, this.blockSize), this._prev = this._iv.slice(0); - else throw new Error("Invalid IV parameter.") -}; -xe.cbc.prototype.encrypt = function (e, t, a) { - if (e.length() < this.blockSize && !(a && e.length() > 0)) return !0; - for (var r = 0; r < this._ints; ++r) this._inBlock[r] = this._prev[r] ^ e.getInt32(); - this.cipher.encrypt(this._inBlock, this._outBlock); - for (var r = 0; r < this._ints; ++r) t.putInt32(this._outBlock[r]); - this._prev = this._outBlock -}; -xe.cbc.prototype.decrypt = function (e, t, a) { - if (e.length() < this.blockSize && !(a && e.length() > 0)) return !0; - for (var r = 0; r < this._ints; ++r) this._inBlock[r] = e.getInt32(); - this.cipher.decrypt(this._inBlock, this._outBlock); - for (var r = 0; r < this._ints; ++r) t.putInt32(this._prev[r] ^ this._outBlock[r]); - this._prev = this._inBlock.slice(0) -}; -xe.cbc.prototype.pad = function (e, t) { - var a = e.length() === this.blockSize ? this.blockSize : this.blockSize - e.length(); - return e.fillWithByte(a, a), !0 -}; -xe.cbc.prototype.unpad = function (e, t) { - if (t.overflow > 0) return !1; - var a = e.length(), - r = e.at(a - 1); - return r > this.blockSize << 2 ? !1 : (e.truncate(r), !0) -}; -xe.cfb = function (e) { - e = e || {}, this.name = "CFB", this.cipher = e.cipher, this.blockSize = e.blockSize || 16, this._ints = this.blockSize / 4, this._inBlock = null, this._outBlock = new Array(this._ints), this._partialBlock = new Array(this._ints), this._partialOutput = Ke.util.createBuffer(), this._partialBytes = 0 -}; -xe.cfb.prototype.start = function (e) { - if (!("iv" in e)) throw new Error("Invalid IV parameter."); - this._iv = qr(e.iv, this.blockSize), this._inBlock = this._iv.slice(0), this._partialBytes = 0 -}; -xe.cfb.prototype.encrypt = function (e, t, a) { - var r = e.length(); - if (r === 0) return !0; - if (this.cipher.encrypt(this._inBlock, this._outBlock), this._partialBytes === 0 && r >= this.blockSize) { - for (var n = 0; n < this._ints; ++n) this._inBlock[n] = e.getInt32() ^ this._outBlock[n], t.putInt32(this._inBlock[n]); - return - } - var i = (this.blockSize - r) % this.blockSize; - i > 0 && (i = this.blockSize - i), this._partialOutput.clear(); - for (var n = 0; n < this._ints; ++n) this._partialBlock[n] = e.getInt32() ^ this._outBlock[n], this._partialOutput.putInt32(this._partialBlock[n]); - if (i > 0) e.read -= this.blockSize; - else - for (var n = 0; n < this._ints; ++n) this._inBlock[n] = this._partialBlock[n]; - if (this._partialBytes > 0 && this._partialOutput.getBytes(this._partialBytes), i > 0 && !a) return t.putBytes(this._partialOutput.getBytes(i - this._partialBytes)), this._partialBytes = i, !0; - t.putBytes(this._partialOutput.getBytes(r - this._partialBytes)), this._partialBytes = 0 -}; -xe.cfb.prototype.decrypt = function (e, t, a) { - var r = e.length(); - if (r === 0) return !0; - if (this.cipher.encrypt(this._inBlock, this._outBlock), this._partialBytes === 0 && r >= this.blockSize) { - for (var n = 0; n < this._ints; ++n) this._inBlock[n] = e.getInt32(), t.putInt32(this._inBlock[n] ^ this._outBlock[n]); - return - } - var i = (this.blockSize - r) % this.blockSize; - i > 0 && (i = this.blockSize - i), this._partialOutput.clear(); - for (var n = 0; n < this._ints; ++n) this._partialBlock[n] = e.getInt32(), this._partialOutput.putInt32(this._partialBlock[n] ^ this._outBlock[n]); - if (i > 0) e.read -= this.blockSize; - else - for (var n = 0; n < this._ints; ++n) this._inBlock[n] = this._partialBlock[n]; - if (this._partialBytes > 0 && this._partialOutput.getBytes(this._partialBytes), i > 0 && !a) return t.putBytes(this._partialOutput.getBytes(i - this._partialBytes)), this._partialBytes = i, !0; - t.putBytes(this._partialOutput.getBytes(r - this._partialBytes)), this._partialBytes = 0 -}; -xe.ofb = function (e) { - e = e || {}, this.name = "OFB", this.cipher = e.cipher, this.blockSize = e.blockSize || 16, this._ints = this.blockSize / 4, this._inBlock = null, this._outBlock = new Array(this._ints), this._partialOutput = Ke.util.createBuffer(), this._partialBytes = 0 -}; -xe.ofb.prototype.start = function (e) { - if (!("iv" in e)) throw new Error("Invalid IV parameter."); - this._iv = qr(e.iv, this.blockSize), this._inBlock = this._iv.slice(0), this._partialBytes = 0 -}; -xe.ofb.prototype.encrypt = function (e, t, a) { - var r = e.length(); - if (e.length() === 0) return !0; - if (this.cipher.encrypt(this._inBlock, this._outBlock), this._partialBytes === 0 && r >= this.blockSize) { - for (var n = 0; n < this._ints; ++n) t.putInt32(e.getInt32() ^ this._outBlock[n]), this._inBlock[n] = this._outBlock[n]; - return - } - var i = (this.blockSize - r) % this.blockSize; - i > 0 && (i = this.blockSize - i), this._partialOutput.clear(); - for (var n = 0; n < this._ints; ++n) this._partialOutput.putInt32(e.getInt32() ^ this._outBlock[n]); - if (i > 0) e.read -= this.blockSize; - else - for (var n = 0; n < this._ints; ++n) this._inBlock[n] = this._outBlock[n]; - if (this._partialBytes > 0 && this._partialOutput.getBytes(this._partialBytes), i > 0 && !a) return t.putBytes(this._partialOutput.getBytes(i - this._partialBytes)), this._partialBytes = i, !0; - t.putBytes(this._partialOutput.getBytes(r - this._partialBytes)), this._partialBytes = 0 -}; -xe.ofb.prototype.decrypt = xe.ofb.prototype.encrypt; -xe.ctr = function (e) { - e = e || {}, this.name = "CTR", this.cipher = e.cipher, this.blockSize = e.blockSize || 16, this._ints = this.blockSize / 4, this._inBlock = null, this._outBlock = new Array(this._ints), this._partialOutput = Ke.util.createBuffer(), this._partialBytes = 0 -}; -xe.ctr.prototype.start = function (e) { - if (!("iv" in e)) throw new Error("Invalid IV parameter."); - this._iv = qr(e.iv, this.blockSize), this._inBlock = this._iv.slice(0), this._partialBytes = 0 -}; -xe.ctr.prototype.encrypt = function (e, t, a) { - var r = e.length(); - if (r === 0) return !0; - if (this.cipher.encrypt(this._inBlock, this._outBlock), this._partialBytes === 0 && r >= this.blockSize) - for (var n = 0; n < this._ints; ++n) t.putInt32(e.getInt32() ^ this._outBlock[n]); - else { - var i = (this.blockSize - r) % this.blockSize; - i > 0 && (i = this.blockSize - i), this._partialOutput.clear(); - for (var n = 0; n < this._ints; ++n) this._partialOutput.putInt32(e.getInt32() ^ this._outBlock[n]); - if (i > 0 && (e.read -= this.blockSize), this._partialBytes > 0 && this._partialOutput.getBytes(this._partialBytes), i > 0 && !a) return t.putBytes(this._partialOutput.getBytes(i - this._partialBytes)), this._partialBytes = i, !0; - t.putBytes(this._partialOutput.getBytes(r - this._partialBytes)), this._partialBytes = 0 - } - zr(this._inBlock) -}; -xe.ctr.prototype.decrypt = xe.ctr.prototype.encrypt; -xe.gcm = function (e) { - e = e || {}, this.name = "GCM", this.cipher = e.cipher, this.blockSize = e.blockSize || 16, this._ints = this.blockSize / 4, this._inBlock = new Array(this._ints), this._outBlock = new Array(this._ints), this._partialOutput = Ke.util.createBuffer(), this._partialBytes = 0, this._R = 3774873600 -}; -xe.gcm.prototype.start = function (e) { - if (!("iv" in e)) throw new Error("Invalid IV parameter."); - var t = Ke.util.createBuffer(e.iv); - this._cipherLength = 0; - var a; - if ("additionalData" in e ? a = Ke.util.createBuffer(e.additionalData) : a = Ke.util.createBuffer(), "tagLength" in e ? this._tagLength = e.tagLength : this._tagLength = 128, this._tag = null, e.decrypt && (this._tag = Ke.util.createBuffer(e.tag).getBytes(), this._tag.length !== this._tagLength / 8)) throw new Error("Authentication tag does not match tag length."); - this._hashBlock = new Array(this._ints), this.tag = null, this._hashSubkey = new Array(this._ints), this.cipher.encrypt([0, 0, 0, 0], this._hashSubkey), this.componentBits = 4, this._m = this.generateHashTable(this._hashSubkey, this.componentBits); - var r = t.length(); - if (r === 12) this._j0 = [t.getInt32(), t.getInt32(), t.getInt32(), 1]; - else { - for (this._j0 = [0, 0, 0, 0]; t.length() > 0;) this._j0 = this.ghash(this._hashSubkey, this._j0, [t.getInt32(), t.getInt32(), t.getInt32(), t.getInt32()]); - this._j0 = this.ghash(this._hashSubkey, this._j0, [0, 0].concat(K0(r * 8))) - } - this._inBlock = this._j0.slice(0), zr(this._inBlock), this._partialBytes = 0, a = Ke.util.createBuffer(a), this._aDataLength = K0(a.length() * 8); - var n = a.length() % this.blockSize; - for (n && a.fillWithByte(0, this.blockSize - n), this._s = [0, 0, 0, 0]; a.length() > 0;) this._s = this.ghash(this._hashSubkey, this._s, [a.getInt32(), a.getInt32(), a.getInt32(), a.getInt32()]) -}; -xe.gcm.prototype.encrypt = function (e, t, a) { - var r = e.length(); - if (r === 0) return !0; - if (this.cipher.encrypt(this._inBlock, this._outBlock), this._partialBytes === 0 && r >= this.blockSize) { - for (var n = 0; n < this._ints; ++n) t.putInt32(this._outBlock[n] ^= e.getInt32()); - this._cipherLength += this.blockSize - } else { - var i = (this.blockSize - r) % this.blockSize; - i > 0 && (i = this.blockSize - i), this._partialOutput.clear(); - for (var n = 0; n < this._ints; ++n) this._partialOutput.putInt32(e.getInt32() ^ this._outBlock[n]); - if (i <= 0 || a) { - if (a) { - var s = r % this.blockSize; - this._cipherLength += s, this._partialOutput.truncate(this.blockSize - s) - } else this._cipherLength += this.blockSize; - for (var n = 0; n < this._ints; ++n) this._outBlock[n] = this._partialOutput.getInt32(); - this._partialOutput.read -= this.blockSize - } - if (this._partialBytes > 0 && this._partialOutput.getBytes(this._partialBytes), i > 0 && !a) return e.read -= this.blockSize, t.putBytes(this._partialOutput.getBytes(i - this._partialBytes)), this._partialBytes = i, !0; - t.putBytes(this._partialOutput.getBytes(r - this._partialBytes)), this._partialBytes = 0 - } - this._s = this.ghash(this._hashSubkey, this._s, this._outBlock), zr(this._inBlock) -}; -xe.gcm.prototype.decrypt = function (e, t, a) { - var r = e.length(); - if (r < this.blockSize && !(a && r > 0)) return !0; - this.cipher.encrypt(this._inBlock, this._outBlock), zr(this._inBlock), this._hashBlock[0] = e.getInt32(), this._hashBlock[1] = e.getInt32(), this._hashBlock[2] = e.getInt32(), this._hashBlock[3] = e.getInt32(), this._s = this.ghash(this._hashSubkey, this._s, this._hashBlock); - for (var n = 0; n < this._ints; ++n) t.putInt32(this._outBlock[n] ^ this._hashBlock[n]); - r < this.blockSize ? this._cipherLength += r % this.blockSize : this._cipherLength += this.blockSize -}; -xe.gcm.prototype.afterFinish = function (e, t) { - var a = !0; - t.decrypt && t.overflow && e.truncate(this.blockSize - t.overflow), this.tag = Ke.util.createBuffer(); - var r = this._aDataLength.concat(K0(this._cipherLength * 8)); - this._s = this.ghash(this._hashSubkey, this._s, r); - var n = []; - this.cipher.encrypt(this._j0, n); - for (var i = 0; i < this._ints; ++i) this.tag.putInt32(this._s[i] ^ n[i]); - return this.tag.truncate(this.tag.length() % (this._tagLength / 8)), t.decrypt && this.tag.bytes() !== this._tag && (a = !1), a -}; -xe.gcm.prototype.multiply = function (e, t) { - for (var a = [0, 0, 0, 0], r = t.slice(0), n = 0; n < 128; ++n) { - var i = e[n / 32 | 0] & 1 << 31 - n % 32; - i && (a[0] ^= r[0], a[1] ^= r[1], a[2] ^= r[2], a[3] ^= r[3]), this.pow(r, r) - } - return a -}; -xe.gcm.prototype.pow = function (e, t) { - for (var a = e[3] & 1, r = 3; r > 0; --r) t[r] = e[r] >>> 1 | (e[r - 1] & 1) << 31; - t[0] = e[0] >>> 1, a && (t[0] ^= this._R) -}; -xe.gcm.prototype.tableMultiply = function (e) { - for (var t = [0, 0, 0, 0], a = 0; a < 32; ++a) { - var r = a / 8 | 0, - n = e[r] >>> (7 - a % 8) * 4 & 15, - i = this._m[a][n]; - t[0] ^= i[0], t[1] ^= i[1], t[2] ^= i[2], t[3] ^= i[3] - } - return t -}; -xe.gcm.prototype.ghash = function (e, t, a) { - return t[0] ^= a[0], t[1] ^= a[1], t[2] ^= a[2], t[3] ^= a[3], this.tableMultiply(t) -}; -xe.gcm.prototype.generateHashTable = function (e, t) { - for (var a = 8 / t, r = 4 * a, n = 16 * a, i = new Array(n), s = 0; s < n; ++s) { - var o = [0, 0, 0, 0], - l = s / r | 0, - f = (r - 1 - s % r) * t; - o[l] = 1 << t - 1 << f, i[s] = this.generateSubHashTable(this.multiply(o, e), t) - } - return i -}; -xe.gcm.prototype.generateSubHashTable = function (e, t) { - var a = 1 << t, - r = a >>> 1, - n = new Array(a); - n[r] = e.slice(0); - for (var i = r >>> 1; i > 0;) this.pow(n[2 * i], n[i] = []), i >>= 1; - for (i = 2; i < r;) { - for (var s = 1; s < i; ++s) { - var o = n[i], - l = n[s]; - n[i + s] = [o[0] ^ l[0], o[1] ^ l[1], o[2] ^ l[2], o[3] ^ l[3]] - } - i *= 2 - } - for (n[0] = [0, 0, 0, 0], i = r + 1; i < a; ++i) { - var f = n[i ^ r]; - n[i] = [e[0] ^ f[0], e[1] ^ f[1], e[2] ^ f[2], e[3] ^ f[3]] - } - return n -}; - -function qr(e, t) { - if (typeof e == "string" && (e = Ke.util.createBuffer(e)), Ke.util.isArray(e) && e.length > 4) { - var a = e; - e = Ke.util.createBuffer(); - for (var r = 0; r < a.length; ++r) e.putByte(a[r]) - } - if (e.length() < t) throw new Error("Invalid IV length; got " + e.length() + " bytes and expected " + t + " bytes."); - if (!Ke.util.isArray(e)) { - for (var n = [], i = t / 4, r = 0; r < i; ++r) n.push(e.getInt32()); - e = n - } - return e -} - -function zr(e) { - e[e.length - 1] = e[e.length - 1] + 1 & 4294967295 -} - -function K0(e) { - return [e / 4294967296 | 0, e & 4294967295] -} -var Ie = le; -Ie.aes = Ie.aes || {}; -Ie.aes.startEncrypting = function (e, t, a, r) { - var n = Gr({ - key: e, - output: a, - decrypt: !1, - mode: r - }); - return n.start(t), n -}; -Ie.aes.createEncryptionCipher = function (e, t) { - return Gr({ - key: e, - output: null, - decrypt: !1, - mode: t - }) -}; -Ie.aes.startDecrypting = function (e, t, a, r) { - var n = Gr({ - key: e, - output: a, - decrypt: !0, - mode: r - }); - return n.start(t), n -}; -Ie.aes.createDecryptionCipher = function (e, t) { - return Gr({ - key: e, - output: null, - decrypt: !0, - mode: t - }) -}; -Ie.aes.Algorithm = function (e, t) { - ca || jn(); - var a = this; - a.name = e, a.mode = new t({ - blockSize: 16, - cipher: { - encrypt: function (r, n) { - return M0(a._w, r, n, !1) - }, - decrypt: function (r, n) { - return M0(a._w, r, n, !0) - } - } - }), a._init = !1 -}; -Ie.aes.Algorithm.prototype.initialize = function (e) { - if (!this._init) { - var t = e.key, - a; - if (typeof t == "string" && (t.length === 16 || t.length === 24 || t.length === 32)) t = Ie.util.createBuffer(t); - else if (Ie.util.isArray(t) && (t.length === 16 || t.length === 24 || t.length === 32)) { - a = t, t = Ie.util.createBuffer(); - for (var r = 0; r < a.length; ++r) t.putByte(a[r]) - } - if (!Ie.util.isArray(t)) { - a = t, t = []; - var n = a.length(); - if (n === 16 || n === 24 || n === 32) { - n = n >>> 2; - for (var r = 0; r < n; ++r) t.push(a.getInt32()) - } - } - if (!Ie.util.isArray(t) || !(t.length === 4 || t.length === 6 || t.length === 8)) throw new Error("Invalid key parameter."); - var i = this.mode.name, - s = ["CFB", "OFB", "CTR", "GCM"].indexOf(i) !== -1; - this._w = Zn(t, e.decrypt && !s), this._init = !0 - } -}; -Ie.aes._expandKey = function (e, t) { - return ca || jn(), Zn(e, t) -}; -Ie.aes._updateBlock = M0; -tr("AES-ECB", Ie.cipher.modes.ecb); -tr("AES-CBC", Ie.cipher.modes.cbc); -tr("AES-CFB", Ie.cipher.modes.cfb); -tr("AES-OFB", Ie.cipher.modes.ofb); -tr("AES-CTR", Ie.cipher.modes.ctr); -tr("AES-GCM", Ie.cipher.modes.gcm); - -function tr(e, t) { - var a = function () { - return new Ie.aes.Algorithm(e, t) - }; - Ie.cipher.registerAlgorithm(e, a) -} -var ca = !1, - Wt = 4, - Qe, H0, $n, Ot, ut; - -function jn() { - ca = !0, $n = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54]; - for (var e = new Array(256), t = 0; t < 128; ++t) e[t] = t << 1, e[t + 128] = t + 128 << 1 ^ 283; - Qe = new Array(256), H0 = new Array(256), Ot = new Array(4), ut = new Array(4); - for (var t = 0; t < 4; ++t) Ot[t] = new Array(256), ut[t] = new Array(256); - for (var a = 0, r = 0, n, i, s, o, l, f, u, t = 0; t < 256; ++t) { - o = r ^ r << 1 ^ r << 2 ^ r << 3 ^ r << 4, o = o >> 8 ^ o & 255 ^ 99, Qe[a] = o, H0[o] = a, l = e[o], n = e[a], i = e[n], s = e[i], f = l << 24 ^ o << 16 ^ o << 8 ^ (o ^ l), u = (n ^ i ^ s) << 24 ^ (a ^ s) << 16 ^ (a ^ i ^ s) << 8 ^ (a ^ n ^ s); - for (var c = 0; c < 4; ++c) Ot[c][a] = f, ut[c][o] = u, f = f << 24 | f >>> 8, u = u << 24 | u >>> 8; - a === 0 ? a = r = 1 : (a = n ^ e[e[e[n ^ s]]], r ^= e[e[r]]) - } -} - -function Zn(e, t) { - for (var a = e.slice(0), r, n = 1, i = a.length, s = i + 6 + 1, o = Wt * s, l = i; l < o; ++l) r = a[l - 1], l % i === 0 ? (r = Qe[r >>> 16 & 255] << 24 ^ Qe[r >>> 8 & 255] << 16 ^ Qe[r & 255] << 8 ^ Qe[r >>> 24] ^ $n[n] << 24, n++) : i > 6 && l % i === 4 && (r = Qe[r >>> 24] << 24 ^ Qe[r >>> 16 & 255] << 16 ^ Qe[r >>> 8 & 255] << 8 ^ Qe[r & 255]), a[l] = a[l - i] ^ r; - if (t) { - var f, u = ut[0], - c = ut[1], - h = ut[2], - x = ut[3], - d = a.slice(0); - o = a.length; - for (var l = 0, g = o - Wt; l < o; l += Wt, g -= Wt) - if (l === 0 || l === o - Wt) d[l] = a[g], d[l + 1] = a[g + 3], d[l + 2] = a[g + 2], d[l + 3] = a[g + 1]; - else - for (var v = 0; v < Wt; ++v) f = a[g + v], d[l + (3 & -v)] = u[Qe[f >>> 24]] ^ c[Qe[f >>> 16 & 255]] ^ h[Qe[f >>> 8 & 255]] ^ x[Qe[f & 255]]; - a = d - } - return a -} - -function M0(e, t, a, r) { - var n = e.length / 4 - 1, - i, s, o, l, f; - r ? (i = ut[0], s = ut[1], o = ut[2], l = ut[3], f = H0) : (i = Ot[0], s = Ot[1], o = Ot[2], l = Ot[3], f = Qe); - var u, c, h, x, d, g, v; - u = t[0] ^ e[0], c = t[r ? 3 : 1] ^ e[1], h = t[2] ^ e[2], x = t[r ? 1 : 3] ^ e[3]; - for (var B = 3, E = 1; E < n; ++E) d = i[u >>> 24] ^ s[c >>> 16 & 255] ^ o[h >>> 8 & 255] ^ l[x & 255] ^ e[++B], g = i[c >>> 24] ^ s[h >>> 16 & 255] ^ o[x >>> 8 & 255] ^ l[u & 255] ^ e[++B], v = i[h >>> 24] ^ s[x >>> 16 & 255] ^ o[u >>> 8 & 255] ^ l[c & 255] ^ e[++B], x = i[x >>> 24] ^ s[u >>> 16 & 255] ^ o[c >>> 8 & 255] ^ l[h & 255] ^ e[++B], u = d, c = g, h = v; - a[0] = f[u >>> 24] << 24 ^ f[c >>> 16 & 255] << 16 ^ f[h >>> 8 & 255] << 8 ^ f[x & 255] ^ e[++B], a[r ? 3 : 1] = f[c >>> 24] << 24 ^ f[h >>> 16 & 255] << 16 ^ f[x >>> 8 & 255] << 8 ^ f[u & 255] ^ e[++B], a[2] = f[h >>> 24] << 24 ^ f[x >>> 16 & 255] << 16 ^ f[u >>> 8 & 255] << 8 ^ f[c & 255] ^ e[++B], a[r ? 1 : 3] = f[x >>> 24] << 24 ^ f[u >>> 16 & 255] << 16 ^ f[c >>> 8 & 255] << 8 ^ f[h & 255] ^ e[++B] -} - -function Gr(e) { - e = e || {}; - var t = (e.mode || "CBC").toUpperCase(), - a = "AES-" + t, - r; - e.decrypt ? r = Ie.cipher.createDecipher(a, e.key) : r = Ie.cipher.createCipher(a, e.key); - var n = r.start; - return r.start = function (i, s) { - var o = null; - s instanceof Ie.util.ByteBuffer && (o = s, s = {}), s = s || {}, s.output = o, s.iv = i, n.call(r, s) - }, r -} -var xr = le; -xr.pki = xr.pki || {}; -var q0 = xr.pki.oids = xr.oids = xr.oids || {}; - -function z(e, t) { - q0[e] = t, q0[t] = e -} - -function Ae(e, t) { - q0[e] = t -} -z("1.2.840.113549.1.1.1", "rsaEncryption"); -z("1.2.840.113549.1.1.4", "md5WithRSAEncryption"); -z("1.2.840.113549.1.1.5", "sha1WithRSAEncryption"); -z("1.2.840.113549.1.1.7", "RSAES-OAEP"); -z("1.2.840.113549.1.1.8", "mgf1"); -z("1.2.840.113549.1.1.9", "pSpecified"); -z("1.2.840.113549.1.1.10", "RSASSA-PSS"); -z("1.2.840.113549.1.1.11", "sha256WithRSAEncryption"); -z("1.2.840.113549.1.1.12", "sha384WithRSAEncryption"); -z("1.2.840.113549.1.1.13", "sha512WithRSAEncryption"); -z("1.3.101.112", "EdDSA25519"); -z("1.2.840.10040.4.3", "dsa-with-sha1"); -z("1.3.14.3.2.7", "desCBC"); -z("1.3.14.3.2.26", "sha1"); -z("1.3.14.3.2.29", "sha1WithRSASignature"); -z("2.16.840.1.101.3.4.2.1", "sha256"); -z("2.16.840.1.101.3.4.2.2", "sha384"); -z("2.16.840.1.101.3.4.2.3", "sha512"); -z("2.16.840.1.101.3.4.2.4", "sha224"); -z("2.16.840.1.101.3.4.2.5", "sha512-224"); -z("2.16.840.1.101.3.4.2.6", "sha512-256"); -z("1.2.840.113549.2.2", "md2"); -z("1.2.840.113549.2.5", "md5"); -z("1.2.840.113549.1.7.1", "data"); -z("1.2.840.113549.1.7.2", "signedData"); -z("1.2.840.113549.1.7.3", "envelopedData"); -z("1.2.840.113549.1.7.4", "signedAndEnvelopedData"); -z("1.2.840.113549.1.7.5", "digestedData"); -z("1.2.840.113549.1.7.6", "encryptedData"); -z("1.2.840.113549.1.9.1", "emailAddress"); -z("1.2.840.113549.1.9.2", "unstructuredName"); -z("1.2.840.113549.1.9.3", "contentType"); -z("1.2.840.113549.1.9.4", "messageDigest"); -z("1.2.840.113549.1.9.5", "signingTime"); -z("1.2.840.113549.1.9.6", "counterSignature"); -z("1.2.840.113549.1.9.7", "challengePassword"); -z("1.2.840.113549.1.9.8", "unstructuredAddress"); -z("1.2.840.113549.1.9.14", "extensionRequest"); -z("1.2.840.113549.1.9.20", "friendlyName"); -z("1.2.840.113549.1.9.21", "localKeyId"); -z("1.2.840.113549.1.9.22.1", "x509Certificate"); -z("1.2.840.113549.1.12.10.1.1", "keyBag"); -z("1.2.840.113549.1.12.10.1.2", "pkcs8ShroudedKeyBag"); -z("1.2.840.113549.1.12.10.1.3", "certBag"); -z("1.2.840.113549.1.12.10.1.4", "crlBag"); -z("1.2.840.113549.1.12.10.1.5", "secretBag"); -z("1.2.840.113549.1.12.10.1.6", "safeContentsBag"); -z("1.2.840.113549.1.5.13", "pkcs5PBES2"); -z("1.2.840.113549.1.5.12", "pkcs5PBKDF2"); -z("1.2.840.113549.1.12.1.1", "pbeWithSHAAnd128BitRC4"); -z("1.2.840.113549.1.12.1.2", "pbeWithSHAAnd40BitRC4"); -z("1.2.840.113549.1.12.1.3", "pbeWithSHAAnd3-KeyTripleDES-CBC"); -z("1.2.840.113549.1.12.1.4", "pbeWithSHAAnd2-KeyTripleDES-CBC"); -z("1.2.840.113549.1.12.1.5", "pbeWithSHAAnd128BitRC2-CBC"); -z("1.2.840.113549.1.12.1.6", "pbewithSHAAnd40BitRC2-CBC"); -z("1.2.840.113549.2.7", "hmacWithSHA1"); -z("1.2.840.113549.2.8", "hmacWithSHA224"); -z("1.2.840.113549.2.9", "hmacWithSHA256"); -z("1.2.840.113549.2.10", "hmacWithSHA384"); -z("1.2.840.113549.2.11", "hmacWithSHA512"); -z("1.2.840.113549.3.7", "des-EDE3-CBC"); -z("2.16.840.1.101.3.4.1.2", "aes128-CBC"); -z("2.16.840.1.101.3.4.1.22", "aes192-CBC"); -z("2.16.840.1.101.3.4.1.42", "aes256-CBC"); -z("2.5.4.3", "commonName"); -z("2.5.4.4", "surname"); -z("2.5.4.5", "serialNumber"); -z("2.5.4.6", "countryName"); -z("2.5.4.7", "localityName"); -z("2.5.4.8", "stateOrProvinceName"); -z("2.5.4.9", "streetAddress"); -z("2.5.4.10", "organizationName"); -z("2.5.4.11", "organizationalUnitName"); -z("2.5.4.12", "title"); -z("2.5.4.13", "description"); -z("2.5.4.15", "businessCategory"); -z("2.5.4.17", "postalCode"); -z("2.5.4.42", "givenName"); -z("1.3.6.1.4.1.311.60.2.1.2", "jurisdictionOfIncorporationStateOrProvinceName"); -z("1.3.6.1.4.1.311.60.2.1.3", "jurisdictionOfIncorporationCountryName"); -z("2.16.840.1.113730.1.1", "nsCertType"); -z("2.16.840.1.113730.1.13", "nsComment"); -Ae("2.5.29.1", "authorityKeyIdentifier"); -Ae("2.5.29.2", "keyAttributes"); -Ae("2.5.29.3", "certificatePolicies"); -Ae("2.5.29.4", "keyUsageRestriction"); -Ae("2.5.29.5", "policyMapping"); -Ae("2.5.29.6", "subtreesConstraint"); -Ae("2.5.29.7", "subjectAltName"); -Ae("2.5.29.8", "issuerAltName"); -Ae("2.5.29.9", "subjectDirectoryAttributes"); -Ae("2.5.29.10", "basicConstraints"); -Ae("2.5.29.11", "nameConstraints"); -Ae("2.5.29.12", "policyConstraints"); -Ae("2.5.29.13", "basicConstraints"); -z("2.5.29.14", "subjectKeyIdentifier"); -z("2.5.29.15", "keyUsage"); -Ae("2.5.29.16", "privateKeyUsagePeriod"); -z("2.5.29.17", "subjectAltName"); -z("2.5.29.18", "issuerAltName"); -z("2.5.29.19", "basicConstraints"); -Ae("2.5.29.20", "cRLNumber"); -Ae("2.5.29.21", "cRLReason"); -Ae("2.5.29.22", "expirationDate"); -Ae("2.5.29.23", "instructionCode"); -Ae("2.5.29.24", "invalidityDate"); -Ae("2.5.29.25", "cRLDistributionPoints"); -Ae("2.5.29.26", "issuingDistributionPoint"); -Ae("2.5.29.27", "deltaCRLIndicator"); -Ae("2.5.29.28", "issuingDistributionPoint"); -Ae("2.5.29.29", "certificateIssuer"); -Ae("2.5.29.30", "nameConstraints"); -z("2.5.29.31", "cRLDistributionPoints"); -z("2.5.29.32", "certificatePolicies"); -Ae("2.5.29.33", "policyMappings"); -Ae("2.5.29.34", "policyConstraints"); -z("2.5.29.35", "authorityKeyIdentifier"); -Ae("2.5.29.36", "policyConstraints"); -z("2.5.29.37", "extKeyUsage"); -Ae("2.5.29.46", "freshestCRL"); -Ae("2.5.29.54", "inhibitAnyPolicy"); -z("1.3.6.1.4.1.11129.2.4.2", "timestampList"); -z("1.3.6.1.5.5.7.1.1", "authorityInfoAccess"); -z("1.3.6.1.5.5.7.3.1", "serverAuth"); -z("1.3.6.1.5.5.7.3.2", "clientAuth"); -z("1.3.6.1.5.5.7.3.3", "codeSigning"); -z("1.3.6.1.5.5.7.3.4", "emailProtection"); -z("1.3.6.1.5.5.7.3.8", "timeStamping"); -var _e = le, - Y = _e.asn1 = _e.asn1 || {}; -Y.Class = { - UNIVERSAL: 0, - APPLICATION: 64, - CONTEXT_SPECIFIC: 128, - PRIVATE: 192 -}; -Y.Type = { - NONE: 0, - BOOLEAN: 1, - INTEGER: 2, - BITSTRING: 3, - OCTETSTRING: 4, - NULL: 5, - OID: 6, - ODESC: 7, - EXTERNAL: 8, - REAL: 9, - ENUMERATED: 10, - EMBEDDED: 11, - UTF8: 12, - ROID: 13, - SEQUENCE: 16, - SET: 17, - PRINTABLESTRING: 19, - IA5STRING: 22, - UTCTIME: 23, - GENERALIZEDTIME: 24, - BMPSTRING: 30 -}; -Y.create = function (e, t, a, r, n) { - if (_e.util.isArray(r)) { - for (var i = [], s = 0; s < r.length; ++s) r[s] !== void 0 && i.push(r[s]); - r = i - } - var o = { - tagClass: e, - type: t, - constructed: a, - composed: a || _e.util.isArray(r), - value: r - }; - return n && "bitStringContents" in n && (o.bitStringContents = n.bitStringContents, o.original = Y.copy(o)), o -}; -Y.copy = function (e, t) { - var a; - if (_e.util.isArray(e)) { - a = []; - for (var r = 0; r < e.length; ++r) a.push(Y.copy(e[r], t)); - return a - } - return typeof e == "string" ? e : (a = { - tagClass: e.tagClass, - type: e.type, - constructed: e.constructed, - composed: e.composed, - value: Y.copy(e.value, t) - }, t && !t.excludeBitStringContents && (a.bitStringContents = e.bitStringContents), a) -}; -Y.equals = function (e, t, a) { - if (_e.util.isArray(e)) { - if (!_e.util.isArray(t) || e.length !== t.length) return !1; - for (var r = 0; r < e.length; ++r) - if (!Y.equals(e[r], t[r])) return !1; - return !0 - } - if (typeof e != typeof t) return !1; - if (typeof e == "string") return e === t; - var n = e.tagClass === t.tagClass && e.type === t.type && e.constructed === t.constructed && e.composed === t.composed && Y.equals(e.value, t.value); - return a && a.includeBitStringContents && (n = n && e.bitStringContents === t.bitStringContents), n -}; -Y.getBerValueLength = function (e) { - var t = e.getByte(); - if (t !== 128) { - var a, r = t & 128; - return r ? a = e.getInt((t & 127) << 3) : a = t, a - } -}; - -function hr(e, t, a) { - if (a > t) { - var r = new Error("Too few bytes to parse DER."); - throw r.available = e.length(), r.remaining = t, r.requested = a, r - } -} -var Us = function (e, t) { - var a = e.getByte(); - if (t--, a !== 128) { - var r, n = a & 128; - if (!n) r = a; - else { - var i = a & 127; - hr(e, t, i), r = e.getInt(i << 3) - } - if (r < 0) throw new Error("Negative length: " + r); - return r - } -}; -Y.fromDer = function (e, t) { - t === void 0 && (t = { - strict: !0, - parseAllBytes: !0, - decodeBitStrings: !0 - }), typeof t == "boolean" && (t = { - strict: t, - parseAllBytes: !0, - decodeBitStrings: !0 - }), "strict" in t || (t.strict = !0), "parseAllBytes" in t || (t.parseAllBytes = !0), "decodeBitStrings" in t || (t.decodeBitStrings = !0), typeof e == "string" && (e = _e.util.createBuffer(e)); - var a = e.length(), - r = Ir(e, e.length(), 0, t); - if (t.parseAllBytes && e.length() !== 0) { - var n = new Error("Unparsed DER bytes remain after ASN.1 parsing."); - throw n.byteCount = a, n.remaining = e.length(), n - } - return r -}; - -function Ir(e, t, a, r) { - var n; - hr(e, t, 2); - var i = e.getByte(); - t--; - var s = i & 192, - o = i & 31; - n = e.length(); - var l = Us(e, t); - if (t -= n - e.length(), l !== void 0 && l > t) { - if (r.strict) { - var f = new Error("Too few bytes to read ASN.1 value."); - throw f.available = e.length(), f.remaining = t, f.requested = l, f - } - l = t - } - var u, c, h = (i & 32) === 32; - if (h) - if (u = [], l === void 0) - for (;;) { - if (hr(e, t, 2), e.bytes(2) === "\0\0") { - e.getBytes(2), t -= 2; - break - } - n = e.length(), u.push(Ir(e, t, a + 1, r)), t -= n - e.length() - } else - for (; l > 0;) n = e.length(), u.push(Ir(e, l, a + 1, r)), t -= n - e.length(), l -= n - e.length(); - if (u === void 0 && s === Y.Class.UNIVERSAL && o === Y.Type.BITSTRING && (c = e.bytes(l)), u === void 0 && r.decodeBitStrings && s === Y.Class.UNIVERSAL && o === Y.Type.BITSTRING && l > 1) { - var x = e.read, - d = t, - g = 0; - if (o === Y.Type.BITSTRING && (hr(e, t, 1), g = e.getByte(), t--), g === 0) try { - n = e.length(); - var v = { - strict: !0, - decodeBitStrings: !0 - }, - B = Ir(e, t, a + 1, v), - E = n - e.length(); - t -= E, o == Y.Type.BITSTRING && E++; - var m = B.tagClass; - E === l && (m === Y.Class.UNIVERSAL || m === Y.Class.CONTEXT_SPECIFIC) && (u = [B]) - } catch {} - u === void 0 && (e.read = x, t = d) - } - if (u === void 0) { - if (l === void 0) { - if (r.strict) throw new Error("Non-constructed ASN.1 object of indefinite length."); - l = t - } - if (o === Y.Type.BMPSTRING) - for (u = ""; l > 0; l -= 2) hr(e, t, 2), u += String.fromCharCode(e.getInt16()), t -= 2; - else u = e.getBytes(l), t -= l - } - var A = c === void 0 ? null : { - bitStringContents: c - }; - return Y.create(s, o, h, u, A) -} -Y.toDer = function (e) { - var t = _e.util.createBuffer(), - a = e.tagClass | e.type, - r = _e.util.createBuffer(), - n = !1; - if ("bitStringContents" in e && (n = !0, e.original && (n = Y.equals(e, e.original))), n) r.putBytes(e.bitStringContents); - else if (e.composed) { - e.constructed ? a |= 32 : r.putByte(0); - for (var i = 0; i < e.value.length; ++i) e.value[i] !== void 0 && r.putBuffer(Y.toDer(e.value[i])) - } else if (e.type === Y.Type.BMPSTRING) - for (var i = 0; i < e.value.length; ++i) r.putInt16(e.value.charCodeAt(i)); - else e.type === Y.Type.INTEGER && e.value.length > 1 && (e.value.charCodeAt(0) === 0 && !(e.value.charCodeAt(1) & 128) || e.value.charCodeAt(0) === 255 && (e.value.charCodeAt(1) & 128) === 128) ? r.putBytes(e.value.substr(1)) : r.putBytes(e.value); - if (t.putByte(a), r.length() <= 127) t.putByte(r.length() & 127); - else { - var s = r.length(), - o = ""; - do o += String.fromCharCode(s & 255), s = s >>> 8; while (s > 0); - t.putByte(o.length | 128); - for (var i = o.length - 1; i >= 0; --i) t.putByte(o.charCodeAt(i)) - } - return t.putBuffer(r), t -}; -Y.oidToDer = function (e) { - var t = e.split("."), - a = _e.util.createBuffer(); - a.putByte(40 * parseInt(t[0], 10) + parseInt(t[1], 10)); - for (var r, n, i, s, o = 2; o < t.length; ++o) { - r = !0, n = [], i = parseInt(t[o], 10); - do s = i & 127, i = i >>> 7, r || (s |= 128), n.push(s), r = !1; while (i > 0); - for (var l = n.length - 1; l >= 0; --l) a.putByte(n[l]) - } - return a -}; -Y.derToOid = function (e) { - var t; - typeof e == "string" && (e = _e.util.createBuffer(e)); - var a = e.getByte(); - t = Math.floor(a / 40) + "." + a % 40; - for (var r = 0; e.length() > 0;) a = e.getByte(), r = r << 7, a & 128 ? r += a & 127 : (t += "." + (r + a), r = 0); - return t -}; -Y.utcTimeToDate = function (e) { - var t = new Date, - a = parseInt(e.substr(0, 2), 10); - a = a >= 50 ? 1900 + a : 2e3 + a; - var r = parseInt(e.substr(2, 2), 10) - 1, - n = parseInt(e.substr(4, 2), 10), - i = parseInt(e.substr(6, 2), 10), - s = parseInt(e.substr(8, 2), 10), - o = 0; - if (e.length > 11) { - var l = e.charAt(10), - f = 10; - l !== "+" && l !== "-" && (o = parseInt(e.substr(10, 2), 10), f += 2) - } - if (t.setUTCFullYear(a, r, n), t.setUTCHours(i, s, o, 0), f && (l = e.charAt(f), l === "+" || l === "-")) { - var u = parseInt(e.substr(f + 1, 2), 10), - c = parseInt(e.substr(f + 4, 2), 10), - h = u * 60 + c; - h *= 6e4, l === "+" ? t.setTime(+t - h) : t.setTime(+t + h) - } - return t -}; -Y.generalizedTimeToDate = function (e) { - var t = new Date, - a = parseInt(e.substr(0, 4), 10), - r = parseInt(e.substr(4, 2), 10) - 1, - n = parseInt(e.substr(6, 2), 10), - i = parseInt(e.substr(8, 2), 10), - s = parseInt(e.substr(10, 2), 10), - o = parseInt(e.substr(12, 2), 10), - l = 0, - f = 0, - u = !1; - e.charAt(e.length - 1) === "Z" && (u = !0); - var c = e.length - 5, - h = e.charAt(c); - if (h === "+" || h === "-") { - var x = parseInt(e.substr(c + 1, 2), 10), - d = parseInt(e.substr(c + 4, 2), 10); - f = x * 60 + d, f *= 6e4, h === "+" && (f *= -1), u = !0 - } - return e.charAt(14) === "." && (l = parseFloat(e.substr(14), 10) * 1e3), u ? (t.setUTCFullYear(a, r, n), t.setUTCHours(i, s, o, l), t.setTime(+t + f)) : (t.setFullYear(a, r, n), t.setHours(i, s, o, l)), t -}; -Y.dateToUtcTime = function (e) { - if (typeof e == "string") return e; - var t = "", - a = []; - a.push(("" + e.getUTCFullYear()).substr(2)), a.push("" + (e.getUTCMonth() + 1)), a.push("" + e.getUTCDate()), a.push("" + e.getUTCHours()), a.push("" + e.getUTCMinutes()), a.push("" + e.getUTCSeconds()); - for (var r = 0; r < a.length; ++r) a[r].length < 2 && (t += "0"), t += a[r]; - return t += "Z", t -}; -Y.dateToGeneralizedTime = function (e) { - if (typeof e == "string") return e; - var t = "", - a = []; - a.push("" + e.getUTCFullYear()), a.push("" + (e.getUTCMonth() + 1)), a.push("" + e.getUTCDate()), a.push("" + e.getUTCHours()), a.push("" + e.getUTCMinutes()), a.push("" + e.getUTCSeconds()); - for (var r = 0; r < a.length; ++r) a[r].length < 2 && (t += "0"), t += a[r]; - return t += "Z", t -}; -Y.integerToDer = function (e) { - var t = _e.util.createBuffer(); - if (e >= -128 && e < 128) return t.putSignedInt(e, 8); - if (e >= -32768 && e < 32768) return t.putSignedInt(e, 16); - if (e >= -8388608 && e < 8388608) return t.putSignedInt(e, 24); - if (e >= -2147483648 && e < 2147483648) return t.putSignedInt(e, 32); - var a = new Error("Integer too large; max is 32-bits."); - throw a.integer = e, a -}; -Y.derToInteger = function (e) { - typeof e == "string" && (e = _e.util.createBuffer(e)); - var t = e.length() * 8; - if (t > 32) throw new Error("Integer too large; max is 32-bits."); - return e.getSignedInt(t) -}; -Y.validate = function (e, t, a, r) { - var n = !1; - if ((e.tagClass === t.tagClass || typeof t.tagClass > "u") && (e.type === t.type || typeof t.type > "u")) - if (e.constructed === t.constructed || typeof t.constructed > "u") { - if (n = !0, t.value && _e.util.isArray(t.value)) - for (var i = 0, s = 0; n && s < t.value.length; ++s) n = t.value[s].optional || !1, e.value[i] && (n = Y.validate(e.value[i], t.value[s], a, r), n ? ++i : t.value[s].optional && (n = !0)), !n && r && r.push("[" + t.name + '] Tag class "' + t.tagClass + '", type "' + t.type + '" expected value length "' + t.value.length + '", got "' + e.value.length + '"'); - if (n && a && (t.capture && (a[t.capture] = e.value), t.captureAsn1 && (a[t.captureAsn1] = e), t.captureBitStringContents && "bitStringContents" in e && (a[t.captureBitStringContents] = e.bitStringContents), t.captureBitStringValue && "bitStringContents" in e)) - if (e.bitStringContents.length < 2) a[t.captureBitStringValue] = ""; - else { - var o = e.bitStringContents.charCodeAt(0); - if (o !== 0) throw new Error("captureBitStringValue only supported for zero unused bits"); - a[t.captureBitStringValue] = e.bitStringContents.slice(1) - } - } else r && r.push("[" + t.name + '] Expected constructed "' + t.constructed + '", got "' + e.constructed + '"'); - else r && (e.tagClass !== t.tagClass && r.push("[" + t.name + '] Expected tag class "' + t.tagClass + '", got "' + e.tagClass + '"'), e.type !== t.type && r.push("[" + t.name + '] Expected type "' + t.type + '", got "' + e.type + '"')); - return n -}; -var mn = /[^\\u0000-\\u00ff]/; -Y.prettyPrint = function (e, t, a) { - var r = ""; - t = t || 0, a = a || 2, t > 0 && (r += ` -`); - for (var n = "", i = 0; i < t * a; ++i) n += " "; - switch (r += n + "Tag: ", e.tagClass) { - case Y.Class.UNIVERSAL: - r += "Universal:"; - break; - case Y.Class.APPLICATION: - r += "Application:"; - break; - case Y.Class.CONTEXT_SPECIFIC: - r += "Context-Specific:"; - break; - case Y.Class.PRIVATE: - r += "Private:"; - break - } - if (e.tagClass === Y.Class.UNIVERSAL) switch (r += e.type, e.type) { - case Y.Type.NONE: - r += " (None)"; - break; - case Y.Type.BOOLEAN: - r += " (Boolean)"; - break; - case Y.Type.INTEGER: - r += " (Integer)"; - break; - case Y.Type.BITSTRING: - r += " (Bit string)"; - break; - case Y.Type.OCTETSTRING: - r += " (Octet string)"; - break; - case Y.Type.NULL: - r += " (Null)"; - break; - case Y.Type.OID: - r += " (Object Identifier)"; - break; - case Y.Type.ODESC: - r += " (Object Descriptor)"; - break; - case Y.Type.EXTERNAL: - r += " (External or Instance of)"; - break; - case Y.Type.REAL: - r += " (Real)"; - break; - case Y.Type.ENUMERATED: - r += " (Enumerated)"; - break; - case Y.Type.EMBEDDED: - r += " (Embedded PDV)"; - break; - case Y.Type.UTF8: - r += " (UTF8)"; - break; - case Y.Type.ROID: - r += " (Relative Object Identifier)"; - break; - case Y.Type.SEQUENCE: - r += " (Sequence)"; - break; - case Y.Type.SET: - r += " (Set)"; - break; - case Y.Type.PRINTABLESTRING: - r += " (Printable String)"; - break; - case Y.Type.IA5String: - r += " (IA5String (ASCII))"; - break; - case Y.Type.UTCTIME: - r += " (UTC time)"; - break; - case Y.Type.GENERALIZEDTIME: - r += " (Generalized time)"; - break; - case Y.Type.BMPSTRING: - r += " (BMP String)"; - break - } else r += e.type; - if (r += ` -`, r += n + "Constructed: " + e.constructed + ` -`, e.composed) { - for (var s = 0, o = "", i = 0; i < e.value.length; ++i) e.value[i] !== void 0 && (s += 1, o += Y.prettyPrint(e.value[i], t + 1, a), i + 1 < e.value.length && (o += ",")); - r += n + "Sub values: " + s + o - } else { - if (r += n + "Value: ", e.type === Y.Type.OID) { - var l = Y.derToOid(e.value); - r += l, _e.pki && _e.pki.oids && l in _e.pki.oids && (r += " (" + _e.pki.oids[l] + ") ") - } - if (e.type === Y.Type.INTEGER) try { - r += Y.derToInteger(e.value) - } catch { - r += "0x" + _e.util.bytesToHex(e.value) - } else if (e.type === Y.Type.BITSTRING) { - if (e.value.length > 1 ? r += "0x" + _e.util.bytesToHex(e.value.slice(1)) : r += "(none)", e.value.length > 0) { - var f = e.value.charCodeAt(0); - f == 1 ? r += " (1 unused bit shown)" : f > 1 && (r += " (" + f + " unused bits shown)") - } - } else if (e.type === Y.Type.OCTETSTRING) mn.test(e.value) || (r += "(" + e.value + ") "), r += "0x" + _e.util.bytesToHex(e.value); - else if (e.type === Y.Type.UTF8) try { - r += _e.util.decodeUtf8(e.value) - } catch (u) { - if (u.message === "URI malformed") r += "0x" + _e.util.bytesToHex(e.value) + " (malformed UTF8)"; - else throw u - } else e.type === Y.Type.PRINTABLESTRING || e.type === Y.Type.IA5String ? r += e.value : mn.test(e.value) ? r += "0x" + _e.util.bytesToHex(e.value) : e.value.length === 0 ? r += "[null]" : r += e.value - } - return r -}; -var Nr = le; -Nr.md = Nr.md || {}; -Nr.md.algorithms = Nr.md.algorithms || {}; -var Ct = le, - Ps = Ct.hmac = Ct.hmac || {}; -Ps.create = function () { - var e = null, - t = null, - a = null, - r = null, - n = {}; - return n.start = function (i, s) { - if (i !== null) - if (typeof i == "string") - if (i = i.toLowerCase(), i in Ct.md.algorithms) t = Ct.md.algorithms[i].create(); - else throw new Error('Unknown hash algorithm "' + i + '"'); - else t = i; - if (s === null) s = e; - else { - if (typeof s == "string") s = Ct.util.createBuffer(s); - else if (Ct.util.isArray(s)) { - var o = s; - s = Ct.util.createBuffer(); - for (var l = 0; l < o.length; ++l) s.putByte(o[l]) - } - var f = s.length(); - f > t.blockLength && (t.start(), t.update(s.bytes()), s = t.digest()), a = Ct.util.createBuffer(), r = Ct.util.createBuffer(), f = s.length(); - for (var l = 0; l < f; ++l) { - var o = s.at(l); - a.putByte(54 ^ o), r.putByte(92 ^ o) - } - if (f < t.blockLength) - for (var o = t.blockLength - f, l = 0; l < o; ++l) a.putByte(54), r.putByte(92); - e = s, a = a.bytes(), r = r.bytes() - } - t.start(), t.update(a) - }, n.update = function (i) { - t.update(i) - }, n.getMac = function () { - var i = t.digest().bytes(); - return t.start(), t.update(r), t.update(i), t.digest() - }, n.digest = n.getMac, n -}; -var dt = le, - Jn = dt.md5 = dt.md5 || {}; -dt.md.md5 = dt.md.algorithms.md5 = Jn; -Jn.create = function () { - ei || Vs(); - var e = null, - t = dt.util.createBuffer(), - a = new Array(16), - r = { - algorithm: "md5", - blockLength: 64, - digestLength: 16, - messageLength: 0, - fullMessageLength: null, - messageLengthSize: 8 - }; - return r.start = function () { - r.messageLength = 0, r.fullMessageLength = r.messageLength64 = []; - for (var n = r.messageLengthSize / 4, i = 0; i < n; ++i) r.fullMessageLength.push(0); - return t = dt.util.createBuffer(), e = { - h0: 1732584193, - h1: 4023233417, - h2: 2562383102, - h3: 271733878 - }, r - }, r.start(), r.update = function (n, i) { - i === "utf8" && (n = dt.util.encodeUtf8(n)); - var s = n.length; - r.messageLength += s, s = [s / 4294967296 >>> 0, s >>> 0]; - for (var o = r.fullMessageLength.length - 1; o >= 0; --o) r.fullMessageLength[o] += s[1], s[1] = s[0] + (r.fullMessageLength[o] / 4294967296 >>> 0), r.fullMessageLength[o] = r.fullMessageLength[o] >>> 0, s[0] = s[1] / 4294967296 >>> 0; - return t.putBytes(n), Bn(e, a, t), (t.read > 2048 || t.length() === 0) && t.compact(), r - }, r.digest = function () { - var n = dt.util.createBuffer(); - n.putBytes(t.bytes()); - var i = r.fullMessageLength[r.fullMessageLength.length - 1] + r.messageLengthSize, - s = i & r.blockLength - 1; - n.putBytes(z0.substr(0, r.blockLength - s)); - for (var o, l = 0, f = r.fullMessageLength.length - 1; f >= 0; --f) o = r.fullMessageLength[f] * 8 + l, l = o / 4294967296 >>> 0, n.putInt32Le(o >>> 0); - var u = { - h0: e.h0, - h1: e.h1, - h2: e.h2, - h3: e.h3 - }; - Bn(u, a, n); - var c = dt.util.createBuffer(); - return c.putInt32Le(u.h0), c.putInt32Le(u.h1), c.putInt32Le(u.h2), c.putInt32Le(u.h3), c - }, r -}; -var z0 = null, - _r = null, - dr = null, - Yt = null, - ei = !1; - -function Vs() { - z0 = "€", z0 += dt.util.fillString("\0", 64), _r = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1, 6, 11, 0, 5, 10, 15, 4, 9, 14, 3, 8, 13, 2, 7, 12, 5, 8, 11, 14, 1, 4, 7, 10, 13, 0, 3, 6, 9, 12, 15, 2, 0, 7, 14, 5, 12, 3, 10, 1, 8, 15, 6, 13, 4, 11, 2, 9], dr = [7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21], Yt = new Array(64); - for (var e = 0; e < 64; ++e) Yt[e] = Math.floor(Math.abs(Math.sin(e + 1)) * 4294967296); - ei = !0 -} - -function Bn(e, t, a) { - for (var r, n, i, s, o, l, f, u, c = a.length(); c >= 64;) { - for (n = e.h0, i = e.h1, s = e.h2, o = e.h3, u = 0; u < 16; ++u) t[u] = a.getInt32Le(), l = o ^ i & (s ^ o), r = n + l + Yt[u] + t[u], f = dr[u], n = o, o = s, s = i, i += r << f | r >>> 32 - f; - for (; u < 32; ++u) l = s ^ o & (i ^ s), r = n + l + Yt[u] + t[_r[u]], f = dr[u], n = o, o = s, s = i, i += r << f | r >>> 32 - f; - for (; u < 48; ++u) l = i ^ s ^ o, r = n + l + Yt[u] + t[_r[u]], f = dr[u], n = o, o = s, s = i, i += r << f | r >>> 32 - f; - for (; u < 64; ++u) l = s ^ (i | ~o), r = n + l + Yt[u] + t[_r[u]], f = dr[u], n = o, o = s, s = i, i += r << f | r >>> 32 - f; - e.h0 = e.h0 + n | 0, e.h1 = e.h1 + i | 0, e.h2 = e.h2 + s | 0, e.h3 = e.h3 + o | 0, c -= 64 - } -} -var Fr = le, - ti = Fr.pem = Fr.pem || {}; -ti.encode = function (e, t) { - t = t || {}; - var a = "-----BEGIN " + e.type + `-----\r -`, - r; - if (e.procType && (r = { - name: "Proc-Type", - values: [String(e.procType.version), e.procType.type] - }, a += Ar(r)), e.contentDomain && (r = { - name: "Content-Domain", - values: [e.contentDomain] - }, a += Ar(r)), e.dekInfo && (r = { - name: "DEK-Info", - values: [e.dekInfo.algorithm] - }, e.dekInfo.parameters && r.values.push(e.dekInfo.parameters), a += Ar(r)), e.headers) - for (var n = 0; n < e.headers.length; ++n) a += Ar(e.headers[n]); - return e.procType && (a += `\r -`), a += Fr.util.encode64(e.body, t.maxline || 64) + `\r -`, a += "-----END " + e.type + `-----\r -`, a -}; -ti.decode = function (e) { - for (var t = [], a = /\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g, r = /([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/, n = /\r?\n/, i; i = a.exec(e), !!i;) { - var s = i[1]; - s === "NEW CERTIFICATE REQUEST" && (s = "CERTIFICATE REQUEST"); - var o = { - type: s, - procType: null, - contentDomain: null, - dekInfo: null, - headers: [], - body: Fr.util.decode64(i[3]) - }; - if (t.push(o), !!i[2]) { - for (var l = i[2].split(n), f = 0; i && f < l.length;) { - for (var u = l[f].replace(/\s+$/, ""), c = f + 1; c < l.length; ++c) { - var h = l[c]; - if (!/\s/.test(h[0])) break; - u += h, f = c - } - if (i = u.match(r), i) { - for (var x = { - name: i[1], - values: [] - }, d = i[2].split(","), g = 0; g < d.length; ++g) x.values.push(Os(d[g])); - if (o.procType) - if (!o.contentDomain && x.name === "Content-Domain") o.contentDomain = d[0] || ""; - else if (!o.dekInfo && x.name === "DEK-Info") { - if (x.values.length === 0) throw new Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.'); - o.dekInfo = { - algorithm: d[0], - parameters: d[1] || null - } - } else o.headers.push(x); - else { - if (x.name !== "Proc-Type") throw new Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".'); - if (x.values.length !== 2) throw new Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.'); - o.procType = { - version: d[0], - type: d[1] - } - } - }++f - } - if (o.procType === "ENCRYPTED" && !o.dekInfo) throw new Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".') - } - } - if (t.length === 0) throw new Error("Invalid PEM formatted message."); - return t -}; - -function Ar(e) { - for (var t = e.name + ": ", a = [], r = function (l, f) { - return " " + f - }, n = 0; n < e.values.length; ++n) a.push(e.values[n].replace(/^(\S+\r\n)/, r)); - t += a.join(",") + `\r -`; - for (var i = 0, s = -1, n = 0; n < t.length; ++n, ++i) - if (i > 65 && s !== -1) { - var o = t[s]; - o === "," ? (++s, t = t.substr(0, s) + `\r - ` + t.substr(s)) : t = t.substr(0, s) + `\r -` + o + t.substr(s + 1), i = n - s - 1, s = -1, ++n - } else(t[n] === " " || t[n] === " " || t[n] === ",") && (s = n); - return t -} - -function Os(e) { - return e.replace(/^\s+/, "") -} -var Ne = le; -Ne.des = Ne.des || {}; -Ne.des.startEncrypting = function (e, t, a, r) { - var n = Qr({ - key: e, - output: a, - decrypt: !1, - mode: r || (t === null ? "ECB" : "CBC") - }); - return n.start(t), n -}; -Ne.des.createEncryptionCipher = function (e, t) { - return Qr({ - key: e, - output: null, - decrypt: !1, - mode: t - }) -}; -Ne.des.startDecrypting = function (e, t, a, r) { - var n = Qr({ - key: e, - output: a, - decrypt: !0, - mode: r || (t === null ? "ECB" : "CBC") - }); - return n.start(t), n -}; -Ne.des.createDecryptionCipher = function (e, t) { - return Qr({ - key: e, - output: null, - decrypt: !0, - mode: t - }) -}; -Ne.des.Algorithm = function (e, t) { - var a = this; - a.name = e, a.mode = new t({ - blockSize: 8, - cipher: { - encrypt: function (r, n) { - return An(a._keys, r, n, !1) - }, - decrypt: function (r, n) { - return An(a._keys, r, n, !0) - } - } - }), a._init = !1 -}; -Ne.des.Algorithm.prototype.initialize = function (e) { - if (!this._init) { - var t = Ne.util.createBuffer(e.key); - if (this.name.indexOf("3DES") === 0 && t.length() !== 24) throw new Error("Invalid Triple-DES key size: " + t.length() * 8); - this._keys = Xs(t), this._init = !0 - } -}; -yt("DES-ECB", Ne.cipher.modes.ecb); -yt("DES-CBC", Ne.cipher.modes.cbc); -yt("DES-CFB", Ne.cipher.modes.cfb); -yt("DES-OFB", Ne.cipher.modes.ofb); -yt("DES-CTR", Ne.cipher.modes.ctr); -yt("3DES-ECB", Ne.cipher.modes.ecb); -yt("3DES-CBC", Ne.cipher.modes.cbc); -yt("3DES-CFB", Ne.cipher.modes.cfb); -yt("3DES-OFB", Ne.cipher.modes.ofb); -yt("3DES-CTR", Ne.cipher.modes.ctr); - -function yt(e, t) { - var a = function () { - return new Ne.des.Algorithm(e, t) - }; - Ne.cipher.registerAlgorithm(e, a) -} -var Ks = [16843776, 0, 65536, 16843780, 16842756, 66564, 4, 65536, 1024, 16843776, 16843780, 1024, 16778244, 16842756, 16777216, 4, 1028, 16778240, 16778240, 66560, 66560, 16842752, 16842752, 16778244, 65540, 16777220, 16777220, 65540, 0, 1028, 66564, 16777216, 65536, 16843780, 4, 16842752, 16843776, 16777216, 16777216, 1024, 16842756, 65536, 66560, 16777220, 1024, 4, 16778244, 66564, 16843780, 65540, 16842752, 16778244, 16777220, 1028, 66564, 16843776, 1028, 16778240, 16778240, 0, 65540, 66560, 0, 16842756], - Hs = [-2146402272, -2147450880, 32768, 1081376, 1048576, 32, -2146435040, -2147450848, -2147483616, -2146402272, -2146402304, -2147483648, -2147450880, 1048576, 32, -2146435040, 1081344, 1048608, -2147450848, 0, -2147483648, 32768, 1081376, -2146435072, 1048608, -2147483616, 0, 1081344, 32800, -2146402304, -2146435072, 32800, 0, 1081376, -2146435040, 1048576, -2147450848, -2146435072, -2146402304, 32768, -2146435072, -2147450880, 32, -2146402272, 1081376, 32, 32768, -2147483648, 32800, -2146402304, 1048576, -2147483616, 1048608, -2147450848, -2147483616, 1048608, 1081344, 0, -2147450880, 32800, -2147483648, -2146435040, -2146402272, 1081344], - Ms = [520, 134349312, 0, 134348808, 134218240, 0, 131592, 134218240, 131080, 134217736, 134217736, 131072, 134349320, 131080, 134348800, 520, 134217728, 8, 134349312, 512, 131584, 134348800, 134348808, 131592, 134218248, 131584, 131072, 134218248, 8, 134349320, 512, 134217728, 134349312, 134217728, 131080, 520, 131072, 134349312, 134218240, 0, 512, 131080, 134349320, 134218240, 134217736, 512, 0, 134348808, 134218248, 131072, 134217728, 134349320, 8, 131592, 131584, 134217736, 134348800, 134218248, 520, 134348800, 131592, 8, 134348808, 131584], - qs = [8396801, 8321, 8321, 128, 8396928, 8388737, 8388609, 8193, 0, 8396800, 8396800, 8396929, 129, 0, 8388736, 8388609, 1, 8192, 8388608, 8396801, 128, 8388608, 8193, 8320, 8388737, 1, 8320, 8388736, 8192, 8396928, 8396929, 129, 8388736, 8388609, 8396800, 8396929, 129, 0, 0, 8396800, 8320, 8388736, 8388737, 1, 8396801, 8321, 8321, 128, 8396929, 129, 1, 8192, 8388609, 8193, 8396928, 8388737, 8193, 8320, 8388608, 8396801, 128, 8388608, 8192, 8396928], - zs = [256, 34078976, 34078720, 1107296512, 524288, 256, 1073741824, 34078720, 1074266368, 524288, 33554688, 1074266368, 1107296512, 1107820544, 524544, 1073741824, 33554432, 1074266112, 1074266112, 0, 1073742080, 1107820800, 1107820800, 33554688, 1107820544, 1073742080, 0, 1107296256, 34078976, 33554432, 1107296256, 524544, 524288, 1107296512, 256, 33554432, 1073741824, 34078720, 1107296512, 1074266368, 33554688, 1073741824, 1107820544, 34078976, 1074266368, 256, 33554432, 1107820544, 1107820800, 524544, 1107296256, 1107820800, 34078720, 0, 1074266112, 1107296256, 524544, 33554688, 1073742080, 524288, 0, 1074266112, 34078976, 1073742080], - Gs = [536870928, 541065216, 16384, 541081616, 541065216, 16, 541081616, 4194304, 536887296, 4210704, 4194304, 536870928, 4194320, 536887296, 536870912, 16400, 0, 4194320, 536887312, 16384, 4210688, 536887312, 16, 541065232, 541065232, 0, 4210704, 541081600, 16400, 4210688, 541081600, 536870912, 536887296, 16, 541065232, 4210688, 541081616, 4194304, 16400, 536870928, 4194304, 536887296, 536870912, 16400, 536870928, 541081616, 4210688, 541065216, 4210704, 541081600, 0, 541065232, 16, 16384, 541065216, 4210704, 16384, 4194320, 536887312, 0, 541081600, 536870912, 4194320, 536887312], - Qs = [2097152, 69206018, 67110914, 0, 2048, 67110914, 2099202, 69208064, 69208066, 2097152, 0, 67108866, 2, 67108864, 69206018, 2050, 67110912, 2099202, 2097154, 67110912, 67108866, 69206016, 69208064, 2097154, 69206016, 2048, 2050, 69208066, 2099200, 2, 67108864, 2099200, 67108864, 2099200, 2097152, 67110914, 67110914, 69206018, 69206018, 2, 2097154, 67108864, 67110912, 2097152, 69208064, 2050, 2099202, 69208064, 2050, 67108866, 69208066, 69206016, 2099200, 0, 2, 69208066, 0, 2099202, 69206016, 2048, 67108866, 67110912, 2048, 2097154], - Ws = [268439616, 4096, 262144, 268701760, 268435456, 268439616, 64, 268435456, 262208, 268697600, 268701760, 266240, 268701696, 266304, 4096, 64, 268697600, 268435520, 268439552, 4160, 266240, 262208, 268697664, 268701696, 4160, 0, 0, 268697664, 268435520, 268439552, 266304, 262144, 266304, 262144, 268701696, 4096, 64, 268697664, 4096, 266304, 268439552, 64, 268435520, 268697600, 268697664, 268435456, 262144, 268439616, 0, 268701760, 262208, 268435520, 268697600, 268439552, 268439616, 0, 268701760, 266240, 266240, 4160, 4160, 262208, 268435456, 268701696]; - -function Xs(e) { - for (var t = [0, 4, 536870912, 536870916, 65536, 65540, 536936448, 536936452, 512, 516, 536871424, 536871428, 66048, 66052, 536936960, 536936964], a = [0, 1, 1048576, 1048577, 67108864, 67108865, 68157440, 68157441, 256, 257, 1048832, 1048833, 67109120, 67109121, 68157696, 68157697], r = [0, 8, 2048, 2056, 16777216, 16777224, 16779264, 16779272, 0, 8, 2048, 2056, 16777216, 16777224, 16779264, 16779272], n = [0, 2097152, 134217728, 136314880, 8192, 2105344, 134225920, 136323072, 131072, 2228224, 134348800, 136445952, 139264, 2236416, 134356992, 136454144], i = [0, 262144, 16, 262160, 0, 262144, 16, 262160, 4096, 266240, 4112, 266256, 4096, 266240, 4112, 266256], s = [0, 1024, 32, 1056, 0, 1024, 32, 1056, 33554432, 33555456, 33554464, 33555488, 33554432, 33555456, 33554464, 33555488], o = [0, 268435456, 524288, 268959744, 2, 268435458, 524290, 268959746, 0, 268435456, 524288, 268959744, 2, 268435458, 524290, 268959746], l = [0, 65536, 2048, 67584, 536870912, 536936448, 536872960, 536938496, 131072, 196608, 133120, 198656, 537001984, 537067520, 537004032, 537069568], f = [0, 262144, 0, 262144, 2, 262146, 2, 262146, 33554432, 33816576, 33554432, 33816576, 33554434, 33816578, 33554434, 33816578], u = [0, 268435456, 8, 268435464, 0, 268435456, 8, 268435464, 1024, 268436480, 1032, 268436488, 1024, 268436480, 1032, 268436488], c = [0, 32, 0, 32, 1048576, 1048608, 1048576, 1048608, 8192, 8224, 8192, 8224, 1056768, 1056800, 1056768, 1056800], h = [0, 16777216, 512, 16777728, 2097152, 18874368, 2097664, 18874880, 67108864, 83886080, 67109376, 83886592, 69206016, 85983232, 69206528, 85983744], x = [0, 4096, 134217728, 134221824, 524288, 528384, 134742016, 134746112, 16, 4112, 134217744, 134221840, 524304, 528400, 134742032, 134746128], d = [0, 4, 256, 260, 0, 4, 256, 260, 1, 5, 257, 261, 1, 5, 257, 261], g = e.length() > 8 ? 3 : 1, v = [], B = [0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0], E = 0, m, A = 0; A < g; A++) { - var T = e.getInt32(), - S = e.getInt32(); - m = (T >>> 4 ^ S) & 252645135, S ^= m, T ^= m << 4, m = (S >>> -16 ^ T) & 65535, T ^= m, S ^= m << -16, m = (T >>> 2 ^ S) & 858993459, S ^= m, T ^= m << 2, m = (S >>> -16 ^ T) & 65535, T ^= m, S ^= m << -16, m = (T >>> 1 ^ S) & 1431655765, S ^= m, T ^= m << 1, m = (S >>> 8 ^ T) & 16711935, T ^= m, S ^= m << 8, m = (T >>> 1 ^ S) & 1431655765, S ^= m, T ^= m << 1, m = T << 8 | S >>> 20 & 240, T = S << 24 | S << 8 & 16711680 | S >>> 8 & 65280 | S >>> 24 & 240, S = m; - for (var N = 0; N < B.length; ++N) { - B[N] ? (T = T << 2 | T >>> 26, S = S << 2 | S >>> 26) : (T = T << 1 | T >>> 27, S = S << 1 | S >>> 27), T &= -15, S &= -15; - var w = t[T >>> 28] | a[T >>> 24 & 15] | r[T >>> 20 & 15] | n[T >>> 16 & 15] | i[T >>> 12 & 15] | s[T >>> 8 & 15] | o[T >>> 4 & 15], - K = l[S >>> 28] | f[S >>> 24 & 15] | u[S >>> 20 & 15] | c[S >>> 16 & 15] | h[S >>> 12 & 15] | x[S >>> 8 & 15] | d[S >>> 4 & 15]; - m = (K >>> 16 ^ w) & 65535, v[E++] = w ^ m, v[E++] = K ^ m << 16 - } - } - return v -} - -function An(e, t, a, r) { - var n = e.length === 32 ? 3 : 9, - i; - n === 3 ? i = r ? [30, -2, -2] : [0, 32, 2] : i = r ? [94, 62, -2, 32, 64, 2, 30, -2, -2] : [0, 32, 2, 62, 30, -2, 64, 96, 2]; - var s, o = t[0], - l = t[1]; - s = (o >>> 4 ^ l) & 252645135, l ^= s, o ^= s << 4, s = (o >>> 16 ^ l) & 65535, l ^= s, o ^= s << 16, s = (l >>> 2 ^ o) & 858993459, o ^= s, l ^= s << 2, s = (l >>> 8 ^ o) & 16711935, o ^= s, l ^= s << 8, s = (o >>> 1 ^ l) & 1431655765, l ^= s, o ^= s << 1, o = o << 1 | o >>> 31, l = l << 1 | l >>> 31; - for (var f = 0; f < n; f += 3) { - for (var u = i[f + 1], c = i[f + 2], h = i[f]; h != u; h += c) { - var x = l ^ e[h], - d = (l >>> 4 | l << 28) ^ e[h + 1]; - s = o, o = l, l = s ^ (Hs[x >>> 24 & 63] | qs[x >>> 16 & 63] | Gs[x >>> 8 & 63] | Ws[x & 63] | Ks[d >>> 24 & 63] | Ms[d >>> 16 & 63] | zs[d >>> 8 & 63] | Qs[d & 63]) - } - s = o, o = l, l = s - } - o = o >>> 1 | o << 31, l = l >>> 1 | l << 31, s = (o >>> 1 ^ l) & 1431655765, l ^= s, o ^= s << 1, s = (l >>> 8 ^ o) & 16711935, o ^= s, l ^= s << 8, s = (l >>> 2 ^ o) & 858993459, o ^= s, l ^= s << 2, s = (o >>> 16 ^ l) & 65535, l ^= s, o ^= s << 16, s = (o >>> 4 ^ l) & 252645135, l ^= s, o ^= s << 4, a[0] = o, a[1] = l -} - -function Qr(e) { - e = e || {}; - var t = (e.mode || "CBC").toUpperCase(), - a = "DES-" + t, - r; - e.decrypt ? r = Ne.cipher.createDecipher(a, e.key) : r = Ne.cipher.createCipher(a, e.key); - var n = r.start; - return r.start = function (i, s) { - var o = null; - s instanceof Ne.util.ByteBuffer && (o = s, s = {}), s = s || {}, s.output = o, s.iv = i, n.call(r, s) - }, r -} -var We = le, - Ys = We.pkcs5 = We.pkcs5 || {}, - gt; -We.util.isNodejs && !We.options.usePureJavaScript && (gt = Kr); -We.pbkdf2 = Ys.pbkdf2 = function (e, t, a, r, n, i) { - if (typeof n == "function" && (i = n, n = null), We.util.isNodejs && !We.options.usePureJavaScript && gt.pbkdf2 && (n === null || typeof n != "object") && (gt.pbkdf2Sync.length > 4 || !n || n === "sha1")) return typeof n != "string" && (n = "sha1"), e = Buffer.from(e, "binary"), t = Buffer.from(t, "binary"), i ? gt.pbkdf2Sync.length === 4 ? gt.pbkdf2(e, t, a, r, function (m, A) { - if (m) return i(m); - i(null, A.toString("binary")) - }) : gt.pbkdf2(e, t, a, r, n, function (m, A) { - if (m) return i(m); - i(null, A.toString("binary")) - }) : gt.pbkdf2Sync.length === 4 ? gt.pbkdf2Sync(e, t, a, r).toString("binary") : gt.pbkdf2Sync(e, t, a, r, n).toString("binary"); - if ((typeof n > "u" || n === null) && (n = "sha1"), typeof n == "string") { - if (!(n in We.md.algorithms)) throw new Error("Unknown hash algorithm: " + n); - n = We.md[n].create() - } - var s = n.digestLength; - if (r > 4294967295 * s) { - var o = new Error("Derived key is too long."); - if (i) return i(o); - throw o - } - var l = Math.ceil(r / s), - f = r - (l - 1) * s, - u = We.hmac.create(); - u.start(n, e); - var c = "", - h, x, d; - if (!i) { - for (var g = 1; g <= l; ++g) { - u.start(null, null), u.update(t), u.update(We.util.int32ToBytes(g)), h = d = u.digest().getBytes(); - for (var v = 2; v <= a; ++v) u.start(null, null), u.update(d), x = u.digest().getBytes(), h = We.util.xorBytes(h, x, s), d = x; - c += g < l ? h : h.substr(0, f) - } - return c - } - var g = 1, - v; - - function B() { - if (g > l) return i(null, c); - u.start(null, null), u.update(t), u.update(We.util.int32ToBytes(g)), h = d = u.digest().getBytes(), v = 2, E() - } - - function E() { - if (v <= a) return u.start(null, null), u.update(d), x = u.digest().getBytes(), h = We.util.xorBytes(h, x, s), d = x, ++v, We.util.setImmediate(E); - c += g < l ? h : h.substr(0, f), ++g, B() - } - B() -}; -var xt = le, - ri = xt.sha256 = xt.sha256 || {}; -xt.md.sha256 = xt.md.algorithms.sha256 = ri; -ri.create = function () { - ai || $s(); - var e = null, - t = xt.util.createBuffer(), - a = new Array(64), - r = { - algorithm: "sha256", - blockLength: 64, - digestLength: 32, - messageLength: 0, - fullMessageLength: null, - messageLengthSize: 8 - }; - return r.start = function () { - r.messageLength = 0, r.fullMessageLength = r.messageLength64 = []; - for (var n = r.messageLengthSize / 4, i = 0; i < n; ++i) r.fullMessageLength.push(0); - return t = xt.util.createBuffer(), e = { - h0: 1779033703, - h1: 3144134277, - h2: 1013904242, - h3: 2773480762, - h4: 1359893119, - h5: 2600822924, - h6: 528734635, - h7: 1541459225 - }, r - }, r.start(), r.update = function (n, i) { - i === "utf8" && (n = xt.util.encodeUtf8(n)); - var s = n.length; - r.messageLength += s, s = [s / 4294967296 >>> 0, s >>> 0]; - for (var o = r.fullMessageLength.length - 1; o >= 0; --o) r.fullMessageLength[o] += s[1], s[1] = s[0] + (r.fullMessageLength[o] / 4294967296 >>> 0), r.fullMessageLength[o] = r.fullMessageLength[o] >>> 0, s[0] = s[1] / 4294967296 >>> 0; - return t.putBytes(n), Sn(e, a, t), (t.read > 2048 || t.length() === 0) && t.compact(), r - }, r.digest = function () { - var n = xt.util.createBuffer(); - n.putBytes(t.bytes()); - var i = r.fullMessageLength[r.fullMessageLength.length - 1] + r.messageLengthSize, - s = i & r.blockLength - 1; - n.putBytes(G0.substr(0, r.blockLength - s)); - for (var o, l, f = r.fullMessageLength[0] * 8, u = 0; u < r.fullMessageLength.length - 1; ++u) o = r.fullMessageLength[u + 1] * 8, l = o / 4294967296 >>> 0, f += l, n.putInt32(f >>> 0), f = o >>> 0; - n.putInt32(f); - var c = { - h0: e.h0, - h1: e.h1, - h2: e.h2, - h3: e.h3, - h4: e.h4, - h5: e.h5, - h6: e.h6, - h7: e.h7 - }; - Sn(c, a, n); - var h = xt.util.createBuffer(); - return h.putInt32(c.h0), h.putInt32(c.h1), h.putInt32(c.h2), h.putInt32(c.h3), h.putInt32(c.h4), h.putInt32(c.h5), h.putInt32(c.h6), h.putInt32(c.h7), h - }, r -}; -var G0 = null, - ai = !1, - ni = null; - -function $s() { - G0 = "€", G0 += xt.util.fillString("\0", 64), ni = [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298], ai = !0 -} - -function Sn(e, t, a) { - for (var r, n, i, s, o, l, f, u, c, h, x, d, g, v, B, E = a.length(); E >= 64;) { - for (f = 0; f < 16; ++f) t[f] = a.getInt32(); - for (; f < 64; ++f) r = t[f - 2], r = (r >>> 17 | r << 15) ^ (r >>> 19 | r << 13) ^ r >>> 10, n = t[f - 15], n = (n >>> 7 | n << 25) ^ (n >>> 18 | n << 14) ^ n >>> 3, t[f] = r + t[f - 7] + n + t[f - 16] | 0; - for (u = e.h0, c = e.h1, h = e.h2, x = e.h3, d = e.h4, g = e.h5, v = e.h6, B = e.h7, f = 0; f < 64; ++f) s = (d >>> 6 | d << 26) ^ (d >>> 11 | d << 21) ^ (d >>> 25 | d << 7), o = v ^ d & (g ^ v), i = (u >>> 2 | u << 30) ^ (u >>> 13 | u << 19) ^ (u >>> 22 | u << 10), l = u & c | h & (u ^ c), r = B + s + o + ni[f] + t[f], n = i + l, B = v, v = g, g = d, d = x + r >>> 0, x = h, h = c, c = u, u = r + n >>> 0; - e.h0 = e.h0 + u | 0, e.h1 = e.h1 + c | 0, e.h2 = e.h2 + h | 0, e.h3 = e.h3 + x | 0, e.h4 = e.h4 + d | 0, e.h5 = e.h5 + g | 0, e.h6 = e.h6 + v | 0, e.h7 = e.h7 + B | 0, E -= 64 - } -} -var ct = le, - Dr = null; -ct.util.isNodejs && !ct.options.usePureJavaScript && !process.versions["node-webkit"] && (Dr = Kr); -var js = ct.prng = ct.prng || {}; -js.create = function (e) { - for (var t = { - plugin: e, - key: null, - seed: null, - time: null, - reseeds: 0, - generated: 0, - keyBytes: "" - }, a = e.md, r = new Array(32), n = 0; n < 32; ++n) r[n] = a.create(); - t.pools = r, t.pool = 0, t.generate = function (f, u) { - if (!u) return t.generateSync(f); - var c = t.plugin.cipher, - h = t.plugin.increment, - x = t.plugin.formatKey, - d = t.plugin.formatSeed, - g = ct.util.createBuffer(); - t.key = null, v(); - - function v(B) { - if (B) return u(B); - if (g.length() >= f) return u(null, g.getBytes(f)); - if (t.generated > 1048575 && (t.key = null), t.key === null) return ct.util.nextTick(function () { - i(v) - }); - var E = c(t.key, t.seed); - t.generated += E.length, g.putBytes(E), t.key = x(c(t.key, h(t.seed))), t.seed = d(c(t.key, t.seed)), ct.util.setImmediate(v) - } - }, t.generateSync = function (f) { - var u = t.plugin.cipher, - c = t.plugin.increment, - h = t.plugin.formatKey, - x = t.plugin.formatSeed; - t.key = null; - for (var d = ct.util.createBuffer(); d.length() < f;) { - t.generated > 1048575 && (t.key = null), t.key === null && s(); - var g = u(t.key, t.seed); - t.generated += g.length, d.putBytes(g), t.key = h(u(t.key, c(t.seed))), t.seed = x(u(t.key, t.seed)) - } - return d.getBytes(f) - }; - - function i(f) { - if (t.pools[0].messageLength >= 32) return o(), f(); - var u = 32 - t.pools[0].messageLength << 5; - t.seedFile(u, function (c, h) { - if (c) return f(c); - t.collect(h), o(), f() - }) - } - - function s() { - if (t.pools[0].messageLength >= 32) return o(); - var f = 32 - t.pools[0].messageLength << 5; - t.collect(t.seedFileSync(f)), o() - } - - function o() { - t.reseeds = t.reseeds === 4294967295 ? 0 : t.reseeds + 1; - var f = t.plugin.md.create(); - f.update(t.keyBytes); - for (var u = 1, c = 0; c < 32; ++c) t.reseeds % u === 0 && (f.update(t.pools[c].digest().getBytes()), t.pools[c].start()), u = u << 1; - t.keyBytes = f.digest().getBytes(), f.start(), f.update(t.keyBytes); - var h = f.digest().getBytes(); - t.key = t.plugin.formatKey(t.keyBytes), t.seed = t.plugin.formatSeed(h), t.generated = 0 - } - - function l(f) { - var u = null, - c = ct.util.globalScope, - h = c.crypto || c.msCrypto; - h && h.getRandomValues && (u = function (T) { - return h.getRandomValues(T) - }); - var x = ct.util.createBuffer(); - if (u) - for (; x.length() < f;) { - var d = Math.max(1, Math.min(f - x.length(), 65536) / 4), - g = new Uint32Array(Math.floor(d)); - try { - u(g); - for (var v = 0; v < g.length; ++v) x.putInt32(g[v]) - } catch (T) { - if (!(typeof QuotaExceededError < "u" && T instanceof QuotaExceededError)) throw T - } - } - if (x.length() < f) - for (var B, E, m, A = Math.floor(Math.random() * 65536); x.length() < f;) { - E = 16807 * (A & 65535), B = 16807 * (A >> 16), E += (B & 32767) << 16, E += B >> 15, E = (E & 2147483647) + (E >> 31), A = E & 4294967295; - for (var v = 0; v < 3; ++v) m = A >>> (v << 3), m ^= Math.floor(Math.random() * 256), x.putByte(m & 255) - } - return x.getBytes(f) - } - return Dr ? (t.seedFile = function (f, u) { - Dr.randomBytes(f, function (c, h) { - if (c) return u(c); - u(null, h.toString()) - }) - }, t.seedFileSync = function (f) { - return Dr.randomBytes(f).toString() - }) : (t.seedFile = function (f, u) { - try { - u(null, l(f)) - } catch (c) { - u(c) - } - }, t.seedFileSync = l), t.collect = function (f) { - for (var u = f.length, c = 0; c < u; ++c) t.pools[t.pool].update(f.substr(c, 1)), t.pool = t.pool === 31 ? 0 : t.pool + 1 - }, t.collectInt = function (f, u) { - for (var c = "", h = 0; h < u; h += 8) c += String.fromCharCode(f >> h & 255); - t.collect(c) - }, t.registerWorker = function (f) { - if (f === self) t.seedFile = function (c, h) { - function x(d) { - var g = d.data; - g.forge && g.forge.prng && (self.removeEventListener("message", x), h(g.forge.prng.err, g.forge.prng.bytes)) - } - self.addEventListener("message", x), self.postMessage({ - forge: { - prng: { - needed: c - } - } - }) - }; - else { - var u = function (c) { - var h = c.data; - h.forge && h.forge.prng && t.seedFile(h.forge.prng.needed, function (x, d) { - f.postMessage({ - forge: { - prng: { - err: x, - bytes: d - } - } - }) - }) - }; - f.addEventListener("message", u) - } - }, t -}; -var Ve = le; -(function () { - if (Ve.random && Ve.random.getBytes) { - Ve.random; - return - }(function (e) { - var t = {}, - a = new Array(4), - r = Ve.util.createBuffer(); - t.formatKey = function (c) { - var h = Ve.util.createBuffer(c); - return c = new Array(4), c[0] = h.getInt32(), c[1] = h.getInt32(), c[2] = h.getInt32(), c[3] = h.getInt32(), Ve.aes._expandKey(c, !1) - }, t.formatSeed = function (c) { - var h = Ve.util.createBuffer(c); - return c = new Array(4), c[0] = h.getInt32(), c[1] = h.getInt32(), c[2] = h.getInt32(), c[3] = h.getInt32(), c - }, t.cipher = function (c, h) { - return Ve.aes._updateBlock(c, h, a, !1), r.putInt32(a[0]), r.putInt32(a[1]), r.putInt32(a[2]), r.putInt32(a[3]), r.getBytes() - }, t.increment = function (c) { - return ++c[3], c - }, t.md = Ve.md.sha256; - - function n() { - var c = Ve.prng.create(t); - return c.getBytes = function (h, x) { - return c.generate(h, x) - }, c.getBytesSync = function (h) { - return c.generate(h) - }, c - } - var i = n(), - s = null, - o = Ve.util.globalScope, - l = o.crypto || o.msCrypto; - if (l && l.getRandomValues && (s = function (c) { - return l.getRandomValues(c) - }), Ve.options.usePureJavaScript || !Ve.util.isNodejs && !s) { - if (i.collectInt(+new Date, 32), typeof navigator < "u") { - var f = ""; - for (var u in navigator) try { - typeof navigator[u] == "string" && (f += navigator[u]) - } catch {} - i.collect(f), f = null - } - e && (e().mousemove(function (c) { - i.collectInt(c.clientX, 16), i.collectInt(c.clientY, 16) - }), e().keypress(function (c) { - i.collectInt(c.charCode, 8) - })) - } - if (!Ve.random) Ve.random = i; - else - for (var u in i) Ve.random[u] = i[u]; - Ve.random.createInstance = n, Ve.random - })(typeof jQuery < "u" ? jQuery : null) -})(); -var $e = le, - k0 = [217, 120, 249, 196, 25, 221, 181, 237, 40, 233, 253, 121, 74, 160, 216, 157, 198, 126, 55, 131, 43, 118, 83, 142, 98, 76, 100, 136, 68, 139, 251, 162, 23, 154, 89, 245, 135, 179, 79, 19, 97, 69, 109, 141, 9, 129, 125, 50, 189, 143, 64, 235, 134, 183, 123, 11, 240, 149, 33, 34, 92, 107, 78, 130, 84, 214, 101, 147, 206, 96, 178, 28, 115, 86, 192, 20, 167, 140, 241, 220, 18, 117, 202, 31, 59, 190, 228, 209, 66, 61, 212, 48, 163, 60, 182, 38, 111, 191, 14, 218, 70, 105, 7, 87, 39, 242, 29, 155, 188, 148, 67, 3, 248, 17, 199, 246, 144, 239, 62, 231, 6, 195, 213, 47, 200, 102, 30, 215, 8, 232, 234, 222, 128, 82, 238, 247, 132, 170, 114, 172, 53, 77, 106, 42, 150, 26, 210, 113, 90, 21, 73, 116, 75, 159, 208, 94, 4, 24, 164, 236, 194, 224, 65, 110, 15, 81, 203, 204, 36, 145, 175, 80, 161, 244, 112, 57, 153, 124, 58, 133, 35, 184, 180, 122, 252, 2, 54, 91, 37, 85, 151, 49, 45, 93, 250, 152, 227, 138, 146, 174, 5, 223, 41, 16, 103, 108, 186, 201, 211, 0, 230, 207, 225, 158, 168, 44, 99, 22, 1, 63, 88, 226, 137, 169, 13, 56, 52, 27, 171, 51, 255, 176, 187, 72, 12, 95, 185, 177, 205, 46, 197, 243, 219, 71, 229, 165, 156, 119, 10, 166, 32, 104, 254, 127, 193, 173], - Tn = [1, 2, 3, 5], - Zs = function (e, t) { - return e << t & 65535 | (e & 65535) >> 16 - t - }, - Js = function (e, t) { - return (e & 65535) >> t | e << 16 - t & 65535 - }; -$e.rc2 = $e.rc2 || {}; -$e.rc2.expandKey = function (e, t) { - typeof e == "string" && (e = $e.util.createBuffer(e)), t = t || 128; - var a = e, - r = e.length(), - n = t, - i = Math.ceil(n / 8), - s = 255 >> (n & 7), - o; - for (o = r; o < 128; o++) a.putByte(k0[a.at(o - 1) + a.at(o - r) & 255]); - for (a.setAt(128 - i, k0[a.at(128 - i) & s]), o = 127 - i; o >= 0; o--) a.setAt(o, k0[a.at(o + 1) ^ a.at(o + i)]); - return a -}; -var ii = function (e, t, a) { - var r = !1, - n = null, - i = null, - s = null, - o, l, f, u, c = []; - for (e = $e.rc2.expandKey(e, t), f = 0; f < 64; f++) c.push(e.getInt16Le()); - a ? (o = function (d) { - for (f = 0; f < 4; f++) d[f] += c[u] + (d[(f + 3) % 4] & d[(f + 2) % 4]) + (~d[(f + 3) % 4] & d[(f + 1) % 4]), d[f] = Zs(d[f], Tn[f]), u++ - }, l = function (d) { - for (f = 0; f < 4; f++) d[f] += c[d[(f + 3) % 4] & 63] - }) : (o = function (d) { - for (f = 3; f >= 0; f--) d[f] = Js(d[f], Tn[f]), d[f] -= c[u] + (d[(f + 3) % 4] & d[(f + 2) % 4]) + (~d[(f + 3) % 4] & d[(f + 1) % 4]), u-- - }, l = function (d) { - for (f = 3; f >= 0; f--) d[f] -= c[d[(f + 3) % 4] & 63] - }); - var h = function (d) { - var g = []; - for (f = 0; f < 4; f++) { - var v = n.getInt16Le(); - s !== null && (a ? v ^= s.getInt16Le() : s.putInt16Le(v)), g.push(v & 65535) - } - u = a ? 0 : 63; - for (var B = 0; B < d.length; B++) - for (var E = 0; E < d[B][0]; E++) d[B][1](g); - for (f = 0; f < 4; f++) s !== null && (a ? s.putInt16Le(g[f]) : g[f] ^= s.getInt16Le()), i.putInt16Le(g[f]) - }, - x = null; - return x = { - start: function (d, g) { - d && typeof d == "string" && (d = $e.util.createBuffer(d)), r = !1, n = $e.util.createBuffer(), i = g || new $e.util.createBuffer, s = d, x.output = i - }, - update: function (d) { - for (r || n.putBuffer(d); n.length() >= 8;) h([ - [5, o], - [1, l], - [6, o], - [1, l], - [5, o] - ]) - }, - finish: function (d) { - var g = !0; - if (a) - if (d) g = d(8, n, !a); - else { - var v = n.length() === 8 ? 8 : 8 - n.length(); - n.fillWithByte(v, v) - } if (g && (r = !0, x.update()), !a && (g = n.length() === 0, g)) - if (d) g = d(8, i, !a); - else { - var B = i.length(), - E = i.at(B - 1); - E > B ? g = !1 : i.truncate(E) - } return g - } - }, x -}; -$e.rc2.startEncrypting = function (e, t, a) { - var r = $e.rc2.createEncryptionCipher(e, 128); - return r.start(t, a), r -}; -$e.rc2.createEncryptionCipher = function (e, t) { - return ii(e, t, !0) -}; -$e.rc2.startDecrypting = function (e, t, a) { - var r = $e.rc2.createDecryptionCipher(e, 128); - return r.start(t, a), r -}; -$e.rc2.createDecryptionCipher = function (e, t) { - return ii(e, t, !1) -}; -var Q0 = le; -Q0.jsbn = Q0.jsbn || {}; -var Et; - -function q(e, t, a) { - this.data = [], e != null && (typeof e == "number" ? this.fromNumber(e, t, a) : t == null && typeof e != "string" ? this.fromString(e, 256) : this.fromString(e, t)) -} -Q0.jsbn.BigInteger = q; - -function Ee() { - return new q(null) -} - -function eo(e, t, a, r, n, i) { - for (; --i >= 0;) { - var s = t * this.data[e++] + a.data[r] + n; - n = Math.floor(s / 67108864), a.data[r++] = s & 67108863 - } - return n -} - -function to(e, t, a, r, n, i) { - for (var s = t & 32767, o = t >> 15; --i >= 0;) { - var l = this.data[e] & 32767, - f = this.data[e++] >> 15, - u = o * l + f * s; - l = s * l + ((u & 32767) << 15) + a.data[r] + (n & 1073741823), n = (l >>> 30) + (u >>> 15) + o * f + (n >>> 30), a.data[r++] = l & 1073741823 - } - return n -} - -function bn(e, t, a, r, n, i) { - for (var s = t & 16383, o = t >> 14; --i >= 0;) { - var l = this.data[e] & 16383, - f = this.data[e++] >> 14, - u = o * l + f * s; - l = s * l + ((u & 16383) << 14) + a.data[r] + n, n = (l >> 28) + (u >> 14) + o * f, a.data[r++] = l & 268435455 - } - return n -} -typeof navigator > "u" ? (q.prototype.am = bn, Et = 28) : navigator.appName == "Microsoft Internet Explorer" ? (q.prototype.am = to, Et = 30) : navigator.appName != "Netscape" ? (q.prototype.am = eo, Et = 26) : (q.prototype.am = bn, Et = 28); -q.prototype.DB = Et; -q.prototype.DM = (1 << Et) - 1; -q.prototype.DV = 1 << Et; -var ha = 52; -q.prototype.FV = Math.pow(2, ha); -q.prototype.F1 = ha - Et; -q.prototype.F2 = 2 * Et - ha; -var ro = "0123456789abcdefghijklmnopqrstuvwxyz", - Wr = new Array, - rr, at; -rr = 48; -for (at = 0; at <= 9; ++at) Wr[rr++] = at; -rr = 97; -for (at = 10; at < 36; ++at) Wr[rr++] = at; -rr = 65; -for (at = 10; at < 36; ++at) Wr[rr++] = at; - -function In(e) { - return ro.charAt(e) -} - -function si(e, t) { - var a = Wr[e.charCodeAt(t)]; - return a ?? -1 -} - -function ao(e) { - for (var t = this.t - 1; t >= 0; --t) e.data[t] = this.data[t]; - e.t = this.t, e.s = this.s -} - -function no(e) { - this.t = 1, this.s = e < 0 ? -1 : 0, e > 0 ? this.data[0] = e : e < -1 ? this.data[0] = e + this.DV : this.t = 0 -} - -function _t(e) { - var t = Ee(); - return t.fromInt(e), t -} - -function io(e, t) { - var a; - if (t == 16) a = 4; - else if (t == 8) a = 3; - else if (t == 256) a = 8; - else if (t == 2) a = 1; - else if (t == 32) a = 5; - else if (t == 4) a = 2; - else { - this.fromRadix(e, t); - return - } - this.t = 0, this.s = 0; - for (var r = e.length, n = !1, i = 0; --r >= 0;) { - var s = a == 8 ? e[r] & 255 : si(e, r); - if (s < 0) { - e.charAt(r) == "-" && (n = !0); - continue - } - n = !1, i == 0 ? this.data[this.t++] = s : i + a > this.DB ? (this.data[this.t - 1] |= (s & (1 << this.DB - i) - 1) << i, this.data[this.t++] = s >> this.DB - i) : this.data[this.t - 1] |= s << i, i += a, i >= this.DB && (i -= this.DB) - } - a == 8 && e[0] & 128 && (this.s = -1, i > 0 && (this.data[this.t - 1] |= (1 << this.DB - i) - 1 << i)), this.clamp(), n && q.ZERO.subTo(this, this) -} - -function so() { - for (var e = this.s & this.DM; this.t > 0 && this.data[this.t - 1] == e;) --this.t -} - -function oo(e) { - if (this.s < 0) return "-" + this.negate().toString(e); - var t; - if (e == 16) t = 4; - else if (e == 8) t = 3; - else if (e == 2) t = 1; - else if (e == 32) t = 5; - else if (e == 4) t = 2; - else return this.toRadix(e); - var a = (1 << t) - 1, - r, n = !1, - i = "", - s = this.t, - o = this.DB - s * this.DB % t; - if (s-- > 0) - for (o < this.DB && (r = this.data[s] >> o) > 0 && (n = !0, i = In(r)); s >= 0;) o < t ? (r = (this.data[s] & (1 << o) - 1) << t - o, r |= this.data[--s] >> (o += this.DB - t)) : (r = this.data[s] >> (o -= t) & a, o <= 0 && (o += this.DB, --s)), r > 0 && (n = !0), n && (i += In(r)); - return n ? i : "0" -} - -function fo() { - var e = Ee(); - return q.ZERO.subTo(this, e), e -} - -function uo() { - return this.s < 0 ? this.negate() : this -} - -function lo(e) { - var t = this.s - e.s; - if (t != 0) return t; - var a = this.t; - if (t = a - e.t, t != 0) return this.s < 0 ? -t : t; - for (; --a >= 0;) - if ((t = this.data[a] - e.data[a]) != 0) return t; - return 0 -} - -function Xr(e) { - var t = 1, - a; - return (a = e >>> 16) != 0 && (e = a, t += 16), (a = e >> 8) != 0 && (e = a, t += 8), (a = e >> 4) != 0 && (e = a, t += 4), (a = e >> 2) != 0 && (e = a, t += 2), (a = e >> 1) != 0 && (e = a, t += 1), t -} - -function co() { - return this.t <= 0 ? 0 : this.DB * (this.t - 1) + Xr(this.data[this.t - 1] ^ this.s & this.DM) -} - -function ho(e, t) { - var a; - for (a = this.t - 1; a >= 0; --a) t.data[a + e] = this.data[a]; - for (a = e - 1; a >= 0; --a) t.data[a] = 0; - t.t = this.t + e, t.s = this.s -} - -function xo(e, t) { - for (var a = e; a < this.t; ++a) t.data[a - e] = this.data[a]; - t.t = Math.max(this.t - e, 0), t.s = this.s -} - -function po(e, t) { - var a = e % this.DB, - r = this.DB - a, - n = (1 << r) - 1, - i = Math.floor(e / this.DB), - s = this.s << a & this.DM, - o; - for (o = this.t - 1; o >= 0; --o) t.data[o + i + 1] = this.data[o] >> r | s, s = (this.data[o] & n) << a; - for (o = i - 1; o >= 0; --o) t.data[o] = 0; - t.data[i] = s, t.t = this.t + i + 1, t.s = this.s, t.clamp() -} - -function vo(e, t) { - t.s = this.s; - var a = Math.floor(e / this.DB); - if (a >= this.t) { - t.t = 0; - return - } - var r = e % this.DB, - n = this.DB - r, - i = (1 << r) - 1; - t.data[0] = this.data[a] >> r; - for (var s = a + 1; s < this.t; ++s) t.data[s - a - 1] |= (this.data[s] & i) << n, t.data[s - a] = this.data[s] >> r; - r > 0 && (t.data[this.t - a - 1] |= (this.s & i) << n), t.t = this.t - a, t.clamp() -} - -function yo(e, t) { - for (var a = 0, r = 0, n = Math.min(e.t, this.t); a < n;) r += this.data[a] - e.data[a], t.data[a++] = r & this.DM, r >>= this.DB; - if (e.t < this.t) { - for (r -= e.s; a < this.t;) r += this.data[a], t.data[a++] = r & this.DM, r >>= this.DB; - r += this.s - } else { - for (r += this.s; a < e.t;) r -= e.data[a], t.data[a++] = r & this.DM, r >>= this.DB; - r -= e.s - } - t.s = r < 0 ? -1 : 0, r < -1 ? t.data[a++] = this.DV + r : r > 0 && (t.data[a++] = r), t.t = a, t.clamp() -} - -function go(e, t) { - var a = this.abs(), - r = e.abs(), - n = a.t; - for (t.t = n + r.t; --n >= 0;) t.data[n] = 0; - for (n = 0; n < r.t; ++n) t.data[n + a.t] = a.am(0, r.data[n], t, n, 0, a.t); - t.s = 0, t.clamp(), this.s != e.s && q.ZERO.subTo(t, t) -} - -function Co(e) { - for (var t = this.abs(), a = e.t = 2 * t.t; --a >= 0;) e.data[a] = 0; - for (a = 0; a < t.t - 1; ++a) { - var r = t.am(a, t.data[a], e, 2 * a, 0, 1); - (e.data[a + t.t] += t.am(a + 1, 2 * t.data[a], e, 2 * a + 1, r, t.t - a - 1)) >= t.DV && (e.data[a + t.t] -= t.DV, e.data[a + t.t + 1] = 1) - } - e.t > 0 && (e.data[e.t - 1] += t.am(a, t.data[a], e, 2 * a, 0, 1)), e.s = 0, e.clamp() -} - -function Eo(e, t, a) { - var r = e.abs(); - if (!(r.t <= 0)) { - var n = this.abs(); - if (n.t < r.t) { - t != null && t.fromInt(0), a != null && this.copyTo(a); - return - } - a == null && (a = Ee()); - var i = Ee(), - s = this.s, - o = e.s, - l = this.DB - Xr(r.data[r.t - 1]); - l > 0 ? (r.lShiftTo(l, i), n.lShiftTo(l, a)) : (r.copyTo(i), n.copyTo(a)); - var f = i.t, - u = i.data[f - 1]; - if (u != 0) { - var c = u * (1 << this.F1) + (f > 1 ? i.data[f - 2] >> this.F2 : 0), - h = this.FV / c, - x = (1 << this.F1) / c, - d = 1 << this.F2, - g = a.t, - v = g - f, - B = t ?? Ee(); - for (i.dlShiftTo(v, B), a.compareTo(B) >= 0 && (a.data[a.t++] = 1, a.subTo(B, a)), q.ONE.dlShiftTo(f, B), B.subTo(i, i); i.t < f;) i.data[i.t++] = 0; - for (; --v >= 0;) { - var E = a.data[--g] == u ? this.DM : Math.floor(a.data[g] * h + (a.data[g - 1] + d) * x); - if ((a.data[g] += i.am(0, E, a, v, 0, f)) < E) - for (i.dlShiftTo(v, B), a.subTo(B, a); a.data[g] < --E;) a.subTo(B, a) - } - t != null && (a.drShiftTo(f, t), s != o && q.ZERO.subTo(t, t)), a.t = f, a.clamp(), l > 0 && a.rShiftTo(l, a), s < 0 && q.ZERO.subTo(a, a) - } - } -} - -function mo(e) { - var t = Ee(); - return this.abs().divRemTo(e, null, t), this.s < 0 && t.compareTo(q.ZERO) > 0 && e.subTo(t, t), t -} - -function qt(e) { - this.m = e -} - -function Bo(e) { - return e.s < 0 || e.compareTo(this.m) >= 0 ? e.mod(this.m) : e -} - -function Ao(e) { - return e -} - -function So(e) { - e.divRemTo(this.m, null, e) -} - -function To(e, t, a) { - e.multiplyTo(t, a), this.reduce(a) -} - -function bo(e, t) { - e.squareTo(t), this.reduce(t) -} -qt.prototype.convert = Bo; -qt.prototype.revert = Ao; -qt.prototype.reduce = So; -qt.prototype.mulTo = To; -qt.prototype.sqrTo = bo; - -function Io() { - if (this.t < 1) return 0; - var e = this.data[0]; - if (!(e & 1)) return 0; - var t = e & 3; - return t = t * (2 - (e & 15) * t) & 15, t = t * (2 - (e & 255) * t) & 255, t = t * (2 - ((e & 65535) * t & 65535)) & 65535, t = t * (2 - e * t % this.DV) % this.DV, t > 0 ? this.DV - t : -t -} - -function zt(e) { - this.m = e, this.mp = e.invDigit(), this.mpl = this.mp & 32767, this.mph = this.mp >> 15, this.um = (1 << e.DB - 15) - 1, this.mt2 = 2 * e.t -} - -function _o(e) { - var t = Ee(); - return e.abs().dlShiftTo(this.m.t, t), t.divRemTo(this.m, null, t), e.s < 0 && t.compareTo(q.ZERO) > 0 && this.m.subTo(t, t), t -} - -function Do(e) { - var t = Ee(); - return e.copyTo(t), this.reduce(t), t -} - -function No(e) { - for (; e.t <= this.mt2;) e.data[e.t++] = 0; - for (var t = 0; t < this.m.t; ++t) { - var a = e.data[t] & 32767, - r = a * this.mpl + ((a * this.mph + (e.data[t] >> 15) * this.mpl & this.um) << 15) & e.DM; - for (a = t + this.m.t, e.data[a] += this.m.am(0, r, e, t, 0, this.m.t); e.data[a] >= e.DV;) e.data[a] -= e.DV, e.data[++a]++ - } - e.clamp(), e.drShiftTo(this.m.t, e), e.compareTo(this.m) >= 0 && e.subTo(this.m, e) -} - -function Fo(e, t) { - e.squareTo(t), this.reduce(t) -} - -function Ro(e, t, a) { - e.multiplyTo(t, a), this.reduce(a) -} -zt.prototype.convert = _o; -zt.prototype.revert = Do; -zt.prototype.reduce = No; -zt.prototype.mulTo = Ro; -zt.prototype.sqrTo = Fo; - -function wo() { - return (this.t > 0 ? this.data[0] & 1 : this.s) == 0 -} - -function ko(e, t) { - if (e > 4294967295 || e < 1) return q.ONE; - var a = Ee(), - r = Ee(), - n = t.convert(this), - i = Xr(e) - 1; - for (n.copyTo(a); --i >= 0;) - if (t.sqrTo(a, r), (e & 1 << i) > 0) t.mulTo(r, n, a); - else { - var s = a; - a = r, r = s - } return t.revert(a) -} - -function Lo(e, t) { - var a; - return e < 256 || t.isEven() ? a = new qt(t) : a = new zt(t), this.exp(e, a) -} -q.prototype.copyTo = ao; -q.prototype.fromInt = no; -q.prototype.fromString = io; -q.prototype.clamp = so; -q.prototype.dlShiftTo = ho; -q.prototype.drShiftTo = xo; -q.prototype.lShiftTo = po; -q.prototype.rShiftTo = vo; -q.prototype.subTo = yo; -q.prototype.multiplyTo = go; -q.prototype.squareTo = Co; -q.prototype.divRemTo = Eo; -q.prototype.invDigit = Io; -q.prototype.isEven = wo; -q.prototype.exp = ko; -q.prototype.toString = oo; -q.prototype.negate = fo; -q.prototype.abs = uo; -q.prototype.compareTo = lo; -q.prototype.bitLength = co; -q.prototype.mod = mo; -q.prototype.modPowInt = Lo; -q.ZERO = _t(0); -q.ONE = _t(1); - -function Uo() { - var e = Ee(); - return this.copyTo(e), e -} - -function Po() { - if (this.s < 0) { - if (this.t == 1) return this.data[0] - this.DV; - if (this.t == 0) return -1 - } else { - if (this.t == 1) return this.data[0]; - if (this.t == 0) return 0 - } - return (this.data[1] & (1 << 32 - this.DB) - 1) << this.DB | this.data[0] -} - -function Vo() { - return this.t == 0 ? this.s : this.data[0] << 24 >> 24 -} - -function Oo() { - return this.t == 0 ? this.s : this.data[0] << 16 >> 16 -} - -function Ko(e) { - return Math.floor(Math.LN2 * this.DB / Math.log(e)) -} - -function Ho() { - return this.s < 0 ? -1 : this.t <= 0 || this.t == 1 && this.data[0] <= 0 ? 0 : 1 -} - -function Mo(e) { - if (e == null && (e = 10), this.signum() == 0 || e < 2 || e > 36) return "0"; - var t = this.chunkSize(e), - a = Math.pow(e, t), - r = _t(a), - n = Ee(), - i = Ee(), - s = ""; - for (this.divRemTo(r, n, i); n.signum() > 0;) s = (a + i.intValue()).toString(e).substr(1) + s, n.divRemTo(r, n, i); - return i.intValue().toString(e) + s -} - -function qo(e, t) { - this.fromInt(0), t == null && (t = 10); - for (var a = this.chunkSize(t), r = Math.pow(t, a), n = !1, i = 0, s = 0, o = 0; o < e.length; ++o) { - var l = si(e, o); - if (l < 0) { - e.charAt(o) == "-" && this.signum() == 0 && (n = !0); - continue - } - s = t * s + l, ++i >= a && (this.dMultiply(r), this.dAddOffset(s, 0), i = 0, s = 0) - } - i > 0 && (this.dMultiply(Math.pow(t, i)), this.dAddOffset(s, 0)), n && q.ZERO.subTo(this, this) -} - -function zo(e, t, a) { - if (typeof t == "number") - if (e < 2) this.fromInt(1); - else - for (this.fromNumber(e, a), this.testBit(e - 1) || this.bitwiseTo(q.ONE.shiftLeft(e - 1), da, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(t);) this.dAddOffset(2, 0), this.bitLength() > e && this.subTo(q.ONE.shiftLeft(e - 1), this); - else { - var r = new Array, - n = e & 7; - r.length = (e >> 3) + 1, t.nextBytes(r), n > 0 ? r[0] &= (1 << n) - 1 : r[0] = 0, this.fromString(r, 256) - } -} - -function Go() { - var e = this.t, - t = new Array; - t[0] = this.s; - var a = this.DB - e * this.DB % 8, - r, n = 0; - if (e-- > 0) - for (a < this.DB && (r = this.data[e] >> a) != (this.s & this.DM) >> a && (t[n++] = r | this.s << this.DB - a); e >= 0;) a < 8 ? (r = (this.data[e] & (1 << a) - 1) << 8 - a, r |= this.data[--e] >> (a += this.DB - 8)) : (r = this.data[e] >> (a -= 8) & 255, a <= 0 && (a += this.DB, --e)), r & 128 && (r |= -256), n == 0 && (this.s & 128) != (r & 128) && ++n, (n > 0 || r != this.s) && (t[n++] = r); - return t -} - -function Qo(e) { - return this.compareTo(e) == 0 -} - -function Wo(e) { - return this.compareTo(e) < 0 ? this : e -} - -function Xo(e) { - return this.compareTo(e) > 0 ? this : e -} - -function Yo(e, t, a) { - var r, n, i = Math.min(e.t, this.t); - for (r = 0; r < i; ++r) a.data[r] = t(this.data[r], e.data[r]); - if (e.t < this.t) { - for (n = e.s & this.DM, r = i; r < this.t; ++r) a.data[r] = t(this.data[r], n); - a.t = this.t - } else { - for (n = this.s & this.DM, r = i; r < e.t; ++r) a.data[r] = t(n, e.data[r]); - a.t = e.t - } - a.s = t(this.s, e.s), a.clamp() -} - -function $o(e, t) { - return e & t -} - -function jo(e) { - var t = Ee(); - return this.bitwiseTo(e, $o, t), t -} - -function da(e, t) { - return e | t -} - -function Zo(e) { - var t = Ee(); - return this.bitwiseTo(e, da, t), t -} - -function oi(e, t) { - return e ^ t -} - -function Jo(e) { - var t = Ee(); - return this.bitwiseTo(e, oi, t), t -} - -function fi(e, t) { - return e & ~t -} - -function ef(e) { - var t = Ee(); - return this.bitwiseTo(e, fi, t), t -} - -function tf() { - for (var e = Ee(), t = 0; t < this.t; ++t) e.data[t] = this.DM & ~this.data[t]; - return e.t = this.t, e.s = ~this.s, e -} - -function rf(e) { - var t = Ee(); - return e < 0 ? this.rShiftTo(-e, t) : this.lShiftTo(e, t), t -} - -function af(e) { - var t = Ee(); - return e < 0 ? this.lShiftTo(-e, t) : this.rShiftTo(e, t), t -} - -function nf(e) { - if (e == 0) return -1; - var t = 0; - return e & 65535 || (e >>= 16, t += 16), e & 255 || (e >>= 8, t += 8), e & 15 || (e >>= 4, t += 4), e & 3 || (e >>= 2, t += 2), e & 1 || ++t, t -} - -function sf() { - for (var e = 0; e < this.t; ++e) - if (this.data[e] != 0) return e * this.DB + nf(this.data[e]); - return this.s < 0 ? this.t * this.DB : -1 -} - -function of(e) { - for (var t = 0; e != 0;) e &= e - 1, ++t; - return t -} - -function ff() { - for (var e = 0, t = this.s & this.DM, a = 0; a < this.t; ++a) e += of(this.data[a] ^ t); - return e -} - -function uf(e) { - var t = Math.floor(e / this.DB); - return t >= this.t ? this.s != 0 : (this.data[t] & 1 << e % this.DB) != 0 -} - -function lf(e, t) { - var a = q.ONE.shiftLeft(e); - return this.bitwiseTo(a, t, a), a -} - -function cf(e) { - return this.changeBit(e, da) -} - -function hf(e) { - return this.changeBit(e, fi) -} - -function df(e) { - return this.changeBit(e, oi) -} - -function xf(e, t) { - for (var a = 0, r = 0, n = Math.min(e.t, this.t); a < n;) r += this.data[a] + e.data[a], t.data[a++] = r & this.DM, r >>= this.DB; - if (e.t < this.t) { - for (r += e.s; a < this.t;) r += this.data[a], t.data[a++] = r & this.DM, r >>= this.DB; - r += this.s - } else { - for (r += this.s; a < e.t;) r += e.data[a], t.data[a++] = r & this.DM, r >>= this.DB; - r += e.s - } - t.s = r < 0 ? -1 : 0, r > 0 ? t.data[a++] = r : r < -1 && (t.data[a++] = this.DV + r), t.t = a, t.clamp() -} - -function pf(e) { - var t = Ee(); - return this.addTo(e, t), t -} - -function vf(e) { - var t = Ee(); - return this.subTo(e, t), t -} - -function yf(e) { - var t = Ee(); - return this.multiplyTo(e, t), t -} - -function gf(e) { - var t = Ee(); - return this.divRemTo(e, t, null), t -} - -function Cf(e) { - var t = Ee(); - return this.divRemTo(e, null, t), t -} - -function Ef(e) { - var t = Ee(), - a = Ee(); - return this.divRemTo(e, t, a), new Array(t, a) -} - -function mf(e) { - this.data[this.t] = this.am(0, e - 1, this, 0, 0, this.t), ++this.t, this.clamp() -} - -function Bf(e, t) { - if (e != 0) { - for (; this.t <= t;) this.data[this.t++] = 0; - for (this.data[t] += e; this.data[t] >= this.DV;) this.data[t] -= this.DV, ++t >= this.t && (this.data[this.t++] = 0), ++this.data[t] - } -} - -function Cr() {} - -function ui(e) { - return e -} - -function Af(e, t, a) { - e.multiplyTo(t, a) -} - -function Sf(e, t) { - e.squareTo(t) -} -Cr.prototype.convert = ui; -Cr.prototype.revert = ui; -Cr.prototype.mulTo = Af; -Cr.prototype.sqrTo = Sf; - -function Tf(e) { - return this.exp(e, new Cr) -} - -function bf(e, t, a) { - var r = Math.min(this.t + e.t, t); - for (a.s = 0, a.t = r; r > 0;) a.data[--r] = 0; - var n; - for (n = a.t - this.t; r < n; ++r) a.data[r + this.t] = this.am(0, e.data[r], a, r, 0, this.t); - for (n = Math.min(e.t, t); r < n; ++r) this.am(0, e.data[r], a, r, 0, t - r); - a.clamp() -} - -function If(e, t, a) { - --t; - var r = a.t = this.t + e.t - t; - for (a.s = 0; --r >= 0;) a.data[r] = 0; - for (r = Math.max(t - this.t, 0); r < e.t; ++r) a.data[this.t + r - t] = this.am(t - r, e.data[r], a, 0, 0, this.t + r - t); - a.clamp(), a.drShiftTo(1, a) -} - -function ar(e) { - this.r2 = Ee(), this.q3 = Ee(), q.ONE.dlShiftTo(2 * e.t, this.r2), this.mu = this.r2.divide(e), this.m = e -} - -function _f(e) { - if (e.s < 0 || e.t > 2 * this.m.t) return e.mod(this.m); - if (e.compareTo(this.m) < 0) return e; - var t = Ee(); - return e.copyTo(t), this.reduce(t), t -} - -function Df(e) { - return e -} - -function Nf(e) { - for (e.drShiftTo(this.m.t - 1, this.r2), e.t > this.m.t + 1 && (e.t = this.m.t + 1, e.clamp()), this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3), this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2); e.compareTo(this.r2) < 0;) e.dAddOffset(1, this.m.t + 1); - for (e.subTo(this.r2, e); e.compareTo(this.m) >= 0;) e.subTo(this.m, e) -} - -function Ff(e, t) { - e.squareTo(t), this.reduce(t) -} - -function Rf(e, t, a) { - e.multiplyTo(t, a), this.reduce(a) -} -ar.prototype.convert = _f; -ar.prototype.revert = Df; -ar.prototype.reduce = Nf; -ar.prototype.mulTo = Rf; -ar.prototype.sqrTo = Ff; - -function wf(e, t) { - var a = e.bitLength(), - r, n = _t(1), - i; - if (a <= 0) return n; - a < 18 ? r = 1 : a < 48 ? r = 3 : a < 144 ? r = 4 : a < 768 ? r = 5 : r = 6, a < 8 ? i = new qt(t) : t.isEven() ? i = new ar(t) : i = new zt(t); - var s = new Array, - o = 3, - l = r - 1, - f = (1 << r) - 1; - if (s[1] = i.convert(this), r > 1) { - var u = Ee(); - for (i.sqrTo(s[1], u); o <= f;) s[o] = Ee(), i.mulTo(u, s[o - 2], s[o]), o += 2 - } - var c = e.t - 1, - h, x = !0, - d = Ee(), - g; - for (a = Xr(e.data[c]) - 1; c >= 0;) { - for (a >= l ? h = e.data[c] >> a - l & f : (h = (e.data[c] & (1 << a + 1) - 1) << l - a, c > 0 && (h |= e.data[c - 1] >> this.DB + a - l)), o = r; !(h & 1);) h >>= 1, --o; - if ((a -= o) < 0 && (a += this.DB, --c), x) s[h].copyTo(n), x = !1; - else { - for (; o > 1;) i.sqrTo(n, d), i.sqrTo(d, n), o -= 2; - o > 0 ? i.sqrTo(n, d) : (g = n, n = d, d = g), i.mulTo(d, s[h], n) - } - for (; c >= 0 && !(e.data[c] & 1 << a);) i.sqrTo(n, d), g = n, n = d, d = g, --a < 0 && (a = this.DB - 1, --c) - } - return i.revert(n) -} - -function kf(e) { - var t = this.s < 0 ? this.negate() : this.clone(), - a = e.s < 0 ? e.negate() : e.clone(); - if (t.compareTo(a) < 0) { - var r = t; - t = a, a = r - } - var n = t.getLowestSetBit(), - i = a.getLowestSetBit(); - if (i < 0) return t; - for (n < i && (i = n), i > 0 && (t.rShiftTo(i, t), a.rShiftTo(i, a)); t.signum() > 0;)(n = t.getLowestSetBit()) > 0 && t.rShiftTo(n, t), (n = a.getLowestSetBit()) > 0 && a.rShiftTo(n, a), t.compareTo(a) >= 0 ? (t.subTo(a, t), t.rShiftTo(1, t)) : (a.subTo(t, a), a.rShiftTo(1, a)); - return i > 0 && a.lShiftTo(i, a), a -} - -function Lf(e) { - if (e <= 0) return 0; - var t = this.DV % e, - a = this.s < 0 ? e - 1 : 0; - if (this.t > 0) - if (t == 0) a = this.data[0] % e; - else - for (var r = this.t - 1; r >= 0; --r) a = (t * a + this.data[r]) % e; - return a -} - -function Uf(e) { - var t = e.isEven(); - if (this.isEven() && t || e.signum() == 0) return q.ZERO; - for (var a = e.clone(), r = this.clone(), n = _t(1), i = _t(0), s = _t(0), o = _t(1); a.signum() != 0;) { - for (; a.isEven();) a.rShiftTo(1, a), t ? ((!n.isEven() || !i.isEven()) && (n.addTo(this, n), i.subTo(e, i)), n.rShiftTo(1, n)) : i.isEven() || i.subTo(e, i), i.rShiftTo(1, i); - for (; r.isEven();) r.rShiftTo(1, r), t ? ((!s.isEven() || !o.isEven()) && (s.addTo(this, s), o.subTo(e, o)), s.rShiftTo(1, s)) : o.isEven() || o.subTo(e, o), o.rShiftTo(1, o); - a.compareTo(r) >= 0 ? (a.subTo(r, a), t && n.subTo(s, n), i.subTo(o, i)) : (r.subTo(a, r), t && s.subTo(n, s), o.subTo(i, o)) - } - if (r.compareTo(q.ONE) != 0) return q.ZERO; - if (o.compareTo(e) >= 0) return o.subtract(e); - if (o.signum() < 0) o.addTo(e, o); - else return o; - return o.signum() < 0 ? o.add(e) : o -} -var ft = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509], - Pf = (1 << 26) / ft[ft.length - 1]; - -function Vf(e) { - var t, a = this.abs(); - if (a.t == 1 && a.data[0] <= ft[ft.length - 1]) { - for (t = 0; t < ft.length; ++t) - if (a.data[0] == ft[t]) return !0; - return !1 - } - if (a.isEven()) return !1; - for (t = 1; t < ft.length;) { - for (var r = ft[t], n = t + 1; n < ft.length && r < Pf;) r *= ft[n++]; - for (r = a.modInt(r); t < n;) - if (r % ft[t++] == 0) return !1 - } - return a.millerRabin(e) -} - -function Of(e) { - var t = this.subtract(q.ONE), - a = t.getLowestSetBit(); - if (a <= 0) return !1; - for (var r = t.shiftRight(a), n = Kf(), i, s = 0; s < e; ++s) { - do i = new q(this.bitLength(), n); while (i.compareTo(q.ONE) <= 0 || i.compareTo(t) >= 0); - var o = i.modPow(r, this); - if (o.compareTo(q.ONE) != 0 && o.compareTo(t) != 0) { - for (var l = 1; l++ < a && o.compareTo(t) != 0;) - if (o = o.modPowInt(2, this), o.compareTo(q.ONE) == 0) return !1; - if (o.compareTo(t) != 0) return !1 - } - } - return !0 -} - -function Kf() { - return { - nextBytes: function (e) { - for (var t = 0; t < e.length; ++t) e[t] = Math.floor(Math.random() * 256) - } - } -} -q.prototype.chunkSize = Ko; -q.prototype.toRadix = Mo; -q.prototype.fromRadix = qo; -q.prototype.fromNumber = zo; -q.prototype.bitwiseTo = Yo; -q.prototype.changeBit = lf; -q.prototype.addTo = xf; -q.prototype.dMultiply = mf; -q.prototype.dAddOffset = Bf; -q.prototype.multiplyLowerTo = bf; -q.prototype.multiplyUpperTo = If; -q.prototype.modInt = Lf; -q.prototype.millerRabin = Of; -q.prototype.clone = Uo; -q.prototype.intValue = Po; -q.prototype.byteValue = Vo; -q.prototype.shortValue = Oo; -q.prototype.signum = Ho; -q.prototype.toByteArray = Go; -q.prototype.equals = Qo; -q.prototype.min = Wo; -q.prototype.max = Xo; -q.prototype.and = jo; -q.prototype.or = Zo; -q.prototype.xor = Jo; -q.prototype.andNot = ef; -q.prototype.not = tf; -q.prototype.shiftLeft = rf; -q.prototype.shiftRight = af; -q.prototype.getLowestSetBit = sf; -q.prototype.bitCount = ff; -q.prototype.testBit = uf; -q.prototype.setBit = cf; -q.prototype.clearBit = hf; -q.prototype.flipBit = df; -q.prototype.add = pf; -q.prototype.subtract = vf; -q.prototype.multiply = yf; -q.prototype.divide = gf; -q.prototype.remainder = Cf; -q.prototype.divideAndRemainder = Ef; -q.prototype.modPow = wf; -q.prototype.modInverse = Uf; -q.prototype.pow = Tf; -q.prototype.gcd = kf; -q.prototype.isProbablePrime = Vf; -var pt = le, - li = pt.sha1 = pt.sha1 || {}; -pt.md.sha1 = pt.md.algorithms.sha1 = li; -li.create = function () { - ci || Hf(); - var e = null, - t = pt.util.createBuffer(), - a = new Array(80), - r = { - algorithm: "sha1", - blockLength: 64, - digestLength: 20, - messageLength: 0, - fullMessageLength: null, - messageLengthSize: 8 - }; - return r.start = function () { - r.messageLength = 0, r.fullMessageLength = r.messageLength64 = []; - for (var n = r.messageLengthSize / 4, i = 0; i < n; ++i) r.fullMessageLength.push(0); - return t = pt.util.createBuffer(), e = { - h0: 1732584193, - h1: 4023233417, - h2: 2562383102, - h3: 271733878, - h4: 3285377520 - }, r - }, r.start(), r.update = function (n, i) { - i === "utf8" && (n = pt.util.encodeUtf8(n)); - var s = n.length; - r.messageLength += s, s = [s / 4294967296 >>> 0, s >>> 0]; - for (var o = r.fullMessageLength.length - 1; o >= 0; --o) r.fullMessageLength[o] += s[1], s[1] = s[0] + (r.fullMessageLength[o] / 4294967296 >>> 0), r.fullMessageLength[o] = r.fullMessageLength[o] >>> 0, s[0] = s[1] / 4294967296 >>> 0; - return t.putBytes(n), _n(e, a, t), (t.read > 2048 || t.length() === 0) && t.compact(), r - }, r.digest = function () { - var n = pt.util.createBuffer(); - n.putBytes(t.bytes()); - var i = r.fullMessageLength[r.fullMessageLength.length - 1] + r.messageLengthSize, - s = i & r.blockLength - 1; - n.putBytes(W0.substr(0, r.blockLength - s)); - for (var o, l, f = r.fullMessageLength[0] * 8, u = 0; u < r.fullMessageLength.length - 1; ++u) o = r.fullMessageLength[u + 1] * 8, l = o / 4294967296 >>> 0, f += l, n.putInt32(f >>> 0), f = o >>> 0; - n.putInt32(f); - var c = { - h0: e.h0, - h1: e.h1, - h2: e.h2, - h3: e.h3, - h4: e.h4 - }; - _n(c, a, n); - var h = pt.util.createBuffer(); - return h.putInt32(c.h0), h.putInt32(c.h1), h.putInt32(c.h2), h.putInt32(c.h3), h.putInt32(c.h4), h - }, r -}; -var W0 = null, - ci = !1; - -function Hf() { - W0 = "€", W0 += pt.util.fillString("\0", 64), ci = !0 -} - -function _n(e, t, a) { - for (var r, n, i, s, o, l, f, u, c = a.length(); c >= 64;) { - for (n = e.h0, i = e.h1, s = e.h2, o = e.h3, l = e.h4, u = 0; u < 16; ++u) r = a.getInt32(), t[u] = r, f = o ^ i & (s ^ o), r = (n << 5 | n >>> 27) + f + l + 1518500249 + r, l = o, o = s, s = (i << 30 | i >>> 2) >>> 0, i = n, n = r; - for (; u < 20; ++u) r = t[u - 3] ^ t[u - 8] ^ t[u - 14] ^ t[u - 16], r = r << 1 | r >>> 31, t[u] = r, f = o ^ i & (s ^ o), r = (n << 5 | n >>> 27) + f + l + 1518500249 + r, l = o, o = s, s = (i << 30 | i >>> 2) >>> 0, i = n, n = r; - for (; u < 32; ++u) r = t[u - 3] ^ t[u - 8] ^ t[u - 14] ^ t[u - 16], r = r << 1 | r >>> 31, t[u] = r, f = i ^ s ^ o, r = (n << 5 | n >>> 27) + f + l + 1859775393 + r, l = o, o = s, s = (i << 30 | i >>> 2) >>> 0, i = n, n = r; - for (; u < 40; ++u) r = t[u - 6] ^ t[u - 16] ^ t[u - 28] ^ t[u - 32], r = r << 2 | r >>> 30, t[u] = r, f = i ^ s ^ o, r = (n << 5 | n >>> 27) + f + l + 1859775393 + r, l = o, o = s, s = (i << 30 | i >>> 2) >>> 0, i = n, n = r; - for (; u < 60; ++u) r = t[u - 6] ^ t[u - 16] ^ t[u - 28] ^ t[u - 32], r = r << 2 | r >>> 30, t[u] = r, f = i & s | o & (i ^ s), r = (n << 5 | n >>> 27) + f + l + 2400959708 + r, l = o, o = s, s = (i << 30 | i >>> 2) >>> 0, i = n, n = r; - for (; u < 80; ++u) r = t[u - 6] ^ t[u - 16] ^ t[u - 28] ^ t[u - 32], r = r << 2 | r >>> 30, t[u] = r, f = i ^ s ^ o, r = (n << 5 | n >>> 27) + f + l + 3395469782 + r, l = o, o = s, s = (i << 30 | i >>> 2) >>> 0, i = n, n = r; - e.h0 = e.h0 + n | 0, e.h1 = e.h1 + i | 0, e.h2 = e.h2 + s | 0, e.h3 = e.h3 + o | 0, e.h4 = e.h4 + l | 0, c -= 64 - } -} -var vt = le, - hi = vt.pkcs1 = vt.pkcs1 || {}; -hi.encode_rsa_oaep = function (e, t, a) { - var r, n, i, s; - typeof a == "string" ? (r = a, n = arguments[3] || void 0, i = arguments[4] || void 0) : a && (r = a.label || void 0, n = a.seed || void 0, i = a.md || void 0, a.mgf1 && a.mgf1.md && (s = a.mgf1.md)), i ? i.start() : i = vt.md.sha1.create(), s || (s = i); - var o = Math.ceil(e.n.bitLength() / 8), - l = o - 2 * i.digestLength - 2; - if (t.length > l) { - var f = new Error("RSAES-OAEP input message length is too long."); - throw f.length = t.length, f.maxLength = l, f - } - r || (r = ""), i.update(r, "raw"); - for (var u = i.digest(), c = "", h = l - t.length, x = 0; x < h; x++) c += "\0"; - var d = u.getBytes() + c + "" + t; - if (!n) n = vt.random.getBytes(i.digestLength); - else if (n.length !== i.digestLength) { - var f = new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."); - throw f.seedLength = n.length, f.digestLength = i.digestLength, f - } - var g = Rr(n, o - i.digestLength - 1, s), - v = vt.util.xorBytes(d, g, d.length), - B = Rr(v, i.digestLength, s), - E = vt.util.xorBytes(n, B, n.length); - return "\0" + E + v -}; -hi.decode_rsa_oaep = function (e, t, a) { - var r, n, i; - typeof a == "string" ? (r = a, n = arguments[3] || void 0) : a && (r = a.label || void 0, n = a.md || void 0, a.mgf1 && a.mgf1.md && (i = a.mgf1.md)); - var s = Math.ceil(e.n.bitLength() / 8); - if (t.length !== s) { - var v = new Error("RSAES-OAEP encoded message length is invalid."); - throw v.length = t.length, v.expectedLength = s, v - } - if (n === void 0 ? n = vt.md.sha1.create() : n.start(), i || (i = n), s < 2 * n.digestLength + 2) throw new Error("RSAES-OAEP key is too short for the hash function."); - r || (r = ""), n.update(r, "raw"); - for (var o = n.digest().getBytes(), l = t.charAt(0), f = t.substring(1, n.digestLength + 1), u = t.substring(1 + n.digestLength), c = Rr(u, n.digestLength, i), h = vt.util.xorBytes(f, c, f.length), x = Rr(h, s - n.digestLength - 1, i), d = vt.util.xorBytes(u, x, u.length), g = d.substring(0, n.digestLength), v = l !== "\0", B = 0; B < n.digestLength; ++B) v |= o.charAt(B) !== g.charAt(B); - for (var E = 1, m = n.digestLength, A = n.digestLength; A < d.length; A++) { - var T = d.charCodeAt(A), - S = T & 1 ^ 1, - N = E ? 65534 : 0; - v |= T & N, E = E & S, m += E - } - if (v || d.charCodeAt(m) !== 1) throw new Error("Invalid RSAES-OAEP padding."); - return d.substring(m + 1) -}; - -function Rr(e, t, a) { - a || (a = vt.md.sha1.create()); - for (var r = "", n = Math.ceil(t / a.digestLength), i = 0; i < n; ++i) { - var s = String.fromCharCode(i >> 24 & 255, i >> 16 & 255, i >> 8 & 255, i & 255); - a.start(), a.update(e + s), r += a.digest().getBytes() - } - return r.substring(0, t) -} -var St = le; -(function () { - if (St.prime) { - St.prime; - return - } - var e = St.prime = St.prime || {}, - t = St.jsbn.BigInteger, - a = [6, 4, 2, 4, 2, 4, 6, 2], - r = new t(null); - r.fromInt(30); - var n = function (c, h) { - return c | h - }; - e.generateProbablePrime = function (c, h, x) { - typeof h == "function" && (x = h, h = {}), h = h || {}; - var d = h.algorithm || "PRIMEINC"; - typeof d == "string" && (d = { - name: d - }), d.options = d.options || {}; - var g = h.prng || St.random, - v = { - nextBytes: function (B) { - for (var E = g.getBytesSync(B.length), m = 0; m < B.length; ++m) B[m] = E.charCodeAt(m) - } - }; - if (d.name === "PRIMEINC") return i(c, v, d.options, x); - throw new Error("Invalid prime generation algorithm: " + d.name) - }; - - function i(c, h, x, d) { - return "workers" in x ? l(c, h, x, d) : s(c, h, x, d) - } - - function s(c, h, x, d) { - var g = f(c, h), - v = 0, - B = u(g.bitLength()); - "millerRabinTests" in x && (B = x.millerRabinTests); - var E = 10; - "maxBlockTime" in x && (E = x.maxBlockTime), o(g, c, h, v, B, E, d) - } - - function o(c, h, x, d, g, v, B) { - var E = +new Date; - do { - if (c.bitLength() > h && (c = f(h, x)), c.isProbablePrime(g)) return B(null, c); - c.dAddOffset(a[d++ % 8], 0) - } while (v < 0 || +new Date - E < v); - St.util.setImmediate(function () { - o(c, h, x, d, g, v, B) - }) - } - - function l(c, h, x, d) { - if (typeof Worker > "u") return s(c, h, x, d); - var g = f(c, h), - v = x.workers, - B = x.workLoad || 100, - E = B * 30 / 8, - m = x.workerScript || "forge/prime.worker.js"; - if (v === -1) return St.util.estimateCores(function (T, S) { - T && (S = 2), v = S - 1, A() - }); - A(); - - function A() { - v = Math.max(1, v); - for (var T = [], S = 0; S < v; ++S) T[S] = new Worker(m); - for (var S = 0; S < v; ++S) T[S].addEventListener("message", w); - var N = !1; - - function w(K) { - if (!N) { - var D = K.data; - if (D.found) { - for (var F = 0; F < T.length; ++F) T[F].terminate(); - return N = !0, d(null, new t(D.prime, 16)) - } - g.bitLength() > c && (g = f(c, h)); - var U = g.toString(16); - K.target.postMessage({ - hex: U, - workLoad: B - }), g.dAddOffset(E, 0) - } - } - } - } - - function f(c, h) { - var x = new t(c, h), - d = c - 1; - return x.testBit(d) || x.bitwiseTo(t.ONE.shiftLeft(d), n, x), x.dAddOffset(31 - x.mod(r).byteValue(), 0), x - } - - function u(c) { - return c <= 100 ? 27 : c <= 150 ? 18 : c <= 200 ? 15 : c <= 250 ? 12 : c <= 300 ? 9 : c <= 350 ? 8 : c <= 400 ? 7 : c <= 500 ? 6 : c <= 600 ? 5 : c <= 800 ? 4 : c <= 1250 ? 3 : 2 - } -})(); -var te = le; -if (typeof Ce > "u") var Ce = te.jsbn.BigInteger; -var X0 = te.util.isNodejs ? Kr : null, - R = te.asn1, - nt = te.util; -te.pki = te.pki || {}; -te.pki.rsa = te.rsa = te.rsa || {}; -var se = te.pki, - Mf = [6, 4, 2, 4, 2, 4, 6, 2], - qf = { - name: "PrivateKeyInfo", - tagClass: R.Class.UNIVERSAL, - type: R.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "PrivateKeyInfo.version", - tagClass: R.Class.UNIVERSAL, - type: R.Type.INTEGER, - constructed: !1, - capture: "privateKeyVersion" - }, { - name: "PrivateKeyInfo.privateKeyAlgorithm", - tagClass: R.Class.UNIVERSAL, - type: R.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "AlgorithmIdentifier.algorithm", - tagClass: R.Class.UNIVERSAL, - type: R.Type.OID, - constructed: !1, - capture: "privateKeyOid" - }] - }, { - name: "PrivateKeyInfo", - tagClass: R.Class.UNIVERSAL, - type: R.Type.OCTETSTRING, - constructed: !1, - capture: "privateKey" - }] - }, - zf = { - name: "RSAPrivateKey", - tagClass: R.Class.UNIVERSAL, - type: R.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "RSAPrivateKey.version", - tagClass: R.Class.UNIVERSAL, - type: R.Type.INTEGER, - constructed: !1, - capture: "privateKeyVersion" - }, { - name: "RSAPrivateKey.modulus", - tagClass: R.Class.UNIVERSAL, - type: R.Type.INTEGER, - constructed: !1, - capture: "privateKeyModulus" - }, { - name: "RSAPrivateKey.publicExponent", - tagClass: R.Class.UNIVERSAL, - type: R.Type.INTEGER, - constructed: !1, - capture: "privateKeyPublicExponent" - }, { - name: "RSAPrivateKey.privateExponent", - tagClass: R.Class.UNIVERSAL, - type: R.Type.INTEGER, - constructed: !1, - capture: "privateKeyPrivateExponent" - }, { - name: "RSAPrivateKey.prime1", - tagClass: R.Class.UNIVERSAL, - type: R.Type.INTEGER, - constructed: !1, - capture: "privateKeyPrime1" - }, { - name: "RSAPrivateKey.prime2", - tagClass: R.Class.UNIVERSAL, - type: R.Type.INTEGER, - constructed: !1, - capture: "privateKeyPrime2" - }, { - name: "RSAPrivateKey.exponent1", - tagClass: R.Class.UNIVERSAL, - type: R.Type.INTEGER, - constructed: !1, - capture: "privateKeyExponent1" - }, { - name: "RSAPrivateKey.exponent2", - tagClass: R.Class.UNIVERSAL, - type: R.Type.INTEGER, - constructed: !1, - capture: "privateKeyExponent2" - }, { - name: "RSAPrivateKey.coefficient", - tagClass: R.Class.UNIVERSAL, - type: R.Type.INTEGER, - constructed: !1, - capture: "privateKeyCoefficient" - }] - }, - Gf = { - name: "RSAPublicKey", - tagClass: R.Class.UNIVERSAL, - type: R.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "RSAPublicKey.modulus", - tagClass: R.Class.UNIVERSAL, - type: R.Type.INTEGER, - constructed: !1, - capture: "publicKeyModulus" - }, { - name: "RSAPublicKey.exponent", - tagClass: R.Class.UNIVERSAL, - type: R.Type.INTEGER, - constructed: !1, - capture: "publicKeyExponent" - }] - }, - Qf = te.pki.rsa.publicKeyValidator = { - name: "SubjectPublicKeyInfo", - tagClass: R.Class.UNIVERSAL, - type: R.Type.SEQUENCE, - constructed: !0, - captureAsn1: "subjectPublicKeyInfo", - value: [{ - name: "SubjectPublicKeyInfo.AlgorithmIdentifier", - tagClass: R.Class.UNIVERSAL, - type: R.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "AlgorithmIdentifier.algorithm", - tagClass: R.Class.UNIVERSAL, - type: R.Type.OID, - constructed: !1, - capture: "publicKeyOid" - }] - }, { - name: "SubjectPublicKeyInfo.subjectPublicKey", - tagClass: R.Class.UNIVERSAL, - type: R.Type.BITSTRING, - constructed: !1, - value: [{ - name: "SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey", - tagClass: R.Class.UNIVERSAL, - type: R.Type.SEQUENCE, - constructed: !0, - optional: !0, - captureAsn1: "rsaPublicKey" - }] - }] - }, - Wf = { - name: "DigestInfo", - tagClass: R.Class.UNIVERSAL, - type: R.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "DigestInfo.DigestAlgorithm", - tagClass: R.Class.UNIVERSAL, - type: R.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "DigestInfo.DigestAlgorithm.algorithmIdentifier", - tagClass: R.Class.UNIVERSAL, - type: R.Type.OID, - constructed: !1, - capture: "algorithmIdentifier" - }, { - name: "DigestInfo.DigestAlgorithm.parameters", - tagClass: R.Class.UNIVERSAL, - type: R.Type.NULL, - capture: "parameters", - optional: !0, - constructed: !1 - }] - }, { - name: "DigestInfo.digest", - tagClass: R.Class.UNIVERSAL, - type: R.Type.OCTETSTRING, - constructed: !1, - capture: "digest" - }] - }, - Xf = function (e) { - var t; - if (e.algorithm in se.oids) t = se.oids[e.algorithm]; - else { - var a = new Error("Unknown message digest algorithm."); - throw a.algorithm = e.algorithm, a - } - var r = R.oidToDer(t).getBytes(), - n = R.create(R.Class.UNIVERSAL, R.Type.SEQUENCE, !0, []), - i = R.create(R.Class.UNIVERSAL, R.Type.SEQUENCE, !0, []); - i.value.push(R.create(R.Class.UNIVERSAL, R.Type.OID, !1, r)), i.value.push(R.create(R.Class.UNIVERSAL, R.Type.NULL, !1, "")); - var s = R.create(R.Class.UNIVERSAL, R.Type.OCTETSTRING, !1, e.digest().getBytes()); - return n.value.push(i), n.value.push(s), R.toDer(n).getBytes() - }, - di = function (e, t, a) { - if (a) return e.modPow(t.e, t.n); - if (!t.p || !t.q) return e.modPow(t.d, t.n); - t.dP || (t.dP = t.d.mod(t.p.subtract(Ce.ONE))), t.dQ || (t.dQ = t.d.mod(t.q.subtract(Ce.ONE))), t.qInv || (t.qInv = t.q.modInverse(t.p)); - var r; - do r = new Ce(te.util.bytesToHex(te.random.getBytes(t.n.bitLength() / 8)), 16); while (r.compareTo(t.n) >= 0 || !r.gcd(t.n).equals(Ce.ONE)); - e = e.multiply(r.modPow(t.e, t.n)).mod(t.n); - for (var n = e.mod(t.p).modPow(t.dP, t.p), i = e.mod(t.q).modPow(t.dQ, t.q); n.compareTo(i) < 0;) n = n.add(t.p); - var s = n.subtract(i).multiply(t.qInv).mod(t.p).multiply(t.q).add(i); - return s = s.multiply(r.modInverse(t.n)).mod(t.n), s - }; -se.rsa.encrypt = function (e, t, a) { - var r = a, - n, i = Math.ceil(t.n.bitLength() / 8); - a !== !1 && a !== !0 ? (r = a === 2, n = xi(e, t, a)) : (n = te.util.createBuffer(), n.putBytes(e)); - for (var s = new Ce(n.toHex(), 16), o = di(s, t, r), l = o.toString(16), f = te.util.createBuffer(), u = i - Math.ceil(l.length / 2); u > 0;) f.putByte(0), --u; - return f.putBytes(te.util.hexToBytes(l)), f.getBytes() -}; -se.rsa.decrypt = function (e, t, a, r) { - var n = Math.ceil(t.n.bitLength() / 8); - if (e.length !== n) { - var i = new Error("Encrypted message length is invalid."); - throw i.length = e.length, i.expected = n, i - } - var s = new Ce(te.util.createBuffer(e).toHex(), 16); - if (s.compareTo(t.n) >= 0) throw new Error("Encrypted message is invalid."); - for (var o = di(s, t, a), l = o.toString(16), f = te.util.createBuffer(), u = n - Math.ceil(l.length / 2); u > 0;) f.putByte(0), --u; - return f.putBytes(te.util.hexToBytes(l)), r !== !1 ? wr(f.getBytes(), t, a) : f.getBytes() -}; -se.rsa.createKeyPairGenerationState = function (e, t, a) { - typeof e == "string" && (e = parseInt(e, 10)), e = e || 2048, a = a || {}; - var r = a.prng || te.random, - n = { - nextBytes: function (o) { - for (var l = r.getBytesSync(o.length), f = 0; f < o.length; ++f) o[f] = l.charCodeAt(f) - } - }, - i = a.algorithm || "PRIMEINC", - s; - if (i === "PRIMEINC") s = { - algorithm: i, - state: 0, - bits: e, - rng: n, - eInt: t || 65537, - e: new Ce(null), - p: null, - q: null, - qBits: e >> 1, - pBits: e - (e >> 1), - pqState: 0, - num: null, - keys: null - }, s.e.fromInt(s.eInt); - else throw new Error("Invalid key generation algorithm: " + i); - return s -}; -se.rsa.stepKeyPairGenerationState = function (e, t) { - "algorithm" in e || (e.algorithm = "PRIMEINC"); - var a = new Ce(null); - a.fromInt(30); - for (var r = 0, n = function (c, h) { - return c | h - }, i = +new Date, s, o = 0; e.keys === null && (t <= 0 || o < t);) { - if (e.state === 0) { - var l = e.p === null ? e.pBits : e.qBits, - f = l - 1; - e.pqState === 0 ? (e.num = new Ce(l, e.rng), e.num.testBit(f) || e.num.bitwiseTo(Ce.ONE.shiftLeft(f), n, e.num), e.num.dAddOffset(31 - e.num.mod(a).byteValue(), 0), r = 0, ++e.pqState) : e.pqState === 1 ? e.num.bitLength() > l ? e.pqState = 0 : e.num.isProbablePrime($f(e.num.bitLength())) ? ++e.pqState : e.num.dAddOffset(Mf[r++ % 8], 0) : e.pqState === 2 ? e.pqState = e.num.subtract(Ce.ONE).gcd(e.e).compareTo(Ce.ONE) === 0 ? 3 : 0 : e.pqState === 3 && (e.pqState = 0, e.p === null ? e.p = e.num : e.q = e.num, e.p !== null && e.q !== null && ++e.state, e.num = null) - } else if (e.state === 1) e.p.compareTo(e.q) < 0 && (e.num = e.p, e.p = e.q, e.q = e.num), ++e.state; - else if (e.state === 2) e.p1 = e.p.subtract(Ce.ONE), e.q1 = e.q.subtract(Ce.ONE), e.phi = e.p1.multiply(e.q1), ++e.state; - else if (e.state === 3) e.phi.gcd(e.e).compareTo(Ce.ONE) === 0 ? ++e.state : (e.p = null, e.q = null, e.state = 0); - else if (e.state === 4) e.n = e.p.multiply(e.q), e.n.bitLength() === e.bits ? ++e.state : (e.q = null, e.state = 0); - else if (e.state === 5) { - var u = e.e.modInverse(e.phi); - e.keys = { - privateKey: se.rsa.setPrivateKey(e.n, e.e, u, e.p, e.q, u.mod(e.p1), u.mod(e.q1), e.q.modInverse(e.p)), - publicKey: se.rsa.setPublicKey(e.n, e.e) - } - } - s = +new Date, o += s - i, i = s - } - return e.keys !== null -}; -se.rsa.generateKeyPair = function (e, t, a, r) { - if (arguments.length === 1 ? typeof e == "object" ? (a = e, e = void 0) : typeof e == "function" && (r = e, e = void 0) : arguments.length === 2 ? typeof e == "number" ? typeof t == "function" ? (r = t, t = void 0) : typeof t != "number" && (a = t, t = void 0) : (a = e, r = t, e = void 0, t = void 0) : arguments.length === 3 && (typeof t == "number" ? typeof a == "function" && (r = a, a = void 0) : (r = a, a = t, t = void 0)), a = a || {}, e === void 0 && (e = a.bits || 2048), t === void 0 && (t = a.e || 65537), !te.options.usePureJavaScript && !a.prng && e >= 256 && e <= 16384 && (t === 65537 || t === 3)) { - if (r) { - if (Dn("generateKeyPair")) return X0.generateKeyPair("rsa", { - modulusLength: e, - publicExponent: t, - publicKeyEncoding: { - type: "spki", - format: "pem" - }, - privateKeyEncoding: { - type: "pkcs8", - format: "pem" - } - }, function (o, l, f) { - if (o) return r(o); - r(null, { - privateKey: se.privateKeyFromPem(f), - publicKey: se.publicKeyFromPem(l) - }) - }); - if (Nn("generateKey") && Nn("exportKey")) return nt.globalScope.crypto.subtle.generateKey({ - name: "RSASSA-PKCS1-v1_5", - modulusLength: e, - publicExponent: Rn(t), - hash: { - name: "SHA-256" - } - }, !0, ["sign", "verify"]).then(function (o) { - return nt.globalScope.crypto.subtle.exportKey("pkcs8", o.privateKey) - }).then(void 0, function (o) { - r(o) - }).then(function (o) { - if (o) { - var l = se.privateKeyFromAsn1(R.fromDer(te.util.createBuffer(o))); - r(null, { - privateKey: l, - publicKey: se.setRsaPublicKey(l.n, l.e) - }) - } - }); - if (Fn("generateKey") && Fn("exportKey")) { - var n = nt.globalScope.msCrypto.subtle.generateKey({ - name: "RSASSA-PKCS1-v1_5", - modulusLength: e, - publicExponent: Rn(t), - hash: { - name: "SHA-256" - } - }, !0, ["sign", "verify"]); - n.oncomplete = function (o) { - var l = o.target.result, - f = nt.globalScope.msCrypto.subtle.exportKey("pkcs8", l.privateKey); - f.oncomplete = function (u) { - var c = u.target.result, - h = se.privateKeyFromAsn1(R.fromDer(te.util.createBuffer(c))); - r(null, { - privateKey: h, - publicKey: se.setRsaPublicKey(h.n, h.e) - }) - }, f.onerror = function (u) { - r(u) - } - }, n.onerror = function (o) { - r(o) - }; - return - } - } else if (Dn("generateKeyPairSync")) { - var i = X0.generateKeyPairSync("rsa", { - modulusLength: e, - publicExponent: t, - publicKeyEncoding: { - type: "spki", - format: "pem" - }, - privateKeyEncoding: { - type: "pkcs8", - format: "pem" - } - }); - return { - privateKey: se.privateKeyFromPem(i.privateKey), - publicKey: se.publicKeyFromPem(i.publicKey) - } - } - } - var s = se.rsa.createKeyPairGenerationState(e, t, a); - if (!r) return se.rsa.stepKeyPairGenerationState(s, 0), s.keys; - Yf(s, a, r) -}; -se.setRsaPublicKey = se.rsa.setPublicKey = function (e, t) { - var a = { - n: e, - e: t - }; - return a.encrypt = function (r, n, i) { - if (typeof n == "string" ? n = n.toUpperCase() : n === void 0 && (n = "RSAES-PKCS1-V1_5"), n === "RSAES-PKCS1-V1_5") n = { - encode: function (o, l, f) { - return xi(o, l, 2).getBytes() - } - }; - else if (n === "RSA-OAEP" || n === "RSAES-OAEP") n = { - encode: function (o, l) { - return te.pkcs1.encode_rsa_oaep(l, o, i) - } - }; - else if (["RAW", "NONE", "NULL", null].indexOf(n) !== -1) n = { - encode: function (o) { - return o - } - }; - else if (typeof n == "string") throw new Error('Unsupported encryption scheme: "' + n + '".'); - var s = n.encode(r, a, !0); - return se.rsa.encrypt(s, a, !0) - }, a.verify = function (r, n, i, s) { - typeof i == "string" ? i = i.toUpperCase() : i === void 0 && (i = "RSASSA-PKCS1-V1_5"), s === void 0 && (s = { - _parseAllDigestBytes: !0 - }), "_parseAllDigestBytes" in s || (s._parseAllDigestBytes = !0), i === "RSASSA-PKCS1-V1_5" ? i = { - verify: function (l, f) { - f = wr(f, a, !0); - var u = R.fromDer(f, { - parseAllBytes: s._parseAllDigestBytes - }), - c = {}, - h = []; - if (!R.validate(u, Wf, c, h)) { - var x = new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value."); - throw x.errors = h, x - } - var d = R.derToOid(c.algorithmIdentifier); - if (!(d === te.oids.md2 || d === te.oids.md5 || d === te.oids.sha1 || d === te.oids.sha224 || d === te.oids.sha256 || d === te.oids.sha384 || d === te.oids.sha512 || d === te.oids["sha512-224"] || d === te.oids["sha512-256"])) { - var x = new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier."); - throw x.oid = d, x - } - if ((d === te.oids.md2 || d === te.oids.md5) && !("parameters" in c)) throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifer NULL parameters."); - return l === c.digest - } - } : (i === "NONE" || i === "NULL" || i === null) && (i = { - verify: function (l, f) { - return f = wr(f, a, !0), l === f - } - }); - var o = se.rsa.decrypt(n, a, !0, !1); - return i.verify(r, o, a.n.bitLength()) - }, a -}; -se.setRsaPrivateKey = se.rsa.setPrivateKey = function (e, t, a, r, n, i, s, o) { - var l = { - n: e, - e: t, - d: a, - p: r, - q: n, - dP: i, - dQ: s, - qInv: o - }; - return l.decrypt = function (f, u, c) { - typeof u == "string" ? u = u.toUpperCase() : u === void 0 && (u = "RSAES-PKCS1-V1_5"); - var h = se.rsa.decrypt(f, l, !1, !1); - if (u === "RSAES-PKCS1-V1_5") u = { - decode: wr - }; - else if (u === "RSA-OAEP" || u === "RSAES-OAEP") u = { - decode: function (x, d) { - return te.pkcs1.decode_rsa_oaep(d, x, c) - } - }; - else if (["RAW", "NONE", "NULL", null].indexOf(u) !== -1) u = { - decode: function (x) { - return x - } - }; - else throw new Error('Unsupported encryption scheme: "' + u + '".'); - return u.decode(h, l, !1) - }, l.sign = function (f, u) { - var c = !1; - typeof u == "string" && (u = u.toUpperCase()), u === void 0 || u === "RSASSA-PKCS1-V1_5" ? (u = { - encode: Xf - }, c = 1) : (u === "NONE" || u === "NULL" || u === null) && (u = { - encode: function () { - return f - } - }, c = 1); - var h = u.encode(f, l.n.bitLength()); - return se.rsa.encrypt(h, l, c) - }, l -}; -se.wrapRsaPrivateKey = function (e) { - return R.create(R.Class.UNIVERSAL, R.Type.SEQUENCE, !0, [R.create(R.Class.UNIVERSAL, R.Type.INTEGER, !1, R.integerToDer(0).getBytes()), R.create(R.Class.UNIVERSAL, R.Type.SEQUENCE, !0, [R.create(R.Class.UNIVERSAL, R.Type.OID, !1, R.oidToDer(se.oids.rsaEncryption).getBytes()), R.create(R.Class.UNIVERSAL, R.Type.NULL, !1, "")]), R.create(R.Class.UNIVERSAL, R.Type.OCTETSTRING, !1, R.toDer(e).getBytes())]) -}; -se.privateKeyFromAsn1 = function (e) { - var t = {}, - a = []; - if (R.validate(e, qf, t, a) && (e = R.fromDer(te.util.createBuffer(t.privateKey))), t = {}, a = [], !R.validate(e, zf, t, a)) { - var r = new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."); - throw r.errors = a, r - } - var n, i, s, o, l, f, u, c; - return n = te.util.createBuffer(t.privateKeyModulus).toHex(), i = te.util.createBuffer(t.privateKeyPublicExponent).toHex(), s = te.util.createBuffer(t.privateKeyPrivateExponent).toHex(), o = te.util.createBuffer(t.privateKeyPrime1).toHex(), l = te.util.createBuffer(t.privateKeyPrime2).toHex(), f = te.util.createBuffer(t.privateKeyExponent1).toHex(), u = te.util.createBuffer(t.privateKeyExponent2).toHex(), c = te.util.createBuffer(t.privateKeyCoefficient).toHex(), se.setRsaPrivateKey(new Ce(n, 16), new Ce(i, 16), new Ce(s, 16), new Ce(o, 16), new Ce(l, 16), new Ce(f, 16), new Ce(u, 16), new Ce(c, 16)) -}; -se.privateKeyToAsn1 = se.privateKeyToRSAPrivateKey = function (e) { - return R.create(R.Class.UNIVERSAL, R.Type.SEQUENCE, !0, [R.create(R.Class.UNIVERSAL, R.Type.INTEGER, !1, R.integerToDer(0).getBytes()), R.create(R.Class.UNIVERSAL, R.Type.INTEGER, !1, lt(e.n)), R.create(R.Class.UNIVERSAL, R.Type.INTEGER, !1, lt(e.e)), R.create(R.Class.UNIVERSAL, R.Type.INTEGER, !1, lt(e.d)), R.create(R.Class.UNIVERSAL, R.Type.INTEGER, !1, lt(e.p)), R.create(R.Class.UNIVERSAL, R.Type.INTEGER, !1, lt(e.q)), R.create(R.Class.UNIVERSAL, R.Type.INTEGER, !1, lt(e.dP)), R.create(R.Class.UNIVERSAL, R.Type.INTEGER, !1, lt(e.dQ)), R.create(R.Class.UNIVERSAL, R.Type.INTEGER, !1, lt(e.qInv))]) -}; -se.publicKeyFromAsn1 = function (e) { - var t = {}, - a = []; - if (R.validate(e, Qf, t, a)) { - var r = R.derToOid(t.publicKeyOid); - if (r !== se.oids.rsaEncryption) { - var n = new Error("Cannot read public key. Unknown OID."); - throw n.oid = r, n - } - e = t.rsaPublicKey - } - if (a = [], !R.validate(e, Gf, t, a)) { - var n = new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."); - throw n.errors = a, n - } - var i = te.util.createBuffer(t.publicKeyModulus).toHex(), - s = te.util.createBuffer(t.publicKeyExponent).toHex(); - return se.setRsaPublicKey(new Ce(i, 16), new Ce(s, 16)) -}; -se.publicKeyToAsn1 = se.publicKeyToSubjectPublicKeyInfo = function (e) { - return R.create(R.Class.UNIVERSAL, R.Type.SEQUENCE, !0, [R.create(R.Class.UNIVERSAL, R.Type.SEQUENCE, !0, [R.create(R.Class.UNIVERSAL, R.Type.OID, !1, R.oidToDer(se.oids.rsaEncryption).getBytes()), R.create(R.Class.UNIVERSAL, R.Type.NULL, !1, "")]), R.create(R.Class.UNIVERSAL, R.Type.BITSTRING, !1, [se.publicKeyToRSAPublicKey(e)])]) -}; -se.publicKeyToRSAPublicKey = function (e) { - return R.create(R.Class.UNIVERSAL, R.Type.SEQUENCE, !0, [R.create(R.Class.UNIVERSAL, R.Type.INTEGER, !1, lt(e.n)), R.create(R.Class.UNIVERSAL, R.Type.INTEGER, !1, lt(e.e))]) -}; - -function xi(e, t, a) { - var r = te.util.createBuffer(), - n = Math.ceil(t.n.bitLength() / 8); - if (e.length > n - 11) { - var i = new Error("Message is too long for PKCS#1 v1.5 padding."); - throw i.length = e.length, i.max = n - 11, i - } - r.putByte(0), r.putByte(a); - var s = n - 3 - e.length, - o; - if (a === 0 || a === 1) { - o = a === 0 ? 0 : 255; - for (var l = 0; l < s; ++l) r.putByte(o) - } else - for (; s > 0;) { - for (var f = 0, u = te.random.getBytes(s), l = 0; l < s; ++l) o = u.charCodeAt(l), o === 0 ? ++f : r.putByte(o); - s = f - } - return r.putByte(0), r.putBytes(e), r -} - -function wr(e, t, a, r) { - var n = Math.ceil(t.n.bitLength() / 8), - i = te.util.createBuffer(e), - s = i.getByte(), - o = i.getByte(); - if (s !== 0 || a && o !== 0 && o !== 1 || !a && o != 2 || a && o === 0 && typeof r > "u") throw new Error("Encryption block is invalid."); - var l = 0; - if (o === 0) { - l = n - 3 - r; - for (var f = 0; f < l; ++f) - if (i.getByte() !== 0) throw new Error("Encryption block is invalid.") - } else if (o === 1) - for (l = 0; i.length() > 1;) { - if (i.getByte() !== 255) { - --i.read; - break - }++l - } else if (o === 2) - for (l = 0; i.length() > 1;) { - if (i.getByte() === 0) { - --i.read; - break - }++l - } - var u = i.getByte(); - if (u !== 0 || l !== n - 3 - i.length()) throw new Error("Encryption block is invalid."); - return i.getBytes() -} - -function Yf(e, t, a) { - typeof t == "function" && (a = t, t = {}), t = t || {}; - var r = { - algorithm: { - name: t.algorithm || "PRIMEINC", - options: { - workers: t.workers || 2, - workLoad: t.workLoad || 100, - workerScript: t.workerScript - } - } - }; - "prng" in t && (r.prng = t.prng), n(); - - function n() { - i(e.pBits, function (o, l) { - if (o) return a(o); - if (e.p = l, e.q !== null) return s(o, e.q); - i(e.qBits, s) - }) - } - - function i(o, l) { - te.prime.generateProbablePrime(o, r, l) - } - - function s(o, l) { - if (o) return a(o); - if (e.q = l, e.p.compareTo(e.q) < 0) { - var f = e.p; - e.p = e.q, e.q = f - } - if (e.p.subtract(Ce.ONE).gcd(e.e).compareTo(Ce.ONE) !== 0) { - e.p = null, n(); - return - } - if (e.q.subtract(Ce.ONE).gcd(e.e).compareTo(Ce.ONE) !== 0) { - e.q = null, i(e.qBits, s); - return - } - if (e.p1 = e.p.subtract(Ce.ONE), e.q1 = e.q.subtract(Ce.ONE), e.phi = e.p1.multiply(e.q1), e.phi.gcd(e.e).compareTo(Ce.ONE) !== 0) { - e.p = e.q = null, n(); - return - } - if (e.n = e.p.multiply(e.q), e.n.bitLength() !== e.bits) { - e.q = null, i(e.qBits, s); - return - } - var u = e.e.modInverse(e.phi); - e.keys = { - privateKey: se.rsa.setPrivateKey(e.n, e.e, u, e.p, e.q, u.mod(e.p1), u.mod(e.q1), e.q.modInverse(e.p)), - publicKey: se.rsa.setPublicKey(e.n, e.e) - }, a(null, e.keys) - } -} - -function lt(e) { - var t = e.toString(16); - t[0] >= "8" && (t = "00" + t); - var a = te.util.hexToBytes(t); - return a.length > 1 && (a.charCodeAt(0) === 0 && !(a.charCodeAt(1) & 128) || a.charCodeAt(0) === 255 && (a.charCodeAt(1) & 128) === 128) ? a.substr(1) : a -} - -function $f(e) { - return e <= 100 ? 27 : e <= 150 ? 18 : e <= 200 ? 15 : e <= 250 ? 12 : e <= 300 ? 9 : e <= 350 ? 8 : e <= 400 ? 7 : e <= 500 ? 6 : e <= 600 ? 5 : e <= 800 ? 4 : e <= 1250 ? 3 : 2 -} - -function Dn(e) { - return te.util.isNodejs && typeof X0[e] == "function" -} - -function Nn(e) { - return typeof nt.globalScope < "u" && typeof nt.globalScope.crypto == "object" && typeof nt.globalScope.crypto.subtle == "object" && typeof nt.globalScope.crypto.subtle[e] == "function" -} - -function Fn(e) { - return typeof nt.globalScope < "u" && typeof nt.globalScope.msCrypto == "object" && typeof nt.globalScope.msCrypto.subtle == "object" && typeof nt.globalScope.msCrypto.subtle[e] == "function" -} - -function Rn(e) { - for (var t = te.util.hexToBytes(e.toString(16)), a = new Uint8Array(t.length), r = 0; r < t.length; ++r) a[r] = t.charCodeAt(r); - return a -} -var j = le; -if (typeof jf > "u") var jf = j.jsbn.BigInteger; -var L = j.asn1, - fe = j.pki = j.pki || {}; -fe.pbe = j.pbe = j.pbe || {}; -var Lt = fe.oids, - Zf = { - name: "EncryptedPrivateKeyInfo", - tagClass: L.Class.UNIVERSAL, - type: L.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "EncryptedPrivateKeyInfo.encryptionAlgorithm", - tagClass: L.Class.UNIVERSAL, - type: L.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "AlgorithmIdentifier.algorithm", - tagClass: L.Class.UNIVERSAL, - type: L.Type.OID, - constructed: !1, - capture: "encryptionOid" - }, { - name: "AlgorithmIdentifier.parameters", - tagClass: L.Class.UNIVERSAL, - type: L.Type.SEQUENCE, - constructed: !0, - captureAsn1: "encryptionParams" - }] - }, { - name: "EncryptedPrivateKeyInfo.encryptedData", - tagClass: L.Class.UNIVERSAL, - type: L.Type.OCTETSTRING, - constructed: !1, - capture: "encryptedData" - }] - }, - Jf = { - name: "PBES2Algorithms", - tagClass: L.Class.UNIVERSAL, - type: L.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "PBES2Algorithms.keyDerivationFunc", - tagClass: L.Class.UNIVERSAL, - type: L.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "PBES2Algorithms.keyDerivationFunc.oid", - tagClass: L.Class.UNIVERSAL, - type: L.Type.OID, - constructed: !1, - capture: "kdfOid" - }, { - name: "PBES2Algorithms.params", - tagClass: L.Class.UNIVERSAL, - type: L.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "PBES2Algorithms.params.salt", - tagClass: L.Class.UNIVERSAL, - type: L.Type.OCTETSTRING, - constructed: !1, - capture: "kdfSalt" - }, { - name: "PBES2Algorithms.params.iterationCount", - tagClass: L.Class.UNIVERSAL, - type: L.Type.INTEGER, - constructed: !1, - capture: "kdfIterationCount" - }, { - name: "PBES2Algorithms.params.keyLength", - tagClass: L.Class.UNIVERSAL, - type: L.Type.INTEGER, - constructed: !1, - optional: !0, - capture: "keyLength" - }, { - name: "PBES2Algorithms.params.prf", - tagClass: L.Class.UNIVERSAL, - type: L.Type.SEQUENCE, - constructed: !0, - optional: !0, - value: [{ - name: "PBES2Algorithms.params.prf.algorithm", - tagClass: L.Class.UNIVERSAL, - type: L.Type.OID, - constructed: !1, - capture: "prfOid" - }] - }] - }] - }, { - name: "PBES2Algorithms.encryptionScheme", - tagClass: L.Class.UNIVERSAL, - type: L.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "PBES2Algorithms.encryptionScheme.oid", - tagClass: L.Class.UNIVERSAL, - type: L.Type.OID, - constructed: !1, - capture: "encOid" - }, { - name: "PBES2Algorithms.encryptionScheme.iv", - tagClass: L.Class.UNIVERSAL, - type: L.Type.OCTETSTRING, - constructed: !1, - capture: "encIv" - }] - }] - }, - eu = { - name: "pkcs-12PbeParams", - tagClass: L.Class.UNIVERSAL, - type: L.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "pkcs-12PbeParams.salt", - tagClass: L.Class.UNIVERSAL, - type: L.Type.OCTETSTRING, - constructed: !1, - capture: "salt" - }, { - name: "pkcs-12PbeParams.iterations", - tagClass: L.Class.UNIVERSAL, - type: L.Type.INTEGER, - constructed: !1, - capture: "iterations" - }] - }; -fe.encryptPrivateKeyInfo = function (e, t, a) { - a = a || {}, a.saltSize = a.saltSize || 8, a.count = a.count || 2048, a.algorithm = a.algorithm || "aes128", a.prfAlgorithm = a.prfAlgorithm || "sha1"; - var r = j.random.getBytesSync(a.saltSize), - n = a.count, - i = L.integerToDer(n), - s, o, l; - if (a.algorithm.indexOf("aes") === 0 || a.algorithm === "des") { - var f, u, c; - switch (a.algorithm) { - case "aes128": - s = 16, f = 16, u = Lt["aes128-CBC"], c = j.aes.createEncryptionCipher; - break; - case "aes192": - s = 24, f = 16, u = Lt["aes192-CBC"], c = j.aes.createEncryptionCipher; - break; - case "aes256": - s = 32, f = 16, u = Lt["aes256-CBC"], c = j.aes.createEncryptionCipher; - break; - case "des": - s = 8, f = 8, u = Lt.desCBC, c = j.des.createEncryptionCipher; - break; - default: - var h = new Error("Cannot encrypt private key. Unknown encryption algorithm."); - throw h.algorithm = a.algorithm, h - } - var x = "hmacWith" + a.prfAlgorithm.toUpperCase(), - d = vi(x), - g = j.pkcs5.pbkdf2(t, r, n, s, d), - v = j.random.getBytesSync(f), - B = c(g); - B.start(v), B.update(L.toDer(e)), B.finish(), l = B.output.getBytes(); - var E = tu(r, i, s, x); - o = L.create(L.Class.UNIVERSAL, L.Type.SEQUENCE, !0, [L.create(L.Class.UNIVERSAL, L.Type.OID, !1, L.oidToDer(Lt.pkcs5PBES2).getBytes()), L.create(L.Class.UNIVERSAL, L.Type.SEQUENCE, !0, [L.create(L.Class.UNIVERSAL, L.Type.SEQUENCE, !0, [L.create(L.Class.UNIVERSAL, L.Type.OID, !1, L.oidToDer(Lt.pkcs5PBKDF2).getBytes()), E]), L.create(L.Class.UNIVERSAL, L.Type.SEQUENCE, !0, [L.create(L.Class.UNIVERSAL, L.Type.OID, !1, L.oidToDer(u).getBytes()), L.create(L.Class.UNIVERSAL, L.Type.OCTETSTRING, !1, v)])])]) - } else if (a.algorithm === "3des") { - s = 24; - var m = new j.util.ByteBuffer(r), - g = fe.pbe.generatePkcs12Key(t, m, 1, n, s), - v = fe.pbe.generatePkcs12Key(t, m, 2, n, s), - B = j.des.createEncryptionCipher(g); - B.start(v), B.update(L.toDer(e)), B.finish(), l = B.output.getBytes(), o = L.create(L.Class.UNIVERSAL, L.Type.SEQUENCE, !0, [L.create(L.Class.UNIVERSAL, L.Type.OID, !1, L.oidToDer(Lt["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()), L.create(L.Class.UNIVERSAL, L.Type.SEQUENCE, !0, [L.create(L.Class.UNIVERSAL, L.Type.OCTETSTRING, !1, r), L.create(L.Class.UNIVERSAL, L.Type.INTEGER, !1, i.getBytes())])]) - } else { - var h = new Error("Cannot encrypt private key. Unknown encryption algorithm."); - throw h.algorithm = a.algorithm, h - } - var A = L.create(L.Class.UNIVERSAL, L.Type.SEQUENCE, !0, [o, L.create(L.Class.UNIVERSAL, L.Type.OCTETSTRING, !1, l)]); - return A -}; -fe.decryptPrivateKeyInfo = function (e, t) { - var a = null, - r = {}, - n = []; - if (!L.validate(e, Zf, r, n)) { - var i = new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."); - throw i.errors = n, i - } - var s = L.derToOid(r.encryptionOid), - o = fe.pbe.getCipher(s, r.encryptionParams, t), - l = j.util.createBuffer(r.encryptedData); - return o.update(l), o.finish() && (a = L.fromDer(o.output)), a -}; -fe.encryptedPrivateKeyToPem = function (e, t) { - var a = { - type: "ENCRYPTED PRIVATE KEY", - body: L.toDer(e).getBytes() - }; - return j.pem.encode(a, { - maxline: t - }) -}; -fe.encryptedPrivateKeyFromPem = function (e) { - var t = j.pem.decode(e)[0]; - if (t.type !== "ENCRYPTED PRIVATE KEY") { - var a = new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".'); - throw a.headerType = t.type, a - } - if (t.procType && t.procType.type === "ENCRYPTED") throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted."); - return L.fromDer(t.body) -}; -fe.encryptRsaPrivateKey = function (e, t, a) { - if (a = a || {}, !a.legacy) { - var r = fe.wrapRsaPrivateKey(fe.privateKeyToAsn1(e)); - return r = fe.encryptPrivateKeyInfo(r, t, a), fe.encryptedPrivateKeyToPem(r) - } - var n, i, s, o; - switch (a.algorithm) { - case "aes128": - n = "AES-128-CBC", s = 16, i = j.random.getBytesSync(16), o = j.aes.createEncryptionCipher; - break; - case "aes192": - n = "AES-192-CBC", s = 24, i = j.random.getBytesSync(16), o = j.aes.createEncryptionCipher; - break; - case "aes256": - n = "AES-256-CBC", s = 32, i = j.random.getBytesSync(16), o = j.aes.createEncryptionCipher; - break; - case "3des": - n = "DES-EDE3-CBC", s = 24, i = j.random.getBytesSync(8), o = j.des.createEncryptionCipher; - break; - case "des": - n = "DES-CBC", s = 8, i = j.random.getBytesSync(8), o = j.des.createEncryptionCipher; - break; - default: - var l = new Error('Could not encrypt RSA private key; unsupported encryption algorithm "' + a.algorithm + '".'); - throw l.algorithm = a.algorithm, l - } - var f = j.pbe.opensslDeriveBytes(t, i.substr(0, 8), s), - u = o(f); - u.start(i), u.update(L.toDer(fe.privateKeyToAsn1(e))), u.finish(); - var c = { - type: "RSA PRIVATE KEY", - procType: { - version: "4", - type: "ENCRYPTED" - }, - dekInfo: { - algorithm: n, - parameters: j.util.bytesToHex(i).toUpperCase() - }, - body: u.output.getBytes() - }; - return j.pem.encode(c) -}; -fe.decryptRsaPrivateKey = function (e, t) { - var a = null, - r = j.pem.decode(e)[0]; - if (r.type !== "ENCRYPTED PRIVATE KEY" && r.type !== "PRIVATE KEY" && r.type !== "RSA PRIVATE KEY") { - var n = new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".'); - throw n.headerType = n, n - } - if (r.procType && r.procType.type === "ENCRYPTED") { - var i, s; - switch (r.dekInfo.algorithm) { - case "DES-CBC": - i = 8, s = j.des.createDecryptionCipher; - break; - case "DES-EDE3-CBC": - i = 24, s = j.des.createDecryptionCipher; - break; - case "AES-128-CBC": - i = 16, s = j.aes.createDecryptionCipher; - break; - case "AES-192-CBC": - i = 24, s = j.aes.createDecryptionCipher; - break; - case "AES-256-CBC": - i = 32, s = j.aes.createDecryptionCipher; - break; - case "RC2-40-CBC": - i = 5, s = function (c) { - return j.rc2.createDecryptionCipher(c, 40) - }; - break; - case "RC2-64-CBC": - i = 8, s = function (c) { - return j.rc2.createDecryptionCipher(c, 64) - }; - break; - case "RC2-128-CBC": - i = 16, s = function (c) { - return j.rc2.createDecryptionCipher(c, 128) - }; - break; - default: - var n = new Error('Could not decrypt private key; unsupported encryption algorithm "' + r.dekInfo.algorithm + '".'); - throw n.algorithm = r.dekInfo.algorithm, n - } - var o = j.util.hexToBytes(r.dekInfo.parameters), - l = j.pbe.opensslDeriveBytes(t, o.substr(0, 8), i), - f = s(l); - if (f.start(o), f.update(j.util.createBuffer(r.body)), f.finish()) a = f.output.getBytes(); - else return a - } else a = r.body; - return r.type === "ENCRYPTED PRIVATE KEY" ? a = fe.decryptPrivateKeyInfo(L.fromDer(a), t) : a = L.fromDer(a), a !== null && (a = fe.privateKeyFromAsn1(a)), a -}; -fe.pbe.generatePkcs12Key = function (e, t, a, r, n, i) { - var s, o; - if (typeof i > "u" || i === null) { - if (!("sha1" in j.md)) throw new Error('"sha1" hash algorithm unavailable.'); - i = j.md.sha1.create() - } - var l = i.digestLength, - f = i.blockLength, - u = new j.util.ByteBuffer, - c = new j.util.ByteBuffer; - if (e != null) { - for (o = 0; o < e.length; o++) c.putInt16(e.charCodeAt(o)); - c.putInt16(0) - } - var h = c.length(), - x = t.length(), - d = new j.util.ByteBuffer; - d.fillWithByte(a, f); - var g = f * Math.ceil(x / f), - v = new j.util.ByteBuffer; - for (o = 0; o < g; o++) v.putByte(t.at(o % x)); - var B = f * Math.ceil(h / f), - E = new j.util.ByteBuffer; - for (o = 0; o < B; o++) E.putByte(c.at(o % h)); - var m = v; - m.putBuffer(E); - for (var A = Math.ceil(n / l), T = 1; T <= A; T++) { - var S = new j.util.ByteBuffer; - S.putBytes(d.bytes()), S.putBytes(m.bytes()); - for (var N = 0; N < r; N++) i.start(), i.update(S.getBytes()), S = i.digest(); - var w = new j.util.ByteBuffer; - for (o = 0; o < f; o++) w.putByte(S.at(o % l)); - var K = Math.ceil(x / f) + Math.ceil(h / f), - D = new j.util.ByteBuffer; - for (s = 0; s < K; s++) { - var F = new j.util.ByteBuffer(m.getBytes(f)), - U = 511; - for (o = w.length() - 1; o >= 0; o--) U = U >> 8, U += w.at(o) + F.at(o), F.setAt(o, U & 255); - D.putBuffer(F) - } - m = D, u.putBuffer(S) - } - return u.truncate(u.length() - n), u -}; -fe.pbe.getCipher = function (e, t, a) { - switch (e) { - case fe.oids.pkcs5PBES2: - return fe.pbe.getCipherForPBES2(e, t, a); - case fe.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]: - case fe.oids["pbewithSHAAnd40BitRC2-CBC"]: - return fe.pbe.getCipherForPKCS12PBE(e, t, a); - default: - var r = new Error("Cannot read encrypted PBE data block. Unsupported OID."); - throw r.oid = e, r.supportedOids = ["pkcs5PBES2", "pbeWithSHAAnd3-KeyTripleDES-CBC", "pbewithSHAAnd40BitRC2-CBC"], r - } -}; -fe.pbe.getCipherForPBES2 = function (e, t, a) { - var r = {}, - n = []; - if (!L.validate(t, Jf, r, n)) { - var i = new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."); - throw i.errors = n, i - } - if (e = L.derToOid(r.kdfOid), e !== fe.oids.pkcs5PBKDF2) { - var i = new Error("Cannot read encrypted private key. Unsupported key derivation function OID."); - throw i.oid = e, i.supportedOids = ["pkcs5PBKDF2"], i - } - if (e = L.derToOid(r.encOid), e !== fe.oids["aes128-CBC"] && e !== fe.oids["aes192-CBC"] && e !== fe.oids["aes256-CBC"] && e !== fe.oids["des-EDE3-CBC"] && e !== fe.oids.desCBC) { - var i = new Error("Cannot read encrypted private key. Unsupported encryption scheme OID."); - throw i.oid = e, i.supportedOids = ["aes128-CBC", "aes192-CBC", "aes256-CBC", "des-EDE3-CBC", "desCBC"], i - } - var s = r.kdfSalt, - o = j.util.createBuffer(r.kdfIterationCount); - o = o.getInt(o.length() << 3); - var l, f; - switch (fe.oids[e]) { - case "aes128-CBC": - l = 16, f = j.aes.createDecryptionCipher; - break; - case "aes192-CBC": - l = 24, f = j.aes.createDecryptionCipher; - break; - case "aes256-CBC": - l = 32, f = j.aes.createDecryptionCipher; - break; - case "des-EDE3-CBC": - l = 24, f = j.des.createDecryptionCipher; - break; - case "desCBC": - l = 8, f = j.des.createDecryptionCipher; - break - } - var u = pi(r.prfOid), - c = j.pkcs5.pbkdf2(a, s, o, l, u), - h = r.encIv, - x = f(c); - return x.start(h), x -}; -fe.pbe.getCipherForPKCS12PBE = function (e, t, a) { - var r = {}, - n = []; - if (!L.validate(t, eu, r, n)) { - var i = new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."); - throw i.errors = n, i - } - var s = j.util.createBuffer(r.salt), - o = j.util.createBuffer(r.iterations); - o = o.getInt(o.length() << 3); - var l, f, u; - switch (e) { - case fe.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]: - l = 24, f = 8, u = j.des.startDecrypting; - break; - case fe.oids["pbewithSHAAnd40BitRC2-CBC"]: - l = 5, f = 8, u = function (g, v) { - var B = j.rc2.createDecryptionCipher(g, 40); - return B.start(v, null), B - }; - break; - default: - var i = new Error("Cannot read PKCS #12 PBE data block. Unsupported OID."); - throw i.oid = e, i - } - var c = pi(r.prfOid), - h = fe.pbe.generatePkcs12Key(a, s, 1, o, l, c); - c.start(); - var x = fe.pbe.generatePkcs12Key(a, s, 2, o, f, c); - return u(h, x) -}; -fe.pbe.opensslDeriveBytes = function (e, t, a, r) { - if (typeof r > "u" || r === null) { - if (!("md5" in j.md)) throw new Error('"md5" hash algorithm unavailable.'); - r = j.md.md5.create() - } - t === null && (t = ""); - for (var n = [wn(r, e + t)], i = 16, s = 1; i < a; ++s, i += 16) n.push(wn(r, n[s - 1] + e + t)); - return n.join("").substr(0, a) -}; - -function wn(e, t) { - return e.start().update(t).digest().getBytes() -} - -function pi(e) { - var t; - if (!e) t = "hmacWithSHA1"; - else if (t = fe.oids[L.derToOid(e)], !t) { - var a = new Error("Unsupported PRF OID."); - throw a.oid = e, a.supported = ["hmacWithSHA1", "hmacWithSHA224", "hmacWithSHA256", "hmacWithSHA384", "hmacWithSHA512"], a - } - return vi(t) -} - -function vi(e) { - var t = j.md; - switch (e) { - case "hmacWithSHA224": - t = j.md.sha512; - case "hmacWithSHA1": - case "hmacWithSHA256": - case "hmacWithSHA384": - case "hmacWithSHA512": - e = e.substr(8).toLowerCase(); - break; - default: - var a = new Error("Unsupported PRF algorithm."); - throw a.algorithm = e, a.supported = ["hmacWithSHA1", "hmacWithSHA224", "hmacWithSHA256", "hmacWithSHA384", "hmacWithSHA512"], a - } - if (!t || !(e in t)) throw new Error("Unknown hash algorithm: " + e); - return t[e].create() -} - -function tu(e, t, a, r) { - var n = L.create(L.Class.UNIVERSAL, L.Type.SEQUENCE, !0, [L.create(L.Class.UNIVERSAL, L.Type.OCTETSTRING, !1, e), L.create(L.Class.UNIVERSAL, L.Type.INTEGER, !1, t.getBytes())]); - return r !== "hmacWithSHA1" && n.value.push(L.create(L.Class.UNIVERSAL, L.Type.INTEGER, !1, j.util.hexToBytes(a.toString(16))), L.create(L.Class.UNIVERSAL, L.Type.SEQUENCE, !0, [L.create(L.Class.UNIVERSAL, L.Type.OID, !1, L.oidToDer(fe.oids[r]).getBytes()), L.create(L.Class.UNIVERSAL, L.Type.NULL, !1, "")])), n -} -var Zt = le, - $ = Zt.asn1, - nr = Zt.pkcs7asn1 = Zt.pkcs7asn1 || {}; -Zt.pkcs7 = Zt.pkcs7 || {}; -Zt.pkcs7.asn1 = nr; -var yi = { - name: "ContentInfo", - tagClass: $.Class.UNIVERSAL, - type: $.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "ContentInfo.ContentType", - tagClass: $.Class.UNIVERSAL, - type: $.Type.OID, - constructed: !1, - capture: "contentType" - }, { - name: "ContentInfo.content", - tagClass: $.Class.CONTEXT_SPECIFIC, - type: 0, - constructed: !0, - optional: !0, - captureAsn1: "content" - }] -}; -nr.contentInfoValidator = yi; -var gi = { - name: "EncryptedContentInfo", - tagClass: $.Class.UNIVERSAL, - type: $.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "EncryptedContentInfo.contentType", - tagClass: $.Class.UNIVERSAL, - type: $.Type.OID, - constructed: !1, - capture: "contentType" - }, { - name: "EncryptedContentInfo.contentEncryptionAlgorithm", - tagClass: $.Class.UNIVERSAL, - type: $.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "EncryptedContentInfo.contentEncryptionAlgorithm.algorithm", - tagClass: $.Class.UNIVERSAL, - type: $.Type.OID, - constructed: !1, - capture: "encAlgorithm" - }, { - name: "EncryptedContentInfo.contentEncryptionAlgorithm.parameter", - tagClass: $.Class.UNIVERSAL, - captureAsn1: "encParameter" - }] - }, { - name: "EncryptedContentInfo.encryptedContent", - tagClass: $.Class.CONTEXT_SPECIFIC, - type: 0, - capture: "encryptedContent", - captureAsn1: "encryptedContentAsn1" - }] -}; -nr.envelopedDataValidator = { - name: "EnvelopedData", - tagClass: $.Class.UNIVERSAL, - type: $.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "EnvelopedData.Version", - tagClass: $.Class.UNIVERSAL, - type: $.Type.INTEGER, - constructed: !1, - capture: "version" - }, { - name: "EnvelopedData.RecipientInfos", - tagClass: $.Class.UNIVERSAL, - type: $.Type.SET, - constructed: !0, - captureAsn1: "recipientInfos" - }].concat(gi) -}; -nr.encryptedDataValidator = { - name: "EncryptedData", - tagClass: $.Class.UNIVERSAL, - type: $.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "EncryptedData.Version", - tagClass: $.Class.UNIVERSAL, - type: $.Type.INTEGER, - constructed: !1, - capture: "version" - }].concat(gi) -}; -var ru = { - name: "SignerInfo", - tagClass: $.Class.UNIVERSAL, - type: $.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "SignerInfo.version", - tagClass: $.Class.UNIVERSAL, - type: $.Type.INTEGER, - constructed: !1 - }, { - name: "SignerInfo.issuerAndSerialNumber", - tagClass: $.Class.UNIVERSAL, - type: $.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "SignerInfo.issuerAndSerialNumber.issuer", - tagClass: $.Class.UNIVERSAL, - type: $.Type.SEQUENCE, - constructed: !0, - captureAsn1: "issuer" - }, { - name: "SignerInfo.issuerAndSerialNumber.serialNumber", - tagClass: $.Class.UNIVERSAL, - type: $.Type.INTEGER, - constructed: !1, - capture: "serial" - }] - }, { - name: "SignerInfo.digestAlgorithm", - tagClass: $.Class.UNIVERSAL, - type: $.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "SignerInfo.digestAlgorithm.algorithm", - tagClass: $.Class.UNIVERSAL, - type: $.Type.OID, - constructed: !1, - capture: "digestAlgorithm" - }, { - name: "SignerInfo.digestAlgorithm.parameter", - tagClass: $.Class.UNIVERSAL, - constructed: !1, - captureAsn1: "digestParameter", - optional: !0 - }] - }, { - name: "SignerInfo.authenticatedAttributes", - tagClass: $.Class.CONTEXT_SPECIFIC, - type: 0, - constructed: !0, - optional: !0, - capture: "authenticatedAttributes" - }, { - name: "SignerInfo.digestEncryptionAlgorithm", - tagClass: $.Class.UNIVERSAL, - type: $.Type.SEQUENCE, - constructed: !0, - capture: "signatureAlgorithm" - }, { - name: "SignerInfo.encryptedDigest", - tagClass: $.Class.UNIVERSAL, - type: $.Type.OCTETSTRING, - constructed: !1, - capture: "signature" - }, { - name: "SignerInfo.unauthenticatedAttributes", - tagClass: $.Class.CONTEXT_SPECIFIC, - type: 1, - constructed: !0, - optional: !0, - capture: "unauthenticatedAttributes" - }] -}; -nr.signedDataValidator = { - name: "SignedData", - tagClass: $.Class.UNIVERSAL, - type: $.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "SignedData.Version", - tagClass: $.Class.UNIVERSAL, - type: $.Type.INTEGER, - constructed: !1, - capture: "version" - }, { - name: "SignedData.DigestAlgorithms", - tagClass: $.Class.UNIVERSAL, - type: $.Type.SET, - constructed: !0, - captureAsn1: "digestAlgorithms" - }, yi, { - name: "SignedData.Certificates", - tagClass: $.Class.CONTEXT_SPECIFIC, - type: 0, - optional: !0, - captureAsn1: "certificates" - }, { - name: "SignedData.CertificateRevocationLists", - tagClass: $.Class.CONTEXT_SPECIFIC, - type: 1, - optional: !0, - captureAsn1: "crls" - }, { - name: "SignedData.SignerInfos", - tagClass: $.Class.UNIVERSAL, - type: $.Type.SET, - capture: "signerInfos", - optional: !0, - value: [ru] - }] -}; -nr.recipientInfoValidator = { - name: "RecipientInfo", - tagClass: $.Class.UNIVERSAL, - type: $.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "RecipientInfo.version", - tagClass: $.Class.UNIVERSAL, - type: $.Type.INTEGER, - constructed: !1, - capture: "version" - }, { - name: "RecipientInfo.issuerAndSerial", - tagClass: $.Class.UNIVERSAL, - type: $.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "RecipientInfo.issuerAndSerial.issuer", - tagClass: $.Class.UNIVERSAL, - type: $.Type.SEQUENCE, - constructed: !0, - captureAsn1: "issuer" - }, { - name: "RecipientInfo.issuerAndSerial.serialNumber", - tagClass: $.Class.UNIVERSAL, - type: $.Type.INTEGER, - constructed: !1, - capture: "serial" - }] - }, { - name: "RecipientInfo.keyEncryptionAlgorithm", - tagClass: $.Class.UNIVERSAL, - type: $.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "RecipientInfo.keyEncryptionAlgorithm.algorithm", - tagClass: $.Class.UNIVERSAL, - type: $.Type.OID, - constructed: !1, - capture: "encAlgorithm" - }, { - name: "RecipientInfo.keyEncryptionAlgorithm.parameter", - tagClass: $.Class.UNIVERSAL, - constructed: !1, - captureAsn1: "encParameter", - optional: !0 - }] - }, { - name: "RecipientInfo.encryptedKey", - tagClass: $.Class.UNIVERSAL, - type: $.Type.OCTETSTRING, - constructed: !1, - capture: "encKey" - }] -}; -var Kt = le; -Kt.mgf = Kt.mgf || {}; -var au = Kt.mgf.mgf1 = Kt.mgf1 = Kt.mgf1 || {}; -au.create = function (e) { - var t = { - generate: function (a, r) { - for (var n = new Kt.util.ByteBuffer, i = Math.ceil(r / e.digestLength), s = 0; s < i; s++) { - var o = new Kt.util.ByteBuffer; - o.putInt32(s), e.start(), e.update(a + o.getBytes()), n.putBuffer(e.digest()) - } - return n.truncate(n.length() - r), n.getBytes() - } - }; - return t -}; -var kr = le; -kr.mgf = kr.mgf || {}; -kr.mgf.mgf1 = kr.mgf1; -var Ut = le, - nu = Ut.pss = Ut.pss || {}; -nu.create = function (e) { - arguments.length === 3 && (e = { - md: arguments[0], - mgf: arguments[1], - saltLength: arguments[2] - }); - var t = e.md, - a = e.mgf, - r = t.digestLength, - n = e.salt || null; - typeof n == "string" && (n = Ut.util.createBuffer(n)); - var i; - if ("saltLength" in e) i = e.saltLength; - else if (n !== null) i = n.length(); - else throw new Error("Salt length not specified or specific salt not given."); - if (n !== null && n.length() !== i) throw new Error("Given salt length does not match length of given salt."); - var s = e.prng || Ut.random, - o = {}; - return o.encode = function (l, f) { - var u, c = f - 1, - h = Math.ceil(c / 8), - x = l.digest().getBytes(); - if (h < r + i + 2) throw new Error("Message is too long to encrypt."); - var d; - n === null ? d = s.getBytesSync(i) : d = n.bytes(); - var g = new Ut.util.ByteBuffer; - g.fillWithByte(0, 8), g.putBytes(x), g.putBytes(d), t.start(), t.update(g.getBytes()); - var v = t.digest().getBytes(), - B = new Ut.util.ByteBuffer; - B.fillWithByte(0, h - i - r - 2), B.putByte(1), B.putBytes(d); - var E = B.getBytes(), - m = h - r - 1, - A = a.generate(v, m), - T = ""; - for (u = 0; u < m; u++) T += String.fromCharCode(E.charCodeAt(u) ^ A.charCodeAt(u)); - var S = 65280 >> 8 * h - c & 255; - return T = String.fromCharCode(T.charCodeAt(0) & ~S) + T.substr(1), T + v + "¼" - }, o.verify = function (l, f, u) { - var c, h = u - 1, - x = Math.ceil(h / 8); - if (f = f.substr(-x), x < r + i + 2) throw new Error("Inconsistent parameters to PSS signature verification."); - if (f.charCodeAt(x - 1) !== 188) throw new Error("Encoded message does not end in 0xBC."); - var d = x - r - 1, - g = f.substr(0, d), - v = f.substr(d, r), - B = 65280 >> 8 * x - h & 255; - if (g.charCodeAt(0) & B) throw new Error("Bits beyond keysize not zero as expected."); - var E = a.generate(v, d), - m = ""; - for (c = 0; c < d; c++) m += String.fromCharCode(g.charCodeAt(c) ^ E.charCodeAt(c)); - m = String.fromCharCode(m.charCodeAt(0) & ~B) + m.substr(1); - var A = x - r - i - 2; - for (c = 0; c < A; c++) - if (m.charCodeAt(c) !== 0) throw new Error("Leftmost octets not zero as expected"); - if (m.charCodeAt(A) !== 1) throw new Error("Inconsistent PSS signature, 0x01 marker not found"); - var T = m.substr(-i), - S = new Ut.util.ByteBuffer; - S.fillWithByte(0, 8), S.putBytes(l), S.putBytes(T), t.start(), t.update(S.getBytes()); - var N = t.digest().getBytes(); - return v === N - }, o -}; -var re = le, - p = re.asn1, - G = re.pki = re.pki || {}, - ye = G.oids, - ke = {}; -ke.CN = ye.commonName; -ke.commonName = "CN"; -ke.C = ye.countryName; -ke.countryName = "C"; -ke.L = ye.localityName; -ke.localityName = "L"; -ke.ST = ye.stateOrProvinceName; -ke.stateOrProvinceName = "ST"; -ke.O = ye.organizationName; -ke.organizationName = "O"; -ke.OU = ye.organizationalUnitName; -ke.organizationalUnitName = "OU"; -ke.E = ye.emailAddress; -ke.emailAddress = "E"; -var Ci = re.pki.rsa.publicKeyValidator, - iu = { - name: "Certificate", - tagClass: p.Class.UNIVERSAL, - type: p.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "Certificate.TBSCertificate", - tagClass: p.Class.UNIVERSAL, - type: p.Type.SEQUENCE, - constructed: !0, - captureAsn1: "tbsCertificate", - value: [{ - name: "Certificate.TBSCertificate.version", - tagClass: p.Class.CONTEXT_SPECIFIC, - type: 0, - constructed: !0, - optional: !0, - value: [{ - name: "Certificate.TBSCertificate.version.integer", - tagClass: p.Class.UNIVERSAL, - type: p.Type.INTEGER, - constructed: !1, - capture: "certVersion" - }] - }, { - name: "Certificate.TBSCertificate.serialNumber", - tagClass: p.Class.UNIVERSAL, - type: p.Type.INTEGER, - constructed: !1, - capture: "certSerialNumber" - }, { - name: "Certificate.TBSCertificate.signature", - tagClass: p.Class.UNIVERSAL, - type: p.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "Certificate.TBSCertificate.signature.algorithm", - tagClass: p.Class.UNIVERSAL, - type: p.Type.OID, - constructed: !1, - capture: "certinfoSignatureOid" - }, { - name: "Certificate.TBSCertificate.signature.parameters", - tagClass: p.Class.UNIVERSAL, - optional: !0, - captureAsn1: "certinfoSignatureParams" - }] - }, { - name: "Certificate.TBSCertificate.issuer", - tagClass: p.Class.UNIVERSAL, - type: p.Type.SEQUENCE, - constructed: !0, - captureAsn1: "certIssuer" - }, { - name: "Certificate.TBSCertificate.validity", - tagClass: p.Class.UNIVERSAL, - type: p.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "Certificate.TBSCertificate.validity.notBefore (utc)", - tagClass: p.Class.UNIVERSAL, - type: p.Type.UTCTIME, - constructed: !1, - optional: !0, - capture: "certValidity1UTCTime" - }, { - name: "Certificate.TBSCertificate.validity.notBefore (generalized)", - tagClass: p.Class.UNIVERSAL, - type: p.Type.GENERALIZEDTIME, - constructed: !1, - optional: !0, - capture: "certValidity2GeneralizedTime" - }, { - name: "Certificate.TBSCertificate.validity.notAfter (utc)", - tagClass: p.Class.UNIVERSAL, - type: p.Type.UTCTIME, - constructed: !1, - optional: !0, - capture: "certValidity3UTCTime" - }, { - name: "Certificate.TBSCertificate.validity.notAfter (generalized)", - tagClass: p.Class.UNIVERSAL, - type: p.Type.GENERALIZEDTIME, - constructed: !1, - optional: !0, - capture: "certValidity4GeneralizedTime" - }] - }, { - name: "Certificate.TBSCertificate.subject", - tagClass: p.Class.UNIVERSAL, - type: p.Type.SEQUENCE, - constructed: !0, - captureAsn1: "certSubject" - }, Ci, { - name: "Certificate.TBSCertificate.issuerUniqueID", - tagClass: p.Class.CONTEXT_SPECIFIC, - type: 1, - constructed: !0, - optional: !0, - value: [{ - name: "Certificate.TBSCertificate.issuerUniqueID.id", - tagClass: p.Class.UNIVERSAL, - type: p.Type.BITSTRING, - constructed: !1, - captureBitStringValue: "certIssuerUniqueId" - }] - }, { - name: "Certificate.TBSCertificate.subjectUniqueID", - tagClass: p.Class.CONTEXT_SPECIFIC, - type: 2, - constructed: !0, - optional: !0, - value: [{ - name: "Certificate.TBSCertificate.subjectUniqueID.id", - tagClass: p.Class.UNIVERSAL, - type: p.Type.BITSTRING, - constructed: !1, - captureBitStringValue: "certSubjectUniqueId" - }] - }, { - name: "Certificate.TBSCertificate.extensions", - tagClass: p.Class.CONTEXT_SPECIFIC, - type: 3, - constructed: !0, - captureAsn1: "certExtensions", - optional: !0 - }] - }, { - name: "Certificate.signatureAlgorithm", - tagClass: p.Class.UNIVERSAL, - type: p.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "Certificate.signatureAlgorithm.algorithm", - tagClass: p.Class.UNIVERSAL, - type: p.Type.OID, - constructed: !1, - capture: "certSignatureOid" - }, { - name: "Certificate.TBSCertificate.signature.parameters", - tagClass: p.Class.UNIVERSAL, - optional: !0, - captureAsn1: "certSignatureParams" - }] - }, { - name: "Certificate.signatureValue", - tagClass: p.Class.UNIVERSAL, - type: p.Type.BITSTRING, - constructed: !1, - captureBitStringValue: "certSignature" - }] - }, - su = { - name: "rsapss", - tagClass: p.Class.UNIVERSAL, - type: p.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "rsapss.hashAlgorithm", - tagClass: p.Class.CONTEXT_SPECIFIC, - type: 0, - constructed: !0, - value: [{ - name: "rsapss.hashAlgorithm.AlgorithmIdentifier", - tagClass: p.Class.UNIVERSAL, - type: p.Class.SEQUENCE, - constructed: !0, - optional: !0, - value: [{ - name: "rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm", - tagClass: p.Class.UNIVERSAL, - type: p.Type.OID, - constructed: !1, - capture: "hashOid" - }] - }] - }, { - name: "rsapss.maskGenAlgorithm", - tagClass: p.Class.CONTEXT_SPECIFIC, - type: 1, - constructed: !0, - value: [{ - name: "rsapss.maskGenAlgorithm.AlgorithmIdentifier", - tagClass: p.Class.UNIVERSAL, - type: p.Class.SEQUENCE, - constructed: !0, - optional: !0, - value: [{ - name: "rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm", - tagClass: p.Class.UNIVERSAL, - type: p.Type.OID, - constructed: !1, - capture: "maskGenOid" - }, { - name: "rsapss.maskGenAlgorithm.AlgorithmIdentifier.params", - tagClass: p.Class.UNIVERSAL, - type: p.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm", - tagClass: p.Class.UNIVERSAL, - type: p.Type.OID, - constructed: !1, - capture: "maskGenHashOid" - }] - }] - }] - }, { - name: "rsapss.saltLength", - tagClass: p.Class.CONTEXT_SPECIFIC, - type: 2, - optional: !0, - value: [{ - name: "rsapss.saltLength.saltLength", - tagClass: p.Class.UNIVERSAL, - type: p.Class.INTEGER, - constructed: !1, - capture: "saltLength" - }] - }, { - name: "rsapss.trailerField", - tagClass: p.Class.CONTEXT_SPECIFIC, - type: 3, - optional: !0, - value: [{ - name: "rsapss.trailer.trailer", - tagClass: p.Class.UNIVERSAL, - type: p.Class.INTEGER, - constructed: !1, - capture: "trailer" - }] - }] - }, - ou = { - name: "CertificationRequestInfo", - tagClass: p.Class.UNIVERSAL, - type: p.Type.SEQUENCE, - constructed: !0, - captureAsn1: "certificationRequestInfo", - value: [{ - name: "CertificationRequestInfo.integer", - tagClass: p.Class.UNIVERSAL, - type: p.Type.INTEGER, - constructed: !1, - capture: "certificationRequestInfoVersion" - }, { - name: "CertificationRequestInfo.subject", - tagClass: p.Class.UNIVERSAL, - type: p.Type.SEQUENCE, - constructed: !0, - captureAsn1: "certificationRequestInfoSubject" - }, Ci, { - name: "CertificationRequestInfo.attributes", - tagClass: p.Class.CONTEXT_SPECIFIC, - type: 0, - constructed: !0, - optional: !0, - capture: "certificationRequestInfoAttributes", - value: [{ - name: "CertificationRequestInfo.attributes", - tagClass: p.Class.UNIVERSAL, - type: p.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "CertificationRequestInfo.attributes.type", - tagClass: p.Class.UNIVERSAL, - type: p.Type.OID, - constructed: !1 - }, { - name: "CertificationRequestInfo.attributes.value", - tagClass: p.Class.UNIVERSAL, - type: p.Type.SET, - constructed: !0 - }] - }] - }] - }, - fu = { - name: "CertificationRequest", - tagClass: p.Class.UNIVERSAL, - type: p.Type.SEQUENCE, - constructed: !0, - captureAsn1: "csr", - value: [ou, { - name: "CertificationRequest.signatureAlgorithm", - tagClass: p.Class.UNIVERSAL, - type: p.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "CertificationRequest.signatureAlgorithm.algorithm", - tagClass: p.Class.UNIVERSAL, - type: p.Type.OID, - constructed: !1, - capture: "csrSignatureOid" - }, { - name: "CertificationRequest.signatureAlgorithm.parameters", - tagClass: p.Class.UNIVERSAL, - optional: !0, - captureAsn1: "csrSignatureParams" - }] - }, { - name: "CertificationRequest.signature", - tagClass: p.Class.UNIVERSAL, - type: p.Type.BITSTRING, - constructed: !1, - captureBitStringValue: "csrSignature" - }] - }; -G.RDNAttributesAsArray = function (e, t) { - for (var a = [], r, n, i, s = 0; s < e.value.length; ++s) { - r = e.value[s]; - for (var o = 0; o < r.value.length; ++o) i = {}, n = r.value[o], i.type = p.derToOid(n.value[0].value), i.value = n.value[1].value, i.valueTagClass = n.value[1].type, i.type in ye && (i.name = ye[i.type], i.name in ke && (i.shortName = ke[i.name])), t && (t.update(i.type), t.update(i.value)), a.push(i) - } - return a -}; -G.CRIAttributesAsArray = function (e) { - for (var t = [], a = 0; a < e.length; ++a) - for (var r = e[a], n = p.derToOid(r.value[0].value), i = r.value[1].value, s = 0; s < i.length; ++s) { - var o = {}; - if (o.type = n, o.value = i[s].value, o.valueTagClass = i[s].type, o.type in ye && (o.name = ye[o.type], o.name in ke && (o.shortName = ke[o.name])), o.type === ye.extensionRequest) { - o.extensions = []; - for (var l = 0; l < o.value.length; ++l) o.extensions.push(G.certificateExtensionFromAsn1(o.value[l])) - } - t.push(o) - } - return t -}; - -function Rt(e, t) { - typeof t == "string" && (t = { - shortName: t - }); - for (var a = null, r, n = 0; a === null && n < e.attributes.length; ++n) r = e.attributes[n], (t.type && t.type === r.type || t.name && t.name === r.name || t.shortName && t.shortName === r.shortName) && (a = r); - return a -} -var Lr = function (e, t, a) { - var r = {}; - if (e !== ye["RSASSA-PSS"]) return r; - a && (r = { - hash: { - algorithmOid: ye.sha1 - }, - mgf: { - algorithmOid: ye.mgf1, - hash: { - algorithmOid: ye.sha1 - } - }, - saltLength: 20 - }); - var n = {}, - i = []; - if (!p.validate(t, su, n, i)) { - var s = new Error("Cannot read RSASSA-PSS parameter block."); - throw s.errors = i, s - } - return n.hashOid !== void 0 && (r.hash = r.hash || {}, r.hash.algorithmOid = p.derToOid(n.hashOid)), n.maskGenOid !== void 0 && (r.mgf = r.mgf || {}, r.mgf.algorithmOid = p.derToOid(n.maskGenOid), r.mgf.hash = r.mgf.hash || {}, r.mgf.hash.algorithmOid = p.derToOid(n.maskGenHashOid)), n.saltLength !== void 0 && (r.saltLength = n.saltLength.charCodeAt(0)), r - }, - Yr = function (e) { - switch (ye[e.signatureOid]) { - case "sha1WithRSAEncryption": - case "sha1WithRSASignature": - return re.md.sha1.create(); - case "md5WithRSAEncryption": - return re.md.md5.create(); - case "sha256WithRSAEncryption": - return re.md.sha256.create(); - case "sha384WithRSAEncryption": - return re.md.sha384.create(); - case "sha512WithRSAEncryption": - return re.md.sha512.create(); - case "RSASSA-PSS": - return re.md.sha256.create(); - default: - var t = new Error("Could not compute " + e.type + " digest. Unknown signature OID."); - throw t.signatureOid = e.signatureOid, t - } - }, - Ei = function (e) { - var t = e.certificate, - a; - switch (t.signatureOid) { - case ye.sha1WithRSAEncryption: - case ye.sha1WithRSASignature: - break; - case ye["RSASSA-PSS"]: - var r, n; - if (r = ye[t.signatureParameters.mgf.hash.algorithmOid], r === void 0 || re.md[r] === void 0) { - var i = new Error("Unsupported MGF hash function."); - throw i.oid = t.signatureParameters.mgf.hash.algorithmOid, i.name = r, i - } - if (n = ye[t.signatureParameters.mgf.algorithmOid], n === void 0 || re.mgf[n] === void 0) { - var i = new Error("Unsupported MGF function."); - throw i.oid = t.signatureParameters.mgf.algorithmOid, i.name = n, i - } - if (n = re.mgf[n].create(re.md[r].create()), r = ye[t.signatureParameters.hash.algorithmOid], r === void 0 || re.md[r] === void 0) { - var i = new Error("Unsupported RSASSA-PSS hash function."); - throw i.oid = t.signatureParameters.hash.algorithmOid, i.name = r, i - } - a = re.pss.create(re.md[r].create(), n, t.signatureParameters.saltLength); - break - } - return t.publicKey.verify(e.md.digest().getBytes(), e.signature, a) - }; -G.certificateFromPem = function (e, t, a) { - var r = re.pem.decode(e)[0]; - if (r.type !== "CERTIFICATE" && r.type !== "X509 CERTIFICATE" && r.type !== "TRUSTED CERTIFICATE") { - var n = new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'); - throw n.headerType = r.type, n - } - if (r.procType && r.procType.type === "ENCRYPTED") throw new Error("Could not convert certificate from PEM; PEM is encrypted."); - var i = p.fromDer(r.body, a); - return G.certificateFromAsn1(i, t) -}; -G.certificateToPem = function (e, t) { - var a = { - type: "CERTIFICATE", - body: p.toDer(G.certificateToAsn1(e)).getBytes() - }; - return re.pem.encode(a, { - maxline: t - }) -}; -G.publicKeyFromPem = function (e) { - var t = re.pem.decode(e)[0]; - if (t.type !== "PUBLIC KEY" && t.type !== "RSA PUBLIC KEY") { - var a = new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".'); - throw a.headerType = t.type, a - } - if (t.procType && t.procType.type === "ENCRYPTED") throw new Error("Could not convert public key from PEM; PEM is encrypted."); - var r = p.fromDer(t.body); - return G.publicKeyFromAsn1(r) -}; -G.publicKeyToPem = function (e, t) { - var a = { - type: "PUBLIC KEY", - body: p.toDer(G.publicKeyToAsn1(e)).getBytes() - }; - return re.pem.encode(a, { - maxline: t - }) -}; -G.publicKeyToRSAPublicKeyPem = function (e, t) { - var a = { - type: "RSA PUBLIC KEY", - body: p.toDer(G.publicKeyToRSAPublicKey(e)).getBytes() - }; - return re.pem.encode(a, { - maxline: t - }) -}; -G.getPublicKeyFingerprint = function (e, t) { - t = t || {}; - var a = t.md || re.md.sha1.create(), - r = t.type || "RSAPublicKey", - n; - switch (r) { - case "RSAPublicKey": - n = p.toDer(G.publicKeyToRSAPublicKey(e)).getBytes(); - break; - case "SubjectPublicKeyInfo": - n = p.toDer(G.publicKeyToAsn1(e)).getBytes(); - break; - default: - throw new Error('Unknown fingerprint type "' + t.type + '".') - } - a.start(), a.update(n); - var i = a.digest(); - if (t.encoding === "hex") { - var s = i.toHex(); - return t.delimiter ? s.match(/.{2}/g).join(t.delimiter) : s - } else { - if (t.encoding === "binary") return i.getBytes(); - if (t.encoding) throw new Error('Unknown encoding "' + t.encoding + '".') - } - return i -}; -G.certificationRequestFromPem = function (e, t, a) { - var r = re.pem.decode(e)[0]; - if (r.type !== "CERTIFICATE REQUEST") { - var n = new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'); - throw n.headerType = r.type, n - } - if (r.procType && r.procType.type === "ENCRYPTED") throw new Error("Could not convert certification request from PEM; PEM is encrypted."); - var i = p.fromDer(r.body, a); - return G.certificationRequestFromAsn1(i, t) -}; -G.certificationRequestToPem = function (e, t) { - var a = { - type: "CERTIFICATE REQUEST", - body: p.toDer(G.certificationRequestToAsn1(e)).getBytes() - }; - return re.pem.encode(a, { - maxline: t - }) -}; -G.createCertificate = function () { - var e = {}; - return e.version = 2, e.serialNumber = "00", e.signatureOid = null, e.signature = null, e.siginfo = {}, e.siginfo.algorithmOid = null, e.validity = {}, e.validity.notBefore = new Date, e.validity.notAfter = new Date, e.issuer = {}, e.issuer.getField = function (t) { - return Rt(e.issuer, t) - }, e.issuer.addField = function (t) { - it([t]), e.issuer.attributes.push(t) - }, e.issuer.attributes = [], e.issuer.hash = null, e.subject = {}, e.subject.getField = function (t) { - return Rt(e.subject, t) - }, e.subject.addField = function (t) { - it([t]), e.subject.attributes.push(t) - }, e.subject.attributes = [], e.subject.hash = null, e.extensions = [], e.publicKey = null, e.md = null, e.setSubject = function (t, a) { - it(t), e.subject.attributes = t, delete e.subject.uniqueId, a && (e.subject.uniqueId = a), e.subject.hash = null - }, e.setIssuer = function (t, a) { - it(t), e.issuer.attributes = t, delete e.issuer.uniqueId, a && (e.issuer.uniqueId = a), e.issuer.hash = null - }, e.setExtensions = function (t) { - for (var a = 0; a < t.length; ++a) mi(t[a], { - cert: e - }); - e.extensions = t - }, e.getExtension = function (t) { - typeof t == "string" && (t = { - name: t - }); - for (var a = null, r, n = 0; a === null && n < e.extensions.length; ++n) r = e.extensions[n], (t.id && r.id === t.id || t.name && r.name === t.name) && (a = r); - return a - }, e.sign = function (t, a) { - e.md = a || re.md.sha1.create(); - var r = ye[e.md.algorithm + "WithRSAEncryption"]; - if (!r) { - var n = new Error("Could not compute certificate digest. Unknown message digest algorithm OID."); - throw n.algorithm = e.md.algorithm, n - } - e.signatureOid = e.siginfo.algorithmOid = r, e.tbsCertificate = G.getTBSCertificate(e); - var i = p.toDer(e.tbsCertificate); - e.md.update(i.getBytes()), e.signature = t.sign(e.md) - }, e.verify = function (t) { - var a = !1; - if (!e.issued(t)) { - var r = t.issuer, - n = e.subject, - i = new Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject."); - throw i.expectedIssuer = n.attributes, i.actualIssuer = r.attributes, i - } - var s = t.md; - if (s === null) { - s = Yr({ - signatureOid: t.signatureOid, - type: "certificate" - }); - var o = t.tbsCertificate || G.getTBSCertificate(t), - l = p.toDer(o); - s.update(l.getBytes()) - } - return s !== null && (a = Ei({ - certificate: e, - md: s, - signature: t.signature - })), a - }, e.isIssuer = function (t) { - var a = !1, - r = e.issuer, - n = t.subject; - if (r.hash && n.hash) a = r.hash === n.hash; - else if (r.attributes.length === n.attributes.length) { - a = !0; - for (var i, s, o = 0; a && o < r.attributes.length; ++o) i = r.attributes[o], s = n.attributes[o], (i.type !== s.type || i.value !== s.value) && (a = !1) - } - return a - }, e.issued = function (t) { - return t.isIssuer(e) - }, e.generateSubjectKeyIdentifier = function () { - return G.getPublicKeyFingerprint(e.publicKey, { - type: "RSAPublicKey" - }) - }, e.verifySubjectKeyIdentifier = function () { - for (var t = ye.subjectKeyIdentifier, a = 0; a < e.extensions.length; ++a) { - var r = e.extensions[a]; - if (r.id === t) { - var n = e.generateSubjectKeyIdentifier().getBytes(); - return re.util.hexToBytes(r.subjectKeyIdentifier) === n - } - } - return !1 - }, e -}; -G.certificateFromAsn1 = function (e, t) { - var a = {}, - r = []; - if (!p.validate(e, iu, a, r)) { - var n = new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."); - throw n.errors = r, n - } - var i = p.derToOid(a.publicKeyOid); - if (i !== G.oids.rsaEncryption) throw new Error("Cannot read public key. OID is not RSA."); - var s = G.createCertificate(); - s.version = a.certVersion ? a.certVersion.charCodeAt(0) : 0; - var o = re.util.createBuffer(a.certSerialNumber); - s.serialNumber = o.toHex(), s.signatureOid = re.asn1.derToOid(a.certSignatureOid), s.signatureParameters = Lr(s.signatureOid, a.certSignatureParams, !0), s.siginfo.algorithmOid = re.asn1.derToOid(a.certinfoSignatureOid), s.siginfo.parameters = Lr(s.siginfo.algorithmOid, a.certinfoSignatureParams, !1), s.signature = a.certSignature; - var l = []; - if (a.certValidity1UTCTime !== void 0 && l.push(p.utcTimeToDate(a.certValidity1UTCTime)), a.certValidity2GeneralizedTime !== void 0 && l.push(p.generalizedTimeToDate(a.certValidity2GeneralizedTime)), a.certValidity3UTCTime !== void 0 && l.push(p.utcTimeToDate(a.certValidity3UTCTime)), a.certValidity4GeneralizedTime !== void 0 && l.push(p.generalizedTimeToDate(a.certValidity4GeneralizedTime)), l.length > 2) throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate."); - if (l.length < 2) throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime."); - if (s.validity.notBefore = l[0], s.validity.notAfter = l[1], s.tbsCertificate = a.tbsCertificate, t) { - s.md = Yr({ - signatureOid: s.signatureOid, - type: "certificate" - }); - var f = p.toDer(s.tbsCertificate); - s.md.update(f.getBytes()) - } - var u = re.md.sha1.create(), - c = p.toDer(a.certIssuer); - u.update(c.getBytes()), s.issuer.getField = function (d) { - return Rt(s.issuer, d) - }, s.issuer.addField = function (d) { - it([d]), s.issuer.attributes.push(d) - }, s.issuer.attributes = G.RDNAttributesAsArray(a.certIssuer), a.certIssuerUniqueId && (s.issuer.uniqueId = a.certIssuerUniqueId), s.issuer.hash = u.digest().toHex(); - var h = re.md.sha1.create(), - x = p.toDer(a.certSubject); - return h.update(x.getBytes()), s.subject.getField = function (d) { - return Rt(s.subject, d) - }, s.subject.addField = function (d) { - it([d]), s.subject.attributes.push(d) - }, s.subject.attributes = G.RDNAttributesAsArray(a.certSubject), a.certSubjectUniqueId && (s.subject.uniqueId = a.certSubjectUniqueId), s.subject.hash = h.digest().toHex(), a.certExtensions ? s.extensions = G.certificateExtensionsFromAsn1(a.certExtensions) : s.extensions = [], s.publicKey = G.publicKeyFromAsn1(a.subjectPublicKeyInfo), s -}; -G.certificateExtensionsFromAsn1 = function (e) { - for (var t = [], a = 0; a < e.value.length; ++a) - for (var r = e.value[a], n = 0; n < r.value.length; ++n) t.push(G.certificateExtensionFromAsn1(r.value[n])); - return t -}; -G.certificateExtensionFromAsn1 = function (e) { - var t = {}; - if (t.id = p.derToOid(e.value[0].value), t.critical = !1, e.value[1].type === p.Type.BOOLEAN ? (t.critical = e.value[1].value.charCodeAt(0) !== 0, t.value = e.value[2].value) : t.value = e.value[1].value, t.id in ye) { - if (t.name = ye[t.id], t.name === "keyUsage") { - var a = p.fromDer(t.value), - r = 0, - n = 0; - a.value.length > 1 && (r = a.value.charCodeAt(1), n = a.value.length > 2 ? a.value.charCodeAt(2) : 0), t.digitalSignature = (r & 128) === 128, t.nonRepudiation = (r & 64) === 64, t.keyEncipherment = (r & 32) === 32, t.dataEncipherment = (r & 16) === 16, t.keyAgreement = (r & 8) === 8, t.keyCertSign = (r & 4) === 4, t.cRLSign = (r & 2) === 2, t.encipherOnly = (r & 1) === 1, t.decipherOnly = (n & 128) === 128 - } else if (t.name === "basicConstraints") { - var a = p.fromDer(t.value); - a.value.length > 0 && a.value[0].type === p.Type.BOOLEAN ? t.cA = a.value[0].value.charCodeAt(0) !== 0 : t.cA = !1; - var i = null; - a.value.length > 0 && a.value[0].type === p.Type.INTEGER ? i = a.value[0].value : a.value.length > 1 && (i = a.value[1].value), i !== null && (t.pathLenConstraint = p.derToInteger(i)) - } else if (t.name === "extKeyUsage") - for (var a = p.fromDer(t.value), s = 0; s < a.value.length; ++s) { - var o = p.derToOid(a.value[s].value); - o in ye ? t[ye[o]] = !0 : t[o] = !0 - } else if (t.name === "nsCertType") { - var a = p.fromDer(t.value), - r = 0; - a.value.length > 1 && (r = a.value.charCodeAt(1)), t.client = (r & 128) === 128, t.server = (r & 64) === 64, t.email = (r & 32) === 32, t.objsign = (r & 16) === 16, t.reserved = (r & 8) === 8, t.sslCA = (r & 4) === 4, t.emailCA = (r & 2) === 2, t.objCA = (r & 1) === 1 - } else if (t.name === "subjectAltName" || t.name === "issuerAltName") { - t.altNames = []; - for (var l, a = p.fromDer(t.value), f = 0; f < a.value.length; ++f) { - l = a.value[f]; - var u = { - type: l.type, - value: l.value - }; - switch (t.altNames.push(u), l.type) { - case 1: - case 2: - case 6: - break; - case 7: - u.ip = re.util.bytesToIP(l.value); - break; - case 8: - u.oid = p.derToOid(l.value); - break - } - } - } else if (t.name === "subjectKeyIdentifier") { - var a = p.fromDer(t.value); - t.subjectKeyIdentifier = re.util.bytesToHex(a.value) - } - } - return t -}; -G.certificationRequestFromAsn1 = function (e, t) { - var a = {}, - r = []; - if (!p.validate(e, fu, a, r)) { - var n = new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."); - throw n.errors = r, n - } - var i = p.derToOid(a.publicKeyOid); - if (i !== G.oids.rsaEncryption) throw new Error("Cannot read public key. OID is not RSA."); - var s = G.createCertificationRequest(); - if (s.version = a.csrVersion ? a.csrVersion.charCodeAt(0) : 0, s.signatureOid = re.asn1.derToOid(a.csrSignatureOid), s.signatureParameters = Lr(s.signatureOid, a.csrSignatureParams, !0), s.siginfo.algorithmOid = re.asn1.derToOid(a.csrSignatureOid), s.siginfo.parameters = Lr(s.siginfo.algorithmOid, a.csrSignatureParams, !1), s.signature = a.csrSignature, s.certificationRequestInfo = a.certificationRequestInfo, t) { - s.md = Yr({ - signatureOid: s.signatureOid, - type: "certification request" - }); - var o = p.toDer(s.certificationRequestInfo); - s.md.update(o.getBytes()) - } - var l = re.md.sha1.create(); - return s.subject.getField = function (f) { - return Rt(s.subject, f) - }, s.subject.addField = function (f) { - it([f]), s.subject.attributes.push(f) - }, s.subject.attributes = G.RDNAttributesAsArray(a.certificationRequestInfoSubject, l), s.subject.hash = l.digest().toHex(), s.publicKey = G.publicKeyFromAsn1(a.subjectPublicKeyInfo), s.getAttribute = function (f) { - return Rt(s, f) - }, s.addAttribute = function (f) { - it([f]), s.attributes.push(f) - }, s.attributes = G.CRIAttributesAsArray(a.certificationRequestInfoAttributes || []), s -}; -G.createCertificationRequest = function () { - var e = {}; - return e.version = 0, e.signatureOid = null, e.signature = null, e.siginfo = {}, e.siginfo.algorithmOid = null, e.subject = {}, e.subject.getField = function (t) { - return Rt(e.subject, t) - }, e.subject.addField = function (t) { - it([t]), e.subject.attributes.push(t) - }, e.subject.attributes = [], e.subject.hash = null, e.publicKey = null, e.attributes = [], e.getAttribute = function (t) { - return Rt(e, t) - }, e.addAttribute = function (t) { - it([t]), e.attributes.push(t) - }, e.md = null, e.setSubject = function (t) { - it(t), e.subject.attributes = t, e.subject.hash = null - }, e.setAttributes = function (t) { - it(t), e.attributes = t - }, e.sign = function (t, a) { - e.md = a || re.md.sha1.create(); - var r = ye[e.md.algorithm + "WithRSAEncryption"]; - if (!r) { - var n = new Error("Could not compute certification request digest. Unknown message digest algorithm OID."); - throw n.algorithm = e.md.algorithm, n - } - e.signatureOid = e.siginfo.algorithmOid = r, e.certificationRequestInfo = G.getCertificationRequestInfo(e); - var i = p.toDer(e.certificationRequestInfo); - e.md.update(i.getBytes()), e.signature = t.sign(e.md) - }, e.verify = function () { - var t = !1, - a = e.md; - if (a === null) { - a = Yr({ - signatureOid: e.signatureOid, - type: "certification request" - }); - var r = e.certificationRequestInfo || G.getCertificationRequestInfo(e), - n = p.toDer(r); - a.update(n.getBytes()) - } - return a !== null && (t = Ei({ - certificate: e, - md: a, - signature: e.signature - })), t - }, e -}; - -function Jt(e) { - for (var t = p.create(p.Class.UNIVERSAL, p.Type.SEQUENCE, !0, []), a, r, n = e.attributes, i = 0; i < n.length; ++i) { - a = n[i]; - var s = a.value, - o = p.Type.PRINTABLESTRING; - "valueTagClass" in a && (o = a.valueTagClass, o === p.Type.UTF8 && (s = re.util.encodeUtf8(s))), r = p.create(p.Class.UNIVERSAL, p.Type.SET, !0, [p.create(p.Class.UNIVERSAL, p.Type.SEQUENCE, !0, [p.create(p.Class.UNIVERSAL, p.Type.OID, !1, p.oidToDer(a.type).getBytes()), p.create(p.Class.UNIVERSAL, o, !1, s)])]), t.value.push(r) - } - return t -} - -function it(e) { - for (var t, a = 0; a < e.length; ++a) { - if (t = e[a], typeof t.name > "u" && (t.type && t.type in G.oids ? t.name = G.oids[t.type] : t.shortName && t.shortName in ke && (t.name = G.oids[ke[t.shortName]])), typeof t.type > "u") - if (t.name && t.name in G.oids) t.type = G.oids[t.name]; - else { - var r = new Error("Attribute type not specified."); - throw r.attribute = t, r - } if (typeof t.shortName > "u" && t.name && t.name in ke && (t.shortName = ke[t.name]), t.type === ye.extensionRequest && (t.valueConstructed = !0, t.valueTagClass = p.Type.SEQUENCE, !t.value && t.extensions)) { - t.value = []; - for (var n = 0; n < t.extensions.length; ++n) t.value.push(G.certificateExtensionToAsn1(mi(t.extensions[n]))) - } - if (typeof t.value > "u") { - var r = new Error("Attribute value not specified."); - throw r.attribute = t, r - } - } -} - -function mi(e, t) { - if (t = t || {}, typeof e.name > "u" && e.id && e.id in G.oids && (e.name = G.oids[e.id]), typeof e.id > "u") - if (e.name && e.name in G.oids) e.id = G.oids[e.name]; - else { - var a = new Error("Extension ID not specified."); - throw a.extension = e, a - } if (typeof e.value < "u") return e; - if (e.name === "keyUsage") { - var r = 0, - n = 0, - i = 0; - e.digitalSignature && (n |= 128, r = 7), e.nonRepudiation && (n |= 64, r = 6), e.keyEncipherment && (n |= 32, r = 5), e.dataEncipherment && (n |= 16, r = 4), e.keyAgreement && (n |= 8, r = 3), e.keyCertSign && (n |= 4, r = 2), e.cRLSign && (n |= 2, r = 1), e.encipherOnly && (n |= 1, r = 0), e.decipherOnly && (i |= 128, r = 7); - var s = String.fromCharCode(r); - i !== 0 ? s += String.fromCharCode(n) + String.fromCharCode(i) : n !== 0 && (s += String.fromCharCode(n)), e.value = p.create(p.Class.UNIVERSAL, p.Type.BITSTRING, !1, s) - } else if (e.name === "basicConstraints") e.value = p.create(p.Class.UNIVERSAL, p.Type.SEQUENCE, !0, []), e.cA && e.value.value.push(p.create(p.Class.UNIVERSAL, p.Type.BOOLEAN, !1, "ÿ")), "pathLenConstraint" in e && e.value.value.push(p.create(p.Class.UNIVERSAL, p.Type.INTEGER, !1, p.integerToDer(e.pathLenConstraint).getBytes())); - else if (e.name === "extKeyUsage") { - e.value = p.create(p.Class.UNIVERSAL, p.Type.SEQUENCE, !0, []); - var o = e.value.value; - for (var l in e) e[l] === !0 && (l in ye ? o.push(p.create(p.Class.UNIVERSAL, p.Type.OID, !1, p.oidToDer(ye[l]).getBytes())) : l.indexOf(".") !== -1 && o.push(p.create(p.Class.UNIVERSAL, p.Type.OID, !1, p.oidToDer(l).getBytes()))) - } else if (e.name === "nsCertType") { - var r = 0, - n = 0; - e.client && (n |= 128, r = 7), e.server && (n |= 64, r = 6), e.email && (n |= 32, r = 5), e.objsign && (n |= 16, r = 4), e.reserved && (n |= 8, r = 3), e.sslCA && (n |= 4, r = 2), e.emailCA && (n |= 2, r = 1), e.objCA && (n |= 1, r = 0); - var s = String.fromCharCode(r); - n !== 0 && (s += String.fromCharCode(n)), e.value = p.create(p.Class.UNIVERSAL, p.Type.BITSTRING, !1, s) - } else if (e.name === "subjectAltName" || e.name === "issuerAltName") { - e.value = p.create(p.Class.UNIVERSAL, p.Type.SEQUENCE, !0, []); - for (var f, u = 0; u < e.altNames.length; ++u) { - f = e.altNames[u]; - var s = f.value; - if (f.type === 7 && f.ip) { - if (s = re.util.bytesFromIP(f.ip), s === null) { - var a = new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.'); - throw a.extension = e, a - } - } else f.type === 8 && (f.oid ? s = p.oidToDer(p.oidToDer(f.oid)) : s = p.oidToDer(s)); - e.value.value.push(p.create(p.Class.CONTEXT_SPECIFIC, f.type, !1, s)) - } - } else if (e.name === "nsComment" && t.cert) { - if (!/^[\x00-\x7F]*$/.test(e.comment) || e.comment.length < 1 || e.comment.length > 128) throw new Error('Invalid "nsComment" content.'); - e.value = p.create(p.Class.UNIVERSAL, p.Type.IA5STRING, !1, e.comment) - } else if (e.name === "subjectKeyIdentifier" && t.cert) { - var c = t.cert.generateSubjectKeyIdentifier(); - e.subjectKeyIdentifier = c.toHex(), e.value = p.create(p.Class.UNIVERSAL, p.Type.OCTETSTRING, !1, c.getBytes()) - } else if (e.name === "authorityKeyIdentifier" && t.cert) { - e.value = p.create(p.Class.UNIVERSAL, p.Type.SEQUENCE, !0, []); - var o = e.value.value; - if (e.keyIdentifier) { - var h = e.keyIdentifier === !0 ? t.cert.generateSubjectKeyIdentifier().getBytes() : e.keyIdentifier; - o.push(p.create(p.Class.CONTEXT_SPECIFIC, 0, !1, h)) - } - if (e.authorityCertIssuer) { - var x = [p.create(p.Class.CONTEXT_SPECIFIC, 4, !0, [Jt(e.authorityCertIssuer === !0 ? t.cert.issuer : e.authorityCertIssuer)])]; - o.push(p.create(p.Class.CONTEXT_SPECIFIC, 1, !0, x)) - } - if (e.serialNumber) { - var d = re.util.hexToBytes(e.serialNumber === !0 ? t.cert.serialNumber : e.serialNumber); - o.push(p.create(p.Class.CONTEXT_SPECIFIC, 2, !1, d)) - } - } else if (e.name === "cRLDistributionPoints") { - e.value = p.create(p.Class.UNIVERSAL, p.Type.SEQUENCE, !0, []); - for (var o = e.value.value, g = p.create(p.Class.UNIVERSAL, p.Type.SEQUENCE, !0, []), v = p.create(p.Class.CONTEXT_SPECIFIC, 0, !0, []), f, u = 0; u < e.altNames.length; ++u) { - f = e.altNames[u]; - var s = f.value; - if (f.type === 7 && f.ip) { - if (s = re.util.bytesFromIP(f.ip), s === null) { - var a = new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.'); - throw a.extension = e, a - } - } else f.type === 8 && (f.oid ? s = p.oidToDer(p.oidToDer(f.oid)) : s = p.oidToDer(s)); - v.value.push(p.create(p.Class.CONTEXT_SPECIFIC, f.type, !1, s)) - } - g.value.push(p.create(p.Class.CONTEXT_SPECIFIC, 0, !0, [v])), o.push(g) - } - if (typeof e.value > "u") { - var a = new Error("Extension value not specified."); - throw a.extension = e, a - } - return e -} - -function xa(e, t) { - switch (e) { - case ye["RSASSA-PSS"]: - var a = []; - return t.hash.algorithmOid !== void 0 && a.push(p.create(p.Class.CONTEXT_SPECIFIC, 0, !0, [p.create(p.Class.UNIVERSAL, p.Type.SEQUENCE, !0, [p.create(p.Class.UNIVERSAL, p.Type.OID, !1, p.oidToDer(t.hash.algorithmOid).getBytes()), p.create(p.Class.UNIVERSAL, p.Type.NULL, !1, "")])])), t.mgf.algorithmOid !== void 0 && a.push(p.create(p.Class.CONTEXT_SPECIFIC, 1, !0, [p.create(p.Class.UNIVERSAL, p.Type.SEQUENCE, !0, [p.create(p.Class.UNIVERSAL, p.Type.OID, !1, p.oidToDer(t.mgf.algorithmOid).getBytes()), p.create(p.Class.UNIVERSAL, p.Type.SEQUENCE, !0, [p.create(p.Class.UNIVERSAL, p.Type.OID, !1, p.oidToDer(t.mgf.hash.algorithmOid).getBytes()), p.create(p.Class.UNIVERSAL, p.Type.NULL, !1, "")])])])), t.saltLength !== void 0 && a.push(p.create(p.Class.CONTEXT_SPECIFIC, 2, !0, [p.create(p.Class.UNIVERSAL, p.Type.INTEGER, !1, p.integerToDer(t.saltLength).getBytes())])), p.create(p.Class.UNIVERSAL, p.Type.SEQUENCE, !0, a); - default: - return p.create(p.Class.UNIVERSAL, p.Type.NULL, !1, "") - } -} - -function uu(e) { - var t = p.create(p.Class.CONTEXT_SPECIFIC, 0, !0, []); - if (e.attributes.length === 0) return t; - for (var a = e.attributes, r = 0; r < a.length; ++r) { - var n = a[r], - i = n.value, - s = p.Type.UTF8; - "valueTagClass" in n && (s = n.valueTagClass), s === p.Type.UTF8 && (i = re.util.encodeUtf8(i)); - var o = !1; - "valueConstructed" in n && (o = n.valueConstructed); - var l = p.create(p.Class.UNIVERSAL, p.Type.SEQUENCE, !0, [p.create(p.Class.UNIVERSAL, p.Type.OID, !1, p.oidToDer(n.type).getBytes()), p.create(p.Class.UNIVERSAL, p.Type.SET, !0, [p.create(p.Class.UNIVERSAL, s, o, i)])]); - t.value.push(l) - } - return t -} -var lu = new Date("1950-01-01T00:00:00Z"), - cu = new Date("2050-01-01T00:00:00Z"); - -function kn(e) { - return e >= lu && e < cu ? p.create(p.Class.UNIVERSAL, p.Type.UTCTIME, !1, p.dateToUtcTime(e)) : p.create(p.Class.UNIVERSAL, p.Type.GENERALIZEDTIME, !1, p.dateToGeneralizedTime(e)) -} -G.getTBSCertificate = function (e) { - var t = kn(e.validity.notBefore), - a = kn(e.validity.notAfter), - r = p.create(p.Class.UNIVERSAL, p.Type.SEQUENCE, !0, [p.create(p.Class.CONTEXT_SPECIFIC, 0, !0, [p.create(p.Class.UNIVERSAL, p.Type.INTEGER, !1, p.integerToDer(e.version).getBytes())]), p.create(p.Class.UNIVERSAL, p.Type.INTEGER, !1, re.util.hexToBytes(e.serialNumber)), p.create(p.Class.UNIVERSAL, p.Type.SEQUENCE, !0, [p.create(p.Class.UNIVERSAL, p.Type.OID, !1, p.oidToDer(e.siginfo.algorithmOid).getBytes()), xa(e.siginfo.algorithmOid, e.siginfo.parameters)]), Jt(e.issuer), p.create(p.Class.UNIVERSAL, p.Type.SEQUENCE, !0, [t, a]), Jt(e.subject), G.publicKeyToAsn1(e.publicKey)]); - return e.issuer.uniqueId && r.value.push(p.create(p.Class.CONTEXT_SPECIFIC, 1, !0, [p.create(p.Class.UNIVERSAL, p.Type.BITSTRING, !1, "\0" + e.issuer.uniqueId)])), e.subject.uniqueId && r.value.push(p.create(p.Class.CONTEXT_SPECIFIC, 2, !0, [p.create(p.Class.UNIVERSAL, p.Type.BITSTRING, !1, "\0" + e.subject.uniqueId)])), e.extensions.length > 0 && r.value.push(G.certificateExtensionsToAsn1(e.extensions)), r -}; -G.getCertificationRequestInfo = function (e) { - var t = p.create(p.Class.UNIVERSAL, p.Type.SEQUENCE, !0, [p.create(p.Class.UNIVERSAL, p.Type.INTEGER, !1, p.integerToDer(e.version).getBytes()), Jt(e.subject), G.publicKeyToAsn1(e.publicKey), uu(e)]); - return t -}; -G.distinguishedNameToAsn1 = function (e) { - return Jt(e) -}; -G.certificateToAsn1 = function (e) { - var t = e.tbsCertificate || G.getTBSCertificate(e); - return p.create(p.Class.UNIVERSAL, p.Type.SEQUENCE, !0, [t, p.create(p.Class.UNIVERSAL, p.Type.SEQUENCE, !0, [p.create(p.Class.UNIVERSAL, p.Type.OID, !1, p.oidToDer(e.signatureOid).getBytes()), xa(e.signatureOid, e.signatureParameters)]), p.create(p.Class.UNIVERSAL, p.Type.BITSTRING, !1, "\0" + e.signature)]) -}; -G.certificateExtensionsToAsn1 = function (e) { - var t = p.create(p.Class.CONTEXT_SPECIFIC, 3, !0, []), - a = p.create(p.Class.UNIVERSAL, p.Type.SEQUENCE, !0, []); - t.value.push(a); - for (var r = 0; r < e.length; ++r) a.value.push(G.certificateExtensionToAsn1(e[r])); - return t -}; -G.certificateExtensionToAsn1 = function (e) { - var t = p.create(p.Class.UNIVERSAL, p.Type.SEQUENCE, !0, []); - t.value.push(p.create(p.Class.UNIVERSAL, p.Type.OID, !1, p.oidToDer(e.id).getBytes())), e.critical && t.value.push(p.create(p.Class.UNIVERSAL, p.Type.BOOLEAN, !1, "ÿ")); - var a = e.value; - return typeof e.value != "string" && (a = p.toDer(a).getBytes()), t.value.push(p.create(p.Class.UNIVERSAL, p.Type.OCTETSTRING, !1, a)), t -}; -G.certificationRequestToAsn1 = function (e) { - var t = e.certificationRequestInfo || G.getCertificationRequestInfo(e); - return p.create(p.Class.UNIVERSAL, p.Type.SEQUENCE, !0, [t, p.create(p.Class.UNIVERSAL, p.Type.SEQUENCE, !0, [p.create(p.Class.UNIVERSAL, p.Type.OID, !1, p.oidToDer(e.signatureOid).getBytes()), xa(e.signatureOid, e.signatureParameters)]), p.create(p.Class.UNIVERSAL, p.Type.BITSTRING, !1, "\0" + e.signature)]) -}; -G.createCaStore = function (e) { - var t = { - certs: {} - }; - t.getIssuer = function (s) { - var o = a(s.issuer); - return o - }, t.addCertificate = function (s) { - if (typeof s == "string" && (s = re.pki.certificateFromPem(s)), r(s.subject), !t.hasCertificate(s)) - if (s.subject.hash in t.certs) { - var o = t.certs[s.subject.hash]; - re.util.isArray(o) || (o = [o]), o.push(s), t.certs[s.subject.hash] = o - } else t.certs[s.subject.hash] = s - }, t.hasCertificate = function (s) { - typeof s == "string" && (s = re.pki.certificateFromPem(s)); - var o = a(s.subject); - if (!o) return !1; - re.util.isArray(o) || (o = [o]); - for (var l = p.toDer(G.certificateToAsn1(s)).getBytes(), f = 0; f < o.length; ++f) { - var u = p.toDer(G.certificateToAsn1(o[f])).getBytes(); - if (l === u) return !0 - } - return !1 - }, t.listAllCertificates = function () { - var s = []; - for (var o in t.certs) - if (t.certs.hasOwnProperty(o)) { - var l = t.certs[o]; - if (!re.util.isArray(l)) s.push(l); - else - for (var f = 0; f < l.length; ++f) s.push(l[f]) - } return s - }, t.removeCertificate = function (s) { - var o; - if (typeof s == "string" && (s = re.pki.certificateFromPem(s)), r(s.subject), !t.hasCertificate(s)) return null; - var l = a(s.subject); - if (!re.util.isArray(l)) return o = t.certs[s.subject.hash], delete t.certs[s.subject.hash], o; - for (var f = p.toDer(G.certificateToAsn1(s)).getBytes(), u = 0; u < l.length; ++u) { - var c = p.toDer(G.certificateToAsn1(l[u])).getBytes(); - f === c && (o = l[u], l.splice(u, 1)) - } - return l.length === 0 && delete t.certs[s.subject.hash], o - }; - - function a(s) { - return r(s), t.certs[s.hash] || null - } - - function r(s) { - if (!s.hash) { - var o = re.md.sha1.create(); - s.attributes = G.RDNAttributesAsArray(Jt(s), o), s.hash = o.digest().toHex() - } - } - if (e) - for (var n = 0; n < e.length; ++n) { - var i = e[n]; - t.addCertificate(i) - } - return t -}; -G.certificateError = { - bad_certificate: "forge.pki.BadCertificate", - unsupported_certificate: "forge.pki.UnsupportedCertificate", - certificate_revoked: "forge.pki.CertificateRevoked", - certificate_expired: "forge.pki.CertificateExpired", - certificate_unknown: "forge.pki.CertificateUnknown", - unknown_ca: "forge.pki.UnknownCertificateAuthority" -}; -G.verifyCertificateChain = function (e, t, a) { - typeof a == "function" && (a = { - verify: a - }), a = a || {}, t = t.slice(0); - var r = t.slice(0), - n = a.validityCheckDate; - typeof n > "u" && (n = new Date); - var i = !0, - s = null, - o = 0; - do { - var l = t.shift(), - f = null, - u = !1; - if (n && (n < l.validity.notBefore || n > l.validity.notAfter) && (s = { - message: "Certificate is not valid yet or has expired.", - error: G.certificateError.certificate_expired, - notBefore: l.validity.notBefore, - notAfter: l.validity.notAfter, - now: n - }), s === null) { - if (f = t[0] || e.getIssuer(l), f === null && l.isIssuer(l) && (u = !0, f = l), f) { - var c = f; - re.util.isArray(c) || (c = [c]); - for (var h = !1; !h && c.length > 0;) { - f = c.shift(); - try { - h = f.verify(l) - } catch {} - } - h || (s = { - message: "Certificate signature is invalid.", - error: G.certificateError.bad_certificate - }) - } - s === null && (!f || u) && !e.hasCertificate(l) && (s = { - message: "Certificate is not trusted.", - error: G.certificateError.unknown_ca - }) - } - if (s === null && f && !l.isIssuer(f) && (s = { - message: "Certificate issuer is invalid.", - error: G.certificateError.bad_certificate - }), s === null) - for (var x = { - keyUsage: !0, - basicConstraints: !0 - }, d = 0; s === null && d < l.extensions.length; ++d) { - var g = l.extensions[d]; - g.critical && !(g.name in x) && (s = { - message: "Certificate has an unsupported critical extension.", - error: G.certificateError.unsupported_certificate - }) - } - if (s === null && (!i || t.length === 0 && (!f || u))) { - var v = l.getExtension("basicConstraints"), - B = l.getExtension("keyUsage"); - if (B !== null && (!B.keyCertSign || v === null) && (s = { - message: "Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.", - error: G.certificateError.bad_certificate - }), s === null && v !== null && !v.cA && (s = { - message: "Certificate basicConstraints indicates the certificate is not a CA.", - error: G.certificateError.bad_certificate - }), s === null && B !== null && "pathLenConstraint" in v) { - var E = o - 1; - E > v.pathLenConstraint && (s = { - message: "Certificate basicConstraints pathLenConstraint violated.", - error: G.certificateError.bad_certificate - }) - } - } - var m = s === null ? !0 : s.error, - A = a.verify ? a.verify(m, o, r) : m; - if (A === !0) s = null; - else throw m === !0 && (s = { - message: "The application rejected the certificate.", - error: G.certificateError.bad_certificate - }), (A || A === 0) && (typeof A == "object" && !re.util.isArray(A) ? (A.message && (s.message = A.message), A.error && (s.error = A.error)) : typeof A == "string" && (s.error = A)), s; - i = !1, ++o - } while (t.length > 0); - return !0 -}; -var be = le, - b = be.asn1, - he = be.pki, - yr = be.pkcs12 = be.pkcs12 || {}, - Bi = { - name: "ContentInfo", - tagClass: b.Class.UNIVERSAL, - type: b.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "ContentInfo.contentType", - tagClass: b.Class.UNIVERSAL, - type: b.Type.OID, - constructed: !1, - capture: "contentType" - }, { - name: "ContentInfo.content", - tagClass: b.Class.CONTEXT_SPECIFIC, - constructed: !0, - captureAsn1: "content" - }] - }, - hu = { - name: "PFX", - tagClass: b.Class.UNIVERSAL, - type: b.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "PFX.version", - tagClass: b.Class.UNIVERSAL, - type: b.Type.INTEGER, - constructed: !1, - capture: "version" - }, Bi, { - name: "PFX.macData", - tagClass: b.Class.UNIVERSAL, - type: b.Type.SEQUENCE, - constructed: !0, - optional: !0, - captureAsn1: "mac", - value: [{ - name: "PFX.macData.mac", - tagClass: b.Class.UNIVERSAL, - type: b.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "PFX.macData.mac.digestAlgorithm", - tagClass: b.Class.UNIVERSAL, - type: b.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "PFX.macData.mac.digestAlgorithm.algorithm", - tagClass: b.Class.UNIVERSAL, - type: b.Type.OID, - constructed: !1, - capture: "macAlgorithm" - }, { - name: "PFX.macData.mac.digestAlgorithm.parameters", - tagClass: b.Class.UNIVERSAL, - captureAsn1: "macAlgorithmParameters" - }] - }, { - name: "PFX.macData.mac.digest", - tagClass: b.Class.UNIVERSAL, - type: b.Type.OCTETSTRING, - constructed: !1, - capture: "macDigest" - }] - }, { - name: "PFX.macData.macSalt", - tagClass: b.Class.UNIVERSAL, - type: b.Type.OCTETSTRING, - constructed: !1, - capture: "macSalt" - }, { - name: "PFX.macData.iterations", - tagClass: b.Class.UNIVERSAL, - type: b.Type.INTEGER, - constructed: !1, - optional: !0, - capture: "macIterations" - }] - }] - }, - du = { - name: "SafeBag", - tagClass: b.Class.UNIVERSAL, - type: b.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "SafeBag.bagId", - tagClass: b.Class.UNIVERSAL, - type: b.Type.OID, - constructed: !1, - capture: "bagId" - }, { - name: "SafeBag.bagValue", - tagClass: b.Class.CONTEXT_SPECIFIC, - constructed: !0, - captureAsn1: "bagValue" - }, { - name: "SafeBag.bagAttributes", - tagClass: b.Class.UNIVERSAL, - type: b.Type.SET, - constructed: !0, - optional: !0, - capture: "bagAttributes" - }] - }, - xu = { - name: "Attribute", - tagClass: b.Class.UNIVERSAL, - type: b.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "Attribute.attrId", - tagClass: b.Class.UNIVERSAL, - type: b.Type.OID, - constructed: !1, - capture: "oid" - }, { - name: "Attribute.attrValues", - tagClass: b.Class.UNIVERSAL, - type: b.Type.SET, - constructed: !0, - capture: "values" - }] - }, - pu = { - name: "CertBag", - tagClass: b.Class.UNIVERSAL, - type: b.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "CertBag.certId", - tagClass: b.Class.UNIVERSAL, - type: b.Type.OID, - constructed: !1, - capture: "certId" - }, { - name: "CertBag.certValue", - tagClass: b.Class.CONTEXT_SPECIFIC, - constructed: !0, - value: [{ - name: "CertBag.certValue[0]", - tagClass: b.Class.UNIVERSAL, - type: b.Class.OCTETSTRING, - constructed: !1, - capture: "cert" - }] - }] - }; - -function lr(e, t, a, r) { - for (var n = [], i = 0; i < e.length; i++) - for (var s = 0; s < e[i].safeBags.length; s++) { - var o = e[i].safeBags[s]; - if (!(r !== void 0 && o.type !== r)) { - if (t === null) { - n.push(o); - continue - } - o.attributes[t] !== void 0 && o.attributes[t].indexOf(a) >= 0 && n.push(o) - } - } - return n -} -yr.pkcs12FromAsn1 = function (e, t, a) { - typeof t == "string" ? (a = t, t = !0) : t === void 0 && (t = !0); - var r = {}, - n = []; - if (!b.validate(e, hu, r, n)) { - var i = new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."); - throw i.errors = i, i - } - var s = { - version: r.version.charCodeAt(0), - safeContents: [], - getBags: function (v) { - var B = {}, - E; - return "localKeyId" in v ? E = v.localKeyId : "localKeyIdHex" in v && (E = be.util.hexToBytes(v.localKeyIdHex)), E === void 0 && !("friendlyName" in v) && "bagType" in v && (B[v.bagType] = lr(s.safeContents, null, null, v.bagType)), E !== void 0 && (B.localKeyId = lr(s.safeContents, "localKeyId", E, v.bagType)), "friendlyName" in v && (B.friendlyName = lr(s.safeContents, "friendlyName", v.friendlyName, v.bagType)), B - }, - getBagsByFriendlyName: function (v, B) { - return lr(s.safeContents, "friendlyName", v, B) - }, - getBagsByLocalKeyId: function (v, B) { - return lr(s.safeContents, "localKeyId", v, B) - } - }; - if (r.version.charCodeAt(0) !== 3) { - var i = new Error("PKCS#12 PFX of version other than 3 not supported."); - throw i.version = r.version.charCodeAt(0), i - } - if (b.derToOid(r.contentType) !== he.oids.data) { - var i = new Error("Only PKCS#12 PFX in password integrity mode supported."); - throw i.oid = b.derToOid(r.contentType), i - } - var o = r.content.value[0]; - if (o.tagClass !== b.Class.UNIVERSAL || o.type !== b.Type.OCTETSTRING) throw new Error("PKCS#12 authSafe content data is not an OCTET STRING."); - if (o = pa(o), r.mac) { - var l = null, - f = 0, - u = b.derToOid(r.macAlgorithm); - switch (u) { - case he.oids.sha1: - l = be.md.sha1.create(), f = 20; - break; - case he.oids.sha256: - l = be.md.sha256.create(), f = 32; - break; - case he.oids.sha384: - l = be.md.sha384.create(), f = 48; - break; - case he.oids.sha512: - l = be.md.sha512.create(), f = 64; - break; - case he.oids.md5: - l = be.md.md5.create(), f = 16; - break - } - if (l === null) throw new Error("PKCS#12 uses unsupported MAC algorithm: " + u); - var c = new be.util.ByteBuffer(r.macSalt), - h = "macIterations" in r ? parseInt(be.util.bytesToHex(r.macIterations), 16) : 1, - x = yr.generateKey(a, c, 3, h, f, l), - d = be.hmac.create(); - d.start(l, x), d.update(o.value); - var g = d.getMac(); - if (g.getBytes() !== r.macDigest) throw new Error("PKCS#12 MAC could not be verified. Invalid password?") - } - return vu(s, o.value, t, a), s -}; - -function pa(e) { - if (e.composed || e.constructed) { - for (var t = be.util.createBuffer(), a = 0; a < e.value.length; ++a) t.putBytes(e.value[a].value); - e.composed = e.constructed = !1, e.value = t.getBytes() - } - return e -} - -function vu(e, t, a, r) { - if (t = b.fromDer(t, a), t.tagClass !== b.Class.UNIVERSAL || t.type !== b.Type.SEQUENCE || t.constructed !== !0) throw new Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo"); - for (var n = 0; n < t.value.length; n++) { - var i = t.value[n], - s = {}, - o = []; - if (!b.validate(i, Bi, s, o)) { - var l = new Error("Cannot read ContentInfo."); - throw l.errors = o, l - } - var f = { - encrypted: !1 - }, - u = null, - c = s.content.value[0]; - switch (b.derToOid(s.contentType)) { - case he.oids.data: - if (c.tagClass !== b.Class.UNIVERSAL || c.type !== b.Type.OCTETSTRING) throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING."); - u = pa(c).value; - break; - case he.oids.encryptedData: - u = yu(c, r), f.encrypted = !0; - break; - default: - var l = new Error("Unsupported PKCS#12 contentType."); - throw l.contentType = b.derToOid(s.contentType), l - } - f.safeBags = gu(u, a, r), e.safeContents.push(f) - } -} - -function yu(e, t) { - var a = {}, - r = []; - if (!b.validate(e, be.pkcs7.asn1.encryptedDataValidator, a, r)) { - var n = new Error("Cannot read EncryptedContentInfo."); - throw n.errors = r, n - } - var i = b.derToOid(a.contentType); - if (i !== he.oids.data) { - var n = new Error("PKCS#12 EncryptedContentInfo ContentType is not Data."); - throw n.oid = i, n - } - i = b.derToOid(a.encAlgorithm); - var s = he.pbe.getCipher(i, a.encParameter, t), - o = pa(a.encryptedContentAsn1), - l = be.util.createBuffer(o.value); - if (s.update(l), !s.finish()) throw new Error("Failed to decrypt PKCS#12 SafeContents."); - return s.output.getBytes() -} - -function gu(e, t, a) { - if (!t && e.length === 0) return []; - if (e = b.fromDer(e, t), e.tagClass !== b.Class.UNIVERSAL || e.type !== b.Type.SEQUENCE || e.constructed !== !0) throw new Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag."); - for (var r = [], n = 0; n < e.value.length; n++) { - var i = e.value[n], - s = {}, - o = []; - if (!b.validate(i, du, s, o)) { - var l = new Error("Cannot read SafeBag."); - throw l.errors = o, l - } - var f = { - type: b.derToOid(s.bagId), - attributes: Cu(s.bagAttributes) - }; - r.push(f); - var u, c, h = s.bagValue.value[0]; - switch (f.type) { - case he.oids.pkcs8ShroudedKeyBag: - if (h = he.decryptPrivateKeyInfo(h, a), h === null) throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?"); - case he.oids.keyBag: - try { - f.key = he.privateKeyFromAsn1(h) - } catch { - f.key = null, f.asn1 = h - } - continue; - case he.oids.certBag: - u = pu, c = function () { - if (b.derToOid(s.certId) !== he.oids.x509Certificate) { - var d = new Error("Unsupported certificate type, only X.509 supported."); - throw d.oid = b.derToOid(s.certId), d - } - var g = b.fromDer(s.cert, t); - try { - f.cert = he.certificateFromAsn1(g, !0) - } catch { - f.cert = null, f.asn1 = g - } - }; - break; - default: - var l = new Error("Unsupported PKCS#12 SafeBag type."); - throw l.oid = f.type, l - } - if (u !== void 0 && !b.validate(h, u, s, o)) { - var l = new Error("Cannot read PKCS#12 " + u.name); - throw l.errors = o, l - } - c() - } - return r -} - -function Cu(e) { - var t = {}; - if (e !== void 0) - for (var a = 0; a < e.length; ++a) { - var r = {}, - n = []; - if (!b.validate(e[a], xu, r, n)) { - var i = new Error("Cannot read PKCS#12 BagAttribute."); - throw i.errors = n, i - } - var s = b.derToOid(r.oid); - if (he.oids[s] !== void 0) { - t[he.oids[s]] = []; - for (var o = 0; o < r.values.length; ++o) t[he.oids[s]].push(r.values[o].value) - } - } - return t -} -yr.toPkcs12Asn1 = function (e, t, a, r) { - r = r || {}, r.saltSize = r.saltSize || 8, r.count = r.count || 2048, r.algorithm = r.algorithm || r.encAlgorithm || "aes128", "useMac" in r || (r.useMac = !0), "localKeyId" in r || (r.localKeyId = null), "generateLocalKeyId" in r || (r.generateLocalKeyId = !0); - var n = r.localKeyId, - i; - if (n !== null) n = be.util.hexToBytes(n); - else if (r.generateLocalKeyId) - if (t) { - var s = be.util.isArray(t) ? t[0] : t; - typeof s == "string" && (s = he.certificateFromPem(s)); - var o = be.md.sha1.create(); - o.update(b.toDer(he.certificateToAsn1(s)).getBytes()), n = o.digest().getBytes() - } else n = be.random.getBytes(20); - var l = []; - n !== null && l.push(b.create(b.Class.UNIVERSAL, b.Type.SEQUENCE, !0, [b.create(b.Class.UNIVERSAL, b.Type.OID, !1, b.oidToDer(he.oids.localKeyId).getBytes()), b.create(b.Class.UNIVERSAL, b.Type.SET, !0, [b.create(b.Class.UNIVERSAL, b.Type.OCTETSTRING, !1, n)])])), "friendlyName" in r && l.push(b.create(b.Class.UNIVERSAL, b.Type.SEQUENCE, !0, [b.create(b.Class.UNIVERSAL, b.Type.OID, !1, b.oidToDer(he.oids.friendlyName).getBytes()), b.create(b.Class.UNIVERSAL, b.Type.SET, !0, [b.create(b.Class.UNIVERSAL, b.Type.BMPSTRING, !1, r.friendlyName)])])), l.length > 0 && (i = b.create(b.Class.UNIVERSAL, b.Type.SET, !0, l)); - var f = [], - u = []; - t !== null && (be.util.isArray(t) ? u = t : u = [t]); - for (var c = [], h = 0; h < u.length; ++h) { - t = u[h], typeof t == "string" && (t = he.certificateFromPem(t)); - var x = h === 0 ? i : void 0, - d = he.certificateToAsn1(t), - g = b.create(b.Class.UNIVERSAL, b.Type.SEQUENCE, !0, [b.create(b.Class.UNIVERSAL, b.Type.OID, !1, b.oidToDer(he.oids.certBag).getBytes()), b.create(b.Class.CONTEXT_SPECIFIC, 0, !0, [b.create(b.Class.UNIVERSAL, b.Type.SEQUENCE, !0, [b.create(b.Class.UNIVERSAL, b.Type.OID, !1, b.oidToDer(he.oids.x509Certificate).getBytes()), b.create(b.Class.CONTEXT_SPECIFIC, 0, !0, [b.create(b.Class.UNIVERSAL, b.Type.OCTETSTRING, !1, b.toDer(d).getBytes())])])]), x]); - c.push(g) - } - if (c.length > 0) { - var v = b.create(b.Class.UNIVERSAL, b.Type.SEQUENCE, !0, c), - B = b.create(b.Class.UNIVERSAL, b.Type.SEQUENCE, !0, [b.create(b.Class.UNIVERSAL, b.Type.OID, !1, b.oidToDer(he.oids.data).getBytes()), b.create(b.Class.CONTEXT_SPECIFIC, 0, !0, [b.create(b.Class.UNIVERSAL, b.Type.OCTETSTRING, !1, b.toDer(v).getBytes())])]); - f.push(B) - } - var E = null; - if (e !== null) { - var m = he.wrapRsaPrivateKey(he.privateKeyToAsn1(e)); - a === null ? E = b.create(b.Class.UNIVERSAL, b.Type.SEQUENCE, !0, [b.create(b.Class.UNIVERSAL, b.Type.OID, !1, b.oidToDer(he.oids.keyBag).getBytes()), b.create(b.Class.CONTEXT_SPECIFIC, 0, !0, [m]), i]) : E = b.create(b.Class.UNIVERSAL, b.Type.SEQUENCE, !0, [b.create(b.Class.UNIVERSAL, b.Type.OID, !1, b.oidToDer(he.oids.pkcs8ShroudedKeyBag).getBytes()), b.create(b.Class.CONTEXT_SPECIFIC, 0, !0, [he.encryptPrivateKeyInfo(m, a, r)]), i]); - var A = b.create(b.Class.UNIVERSAL, b.Type.SEQUENCE, !0, [E]), - T = b.create(b.Class.UNIVERSAL, b.Type.SEQUENCE, !0, [b.create(b.Class.UNIVERSAL, b.Type.OID, !1, b.oidToDer(he.oids.data).getBytes()), b.create(b.Class.CONTEXT_SPECIFIC, 0, !0, [b.create(b.Class.UNIVERSAL, b.Type.OCTETSTRING, !1, b.toDer(A).getBytes())])]); - f.push(T) - } - var S = b.create(b.Class.UNIVERSAL, b.Type.SEQUENCE, !0, f), - N; - if (r.useMac) { - var o = be.md.sha1.create(), - w = new be.util.ByteBuffer(be.random.getBytes(r.saltSize)), - K = r.count, - e = yr.generateKey(a, w, 3, K, 20), - D = be.hmac.create(); - D.start(o, e), D.update(b.toDer(S).getBytes()); - var F = D.getMac(); - N = b.create(b.Class.UNIVERSAL, b.Type.SEQUENCE, !0, [b.create(b.Class.UNIVERSAL, b.Type.SEQUENCE, !0, [b.create(b.Class.UNIVERSAL, b.Type.SEQUENCE, !0, [b.create(b.Class.UNIVERSAL, b.Type.OID, !1, b.oidToDer(he.oids.sha1).getBytes()), b.create(b.Class.UNIVERSAL, b.Type.NULL, !1, "")]), b.create(b.Class.UNIVERSAL, b.Type.OCTETSTRING, !1, F.getBytes())]), b.create(b.Class.UNIVERSAL, b.Type.OCTETSTRING, !1, w.getBytes()), b.create(b.Class.UNIVERSAL, b.Type.INTEGER, !1, b.integerToDer(K).getBytes())]) - } - return b.create(b.Class.UNIVERSAL, b.Type.SEQUENCE, !0, [b.create(b.Class.UNIVERSAL, b.Type.INTEGER, !1, b.integerToDer(3).getBytes()), b.create(b.Class.UNIVERSAL, b.Type.SEQUENCE, !0, [b.create(b.Class.UNIVERSAL, b.Type.OID, !1, b.oidToDer(he.oids.data).getBytes()), b.create(b.Class.CONTEXT_SPECIFIC, 0, !0, [b.create(b.Class.UNIVERSAL, b.Type.OCTETSTRING, !1, b.toDer(S).getBytes())])]), N]) -}; -yr.generateKey = be.pbe.generatePkcs12Key; -var wt = le, - va = wt.asn1, - er = wt.pki = wt.pki || {}; -er.pemToDer = function (e) { - var t = wt.pem.decode(e)[0]; - if (t.procType && t.procType.type === "ENCRYPTED") throw new Error("Could not convert PEM to DER; PEM is encrypted."); - return wt.util.createBuffer(t.body) -}; -er.privateKeyFromPem = function (e) { - var t = wt.pem.decode(e)[0]; - if (t.type !== "PRIVATE KEY" && t.type !== "RSA PRIVATE KEY") { - var a = new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".'); - throw a.headerType = t.type, a - } - if (t.procType && t.procType.type === "ENCRYPTED") throw new Error("Could not convert private key from PEM; PEM is encrypted."); - var r = va.fromDer(t.body); - return er.privateKeyFromAsn1(r) -}; -er.privateKeyToPem = function (e, t) { - var a = { - type: "RSA PRIVATE KEY", - body: va.toDer(er.privateKeyToAsn1(e)).getBytes() - }; - return wt.pem.encode(a, { - maxline: t - }) -}; -er.privateKeyInfoToPem = function (e, t) { - var a = { - type: "PRIVATE KEY", - body: va.toDer(e).getBytes() - }; - return wt.pem.encode(a, { - maxline: t - }) -}; -var M = le, - $r = function (e, t, a, r) { - var n = M.util.createBuffer(), - i = e.length >> 1, - s = i + (e.length & 1), - o = e.substr(0, s), - l = e.substr(i, s), - f = M.util.createBuffer(), - u = M.hmac.create(); - a = t + a; - var c = Math.ceil(r / 16), - h = Math.ceil(r / 20); - u.start("MD5", o); - var x = M.util.createBuffer(); - f.putBytes(a); - for (var d = 0; d < c; ++d) u.start(null, null), u.update(f.getBytes()), f.putBuffer(u.digest()), u.start(null, null), u.update(f.bytes() + a), x.putBuffer(u.digest()); - u.start("SHA1", l); - var g = M.util.createBuffer(); - f.clear(), f.putBytes(a); - for (var d = 0; d < h; ++d) u.start(null, null), u.update(f.getBytes()), f.putBuffer(u.digest()), u.start(null, null), u.update(f.bytes() + a), g.putBuffer(u.digest()); - return n.putBytes(M.util.xorBytes(x.getBytes(), g.getBytes(), r)), n - }, - Eu = function (e, t, a) { - var r = M.hmac.create(); - r.start("SHA1", e); - var n = M.util.createBuffer(); - return n.putInt32(t[0]), n.putInt32(t[1]), n.putByte(a.type), n.putByte(a.version.major), n.putByte(a.version.minor), n.putInt16(a.length), n.putBytes(a.fragment.bytes()), r.update(n.getBytes()), r.digest().getBytes() - }, - mu = function (e, t, a) { - var r = !1; - try { - var n = e.deflate(t.fragment.getBytes()); - t.fragment = M.util.createBuffer(n), t.length = n.length, r = !0 - } catch {} - return r - }, - Bu = function (e, t, a) { - var r = !1; - try { - var n = e.inflate(t.fragment.getBytes()); - t.fragment = M.util.createBuffer(n), t.length = n.length, r = !0 - } catch {} - return r - }, - Je = function (e, t) { - var a = 0; - switch (t) { - case 1: - a = e.getByte(); - break; - case 2: - a = e.getInt16(); - break; - case 3: - a = e.getInt24(); - break; - case 4: - a = e.getInt32(); - break - } - return M.util.createBuffer(e.getBytes(a)) - }, - rt = function (e, t, a) { - e.putInt(a.length(), t << 3), e.putBuffer(a) - }, - C = {}; -C.Versions = { - TLS_1_0: { - major: 3, - minor: 1 - }, - TLS_1_1: { - major: 3, - minor: 2 - }, - TLS_1_2: { - major: 3, - minor: 3 - } -}; -C.SupportedVersions = [C.Versions.TLS_1_1, C.Versions.TLS_1_0]; -C.Version = C.SupportedVersions[0]; -C.MaxFragment = 15360; -C.ConnectionEnd = { - server: 0, - client: 1 -}; -C.PRFAlgorithm = { - tls_prf_sha256: 0 -}; -C.BulkCipherAlgorithm = { - none: null, - rc4: 0, - des3: 1, - aes: 2 -}; -C.CipherType = { - stream: 0, - block: 1, - aead: 2 -}; -C.MACAlgorithm = { - none: null, - hmac_md5: 0, - hmac_sha1: 1, - hmac_sha256: 2, - hmac_sha384: 3, - hmac_sha512: 4 -}; -C.CompressionMethod = { - none: 0, - deflate: 1 -}; -C.ContentType = { - change_cipher_spec: 20, - alert: 21, - handshake: 22, - application_data: 23, - heartbeat: 24 -}; -C.HandshakeType = { - hello_request: 0, - client_hello: 1, - server_hello: 2, - certificate: 11, - server_key_exchange: 12, - certificate_request: 13, - server_hello_done: 14, - certificate_verify: 15, - client_key_exchange: 16, - finished: 20 -}; -C.Alert = {}; -C.Alert.Level = { - warning: 1, - fatal: 2 -}; -C.Alert.Description = { - close_notify: 0, - unexpected_message: 10, - bad_record_mac: 20, - decryption_failed: 21, - record_overflow: 22, - decompression_failure: 30, - handshake_failure: 40, - bad_certificate: 42, - unsupported_certificate: 43, - certificate_revoked: 44, - certificate_expired: 45, - certificate_unknown: 46, - illegal_parameter: 47, - unknown_ca: 48, - access_denied: 49, - decode_error: 50, - decrypt_error: 51, - export_restriction: 60, - protocol_version: 70, - insufficient_security: 71, - internal_error: 80, - user_canceled: 90, - no_renegotiation: 100 -}; -C.HeartbeatMessageType = { - heartbeat_request: 1, - heartbeat_response: 2 -}; -C.CipherSuites = {}; -C.getCipherSuite = function (e) { - var t = null; - for (var a in C.CipherSuites) { - var r = C.CipherSuites[a]; - if (r.id[0] === e.charCodeAt(0) && r.id[1] === e.charCodeAt(1)) { - t = r; - break - } - } - return t -}; -C.handleUnexpected = function (e, t) { - var a = !e.open && e.entity === C.ConnectionEnd.client; - a || e.error(e, { - message: "Unexpected message. Received TLS record out of order.", - send: !0, - alert: { - level: C.Alert.Level.fatal, - description: C.Alert.Description.unexpected_message - } - }) -}; -C.handleHelloRequest = function (e, t, a) { - !e.handshaking && e.handshakes > 0 && (C.queue(e, C.createAlert(e, { - level: C.Alert.Level.warning, - description: C.Alert.Description.no_renegotiation - })), C.flush(e)), e.process() -}; -C.parseHelloMessage = function (e, t, a) { - var r = null, - n = e.entity === C.ConnectionEnd.client; - if (a < 38) e.error(e, { - message: n ? "Invalid ServerHello message. Message too short." : "Invalid ClientHello message. Message too short.", - send: !0, - alert: { - level: C.Alert.Level.fatal, - description: C.Alert.Description.illegal_parameter - } - }); - else { - var i = t.fragment, - s = i.length(); - if (r = { - version: { - major: i.getByte(), - minor: i.getByte() - }, - random: M.util.createBuffer(i.getBytes(32)), - session_id: Je(i, 1), - extensions: [] - }, n ? (r.cipher_suite = i.getBytes(2), r.compression_method = i.getByte()) : (r.cipher_suites = Je(i, 2), r.compression_methods = Je(i, 1)), s = a - (s - i.length()), s > 0) { - for (var o = Je(i, 2); o.length() > 0;) r.extensions.push({ - type: [o.getByte(), o.getByte()], - data: Je(o, 2) - }); - if (!n) - for (var l = 0; l < r.extensions.length; ++l) { - var f = r.extensions[l]; - if (f.type[0] === 0 && f.type[1] === 0) - for (var u = Je(f.data, 2); u.length() > 0;) { - var c = u.getByte(); - if (c !== 0) break; - e.session.extensions.server_name.serverNameList.push(Je(u, 2).getBytes()) - } - } - } - if (e.session.version && (r.version.major !== e.session.version.major || r.version.minor !== e.session.version.minor)) return e.error(e, { - message: "TLS version change is disallowed during renegotiation.", - send: !0, - alert: { - level: C.Alert.Level.fatal, - description: C.Alert.Description.protocol_version - } - }); - if (n) e.session.cipherSuite = C.getCipherSuite(r.cipher_suite); - else - for (var h = M.util.createBuffer(r.cipher_suites.bytes()); h.length() > 0 && (e.session.cipherSuite = C.getCipherSuite(h.getBytes(2)), e.session.cipherSuite === null);); - if (e.session.cipherSuite === null) return e.error(e, { - message: "No cipher suites in common.", - send: !0, - alert: { - level: C.Alert.Level.fatal, - description: C.Alert.Description.handshake_failure - }, - cipherSuite: M.util.bytesToHex(r.cipher_suite) - }); - n ? e.session.compressionMethod = r.compression_method : e.session.compressionMethod = C.CompressionMethod.none - } - return r -}; -C.createSecurityParameters = function (e, t) { - var a = e.entity === C.ConnectionEnd.client, - r = t.random.bytes(), - n = a ? e.session.sp.client_random : r, - i = a ? r : C.createRandom().getBytes(); - e.session.sp = { - entity: e.entity, - prf_algorithm: C.PRFAlgorithm.tls_prf_sha256, - bulk_cipher_algorithm: null, - cipher_type: null, - enc_key_length: null, - block_length: null, - fixed_iv_length: null, - record_iv_length: null, - mac_algorithm: null, - mac_length: null, - mac_key_length: null, - compression_algorithm: e.session.compressionMethod, - pre_master_secret: null, - master_secret: null, - client_random: n, - server_random: i - } -}; -C.handleServerHello = function (e, t, a) { - var r = C.parseHelloMessage(e, t, a); - if (!e.fail) { - if (r.version.minor <= e.version.minor) e.version.minor = r.version.minor; - else return e.error(e, { - message: "Incompatible TLS version.", - send: !0, - alert: { - level: C.Alert.Level.fatal, - description: C.Alert.Description.protocol_version - } - }); - e.session.version = e.version; - var n = r.session_id.bytes(); - n.length > 0 && n === e.session.id ? (e.expect = Ai, e.session.resuming = !0, e.session.sp.server_random = r.random.bytes()) : (e.expect = Su, e.session.resuming = !1, C.createSecurityParameters(e, r)), e.session.id = n, e.process() - } -}; -C.handleClientHello = function (e, t, a) { - var r = C.parseHelloMessage(e, t, a); - if (!e.fail) { - var n = r.session_id.bytes(), - i = null; - if (e.sessionCache && (i = e.sessionCache.getSession(n), i === null ? n = "" : (i.version.major !== r.version.major || i.version.minor > r.version.minor) && (i = null, n = "")), n.length === 0 && (n = M.random.getBytes(32)), e.session.id = n, e.session.clientHelloVersion = r.version, e.session.sp = {}, i) e.version = e.session.version = i.version, e.session.sp = i.sp; - else { - for (var s, o = 1; o < C.SupportedVersions.length && (s = C.SupportedVersions[o], !(s.minor <= r.version.minor)); ++o); - e.version = { - major: s.major, - minor: s.minor - }, e.session.version = e.version - } - i !== null ? (e.expect = ya, e.session.resuming = !0, e.session.sp.client_random = r.random.bytes()) : (e.expect = e.verifyClient !== !1 ? Fu : Y0, e.session.resuming = !1, C.createSecurityParameters(e, r)), e.open = !0, C.queue(e, C.createRecord(e, { - type: C.ContentType.handshake, - data: C.createServerHello(e) - })), e.session.resuming ? (C.queue(e, C.createRecord(e, { - type: C.ContentType.change_cipher_spec, - data: C.createChangeCipherSpec() - })), e.state.pending = C.createConnectionState(e), e.state.current.write = e.state.pending.write, C.queue(e, C.createRecord(e, { - type: C.ContentType.handshake, - data: C.createFinished(e) - }))) : (C.queue(e, C.createRecord(e, { - type: C.ContentType.handshake, - data: C.createCertificate(e) - })), e.fail || (C.queue(e, C.createRecord(e, { - type: C.ContentType.handshake, - data: C.createServerKeyExchange(e) - })), e.verifyClient !== !1 && C.queue(e, C.createRecord(e, { - type: C.ContentType.handshake, - data: C.createCertificateRequest(e) - })), C.queue(e, C.createRecord(e, { - type: C.ContentType.handshake, - data: C.createServerHelloDone(e) - })))), C.flush(e), e.process() - } -}; -C.handleCertificate = function (e, t, a) { - if (a < 3) return e.error(e, { - message: "Invalid Certificate message. Message too short.", - send: !0, - alert: { - level: C.Alert.Level.fatal, - description: C.Alert.Description.illegal_parameter - } - }); - var r = t.fragment, - n = { - certificate_list: Je(r, 3) - }, - i, s, o = []; - try { - for (; n.certificate_list.length() > 0;) i = Je(n.certificate_list, 3), s = M.asn1.fromDer(i), i = M.pki.certificateFromAsn1(s, !0), o.push(i) - } catch (f) { - return e.error(e, { - message: "Could not parse certificate list.", - cause: f, - send: !0, - alert: { - level: C.Alert.Level.fatal, - description: C.Alert.Description.bad_certificate - } - }) - } - var l = e.entity === C.ConnectionEnd.client; - (l || e.verifyClient === !0) && o.length === 0 ? e.error(e, { - message: l ? "No server certificate provided." : "No client certificate provided.", - send: !0, - alert: { - level: C.Alert.Level.fatal, - description: C.Alert.Description.illegal_parameter - } - }) : o.length === 0 ? e.expect = l ? Ln : Y0 : (l ? e.session.serverCertificate = o[0] : e.session.clientCertificate = o[0], C.verifyCertificateChain(e, o) && (e.expect = l ? Ln : Y0)), e.process() -}; -C.handleServerKeyExchange = function (e, t, a) { - if (a > 0) return e.error(e, { - message: "Invalid key parameters. Only RSA is supported.", - send: !0, - alert: { - level: C.Alert.Level.fatal, - description: C.Alert.Description.unsupported_certificate - } - }); - e.expect = Tu, e.process() -}; -C.handleClientKeyExchange = function (e, t, a) { - if (a < 48) return e.error(e, { - message: "Invalid key parameters. Only RSA is supported.", - send: !0, - alert: { - level: C.Alert.Level.fatal, - description: C.Alert.Description.unsupported_certificate - } - }); - var r = t.fragment, - n = { - enc_pre_master_secret: Je(r, 2).getBytes() - }, - i = null; - if (e.getPrivateKey) try { - i = e.getPrivateKey(e, e.session.serverCertificate), i = M.pki.privateKeyFromPem(i) - } catch (l) { - e.error(e, { - message: "Could not get private key.", - cause: l, - send: !0, - alert: { - level: C.Alert.Level.fatal, - description: C.Alert.Description.internal_error - } - }) - } - if (i === null) return e.error(e, { - message: "No private key set.", - send: !0, - alert: { - level: C.Alert.Level.fatal, - description: C.Alert.Description.internal_error - } - }); - try { - var s = e.session.sp; - s.pre_master_secret = i.decrypt(n.enc_pre_master_secret); - var o = e.session.clientHelloVersion; - if (o.major !== s.pre_master_secret.charCodeAt(0) || o.minor !== s.pre_master_secret.charCodeAt(1)) throw new Error("TLS version rollback attack detected.") - } catch { - s.pre_master_secret = M.random.getBytes(48) - } - e.expect = ya, e.session.clientCertificate !== null && (e.expect = Ru), e.process() -}; -C.handleCertificateRequest = function (e, t, a) { - if (a < 3) return e.error(e, { - message: "Invalid CertificateRequest. Message too short.", - send: !0, - alert: { - level: C.Alert.Level.fatal, - description: C.Alert.Description.illegal_parameter - } - }); - var r = t.fragment, - n = { - certificate_types: Je(r, 1), - certificate_authorities: Je(r, 2) - }; - e.session.certificateRequest = n, e.expect = bu, e.process() -}; -C.handleCertificateVerify = function (e, t, a) { - if (a < 2) return e.error(e, { - message: "Invalid CertificateVerify. Message too short.", - send: !0, - alert: { - level: C.Alert.Level.fatal, - description: C.Alert.Description.illegal_parameter - } - }); - var r = t.fragment; - r.read -= 4; - var n = r.bytes(); - r.read += 4; - var i = { - signature: Je(r, 2).getBytes() - }, - s = M.util.createBuffer(); - s.putBuffer(e.session.md5.digest()), s.putBuffer(e.session.sha1.digest()), s = s.getBytes(); - try { - var o = e.session.clientCertificate; - if (!o.publicKey.verify(s, i.signature, "NONE")) throw new Error("CertificateVerify signature does not match."); - e.session.md5.update(n), e.session.sha1.update(n) - } catch { - return e.error(e, { - message: "Bad signature in CertificateVerify.", - send: !0, - alert: { - level: C.Alert.Level.fatal, - description: C.Alert.Description.handshake_failure - } - }) - } - e.expect = ya, e.process() -}; -C.handleServerHelloDone = function (e, t, a) { - if (a > 0) return e.error(e, { - message: "Invalid ServerHelloDone message. Invalid length.", - send: !0, - alert: { - level: C.Alert.Level.fatal, - description: C.Alert.Description.record_overflow - } - }); - if (e.serverCertificate === null) { - var r = { - message: "No server certificate provided. Not enough security.", - send: !0, - alert: { - level: C.Alert.Level.fatal, - description: C.Alert.Description.insufficient_security - } - }, - n = 0, - i = e.verify(e, r.alert.description, n, []); - if (i !== !0) return (i || i === 0) && (typeof i == "object" && !M.util.isArray(i) ? (i.message && (r.message = i.message), i.alert && (r.alert.description = i.alert)) : typeof i == "number" && (r.alert.description = i)), e.error(e, r) - } - e.session.certificateRequest !== null && (t = C.createRecord(e, { - type: C.ContentType.handshake, - data: C.createCertificate(e) - }), C.queue(e, t)), t = C.createRecord(e, { - type: C.ContentType.handshake, - data: C.createClientKeyExchange(e) - }), C.queue(e, t), e.expect = Du; - var s = function (o, l) { - o.session.certificateRequest !== null && o.session.clientCertificate !== null && C.queue(o, C.createRecord(o, { - type: C.ContentType.handshake, - data: C.createCertificateVerify(o, l) - })), C.queue(o, C.createRecord(o, { - type: C.ContentType.change_cipher_spec, - data: C.createChangeCipherSpec() - })), o.state.pending = C.createConnectionState(o), o.state.current.write = o.state.pending.write, C.queue(o, C.createRecord(o, { - type: C.ContentType.handshake, - data: C.createFinished(o) - })), o.expect = Ai, C.flush(o), o.process() - }; - if (e.session.certificateRequest === null || e.session.clientCertificate === null) return s(e, null); - C.getClientSignature(e, s) -}; -C.handleChangeCipherSpec = function (e, t) { - if (t.fragment.getByte() !== 1) return e.error(e, { - message: "Invalid ChangeCipherSpec message received.", - send: !0, - alert: { - level: C.Alert.Level.fatal, - description: C.Alert.Description.illegal_parameter - } - }); - var a = e.entity === C.ConnectionEnd.client; - (e.session.resuming && a || !e.session.resuming && !a) && (e.state.pending = C.createConnectionState(e)), e.state.current.read = e.state.pending.read, (!e.session.resuming && a || e.session.resuming && !a) && (e.state.pending = null), e.expect = a ? Iu : wu, e.process() -}; -C.handleFinished = function (e, t, a) { - var r = t.fragment; - r.read -= 4; - var n = r.bytes(); - r.read += 4; - var i = t.fragment.getBytes(); - r = M.util.createBuffer(), r.putBuffer(e.session.md5.digest()), r.putBuffer(e.session.sha1.digest()); - var s = e.entity === C.ConnectionEnd.client, - o = s ? "server finished" : "client finished", - l = e.session.sp, - f = 12, - u = $r; - if (r = u(l.master_secret, o, r.getBytes(), f), r.getBytes() !== i) return e.error(e, { - message: "Invalid verify_data in Finished message.", - send: !0, - alert: { - level: C.Alert.Level.fatal, - description: C.Alert.Description.decrypt_error - } - }); - e.session.md5.update(n), e.session.sha1.update(n), (e.session.resuming && s || !e.session.resuming && !s) && (C.queue(e, C.createRecord(e, { - type: C.ContentType.change_cipher_spec, - data: C.createChangeCipherSpec() - })), e.state.current.write = e.state.pending.write, e.state.pending = null, C.queue(e, C.createRecord(e, { - type: C.ContentType.handshake, - data: C.createFinished(e) - }))), e.expect = s ? _u : ku, e.handshaking = !1, ++e.handshakes, e.peerCertificate = s ? e.session.serverCertificate : e.session.clientCertificate, C.flush(e), e.isConnected = !0, e.connected(e), e.process() -}; -C.handleAlert = function (e, t) { - var a = t.fragment, - r = { - level: a.getByte(), - description: a.getByte() - }, - n; - switch (r.description) { - case C.Alert.Description.close_notify: - n = "Connection closed."; - break; - case C.Alert.Description.unexpected_message: - n = "Unexpected message."; - break; - case C.Alert.Description.bad_record_mac: - n = "Bad record MAC."; - break; - case C.Alert.Description.decryption_failed: - n = "Decryption failed."; - break; - case C.Alert.Description.record_overflow: - n = "Record overflow."; - break; - case C.Alert.Description.decompression_failure: - n = "Decompression failed."; - break; - case C.Alert.Description.handshake_failure: - n = "Handshake failure."; - break; - case C.Alert.Description.bad_certificate: - n = "Bad certificate."; - break; - case C.Alert.Description.unsupported_certificate: - n = "Unsupported certificate."; - break; - case C.Alert.Description.certificate_revoked: - n = "Certificate revoked."; - break; - case C.Alert.Description.certificate_expired: - n = "Certificate expired."; - break; - case C.Alert.Description.certificate_unknown: - n = "Certificate unknown."; - break; - case C.Alert.Description.illegal_parameter: - n = "Illegal parameter."; - break; - case C.Alert.Description.unknown_ca: - n = "Unknown certificate authority."; - break; - case C.Alert.Description.access_denied: - n = "Access denied."; - break; - case C.Alert.Description.decode_error: - n = "Decode error."; - break; - case C.Alert.Description.decrypt_error: - n = "Decrypt error."; - break; - case C.Alert.Description.export_restriction: - n = "Export restriction."; - break; - case C.Alert.Description.protocol_version: - n = "Unsupported protocol version."; - break; - case C.Alert.Description.insufficient_security: - n = "Insufficient security."; - break; - case C.Alert.Description.internal_error: - n = "Internal error."; - break; - case C.Alert.Description.user_canceled: - n = "User canceled."; - break; - case C.Alert.Description.no_renegotiation: - n = "Renegotiation not supported."; - break; - default: - n = "Unknown error."; - break - } - if (r.description === C.Alert.Description.close_notify) return e.close(); - e.error(e, { - message: n, - send: !1, - origin: e.entity === C.ConnectionEnd.client ? "server" : "client", - alert: r - }), e.process() -}; -C.handleHandshake = function (e, t) { - var a = t.fragment, - r = a.getByte(), - n = a.getInt24(); - if (n > a.length()) return e.fragmented = t, t.fragment = M.util.createBuffer(), a.read -= 4, e.process(); - e.fragmented = null, a.read -= 4; - var i = a.bytes(n + 4); - a.read += 4, r in Ur[e.entity][e.expect] ? (e.entity === C.ConnectionEnd.server && !e.open && !e.fail && (e.handshaking = !0, e.session = { - version: null, - extensions: { - server_name: { - serverNameList: [] - } - }, - cipherSuite: null, - compressionMethod: null, - serverCertificate: null, - clientCertificate: null, - md5: M.md.md5.create(), - sha1: M.md.sha1.create() - }), r !== C.HandshakeType.hello_request && r !== C.HandshakeType.certificate_verify && r !== C.HandshakeType.finished && (e.session.md5.update(i), e.session.sha1.update(i)), Ur[e.entity][e.expect][r](e, t, n)) : C.handleUnexpected(e, t) -}; -C.handleApplicationData = function (e, t) { - e.data.putBuffer(t.fragment), e.dataReady(e), e.process() -}; -C.handleHeartbeat = function (e, t) { - var a = t.fragment, - r = a.getByte(), - n = a.getInt16(), - i = a.getBytes(n); - if (r === C.HeartbeatMessageType.heartbeat_request) { - if (e.handshaking || n > i.length) return e.process(); - C.queue(e, C.createRecord(e, { - type: C.ContentType.heartbeat, - data: C.createHeartbeat(C.HeartbeatMessageType.heartbeat_response, i) - })), C.flush(e) - } else if (r === C.HeartbeatMessageType.heartbeat_response) { - if (i !== e.expectedHeartbeatPayload) return e.process(); - e.heartbeatReceived && e.heartbeatReceived(e, M.util.createBuffer(i)) - } - e.process() -}; -var Au = 0, - Su = 1, - Ln = 2, - Tu = 3, - bu = 4, - Ai = 5, - Iu = 6, - _u = 7, - Du = 8, - Nu = 0, - Fu = 1, - Y0 = 2, - Ru = 3, - ya = 4, - wu = 5, - ku = 6, - y = C.handleUnexpected, - Si = C.handleChangeCipherSpec, - qe = C.handleAlert, - Xe = C.handleHandshake, - Ti = C.handleApplicationData, - ze = C.handleHeartbeat, - ga = []; -ga[C.ConnectionEnd.client] = [ - [y, qe, Xe, y, ze], - [y, qe, Xe, y, ze], - [y, qe, Xe, y, ze], - [y, qe, Xe, y, ze], - [y, qe, Xe, y, ze], - [Si, qe, y, y, ze], - [y, qe, Xe, y, ze], - [y, qe, Xe, Ti, ze], - [y, qe, Xe, y, ze] -]; -ga[C.ConnectionEnd.server] = [ - [y, qe, Xe, y, ze], - [y, qe, Xe, y, ze], - [y, qe, Xe, y, ze], - [y, qe, Xe, y, ze], - [Si, qe, y, y, ze], - [y, qe, Xe, y, ze], - [y, qe, Xe, Ti, ze], - [y, qe, Xe, y, ze] -]; -var Tt = C.handleHelloRequest, - Lu = C.handleServerHello, - bi = C.handleCertificate, - Un = C.handleServerKeyExchange, - L0 = C.handleCertificateRequest, - Sr = C.handleServerHelloDone, - Ii = C.handleFinished, - Ur = []; -Ur[C.ConnectionEnd.client] = [ - [y, y, Lu, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y], - [Tt, y, y, y, y, y, y, y, y, y, y, bi, Un, L0, Sr, y, y, y, y, y, y], - [Tt, y, y, y, y, y, y, y, y, y, y, y, Un, L0, Sr, y, y, y, y, y, y], - [Tt, y, y, y, y, y, y, y, y, y, y, y, y, L0, Sr, y, y, y, y, y, y], - [Tt, y, y, y, y, y, y, y, y, y, y, y, y, y, Sr, y, y, y, y, y, y], - [Tt, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y], - [Tt, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, Ii], - [Tt, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y], - [Tt, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y] -]; -var Uu = C.handleClientHello, - Pu = C.handleClientKeyExchange, - Vu = C.handleCertificateVerify; -Ur[C.ConnectionEnd.server] = [ - [y, Uu, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y], - [y, y, y, y, y, y, y, y, y, y, y, bi, y, y, y, y, y, y, y, y, y], - [y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, Pu, y, y, y, y], - [y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, Vu, y, y, y, y, y], - [y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y], - [y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, Ii], - [y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y], - [y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y, y] -]; -C.generateKeys = function (e, t) { - var a = $r, - r = t.client_random + t.server_random; - e.session.resuming || (t.master_secret = a(t.pre_master_secret, "master secret", r, 48).bytes(), t.pre_master_secret = null), r = t.server_random + t.client_random; - var n = 2 * t.mac_key_length + 2 * t.enc_key_length, - i = e.version.major === C.Versions.TLS_1_0.major && e.version.minor === C.Versions.TLS_1_0.minor; - i && (n += 2 * t.fixed_iv_length); - var s = a(t.master_secret, "key expansion", r, n), - o = { - client_write_MAC_key: s.getBytes(t.mac_key_length), - server_write_MAC_key: s.getBytes(t.mac_key_length), - client_write_key: s.getBytes(t.enc_key_length), - server_write_key: s.getBytes(t.enc_key_length) - }; - return i && (o.client_write_IV = s.getBytes(t.fixed_iv_length), o.server_write_IV = s.getBytes(t.fixed_iv_length)), o -}; -C.createConnectionState = function (e) { - var t = e.entity === C.ConnectionEnd.client, - a = function () { - var i = { - sequenceNumber: [0, 0], - macKey: null, - macLength: 0, - macFunction: null, - cipherState: null, - cipherFunction: function (s) { - return !0 - }, - compressionState: null, - compressFunction: function (s) { - return !0 - }, - updateSequenceNumber: function () { - i.sequenceNumber[1] === 4294967295 ? (i.sequenceNumber[1] = 0, ++i.sequenceNumber[0]) : ++i.sequenceNumber[1] - } - }; - return i - }, - r = { - read: a(), - write: a() - }; - if (r.read.update = function (i, s) { - return r.read.cipherFunction(s, r.read) ? r.read.compressFunction(i, s, r.read) || i.error(i, { - message: "Could not decompress record.", - send: !0, - alert: { - level: C.Alert.Level.fatal, - description: C.Alert.Description.decompression_failure - } - }) : i.error(i, { - message: "Could not decrypt record or bad MAC.", - send: !0, - alert: { - level: C.Alert.Level.fatal, - description: C.Alert.Description.bad_record_mac - } - }), !i.fail - }, r.write.update = function (i, s) { - return r.write.compressFunction(i, s, r.write) ? r.write.cipherFunction(s, r.write) || i.error(i, { - message: "Could not encrypt record.", - send: !1, - alert: { - level: C.Alert.Level.fatal, - description: C.Alert.Description.internal_error - } - }) : i.error(i, { - message: "Could not compress record.", - send: !1, - alert: { - level: C.Alert.Level.fatal, - description: C.Alert.Description.internal_error - } - }), !i.fail - }, e.session) { - var n = e.session.sp; - switch (e.session.cipherSuite.initSecurityParameters(n), n.keys = C.generateKeys(e, n), r.read.macKey = t ? n.keys.server_write_MAC_key : n.keys.client_write_MAC_key, r.write.macKey = t ? n.keys.client_write_MAC_key : n.keys.server_write_MAC_key, e.session.cipherSuite.initConnectionState(r, e, n), n.compression_algorithm) { - case C.CompressionMethod.none: - break; - case C.CompressionMethod.deflate: - r.read.compressFunction = Bu, r.write.compressFunction = mu; - break; - default: - throw new Error("Unsupported compression algorithm.") - } - } - return r -}; -C.createRandom = function () { - var e = new Date, - t = +e + e.getTimezoneOffset() * 6e4, - a = M.util.createBuffer(); - return a.putInt32(t), a.putBytes(M.random.getBytes(28)), a -}; -C.createRecord = function (e, t) { - if (!t.data) return null; - var a = { - type: t.type, - version: { - major: e.version.major, - minor: e.version.minor - }, - length: t.data.length(), - fragment: t.data - }; - return a -}; -C.createAlert = function (e, t) { - var a = M.util.createBuffer(); - return a.putByte(t.level), a.putByte(t.description), C.createRecord(e, { - type: C.ContentType.alert, - data: a - }) -}; -C.createClientHello = function (e) { - e.session.clientHelloVersion = { - major: e.version.major, - minor: e.version.minor - }; - for (var t = M.util.createBuffer(), a = 0; a < e.cipherSuites.length; ++a) { - var r = e.cipherSuites[a]; - t.putByte(r.id[0]), t.putByte(r.id[1]) - } - var n = t.length(), - i = M.util.createBuffer(); - i.putByte(C.CompressionMethod.none); - var s = i.length(), - o = M.util.createBuffer(); - if (e.virtualHost) { - var l = M.util.createBuffer(); - l.putByte(0), l.putByte(0); - var f = M.util.createBuffer(); - f.putByte(0), rt(f, 2, M.util.createBuffer(e.virtualHost)); - var u = M.util.createBuffer(); - rt(u, 2, f), rt(l, 2, u), o.putBuffer(l) - } - var c = o.length(); - c > 0 && (c += 2); - var h = e.session.id, - x = h.length + 1 + 2 + 4 + 28 + 2 + n + 1 + s + c, - d = M.util.createBuffer(); - return d.putByte(C.HandshakeType.client_hello), d.putInt24(x), d.putByte(e.version.major), d.putByte(e.version.minor), d.putBytes(e.session.sp.client_random), rt(d, 1, M.util.createBuffer(h)), rt(d, 2, t), rt(d, 1, i), c > 0 && rt(d, 2, o), d -}; -C.createServerHello = function (e) { - var t = e.session.id, - a = t.length + 1 + 2 + 4 + 28 + 2 + 1, - r = M.util.createBuffer(); - return r.putByte(C.HandshakeType.server_hello), r.putInt24(a), r.putByte(e.version.major), r.putByte(e.version.minor), r.putBytes(e.session.sp.server_random), rt(r, 1, M.util.createBuffer(t)), r.putByte(e.session.cipherSuite.id[0]), r.putByte(e.session.cipherSuite.id[1]), r.putByte(e.session.compressionMethod), r -}; -C.createCertificate = function (e) { - var t = e.entity === C.ConnectionEnd.client, - a = null; - if (e.getCertificate) { - var r; - t ? r = e.session.certificateRequest : r = e.session.extensions.server_name.serverNameList, a = e.getCertificate(e, r) - } - var n = M.util.createBuffer(); - if (a !== null) try { - M.util.isArray(a) || (a = [a]); - for (var i = null, s = 0; s < a.length; ++s) { - var o = M.pem.decode(a[s])[0]; - if (o.type !== "CERTIFICATE" && o.type !== "X509 CERTIFICATE" && o.type !== "TRUSTED CERTIFICATE") { - var l = new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'); - throw l.headerType = o.type, l - } - if (o.procType && o.procType.type === "ENCRYPTED") throw new Error("Could not convert certificate from PEM; PEM is encrypted."); - var f = M.util.createBuffer(o.body); - i === null && (i = M.asn1.fromDer(f.bytes(), !1)); - var u = M.util.createBuffer(); - rt(u, 3, f), n.putBuffer(u) - } - a = M.pki.certificateFromAsn1(i), t ? e.session.clientCertificate = a : e.session.serverCertificate = a - } catch (x) { - return e.error(e, { - message: "Could not send certificate list.", - cause: x, - send: !0, - alert: { - level: C.Alert.Level.fatal, - description: C.Alert.Description.bad_certificate - } - }) - } - var c = 3 + n.length(), - h = M.util.createBuffer(); - return h.putByte(C.HandshakeType.certificate), h.putInt24(c), rt(h, 3, n), h -}; -C.createClientKeyExchange = function (e) { - var t = M.util.createBuffer(); - t.putByte(e.session.clientHelloVersion.major), t.putByte(e.session.clientHelloVersion.minor), t.putBytes(M.random.getBytes(46)); - var a = e.session.sp; - a.pre_master_secret = t.getBytes(); - var r = e.session.serverCertificate.publicKey; - t = r.encrypt(a.pre_master_secret); - var n = t.length + 2, - i = M.util.createBuffer(); - return i.putByte(C.HandshakeType.client_key_exchange), i.putInt24(n), i.putInt16(t.length), i.putBytes(t), i -}; -C.createServerKeyExchange = function (e) { - var t = M.util.createBuffer(); - return t -}; -C.getClientSignature = function (e, t) { - var a = M.util.createBuffer(); - a.putBuffer(e.session.md5.digest()), a.putBuffer(e.session.sha1.digest()), a = a.getBytes(), e.getSignature = e.getSignature || function (r, n, i) { - var s = null; - if (r.getPrivateKey) try { - s = r.getPrivateKey(r, r.session.clientCertificate), s = M.pki.privateKeyFromPem(s) - } catch (o) { - r.error(r, { - message: "Could not get private key.", - cause: o, - send: !0, - alert: { - level: C.Alert.Level.fatal, - description: C.Alert.Description.internal_error - } - }) - } - s === null ? r.error(r, { - message: "No private key set.", - send: !0, - alert: { - level: C.Alert.Level.fatal, - description: C.Alert.Description.internal_error - } - }) : n = s.sign(n, null), i(r, n) - }, e.getSignature(e, a, t) -}; -C.createCertificateVerify = function (e, t) { - var a = t.length + 2, - r = M.util.createBuffer(); - return r.putByte(C.HandshakeType.certificate_verify), r.putInt24(a), r.putInt16(t.length), r.putBytes(t), r -}; -C.createCertificateRequest = function (e) { - var t = M.util.createBuffer(); - t.putByte(1); - var a = M.util.createBuffer(); - for (var r in e.caStore.certs) { - var n = e.caStore.certs[r], - i = M.pki.distinguishedNameToAsn1(n.subject), - s = M.asn1.toDer(i); - a.putInt16(s.length()), a.putBuffer(s) - } - var o = 1 + t.length() + 2 + a.length(), - l = M.util.createBuffer(); - return l.putByte(C.HandshakeType.certificate_request), l.putInt24(o), rt(l, 1, t), rt(l, 2, a), l -}; -C.createServerHelloDone = function (e) { - var t = M.util.createBuffer(); - return t.putByte(C.HandshakeType.server_hello_done), t.putInt24(0), t -}; -C.createChangeCipherSpec = function () { - var e = M.util.createBuffer(); - return e.putByte(1), e -}; -C.createFinished = function (e) { - var t = M.util.createBuffer(); - t.putBuffer(e.session.md5.digest()), t.putBuffer(e.session.sha1.digest()); - var a = e.entity === C.ConnectionEnd.client, - r = e.session.sp, - n = 12, - i = $r, - s = a ? "client finished" : "server finished"; - t = i(r.master_secret, s, t.getBytes(), n); - var o = M.util.createBuffer(); - return o.putByte(C.HandshakeType.finished), o.putInt24(t.length()), o.putBuffer(t), o -}; -C.createHeartbeat = function (e, t, a) { - typeof a > "u" && (a = t.length); - var r = M.util.createBuffer(); - r.putByte(e), r.putInt16(a), r.putBytes(t); - var n = r.length(), - i = Math.max(16, n - a - 3); - return r.putBytes(M.random.getBytes(i)), r -}; -C.queue = function (e, t) { - if (t && !(t.fragment.length() === 0 && (t.type === C.ContentType.handshake || t.type === C.ContentType.alert || t.type === C.ContentType.change_cipher_spec))) { - if (t.type === C.ContentType.handshake) { - var a = t.fragment.bytes(); - e.session.md5.update(a), e.session.sha1.update(a), a = null - } - var r; - if (t.fragment.length() <= C.MaxFragment) r = [t]; - else { - r = []; - for (var n = t.fragment.bytes(); n.length > C.MaxFragment;) r.push(C.createRecord(e, { - type: t.type, - data: M.util.createBuffer(n.slice(0, C.MaxFragment)) - })), n = n.slice(C.MaxFragment); - n.length > 0 && r.push(C.createRecord(e, { - type: t.type, - data: M.util.createBuffer(n) - })) - } - for (var i = 0; i < r.length && !e.fail; ++i) { - var s = r[i], - o = e.state.current.write; - o.update(e, s) && e.records.push(s) - } - } -}; -C.flush = function (e) { - for (var t = 0; t < e.records.length; ++t) { - var a = e.records[t]; - e.tlsData.putByte(a.type), e.tlsData.putByte(a.version.major), e.tlsData.putByte(a.version.minor), e.tlsData.putInt16(a.fragment.length()), e.tlsData.putBuffer(e.records[t].fragment) - } - return e.records = [], e.tlsDataReady(e) -}; -var U0 = function (e) { - switch (e) { - case !0: - return !0; - case M.pki.certificateError.bad_certificate: - return C.Alert.Description.bad_certificate; - case M.pki.certificateError.unsupported_certificate: - return C.Alert.Description.unsupported_certificate; - case M.pki.certificateError.certificate_revoked: - return C.Alert.Description.certificate_revoked; - case M.pki.certificateError.certificate_expired: - return C.Alert.Description.certificate_expired; - case M.pki.certificateError.certificate_unknown: - return C.Alert.Description.certificate_unknown; - case M.pki.certificateError.unknown_ca: - return C.Alert.Description.unknown_ca; - default: - return C.Alert.Description.bad_certificate - } - }, - Ou = function (e) { - switch (e) { - case !0: - return !0; - case C.Alert.Description.bad_certificate: - return M.pki.certificateError.bad_certificate; - case C.Alert.Description.unsupported_certificate: - return M.pki.certificateError.unsupported_certificate; - case C.Alert.Description.certificate_revoked: - return M.pki.certificateError.certificate_revoked; - case C.Alert.Description.certificate_expired: - return M.pki.certificateError.certificate_expired; - case C.Alert.Description.certificate_unknown: - return M.pki.certificateError.certificate_unknown; - case C.Alert.Description.unknown_ca: - return M.pki.certificateError.unknown_ca; - default: - return M.pki.certificateError.bad_certificate - } - }; -C.verifyCertificateChain = function (e, t) { - try { - var a = {}; - for (var r in e.verifyOptions) a[r] = e.verifyOptions[r]; - a.verify = function (i, s, o) { - var l = U0(i), - f = e.verify(e, i, s, o); - if (f !== !0) { - if (typeof f == "object" && !M.util.isArray(f)) { - var u = new Error("The application rejected the certificate."); - throw u.send = !0, u.alert = { - level: C.Alert.Level.fatal, - description: C.Alert.Description.bad_certificate - }, f.message && (u.message = f.message), f.alert && (u.alert.description = f.alert), u - } - f !== i && (f = Ou(f)) - } - return f - }, M.pki.verifyCertificateChain(e.caStore, t, a) - } catch (i) { - var n = i; - (typeof n != "object" || M.util.isArray(n)) && (n = { - send: !0, - alert: { - level: C.Alert.Level.fatal, - description: U0(i) - } - }), "send" in n || (n.send = !0), "alert" in n || (n.alert = { - level: C.Alert.Level.fatal, - description: U0(n.error) - }), e.error(e, n) - } - return !e.fail -}; -C.createSessionCache = function (e, t) { - var a = null; - if (e && e.getSession && e.setSession && e.order) a = e; - else { - a = {}, a.cache = e || {}, a.capacity = Math.max(t || 100, 1), a.order = []; - for (var r in e) a.order.length <= t ? a.order.push(r) : delete e[r]; - a.getSession = function (n) { - var i = null, - s = null; - if (n ? s = M.util.bytesToHex(n) : a.order.length > 0 && (s = a.order[0]), s !== null && s in a.cache) { - i = a.cache[s], delete a.cache[s]; - for (var o in a.order) - if (a.order[o] === s) { - a.order.splice(o, 1); - break - } - } - return i - }, a.setSession = function (n, i) { - if (a.order.length === a.capacity) { - var s = a.order.shift(); - delete a.cache[s] - } - var s = M.util.bytesToHex(n); - a.order.push(s), a.cache[s] = i - } - } - return a -}; -C.createConnection = function (e) { - var t = null; - e.caStore ? M.util.isArray(e.caStore) ? t = M.pki.createCaStore(e.caStore) : t = e.caStore : t = M.pki.createCaStore(); - var a = e.cipherSuites || null; - if (a === null) { - a = []; - for (var r in C.CipherSuites) a.push(C.CipherSuites[r]) - } - var n = e.server ? C.ConnectionEnd.server : C.ConnectionEnd.client, - i = e.sessionCache ? C.createSessionCache(e.sessionCache) : null, - s = { - version: { - major: C.Version.major, - minor: C.Version.minor - }, - entity: n, - sessionId: e.sessionId, - caStore: t, - sessionCache: i, - cipherSuites: a, - connected: e.connected, - virtualHost: e.virtualHost || null, - verifyClient: e.verifyClient || !1, - verify: e.verify || function (u, c, h, x) { - return c - }, - verifyOptions: e.verifyOptions || {}, - getCertificate: e.getCertificate || null, - getPrivateKey: e.getPrivateKey || null, - getSignature: e.getSignature || null, - input: M.util.createBuffer(), - tlsData: M.util.createBuffer(), - data: M.util.createBuffer(), - tlsDataReady: e.tlsDataReady, - dataReady: e.dataReady, - heartbeatReceived: e.heartbeatReceived, - closed: e.closed, - error: function (u, c) { - c.origin = c.origin || (u.entity === C.ConnectionEnd.client ? "client" : "server"), c.send && (C.queue(u, C.createAlert(u, c.alert)), C.flush(u)); - var h = c.fatal !== !1; - h && (u.fail = !0), e.error(u, c), h && u.close(!1) - }, - deflate: e.deflate || null, - inflate: e.inflate || null - }; - s.reset = function (u) { - s.version = { - major: C.Version.major, - minor: C.Version.minor - }, s.record = null, s.session = null, s.peerCertificate = null, s.state = { - pending: null, - current: null - }, s.expect = s.entity === C.ConnectionEnd.client ? Au : Nu, s.fragmented = null, s.records = [], s.open = !1, s.handshakes = 0, s.handshaking = !1, s.isConnected = !1, s.fail = !(u || typeof u > "u"), s.input.clear(), s.tlsData.clear(), s.data.clear(), s.state.current = C.createConnectionState(s) - }, s.reset(); - var o = function (u, c) { - var h = c.type - C.ContentType.change_cipher_spec, - x = ga[u.entity][u.expect]; - h in x ? x[h](u, c) : C.handleUnexpected(u, c) - }, - l = function (u) { - var c = 0, - h = u.input, - x = h.length(); - if (x < 5) c = 5 - x; - else { - u.record = { - type: h.getByte(), - version: { - major: h.getByte(), - minor: h.getByte() - }, - length: h.getInt16(), - fragment: M.util.createBuffer(), - ready: !1 - }; - var d = u.record.version.major === u.version.major; - d && u.session && u.session.version && (d = u.record.version.minor === u.version.minor), d || u.error(u, { - message: "Incompatible TLS version.", - send: !0, - alert: { - level: C.Alert.Level.fatal, - description: C.Alert.Description.protocol_version - } - }) - } - return c - }, - f = function (u) { - var c = 0, - h = u.input, - x = h.length(); - if (x < u.record.length) c = u.record.length - x; - else { - u.record.fragment.putBytes(h.getBytes(u.record.length)), h.compact(); - var d = u.state.current.read; - d.update(u, u.record) && (u.fragmented !== null && (u.fragmented.type === u.record.type ? (u.fragmented.fragment.putBuffer(u.record.fragment), u.record = u.fragmented) : u.error(u, { - message: "Invalid fragmented record.", - send: !0, - alert: { - level: C.Alert.Level.fatal, - description: C.Alert.Description.unexpected_message - } - })), u.record.ready = !0) - } - return c - }; - return s.handshake = function (u) { - if (s.entity !== C.ConnectionEnd.client) s.error(s, { - message: "Cannot initiate handshake as a server.", - fatal: !1 - }); - else if (s.handshaking) s.error(s, { - message: "Handshake already in progress.", - fatal: !1 - }); - else { - s.fail && !s.open && s.handshakes === 0 && (s.fail = !1), s.handshaking = !0, u = u || ""; - var c = null; - u.length > 0 && (s.sessionCache && (c = s.sessionCache.getSession(u)), c === null && (u = "")), u.length === 0 && s.sessionCache && (c = s.sessionCache.getSession(), c !== null && (u = c.id)), s.session = { - id: u, - version: null, - cipherSuite: null, - compressionMethod: null, - serverCertificate: null, - certificateRequest: null, - clientCertificate: null, - sp: {}, - md5: M.md.md5.create(), - sha1: M.md.sha1.create() - }, c && (s.version = c.version, s.session.sp = c.sp), s.session.sp.client_random = C.createRandom().getBytes(), s.open = !0, C.queue(s, C.createRecord(s, { - type: C.ContentType.handshake, - data: C.createClientHello(s) - })), C.flush(s) - } - }, s.process = function (u) { - var c = 0; - return u && s.input.putBytes(u), s.fail || (s.record !== null && s.record.ready && s.record.fragment.isEmpty() && (s.record = null), s.record === null && (c = l(s)), !s.fail && s.record !== null && !s.record.ready && (c = f(s)), !s.fail && s.record !== null && s.record.ready && o(s, s.record)), c - }, s.prepare = function (u) { - return C.queue(s, C.createRecord(s, { - type: C.ContentType.application_data, - data: M.util.createBuffer(u) - })), C.flush(s) - }, s.prepareHeartbeatRequest = function (u, c) { - return u instanceof M.util.ByteBuffer && (u = u.bytes()), typeof c > "u" && (c = u.length), s.expectedHeartbeatPayload = u, C.queue(s, C.createRecord(s, { - type: C.ContentType.heartbeat, - data: C.createHeartbeat(C.HeartbeatMessageType.heartbeat_request, u, c) - })), C.flush(s) - }, s.close = function (u) { - if (!s.fail && s.sessionCache && s.session) { - var c = { - id: s.session.id, - version: s.session.version, - sp: s.session.sp - }; - c.sp.keys = null, s.sessionCache.setSession(c.id, c) - } - s.open && (s.open = !1, s.input.clear(), (s.isConnected || s.handshaking) && (s.isConnected = s.handshaking = !1, C.queue(s, C.createAlert(s, { - level: C.Alert.Level.warning, - description: C.Alert.Description.close_notify - })), C.flush(s)), s.closed(s)), s.reset(u) - }, s -}; -M.tls = M.tls || {}; -for (var P0 in C) typeof C[P0] != "function" && (M.tls[P0] = C[P0]); -M.tls.prf_tls1 = $r; -M.tls.hmac_sha1 = Eu; -M.tls.createSessionCache = C.createSessionCache; -M.tls.createConnection = C.createConnection; -var Ft = le, - st = Ft.tls; -st.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA = { - id: [0, 47], - name: "TLS_RSA_WITH_AES_128_CBC_SHA", - initSecurityParameters: function (e) { - e.bulk_cipher_algorithm = st.BulkCipherAlgorithm.aes, e.cipher_type = st.CipherType.block, e.enc_key_length = 16, e.block_length = 16, e.fixed_iv_length = 16, e.record_iv_length = 16, e.mac_algorithm = st.MACAlgorithm.hmac_sha1, e.mac_length = 20, e.mac_key_length = 20 - }, - initConnectionState: _i -}; -st.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA = { - id: [0, 53], - name: "TLS_RSA_WITH_AES_256_CBC_SHA", - initSecurityParameters: function (e) { - e.bulk_cipher_algorithm = st.BulkCipherAlgorithm.aes, e.cipher_type = st.CipherType.block, e.enc_key_length = 32, e.block_length = 16, e.fixed_iv_length = 16, e.record_iv_length = 16, e.mac_algorithm = st.MACAlgorithm.hmac_sha1, e.mac_length = 20, e.mac_key_length = 20 - }, - initConnectionState: _i -}; - -function _i(e, t, a) { - var r = t.entity === Ft.tls.ConnectionEnd.client; - e.read.cipherState = { - init: !1, - cipher: Ft.cipher.createDecipher("AES-CBC", r ? a.keys.server_write_key : a.keys.client_write_key), - iv: r ? a.keys.server_write_IV : a.keys.client_write_IV - }, e.write.cipherState = { - init: !1, - cipher: Ft.cipher.createCipher("AES-CBC", r ? a.keys.client_write_key : a.keys.server_write_key), - iv: r ? a.keys.client_write_IV : a.keys.server_write_IV - }, e.read.cipherFunction = qu, e.write.cipherFunction = Ku, e.read.macLength = e.write.macLength = a.mac_length, e.read.macFunction = e.write.macFunction = st.hmac_sha1 -} - -function Ku(e, t) { - var a = !1, - r = t.macFunction(t.macKey, t.sequenceNumber, e); - e.fragment.putBytes(r), t.updateSequenceNumber(); - var n; - e.version.minor === st.Versions.TLS_1_0.minor ? n = t.cipherState.init ? null : t.cipherState.iv : n = Ft.random.getBytesSync(16), t.cipherState.init = !0; - var i = t.cipherState.cipher; - return i.start({ - iv: n - }), e.version.minor >= st.Versions.TLS_1_1.minor && i.output.putBytes(n), i.update(e.fragment), i.finish(Hu) && (e.fragment = i.output, e.length = e.fragment.length(), a = !0), a -} - -function Hu(e, t, a) { - if (!a) { - var r = e - t.length() % e; - t.fillWithByte(r - 1, r) - } - return !0 -} - -function Mu(e, t, a) { - var r = !0; - if (a) { - for (var n = t.length(), i = t.last(), s = n - 1 - i; s < n - 1; ++s) r = r && t.at(s) == i; - r && t.truncate(i + 1) - } - return r -} - -function qu(e, t) { - var a = !1, - r; - e.version.minor === st.Versions.TLS_1_0.minor ? r = t.cipherState.init ? null : t.cipherState.iv : r = e.fragment.getBytes(16), t.cipherState.init = !0; - var n = t.cipherState.cipher; - n.start({ - iv: r - }), n.update(e.fragment), a = n.finish(Mu); - var i = t.macLength, - s = Ft.random.getBytesSync(i), - o = n.output.length(); - o >= i ? (e.fragment = n.output.getBytes(o - i), s = n.output.getBytes(i)) : e.fragment = n.output.getBytes(), e.fragment = Ft.util.createBuffer(e.fragment), e.length = e.fragment.length(); - var l = t.macFunction(t.macKey, t.sequenceNumber, e); - return t.updateSequenceNumber(), a = zu(t.macKey, s, l) && a, a -} - -function zu(e, t, a) { - var r = Ft.hmac.create(); - return r.start("SHA1", e), r.update(t), t = r.digest().getBytes(), r.start(null, null), r.update(a), a = r.digest().getBytes(), t === a -} -var De = le, - Er = De.sha512 = De.sha512 || {}; -De.md.sha512 = De.md.algorithms.sha512 = Er; -var Di = De.sha384 = De.sha512.sha384 = De.sha512.sha384 || {}; -Di.create = function () { - return Er.create("SHA-384") -}; -De.md.sha384 = De.md.algorithms.sha384 = Di; -De.sha512.sha256 = De.sha512.sha256 || { - create: function () { - return Er.create("SHA-512/256") - } -}; -De.md["sha512/256"] = De.md.algorithms["sha512/256"] = De.sha512.sha256; -De.sha512.sha224 = De.sha512.sha224 || { - create: function () { - return Er.create("SHA-512/224") - } -}; -De.md["sha512/224"] = De.md.algorithms["sha512/224"] = De.sha512.sha224; -Er.create = function (e) { - if (Ni || Gu(), typeof e > "u" && (e = "SHA-512"), !(e in Pt)) throw new Error("Invalid SHA-512 algorithm: " + e); - for (var t = Pt[e], a = null, r = De.util.createBuffer(), n = new Array(80), i = 0; i < 80; ++i) n[i] = new Array(2); - var s = 64; - switch (e) { - case "SHA-384": - s = 48; - break; - case "SHA-512/256": - s = 32; - break; - case "SHA-512/224": - s = 28; - break - } - var o = { - algorithm: e.replace("-", "").toLowerCase(), - blockLength: 128, - digestLength: s, - messageLength: 0, - fullMessageLength: null, - messageLengthSize: 16 - }; - return o.start = function () { - o.messageLength = 0, o.fullMessageLength = o.messageLength128 = []; - for (var l = o.messageLengthSize / 4, f = 0; f < l; ++f) o.fullMessageLength.push(0); - r = De.util.createBuffer(), a = new Array(t.length); - for (var f = 0; f < t.length; ++f) a[f] = t[f].slice(0); - return o - }, o.start(), o.update = function (l, f) { - f === "utf8" && (l = De.util.encodeUtf8(l)); - var u = l.length; - o.messageLength += u, u = [u / 4294967296 >>> 0, u >>> 0]; - for (var c = o.fullMessageLength.length - 1; c >= 0; --c) o.fullMessageLength[c] += u[1], u[1] = u[0] + (o.fullMessageLength[c] / 4294967296 >>> 0), o.fullMessageLength[c] = o.fullMessageLength[c] >>> 0, u[0] = u[1] / 4294967296 >>> 0; - return r.putBytes(l), Pn(a, n, r), (r.read > 2048 || r.length() === 0) && r.compact(), o - }, o.digest = function () { - var l = De.util.createBuffer(); - l.putBytes(r.bytes()); - var f = o.fullMessageLength[o.fullMessageLength.length - 1] + o.messageLengthSize, - u = f & o.blockLength - 1; - l.putBytes($0.substr(0, o.blockLength - u)); - for (var c, h, x = o.fullMessageLength[0] * 8, d = 0; d < o.fullMessageLength.length - 1; ++d) c = o.fullMessageLength[d + 1] * 8, h = c / 4294967296 >>> 0, x += h, l.putInt32(x >>> 0), x = c >>> 0; - l.putInt32(x); - for (var g = new Array(a.length), d = 0; d < a.length; ++d) g[d] = a[d].slice(0); - Pn(g, n, l); - var v = De.util.createBuffer(), - B; - e === "SHA-512" ? B = g.length : e === "SHA-384" ? B = g.length - 2 : B = g.length - 4; - for (var d = 0; d < B; ++d) v.putInt32(g[d][0]), (d !== B - 1 || e !== "SHA-512/224") && v.putInt32(g[d][1]); - return v - }, o -}; -var $0 = null, - Ni = !1, - j0 = null, - Pt = null; - -function Gu() { - $0 = "€", $0 += De.util.fillString("\0", 128), j0 = [ - [1116352408, 3609767458], - [1899447441, 602891725], - [3049323471, 3964484399], - [3921009573, 2173295548], - [961987163, 4081628472], - [1508970993, 3053834265], - [2453635748, 2937671579], - [2870763221, 3664609560], - [3624381080, 2734883394], - [310598401, 1164996542], - [607225278, 1323610764], - [1426881987, 3590304994], - [1925078388, 4068182383], - [2162078206, 991336113], - [2614888103, 633803317], - [3248222580, 3479774868], - [3835390401, 2666613458], - [4022224774, 944711139], - [264347078, 2341262773], - [604807628, 2007800933], - [770255983, 1495990901], - [1249150122, 1856431235], - [1555081692, 3175218132], - [1996064986, 2198950837], - [2554220882, 3999719339], - [2821834349, 766784016], - [2952996808, 2566594879], - [3210313671, 3203337956], - [3336571891, 1034457026], - [3584528711, 2466948901], - [113926993, 3758326383], - [338241895, 168717936], - [666307205, 1188179964], - [773529912, 1546045734], - [1294757372, 1522805485], - [1396182291, 2643833823], - [1695183700, 2343527390], - [1986661051, 1014477480], - [2177026350, 1206759142], - [2456956037, 344077627], - [2730485921, 1290863460], - [2820302411, 3158454273], - [3259730800, 3505952657], - [3345764771, 106217008], - [3516065817, 3606008344], - [3600352804, 1432725776], - [4094571909, 1467031594], - [275423344, 851169720], - [430227734, 3100823752], - [506948616, 1363258195], - [659060556, 3750685593], - [883997877, 3785050280], - [958139571, 3318307427], - [1322822218, 3812723403], - [1537002063, 2003034995], - [1747873779, 3602036899], - [1955562222, 1575990012], - [2024104815, 1125592928], - [2227730452, 2716904306], - [2361852424, 442776044], - [2428436474, 593698344], - [2756734187, 3733110249], - [3204031479, 2999351573], - [3329325298, 3815920427], - [3391569614, 3928383900], - [3515267271, 566280711], - [3940187606, 3454069534], - [4118630271, 4000239992], - [116418474, 1914138554], - [174292421, 2731055270], - [289380356, 3203993006], - [460393269, 320620315], - [685471733, 587496836], - [852142971, 1086792851], - [1017036298, 365543100], - [1126000580, 2618297676], - [1288033470, 3409855158], - [1501505948, 4234509866], - [1607167915, 987167468], - [1816402316, 1246189591] - ], Pt = {}, Pt["SHA-512"] = [ - [1779033703, 4089235720], - [3144134277, 2227873595], - [1013904242, 4271175723], - [2773480762, 1595750129], - [1359893119, 2917565137], - [2600822924, 725511199], - [528734635, 4215389547], - [1541459225, 327033209] - ], Pt["SHA-384"] = [ - [3418070365, 3238371032], - [1654270250, 914150663], - [2438529370, 812702999], - [355462360, 4144912697], - [1731405415, 4290775857], - [2394180231, 1750603025], - [3675008525, 1694076839], - [1203062813, 3204075428] - ], Pt["SHA-512/256"] = [ - [573645204, 4230739756], - [2673172387, 3360449730], - [596883563, 1867755857], - [2520282905, 1497426621], - [2519219938, 2827943907], - [3193839141, 1401305490], - [721525244, 746961066], - [246885852, 2177182882] - ], Pt["SHA-512/224"] = [ - [2352822216, 424955298], - [1944164710, 2312950998], - [502970286, 855612546], - [1738396948, 1479516111], - [258812777, 2077511080], - [2011393907, 79989058], - [1067287976, 1780299464], - [286451373, 2446758561] - ], Ni = !0 -} - -function Pn(e, t, a) { - for (var r, n, i, s, o, l, f, u, c, h, x, d, g, v, B, E, m, A, T, S, N, w, K, D, F, U, P, Z, W, J, Q, ce, ge, ne, k, O = a.length(); O >= 128;) { - for (W = 0; W < 16; ++W) t[W][0] = a.getInt32() >>> 0, t[W][1] = a.getInt32() >>> 0; - for (; W < 80; ++W) ce = t[W - 2], J = ce[0], Q = ce[1], r = ((J >>> 19 | Q << 13) ^ (Q >>> 29 | J << 3) ^ J >>> 6) >>> 0, n = ((J << 13 | Q >>> 19) ^ (Q << 3 | J >>> 29) ^ (J << 26 | Q >>> 6)) >>> 0, ne = t[W - 15], J = ne[0], Q = ne[1], i = ((J >>> 1 | Q << 31) ^ (J >>> 8 | Q << 24) ^ J >>> 7) >>> 0, s = ((J << 31 | Q >>> 1) ^ (J << 24 | Q >>> 8) ^ (J << 25 | Q >>> 7)) >>> 0, ge = t[W - 7], k = t[W - 16], Q = n + ge[1] + s + k[1], t[W][0] = r + ge[0] + i + k[0] + (Q / 4294967296 >>> 0) >>> 0, t[W][1] = Q >>> 0; - for (g = e[0][0], v = e[0][1], B = e[1][0], E = e[1][1], m = e[2][0], A = e[2][1], T = e[3][0], S = e[3][1], N = e[4][0], w = e[4][1], K = e[5][0], D = e[5][1], F = e[6][0], U = e[6][1], P = e[7][0], Z = e[7][1], W = 0; W < 80; ++W) f = ((N >>> 14 | w << 18) ^ (N >>> 18 | w << 14) ^ (w >>> 9 | N << 23)) >>> 0, u = ((N << 18 | w >>> 14) ^ (N << 14 | w >>> 18) ^ (w << 23 | N >>> 9)) >>> 0, c = (F ^ N & (K ^ F)) >>> 0, h = (U ^ w & (D ^ U)) >>> 0, o = ((g >>> 28 | v << 4) ^ (v >>> 2 | g << 30) ^ (v >>> 7 | g << 25)) >>> 0, l = ((g << 4 | v >>> 28) ^ (v << 30 | g >>> 2) ^ (v << 25 | g >>> 7)) >>> 0, x = (g & B | m & (g ^ B)) >>> 0, d = (v & E | A & (v ^ E)) >>> 0, Q = Z + u + h + j0[W][1] + t[W][1], r = P + f + c + j0[W][0] + t[W][0] + (Q / 4294967296 >>> 0) >>> 0, n = Q >>> 0, Q = l + d, i = o + x + (Q / 4294967296 >>> 0) >>> 0, s = Q >>> 0, P = F, Z = U, F = K, U = D, K = N, D = w, Q = S + n, N = T + r + (Q / 4294967296 >>> 0) >>> 0, w = Q >>> 0, T = m, S = A, m = B, A = E, B = g, E = v, Q = n + s, g = r + i + (Q / 4294967296 >>> 0) >>> 0, v = Q >>> 0; - Q = e[0][1] + v, e[0][0] = e[0][0] + g + (Q / 4294967296 >>> 0) >>> 0, e[0][1] = Q >>> 0, Q = e[1][1] + E, e[1][0] = e[1][0] + B + (Q / 4294967296 >>> 0) >>> 0, e[1][1] = Q >>> 0, Q = e[2][1] + A, e[2][0] = e[2][0] + m + (Q / 4294967296 >>> 0) >>> 0, e[2][1] = Q >>> 0, Q = e[3][1] + S, e[3][0] = e[3][0] + T + (Q / 4294967296 >>> 0) >>> 0, e[3][1] = Q >>> 0, Q = e[4][1] + w, e[4][0] = e[4][0] + N + (Q / 4294967296 >>> 0) >>> 0, e[4][1] = Q >>> 0, Q = e[5][1] + D, e[5][0] = e[5][0] + K + (Q / 4294967296 >>> 0) >>> 0, e[5][1] = Q >>> 0, Q = e[6][1] + U, e[6][0] = e[6][0] + F + (Q / 4294967296 >>> 0) >>> 0, e[6][1] = Q >>> 0, Q = e[7][1] + Z, e[7][0] = e[7][0] + P + (Q / 4294967296 >>> 0) >>> 0, e[7][1] = Q >>> 0, O -= 128 - } -} -var Ca = {}, - Qu = le, - Oe = Qu.asn1; -Ca.privateKeyValidator = { - name: "PrivateKeyInfo", - tagClass: Oe.Class.UNIVERSAL, - type: Oe.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "PrivateKeyInfo.version", - tagClass: Oe.Class.UNIVERSAL, - type: Oe.Type.INTEGER, - constructed: !1, - capture: "privateKeyVersion" - }, { - name: "PrivateKeyInfo.privateKeyAlgorithm", - tagClass: Oe.Class.UNIVERSAL, - type: Oe.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "AlgorithmIdentifier.algorithm", - tagClass: Oe.Class.UNIVERSAL, - type: Oe.Type.OID, - constructed: !1, - capture: "privateKeyOid" - }] - }, { - name: "PrivateKeyInfo", - tagClass: Oe.Class.UNIVERSAL, - type: Oe.Type.OCTETSTRING, - constructed: !1, - capture: "privateKey" - }] -}; -Ca.publicKeyValidator = { - name: "SubjectPublicKeyInfo", - tagClass: Oe.Class.UNIVERSAL, - type: Oe.Type.SEQUENCE, - constructed: !0, - captureAsn1: "subjectPublicKeyInfo", - value: [{ - name: "SubjectPublicKeyInfo.AlgorithmIdentifier", - tagClass: Oe.Class.UNIVERSAL, - type: Oe.Type.SEQUENCE, - constructed: !0, - value: [{ - name: "AlgorithmIdentifier.algorithm", - tagClass: Oe.Class.UNIVERSAL, - type: Oe.Type.OID, - constructed: !1, - capture: "publicKeyOid" - }] - }, { - tagClass: Oe.Class.UNIVERSAL, - type: Oe.Type.BITSTRING, - constructed: !1, - composed: !0, - captureBitStringValue: "ed25519PublicKey" - }] -}; -var Ge = le, - Fi = Ca, - Wu = Fi.publicKeyValidator, - Xu = Fi.privateKeyValidator; -if (typeof Yu > "u") var Yu = Ge.jsbn.BigInteger; -var Z0 = Ge.util.ByteBuffer, - je = typeof Buffer > "u" ? Uint8Array : Buffer; -Ge.pki = Ge.pki || {}; -Ge.pki.ed25519 = Ge.ed25519 = Ge.ed25519 || {}; -var de = Ge.ed25519; -de.constants = {}; -de.constants.PUBLIC_KEY_BYTE_LENGTH = 32; -de.constants.PRIVATE_KEY_BYTE_LENGTH = 64; -de.constants.SEED_BYTE_LENGTH = 32; -de.constants.SIGN_BYTE_LENGTH = 64; -de.constants.HASH_BYTE_LENGTH = 64; -de.generateKeyPair = function (e) { - e = e || {}; - var t = e.seed; - if (t === void 0) t = Ge.random.getBytesSync(de.constants.SEED_BYTE_LENGTH); - else if (typeof t == "string") { - if (t.length !== de.constants.SEED_BYTE_LENGTH) throw new TypeError('"seed" must be ' + de.constants.SEED_BYTE_LENGTH + " bytes in length.") - } else if (!(t instanceof Uint8Array)) throw new TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.'); - t = mt({ - message: t, - encoding: "binary" - }); - for (var a = new je(de.constants.PUBLIC_KEY_BYTE_LENGTH), r = new je(de.constants.PRIVATE_KEY_BYTE_LENGTH), n = 0; n < 32; ++n) r[n] = t[n]; - return Ju(a, r), { - publicKey: a, - privateKey: r - } -}; -de.privateKeyFromAsn1 = function (e) { - var t = {}, - a = [], - r = Ge.asn1.validate(e, Xu, t, a); - if (!r) { - var n = new Error("Invalid Key."); - throw n.errors = a, n - } - var i = Ge.asn1.derToOid(t.privateKeyOid), - s = Ge.oids.EdDSA25519; - if (i !== s) throw new Error('Invalid OID "' + i + '"; OID must be "' + s + '".'); - var o = t.privateKey, - l = mt({ - message: Ge.asn1.fromDer(o).value, - encoding: "binary" - }); - return { - privateKeyBytes: l - } -}; -de.publicKeyFromAsn1 = function (e) { - var t = {}, - a = [], - r = Ge.asn1.validate(e, Wu, t, a); - if (!r) { - var n = new Error("Invalid Key."); - throw n.errors = a, n - } - var i = Ge.asn1.derToOid(t.publicKeyOid), - s = Ge.oids.EdDSA25519; - if (i !== s) throw new Error('Invalid OID "' + i + '"; OID must be "' + s + '".'); - var o = t.ed25519PublicKey; - if (o.length !== de.constants.PUBLIC_KEY_BYTE_LENGTH) throw new Error("Key length is invalid."); - return mt({ - message: o, - encoding: "binary" - }) -}; -de.publicKeyFromPrivateKey = function (e) { - e = e || {}; - var t = mt({ - message: e.privateKey, - encoding: "binary" - }); - if (t.length !== de.constants.PRIVATE_KEY_BYTE_LENGTH) throw new TypeError('"options.privateKey" must have a byte length of ' + de.constants.PRIVATE_KEY_BYTE_LENGTH); - for (var a = new je(de.constants.PUBLIC_KEY_BYTE_LENGTH), r = 0; r < a.length; ++r) a[r] = t[32 + r]; - return a -}; -de.sign = function (e) { - e = e || {}; - var t = mt(e), - a = mt({ - message: e.privateKey, - encoding: "binary" - }); - if (a.length === de.constants.SEED_BYTE_LENGTH) { - var r = de.generateKeyPair({ - seed: a - }); - a = r.privateKey - } else if (a.length !== de.constants.PRIVATE_KEY_BYTE_LENGTH) throw new TypeError('"options.privateKey" must have a byte length of ' + de.constants.SEED_BYTE_LENGTH + " or " + de.constants.PRIVATE_KEY_BYTE_LENGTH); - var n = new je(de.constants.SIGN_BYTE_LENGTH + t.length); - el(n, t, t.length, a); - for (var i = new je(de.constants.SIGN_BYTE_LENGTH), s = 0; s < i.length; ++s) i[s] = n[s]; - return i -}; -de.verify = function (e) { - e = e || {}; - var t = mt(e); - if (e.signature === void 0) throw new TypeError('"options.signature" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a binary string.'); - var a = mt({ - message: e.signature, - encoding: "binary" - }); - if (a.length !== de.constants.SIGN_BYTE_LENGTH) throw new TypeError('"options.signature" must have a byte length of ' + de.constants.SIGN_BYTE_LENGTH); - var r = mt({ - message: e.publicKey, - encoding: "binary" - }); - if (r.length !== de.constants.PUBLIC_KEY_BYTE_LENGTH) throw new TypeError('"options.publicKey" must have a byte length of ' + de.constants.PUBLIC_KEY_BYTE_LENGTH); - var n = new je(de.constants.SIGN_BYTE_LENGTH + t.length), - i = new je(de.constants.SIGN_BYTE_LENGTH + t.length), - s; - for (s = 0; s < de.constants.SIGN_BYTE_LENGTH; ++s) n[s] = a[s]; - for (s = 0; s < t.length; ++s) n[s + de.constants.SIGN_BYTE_LENGTH] = t[s]; - return tl(i, n, n.length, r) >= 0 -}; - -function mt(e) { - var t = e.message; - if (t instanceof Uint8Array || t instanceof je) return t; - var a = e.encoding; - if (t === void 0) - if (e.md) t = e.md.digest().getBytes(), a = "binary"; - else throw new TypeError('"options.message" or "options.md" not specified.'); - if (typeof t == "string" && !a) throw new TypeError('"options.encoding" must be "binary" or "utf8".'); - if (typeof t == "string") { - if (typeof Buffer < "u") return Buffer.from(t, a); - t = new Z0(t, a) - } else if (!(t instanceof Z0)) throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.'); - for (var r = new je(t.length()), n = 0; n < r.length; ++n) r[n] = t.at(n); - return r -} -var J0 = ae(), - Pr = ae([1]), - $u = ae([30883, 4953, 19914, 30187, 55467, 16705, 2637, 112, 59544, 30585, 16505, 36039, 65139, 11119, 27886, 20995]), - ju = ae([61785, 9906, 39828, 60374, 45398, 33411, 5274, 224, 53552, 61171, 33010, 6542, 64743, 22239, 55772, 9222]), - Vn = ae([54554, 36645, 11616, 51542, 42930, 38181, 51040, 26924, 56412, 64982, 57905, 49316, 21502, 52590, 14035, 8553]), - On = ae([26200, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214]), - V0 = new Float64Array([237, 211, 245, 92, 26, 99, 18, 88, 214, 156, 247, 162, 222, 249, 222, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16]), - Zu = ae([41136, 18958, 6951, 50414, 58488, 44335, 6150, 12099, 55207, 15867, 153, 11085, 57099, 20417, 9344, 11139]); - -function pr(e, t) { - var a = Ge.md.sha512.create(), - r = new Z0(e); - a.update(r.getBytes(t), "binary"); - var n = a.digest().getBytes(); - if (typeof Buffer < "u") return Buffer.from(n, "binary"); - for (var i = new je(de.constants.HASH_BYTE_LENGTH), s = 0; s < 64; ++s) i[s] = n.charCodeAt(s); - return i -} - -function Ju(e, t) { - var a = [ae(), ae(), ae(), ae()], - r, n = pr(t, 32); - for (n[0] &= 248, n[31] &= 127, n[31] |= 64, ma(a, n), Ea(e, a), r = 0; r < 32; ++r) t[r + 32] = e[r]; - return 0 -} - -function el(e, t, a, r) { - var n, i, s = new Float64Array(64), - o = [ae(), ae(), ae(), ae()], - l = pr(r, 32); - l[0] &= 248, l[31] &= 127, l[31] |= 64; - var f = a + 64; - for (n = 0; n < a; ++n) e[64 + n] = t[n]; - for (n = 0; n < 32; ++n) e[32 + n] = l[32 + n]; - var u = pr(e.subarray(32), a + 32); - for (ea(u), ma(o, u), Ea(e, o), n = 32; n < 64; ++n) e[n] = r[n]; - var c = pr(e, a + 64); - for (ea(c), n = 32; n < 64; ++n) s[n] = 0; - for (n = 0; n < 32; ++n) s[n] = u[n]; - for (n = 0; n < 32; ++n) - for (i = 0; i < 32; i++) s[n + i] += c[n] * l[i]; - return Ri(e.subarray(32), s), f -} - -function tl(e, t, a, r) { - var n, i, s = new je(32), - o = [ae(), ae(), ae(), ae()], - l = [ae(), ae(), ae(), ae()]; - if (i = -1, a < 64 || rl(l, r)) return -1; - for (n = 0; n < a; ++n) e[n] = t[n]; - for (n = 0; n < 32; ++n) e[n + 32] = r[n]; - var f = pr(e, a); - if (ea(f), Li(o, l, f), ma(l, t.subarray(32)), ta(o, l), Ea(s, o), a -= 64, wi(t, 0, s, 0)) { - for (n = 0; n < a; ++n) e[n] = 0; - return -1 - } - for (n = 0; n < a; ++n) e[n] = t[n + 64]; - return i = a, i -} - -function Ri(e, t) { - var a, r, n, i; - for (r = 63; r >= 32; --r) { - for (a = 0, n = r - 32, i = r - 12; n < i; ++n) t[n] += a - 16 * t[r] * V0[n - (r - 32)], a = t[n] + 128 >> 8, t[n] -= a * 256; - t[n] += a, t[r] = 0 - } - for (a = 0, n = 0; n < 32; ++n) t[n] += a - (t[31] >> 4) * V0[n], a = t[n] >> 8, t[n] &= 255; - for (n = 0; n < 32; ++n) t[n] -= a * V0[n]; - for (r = 0; r < 32; ++r) t[r + 1] += t[r] >> 8, e[r] = t[r] & 255 -} - -function ea(e) { - for (var t = new Float64Array(64), a = 0; a < 64; ++a) t[a] = e[a], e[a] = 0; - Ri(e, t) -} - -function ta(e, t) { - var a = ae(), - r = ae(), - n = ae(), - i = ae(), - s = ae(), - o = ae(), - l = ae(), - f = ae(), - u = ae(); - $t(a, e[1], e[0]), $t(u, t[1], t[0]), Te(a, a, u), Xt(r, e[0], e[1]), Xt(u, t[0], t[1]), Te(r, r, u), Te(n, e[3], t[3]), Te(n, n, ju), Te(i, e[2], t[2]), Xt(i, i, i), $t(s, r, a), $t(o, i, n), Xt(l, i, n), Xt(f, r, a), Te(e[0], s, o), Te(e[1], f, l), Te(e[2], l, o), Te(e[3], s, f) -} - -function Kn(e, t, a) { - for (var r = 0; r < 4; ++r) Ui(e[r], t[r], a) -} - -function Ea(e, t) { - var a = ae(), - r = ae(), - n = ae(); - sl(n, t[2]), Te(a, t[0], n), Te(r, t[1], n), Vr(e, r), e[31] ^= ki(a) << 7 -} - -function Vr(e, t) { - var a, r, n, i = ae(), - s = ae(); - for (a = 0; a < 16; ++a) s[a] = t[a]; - for (O0(s), O0(s), O0(s), r = 0; r < 2; ++r) { - for (i[0] = s[0] - 65517, a = 1; a < 15; ++a) i[a] = s[a] - 65535 - (i[a - 1] >> 16 & 1), i[a - 1] &= 65535; - i[15] = s[15] - 32767 - (i[14] >> 16 & 1), n = i[15] >> 16 & 1, i[14] &= 65535, Ui(s, i, 1 - n) - } - for (a = 0; a < 16; a++) e[2 * a] = s[a] & 255, e[2 * a + 1] = s[a] >> 8 -} - -function rl(e, t) { - var a = ae(), - r = ae(), - n = ae(), - i = ae(), - s = ae(), - o = ae(), - l = ae(); - return Dt(e[2], Pr), al(e[1], t), Vt(n, e[1]), Te(i, n, $u), $t(n, n, e[2]), Xt(i, e[2], i), Vt(s, i), Vt(o, s), Te(l, o, s), Te(a, l, n), Te(a, a, i), nl(a, a), Te(a, a, n), Te(a, a, i), Te(a, a, i), Te(e[0], a, i), Vt(r, e[0]), Te(r, r, i), Hn(r, n) && Te(e[0], e[0], Zu), Vt(r, e[0]), Te(r, r, i), Hn(r, n) ? -1 : (ki(e[0]) === t[31] >> 7 && $t(e[0], J0, e[0]), Te(e[3], e[0], e[1]), 0) -} - -function al(e, t) { - var a; - for (a = 0; a < 16; ++a) e[a] = t[2 * a] + (t[2 * a + 1] << 8); - e[15] &= 32767 -} - -function nl(e, t) { - var a = ae(), - r; - for (r = 0; r < 16; ++r) a[r] = t[r]; - for (r = 250; r >= 0; --r) Vt(a, a), r !== 1 && Te(a, a, t); - for (r = 0; r < 16; ++r) e[r] = a[r] -} - -function Hn(e, t) { - var a = new je(32), - r = new je(32); - return Vr(a, e), Vr(r, t), wi(a, 0, r, 0) -} - -function wi(e, t, a, r) { - return il(e, t, a, r, 32) -} - -function il(e, t, a, r, n) { - var i, s = 0; - for (i = 0; i < n; ++i) s |= e[t + i] ^ a[r + i]; - return (1 & s - 1 >>> 8) - 1 -} - -function ki(e) { - var t = new je(32); - return Vr(t, e), t[0] & 1 -} - -function Li(e, t, a) { - var r, n; - for (Dt(e[0], J0), Dt(e[1], Pr), Dt(e[2], Pr), Dt(e[3], J0), n = 255; n >= 0; --n) r = a[n / 8 | 0] >> (n & 7) & 1, Kn(e, t, r), ta(t, e), ta(e, e), Kn(e, t, r) -} - -function ma(e, t) { - var a = [ae(), ae(), ae(), ae()]; - Dt(a[0], Vn), Dt(a[1], On), Dt(a[2], Pr), Te(a[3], Vn, On), Li(e, a, t) -} - -function Dt(e, t) { - var a; - for (a = 0; a < 16; a++) e[a] = t[a] | 0 -} - -function sl(e, t) { - var a = ae(), - r; - for (r = 0; r < 16; ++r) a[r] = t[r]; - for (r = 253; r >= 0; --r) Vt(a, a), r !== 2 && r !== 4 && Te(a, a, t); - for (r = 0; r < 16; ++r) e[r] = a[r] -} - -function O0(e) { - var t, a, r = 1; - for (t = 0; t < 16; ++t) a = e[t] + r + 65535, r = Math.floor(a / 65536), e[t] = a - r * 65536; - e[0] += r - 1 + 37 * (r - 1) -} - -function Ui(e, t, a) { - for (var r, n = ~(a - 1), i = 0; i < 16; ++i) r = n & (e[i] ^ t[i]), e[i] ^= r, t[i] ^= r -} - -function ae(e) { - var t, a = new Float64Array(16); - if (e) - for (t = 0; t < e.length; ++t) a[t] = e[t]; - return a -} - -function Xt(e, t, a) { - for (var r = 0; r < 16; ++r) e[r] = t[r] + a[r] -} - -function $t(e, t, a) { - for (var r = 0; r < 16; ++r) e[r] = t[r] - a[r] -} - -function Vt(e, t) { - Te(e, t, t) -} - -function Te(e, t, a) { - var r, n, i = 0, - s = 0, - o = 0, - l = 0, - f = 0, - u = 0, - c = 0, - h = 0, - x = 0, - d = 0, - g = 0, - v = 0, - B = 0, - E = 0, - m = 0, - A = 0, - T = 0, - S = 0, - N = 0, - w = 0, - K = 0, - D = 0, - F = 0, - U = 0, - P = 0, - Z = 0, - W = 0, - J = 0, - Q = 0, - ce = 0, - ge = 0, - ne = a[0], - k = a[1], - O = a[2], - H = a[3], - V = a[4], - oe = a[5], - ie = a[6], - me = a[7], - ee = a[8], - Re = a[9], - Fe = a[10], - Ue = a[11], - we = a[12], - Se = a[13], - Be = a[14], - Le = a[15]; - r = t[0], i += r * ne, s += r * k, o += r * O, l += r * H, f += r * V, u += r * oe, c += r * ie, h += r * me, x += r * ee, d += r * Re, g += r * Fe, v += r * Ue, B += r * we, E += r * Se, m += r * Be, A += r * Le, r = t[1], s += r * ne, o += r * k, l += r * O, f += r * H, u += r * V, c += r * oe, h += r * ie, x += r * me, d += r * ee, g += r * Re, v += r * Fe, B += r * Ue, E += r * we, m += r * Se, A += r * Be, T += r * Le, r = t[2], o += r * ne, l += r * k, f += r * O, u += r * H, c += r * V, h += r * oe, x += r * ie, d += r * me, g += r * ee, v += r * Re, B += r * Fe, E += r * Ue, m += r * we, A += r * Se, T += r * Be, S += r * Le, r = t[3], l += r * ne, f += r * k, u += r * O, c += r * H, h += r * V, x += r * oe, d += r * ie, g += r * me, v += r * ee, B += r * Re, E += r * Fe, m += r * Ue, A += r * we, T += r * Se, S += r * Be, N += r * Le, r = t[4], f += r * ne, u += r * k, c += r * O, h += r * H, x += r * V, d += r * oe, g += r * ie, v += r * me, B += r * ee, E += r * Re, m += r * Fe, A += r * Ue, T += r * we, S += r * Se, N += r * Be, w += r * Le, r = t[5], u += r * ne, c += r * k, h += r * O, x += r * H, d += r * V, g += r * oe, v += r * ie, B += r * me, E += r * ee, m += r * Re, A += r * Fe, T += r * Ue, S += r * we, N += r * Se, w += r * Be, K += r * Le, r = t[6], c += r * ne, h += r * k, x += r * O, d += r * H, g += r * V, v += r * oe, B += r * ie, E += r * me, m += r * ee, A += r * Re, T += r * Fe, S += r * Ue, N += r * we, w += r * Se, K += r * Be, D += r * Le, r = t[7], h += r * ne, x += r * k, d += r * O, g += r * H, v += r * V, B += r * oe, E += r * ie, m += r * me, A += r * ee, T += r * Re, S += r * Fe, N += r * Ue, w += r * we, K += r * Se, D += r * Be, F += r * Le, r = t[8], x += r * ne, d += r * k, g += r * O, v += r * H, B += r * V, E += r * oe, m += r * ie, A += r * me, T += r * ee, S += r * Re, N += r * Fe, w += r * Ue, K += r * we, D += r * Se, F += r * Be, U += r * Le, r = t[9], d += r * ne, g += r * k, v += r * O, B += r * H, E += r * V, m += r * oe, A += r * ie, T += r * me, S += r * ee, N += r * Re, w += r * Fe, K += r * Ue, D += r * we, F += r * Se, U += r * Be, P += r * Le, r = t[10], g += r * ne, v += r * k, B += r * O, E += r * H, m += r * V, A += r * oe, T += r * ie, S += r * me, N += r * ee, w += r * Re, K += r * Fe, D += r * Ue, F += r * we, U += r * Se, P += r * Be, Z += r * Le, r = t[11], v += r * ne, B += r * k, E += r * O, m += r * H, A += r * V, T += r * oe, S += r * ie, N += r * me, w += r * ee, K += r * Re, D += r * Fe, F += r * Ue, U += r * we, P += r * Se, Z += r * Be, W += r * Le, r = t[12], B += r * ne, E += r * k, m += r * O, A += r * H, T += r * V, S += r * oe, N += r * ie, w += r * me, K += r * ee, D += r * Re, F += r * Fe, U += r * Ue, P += r * we, Z += r * Se, W += r * Be, J += r * Le, r = t[13], E += r * ne, m += r * k, A += r * O, T += r * H, S += r * V, N += r * oe, w += r * ie, K += r * me, D += r * ee, F += r * Re, U += r * Fe, P += r * Ue, Z += r * we, W += r * Se, J += r * Be, Q += r * Le, r = t[14], m += r * ne, A += r * k, T += r * O, S += r * H, N += r * V, w += r * oe, K += r * ie, D += r * me, F += r * ee, U += r * Re, P += r * Fe, Z += r * Ue, W += r * we, J += r * Se, Q += r * Be, ce += r * Le, r = t[15], A += r * ne, T += r * k, S += r * O, N += r * H, w += r * V, K += r * oe, D += r * ie, F += r * me, U += r * ee, P += r * Re, Z += r * Fe, W += r * Ue, J += r * we, Q += r * Se, ce += r * Be, ge += r * Le, i += 38 * T, s += 38 * S, o += 38 * N, l += 38 * w, f += 38 * K, u += 38 * D, c += 38 * F, h += 38 * U, x += 38 * P, d += 38 * Z, g += 38 * W, v += 38 * J, B += 38 * Q, E += 38 * ce, m += 38 * ge, n = 1, r = i + n + 65535, n = Math.floor(r / 65536), i = r - n * 65536, r = s + n + 65535, n = Math.floor(r / 65536), s = r - n * 65536, r = o + n + 65535, n = Math.floor(r / 65536), o = r - n * 65536, r = l + n + 65535, n = Math.floor(r / 65536), l = r - n * 65536, r = f + n + 65535, n = Math.floor(r / 65536), f = r - n * 65536, r = u + n + 65535, n = Math.floor(r / 65536), u = r - n * 65536, r = c + n + 65535, n = Math.floor(r / 65536), c = r - n * 65536, r = h + n + 65535, n = Math.floor(r / 65536), h = r - n * 65536, r = x + n + 65535, n = Math.floor(r / 65536), x = r - n * 65536, r = d + n + 65535, n = Math.floor(r / 65536), d = r - n * 65536, r = g + n + 65535, n = Math.floor(r / 65536), g = r - n * 65536, r = v + n + 65535, n = Math.floor(r / 65536), v = r - n * 65536, r = B + n + 65535, n = Math.floor(r / 65536), B = r - n * 65536, r = E + n + 65535, n = Math.floor(r / 65536), E = r - n * 65536, r = m + n + 65535, n = Math.floor(r / 65536), m = r - n * 65536, r = A + n + 65535, n = Math.floor(r / 65536), A = r - n * 65536, i += n - 1 + 37 * (n - 1), n = 1, r = i + n + 65535, n = Math.floor(r / 65536), i = r - n * 65536, r = s + n + 65535, n = Math.floor(r / 65536), s = r - n * 65536, r = o + n + 65535, n = Math.floor(r / 65536), o = r - n * 65536, r = l + n + 65535, n = Math.floor(r / 65536), l = r - n * 65536, r = f + n + 65535, n = Math.floor(r / 65536), f = r - n * 65536, r = u + n + 65535, n = Math.floor(r / 65536), u = r - n * 65536, r = c + n + 65535, n = Math.floor(r / 65536), c = r - n * 65536, r = h + n + 65535, n = Math.floor(r / 65536), h = r - n * 65536, r = x + n + 65535, n = Math.floor(r / 65536), x = r - n * 65536, r = d + n + 65535, n = Math.floor(r / 65536), d = r - n * 65536, r = g + n + 65535, n = Math.floor(r / 65536), g = r - n * 65536, r = v + n + 65535, n = Math.floor(r / 65536), v = r - n * 65536, r = B + n + 65535, n = Math.floor(r / 65536), B = r - n * 65536, r = E + n + 65535, n = Math.floor(r / 65536), E = r - n * 65536, r = m + n + 65535, n = Math.floor(r / 65536), m = r - n * 65536, r = A + n + 65535, n = Math.floor(r / 65536), A = r - n * 65536, i += n - 1 + 37 * (n - 1), e[0] = i, e[1] = s, e[2] = o, e[3] = l, e[4] = f, e[5] = u, e[6] = c, e[7] = h, e[8] = x, e[9] = d, e[10] = g, e[11] = v, e[12] = B, e[13] = E, e[14] = m, e[15] = A -} -var et = le; -et.kem = et.kem || {}; -var Mn = et.jsbn.BigInteger; -et.kem.rsa = {}; -et.kem.rsa.create = function (e, t) { - t = t || {}; - var a = t.prng || et.random, - r = {}; - return r.encrypt = function (n, i) { - var s = Math.ceil(n.n.bitLength() / 8), - o; - do o = new Mn(et.util.bytesToHex(a.getBytesSync(s)), 16).mod(n.n); while (o.compareTo(Mn.ONE) <= 0); - o = et.util.hexToBytes(o.toString(16)); - var l = s - o.length; - l > 0 && (o = et.util.fillString("\0", l) + o); - var f = n.encrypt(o, "NONE"), - u = e.generate(o, i); - return { - encapsulation: f, - key: u - } - }, r.decrypt = function (n, i, s) { - var o = n.decrypt(i, "NONE"); - return e.generate(o, s) - }, r -}; -et.kem.kdf1 = function (e, t) { - Pi(this, e, 0, t || e.digestLength) -}; -et.kem.kdf2 = function (e, t) { - Pi(this, e, 1, t || e.digestLength) -}; - -function Pi(e, t, a, r) { - e.generate = function (n, i) { - for (var s = new et.util.ByteBuffer, o = Math.ceil(i / r) + a, l = new et.util.ByteBuffer, f = a; f < o; ++f) { - l.putInt32(f), t.start(), t.update(n + l.getBytes()); - var u = t.digest(); - s.putBytes(u.getBytes(r)) - } - return s.truncate(s.length() - i), s.getBytes() - } -} -var pe = le; -pe.log = pe.log || {}; -pe.log.levels = ["none", "error", "warning", "info", "debug", "verbose", "max"]; -var Or = {}, - ra = [], - vr = null; -pe.log.LEVEL_LOCKED = 2; -pe.log.NO_LEVEL_CHECK = 4; -pe.log.INTERPOLATE = 8; -for (var Nt = 0; Nt < pe.log.levels.length; ++Nt) { - var qn = pe.log.levels[Nt]; - Or[qn] = { - index: Nt, - name: qn.toUpperCase() - } -} -pe.log.logMessage = function (e) { - for (var t = Or[e.level].index, a = 0; a < ra.length; ++a) { - var r = ra[a]; - if (r.flags & pe.log.NO_LEVEL_CHECK) r.f(e); - else { - var n = Or[r.level].index; - t <= n && r.f(r, e) - } - } -}; -pe.log.prepareStandard = function (e) { - "standard" in e || (e.standard = Or[e.level].name + " [" + e.category + "] " + e.message) -}; -pe.log.prepareFull = function (e) { - if (!("full" in e)) { - var t = [e.message]; - t = t.concat([]), e.full = pe.util.format.apply(this, t) - } -}; -pe.log.prepareStandardFull = function (e) { - "standardFull" in e || (pe.log.prepareStandard(e), e.standardFull = e.standard) -}; -for (var zn = ["error", "warning", "info", "debug", "verbose"], Nt = 0; Nt < zn.length; ++Nt)(function (t) { - pe.log[t] = function (a, r) { - var n = Array.prototype.slice.call(arguments).slice(2), - i = { - timestamp: new Date, - level: t, - category: a, - message: r, - arguments: n - }; - pe.log.logMessage(i) - } -})(zn[Nt]); -pe.log.makeLogger = function (e) { - var t = { - flags: 0, - f: e - }; - return pe.log.setLevel(t, "none"), t -}; -pe.log.setLevel = function (e, t) { - var a = !1; - if (e && !(e.flags & pe.log.LEVEL_LOCKED)) - for (var r = 0; r < pe.log.levels.length; ++r) { - var n = pe.log.levels[r]; - if (t == n) { - e.level = t, a = !0; - break - } - } - return a -}; -pe.log.lock = function (e, t) { - typeof t > "u" || t ? e.flags |= pe.log.LEVEL_LOCKED : e.flags &= ~pe.log.LEVEL_LOCKED -}; -pe.log.addLogger = function (e) { - ra.push(e) -}; -if (typeof console < "u" && "log" in console) { - var cr; - if (console.error && console.warn && console.info && console.debug) { - var ol = { - error: console.error, - warning: console.warn, - info: console.info, - debug: console.debug, - verbose: console.debug - }, - Ba = function (e, t) { - pe.log.prepareStandard(t); - var a = ol[t.level], - r = [t.standard]; - r = r.concat(t.arguments.slice()), a.apply(console, r) - }; - cr = pe.log.makeLogger(Ba) - } else { - var Ba = function (t, a) { - pe.log.prepareStandardFull(a), console.log(a.standardFull) - }; - cr = pe.log.makeLogger(Ba) - } - pe.log.setLevel(cr, "debug"), pe.log.addLogger(cr), vr = cr -} else console = { - log: function () {} -}; -if (vr !== null && typeof window < "u" && window.location) { - var Tr = new URL(window.location.href).searchParams; - if (Tr.has("console.level") && pe.log.setLevel(vr, Tr.get("console.level").slice(-1)[0]), Tr.has("console.lock")) { - var fl = Tr.get("console.lock").slice(-1)[0]; - fl == "true" && pe.log.lock(vr) - } -} -pe.log.consoleLogger = vr; -var X = le, - I = X.asn1, - Ye = X.pkcs7 = X.pkcs7 || {}; -Ye.messageFromPem = function (e) { - var t = X.pem.decode(e)[0]; - if (t.type !== "PKCS7") { - var a = new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".'); - throw a.headerType = t.type, a - } - if (t.procType && t.procType.type === "ENCRYPTED") throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted."); - var r = I.fromDer(t.body); - return Ye.messageFromAsn1(r) -}; -Ye.messageToPem = function (e, t) { - var a = { - type: "PKCS7", - body: I.toDer(e.toAsn1()).getBytes() - }; - return X.pem.encode(a, { - maxline: t - }) -}; -Ye.messageFromAsn1 = function (e) { - var t = {}, - a = []; - if (!I.validate(e, Ye.asn1.contentInfoValidator, t, a)) { - var r = new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."); - throw r.errors = a, r - } - var n = I.derToOid(t.contentType), - i; - switch (n) { - case X.pki.oids.envelopedData: - i = Ye.createEnvelopedData(); - break; - case X.pki.oids.encryptedData: - i = Ye.createEncryptedData(); - break; - case X.pki.oids.signedData: - i = Ye.createSignedData(); - break; - default: - throw new Error("Cannot read PKCS#7 message. ContentType with OID " + n + " is not (yet) supported.") - } - return i.fromAsn1(t.content.value[0]), i -}; -Ye.createSignedData = function () { - var e = null; - return e = { - type: X.pki.oids.signedData, - version: 1, - certificates: [], - crls: [], - signers: [], - digestAlgorithmIdentifiers: [], - contentInfo: null, - signerInfos: [], - fromAsn1: function (r) { - if (Aa(e, r, Ye.asn1.signedDataValidator), e.certificates = [], e.crls = [], e.digestAlgorithmIdentifiers = [], e.contentInfo = null, e.signerInfos = [], e.rawCapture.certificates) - for (var n = e.rawCapture.certificates.value, i = 0; i < n.length; ++i) e.certificates.push(X.pki.certificateFromAsn1(n[i])) - }, - toAsn1: function () { - e.contentInfo || e.sign(); - for (var r = [], n = 0; n < e.certificates.length; ++n) r.push(X.pki.certificateToAsn1(e.certificates[n])); - var i = [], - s = I.create(I.Class.CONTEXT_SPECIFIC, 0, !0, [I.create(I.Class.UNIVERSAL, I.Type.SEQUENCE, !0, [I.create(I.Class.UNIVERSAL, I.Type.INTEGER, !1, I.integerToDer(e.version).getBytes()), I.create(I.Class.UNIVERSAL, I.Type.SET, !0, e.digestAlgorithmIdentifiers), e.contentInfo])]); - return r.length > 0 && s.value[0].value.push(I.create(I.Class.CONTEXT_SPECIFIC, 0, !0, r)), i.length > 0 && s.value[0].value.push(I.create(I.Class.CONTEXT_SPECIFIC, 1, !0, i)), s.value[0].value.push(I.create(I.Class.UNIVERSAL, I.Type.SET, !0, e.signerInfos)), I.create(I.Class.UNIVERSAL, I.Type.SEQUENCE, !0, [I.create(I.Class.UNIVERSAL, I.Type.OID, !1, I.oidToDer(e.type).getBytes()), s]) - }, - addSigner: function (r) { - var n = r.issuer, - i = r.serialNumber; - if (r.certificate) { - var s = r.certificate; - typeof s == "string" && (s = X.pki.certificateFromPem(s)), n = s.issuer.attributes, i = s.serialNumber - } - var o = r.key; - if (!o) throw new Error("Could not add PKCS#7 signer; no private key specified."); - typeof o == "string" && (o = X.pki.privateKeyFromPem(o)); - var l = r.digestAlgorithm || X.pki.oids.sha1; - switch (l) { - case X.pki.oids.sha1: - case X.pki.oids.sha256: - case X.pki.oids.sha384: - case X.pki.oids.sha512: - case X.pki.oids.md5: - break; - default: - throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: " + l) - } - var f = r.authenticatedAttributes || []; - if (f.length > 0) { - for (var u = !1, c = !1, h = 0; h < f.length; ++h) { - var x = f[h]; - if (!u && x.type === X.pki.oids.contentType) { - if (u = !0, c) break; - continue - } - if (!c && x.type === X.pki.oids.messageDigest) { - if (c = !0, u) break; - continue - } - } - if (!u || !c) throw new Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.") - } - e.signers.push({ - key: o, - version: 1, - issuer: n, - serialNumber: i, - digestAlgorithm: l, - signatureAlgorithm: X.pki.oids.rsaEncryption, - signature: null, - authenticatedAttributes: f, - unauthenticatedAttributes: [] - }) - }, - sign: function (r) { - if (r = r || {}, (typeof e.content != "object" || e.contentInfo === null) && (e.contentInfo = I.create(I.Class.UNIVERSAL, I.Type.SEQUENCE, !0, [I.create(I.Class.UNIVERSAL, I.Type.OID, !1, I.oidToDer(X.pki.oids.data).getBytes())]), "content" in e)) { - var n; - e.content instanceof X.util.ByteBuffer ? n = e.content.bytes() : typeof e.content == "string" && (n = X.util.encodeUtf8(e.content)), r.detached ? e.detachedContent = I.create(I.Class.UNIVERSAL, I.Type.OCTETSTRING, !1, n) : e.contentInfo.value.push(I.create(I.Class.CONTEXT_SPECIFIC, 0, !0, [I.create(I.Class.UNIVERSAL, I.Type.OCTETSTRING, !1, n)])) - } - if (e.signers.length !== 0) { - var i = t(); - a(i) - } - }, - verify: function () { - throw new Error("PKCS#7 signature verification not yet implemented.") - }, - addCertificate: function (r) { - typeof r == "string" && (r = X.pki.certificateFromPem(r)), e.certificates.push(r) - }, - addCertificateRevokationList: function (r) { - throw new Error("PKCS#7 CRL support not yet implemented.") - } - }, e; - - function t() { - for (var r = {}, n = 0; n < e.signers.length; ++n) { - var i = e.signers[n], - s = i.digestAlgorithm; - s in r || (r[s] = X.md[X.pki.oids[s]].create()), i.authenticatedAttributes.length === 0 ? i.md = r[s] : i.md = X.md[X.pki.oids[s]].create() - } - e.digestAlgorithmIdentifiers = []; - for (var s in r) e.digestAlgorithmIdentifiers.push(I.create(I.Class.UNIVERSAL, I.Type.SEQUENCE, !0, [I.create(I.Class.UNIVERSAL, I.Type.OID, !1, I.oidToDer(s).getBytes()), I.create(I.Class.UNIVERSAL, I.Type.NULL, !1, "")])); - return r - } - - function a(r) { - var n; - if (e.detachedContent ? n = e.detachedContent : (n = e.contentInfo.value[1], n = n.value[0]), !n) throw new Error("Could not sign PKCS#7 message; there is no content to sign."); - var i = I.derToOid(e.contentInfo.value[0].value), - s = I.toDer(n); - s.getByte(), I.getBerValueLength(s), s = s.getBytes(); - for (var o in r) r[o].start().update(s); - for (var l = new Date, f = 0; f < e.signers.length; ++f) { - var u = e.signers[f]; - if (u.authenticatedAttributes.length === 0) { - if (i !== X.pki.oids.data) throw new Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.") - } else { - u.authenticatedAttributesAsn1 = I.create(I.Class.CONTEXT_SPECIFIC, 0, !0, []); - for (var c = I.create(I.Class.UNIVERSAL, I.Type.SET, !0, []), h = 0; h < u.authenticatedAttributes.length; ++h) { - var x = u.authenticatedAttributes[h]; - x.type === X.pki.oids.messageDigest ? x.value = r[u.digestAlgorithm].digest() : x.type === X.pki.oids.signingTime && (x.value || (x.value = l)), c.value.push(aa(x)), u.authenticatedAttributesAsn1.value.push(aa(x)) - } - s = I.toDer(c).getBytes(), u.md.start().update(s) - } - u.signature = u.key.sign(u.md, "RSASSA-PKCS1-V1_5") - } - e.signerInfos = xl(e.signers) - } -}; -Ye.createEncryptedData = function () { - var e = null; - return e = { - type: X.pki.oids.encryptedData, - version: 0, - encryptedContent: { - algorithm: X.pki.oids["aes256-CBC"] - }, - fromAsn1: function (t) { - Aa(e, t, Ye.asn1.encryptedDataValidator) - }, - decrypt: function (t) { - t !== void 0 && (e.encryptedContent.key = t), Vi(e) - } - }, e -}; -Ye.createEnvelopedData = function () { - var e = null; - return e = { - type: X.pki.oids.envelopedData, - version: 0, - recipients: [], - encryptedContent: { - algorithm: X.pki.oids["aes256-CBC"] - }, - fromAsn1: function (t) { - var a = Aa(e, t, Ye.asn1.envelopedDataValidator); - e.recipients = cl(a.recipientInfos.value) - }, - toAsn1: function () { - return I.create(I.Class.UNIVERSAL, I.Type.SEQUENCE, !0, [I.create(I.Class.UNIVERSAL, I.Type.OID, !1, I.oidToDer(e.type).getBytes()), I.create(I.Class.CONTEXT_SPECIFIC, 0, !0, [I.create(I.Class.UNIVERSAL, I.Type.SEQUENCE, !0, [I.create(I.Class.UNIVERSAL, I.Type.INTEGER, !1, I.integerToDer(e.version).getBytes()), I.create(I.Class.UNIVERSAL, I.Type.SET, !0, hl(e.recipients)), I.create(I.Class.UNIVERSAL, I.Type.SEQUENCE, !0, pl(e.encryptedContent))])])]) - }, - findRecipient: function (t) { - for (var a = t.issuer.attributes, r = 0; r < e.recipients.length; ++r) { - var n = e.recipients[r], - i = n.issuer; - if (n.serialNumber === t.serialNumber && i.length === a.length) { - for (var s = !0, o = 0; o < a.length; ++o) - if (i[o].type !== a[o].type || i[o].value !== a[o].value) { - s = !1; - break - } if (s) return n - } - } - return null - }, - decrypt: function (t, a) { - if (e.encryptedContent.key === void 0 && t !== void 0 && a !== void 0) switch (t.encryptedContent.algorithm) { - case X.pki.oids.rsaEncryption: - case X.pki.oids.desCBC: - var r = a.decrypt(t.encryptedContent.content); - e.encryptedContent.key = X.util.createBuffer(r); - break; - default: - throw new Error("Unsupported asymmetric cipher, OID " + t.encryptedContent.algorithm) - } - Vi(e) - }, - addRecipient: function (t) { - e.recipients.push({ - version: 0, - issuer: t.issuer.attributes, - serialNumber: t.serialNumber, - encryptedContent: { - algorithm: X.pki.oids.rsaEncryption, - key: t.publicKey - } - }) - }, - encrypt: function (t, a) { - if (e.encryptedContent.content === void 0) { - a = a || e.encryptedContent.algorithm, t = t || e.encryptedContent.key; - var r, n, i; - switch (a) { - case X.pki.oids["aes128-CBC"]: - r = 16, n = 16, i = X.aes.createEncryptionCipher; - break; - case X.pki.oids["aes192-CBC"]: - r = 24, n = 16, i = X.aes.createEncryptionCipher; - break; - case X.pki.oids["aes256-CBC"]: - r = 32, n = 16, i = X.aes.createEncryptionCipher; - break; - case X.pki.oids["des-EDE3-CBC"]: - r = 24, n = 8, i = X.des.createEncryptionCipher; - break; - default: - throw new Error("Unsupported symmetric cipher, OID " + a) - } - if (t === void 0) t = X.util.createBuffer(X.random.getBytes(r)); - else if (t.length() != r) throw new Error("Symmetric key has wrong length; got " + t.length() + " bytes, expected " + r + "."); - e.encryptedContent.algorithm = a, e.encryptedContent.key = t, e.encryptedContent.parameter = X.util.createBuffer(X.random.getBytes(n)); - var s = i(t); - if (s.start(e.encryptedContent.parameter.copy()), s.update(e.content), !s.finish()) throw new Error("Symmetric encryption failed."); - e.encryptedContent.content = s.output - } - for (var o = 0; o < e.recipients.length; ++o) { - var l = e.recipients[o]; - if (l.encryptedContent.content === void 0) switch (l.encryptedContent.algorithm) { - case X.pki.oids.rsaEncryption: - l.encryptedContent.content = l.encryptedContent.key.encrypt(e.encryptedContent.key.data); - break; - default: - throw new Error("Unsupported asymmetric cipher, OID " + l.encryptedContent.algorithm) - } - } - } - }, e -}; - -function ul(e) { - var t = {}, - a = []; - if (!I.validate(e, Ye.asn1.recipientInfoValidator, t, a)) { - var r = new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo."); - throw r.errors = a, r - } - return { - version: t.version.charCodeAt(0), - issuer: X.pki.RDNAttributesAsArray(t.issuer), - serialNumber: X.util.createBuffer(t.serial).toHex(), - encryptedContent: { - algorithm: I.derToOid(t.encAlgorithm), - parameter: t.encParameter ? t.encParameter.value : void 0, - content: t.encKey - } - } -} - -function ll(e) { - return I.create(I.Class.UNIVERSAL, I.Type.SEQUENCE, !0, [I.create(I.Class.UNIVERSAL, I.Type.INTEGER, !1, I.integerToDer(e.version).getBytes()), I.create(I.Class.UNIVERSAL, I.Type.SEQUENCE, !0, [X.pki.distinguishedNameToAsn1({ - attributes: e.issuer - }), I.create(I.Class.UNIVERSAL, I.Type.INTEGER, !1, X.util.hexToBytes(e.serialNumber))]), I.create(I.Class.UNIVERSAL, I.Type.SEQUENCE, !0, [I.create(I.Class.UNIVERSAL, I.Type.OID, !1, I.oidToDer(e.encryptedContent.algorithm).getBytes()), I.create(I.Class.UNIVERSAL, I.Type.NULL, !1, "")]), I.create(I.Class.UNIVERSAL, I.Type.OCTETSTRING, !1, e.encryptedContent.content)]) -} - -function cl(e) { - for (var t = [], a = 0; a < e.length; ++a) t.push(ul(e[a])); - return t -} - -function hl(e) { - for (var t = [], a = 0; a < e.length; ++a) t.push(ll(e[a])); - return t -} - -function dl(e) { - var t = I.create(I.Class.UNIVERSAL, I.Type.SEQUENCE, !0, [I.create(I.Class.UNIVERSAL, I.Type.INTEGER, !1, I.integerToDer(e.version).getBytes()), I.create(I.Class.UNIVERSAL, I.Type.SEQUENCE, !0, [X.pki.distinguishedNameToAsn1({ - attributes: e.issuer - }), I.create(I.Class.UNIVERSAL, I.Type.INTEGER, !1, X.util.hexToBytes(e.serialNumber))]), I.create(I.Class.UNIVERSAL, I.Type.SEQUENCE, !0, [I.create(I.Class.UNIVERSAL, I.Type.OID, !1, I.oidToDer(e.digestAlgorithm).getBytes()), I.create(I.Class.UNIVERSAL, I.Type.NULL, !1, "")])]); - if (e.authenticatedAttributesAsn1 && t.value.push(e.authenticatedAttributesAsn1), t.value.push(I.create(I.Class.UNIVERSAL, I.Type.SEQUENCE, !0, [I.create(I.Class.UNIVERSAL, I.Type.OID, !1, I.oidToDer(e.signatureAlgorithm).getBytes()), I.create(I.Class.UNIVERSAL, I.Type.NULL, !1, "")])), t.value.push(I.create(I.Class.UNIVERSAL, I.Type.OCTETSTRING, !1, e.signature)), e.unauthenticatedAttributes.length > 0) { - for (var a = I.create(I.Class.CONTEXT_SPECIFIC, 1, !0, []), r = 0; r < e.unauthenticatedAttributes.length; ++r) { - var n = e.unauthenticatedAttributes[r]; - a.values.push(aa(n)) - } - t.value.push(a) - } - return t -} - -function xl(e) { - for (var t = [], a = 0; a < e.length; ++a) t.push(dl(e[a])); - return t -} - -function aa(e) { - var t; - if (e.type === X.pki.oids.contentType) t = I.create(I.Class.UNIVERSAL, I.Type.OID, !1, I.oidToDer(e.value).getBytes()); - else if (e.type === X.pki.oids.messageDigest) t = I.create(I.Class.UNIVERSAL, I.Type.OCTETSTRING, !1, e.value.bytes()); - else if (e.type === X.pki.oids.signingTime) { - var a = new Date("1950-01-01T00:00:00Z"), - r = new Date("2050-01-01T00:00:00Z"), - n = e.value; - if (typeof n == "string") { - var i = Date.parse(n); - isNaN(i) ? n.length === 13 ? n = I.utcTimeToDate(n) : n = I.generalizedTimeToDate(n) : n = new Date(i) - } - n >= a && n < r ? t = I.create(I.Class.UNIVERSAL, I.Type.UTCTIME, !1, I.dateToUtcTime(n)) : t = I.create(I.Class.UNIVERSAL, I.Type.GENERALIZEDTIME, !1, I.dateToGeneralizedTime(n)) - } - return I.create(I.Class.UNIVERSAL, I.Type.SEQUENCE, !0, [I.create(I.Class.UNIVERSAL, I.Type.OID, !1, I.oidToDer(e.type).getBytes()), I.create(I.Class.UNIVERSAL, I.Type.SET, !0, [t])]) -} - -function pl(e) { - return [I.create(I.Class.UNIVERSAL, I.Type.OID, !1, I.oidToDer(X.pki.oids.data).getBytes()), I.create(I.Class.UNIVERSAL, I.Type.SEQUENCE, !0, [I.create(I.Class.UNIVERSAL, I.Type.OID, !1, I.oidToDer(e.algorithm).getBytes()), e.parameter ? I.create(I.Class.UNIVERSAL, I.Type.OCTETSTRING, !1, e.parameter.getBytes()) : void 0]), I.create(I.Class.CONTEXT_SPECIFIC, 0, !0, [I.create(I.Class.UNIVERSAL, I.Type.OCTETSTRING, !1, e.content.getBytes())])] -} - -function Aa(e, t, a) { - var r = {}, - n = []; - if (!I.validate(t, a, r, n)) { - var i = new Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."); - throw i.errors = i, i - } - var s = I.derToOid(r.contentType); - if (s !== X.pki.oids.data) throw new Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported."); - if (r.encryptedContent) { - var o = ""; - if (X.util.isArray(r.encryptedContent)) - for (var l = 0; l < r.encryptedContent.length; ++l) { - if (r.encryptedContent[l].type !== I.Type.OCTETSTRING) throw new Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects."); - o += r.encryptedContent[l].value - } else o = r.encryptedContent; - e.encryptedContent = { - algorithm: I.derToOid(r.encAlgorithm), - parameter: X.util.createBuffer(r.encParameter.value), - content: X.util.createBuffer(o) - } - } - if (r.content) { - var o = ""; - if (X.util.isArray(r.content)) - for (var l = 0; l < r.content.length; ++l) { - if (r.content[l].type !== I.Type.OCTETSTRING) throw new Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects."); - o += r.content[l].value - } else o = r.content; - e.content = X.util.createBuffer(o) - } - return e.version = r.version.charCodeAt(0), e.rawCapture = r, r -} - -function Vi(e) { - if (e.encryptedContent.key === void 0) throw new Error("Symmetric key not available."); - if (e.content === void 0) { - var t; - switch (e.encryptedContent.algorithm) { - case X.pki.oids["aes128-CBC"]: - case X.pki.oids["aes192-CBC"]: - case X.pki.oids["aes256-CBC"]: - t = X.aes.createDecryptionCipher(e.encryptedContent.key); - break; - case X.pki.oids.desCBC: - case X.pki.oids["des-EDE3-CBC"]: - t = X.des.createDecryptionCipher(e.encryptedContent.key); - break; - default: - throw new Error("Unsupported symmetric cipher, OID " + e.encryptedContent.algorithm) - } - if (t.start(e.encryptedContent.parameter), t.update(e.encryptedContent.content), !t.finish()) throw new Error("Symmetric decryption failed."); - e.content = t.output - } -} -var Pe = le, - jr = Pe.ssh = Pe.ssh || {}; -jr.privateKeyToPutty = function (e, t, a) { - a = a || "", t = t || ""; - var r = "ssh-rsa", - n = t === "" ? "none" : "aes256-cbc", - i = "PuTTY-User-Key-File-2: " + r + `\r -`; - i += "Encryption: " + n + `\r -`, i += "Comment: " + a + `\r -`; - var s = Pe.util.createBuffer(); - jt(s, r), ht(s, e.e), ht(s, e.n); - var o = Pe.util.encode64(s.bytes(), 64), - l = Math.floor(o.length / 66) + 1; - i += "Public-Lines: " + l + `\r -`, i += o; - var f = Pe.util.createBuffer(); - ht(f, e.d), ht(f, e.p), ht(f, e.q), ht(f, e.qInv); - var u; - if (!t) u = Pe.util.encode64(f.bytes(), 64); - else { - var c = f.length() + 16 - 1; - c -= c % 16; - var h = br(f.bytes()); - h.truncate(h.length() - c + f.length()), f.putBuffer(h); - var x = Pe.util.createBuffer(); - x.putBuffer(br("\0\0\0\0", t)), x.putBuffer(br("\0\0\0", t)); - var d = Pe.aes.createEncryptionCipher(x.truncate(8), "CBC"); - d.start(Pe.util.createBuffer().fillWithByte(0, 16)), d.update(f.copy()), d.finish(); - var g = d.output; - g.truncate(16), u = Pe.util.encode64(g.bytes(), 64) - } - l = Math.floor(u.length / 66) + 1, i += `\r -Private-Lines: ` + l + `\r -`, i += u; - var v = br("putty-private-key-file-mac-key", t), - B = Pe.util.createBuffer(); - jt(B, r), jt(B, n), jt(B, a), B.putInt32(s.length()), B.putBuffer(s), B.putInt32(f.length()), B.putBuffer(f); - var E = Pe.hmac.create(); - return E.start("sha1", v), E.update(B.bytes()), i += `\r -Private-MAC: ` + E.digest().toHex() + `\r -`, i -}; -jr.publicKeyToOpenSSH = function (e, t) { - var a = "ssh-rsa"; - t = t || ""; - var r = Pe.util.createBuffer(); - return jt(r, a), ht(r, e.e), ht(r, e.n), a + " " + Pe.util.encode64(r.bytes()) + " " + t -}; -jr.privateKeyToOpenSSH = function (e, t) { - return t ? Pe.pki.encryptRsaPrivateKey(e, t, { - legacy: !0, - algorithm: "aes128" - }) : Pe.pki.privateKeyToPem(e) -}; -jr.getPublicKeyFingerprint = function (e, t) { - t = t || {}; - var a = t.md || Pe.md.md5.create(), - r = "ssh-rsa", - n = Pe.util.createBuffer(); - jt(n, r), ht(n, e.e), ht(n, e.n), a.start(), a.update(n.getBytes()); - var i = a.digest(); - if (t.encoding === "hex") { - var s = i.toHex(); - return t.delimiter ? s.match(/.{2}/g).join(t.delimiter) : s - } else { - if (t.encoding === "binary") return i.getBytes(); - if (t.encoding) throw new Error('Unknown encoding "' + t.encoding + '".') - } - return i -}; - -function ht(e, t) { - var a = t.toString(16); - a[0] >= "8" && (a = "00" + a); - var r = Pe.util.hexToBytes(a); - e.putInt32(r.length), e.putBytes(r) -} - -function jt(e, t) { - e.putInt32(t.length), e.putString(t) -} - -function br() { - for (var e = Pe.md.sha1.create(), t = arguments.length, a = 0; a < t; ++a) e.update(arguments[a]); - return e.digest() -} -var vl = le; -const gl = Gn(vl); -export { - yl as C, Zi as a, ue as c, gl as f, Gn as g -}; -//# sourceMappingURL=auth-72H9TcpW.js.map \ No newline at end of file diff --git a/assets/auth-72H9TcpW.js.map b/assets/auth-72H9TcpW.js.map deleted file mode 100644 index a8caa85..0000000 --- a/assets/auth-72H9TcpW.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"auth-72H9TcpW.js","sources":["../../__vite-browser-external","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/core.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/x64-core.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/lib-typedarrays.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf16.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64url.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/md5.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha1.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha256.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha224.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha512.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha384.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha3.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/ripemd160.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/hmac.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pbkdf2.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/evpkdf.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/cipher-core.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-cfb.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ctr.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ctr-gladman.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ofb.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-ansix923.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-iso10126.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-iso97971.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-zeropadding.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-nopadding.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/format-hex.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/tripledes.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rc4.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rabbit.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rabbit-legacy.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/blowfish.js","../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/index.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/forge.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/baseN.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/util.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/cipher.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/cipherModes.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/aes.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/oids.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/asn1.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/md.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/hmac.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/md5.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/pem.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/des.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/pbkdf2.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/sha256.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/prng.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/random.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/rc2.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/jsbn.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/sha1.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/pkcs1.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/prime.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/rsa.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/pbe.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/pkcs7asn1.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/mgf1.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/mgf.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/pss.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/x509.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/pkcs12.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/pki.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/tls.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/aesCipherSuites.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/sha512.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/asn1-validator.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/ed25519.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/kem.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/log.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/pkcs7.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/ssh.js","../../node_modules/.pnpm/node-forge@1.3.1/node_modules/node-forge/lib/index.js"],"sourcesContent":["export default {}",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory();\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\troot.CryptoJS = factory();\n\t}\n}(this, function () {\n\n\t/*globals window, global, require*/\n\n\t/**\n\t * CryptoJS core components.\n\t */\n\tvar CryptoJS = CryptoJS || (function (Math, undefined) {\n\n\t var crypto;\n\n\t // Native crypto from window (Browser)\n\t if (typeof window !== 'undefined' && window.crypto) {\n\t crypto = window.crypto;\n\t }\n\n\t // Native crypto in web worker (Browser)\n\t if (typeof self !== 'undefined' && self.crypto) {\n\t crypto = self.crypto;\n\t }\n\n\t // Native crypto from worker\n\t if (typeof globalThis !== 'undefined' && globalThis.crypto) {\n\t crypto = globalThis.crypto;\n\t }\n\n\t // Native (experimental IE 11) crypto from window (Browser)\n\t if (!crypto && typeof window !== 'undefined' && window.msCrypto) {\n\t crypto = window.msCrypto;\n\t }\n\n\t // Native crypto from global (NodeJS)\n\t if (!crypto && typeof global !== 'undefined' && global.crypto) {\n\t crypto = global.crypto;\n\t }\n\n\t // Native crypto import via require (NodeJS)\n\t if (!crypto && typeof require === 'function') {\n\t try {\n\t crypto = require('crypto');\n\t } catch (err) {}\n\t }\n\n\t /*\n\t * Cryptographically secure pseudorandom number generator\n\t *\n\t * As Math.random() is cryptographically not safe to use\n\t */\n\t var cryptoSecureRandomInt = function () {\n\t if (crypto) {\n\t // Use getRandomValues method (Browser)\n\t if (typeof crypto.getRandomValues === 'function') {\n\t try {\n\t return crypto.getRandomValues(new Uint32Array(1))[0];\n\t } catch (err) {}\n\t }\n\n\t // Use randomBytes method (NodeJS)\n\t if (typeof crypto.randomBytes === 'function') {\n\t try {\n\t return crypto.randomBytes(4).readInt32LE();\n\t } catch (err) {}\n\t }\n\t }\n\n\t throw new Error('Native crypto module could not be used to get secure random number.');\n\t };\n\n\t /*\n\t * Local polyfill of Object.create\n\n\t */\n\t var create = Object.create || (function () {\n\t function F() {}\n\n\t return function (obj) {\n\t var subtype;\n\n\t F.prototype = obj;\n\n\t subtype = new F();\n\n\t F.prototype = null;\n\n\t return subtype;\n\t };\n\t }());\n\n\t /**\n\t * CryptoJS namespace.\n\t */\n\t var C = {};\n\n\t /**\n\t * Library namespace.\n\t */\n\t var C_lib = C.lib = {};\n\n\t /**\n\t * Base object for prototypal inheritance.\n\t */\n\t var Base = C_lib.Base = (function () {\n\n\n\t return {\n\t /**\n\t * Creates a new object that inherits from this object.\n\t *\n\t * @param {Object} overrides Properties to copy into the new object.\n\t *\n\t * @return {Object} The new object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var MyType = CryptoJS.lib.Base.extend({\n\t * field: 'value',\n\t *\n\t * method: function () {\n\t * }\n\t * });\n\t */\n\t extend: function (overrides) {\n\t // Spawn\n\t var subtype = create(this);\n\n\t // Augment\n\t if (overrides) {\n\t subtype.mixIn(overrides);\n\t }\n\n\t // Create default initializer\n\t if (!subtype.hasOwnProperty('init') || this.init === subtype.init) {\n\t subtype.init = function () {\n\t subtype.$super.init.apply(this, arguments);\n\t };\n\t }\n\n\t // Initializer's prototype is the subtype object\n\t subtype.init.prototype = subtype;\n\n\t // Reference supertype\n\t subtype.$super = this;\n\n\t return subtype;\n\t },\n\n\t /**\n\t * Extends this object and runs the init method.\n\t * Arguments to create() will be passed to init().\n\t *\n\t * @return {Object} The new object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var instance = MyType.create();\n\t */\n\t create: function () {\n\t var instance = this.extend();\n\t instance.init.apply(instance, arguments);\n\n\t return instance;\n\t },\n\n\t /**\n\t * Initializes a newly created object.\n\t * Override this method to add some logic when your objects are created.\n\t *\n\t * @example\n\t *\n\t * var MyType = CryptoJS.lib.Base.extend({\n\t * init: function () {\n\t * // ...\n\t * }\n\t * });\n\t */\n\t init: function () {\n\t },\n\n\t /**\n\t * Copies properties into this object.\n\t *\n\t * @param {Object} properties The properties to mix in.\n\t *\n\t * @example\n\t *\n\t * MyType.mixIn({\n\t * field: 'value'\n\t * });\n\t */\n\t mixIn: function (properties) {\n\t for (var propertyName in properties) {\n\t if (properties.hasOwnProperty(propertyName)) {\n\t this[propertyName] = properties[propertyName];\n\t }\n\t }\n\n\t // IE won't copy toString using the loop above\n\t if (properties.hasOwnProperty('toString')) {\n\t this.toString = properties.toString;\n\t }\n\t },\n\n\t /**\n\t * Creates a copy of this object.\n\t *\n\t * @return {Object} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = instance.clone();\n\t */\n\t clone: function () {\n\t return this.init.prototype.extend(this);\n\t }\n\t };\n\t }());\n\n\t /**\n\t * An array of 32-bit words.\n\t *\n\t * @property {Array} words The array of 32-bit words.\n\t * @property {number} sigBytes The number of significant bytes in this word array.\n\t */\n\t var WordArray = C_lib.WordArray = Base.extend({\n\t /**\n\t * Initializes a newly created word array.\n\t *\n\t * @param {Array} words (Optional) An array of 32-bit words.\n\t * @param {number} sigBytes (Optional) The number of significant bytes in the words.\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.lib.WordArray.create();\n\t * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);\n\t * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);\n\t */\n\t init: function (words, sigBytes) {\n\t words = this.words = words || [];\n\n\t if (sigBytes != undefined) {\n\t this.sigBytes = sigBytes;\n\t } else {\n\t this.sigBytes = words.length * 4;\n\t }\n\t },\n\n\t /**\n\t * Converts this word array to a string.\n\t *\n\t * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex\n\t *\n\t * @return {string} The stringified word array.\n\t *\n\t * @example\n\t *\n\t * var string = wordArray + '';\n\t * var string = wordArray.toString();\n\t * var string = wordArray.toString(CryptoJS.enc.Utf8);\n\t */\n\t toString: function (encoder) {\n\t return (encoder || Hex).stringify(this);\n\t },\n\n\t /**\n\t * Concatenates a word array to this word array.\n\t *\n\t * @param {WordArray} wordArray The word array to append.\n\t *\n\t * @return {WordArray} This word array.\n\t *\n\t * @example\n\t *\n\t * wordArray1.concat(wordArray2);\n\t */\n\t concat: function (wordArray) {\n\t // Shortcuts\n\t var thisWords = this.words;\n\t var thatWords = wordArray.words;\n\t var thisSigBytes = this.sigBytes;\n\t var thatSigBytes = wordArray.sigBytes;\n\n\t // Clamp excess bits\n\t this.clamp();\n\n\t // Concat\n\t if (thisSigBytes % 4) {\n\t // Copy one byte at a time\n\t for (var i = 0; i < thatSigBytes; i++) {\n\t var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8);\n\t }\n\t } else {\n\t // Copy one word at a time\n\t for (var j = 0; j < thatSigBytes; j += 4) {\n\t thisWords[(thisSigBytes + j) >>> 2] = thatWords[j >>> 2];\n\t }\n\t }\n\t this.sigBytes += thatSigBytes;\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Removes insignificant bits.\n\t *\n\t * @example\n\t *\n\t * wordArray.clamp();\n\t */\n\t clamp: function () {\n\t // Shortcuts\n\t var words = this.words;\n\t var sigBytes = this.sigBytes;\n\n\t // Clamp\n\t words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8);\n\t words.length = Math.ceil(sigBytes / 4);\n\t },\n\n\t /**\n\t * Creates a copy of this word array.\n\t *\n\t * @return {WordArray} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = wordArray.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\t clone.words = this.words.slice(0);\n\n\t return clone;\n\t },\n\n\t /**\n\t * Creates a word array filled with random bytes.\n\t *\n\t * @param {number} nBytes The number of random bytes to generate.\n\t *\n\t * @return {WordArray} The random word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.lib.WordArray.random(16);\n\t */\n\t random: function (nBytes) {\n\t var words = [];\n\n\t for (var i = 0; i < nBytes; i += 4) {\n\t words.push(cryptoSecureRandomInt());\n\t }\n\n\t return new WordArray.init(words, nBytes);\n\t }\n\t });\n\n\t /**\n\t * Encoder namespace.\n\t */\n\t var C_enc = C.enc = {};\n\n\t /**\n\t * Hex encoding strategy.\n\t */\n\t var Hex = C_enc.Hex = {\n\t /**\n\t * Converts a word array to a hex string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The hex string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hexString = CryptoJS.enc.Hex.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var hexChars = [];\n\t for (var i = 0; i < sigBytes; i++) {\n\t var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t hexChars.push((bite >>> 4).toString(16));\n\t hexChars.push((bite & 0x0f).toString(16));\n\t }\n\n\t return hexChars.join('');\n\t },\n\n\t /**\n\t * Converts a hex string to a word array.\n\t *\n\t * @param {string} hexStr The hex string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Hex.parse(hexString);\n\t */\n\t parse: function (hexStr) {\n\t // Shortcut\n\t var hexStrLength = hexStr.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < hexStrLength; i += 2) {\n\t words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4);\n\t }\n\n\t return new WordArray.init(words, hexStrLength / 2);\n\t }\n\t };\n\n\t /**\n\t * Latin1 encoding strategy.\n\t */\n\t var Latin1 = C_enc.Latin1 = {\n\t /**\n\t * Converts a word array to a Latin1 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The Latin1 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var latin1Chars = [];\n\t for (var i = 0; i < sigBytes; i++) {\n\t var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t latin1Chars.push(String.fromCharCode(bite));\n\t }\n\n\t return latin1Chars.join('');\n\t },\n\n\t /**\n\t * Converts a Latin1 string to a word array.\n\t *\n\t * @param {string} latin1Str The Latin1 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);\n\t */\n\t parse: function (latin1Str) {\n\t // Shortcut\n\t var latin1StrLength = latin1Str.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < latin1StrLength; i++) {\n\t words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8);\n\t }\n\n\t return new WordArray.init(words, latin1StrLength);\n\t }\n\t };\n\n\t /**\n\t * UTF-8 encoding strategy.\n\t */\n\t var Utf8 = C_enc.Utf8 = {\n\t /**\n\t * Converts a word array to a UTF-8 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The UTF-8 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t try {\n\t return decodeURIComponent(escape(Latin1.stringify(wordArray)));\n\t } catch (e) {\n\t throw new Error('Malformed UTF-8 data');\n\t }\n\t },\n\n\t /**\n\t * Converts a UTF-8 string to a word array.\n\t *\n\t * @param {string} utf8Str The UTF-8 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);\n\t */\n\t parse: function (utf8Str) {\n\t return Latin1.parse(unescape(encodeURIComponent(utf8Str)));\n\t }\n\t };\n\n\t /**\n\t * Abstract buffered block algorithm template.\n\t *\n\t * The property blockSize must be implemented in a concrete subtype.\n\t *\n\t * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0\n\t */\n\t var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({\n\t /**\n\t * Resets this block algorithm's data buffer to its initial state.\n\t *\n\t * @example\n\t *\n\t * bufferedBlockAlgorithm.reset();\n\t */\n\t reset: function () {\n\t // Initial values\n\t this._data = new WordArray.init();\n\t this._nDataBytes = 0;\n\t },\n\n\t /**\n\t * Adds new data to this block algorithm's buffer.\n\t *\n\t * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.\n\t *\n\t * @example\n\t *\n\t * bufferedBlockAlgorithm._append('data');\n\t * bufferedBlockAlgorithm._append(wordArray);\n\t */\n\t _append: function (data) {\n\t // Convert string to WordArray, else assume WordArray already\n\t if (typeof data == 'string') {\n\t data = Utf8.parse(data);\n\t }\n\n\t // Append\n\t this._data.concat(data);\n\t this._nDataBytes += data.sigBytes;\n\t },\n\n\t /**\n\t * Processes available data blocks.\n\t *\n\t * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.\n\t *\n\t * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.\n\t *\n\t * @return {WordArray} The processed data.\n\t *\n\t * @example\n\t *\n\t * var processedData = bufferedBlockAlgorithm._process();\n\t * var processedData = bufferedBlockAlgorithm._process(!!'flush');\n\t */\n\t _process: function (doFlush) {\n\t var processedWords;\n\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\t var dataSigBytes = data.sigBytes;\n\t var blockSize = this.blockSize;\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count blocks ready\n\t var nBlocksReady = dataSigBytes / blockSizeBytes;\n\t if (doFlush) {\n\t // Round up to include partial blocks\n\t nBlocksReady = Math.ceil(nBlocksReady);\n\t } else {\n\t // Round down to include only full blocks,\n\t // less the number of blocks that must remain in the buffer\n\t nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);\n\t }\n\n\t // Count words ready\n\t var nWordsReady = nBlocksReady * blockSize;\n\n\t // Count bytes ready\n\t var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes);\n\n\t // Process blocks\n\t if (nWordsReady) {\n\t for (var offset = 0; offset < nWordsReady; offset += blockSize) {\n\t // Perform concrete-algorithm logic\n\t this._doProcessBlock(dataWords, offset);\n\t }\n\n\t // Remove processed words\n\t processedWords = dataWords.splice(0, nWordsReady);\n\t data.sigBytes -= nBytesReady;\n\t }\n\n\t // Return processed words\n\t return new WordArray.init(processedWords, nBytesReady);\n\t },\n\n\t /**\n\t * Creates a copy of this object.\n\t *\n\t * @return {Object} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = bufferedBlockAlgorithm.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\t clone._data = this._data.clone();\n\n\t return clone;\n\t },\n\n\t _minBufferSize: 0\n\t });\n\n\t /**\n\t * Abstract hasher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits)\n\t */\n\t var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({\n\t /**\n\t * Configuration options.\n\t */\n\t cfg: Base.extend(),\n\n\t /**\n\t * Initializes a newly created hasher.\n\t *\n\t * @param {Object} cfg (Optional) The configuration options to use for this hash computation.\n\t *\n\t * @example\n\t *\n\t * var hasher = CryptoJS.algo.SHA256.create();\n\t */\n\t init: function (cfg) {\n\t // Apply config defaults\n\t this.cfg = this.cfg.extend(cfg);\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this hasher to its initial state.\n\t *\n\t * @example\n\t *\n\t * hasher.reset();\n\t */\n\t reset: function () {\n\t // Reset data buffer\n\t BufferedBlockAlgorithm.reset.call(this);\n\n\t // Perform concrete-hasher logic\n\t this._doReset();\n\t },\n\n\t /**\n\t * Updates this hasher with a message.\n\t *\n\t * @param {WordArray|string} messageUpdate The message to append.\n\t *\n\t * @return {Hasher} This hasher.\n\t *\n\t * @example\n\t *\n\t * hasher.update('message');\n\t * hasher.update(wordArray);\n\t */\n\t update: function (messageUpdate) {\n\t // Append\n\t this._append(messageUpdate);\n\n\t // Update the hash\n\t this._process();\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Finalizes the hash computation.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} messageUpdate (Optional) A final message update.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @example\n\t *\n\t * var hash = hasher.finalize();\n\t * var hash = hasher.finalize('message');\n\t * var hash = hasher.finalize(wordArray);\n\t */\n\t finalize: function (messageUpdate) {\n\t // Final message update\n\t if (messageUpdate) {\n\t this._append(messageUpdate);\n\t }\n\n\t // Perform concrete-hasher logic\n\t var hash = this._doFinalize();\n\n\t return hash;\n\t },\n\n\t blockSize: 512/32,\n\n\t /**\n\t * Creates a shortcut function to a hasher's object interface.\n\t *\n\t * @param {Hasher} hasher The hasher to create a helper for.\n\t *\n\t * @return {Function} The shortcut function.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);\n\t */\n\t _createHelper: function (hasher) {\n\t return function (message, cfg) {\n\t return new hasher.init(cfg).finalize(message);\n\t };\n\t },\n\n\t /**\n\t * Creates a shortcut function to the HMAC's object interface.\n\t *\n\t * @param {Hasher} hasher The hasher to use in this HMAC helper.\n\t *\n\t * @return {Function} The shortcut function.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);\n\t */\n\t _createHmacHelper: function (hasher) {\n\t return function (message, key) {\n\t return new C_algo.HMAC.init(hasher, key).finalize(message);\n\t };\n\t }\n\t });\n\n\t /**\n\t * Algorithm namespace.\n\t */\n\t var C_algo = C.algo = {};\n\n\t return C;\n\t}(Math));\n\n\n\treturn CryptoJS;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (undefined) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var X32WordArray = C_lib.WordArray;\n\n\t /**\n\t * x64 namespace.\n\t */\n\t var C_x64 = C.x64 = {};\n\n\t /**\n\t * A 64-bit word.\n\t */\n\t var X64Word = C_x64.Word = Base.extend({\n\t /**\n\t * Initializes a newly created 64-bit word.\n\t *\n\t * @param {number} high The high 32 bits.\n\t * @param {number} low The low 32 bits.\n\t *\n\t * @example\n\t *\n\t * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607);\n\t */\n\t init: function (high, low) {\n\t this.high = high;\n\t this.low = low;\n\t }\n\n\t /**\n\t * Bitwise NOTs this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after negating.\n\t *\n\t * @example\n\t *\n\t * var negated = x64Word.not();\n\t */\n\t // not: function () {\n\t // var high = ~this.high;\n\t // var low = ~this.low;\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Bitwise ANDs this word with the passed word.\n\t *\n\t * @param {X64Word} word The x64-Word to AND with this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after ANDing.\n\t *\n\t * @example\n\t *\n\t * var anded = x64Word.and(anotherX64Word);\n\t */\n\t // and: function (word) {\n\t // var high = this.high & word.high;\n\t // var low = this.low & word.low;\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Bitwise ORs this word with the passed word.\n\t *\n\t * @param {X64Word} word The x64-Word to OR with this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after ORing.\n\t *\n\t * @example\n\t *\n\t * var ored = x64Word.or(anotherX64Word);\n\t */\n\t // or: function (word) {\n\t // var high = this.high | word.high;\n\t // var low = this.low | word.low;\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Bitwise XORs this word with the passed word.\n\t *\n\t * @param {X64Word} word The x64-Word to XOR with this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after XORing.\n\t *\n\t * @example\n\t *\n\t * var xored = x64Word.xor(anotherX64Word);\n\t */\n\t // xor: function (word) {\n\t // var high = this.high ^ word.high;\n\t // var low = this.low ^ word.low;\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Shifts this word n bits to the left.\n\t *\n\t * @param {number} n The number of bits to shift.\n\t *\n\t * @return {X64Word} A new x64-Word object after shifting.\n\t *\n\t * @example\n\t *\n\t * var shifted = x64Word.shiftL(25);\n\t */\n\t // shiftL: function (n) {\n\t // if (n < 32) {\n\t // var high = (this.high << n) | (this.low >>> (32 - n));\n\t // var low = this.low << n;\n\t // } else {\n\t // var high = this.low << (n - 32);\n\t // var low = 0;\n\t // }\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Shifts this word n bits to the right.\n\t *\n\t * @param {number} n The number of bits to shift.\n\t *\n\t * @return {X64Word} A new x64-Word object after shifting.\n\t *\n\t * @example\n\t *\n\t * var shifted = x64Word.shiftR(7);\n\t */\n\t // shiftR: function (n) {\n\t // if (n < 32) {\n\t // var low = (this.low >>> n) | (this.high << (32 - n));\n\t // var high = this.high >>> n;\n\t // } else {\n\t // var low = this.high >>> (n - 32);\n\t // var high = 0;\n\t // }\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Rotates this word n bits to the left.\n\t *\n\t * @param {number} n The number of bits to rotate.\n\t *\n\t * @return {X64Word} A new x64-Word object after rotating.\n\t *\n\t * @example\n\t *\n\t * var rotated = x64Word.rotL(25);\n\t */\n\t // rotL: function (n) {\n\t // return this.shiftL(n).or(this.shiftR(64 - n));\n\t // },\n\n\t /**\n\t * Rotates this word n bits to the right.\n\t *\n\t * @param {number} n The number of bits to rotate.\n\t *\n\t * @return {X64Word} A new x64-Word object after rotating.\n\t *\n\t * @example\n\t *\n\t * var rotated = x64Word.rotR(7);\n\t */\n\t // rotR: function (n) {\n\t // return this.shiftR(n).or(this.shiftL(64 - n));\n\t // },\n\n\t /**\n\t * Adds this word with the passed word.\n\t *\n\t * @param {X64Word} word The x64-Word to add with this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after adding.\n\t *\n\t * @example\n\t *\n\t * var added = x64Word.add(anotherX64Word);\n\t */\n\t // add: function (word) {\n\t // var low = (this.low + word.low) | 0;\n\t // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0;\n\t // var high = (this.high + word.high + carry) | 0;\n\n\t // return X64Word.create(high, low);\n\t // }\n\t });\n\n\t /**\n\t * An array of 64-bit words.\n\t *\n\t * @property {Array} words The array of CryptoJS.x64.Word objects.\n\t * @property {number} sigBytes The number of significant bytes in this word array.\n\t */\n\t var X64WordArray = C_x64.WordArray = Base.extend({\n\t /**\n\t * Initializes a newly created word array.\n\t *\n\t * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects.\n\t * @param {number} sigBytes (Optional) The number of significant bytes in the words.\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.x64.WordArray.create();\n\t *\n\t * var wordArray = CryptoJS.x64.WordArray.create([\n\t * CryptoJS.x64.Word.create(0x00010203, 0x04050607),\n\t * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)\n\t * ]);\n\t *\n\t * var wordArray = CryptoJS.x64.WordArray.create([\n\t * CryptoJS.x64.Word.create(0x00010203, 0x04050607),\n\t * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)\n\t * ], 10);\n\t */\n\t init: function (words, sigBytes) {\n\t words = this.words = words || [];\n\n\t if (sigBytes != undefined) {\n\t this.sigBytes = sigBytes;\n\t } else {\n\t this.sigBytes = words.length * 8;\n\t }\n\t },\n\n\t /**\n\t * Converts this 64-bit word array to a 32-bit word array.\n\t *\n\t * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array.\n\t *\n\t * @example\n\t *\n\t * var x32WordArray = x64WordArray.toX32();\n\t */\n\t toX32: function () {\n\t // Shortcuts\n\t var x64Words = this.words;\n\t var x64WordsLength = x64Words.length;\n\n\t // Convert\n\t var x32Words = [];\n\t for (var i = 0; i < x64WordsLength; i++) {\n\t var x64Word = x64Words[i];\n\t x32Words.push(x64Word.high);\n\t x32Words.push(x64Word.low);\n\t }\n\n\t return X32WordArray.create(x32Words, this.sigBytes);\n\t },\n\n\t /**\n\t * Creates a copy of this word array.\n\t *\n\t * @return {X64WordArray} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = x64WordArray.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\n\t // Clone \"words\" array\n\t var words = clone.words = this.words.slice(0);\n\n\t // Clone each X64Word object\n\t var wordsLength = words.length;\n\t for (var i = 0; i < wordsLength; i++) {\n\t words[i] = words[i].clone();\n\t }\n\n\t return clone;\n\t }\n\t });\n\t}());\n\n\n\treturn CryptoJS;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Check if typed arrays are supported\n\t if (typeof ArrayBuffer != 'function') {\n\t return;\n\t }\n\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\n\t // Reference original init\n\t var superInit = WordArray.init;\n\n\t // Augment WordArray.init to handle typed arrays\n\t var subInit = WordArray.init = function (typedArray) {\n\t // Convert buffers to uint8\n\t if (typedArray instanceof ArrayBuffer) {\n\t typedArray = new Uint8Array(typedArray);\n\t }\n\n\t // Convert other array views to uint8\n\t if (\n\t typedArray instanceof Int8Array ||\n\t (typeof Uint8ClampedArray !== \"undefined\" && typedArray instanceof Uint8ClampedArray) ||\n\t typedArray instanceof Int16Array ||\n\t typedArray instanceof Uint16Array ||\n\t typedArray instanceof Int32Array ||\n\t typedArray instanceof Uint32Array ||\n\t typedArray instanceof Float32Array ||\n\t typedArray instanceof Float64Array\n\t ) {\n\t typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength);\n\t }\n\n\t // Handle Uint8Array\n\t if (typedArray instanceof Uint8Array) {\n\t // Shortcut\n\t var typedArrayByteLength = typedArray.byteLength;\n\n\t // Extract bytes\n\t var words = [];\n\t for (var i = 0; i < typedArrayByteLength; i++) {\n\t words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8);\n\t }\n\n\t // Initialize this word array\n\t superInit.call(this, words, typedArrayByteLength);\n\t } else {\n\t // Else call normal init\n\t superInit.apply(this, arguments);\n\t }\n\t };\n\n\t subInit.prototype = WordArray;\n\t}());\n\n\n\treturn CryptoJS.lib.WordArray;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var C_enc = C.enc;\n\n\t /**\n\t * UTF-16 BE encoding strategy.\n\t */\n\t var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = {\n\t /**\n\t * Converts a word array to a UTF-16 BE string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The UTF-16 BE string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var utf16Chars = [];\n\t for (var i = 0; i < sigBytes; i += 2) {\n\t var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff;\n\t utf16Chars.push(String.fromCharCode(codePoint));\n\t }\n\n\t return utf16Chars.join('');\n\t },\n\n\t /**\n\t * Converts a UTF-16 BE string to a word array.\n\t *\n\t * @param {string} utf16Str The UTF-16 BE string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Utf16.parse(utf16String);\n\t */\n\t parse: function (utf16Str) {\n\t // Shortcut\n\t var utf16StrLength = utf16Str.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < utf16StrLength; i++) {\n\t words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16);\n\t }\n\n\t return WordArray.create(words, utf16StrLength * 2);\n\t }\n\t };\n\n\t /**\n\t * UTF-16 LE encoding strategy.\n\t */\n\t C_enc.Utf16LE = {\n\t /**\n\t * Converts a word array to a UTF-16 LE string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The UTF-16 LE string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var utf16Chars = [];\n\t for (var i = 0; i < sigBytes; i += 2) {\n\t var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff);\n\t utf16Chars.push(String.fromCharCode(codePoint));\n\t }\n\n\t return utf16Chars.join('');\n\t },\n\n\t /**\n\t * Converts a UTF-16 LE string to a word array.\n\t *\n\t * @param {string} utf16Str The UTF-16 LE string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str);\n\t */\n\t parse: function (utf16Str) {\n\t // Shortcut\n\t var utf16StrLength = utf16Str.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < utf16StrLength; i++) {\n\t words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16));\n\t }\n\n\t return WordArray.create(words, utf16StrLength * 2);\n\t }\n\t };\n\n\t function swapEndian(word) {\n\t return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff);\n\t }\n\t}());\n\n\n\treturn CryptoJS.enc.Utf16;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var C_enc = C.enc;\n\n\t /**\n\t * Base64 encoding strategy.\n\t */\n\t var Base64 = C_enc.Base64 = {\n\t /**\n\t * Converts a word array to a Base64 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The Base64 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var base64String = CryptoJS.enc.Base64.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\t var map = this._map;\n\n\t // Clamp excess bits\n\t wordArray.clamp();\n\n\t // Convert\n\t var base64Chars = [];\n\t for (var i = 0; i < sigBytes; i += 3) {\n\t var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff;\n\t var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff;\n\n\t var triplet = (byte1 << 16) | (byte2 << 8) | byte3;\n\n\t for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) {\n\t base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f));\n\t }\n\t }\n\n\t // Add padding\n\t var paddingChar = map.charAt(64);\n\t if (paddingChar) {\n\t while (base64Chars.length % 4) {\n\t base64Chars.push(paddingChar);\n\t }\n\t }\n\n\t return base64Chars.join('');\n\t },\n\n\t /**\n\t * Converts a Base64 string to a word array.\n\t *\n\t * @param {string} base64Str The Base64 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Base64.parse(base64String);\n\t */\n\t parse: function (base64Str) {\n\t // Shortcuts\n\t var base64StrLength = base64Str.length;\n\t var map = this._map;\n\t var reverseMap = this._reverseMap;\n\n\t if (!reverseMap) {\n\t reverseMap = this._reverseMap = [];\n\t for (var j = 0; j < map.length; j++) {\n\t reverseMap[map.charCodeAt(j)] = j;\n\t }\n\t }\n\n\t // Ignore padding\n\t var paddingChar = map.charAt(64);\n\t if (paddingChar) {\n\t var paddingIndex = base64Str.indexOf(paddingChar);\n\t if (paddingIndex !== -1) {\n\t base64StrLength = paddingIndex;\n\t }\n\t }\n\n\t // Convert\n\t return parseLoop(base64Str, base64StrLength, reverseMap);\n\n\t },\n\n\t _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='\n\t };\n\n\t function parseLoop(base64Str, base64StrLength, reverseMap) {\n\t var words = [];\n\t var nBytes = 0;\n\t for (var i = 0; i < base64StrLength; i++) {\n\t if (i % 4) {\n\t var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2);\n\t var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2);\n\t var bitsCombined = bits1 | bits2;\n\t words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8);\n\t nBytes++;\n\t }\n\t }\n\t return WordArray.create(words, nBytes);\n\t }\n\t}());\n\n\n\treturn CryptoJS.enc.Base64;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var C_enc = C.enc;\n\n\t /**\n\t * Base64url encoding strategy.\n\t */\n\t var Base64url = C_enc.Base64url = {\n\t /**\n\t * Converts a word array to a Base64url string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @param {boolean} urlSafe Whether to use url safe\n\t *\n\t * @return {string} The Base64url string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var base64String = CryptoJS.enc.Base64url.stringify(wordArray);\n\t */\n\t stringify: function (wordArray, urlSafe) {\n\t if (urlSafe === undefined) {\n\t urlSafe = true\n\t }\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\t var map = urlSafe ? this._safe_map : this._map;\n\n\t // Clamp excess bits\n\t wordArray.clamp();\n\n\t // Convert\n\t var base64Chars = [];\n\t for (var i = 0; i < sigBytes; i += 3) {\n\t var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff;\n\t var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff;\n\n\t var triplet = (byte1 << 16) | (byte2 << 8) | byte3;\n\n\t for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) {\n\t base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f));\n\t }\n\t }\n\n\t // Add padding\n\t var paddingChar = map.charAt(64);\n\t if (paddingChar) {\n\t while (base64Chars.length % 4) {\n\t base64Chars.push(paddingChar);\n\t }\n\t }\n\n\t return base64Chars.join('');\n\t },\n\n\t /**\n\t * Converts a Base64url string to a word array.\n\t *\n\t * @param {string} base64Str The Base64url string.\n\t *\n\t * @param {boolean} urlSafe Whether to use url safe\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Base64url.parse(base64String);\n\t */\n\t parse: function (base64Str, urlSafe) {\n\t if (urlSafe === undefined) {\n\t urlSafe = true\n\t }\n\n\t // Shortcuts\n\t var base64StrLength = base64Str.length;\n\t var map = urlSafe ? this._safe_map : this._map;\n\t var reverseMap = this._reverseMap;\n\n\t if (!reverseMap) {\n\t reverseMap = this._reverseMap = [];\n\t for (var j = 0; j < map.length; j++) {\n\t reverseMap[map.charCodeAt(j)] = j;\n\t }\n\t }\n\n\t // Ignore padding\n\t var paddingChar = map.charAt(64);\n\t if (paddingChar) {\n\t var paddingIndex = base64Str.indexOf(paddingChar);\n\t if (paddingIndex !== -1) {\n\t base64StrLength = paddingIndex;\n\t }\n\t }\n\n\t // Convert\n\t return parseLoop(base64Str, base64StrLength, reverseMap);\n\n\t },\n\n\t _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',\n\t _safe_map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_',\n\t };\n\n\t function parseLoop(base64Str, base64StrLength, reverseMap) {\n\t var words = [];\n\t var nBytes = 0;\n\t for (var i = 0; i < base64StrLength; i++) {\n\t if (i % 4) {\n\t var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2);\n\t var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2);\n\t var bitsCombined = bits1 | bits2;\n\t words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8);\n\t nBytes++;\n\t }\n\t }\n\t return WordArray.create(words, nBytes);\n\t }\n\t}());\n\n\n\treturn CryptoJS.enc.Base64url;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Constants table\n\t var T = [];\n\n\t // Compute constants\n\t (function () {\n\t for (var i = 0; i < 64; i++) {\n\t T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0;\n\t }\n\t }());\n\n\t /**\n\t * MD5 hash algorithm.\n\t */\n\t var MD5 = C_algo.MD5 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init([\n\t 0x67452301, 0xefcdab89,\n\t 0x98badcfe, 0x10325476\n\t ]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Swap endian\n\t for (var i = 0; i < 16; i++) {\n\t // Shortcuts\n\t var offset_i = offset + i;\n\t var M_offset_i = M[offset_i];\n\n\t M[offset_i] = (\n\t (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |\n\t (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)\n\t );\n\t }\n\n\t // Shortcuts\n\t var H = this._hash.words;\n\n\t var M_offset_0 = M[offset + 0];\n\t var M_offset_1 = M[offset + 1];\n\t var M_offset_2 = M[offset + 2];\n\t var M_offset_3 = M[offset + 3];\n\t var M_offset_4 = M[offset + 4];\n\t var M_offset_5 = M[offset + 5];\n\t var M_offset_6 = M[offset + 6];\n\t var M_offset_7 = M[offset + 7];\n\t var M_offset_8 = M[offset + 8];\n\t var M_offset_9 = M[offset + 9];\n\t var M_offset_10 = M[offset + 10];\n\t var M_offset_11 = M[offset + 11];\n\t var M_offset_12 = M[offset + 12];\n\t var M_offset_13 = M[offset + 13];\n\t var M_offset_14 = M[offset + 14];\n\t var M_offset_15 = M[offset + 15];\n\n\t // Working variables\n\t var a = H[0];\n\t var b = H[1];\n\t var c = H[2];\n\t var d = H[3];\n\n\t // Computation\n\t a = FF(a, b, c, d, M_offset_0, 7, T[0]);\n\t d = FF(d, a, b, c, M_offset_1, 12, T[1]);\n\t c = FF(c, d, a, b, M_offset_2, 17, T[2]);\n\t b = FF(b, c, d, a, M_offset_3, 22, T[3]);\n\t a = FF(a, b, c, d, M_offset_4, 7, T[4]);\n\t d = FF(d, a, b, c, M_offset_5, 12, T[5]);\n\t c = FF(c, d, a, b, M_offset_6, 17, T[6]);\n\t b = FF(b, c, d, a, M_offset_7, 22, T[7]);\n\t a = FF(a, b, c, d, M_offset_8, 7, T[8]);\n\t d = FF(d, a, b, c, M_offset_9, 12, T[9]);\n\t c = FF(c, d, a, b, M_offset_10, 17, T[10]);\n\t b = FF(b, c, d, a, M_offset_11, 22, T[11]);\n\t a = FF(a, b, c, d, M_offset_12, 7, T[12]);\n\t d = FF(d, a, b, c, M_offset_13, 12, T[13]);\n\t c = FF(c, d, a, b, M_offset_14, 17, T[14]);\n\t b = FF(b, c, d, a, M_offset_15, 22, T[15]);\n\n\t a = GG(a, b, c, d, M_offset_1, 5, T[16]);\n\t d = GG(d, a, b, c, M_offset_6, 9, T[17]);\n\t c = GG(c, d, a, b, M_offset_11, 14, T[18]);\n\t b = GG(b, c, d, a, M_offset_0, 20, T[19]);\n\t a = GG(a, b, c, d, M_offset_5, 5, T[20]);\n\t d = GG(d, a, b, c, M_offset_10, 9, T[21]);\n\t c = GG(c, d, a, b, M_offset_15, 14, T[22]);\n\t b = GG(b, c, d, a, M_offset_4, 20, T[23]);\n\t a = GG(a, b, c, d, M_offset_9, 5, T[24]);\n\t d = GG(d, a, b, c, M_offset_14, 9, T[25]);\n\t c = GG(c, d, a, b, M_offset_3, 14, T[26]);\n\t b = GG(b, c, d, a, M_offset_8, 20, T[27]);\n\t a = GG(a, b, c, d, M_offset_13, 5, T[28]);\n\t d = GG(d, a, b, c, M_offset_2, 9, T[29]);\n\t c = GG(c, d, a, b, M_offset_7, 14, T[30]);\n\t b = GG(b, c, d, a, M_offset_12, 20, T[31]);\n\n\t a = HH(a, b, c, d, M_offset_5, 4, T[32]);\n\t d = HH(d, a, b, c, M_offset_8, 11, T[33]);\n\t c = HH(c, d, a, b, M_offset_11, 16, T[34]);\n\t b = HH(b, c, d, a, M_offset_14, 23, T[35]);\n\t a = HH(a, b, c, d, M_offset_1, 4, T[36]);\n\t d = HH(d, a, b, c, M_offset_4, 11, T[37]);\n\t c = HH(c, d, a, b, M_offset_7, 16, T[38]);\n\t b = HH(b, c, d, a, M_offset_10, 23, T[39]);\n\t a = HH(a, b, c, d, M_offset_13, 4, T[40]);\n\t d = HH(d, a, b, c, M_offset_0, 11, T[41]);\n\t c = HH(c, d, a, b, M_offset_3, 16, T[42]);\n\t b = HH(b, c, d, a, M_offset_6, 23, T[43]);\n\t a = HH(a, b, c, d, M_offset_9, 4, T[44]);\n\t d = HH(d, a, b, c, M_offset_12, 11, T[45]);\n\t c = HH(c, d, a, b, M_offset_15, 16, T[46]);\n\t b = HH(b, c, d, a, M_offset_2, 23, T[47]);\n\n\t a = II(a, b, c, d, M_offset_0, 6, T[48]);\n\t d = II(d, a, b, c, M_offset_7, 10, T[49]);\n\t c = II(c, d, a, b, M_offset_14, 15, T[50]);\n\t b = II(b, c, d, a, M_offset_5, 21, T[51]);\n\t a = II(a, b, c, d, M_offset_12, 6, T[52]);\n\t d = II(d, a, b, c, M_offset_3, 10, T[53]);\n\t c = II(c, d, a, b, M_offset_10, 15, T[54]);\n\t b = II(b, c, d, a, M_offset_1, 21, T[55]);\n\t a = II(a, b, c, d, M_offset_8, 6, T[56]);\n\t d = II(d, a, b, c, M_offset_15, 10, T[57]);\n\t c = II(c, d, a, b, M_offset_6, 15, T[58]);\n\t b = II(b, c, d, a, M_offset_13, 21, T[59]);\n\t a = II(a, b, c, d, M_offset_4, 6, T[60]);\n\t d = II(d, a, b, c, M_offset_11, 10, T[61]);\n\t c = II(c, d, a, b, M_offset_2, 15, T[62]);\n\t b = II(b, c, d, a, M_offset_9, 21, T[63]);\n\n\t // Intermediate hash value\n\t H[0] = (H[0] + a) | 0;\n\t H[1] = (H[1] + b) | 0;\n\t H[2] = (H[2] + c) | 0;\n\t H[3] = (H[3] + d) | 0;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\n\t var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000);\n\t var nBitsTotalL = nBitsTotal;\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = (\n\t (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) |\n\t (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00)\n\t );\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (\n\t (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) |\n\t (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00)\n\t );\n\n\t data.sigBytes = (dataWords.length + 1) * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Shortcuts\n\t var hash = this._hash;\n\t var H = hash.words;\n\n\t // Swap endian\n\t for (var i = 0; i < 4; i++) {\n\t // Shortcut\n\t var H_i = H[i];\n\n\t H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |\n\t (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);\n\t }\n\n\t // Return final computed hash\n\t return hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\t function FF(a, b, c, d, x, s, t) {\n\t var n = a + ((b & c) | (~b & d)) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t function GG(a, b, c, d, x, s, t) {\n\t var n = a + ((b & d) | (c & ~d)) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t function HH(a, b, c, d, x, s, t) {\n\t var n = a + (b ^ c ^ d) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t function II(a, b, c, d, x, s, t) {\n\t var n = a + (c ^ (b | ~d)) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.MD5('message');\n\t * var hash = CryptoJS.MD5(wordArray);\n\t */\n\t C.MD5 = Hasher._createHelper(MD5);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacMD5(message, key);\n\t */\n\t C.HmacMD5 = Hasher._createHmacHelper(MD5);\n\t}(Math));\n\n\n\treturn CryptoJS.MD5;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Reusable object\n\t var W = [];\n\n\t /**\n\t * SHA-1 hash algorithm.\n\t */\n\t var SHA1 = C_algo.SHA1 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init([\n\t 0x67452301, 0xefcdab89,\n\t 0x98badcfe, 0x10325476,\n\t 0xc3d2e1f0\n\t ]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var H = this._hash.words;\n\n\t // Working variables\n\t var a = H[0];\n\t var b = H[1];\n\t var c = H[2];\n\t var d = H[3];\n\t var e = H[4];\n\n\t // Computation\n\t for (var i = 0; i < 80; i++) {\n\t if (i < 16) {\n\t W[i] = M[offset + i] | 0;\n\t } else {\n\t var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];\n\t W[i] = (n << 1) | (n >>> 31);\n\t }\n\n\t var t = ((a << 5) | (a >>> 27)) + e + W[i];\n\t if (i < 20) {\n\t t += ((b & c) | (~b & d)) + 0x5a827999;\n\t } else if (i < 40) {\n\t t += (b ^ c ^ d) + 0x6ed9eba1;\n\t } else if (i < 60) {\n\t t += ((b & c) | (b & d) | (c & d)) - 0x70e44324;\n\t } else /* if (i < 80) */ {\n\t t += (b ^ c ^ d) - 0x359d3e2a;\n\t }\n\n\t e = d;\n\t d = c;\n\t c = (b << 30) | (b >>> 2);\n\t b = a;\n\t a = t;\n\t }\n\n\t // Intermediate hash value\n\t H[0] = (H[0] + a) | 0;\n\t H[1] = (H[1] + b) | 0;\n\t H[2] = (H[2] + c) | 0;\n\t H[3] = (H[3] + d) | 0;\n\t H[4] = (H[4] + e) | 0;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Return final computed hash\n\t return this._hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA1('message');\n\t * var hash = CryptoJS.SHA1(wordArray);\n\t */\n\t C.SHA1 = Hasher._createHelper(SHA1);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA1(message, key);\n\t */\n\t C.HmacSHA1 = Hasher._createHmacHelper(SHA1);\n\t}());\n\n\n\treturn CryptoJS.SHA1;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Initialization and round constants tables\n\t var H = [];\n\t var K = [];\n\n\t // Compute constants\n\t (function () {\n\t function isPrime(n) {\n\t var sqrtN = Math.sqrt(n);\n\t for (var factor = 2; factor <= sqrtN; factor++) {\n\t if (!(n % factor)) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t }\n\n\t function getFractionalBits(n) {\n\t return ((n - (n | 0)) * 0x100000000) | 0;\n\t }\n\n\t var n = 2;\n\t var nPrime = 0;\n\t while (nPrime < 64) {\n\t if (isPrime(n)) {\n\t if (nPrime < 8) {\n\t H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2));\n\t }\n\t K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3));\n\n\t nPrime++;\n\t }\n\n\t n++;\n\t }\n\t }());\n\n\t // Reusable object\n\t var W = [];\n\n\t /**\n\t * SHA-256 hash algorithm.\n\t */\n\t var SHA256 = C_algo.SHA256 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init(H.slice(0));\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var H = this._hash.words;\n\n\t // Working variables\n\t var a = H[0];\n\t var b = H[1];\n\t var c = H[2];\n\t var d = H[3];\n\t var e = H[4];\n\t var f = H[5];\n\t var g = H[6];\n\t var h = H[7];\n\n\t // Computation\n\t for (var i = 0; i < 64; i++) {\n\t if (i < 16) {\n\t W[i] = M[offset + i] | 0;\n\t } else {\n\t var gamma0x = W[i - 15];\n\t var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^\n\t ((gamma0x << 14) | (gamma0x >>> 18)) ^\n\t (gamma0x >>> 3);\n\n\t var gamma1x = W[i - 2];\n\t var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^\n\t ((gamma1x << 13) | (gamma1x >>> 19)) ^\n\t (gamma1x >>> 10);\n\n\t W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];\n\t }\n\n\t var ch = (e & f) ^ (~e & g);\n\t var maj = (a & b) ^ (a & c) ^ (b & c);\n\n\t var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22));\n\t var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25));\n\n\t var t1 = h + sigma1 + ch + K[i] + W[i];\n\t var t2 = sigma0 + maj;\n\n\t h = g;\n\t g = f;\n\t f = e;\n\t e = (d + t1) | 0;\n\t d = c;\n\t c = b;\n\t b = a;\n\t a = (t1 + t2) | 0;\n\t }\n\n\t // Intermediate hash value\n\t H[0] = (H[0] + a) | 0;\n\t H[1] = (H[1] + b) | 0;\n\t H[2] = (H[2] + c) | 0;\n\t H[3] = (H[3] + d) | 0;\n\t H[4] = (H[4] + e) | 0;\n\t H[5] = (H[5] + f) | 0;\n\t H[6] = (H[6] + g) | 0;\n\t H[7] = (H[7] + h) | 0;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Return final computed hash\n\t return this._hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA256('message');\n\t * var hash = CryptoJS.SHA256(wordArray);\n\t */\n\t C.SHA256 = Hasher._createHelper(SHA256);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA256(message, key);\n\t */\n\t C.HmacSHA256 = Hasher._createHmacHelper(SHA256);\n\t}(Math));\n\n\n\treturn CryptoJS.SHA256;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./sha256\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./sha256\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var C_algo = C.algo;\n\t var SHA256 = C_algo.SHA256;\n\n\t /**\n\t * SHA-224 hash algorithm.\n\t */\n\t var SHA224 = C_algo.SHA224 = SHA256.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init([\n\t 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,\n\t 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4\n\t ]);\n\t },\n\n\t _doFinalize: function () {\n\t var hash = SHA256._doFinalize.call(this);\n\n\t hash.sigBytes -= 4;\n\n\t return hash;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA224('message');\n\t * var hash = CryptoJS.SHA224(wordArray);\n\t */\n\t C.SHA224 = SHA256._createHelper(SHA224);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA224(message, key);\n\t */\n\t C.HmacSHA224 = SHA256._createHmacHelper(SHA224);\n\t}());\n\n\n\treturn CryptoJS.SHA224;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./x64-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./x64-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Hasher = C_lib.Hasher;\n\t var C_x64 = C.x64;\n\t var X64Word = C_x64.Word;\n\t var X64WordArray = C_x64.WordArray;\n\t var C_algo = C.algo;\n\n\t function X64Word_create() {\n\t return X64Word.create.apply(X64Word, arguments);\n\t }\n\n\t // Constants\n\t var K = [\n\t X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd),\n\t X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc),\n\t X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019),\n\t X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118),\n\t X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe),\n\t X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2),\n\t X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1),\n\t X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694),\n\t X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3),\n\t X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65),\n\t X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483),\n\t X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5),\n\t X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210),\n\t X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4),\n\t X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725),\n\t X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70),\n\t X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926),\n\t X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df),\n\t X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8),\n\t X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b),\n\t X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001),\n\t X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30),\n\t X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910),\n\t X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8),\n\t X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53),\n\t X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8),\n\t X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb),\n\t X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3),\n\t X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60),\n\t X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec),\n\t X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9),\n\t X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b),\n\t X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207),\n\t X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178),\n\t X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6),\n\t X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b),\n\t X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493),\n\t X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c),\n\t X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a),\n\t X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817)\n\t ];\n\n\t // Reusable objects\n\t var W = [];\n\t (function () {\n\t for (var i = 0; i < 80; i++) {\n\t W[i] = X64Word_create();\n\t }\n\t }());\n\n\t /**\n\t * SHA-512 hash algorithm.\n\t */\n\t var SHA512 = C_algo.SHA512 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new X64WordArray.init([\n\t new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b),\n\t new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1),\n\t new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f),\n\t new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179)\n\t ]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcuts\n\t var H = this._hash.words;\n\n\t var H0 = H[0];\n\t var H1 = H[1];\n\t var H2 = H[2];\n\t var H3 = H[3];\n\t var H4 = H[4];\n\t var H5 = H[5];\n\t var H6 = H[6];\n\t var H7 = H[7];\n\n\t var H0h = H0.high;\n\t var H0l = H0.low;\n\t var H1h = H1.high;\n\t var H1l = H1.low;\n\t var H2h = H2.high;\n\t var H2l = H2.low;\n\t var H3h = H3.high;\n\t var H3l = H3.low;\n\t var H4h = H4.high;\n\t var H4l = H4.low;\n\t var H5h = H5.high;\n\t var H5l = H5.low;\n\t var H6h = H6.high;\n\t var H6l = H6.low;\n\t var H7h = H7.high;\n\t var H7l = H7.low;\n\n\t // Working variables\n\t var ah = H0h;\n\t var al = H0l;\n\t var bh = H1h;\n\t var bl = H1l;\n\t var ch = H2h;\n\t var cl = H2l;\n\t var dh = H3h;\n\t var dl = H3l;\n\t var eh = H4h;\n\t var el = H4l;\n\t var fh = H5h;\n\t var fl = H5l;\n\t var gh = H6h;\n\t var gl = H6l;\n\t var hh = H7h;\n\t var hl = H7l;\n\n\t // Rounds\n\t for (var i = 0; i < 80; i++) {\n\t var Wil;\n\t var Wih;\n\n\t // Shortcut\n\t var Wi = W[i];\n\n\t // Extend message\n\t if (i < 16) {\n\t Wih = Wi.high = M[offset + i * 2] | 0;\n\t Wil = Wi.low = M[offset + i * 2 + 1] | 0;\n\t } else {\n\t // Gamma0\n\t var gamma0x = W[i - 15];\n\t var gamma0xh = gamma0x.high;\n\t var gamma0xl = gamma0x.low;\n\t var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7);\n\t var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25));\n\n\t // Gamma1\n\t var gamma1x = W[i - 2];\n\t var gamma1xh = gamma1x.high;\n\t var gamma1xl = gamma1x.low;\n\t var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6);\n\t var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26));\n\n\t // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]\n\t var Wi7 = W[i - 7];\n\t var Wi7h = Wi7.high;\n\t var Wi7l = Wi7.low;\n\n\t var Wi16 = W[i - 16];\n\t var Wi16h = Wi16.high;\n\t var Wi16l = Wi16.low;\n\n\t Wil = gamma0l + Wi7l;\n\t Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0);\n\t Wil = Wil + gamma1l;\n\t Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0);\n\t Wil = Wil + Wi16l;\n\t Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0);\n\n\t Wi.high = Wih;\n\t Wi.low = Wil;\n\t }\n\n\t var chh = (eh & fh) ^ (~eh & gh);\n\t var chl = (el & fl) ^ (~el & gl);\n\t var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch);\n\t var majl = (al & bl) ^ (al & cl) ^ (bl & cl);\n\n\t var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7));\n\t var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7));\n\t var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9));\n\t var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9));\n\n\t // t1 = h + sigma1 + ch + K[i] + W[i]\n\t var Ki = K[i];\n\t var Kih = Ki.high;\n\t var Kil = Ki.low;\n\n\t var t1l = hl + sigma1l;\n\t var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0);\n\t var t1l = t1l + chl;\n\t var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0);\n\t var t1l = t1l + Kil;\n\t var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0);\n\t var t1l = t1l + Wil;\n\t var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0);\n\n\t // t2 = sigma0 + maj\n\t var t2l = sigma0l + majl;\n\t var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0);\n\n\t // Update working variables\n\t hh = gh;\n\t hl = gl;\n\t gh = fh;\n\t gl = fl;\n\t fh = eh;\n\t fl = el;\n\t el = (dl + t1l) | 0;\n\t eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0;\n\t dh = ch;\n\t dl = cl;\n\t ch = bh;\n\t cl = bl;\n\t bh = ah;\n\t bl = al;\n\t al = (t1l + t2l) | 0;\n\t ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0;\n\t }\n\n\t // Intermediate hash value\n\t H0l = H0.low = (H0l + al);\n\t H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0));\n\t H1l = H1.low = (H1l + bl);\n\t H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0));\n\t H2l = H2.low = (H2l + cl);\n\t H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0));\n\t H3l = H3.low = (H3l + dl);\n\t H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0));\n\t H4l = H4.low = (H4l + el);\n\t H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0));\n\t H5l = H5.low = (H5l + fl);\n\t H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0));\n\t H6l = H6.low = (H6l + gl);\n\t H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0));\n\t H7l = H7.low = (H7l + hl);\n\t H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0));\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000);\n\t dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Convert hash to 32-bit word array before returning\n\t var hash = this._hash.toX32();\n\n\t // Return final computed hash\n\t return hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t },\n\n\t blockSize: 1024/32\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA512('message');\n\t * var hash = CryptoJS.SHA512(wordArray);\n\t */\n\t C.SHA512 = Hasher._createHelper(SHA512);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA512(message, key);\n\t */\n\t C.HmacSHA512 = Hasher._createHmacHelper(SHA512);\n\t}());\n\n\n\treturn CryptoJS.SHA512;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./x64-core\"), require(\"./sha512\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./x64-core\", \"./sha512\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_x64 = C.x64;\n\t var X64Word = C_x64.Word;\n\t var X64WordArray = C_x64.WordArray;\n\t var C_algo = C.algo;\n\t var SHA512 = C_algo.SHA512;\n\n\t /**\n\t * SHA-384 hash algorithm.\n\t */\n\t var SHA384 = C_algo.SHA384 = SHA512.extend({\n\t _doReset: function () {\n\t this._hash = new X64WordArray.init([\n\t new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507),\n\t new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939),\n\t new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511),\n\t new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4)\n\t ]);\n\t },\n\n\t _doFinalize: function () {\n\t var hash = SHA512._doFinalize.call(this);\n\n\t hash.sigBytes -= 16;\n\n\t return hash;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA384('message');\n\t * var hash = CryptoJS.SHA384(wordArray);\n\t */\n\t C.SHA384 = SHA512._createHelper(SHA384);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA384(message, key);\n\t */\n\t C.HmacSHA384 = SHA512._createHmacHelper(SHA384);\n\t}());\n\n\n\treturn CryptoJS.SHA384;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./x64-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./x64-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_x64 = C.x64;\n\t var X64Word = C_x64.Word;\n\t var C_algo = C.algo;\n\n\t // Constants tables\n\t var RHO_OFFSETS = [];\n\t var PI_INDEXES = [];\n\t var ROUND_CONSTANTS = [];\n\n\t // Compute Constants\n\t (function () {\n\t // Compute rho offset constants\n\t var x = 1, y = 0;\n\t for (var t = 0; t < 24; t++) {\n\t RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64;\n\n\t var newX = y % 5;\n\t var newY = (2 * x + 3 * y) % 5;\n\t x = newX;\n\t y = newY;\n\t }\n\n\t // Compute pi index constants\n\t for (var x = 0; x < 5; x++) {\n\t for (var y = 0; y < 5; y++) {\n\t PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5;\n\t }\n\t }\n\n\t // Compute round constants\n\t var LFSR = 0x01;\n\t for (var i = 0; i < 24; i++) {\n\t var roundConstantMsw = 0;\n\t var roundConstantLsw = 0;\n\n\t for (var j = 0; j < 7; j++) {\n\t if (LFSR & 0x01) {\n\t var bitPosition = (1 << j) - 1;\n\t if (bitPosition < 32) {\n\t roundConstantLsw ^= 1 << bitPosition;\n\t } else /* if (bitPosition >= 32) */ {\n\t roundConstantMsw ^= 1 << (bitPosition - 32);\n\t }\n\t }\n\n\t // Compute next LFSR\n\t if (LFSR & 0x80) {\n\t // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1\n\t LFSR = (LFSR << 1) ^ 0x71;\n\t } else {\n\t LFSR <<= 1;\n\t }\n\t }\n\n\t ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw);\n\t }\n\t }());\n\n\t // Reusable objects for temporary values\n\t var T = [];\n\t (function () {\n\t for (var i = 0; i < 25; i++) {\n\t T[i] = X64Word.create();\n\t }\n\t }());\n\n\t /**\n\t * SHA-3 hash algorithm.\n\t */\n\t var SHA3 = C_algo.SHA3 = Hasher.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} outputLength\n\t * The desired number of bits in the output hash.\n\t * Only values permitted are: 224, 256, 384, 512.\n\t * Default: 512\n\t */\n\t cfg: Hasher.cfg.extend({\n\t outputLength: 512\n\t }),\n\n\t _doReset: function () {\n\t var state = this._state = []\n\t for (var i = 0; i < 25; i++) {\n\t state[i] = new X64Word.init();\n\t }\n\n\t this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcuts\n\t var state = this._state;\n\t var nBlockSizeLanes = this.blockSize / 2;\n\n\t // Absorb\n\t for (var i = 0; i < nBlockSizeLanes; i++) {\n\t // Shortcuts\n\t var M2i = M[offset + 2 * i];\n\t var M2i1 = M[offset + 2 * i + 1];\n\n\t // Swap endian\n\t M2i = (\n\t (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) |\n\t (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00)\n\t );\n\t M2i1 = (\n\t (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) |\n\t (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00)\n\t );\n\n\t // Absorb message into state\n\t var lane = state[i];\n\t lane.high ^= M2i1;\n\t lane.low ^= M2i;\n\t }\n\n\t // Rounds\n\t for (var round = 0; round < 24; round++) {\n\t // Theta\n\t for (var x = 0; x < 5; x++) {\n\t // Mix column lanes\n\t var tMsw = 0, tLsw = 0;\n\t for (var y = 0; y < 5; y++) {\n\t var lane = state[x + 5 * y];\n\t tMsw ^= lane.high;\n\t tLsw ^= lane.low;\n\t }\n\n\t // Temporary values\n\t var Tx = T[x];\n\t Tx.high = tMsw;\n\t Tx.low = tLsw;\n\t }\n\t for (var x = 0; x < 5; x++) {\n\t // Shortcuts\n\t var Tx4 = T[(x + 4) % 5];\n\t var Tx1 = T[(x + 1) % 5];\n\t var Tx1Msw = Tx1.high;\n\t var Tx1Lsw = Tx1.low;\n\n\t // Mix surrounding columns\n\t var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31));\n\t var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31));\n\t for (var y = 0; y < 5; y++) {\n\t var lane = state[x + 5 * y];\n\t lane.high ^= tMsw;\n\t lane.low ^= tLsw;\n\t }\n\t }\n\n\t // Rho Pi\n\t for (var laneIndex = 1; laneIndex < 25; laneIndex++) {\n\t var tMsw;\n\t var tLsw;\n\n\t // Shortcuts\n\t var lane = state[laneIndex];\n\t var laneMsw = lane.high;\n\t var laneLsw = lane.low;\n\t var rhoOffset = RHO_OFFSETS[laneIndex];\n\n\t // Rotate lanes\n\t if (rhoOffset < 32) {\n\t tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset));\n\t tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset));\n\t } else /* if (rhoOffset >= 32) */ {\n\t tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset));\n\t tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset));\n\t }\n\n\t // Transpose lanes\n\t var TPiLane = T[PI_INDEXES[laneIndex]];\n\t TPiLane.high = tMsw;\n\t TPiLane.low = tLsw;\n\t }\n\n\t // Rho pi at x = y = 0\n\t var T0 = T[0];\n\t var state0 = state[0];\n\t T0.high = state0.high;\n\t T0.low = state0.low;\n\n\t // Chi\n\t for (var x = 0; x < 5; x++) {\n\t for (var y = 0; y < 5; y++) {\n\t // Shortcuts\n\t var laneIndex = x + 5 * y;\n\t var lane = state[laneIndex];\n\t var TLane = T[laneIndex];\n\t var Tx1Lane = T[((x + 1) % 5) + 5 * y];\n\t var Tx2Lane = T[((x + 2) % 5) + 5 * y];\n\n\t // Mix rows\n\t lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high);\n\t lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low);\n\t }\n\t }\n\n\t // Iota\n\t var lane = state[0];\n\t var roundConstant = ROUND_CONSTANTS[round];\n\t lane.high ^= roundConstant.high;\n\t lane.low ^= roundConstant.low;\n\t }\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\t var blockSizeBits = this.blockSize * 32;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32);\n\t dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Shortcuts\n\t var state = this._state;\n\t var outputLengthBytes = this.cfg.outputLength / 8;\n\t var outputLengthLanes = outputLengthBytes / 8;\n\n\t // Squeeze\n\t var hashWords = [];\n\t for (var i = 0; i < outputLengthLanes; i++) {\n\t // Shortcuts\n\t var lane = state[i];\n\t var laneMsw = lane.high;\n\t var laneLsw = lane.low;\n\n\t // Swap endian\n\t laneMsw = (\n\t (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) |\n\t (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00)\n\t );\n\t laneLsw = (\n\t (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) |\n\t (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00)\n\t );\n\n\t // Squeeze state to retrieve hash\n\t hashWords.push(laneLsw);\n\t hashWords.push(laneMsw);\n\t }\n\n\t // Return final computed hash\n\t return new WordArray.init(hashWords, outputLengthBytes);\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\n\t var state = clone._state = this._state.slice(0);\n\t for (var i = 0; i < 25; i++) {\n\t state[i] = state[i].clone();\n\t }\n\n\t return clone;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA3('message');\n\t * var hash = CryptoJS.SHA3(wordArray);\n\t */\n\t C.SHA3 = Hasher._createHelper(SHA3);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA3(message, key);\n\t */\n\t C.HmacSHA3 = Hasher._createHmacHelper(SHA3);\n\t}(Math));\n\n\n\treturn CryptoJS.SHA3;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/** @preserve\n\t(c) 2012 by Cédric Mesnil. All rights reserved.\n\n\tRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n\t - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\t - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\n\tTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t*/\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Constants table\n\t var _zl = WordArray.create([\n\t 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n\t 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,\n\t 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,\n\t 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,\n\t 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]);\n\t var _zr = WordArray.create([\n\t 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,\n\t 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,\n\t 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,\n\t 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,\n\t 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]);\n\t var _sl = WordArray.create([\n\t 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,\n\t 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,\n\t 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,\n\t 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,\n\t 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]);\n\t var _sr = WordArray.create([\n\t 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,\n\t 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,\n\t 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,\n\t 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,\n\t 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]);\n\n\t var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]);\n\t var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]);\n\n\t /**\n\t * RIPEMD160 hash algorithm.\n\t */\n\t var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\n\t // Swap endian\n\t for (var i = 0; i < 16; i++) {\n\t // Shortcuts\n\t var offset_i = offset + i;\n\t var M_offset_i = M[offset_i];\n\n\t // Swap\n\t M[offset_i] = (\n\t (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |\n\t (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)\n\t );\n\t }\n\t // Shortcut\n\t var H = this._hash.words;\n\t var hl = _hl.words;\n\t var hr = _hr.words;\n\t var zl = _zl.words;\n\t var zr = _zr.words;\n\t var sl = _sl.words;\n\t var sr = _sr.words;\n\n\t // Working variables\n\t var al, bl, cl, dl, el;\n\t var ar, br, cr, dr, er;\n\n\t ar = al = H[0];\n\t br = bl = H[1];\n\t cr = cl = H[2];\n\t dr = dl = H[3];\n\t er = el = H[4];\n\t // Computation\n\t var t;\n\t for (var i = 0; i < 80; i += 1) {\n\t t = (al + M[offset+zl[i]])|0;\n\t if (i<16){\n\t\t t += f1(bl,cl,dl) + hl[0];\n\t } else if (i<32) {\n\t\t t += f2(bl,cl,dl) + hl[1];\n\t } else if (i<48) {\n\t\t t += f3(bl,cl,dl) + hl[2];\n\t } else if (i<64) {\n\t\t t += f4(bl,cl,dl) + hl[3];\n\t } else {// if (i<80) {\n\t\t t += f5(bl,cl,dl) + hl[4];\n\t }\n\t t = t|0;\n\t t = rotl(t,sl[i]);\n\t t = (t+el)|0;\n\t al = el;\n\t el = dl;\n\t dl = rotl(cl, 10);\n\t cl = bl;\n\t bl = t;\n\n\t t = (ar + M[offset+zr[i]])|0;\n\t if (i<16){\n\t\t t += f5(br,cr,dr) + hr[0];\n\t } else if (i<32) {\n\t\t t += f4(br,cr,dr) + hr[1];\n\t } else if (i<48) {\n\t\t t += f3(br,cr,dr) + hr[2];\n\t } else if (i<64) {\n\t\t t += f2(br,cr,dr) + hr[3];\n\t } else {// if (i<80) {\n\t\t t += f1(br,cr,dr) + hr[4];\n\t }\n\t t = t|0;\n\t t = rotl(t,sr[i]) ;\n\t t = (t+er)|0;\n\t ar = er;\n\t er = dr;\n\t dr = rotl(cr, 10);\n\t cr = br;\n\t br = t;\n\t }\n\t // Intermediate hash value\n\t t = (H[1] + cl + dr)|0;\n\t H[1] = (H[2] + dl + er)|0;\n\t H[2] = (H[3] + el + ar)|0;\n\t H[3] = (H[4] + al + br)|0;\n\t H[4] = (H[0] + bl + cr)|0;\n\t H[0] = t;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (\n\t (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) |\n\t (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00)\n\t );\n\t data.sigBytes = (dataWords.length + 1) * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Shortcuts\n\t var hash = this._hash;\n\t var H = hash.words;\n\n\t // Swap endian\n\t for (var i = 0; i < 5; i++) {\n\t // Shortcut\n\t var H_i = H[i];\n\n\t // Swap\n\t H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |\n\t (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);\n\t }\n\n\t // Return final computed hash\n\t return hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\n\t function f1(x, y, z) {\n\t return ((x) ^ (y) ^ (z));\n\n\t }\n\n\t function f2(x, y, z) {\n\t return (((x)&(y)) | ((~x)&(z)));\n\t }\n\n\t function f3(x, y, z) {\n\t return (((x) | (~(y))) ^ (z));\n\t }\n\n\t function f4(x, y, z) {\n\t return (((x) & (z)) | ((y)&(~(z))));\n\t }\n\n\t function f5(x, y, z) {\n\t return ((x) ^ ((y) |(~(z))));\n\n\t }\n\n\t function rotl(x,n) {\n\t return (x<>>(32-n));\n\t }\n\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.RIPEMD160('message');\n\t * var hash = CryptoJS.RIPEMD160(wordArray);\n\t */\n\t C.RIPEMD160 = Hasher._createHelper(RIPEMD160);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacRIPEMD160(message, key);\n\t */\n\t C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160);\n\t}(Math));\n\n\n\treturn CryptoJS.RIPEMD160;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var C_enc = C.enc;\n\t var Utf8 = C_enc.Utf8;\n\t var C_algo = C.algo;\n\n\t /**\n\t * HMAC algorithm.\n\t */\n\t var HMAC = C_algo.HMAC = Base.extend({\n\t /**\n\t * Initializes a newly created HMAC.\n\t *\n\t * @param {Hasher} hasher The hash algorithm to use.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @example\n\t *\n\t * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);\n\t */\n\t init: function (hasher, key) {\n\t // Init hasher\n\t hasher = this._hasher = new hasher.init();\n\n\t // Convert string to WordArray, else assume WordArray already\n\t if (typeof key == 'string') {\n\t key = Utf8.parse(key);\n\t }\n\n\t // Shortcuts\n\t var hasherBlockSize = hasher.blockSize;\n\t var hasherBlockSizeBytes = hasherBlockSize * 4;\n\n\t // Allow arbitrary length keys\n\t if (key.sigBytes > hasherBlockSizeBytes) {\n\t key = hasher.finalize(key);\n\t }\n\n\t // Clamp excess bits\n\t key.clamp();\n\n\t // Clone key for inner and outer pads\n\t var oKey = this._oKey = key.clone();\n\t var iKey = this._iKey = key.clone();\n\n\t // Shortcuts\n\t var oKeyWords = oKey.words;\n\t var iKeyWords = iKey.words;\n\n\t // XOR keys with pad constants\n\t for (var i = 0; i < hasherBlockSize; i++) {\n\t oKeyWords[i] ^= 0x5c5c5c5c;\n\t iKeyWords[i] ^= 0x36363636;\n\t }\n\t oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes;\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this HMAC to its initial state.\n\t *\n\t * @example\n\t *\n\t * hmacHasher.reset();\n\t */\n\t reset: function () {\n\t // Shortcut\n\t var hasher = this._hasher;\n\n\t // Reset\n\t hasher.reset();\n\t hasher.update(this._iKey);\n\t },\n\n\t /**\n\t * Updates this HMAC with a message.\n\t *\n\t * @param {WordArray|string} messageUpdate The message to append.\n\t *\n\t * @return {HMAC} This HMAC instance.\n\t *\n\t * @example\n\t *\n\t * hmacHasher.update('message');\n\t * hmacHasher.update(wordArray);\n\t */\n\t update: function (messageUpdate) {\n\t this._hasher.update(messageUpdate);\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Finalizes the HMAC computation.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} messageUpdate (Optional) A final message update.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @example\n\t *\n\t * var hmac = hmacHasher.finalize();\n\t * var hmac = hmacHasher.finalize('message');\n\t * var hmac = hmacHasher.finalize(wordArray);\n\t */\n\t finalize: function (messageUpdate) {\n\t // Shortcut\n\t var hasher = this._hasher;\n\n\t // Compute HMAC\n\t var innerHash = hasher.finalize(messageUpdate);\n\t hasher.reset();\n\t var hmac = hasher.finalize(this._oKey.clone().concat(innerHash));\n\n\t return hmac;\n\t }\n\t });\n\t}());\n\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./sha256\"), require(\"./hmac\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./sha256\", \"./hmac\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var WordArray = C_lib.WordArray;\n\t var C_algo = C.algo;\n\t var SHA256 = C_algo.SHA256;\n\t var HMAC = C_algo.HMAC;\n\n\t /**\n\t * Password-Based Key Derivation Function 2 algorithm.\n\t */\n\t var PBKDF2 = C_algo.PBKDF2 = Base.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)\n\t * @property {Hasher} hasher The hasher to use. Default: SHA256\n\t * @property {number} iterations The number of iterations to perform. Default: 250000\n\t */\n\t cfg: Base.extend({\n\t keySize: 128/32,\n\t hasher: SHA256,\n\t iterations: 250000\n\t }),\n\n\t /**\n\t * Initializes a newly created key derivation function.\n\t *\n\t * @param {Object} cfg (Optional) The configuration options to use for the derivation.\n\t *\n\t * @example\n\t *\n\t * var kdf = CryptoJS.algo.PBKDF2.create();\n\t * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 });\n\t * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 });\n\t */\n\t init: function (cfg) {\n\t this.cfg = this.cfg.extend(cfg);\n\t },\n\n\t /**\n\t * Computes the Password-Based Key Derivation Function 2.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @example\n\t *\n\t * var key = kdf.compute(password, salt);\n\t */\n\t compute: function (password, salt) {\n\t // Shortcut\n\t var cfg = this.cfg;\n\n\t // Init HMAC\n\t var hmac = HMAC.create(cfg.hasher, password);\n\n\t // Initial values\n\t var derivedKey = WordArray.create();\n\t var blockIndex = WordArray.create([0x00000001]);\n\n\t // Shortcuts\n\t var derivedKeyWords = derivedKey.words;\n\t var blockIndexWords = blockIndex.words;\n\t var keySize = cfg.keySize;\n\t var iterations = cfg.iterations;\n\n\t // Generate key\n\t while (derivedKeyWords.length < keySize) {\n\t var block = hmac.update(salt).finalize(blockIndex);\n\t hmac.reset();\n\n\t // Shortcuts\n\t var blockWords = block.words;\n\t var blockWordsLength = blockWords.length;\n\n\t // Iterations\n\t var intermediate = block;\n\t for (var i = 1; i < iterations; i++) {\n\t intermediate = hmac.finalize(intermediate);\n\t hmac.reset();\n\n\t // Shortcut\n\t var intermediateWords = intermediate.words;\n\n\t // XOR intermediate with block\n\t for (var j = 0; j < blockWordsLength; j++) {\n\t blockWords[j] ^= intermediateWords[j];\n\t }\n\t }\n\n\t derivedKey.concat(block);\n\t blockIndexWords[0]++;\n\t }\n\t derivedKey.sigBytes = keySize * 4;\n\n\t return derivedKey;\n\t }\n\t });\n\n\t /**\n\t * Computes the Password-Based Key Derivation Function 2.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t * @param {Object} cfg (Optional) The configuration options to use for this computation.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var key = CryptoJS.PBKDF2(password, salt);\n\t * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 });\n\t * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 });\n\t */\n\t C.PBKDF2 = function (password, salt, cfg) {\n\t return PBKDF2.create(cfg).compute(password, salt);\n\t };\n\t}());\n\n\n\treturn CryptoJS.PBKDF2;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./sha1\"), require(\"./hmac\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./sha1\", \"./hmac\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var WordArray = C_lib.WordArray;\n\t var C_algo = C.algo;\n\t var MD5 = C_algo.MD5;\n\n\t /**\n\t * This key derivation function is meant to conform with EVP_BytesToKey.\n\t * www.openssl.org/docs/crypto/EVP_BytesToKey.html\n\t */\n\t var EvpKDF = C_algo.EvpKDF = Base.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)\n\t * @property {Hasher} hasher The hash algorithm to use. Default: MD5\n\t * @property {number} iterations The number of iterations to perform. Default: 1\n\t */\n\t cfg: Base.extend({\n\t keySize: 128/32,\n\t hasher: MD5,\n\t iterations: 1\n\t }),\n\n\t /**\n\t * Initializes a newly created key derivation function.\n\t *\n\t * @param {Object} cfg (Optional) The configuration options to use for the derivation.\n\t *\n\t * @example\n\t *\n\t * var kdf = CryptoJS.algo.EvpKDF.create();\n\t * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 });\n\t * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 });\n\t */\n\t init: function (cfg) {\n\t this.cfg = this.cfg.extend(cfg);\n\t },\n\n\t /**\n\t * Derives a key from a password.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @example\n\t *\n\t * var key = kdf.compute(password, salt);\n\t */\n\t compute: function (password, salt) {\n\t var block;\n\n\t // Shortcut\n\t var cfg = this.cfg;\n\n\t // Init hasher\n\t var hasher = cfg.hasher.create();\n\n\t // Initial values\n\t var derivedKey = WordArray.create();\n\n\t // Shortcuts\n\t var derivedKeyWords = derivedKey.words;\n\t var keySize = cfg.keySize;\n\t var iterations = cfg.iterations;\n\n\t // Generate key\n\t while (derivedKeyWords.length < keySize) {\n\t if (block) {\n\t hasher.update(block);\n\t }\n\t block = hasher.update(password).finalize(salt);\n\t hasher.reset();\n\n\t // Iterations\n\t for (var i = 1; i < iterations; i++) {\n\t block = hasher.finalize(block);\n\t hasher.reset();\n\t }\n\n\t derivedKey.concat(block);\n\t }\n\t derivedKey.sigBytes = keySize * 4;\n\n\t return derivedKey;\n\t }\n\t });\n\n\t /**\n\t * Derives a key from a password.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t * @param {Object} cfg (Optional) The configuration options to use for this computation.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var key = CryptoJS.EvpKDF(password, salt);\n\t * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 });\n\t * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 });\n\t */\n\t C.EvpKDF = function (password, salt, cfg) {\n\t return EvpKDF.create(cfg).compute(password, salt);\n\t };\n\t}());\n\n\n\treturn CryptoJS.EvpKDF;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./evpkdf\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./evpkdf\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Cipher core components.\n\t */\n\tCryptoJS.lib.Cipher || (function (undefined) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var WordArray = C_lib.WordArray;\n\t var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm;\n\t var C_enc = C.enc;\n\t var Utf8 = C_enc.Utf8;\n\t var Base64 = C_enc.Base64;\n\t var C_algo = C.algo;\n\t var EvpKDF = C_algo.EvpKDF;\n\n\t /**\n\t * Abstract base cipher template.\n\t *\n\t * @property {number} keySize This cipher's key size. Default: 4 (128 bits)\n\t * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits)\n\t * @property {number} _ENC_XFORM_MODE A constant representing encryption mode.\n\t * @property {number} _DEC_XFORM_MODE A constant representing decryption mode.\n\t */\n\t var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {WordArray} iv The IV to use for this operation.\n\t */\n\t cfg: Base.extend(),\n\n\t /**\n\t * Creates this cipher in encryption mode.\n\t *\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {Cipher} A cipher instance.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray });\n\t */\n\t createEncryptor: function (key, cfg) {\n\t return this.create(this._ENC_XFORM_MODE, key, cfg);\n\t },\n\n\t /**\n\t * Creates this cipher in decryption mode.\n\t *\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {Cipher} A cipher instance.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray });\n\t */\n\t createDecryptor: function (key, cfg) {\n\t return this.create(this._DEC_XFORM_MODE, key, cfg);\n\t },\n\n\t /**\n\t * Initializes a newly created cipher.\n\t *\n\t * @param {number} xformMode Either the encryption or decryption transormation mode constant.\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @example\n\t *\n\t * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });\n\t */\n\t init: function (xformMode, key, cfg) {\n\t // Apply config defaults\n\t this.cfg = this.cfg.extend(cfg);\n\n\t // Store transform mode and key\n\t this._xformMode = xformMode;\n\t this._key = key;\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this cipher to its initial state.\n\t *\n\t * @example\n\t *\n\t * cipher.reset();\n\t */\n\t reset: function () {\n\t // Reset data buffer\n\t BufferedBlockAlgorithm.reset.call(this);\n\n\t // Perform concrete-cipher logic\n\t this._doReset();\n\t },\n\n\t /**\n\t * Adds data to be encrypted or decrypted.\n\t *\n\t * @param {WordArray|string} dataUpdate The data to encrypt or decrypt.\n\t *\n\t * @return {WordArray} The data after processing.\n\t *\n\t * @example\n\t *\n\t * var encrypted = cipher.process('data');\n\t * var encrypted = cipher.process(wordArray);\n\t */\n\t process: function (dataUpdate) {\n\t // Append\n\t this._append(dataUpdate);\n\n\t // Process available blocks\n\t return this._process();\n\t },\n\n\t /**\n\t * Finalizes the encryption or decryption process.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt.\n\t *\n\t * @return {WordArray} The data after final processing.\n\t *\n\t * @example\n\t *\n\t * var encrypted = cipher.finalize();\n\t * var encrypted = cipher.finalize('data');\n\t * var encrypted = cipher.finalize(wordArray);\n\t */\n\t finalize: function (dataUpdate) {\n\t // Final data update\n\t if (dataUpdate) {\n\t this._append(dataUpdate);\n\t }\n\n\t // Perform concrete-cipher logic\n\t var finalProcessedData = this._doFinalize();\n\n\t return finalProcessedData;\n\t },\n\n\t keySize: 128/32,\n\n\t ivSize: 128/32,\n\n\t _ENC_XFORM_MODE: 1,\n\n\t _DEC_XFORM_MODE: 2,\n\n\t /**\n\t * Creates shortcut functions to a cipher's object interface.\n\t *\n\t * @param {Cipher} cipher The cipher to create a helper for.\n\t *\n\t * @return {Object} An object with encrypt and decrypt shortcut functions.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES);\n\t */\n\t _createHelper: (function () {\n\t function selectCipherStrategy(key) {\n\t if (typeof key == 'string') {\n\t return PasswordBasedCipher;\n\t } else {\n\t return SerializableCipher;\n\t }\n\t }\n\n\t return function (cipher) {\n\t return {\n\t encrypt: function (message, key, cfg) {\n\t return selectCipherStrategy(key).encrypt(cipher, message, key, cfg);\n\t },\n\n\t decrypt: function (ciphertext, key, cfg) {\n\t return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg);\n\t }\n\t };\n\t };\n\t }())\n\t });\n\n\t /**\n\t * Abstract base stream cipher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits)\n\t */\n\t var StreamCipher = C_lib.StreamCipher = Cipher.extend({\n\t _doFinalize: function () {\n\t // Process partial blocks\n\t var finalProcessedBlocks = this._process(!!'flush');\n\n\t return finalProcessedBlocks;\n\t },\n\n\t blockSize: 1\n\t });\n\n\t /**\n\t * Mode namespace.\n\t */\n\t var C_mode = C.mode = {};\n\n\t /**\n\t * Abstract base block cipher mode template.\n\t */\n\t var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({\n\t /**\n\t * Creates this mode for encryption.\n\t *\n\t * @param {Cipher} cipher A block cipher instance.\n\t * @param {Array} iv The IV words.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words);\n\t */\n\t createEncryptor: function (cipher, iv) {\n\t return this.Encryptor.create(cipher, iv);\n\t },\n\n\t /**\n\t * Creates this mode for decryption.\n\t *\n\t * @param {Cipher} cipher A block cipher instance.\n\t * @param {Array} iv The IV words.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words);\n\t */\n\t createDecryptor: function (cipher, iv) {\n\t return this.Decryptor.create(cipher, iv);\n\t },\n\n\t /**\n\t * Initializes a newly created mode.\n\t *\n\t * @param {Cipher} cipher A block cipher instance.\n\t * @param {Array} iv The IV words.\n\t *\n\t * @example\n\t *\n\t * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words);\n\t */\n\t init: function (cipher, iv) {\n\t this._cipher = cipher;\n\t this._iv = iv;\n\t }\n\t });\n\n\t /**\n\t * Cipher Block Chaining mode.\n\t */\n\t var CBC = C_mode.CBC = (function () {\n\t /**\n\t * Abstract base CBC mode.\n\t */\n\t var CBC = BlockCipherMode.extend();\n\n\t /**\n\t * CBC encryptor.\n\t */\n\t CBC.Encryptor = CBC.extend({\n\t /**\n\t * Processes the data block at offset.\n\t *\n\t * @param {Array} words The data words to operate on.\n\t * @param {number} offset The offset where the block starts.\n\t *\n\t * @example\n\t *\n\t * mode.processBlock(data.words, offset);\n\t */\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t // XOR and encrypt\n\t xorBlock.call(this, words, offset, blockSize);\n\t cipher.encryptBlock(words, offset);\n\n\t // Remember this block to use with next block\n\t this._prevBlock = words.slice(offset, offset + blockSize);\n\t }\n\t });\n\n\t /**\n\t * CBC decryptor.\n\t */\n\t CBC.Decryptor = CBC.extend({\n\t /**\n\t * Processes the data block at offset.\n\t *\n\t * @param {Array} words The data words to operate on.\n\t * @param {number} offset The offset where the block starts.\n\t *\n\t * @example\n\t *\n\t * mode.processBlock(data.words, offset);\n\t */\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t // Remember this block to use with next block\n\t var thisBlock = words.slice(offset, offset + blockSize);\n\n\t // Decrypt and XOR\n\t cipher.decryptBlock(words, offset);\n\t xorBlock.call(this, words, offset, blockSize);\n\n\t // This block becomes the previous block\n\t this._prevBlock = thisBlock;\n\t }\n\t });\n\n\t function xorBlock(words, offset, blockSize) {\n\t var block;\n\n\t // Shortcut\n\t var iv = this._iv;\n\n\t // Choose mixing block\n\t if (iv) {\n\t block = iv;\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t } else {\n\t block = this._prevBlock;\n\t }\n\n\t // XOR blocks\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= block[i];\n\t }\n\t }\n\n\t return CBC;\n\t }());\n\n\t /**\n\t * Padding namespace.\n\t */\n\t var C_pad = C.pad = {};\n\n\t /**\n\t * PKCS #5/7 padding strategy.\n\t */\n\t var Pkcs7 = C_pad.Pkcs7 = {\n\t /**\n\t * Pads data using the algorithm defined in PKCS #5/7.\n\t *\n\t * @param {WordArray} data The data to pad.\n\t * @param {number} blockSize The multiple that the data should be padded to.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * CryptoJS.pad.Pkcs7.pad(wordArray, 4);\n\t */\n\t pad: function (data, blockSize) {\n\t // Shortcut\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count padding bytes\n\t var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;\n\n\t // Create padding word\n\t var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes;\n\n\t // Create padding\n\t var paddingWords = [];\n\t for (var i = 0; i < nPaddingBytes; i += 4) {\n\t paddingWords.push(paddingWord);\n\t }\n\t var padding = WordArray.create(paddingWords, nPaddingBytes);\n\n\t // Add padding\n\t data.concat(padding);\n\t },\n\n\t /**\n\t * Unpads data that had been padded using the algorithm defined in PKCS #5/7.\n\t *\n\t * @param {WordArray} data The data to unpad.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * CryptoJS.pad.Pkcs7.unpad(wordArray);\n\t */\n\t unpad: function (data) {\n\t // Get number of padding bytes from last byte\n\t var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\n\n\t // Remove padding\n\t data.sigBytes -= nPaddingBytes;\n\t }\n\t };\n\n\t /**\n\t * Abstract base block cipher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits)\n\t */\n\t var BlockCipher = C_lib.BlockCipher = Cipher.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {Mode} mode The block mode to use. Default: CBC\n\t * @property {Padding} padding The padding strategy to use. Default: Pkcs7\n\t */\n\t cfg: Cipher.cfg.extend({\n\t mode: CBC,\n\t padding: Pkcs7\n\t }),\n\n\t reset: function () {\n\t var modeCreator;\n\n\t // Reset cipher\n\t Cipher.reset.call(this);\n\n\t // Shortcuts\n\t var cfg = this.cfg;\n\t var iv = cfg.iv;\n\t var mode = cfg.mode;\n\n\t // Reset block mode\n\t if (this._xformMode == this._ENC_XFORM_MODE) {\n\t modeCreator = mode.createEncryptor;\n\t } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {\n\t modeCreator = mode.createDecryptor;\n\t // Keep at least one block in the buffer for unpadding\n\t this._minBufferSize = 1;\n\t }\n\n\t if (this._mode && this._mode.__creator == modeCreator) {\n\t this._mode.init(this, iv && iv.words);\n\t } else {\n\t this._mode = modeCreator.call(mode, this, iv && iv.words);\n\t this._mode.__creator = modeCreator;\n\t }\n\t },\n\n\t _doProcessBlock: function (words, offset) {\n\t this._mode.processBlock(words, offset);\n\t },\n\n\t _doFinalize: function () {\n\t var finalProcessedBlocks;\n\n\t // Shortcut\n\t var padding = this.cfg.padding;\n\n\t // Finalize\n\t if (this._xformMode == this._ENC_XFORM_MODE) {\n\t // Pad data\n\t padding.pad(this._data, this.blockSize);\n\n\t // Process final blocks\n\t finalProcessedBlocks = this._process(!!'flush');\n\t } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {\n\t // Process final blocks\n\t finalProcessedBlocks = this._process(!!'flush');\n\n\t // Unpad data\n\t padding.unpad(finalProcessedBlocks);\n\t }\n\n\t return finalProcessedBlocks;\n\t },\n\n\t blockSize: 128/32\n\t });\n\n\t /**\n\t * A collection of cipher parameters.\n\t *\n\t * @property {WordArray} ciphertext The raw ciphertext.\n\t * @property {WordArray} key The key to this ciphertext.\n\t * @property {WordArray} iv The IV used in the ciphering operation.\n\t * @property {WordArray} salt The salt used with a key derivation function.\n\t * @property {Cipher} algorithm The cipher algorithm.\n\t * @property {Mode} mode The block mode used in the ciphering operation.\n\t * @property {Padding} padding The padding scheme used in the ciphering operation.\n\t * @property {number} blockSize The block size of the cipher.\n\t * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string.\n\t */\n\t var CipherParams = C_lib.CipherParams = Base.extend({\n\t /**\n\t * Initializes a newly created cipher params object.\n\t *\n\t * @param {Object} cipherParams An object with any of the possible cipher parameters.\n\t *\n\t * @example\n\t *\n\t * var cipherParams = CryptoJS.lib.CipherParams.create({\n\t * ciphertext: ciphertextWordArray,\n\t * key: keyWordArray,\n\t * iv: ivWordArray,\n\t * salt: saltWordArray,\n\t * algorithm: CryptoJS.algo.AES,\n\t * mode: CryptoJS.mode.CBC,\n\t * padding: CryptoJS.pad.PKCS7,\n\t * blockSize: 4,\n\t * formatter: CryptoJS.format.OpenSSL\n\t * });\n\t */\n\t init: function (cipherParams) {\n\t this.mixIn(cipherParams);\n\t },\n\n\t /**\n\t * Converts this cipher params object to a string.\n\t *\n\t * @param {Format} formatter (Optional) The formatting strategy to use.\n\t *\n\t * @return {string} The stringified cipher params.\n\t *\n\t * @throws Error If neither the formatter nor the default formatter is set.\n\t *\n\t * @example\n\t *\n\t * var string = cipherParams + '';\n\t * var string = cipherParams.toString();\n\t * var string = cipherParams.toString(CryptoJS.format.OpenSSL);\n\t */\n\t toString: function (formatter) {\n\t return (formatter || this.formatter).stringify(this);\n\t }\n\t });\n\n\t /**\n\t * Format namespace.\n\t */\n\t var C_format = C.format = {};\n\n\t /**\n\t * OpenSSL formatting strategy.\n\t */\n\t var OpenSSLFormatter = C_format.OpenSSL = {\n\t /**\n\t * Converts a cipher params object to an OpenSSL-compatible string.\n\t *\n\t * @param {CipherParams} cipherParams The cipher params object.\n\t *\n\t * @return {string} The OpenSSL-compatible string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);\n\t */\n\t stringify: function (cipherParams) {\n\t var wordArray;\n\n\t // Shortcuts\n\t var ciphertext = cipherParams.ciphertext;\n\t var salt = cipherParams.salt;\n\n\t // Format\n\t if (salt) {\n\t wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext);\n\t } else {\n\t wordArray = ciphertext;\n\t }\n\n\t return wordArray.toString(Base64);\n\t },\n\n\t /**\n\t * Converts an OpenSSL-compatible string to a cipher params object.\n\t *\n\t * @param {string} openSSLStr The OpenSSL-compatible string.\n\t *\n\t * @return {CipherParams} The cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);\n\t */\n\t parse: function (openSSLStr) {\n\t var salt;\n\n\t // Parse base64\n\t var ciphertext = Base64.parse(openSSLStr);\n\n\t // Shortcut\n\t var ciphertextWords = ciphertext.words;\n\n\t // Test for salt\n\t if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) {\n\t // Extract salt\n\t salt = WordArray.create(ciphertextWords.slice(2, 4));\n\n\t // Remove salt from ciphertext\n\t ciphertextWords.splice(0, 4);\n\t ciphertext.sigBytes -= 16;\n\t }\n\n\t return CipherParams.create({ ciphertext: ciphertext, salt: salt });\n\t }\n\t };\n\n\t /**\n\t * A cipher wrapper that returns ciphertext as a serializable cipher params object.\n\t */\n\t var SerializableCipher = C_lib.SerializableCipher = Base.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL\n\t */\n\t cfg: Base.extend({\n\t format: OpenSSLFormatter\n\t }),\n\n\t /**\n\t * Encrypts a message.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {WordArray|string} message The message to encrypt.\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {CipherParams} A cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key);\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });\n\t */\n\t encrypt: function (cipher, message, key, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Encrypt\n\t var encryptor = cipher.createEncryptor(key, cfg);\n\t var ciphertext = encryptor.finalize(message);\n\n\t // Shortcut\n\t var cipherCfg = encryptor.cfg;\n\n\t // Create and return serializable cipher params\n\t return CipherParams.create({\n\t ciphertext: ciphertext,\n\t key: key,\n\t iv: cipherCfg.iv,\n\t algorithm: cipher,\n\t mode: cipherCfg.mode,\n\t padding: cipherCfg.padding,\n\t blockSize: cipher.blockSize,\n\t formatter: cfg.format\n\t });\n\t },\n\n\t /**\n\t * Decrypts serialized ciphertext.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {CipherParams|string} ciphertext The ciphertext to decrypt.\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {WordArray} The plaintext.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });\n\t * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });\n\t */\n\t decrypt: function (cipher, ciphertext, key, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Convert string to CipherParams\n\t ciphertext = this._parse(ciphertext, cfg.format);\n\n\t // Decrypt\n\t var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext);\n\n\t return plaintext;\n\t },\n\n\t /**\n\t * Converts serialized ciphertext to CipherParams,\n\t * else assumed CipherParams already and returns ciphertext unchanged.\n\t *\n\t * @param {CipherParams|string} ciphertext The ciphertext.\n\t * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext.\n\t *\n\t * @return {CipherParams} The unserialized ciphertext.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format);\n\t */\n\t _parse: function (ciphertext, format) {\n\t if (typeof ciphertext == 'string') {\n\t return format.parse(ciphertext, this);\n\t } else {\n\t return ciphertext;\n\t }\n\t }\n\t });\n\n\t /**\n\t * Key derivation function namespace.\n\t */\n\t var C_kdf = C.kdf = {};\n\n\t /**\n\t * OpenSSL key derivation function.\n\t */\n\t var OpenSSLKdf = C_kdf.OpenSSL = {\n\t /**\n\t * Derives a key and IV from a password.\n\t *\n\t * @param {string} password The password to derive from.\n\t * @param {number} keySize The size in words of the key to generate.\n\t * @param {number} ivSize The size in words of the IV to generate.\n\t * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly.\n\t *\n\t * @return {CipherParams} A cipher params object with the key, IV, and salt.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);\n\t * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');\n\t */\n\t execute: function (password, keySize, ivSize, salt, hasher) {\n\t // Generate random salt\n\t if (!salt) {\n\t salt = WordArray.random(64/8);\n\t }\n\n\t // Derive key and IV\n\t if (!hasher) {\n\t var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt);\n\t } else {\n\t var key = EvpKDF.create({ keySize: keySize + ivSize, hasher: hasher }).compute(password, salt);\n\t }\n\n\n\t // Separate key and IV\n\t var iv = WordArray.create(key.words.slice(keySize), ivSize * 4);\n\t key.sigBytes = keySize * 4;\n\n\t // Return params\n\t return CipherParams.create({ key: key, iv: iv, salt: salt });\n\t }\n\t };\n\n\t /**\n\t * A serializable cipher wrapper that derives the key from a password,\n\t * and returns ciphertext as a serializable cipher params object.\n\t */\n\t var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL\n\t */\n\t cfg: SerializableCipher.cfg.extend({\n\t kdf: OpenSSLKdf\n\t }),\n\n\t /**\n\t * Encrypts a message using a password.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {WordArray|string} message The message to encrypt.\n\t * @param {string} password The password.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {CipherParams} A cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');\n\t * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });\n\t */\n\t encrypt: function (cipher, message, password, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Derive key and other params\n\t var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, cfg.salt, cfg.hasher);\n\n\t // Add IV to config\n\t cfg.iv = derivedParams.iv;\n\n\t // Encrypt\n\t var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg);\n\n\t // Mix in derived params\n\t ciphertext.mixIn(derivedParams);\n\n\t return ciphertext;\n\t },\n\n\t /**\n\t * Decrypts serialized ciphertext using a password.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {CipherParams|string} ciphertext The ciphertext to decrypt.\n\t * @param {string} password The password.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {WordArray} The plaintext.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });\n\t * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });\n\t */\n\t decrypt: function (cipher, ciphertext, password, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Convert string to CipherParams\n\t ciphertext = this._parse(ciphertext, cfg.format);\n\n\t // Derive key and other params\n\t var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt, cfg.hasher);\n\n\t // Add IV to config\n\t cfg.iv = derivedParams.iv;\n\n\t // Decrypt\n\t var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg);\n\n\t return plaintext;\n\t }\n\t });\n\t}());\n\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Cipher Feedback block mode.\n\t */\n\tCryptoJS.mode.CFB = (function () {\n\t var CFB = CryptoJS.lib.BlockCipherMode.extend();\n\n\t CFB.Encryptor = CFB.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);\n\n\t // Remember this block to use with next block\n\t this._prevBlock = words.slice(offset, offset + blockSize);\n\t }\n\t });\n\n\t CFB.Decryptor = CFB.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t // Remember this block to use with next block\n\t var thisBlock = words.slice(offset, offset + blockSize);\n\n\t generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);\n\n\t // This block becomes the previous block\n\t this._prevBlock = thisBlock;\n\t }\n\t });\n\n\t function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) {\n\t var keystream;\n\n\t // Shortcut\n\t var iv = this._iv;\n\n\t // Generate keystream\n\t if (iv) {\n\t keystream = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t } else {\n\t keystream = this._prevBlock;\n\t }\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\n\t return CFB;\n\t}());\n\n\n\treturn CryptoJS.mode.CFB;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Counter block mode.\n\t */\n\tCryptoJS.mode.CTR = (function () {\n\t var CTR = CryptoJS.lib.BlockCipherMode.extend();\n\n\t var Encryptor = CTR.Encryptor = CTR.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher\n\t var blockSize = cipher.blockSize;\n\t var iv = this._iv;\n\t var counter = this._counter;\n\n\t // Generate keystream\n\t if (iv) {\n\t counter = this._counter = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t }\n\t var keystream = counter.slice(0);\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Increment counter\n\t counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\t });\n\n\t CTR.Decryptor = Encryptor;\n\n\t return CTR;\n\t}());\n\n\n\treturn CryptoJS.mode.CTR;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/** @preserve\n\t * Counter block mode compatible with Dr Brian Gladman fileenc.c\n\t * derived from CryptoJS.mode.CTR\n\t * Jan Hruby jhruby.web@gmail.com\n\t */\n\tCryptoJS.mode.CTRGladman = (function () {\n\t var CTRGladman = CryptoJS.lib.BlockCipherMode.extend();\n\n\t\tfunction incWord(word)\n\t\t{\n\t\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tvar b1 = (word >> 16)&0xff;\n\t\t\tvar b2 = (word >> 8)&0xff;\n\t\t\tvar b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) // overflow b1\n\t\t\t{\n\t\t\tb1 = 0;\n\t\t\tif (b2 === 0xff)\n\t\t\t{\n\t\t\t\tb2 = 0;\n\t\t\t\tif (b3 === 0xff)\n\t\t\t\t{\n\t\t\t\t\tb3 = 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t++b3;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t++b2;\n\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\tword += (0x01 << 24);\n\t\t\t}\n\t\t\treturn word;\n\t\t}\n\n\t\tfunction incCounter(counter)\n\t\t{\n\t\t\tif ((counter[0] = incWord(counter[0])) === 0)\n\t\t\t{\n\t\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\t\tcounter[1] = incWord(counter[1]);\n\t\t\t}\n\t\t\treturn counter;\n\t\t}\n\n\t var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher\n\t var blockSize = cipher.blockSize;\n\t var iv = this._iv;\n\t var counter = this._counter;\n\n\t // Generate keystream\n\t if (iv) {\n\t counter = this._counter = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t }\n\n\t\t\t\tincCounter(counter);\n\n\t\t\t\tvar keystream = counter.slice(0);\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\t });\n\n\t CTRGladman.Decryptor = Encryptor;\n\n\t return CTRGladman;\n\t}());\n\n\n\n\n\treturn CryptoJS.mode.CTRGladman;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Output Feedback block mode.\n\t */\n\tCryptoJS.mode.OFB = (function () {\n\t var OFB = CryptoJS.lib.BlockCipherMode.extend();\n\n\t var Encryptor = OFB.Encryptor = OFB.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher\n\t var blockSize = cipher.blockSize;\n\t var iv = this._iv;\n\t var keystream = this._keystream;\n\n\t // Generate keystream\n\t if (iv) {\n\t keystream = this._keystream = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t }\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\t });\n\n\t OFB.Decryptor = Encryptor;\n\n\t return OFB;\n\t}());\n\n\n\treturn CryptoJS.mode.OFB;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Electronic Codebook block mode.\n\t */\n\tCryptoJS.mode.ECB = (function () {\n\t var ECB = CryptoJS.lib.BlockCipherMode.extend();\n\n\t ECB.Encryptor = ECB.extend({\n\t processBlock: function (words, offset) {\n\t this._cipher.encryptBlock(words, offset);\n\t }\n\t });\n\n\t ECB.Decryptor = ECB.extend({\n\t processBlock: function (words, offset) {\n\t this._cipher.decryptBlock(words, offset);\n\t }\n\t });\n\n\t return ECB;\n\t}());\n\n\n\treturn CryptoJS.mode.ECB;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * ANSI X.923 padding strategy.\n\t */\n\tCryptoJS.pad.AnsiX923 = {\n\t pad: function (data, blockSize) {\n\t // Shortcuts\n\t var dataSigBytes = data.sigBytes;\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count padding bytes\n\t var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes;\n\n\t // Compute last byte position\n\t var lastBytePos = dataSigBytes + nPaddingBytes - 1;\n\n\t // Pad\n\t data.clamp();\n\t data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8);\n\t data.sigBytes += nPaddingBytes;\n\t },\n\n\t unpad: function (data) {\n\t // Get number of padding bytes from last byte\n\t var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\n\n\t // Remove padding\n\t data.sigBytes -= nPaddingBytes;\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.Ansix923;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * ISO 10126 padding strategy.\n\t */\n\tCryptoJS.pad.Iso10126 = {\n\t pad: function (data, blockSize) {\n\t // Shortcut\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count padding bytes\n\t var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;\n\n\t // Pad\n\t data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)).\n\t concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1));\n\t },\n\n\t unpad: function (data) {\n\t // Get number of padding bytes from last byte\n\t var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\n\n\t // Remove padding\n\t data.sigBytes -= nPaddingBytes;\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.Iso10126;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * ISO/IEC 9797-1 Padding Method 2.\n\t */\n\tCryptoJS.pad.Iso97971 = {\n\t pad: function (data, blockSize) {\n\t // Add 0x80 byte\n\t data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1));\n\n\t // Zero pad the rest\n\t CryptoJS.pad.ZeroPadding.pad(data, blockSize);\n\t },\n\n\t unpad: function (data) {\n\t // Remove zero padding\n\t CryptoJS.pad.ZeroPadding.unpad(data);\n\n\t // Remove one more byte -- the 0x80 byte\n\t data.sigBytes--;\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.Iso97971;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Zero padding strategy.\n\t */\n\tCryptoJS.pad.ZeroPadding = {\n\t pad: function (data, blockSize) {\n\t // Shortcut\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Pad\n\t data.clamp();\n\t data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes);\n\t },\n\n\t unpad: function (data) {\n\t // Shortcut\n\t var dataWords = data.words;\n\n\t // Unpad\n\t var i = data.sigBytes - 1;\n\t for (var i = data.sigBytes - 1; i >= 0; i--) {\n\t if (((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) {\n\t data.sigBytes = i + 1;\n\t break;\n\t }\n\t }\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.ZeroPadding;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * A noop padding strategy.\n\t */\n\tCryptoJS.pad.NoPadding = {\n\t pad: function () {\n\t },\n\n\t unpad: function () {\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.NoPadding;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (undefined) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var CipherParams = C_lib.CipherParams;\n\t var C_enc = C.enc;\n\t var Hex = C_enc.Hex;\n\t var C_format = C.format;\n\n\t var HexFormatter = C_format.Hex = {\n\t /**\n\t * Converts the ciphertext of a cipher params object to a hexadecimally encoded string.\n\t *\n\t * @param {CipherParams} cipherParams The cipher params object.\n\t *\n\t * @return {string} The hexadecimally encoded string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hexString = CryptoJS.format.Hex.stringify(cipherParams);\n\t */\n\t stringify: function (cipherParams) {\n\t return cipherParams.ciphertext.toString(Hex);\n\t },\n\n\t /**\n\t * Converts a hexadecimally encoded ciphertext string to a cipher params object.\n\t *\n\t * @param {string} input The hexadecimally encoded string.\n\t *\n\t * @return {CipherParams} The cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipherParams = CryptoJS.format.Hex.parse(hexString);\n\t */\n\t parse: function (input) {\n\t var ciphertext = Hex.parse(input);\n\t return CipherParams.create({ ciphertext: ciphertext });\n\t }\n\t };\n\t}());\n\n\n\treturn CryptoJS.format.Hex;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var BlockCipher = C_lib.BlockCipher;\n\t var C_algo = C.algo;\n\n\t // Lookup tables\n\t var SBOX = [];\n\t var INV_SBOX = [];\n\t var SUB_MIX_0 = [];\n\t var SUB_MIX_1 = [];\n\t var SUB_MIX_2 = [];\n\t var SUB_MIX_3 = [];\n\t var INV_SUB_MIX_0 = [];\n\t var INV_SUB_MIX_1 = [];\n\t var INV_SUB_MIX_2 = [];\n\t var INV_SUB_MIX_3 = [];\n\n\t // Compute lookup tables\n\t (function () {\n\t // Compute double table\n\t var d = [];\n\t for (var i = 0; i < 256; i++) {\n\t if (i < 128) {\n\t d[i] = i << 1;\n\t } else {\n\t d[i] = (i << 1) ^ 0x11b;\n\t }\n\t }\n\n\t // Walk GF(2^8)\n\t var x = 0;\n\t var xi = 0;\n\t for (var i = 0; i < 256; i++) {\n\t // Compute sbox\n\t var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4);\n\t sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63;\n\t SBOX[x] = sx;\n\t INV_SBOX[sx] = x;\n\n\t // Compute multiplication\n\t var x2 = d[x];\n\t var x4 = d[x2];\n\t var x8 = d[x4];\n\n\t // Compute sub bytes, mix columns tables\n\t var t = (d[sx] * 0x101) ^ (sx * 0x1010100);\n\t SUB_MIX_0[x] = (t << 24) | (t >>> 8);\n\t SUB_MIX_1[x] = (t << 16) | (t >>> 16);\n\t SUB_MIX_2[x] = (t << 8) | (t >>> 24);\n\t SUB_MIX_3[x] = t;\n\n\t // Compute inv sub bytes, inv mix columns tables\n\t var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100);\n\t INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8);\n\t INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16);\n\t INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24);\n\t INV_SUB_MIX_3[sx] = t;\n\n\t // Compute next counter\n\t if (!x) {\n\t x = xi = 1;\n\t } else {\n\t x = x2 ^ d[d[d[x8 ^ x2]]];\n\t xi ^= d[d[xi]];\n\t }\n\t }\n\t }());\n\n\t // Precomputed Rcon lookup\n\t var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36];\n\n\t /**\n\t * AES block cipher algorithm.\n\t */\n\t var AES = C_algo.AES = BlockCipher.extend({\n\t _doReset: function () {\n\t var t;\n\n\t // Skip reset of nRounds has been set before and key did not change\n\t if (this._nRounds && this._keyPriorReset === this._key) {\n\t return;\n\t }\n\n\t // Shortcuts\n\t var key = this._keyPriorReset = this._key;\n\t var keyWords = key.words;\n\t var keySize = key.sigBytes / 4;\n\n\t // Compute number of rounds\n\t var nRounds = this._nRounds = keySize + 6;\n\n\t // Compute number of key schedule rows\n\t var ksRows = (nRounds + 1) * 4;\n\n\t // Compute key schedule\n\t var keySchedule = this._keySchedule = [];\n\t for (var ksRow = 0; ksRow < ksRows; ksRow++) {\n\t if (ksRow < keySize) {\n\t keySchedule[ksRow] = keyWords[ksRow];\n\t } else {\n\t t = keySchedule[ksRow - 1];\n\n\t if (!(ksRow % keySize)) {\n\t // Rot word\n\t t = (t << 8) | (t >>> 24);\n\n\t // Sub word\n\t t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];\n\n\t // Mix Rcon\n\t t ^= RCON[(ksRow / keySize) | 0] << 24;\n\t } else if (keySize > 6 && ksRow % keySize == 4) {\n\t // Sub word\n\t t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];\n\t }\n\n\t keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t;\n\t }\n\t }\n\n\t // Compute inv key schedule\n\t var invKeySchedule = this._invKeySchedule = [];\n\t for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) {\n\t var ksRow = ksRows - invKsRow;\n\n\t if (invKsRow % 4) {\n\t var t = keySchedule[ksRow];\n\t } else {\n\t var t = keySchedule[ksRow - 4];\n\t }\n\n\t if (invKsRow < 4 || ksRow <= 4) {\n\t invKeySchedule[invKsRow] = t;\n\t } else {\n\t invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^\n\t INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]];\n\t }\n\t }\n\t },\n\n\t encryptBlock: function (M, offset) {\n\t this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX);\n\t },\n\n\t decryptBlock: function (M, offset) {\n\t // Swap 2nd and 4th rows\n\t var t = M[offset + 1];\n\t M[offset + 1] = M[offset + 3];\n\t M[offset + 3] = t;\n\n\t this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX);\n\n\t // Inv swap 2nd and 4th rows\n\t var t = M[offset + 1];\n\t M[offset + 1] = M[offset + 3];\n\t M[offset + 3] = t;\n\t },\n\n\t _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) {\n\t // Shortcut\n\t var nRounds = this._nRounds;\n\n\t // Get input, add round key\n\t var s0 = M[offset] ^ keySchedule[0];\n\t var s1 = M[offset + 1] ^ keySchedule[1];\n\t var s2 = M[offset + 2] ^ keySchedule[2];\n\t var s3 = M[offset + 3] ^ keySchedule[3];\n\n\t // Key schedule row counter\n\t var ksRow = 4;\n\n\t // Rounds\n\t for (var round = 1; round < nRounds; round++) {\n\t // Shift rows, sub bytes, mix columns, add round key\n\t var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++];\n\t var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++];\n\t var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++];\n\t var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++];\n\n\t // Update state\n\t s0 = t0;\n\t s1 = t1;\n\t s2 = t2;\n\t s3 = t3;\n\t }\n\n\t // Shift rows, sub bytes, add round key\n\t var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++];\n\t var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++];\n\t var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++];\n\t var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++];\n\n\t // Set output\n\t M[offset] = t0;\n\t M[offset + 1] = t1;\n\t M[offset + 2] = t2;\n\t M[offset + 3] = t3;\n\t },\n\n\t keySize: 256/32\n\t });\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg);\n\t */\n\t C.AES = BlockCipher._createHelper(AES);\n\t}());\n\n\n\treturn CryptoJS.AES;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var BlockCipher = C_lib.BlockCipher;\n\t var C_algo = C.algo;\n\n\t // Permuted Choice 1 constants\n\t var PC1 = [\n\t 57, 49, 41, 33, 25, 17, 9, 1,\n\t 58, 50, 42, 34, 26, 18, 10, 2,\n\t 59, 51, 43, 35, 27, 19, 11, 3,\n\t 60, 52, 44, 36, 63, 55, 47, 39,\n\t 31, 23, 15, 7, 62, 54, 46, 38,\n\t 30, 22, 14, 6, 61, 53, 45, 37,\n\t 29, 21, 13, 5, 28, 20, 12, 4\n\t ];\n\n\t // Permuted Choice 2 constants\n\t var PC2 = [\n\t 14, 17, 11, 24, 1, 5,\n\t 3, 28, 15, 6, 21, 10,\n\t 23, 19, 12, 4, 26, 8,\n\t 16, 7, 27, 20, 13, 2,\n\t 41, 52, 31, 37, 47, 55,\n\t 30, 40, 51, 45, 33, 48,\n\t 44, 49, 39, 56, 34, 53,\n\t 46, 42, 50, 36, 29, 32\n\t ];\n\n\t // Cumulative bit shift constants\n\t var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28];\n\n\t // SBOXes and round permutation constants\n\t var SBOX_P = [\n\t {\n\t 0x0: 0x808200,\n\t 0x10000000: 0x8000,\n\t 0x20000000: 0x808002,\n\t 0x30000000: 0x2,\n\t 0x40000000: 0x200,\n\t 0x50000000: 0x808202,\n\t 0x60000000: 0x800202,\n\t 0x70000000: 0x800000,\n\t 0x80000000: 0x202,\n\t 0x90000000: 0x800200,\n\t 0xa0000000: 0x8200,\n\t 0xb0000000: 0x808000,\n\t 0xc0000000: 0x8002,\n\t 0xd0000000: 0x800002,\n\t 0xe0000000: 0x0,\n\t 0xf0000000: 0x8202,\n\t 0x8000000: 0x0,\n\t 0x18000000: 0x808202,\n\t 0x28000000: 0x8202,\n\t 0x38000000: 0x8000,\n\t 0x48000000: 0x808200,\n\t 0x58000000: 0x200,\n\t 0x68000000: 0x808002,\n\t 0x78000000: 0x2,\n\t 0x88000000: 0x800200,\n\t 0x98000000: 0x8200,\n\t 0xa8000000: 0x808000,\n\t 0xb8000000: 0x800202,\n\t 0xc8000000: 0x800002,\n\t 0xd8000000: 0x8002,\n\t 0xe8000000: 0x202,\n\t 0xf8000000: 0x800000,\n\t 0x1: 0x8000,\n\t 0x10000001: 0x2,\n\t 0x20000001: 0x808200,\n\t 0x30000001: 0x800000,\n\t 0x40000001: 0x808002,\n\t 0x50000001: 0x8200,\n\t 0x60000001: 0x200,\n\t 0x70000001: 0x800202,\n\t 0x80000001: 0x808202,\n\t 0x90000001: 0x808000,\n\t 0xa0000001: 0x800002,\n\t 0xb0000001: 0x8202,\n\t 0xc0000001: 0x202,\n\t 0xd0000001: 0x800200,\n\t 0xe0000001: 0x8002,\n\t 0xf0000001: 0x0,\n\t 0x8000001: 0x808202,\n\t 0x18000001: 0x808000,\n\t 0x28000001: 0x800000,\n\t 0x38000001: 0x200,\n\t 0x48000001: 0x8000,\n\t 0x58000001: 0x800002,\n\t 0x68000001: 0x2,\n\t 0x78000001: 0x8202,\n\t 0x88000001: 0x8002,\n\t 0x98000001: 0x800202,\n\t 0xa8000001: 0x202,\n\t 0xb8000001: 0x808200,\n\t 0xc8000001: 0x800200,\n\t 0xd8000001: 0x0,\n\t 0xe8000001: 0x8200,\n\t 0xf8000001: 0x808002\n\t },\n\t {\n\t 0x0: 0x40084010,\n\t 0x1000000: 0x4000,\n\t 0x2000000: 0x80000,\n\t 0x3000000: 0x40080010,\n\t 0x4000000: 0x40000010,\n\t 0x5000000: 0x40084000,\n\t 0x6000000: 0x40004000,\n\t 0x7000000: 0x10,\n\t 0x8000000: 0x84000,\n\t 0x9000000: 0x40004010,\n\t 0xa000000: 0x40000000,\n\t 0xb000000: 0x84010,\n\t 0xc000000: 0x80010,\n\t 0xd000000: 0x0,\n\t 0xe000000: 0x4010,\n\t 0xf000000: 0x40080000,\n\t 0x800000: 0x40004000,\n\t 0x1800000: 0x84010,\n\t 0x2800000: 0x10,\n\t 0x3800000: 0x40004010,\n\t 0x4800000: 0x40084010,\n\t 0x5800000: 0x40000000,\n\t 0x6800000: 0x80000,\n\t 0x7800000: 0x40080010,\n\t 0x8800000: 0x80010,\n\t 0x9800000: 0x0,\n\t 0xa800000: 0x4000,\n\t 0xb800000: 0x40080000,\n\t 0xc800000: 0x40000010,\n\t 0xd800000: 0x84000,\n\t 0xe800000: 0x40084000,\n\t 0xf800000: 0x4010,\n\t 0x10000000: 0x0,\n\t 0x11000000: 0x40080010,\n\t 0x12000000: 0x40004010,\n\t 0x13000000: 0x40084000,\n\t 0x14000000: 0x40080000,\n\t 0x15000000: 0x10,\n\t 0x16000000: 0x84010,\n\t 0x17000000: 0x4000,\n\t 0x18000000: 0x4010,\n\t 0x19000000: 0x80000,\n\t 0x1a000000: 0x80010,\n\t 0x1b000000: 0x40000010,\n\t 0x1c000000: 0x84000,\n\t 0x1d000000: 0x40004000,\n\t 0x1e000000: 0x40000000,\n\t 0x1f000000: 0x40084010,\n\t 0x10800000: 0x84010,\n\t 0x11800000: 0x80000,\n\t 0x12800000: 0x40080000,\n\t 0x13800000: 0x4000,\n\t 0x14800000: 0x40004000,\n\t 0x15800000: 0x40084010,\n\t 0x16800000: 0x10,\n\t 0x17800000: 0x40000000,\n\t 0x18800000: 0x40084000,\n\t 0x19800000: 0x40000010,\n\t 0x1a800000: 0x40004010,\n\t 0x1b800000: 0x80010,\n\t 0x1c800000: 0x0,\n\t 0x1d800000: 0x4010,\n\t 0x1e800000: 0x40080010,\n\t 0x1f800000: 0x84000\n\t },\n\t {\n\t 0x0: 0x104,\n\t 0x100000: 0x0,\n\t 0x200000: 0x4000100,\n\t 0x300000: 0x10104,\n\t 0x400000: 0x10004,\n\t 0x500000: 0x4000004,\n\t 0x600000: 0x4010104,\n\t 0x700000: 0x4010000,\n\t 0x800000: 0x4000000,\n\t 0x900000: 0x4010100,\n\t 0xa00000: 0x10100,\n\t 0xb00000: 0x4010004,\n\t 0xc00000: 0x4000104,\n\t 0xd00000: 0x10000,\n\t 0xe00000: 0x4,\n\t 0xf00000: 0x100,\n\t 0x80000: 0x4010100,\n\t 0x180000: 0x4010004,\n\t 0x280000: 0x0,\n\t 0x380000: 0x4000100,\n\t 0x480000: 0x4000004,\n\t 0x580000: 0x10000,\n\t 0x680000: 0x10004,\n\t 0x780000: 0x104,\n\t 0x880000: 0x4,\n\t 0x980000: 0x100,\n\t 0xa80000: 0x4010000,\n\t 0xb80000: 0x10104,\n\t 0xc80000: 0x10100,\n\t 0xd80000: 0x4000104,\n\t 0xe80000: 0x4010104,\n\t 0xf80000: 0x4000000,\n\t 0x1000000: 0x4010100,\n\t 0x1100000: 0x10004,\n\t 0x1200000: 0x10000,\n\t 0x1300000: 0x4000100,\n\t 0x1400000: 0x100,\n\t 0x1500000: 0x4010104,\n\t 0x1600000: 0x4000004,\n\t 0x1700000: 0x0,\n\t 0x1800000: 0x4000104,\n\t 0x1900000: 0x4000000,\n\t 0x1a00000: 0x4,\n\t 0x1b00000: 0x10100,\n\t 0x1c00000: 0x4010000,\n\t 0x1d00000: 0x104,\n\t 0x1e00000: 0x10104,\n\t 0x1f00000: 0x4010004,\n\t 0x1080000: 0x4000000,\n\t 0x1180000: 0x104,\n\t 0x1280000: 0x4010100,\n\t 0x1380000: 0x0,\n\t 0x1480000: 0x10004,\n\t 0x1580000: 0x4000100,\n\t 0x1680000: 0x100,\n\t 0x1780000: 0x4010004,\n\t 0x1880000: 0x10000,\n\t 0x1980000: 0x4010104,\n\t 0x1a80000: 0x10104,\n\t 0x1b80000: 0x4000004,\n\t 0x1c80000: 0x4000104,\n\t 0x1d80000: 0x4010000,\n\t 0x1e80000: 0x4,\n\t 0x1f80000: 0x10100\n\t },\n\t {\n\t 0x0: 0x80401000,\n\t 0x10000: 0x80001040,\n\t 0x20000: 0x401040,\n\t 0x30000: 0x80400000,\n\t 0x40000: 0x0,\n\t 0x50000: 0x401000,\n\t 0x60000: 0x80000040,\n\t 0x70000: 0x400040,\n\t 0x80000: 0x80000000,\n\t 0x90000: 0x400000,\n\t 0xa0000: 0x40,\n\t 0xb0000: 0x80001000,\n\t 0xc0000: 0x80400040,\n\t 0xd0000: 0x1040,\n\t 0xe0000: 0x1000,\n\t 0xf0000: 0x80401040,\n\t 0x8000: 0x80001040,\n\t 0x18000: 0x40,\n\t 0x28000: 0x80400040,\n\t 0x38000: 0x80001000,\n\t 0x48000: 0x401000,\n\t 0x58000: 0x80401040,\n\t 0x68000: 0x0,\n\t 0x78000: 0x80400000,\n\t 0x88000: 0x1000,\n\t 0x98000: 0x80401000,\n\t 0xa8000: 0x400000,\n\t 0xb8000: 0x1040,\n\t 0xc8000: 0x80000000,\n\t 0xd8000: 0x400040,\n\t 0xe8000: 0x401040,\n\t 0xf8000: 0x80000040,\n\t 0x100000: 0x400040,\n\t 0x110000: 0x401000,\n\t 0x120000: 0x80000040,\n\t 0x130000: 0x0,\n\t 0x140000: 0x1040,\n\t 0x150000: 0x80400040,\n\t 0x160000: 0x80401000,\n\t 0x170000: 0x80001040,\n\t 0x180000: 0x80401040,\n\t 0x190000: 0x80000000,\n\t 0x1a0000: 0x80400000,\n\t 0x1b0000: 0x401040,\n\t 0x1c0000: 0x80001000,\n\t 0x1d0000: 0x400000,\n\t 0x1e0000: 0x40,\n\t 0x1f0000: 0x1000,\n\t 0x108000: 0x80400000,\n\t 0x118000: 0x80401040,\n\t 0x128000: 0x0,\n\t 0x138000: 0x401000,\n\t 0x148000: 0x400040,\n\t 0x158000: 0x80000000,\n\t 0x168000: 0x80001040,\n\t 0x178000: 0x40,\n\t 0x188000: 0x80000040,\n\t 0x198000: 0x1000,\n\t 0x1a8000: 0x80001000,\n\t 0x1b8000: 0x80400040,\n\t 0x1c8000: 0x1040,\n\t 0x1d8000: 0x80401000,\n\t 0x1e8000: 0x400000,\n\t 0x1f8000: 0x401040\n\t },\n\t {\n\t 0x0: 0x80,\n\t 0x1000: 0x1040000,\n\t 0x2000: 0x40000,\n\t 0x3000: 0x20000000,\n\t 0x4000: 0x20040080,\n\t 0x5000: 0x1000080,\n\t 0x6000: 0x21000080,\n\t 0x7000: 0x40080,\n\t 0x8000: 0x1000000,\n\t 0x9000: 0x20040000,\n\t 0xa000: 0x20000080,\n\t 0xb000: 0x21040080,\n\t 0xc000: 0x21040000,\n\t 0xd000: 0x0,\n\t 0xe000: 0x1040080,\n\t 0xf000: 0x21000000,\n\t 0x800: 0x1040080,\n\t 0x1800: 0x21000080,\n\t 0x2800: 0x80,\n\t 0x3800: 0x1040000,\n\t 0x4800: 0x40000,\n\t 0x5800: 0x20040080,\n\t 0x6800: 0x21040000,\n\t 0x7800: 0x20000000,\n\t 0x8800: 0x20040000,\n\t 0x9800: 0x0,\n\t 0xa800: 0x21040080,\n\t 0xb800: 0x1000080,\n\t 0xc800: 0x20000080,\n\t 0xd800: 0x21000000,\n\t 0xe800: 0x1000000,\n\t 0xf800: 0x40080,\n\t 0x10000: 0x40000,\n\t 0x11000: 0x80,\n\t 0x12000: 0x20000000,\n\t 0x13000: 0x21000080,\n\t 0x14000: 0x1000080,\n\t 0x15000: 0x21040000,\n\t 0x16000: 0x20040080,\n\t 0x17000: 0x1000000,\n\t 0x18000: 0x21040080,\n\t 0x19000: 0x21000000,\n\t 0x1a000: 0x1040000,\n\t 0x1b000: 0x20040000,\n\t 0x1c000: 0x40080,\n\t 0x1d000: 0x20000080,\n\t 0x1e000: 0x0,\n\t 0x1f000: 0x1040080,\n\t 0x10800: 0x21000080,\n\t 0x11800: 0x1000000,\n\t 0x12800: 0x1040000,\n\t 0x13800: 0x20040080,\n\t 0x14800: 0x20000000,\n\t 0x15800: 0x1040080,\n\t 0x16800: 0x80,\n\t 0x17800: 0x21040000,\n\t 0x18800: 0x40080,\n\t 0x19800: 0x21040080,\n\t 0x1a800: 0x0,\n\t 0x1b800: 0x21000000,\n\t 0x1c800: 0x1000080,\n\t 0x1d800: 0x40000,\n\t 0x1e800: 0x20040000,\n\t 0x1f800: 0x20000080\n\t },\n\t {\n\t 0x0: 0x10000008,\n\t 0x100: 0x2000,\n\t 0x200: 0x10200000,\n\t 0x300: 0x10202008,\n\t 0x400: 0x10002000,\n\t 0x500: 0x200000,\n\t 0x600: 0x200008,\n\t 0x700: 0x10000000,\n\t 0x800: 0x0,\n\t 0x900: 0x10002008,\n\t 0xa00: 0x202000,\n\t 0xb00: 0x8,\n\t 0xc00: 0x10200008,\n\t 0xd00: 0x202008,\n\t 0xe00: 0x2008,\n\t 0xf00: 0x10202000,\n\t 0x80: 0x10200000,\n\t 0x180: 0x10202008,\n\t 0x280: 0x8,\n\t 0x380: 0x200000,\n\t 0x480: 0x202008,\n\t 0x580: 0x10000008,\n\t 0x680: 0x10002000,\n\t 0x780: 0x2008,\n\t 0x880: 0x200008,\n\t 0x980: 0x2000,\n\t 0xa80: 0x10002008,\n\t 0xb80: 0x10200008,\n\t 0xc80: 0x0,\n\t 0xd80: 0x10202000,\n\t 0xe80: 0x202000,\n\t 0xf80: 0x10000000,\n\t 0x1000: 0x10002000,\n\t 0x1100: 0x10200008,\n\t 0x1200: 0x10202008,\n\t 0x1300: 0x2008,\n\t 0x1400: 0x200000,\n\t 0x1500: 0x10000000,\n\t 0x1600: 0x10000008,\n\t 0x1700: 0x202000,\n\t 0x1800: 0x202008,\n\t 0x1900: 0x0,\n\t 0x1a00: 0x8,\n\t 0x1b00: 0x10200000,\n\t 0x1c00: 0x2000,\n\t 0x1d00: 0x10002008,\n\t 0x1e00: 0x10202000,\n\t 0x1f00: 0x200008,\n\t 0x1080: 0x8,\n\t 0x1180: 0x202000,\n\t 0x1280: 0x200000,\n\t 0x1380: 0x10000008,\n\t 0x1480: 0x10002000,\n\t 0x1580: 0x2008,\n\t 0x1680: 0x10202008,\n\t 0x1780: 0x10200000,\n\t 0x1880: 0x10202000,\n\t 0x1980: 0x10200008,\n\t 0x1a80: 0x2000,\n\t 0x1b80: 0x202008,\n\t 0x1c80: 0x200008,\n\t 0x1d80: 0x0,\n\t 0x1e80: 0x10000000,\n\t 0x1f80: 0x10002008\n\t },\n\t {\n\t 0x0: 0x100000,\n\t 0x10: 0x2000401,\n\t 0x20: 0x400,\n\t 0x30: 0x100401,\n\t 0x40: 0x2100401,\n\t 0x50: 0x0,\n\t 0x60: 0x1,\n\t 0x70: 0x2100001,\n\t 0x80: 0x2000400,\n\t 0x90: 0x100001,\n\t 0xa0: 0x2000001,\n\t 0xb0: 0x2100400,\n\t 0xc0: 0x2100000,\n\t 0xd0: 0x401,\n\t 0xe0: 0x100400,\n\t 0xf0: 0x2000000,\n\t 0x8: 0x2100001,\n\t 0x18: 0x0,\n\t 0x28: 0x2000401,\n\t 0x38: 0x2100400,\n\t 0x48: 0x100000,\n\t 0x58: 0x2000001,\n\t 0x68: 0x2000000,\n\t 0x78: 0x401,\n\t 0x88: 0x100401,\n\t 0x98: 0x2000400,\n\t 0xa8: 0x2100000,\n\t 0xb8: 0x100001,\n\t 0xc8: 0x400,\n\t 0xd8: 0x2100401,\n\t 0xe8: 0x1,\n\t 0xf8: 0x100400,\n\t 0x100: 0x2000000,\n\t 0x110: 0x100000,\n\t 0x120: 0x2000401,\n\t 0x130: 0x2100001,\n\t 0x140: 0x100001,\n\t 0x150: 0x2000400,\n\t 0x160: 0x2100400,\n\t 0x170: 0x100401,\n\t 0x180: 0x401,\n\t 0x190: 0x2100401,\n\t 0x1a0: 0x100400,\n\t 0x1b0: 0x1,\n\t 0x1c0: 0x0,\n\t 0x1d0: 0x2100000,\n\t 0x1e0: 0x2000001,\n\t 0x1f0: 0x400,\n\t 0x108: 0x100400,\n\t 0x118: 0x2000401,\n\t 0x128: 0x2100001,\n\t 0x138: 0x1,\n\t 0x148: 0x2000000,\n\t 0x158: 0x100000,\n\t 0x168: 0x401,\n\t 0x178: 0x2100400,\n\t 0x188: 0x2000001,\n\t 0x198: 0x2100000,\n\t 0x1a8: 0x0,\n\t 0x1b8: 0x2100401,\n\t 0x1c8: 0x100401,\n\t 0x1d8: 0x400,\n\t 0x1e8: 0x2000400,\n\t 0x1f8: 0x100001\n\t },\n\t {\n\t 0x0: 0x8000820,\n\t 0x1: 0x20000,\n\t 0x2: 0x8000000,\n\t 0x3: 0x20,\n\t 0x4: 0x20020,\n\t 0x5: 0x8020820,\n\t 0x6: 0x8020800,\n\t 0x7: 0x800,\n\t 0x8: 0x8020000,\n\t 0x9: 0x8000800,\n\t 0xa: 0x20800,\n\t 0xb: 0x8020020,\n\t 0xc: 0x820,\n\t 0xd: 0x0,\n\t 0xe: 0x8000020,\n\t 0xf: 0x20820,\n\t 0x80000000: 0x800,\n\t 0x80000001: 0x8020820,\n\t 0x80000002: 0x8000820,\n\t 0x80000003: 0x8000000,\n\t 0x80000004: 0x8020000,\n\t 0x80000005: 0x20800,\n\t 0x80000006: 0x20820,\n\t 0x80000007: 0x20,\n\t 0x80000008: 0x8000020,\n\t 0x80000009: 0x820,\n\t 0x8000000a: 0x20020,\n\t 0x8000000b: 0x8020800,\n\t 0x8000000c: 0x0,\n\t 0x8000000d: 0x8020020,\n\t 0x8000000e: 0x8000800,\n\t 0x8000000f: 0x20000,\n\t 0x10: 0x20820,\n\t 0x11: 0x8020800,\n\t 0x12: 0x20,\n\t 0x13: 0x800,\n\t 0x14: 0x8000800,\n\t 0x15: 0x8000020,\n\t 0x16: 0x8020020,\n\t 0x17: 0x20000,\n\t 0x18: 0x0,\n\t 0x19: 0x20020,\n\t 0x1a: 0x8020000,\n\t 0x1b: 0x8000820,\n\t 0x1c: 0x8020820,\n\t 0x1d: 0x20800,\n\t 0x1e: 0x820,\n\t 0x1f: 0x8000000,\n\t 0x80000010: 0x20000,\n\t 0x80000011: 0x800,\n\t 0x80000012: 0x8020020,\n\t 0x80000013: 0x20820,\n\t 0x80000014: 0x20,\n\t 0x80000015: 0x8020000,\n\t 0x80000016: 0x8000000,\n\t 0x80000017: 0x8000820,\n\t 0x80000018: 0x8020820,\n\t 0x80000019: 0x8000020,\n\t 0x8000001a: 0x8000800,\n\t 0x8000001b: 0x0,\n\t 0x8000001c: 0x20800,\n\t 0x8000001d: 0x820,\n\t 0x8000001e: 0x20020,\n\t 0x8000001f: 0x8020800\n\t }\n\t ];\n\n\t // Masks that select the SBOX input\n\t var SBOX_MASK = [\n\t 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000,\n\t 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f\n\t ];\n\n\t /**\n\t * DES block cipher algorithm.\n\t */\n\t var DES = C_algo.DES = BlockCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var key = this._key;\n\t var keyWords = key.words;\n\n\t // Select 56 bits according to PC1\n\t var keyBits = [];\n\t for (var i = 0; i < 56; i++) {\n\t var keyBitPos = PC1[i] - 1;\n\t keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1;\n\t }\n\n\t // Assemble 16 subkeys\n\t var subKeys = this._subKeys = [];\n\t for (var nSubKey = 0; nSubKey < 16; nSubKey++) {\n\t // Create subkey\n\t var subKey = subKeys[nSubKey] = [];\n\n\t // Shortcut\n\t var bitShift = BIT_SHIFTS[nSubKey];\n\n\t // Select 48 bits according to PC2\n\t for (var i = 0; i < 24; i++) {\n\t // Select from the left 28 key bits\n\t subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6);\n\n\t // Select from the right 28 key bits\n\t subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6);\n\t }\n\n\t // Since each subkey is applied to an expanded 32-bit input,\n\t // the subkey can be broken into 8 values scaled to 32-bits,\n\t // which allows the key to be used without expansion\n\t subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31);\n\t for (var i = 1; i < 7; i++) {\n\t subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3);\n\t }\n\t subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27);\n\t }\n\n\t // Compute inverse subkeys\n\t var invSubKeys = this._invSubKeys = [];\n\t for (var i = 0; i < 16; i++) {\n\t invSubKeys[i] = subKeys[15 - i];\n\t }\n\t },\n\n\t encryptBlock: function (M, offset) {\n\t this._doCryptBlock(M, offset, this._subKeys);\n\t },\n\n\t decryptBlock: function (M, offset) {\n\t this._doCryptBlock(M, offset, this._invSubKeys);\n\t },\n\n\t _doCryptBlock: function (M, offset, subKeys) {\n\t // Get input\n\t this._lBlock = M[offset];\n\t this._rBlock = M[offset + 1];\n\n\t // Initial permutation\n\t exchangeLR.call(this, 4, 0x0f0f0f0f);\n\t exchangeLR.call(this, 16, 0x0000ffff);\n\t exchangeRL.call(this, 2, 0x33333333);\n\t exchangeRL.call(this, 8, 0x00ff00ff);\n\t exchangeLR.call(this, 1, 0x55555555);\n\n\t // Rounds\n\t for (var round = 0; round < 16; round++) {\n\t // Shortcuts\n\t var subKey = subKeys[round];\n\t var lBlock = this._lBlock;\n\t var rBlock = this._rBlock;\n\n\t // Feistel function\n\t var f = 0;\n\t for (var i = 0; i < 8; i++) {\n\t f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0];\n\t }\n\t this._lBlock = rBlock;\n\t this._rBlock = lBlock ^ f;\n\t }\n\n\t // Undo swap from last round\n\t var t = this._lBlock;\n\t this._lBlock = this._rBlock;\n\t this._rBlock = t;\n\n\t // Final permutation\n\t exchangeLR.call(this, 1, 0x55555555);\n\t exchangeRL.call(this, 8, 0x00ff00ff);\n\t exchangeRL.call(this, 2, 0x33333333);\n\t exchangeLR.call(this, 16, 0x0000ffff);\n\t exchangeLR.call(this, 4, 0x0f0f0f0f);\n\n\t // Set output\n\t M[offset] = this._lBlock;\n\t M[offset + 1] = this._rBlock;\n\t },\n\n\t keySize: 64/32,\n\n\t ivSize: 64/32,\n\n\t blockSize: 64/32\n\t });\n\n\t // Swap bits across the left and right words\n\t function exchangeLR(offset, mask) {\n\t var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask;\n\t this._rBlock ^= t;\n\t this._lBlock ^= t << offset;\n\t }\n\n\t function exchangeRL(offset, mask) {\n\t var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask;\n\t this._lBlock ^= t;\n\t this._rBlock ^= t << offset;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg);\n\t */\n\t C.DES = BlockCipher._createHelper(DES);\n\n\t /**\n\t * Triple-DES block cipher algorithm.\n\t */\n\t var TripleDES = C_algo.TripleDES = BlockCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var key = this._key;\n\t var keyWords = key.words;\n\t // Make sure the key length is valid (64, 128 or >= 192 bit)\n\t if (keyWords.length !== 2 && keyWords.length !== 4 && keyWords.length < 6) {\n\t throw new Error('Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.');\n\t }\n\n\t // Extend the key according to the keying options defined in 3DES standard\n\t var key1 = keyWords.slice(0, 2);\n\t var key2 = keyWords.length < 4 ? keyWords.slice(0, 2) : keyWords.slice(2, 4);\n\t var key3 = keyWords.length < 6 ? keyWords.slice(0, 2) : keyWords.slice(4, 6);\n\n\t // Create DES instances\n\t this._des1 = DES.createEncryptor(WordArray.create(key1));\n\t this._des2 = DES.createEncryptor(WordArray.create(key2));\n\t this._des3 = DES.createEncryptor(WordArray.create(key3));\n\t },\n\n\t encryptBlock: function (M, offset) {\n\t this._des1.encryptBlock(M, offset);\n\t this._des2.decryptBlock(M, offset);\n\t this._des3.encryptBlock(M, offset);\n\t },\n\n\t decryptBlock: function (M, offset) {\n\t this._des3.decryptBlock(M, offset);\n\t this._des2.encryptBlock(M, offset);\n\t this._des1.decryptBlock(M, offset);\n\t },\n\n\t keySize: 192/32,\n\n\t ivSize: 64/32,\n\n\t blockSize: 64/32\n\t });\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg);\n\t */\n\t C.TripleDES = BlockCipher._createHelper(TripleDES);\n\t}());\n\n\n\treturn CryptoJS.TripleDES;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var StreamCipher = C_lib.StreamCipher;\n\t var C_algo = C.algo;\n\n\t /**\n\t * RC4 stream cipher algorithm.\n\t */\n\t var RC4 = C_algo.RC4 = StreamCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var key = this._key;\n\t var keyWords = key.words;\n\t var keySigBytes = key.sigBytes;\n\n\t // Init sbox\n\t var S = this._S = [];\n\t for (var i = 0; i < 256; i++) {\n\t S[i] = i;\n\t }\n\n\t // Key setup\n\t for (var i = 0, j = 0; i < 256; i++) {\n\t var keyByteIndex = i % keySigBytes;\n\t var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff;\n\n\t j = (j + S[i] + keyByte) % 256;\n\n\t // Swap\n\t var t = S[i];\n\t S[i] = S[j];\n\t S[j] = t;\n\t }\n\n\t // Counters\n\t this._i = this._j = 0;\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t M[offset] ^= generateKeystreamWord.call(this);\n\t },\n\n\t keySize: 256/32,\n\n\t ivSize: 0\n\t });\n\n\t function generateKeystreamWord() {\n\t // Shortcuts\n\t var S = this._S;\n\t var i = this._i;\n\t var j = this._j;\n\n\t // Generate keystream word\n\t var keystreamWord = 0;\n\t for (var n = 0; n < 4; n++) {\n\t i = (i + 1) % 256;\n\t j = (j + S[i]) % 256;\n\n\t // Swap\n\t var t = S[i];\n\t S[i] = S[j];\n\t S[j] = t;\n\n\t keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8);\n\t }\n\n\t // Update counters\n\t this._i = i;\n\t this._j = j;\n\n\t return keystreamWord;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg);\n\t */\n\t C.RC4 = StreamCipher._createHelper(RC4);\n\n\t /**\n\t * Modified RC4 stream cipher algorithm.\n\t */\n\t var RC4Drop = C_algo.RC4Drop = RC4.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} drop The number of keystream words to drop. Default 192\n\t */\n\t cfg: RC4.cfg.extend({\n\t drop: 192\n\t }),\n\n\t _doReset: function () {\n\t RC4._doReset.call(this);\n\n\t // Drop\n\t for (var i = this.cfg.drop; i > 0; i--) {\n\t generateKeystreamWord.call(this);\n\t }\n\t }\n\t });\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg);\n\t */\n\t C.RC4Drop = StreamCipher._createHelper(RC4Drop);\n\t}());\n\n\n\treturn CryptoJS.RC4;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var StreamCipher = C_lib.StreamCipher;\n\t var C_algo = C.algo;\n\n\t // Reusable objects\n\t var S = [];\n\t var C_ = [];\n\t var G = [];\n\n\t /**\n\t * Rabbit stream cipher algorithm\n\t */\n\t var Rabbit = C_algo.Rabbit = StreamCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var K = this._key.words;\n\t var iv = this.cfg.iv;\n\n\t // Swap endian\n\t for (var i = 0; i < 4; i++) {\n\t K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) |\n\t (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00);\n\t }\n\n\t // Generate initial state values\n\t var X = this._X = [\n\t K[0], (K[3] << 16) | (K[2] >>> 16),\n\t K[1], (K[0] << 16) | (K[3] >>> 16),\n\t K[2], (K[1] << 16) | (K[0] >>> 16),\n\t K[3], (K[2] << 16) | (K[1] >>> 16)\n\t ];\n\n\t // Generate initial counter values\n\t var C = this._C = [\n\t (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),\n\t (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),\n\t (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),\n\t (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)\n\t ];\n\n\t // Carry bit\n\t this._b = 0;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\n\t // Modify the counters\n\t for (var i = 0; i < 8; i++) {\n\t C[i] ^= X[(i + 4) & 7];\n\t }\n\n\t // IV setup\n\t if (iv) {\n\t // Shortcuts\n\t var IV = iv.words;\n\t var IV_0 = IV[0];\n\t var IV_1 = IV[1];\n\n\t // Generate four subvectors\n\t var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00);\n\t var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00);\n\t var i1 = (i0 >>> 16) | (i2 & 0xffff0000);\n\t var i3 = (i2 << 16) | (i0 & 0x0000ffff);\n\n\t // Modify counter values\n\t C[0] ^= i0;\n\t C[1] ^= i1;\n\t C[2] ^= i2;\n\t C[3] ^= i3;\n\t C[4] ^= i0;\n\t C[5] ^= i1;\n\t C[6] ^= i2;\n\t C[7] ^= i3;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\t }\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var X = this._X;\n\n\t // Iterate the system\n\t nextState.call(this);\n\n\t // Generate four keystream words\n\t S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16);\n\t S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16);\n\t S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16);\n\t S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16);\n\n\t for (var i = 0; i < 4; i++) {\n\t // Swap endian\n\t S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) |\n\t (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00);\n\n\t // Encrypt\n\t M[offset + i] ^= S[i];\n\t }\n\t },\n\n\t blockSize: 128/32,\n\n\t ivSize: 64/32\n\t });\n\n\t function nextState() {\n\t // Shortcuts\n\t var X = this._X;\n\t var C = this._C;\n\n\t // Save old counter values\n\t for (var i = 0; i < 8; i++) {\n\t C_[i] = C[i];\n\t }\n\n\t // Calculate new counter values\n\t C[0] = (C[0] + 0x4d34d34d + this._b) | 0;\n\t C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0;\n\t C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0;\n\t C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0;\n\t C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0;\n\t C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0;\n\t C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0;\n\t C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0;\n\t this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0;\n\n\t // Calculate the g-values\n\t for (var i = 0; i < 8; i++) {\n\t var gx = X[i] + C[i];\n\n\t // Construct high and low argument for squaring\n\t var ga = gx & 0xffff;\n\t var gb = gx >>> 16;\n\n\t // Calculate high and low result of squaring\n\t var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb;\n\t var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0);\n\n\t // High XOR low\n\t G[i] = gh ^ gl;\n\t }\n\n\t // Calculate new state values\n\t X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0;\n\t X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0;\n\t X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0;\n\t X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0;\n\t X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0;\n\t X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0;\n\t X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0;\n\t X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg);\n\t */\n\t C.Rabbit = StreamCipher._createHelper(Rabbit);\n\t}());\n\n\n\treturn CryptoJS.Rabbit;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var StreamCipher = C_lib.StreamCipher;\n\t var C_algo = C.algo;\n\n\t // Reusable objects\n\t var S = [];\n\t var C_ = [];\n\t var G = [];\n\n\t /**\n\t * Rabbit stream cipher algorithm.\n\t *\n\t * This is a legacy version that neglected to convert the key to little-endian.\n\t * This error doesn't affect the cipher's security,\n\t * but it does affect its compatibility with other implementations.\n\t */\n\t var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var K = this._key.words;\n\t var iv = this.cfg.iv;\n\n\t // Generate initial state values\n\t var X = this._X = [\n\t K[0], (K[3] << 16) | (K[2] >>> 16),\n\t K[1], (K[0] << 16) | (K[3] >>> 16),\n\t K[2], (K[1] << 16) | (K[0] >>> 16),\n\t K[3], (K[2] << 16) | (K[1] >>> 16)\n\t ];\n\n\t // Generate initial counter values\n\t var C = this._C = [\n\t (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),\n\t (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),\n\t (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),\n\t (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)\n\t ];\n\n\t // Carry bit\n\t this._b = 0;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\n\t // Modify the counters\n\t for (var i = 0; i < 8; i++) {\n\t C[i] ^= X[(i + 4) & 7];\n\t }\n\n\t // IV setup\n\t if (iv) {\n\t // Shortcuts\n\t var IV = iv.words;\n\t var IV_0 = IV[0];\n\t var IV_1 = IV[1];\n\n\t // Generate four subvectors\n\t var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00);\n\t var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00);\n\t var i1 = (i0 >>> 16) | (i2 & 0xffff0000);\n\t var i3 = (i2 << 16) | (i0 & 0x0000ffff);\n\n\t // Modify counter values\n\t C[0] ^= i0;\n\t C[1] ^= i1;\n\t C[2] ^= i2;\n\t C[3] ^= i3;\n\t C[4] ^= i0;\n\t C[5] ^= i1;\n\t C[6] ^= i2;\n\t C[7] ^= i3;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\t }\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var X = this._X;\n\n\t // Iterate the system\n\t nextState.call(this);\n\n\t // Generate four keystream words\n\t S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16);\n\t S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16);\n\t S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16);\n\t S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16);\n\n\t for (var i = 0; i < 4; i++) {\n\t // Swap endian\n\t S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) |\n\t (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00);\n\n\t // Encrypt\n\t M[offset + i] ^= S[i];\n\t }\n\t },\n\n\t blockSize: 128/32,\n\n\t ivSize: 64/32\n\t });\n\n\t function nextState() {\n\t // Shortcuts\n\t var X = this._X;\n\t var C = this._C;\n\n\t // Save old counter values\n\t for (var i = 0; i < 8; i++) {\n\t C_[i] = C[i];\n\t }\n\n\t // Calculate new counter values\n\t C[0] = (C[0] + 0x4d34d34d + this._b) | 0;\n\t C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0;\n\t C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0;\n\t C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0;\n\t C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0;\n\t C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0;\n\t C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0;\n\t C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0;\n\t this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0;\n\n\t // Calculate the g-values\n\t for (var i = 0; i < 8; i++) {\n\t var gx = X[i] + C[i];\n\n\t // Construct high and low argument for squaring\n\t var ga = gx & 0xffff;\n\t var gb = gx >>> 16;\n\n\t // Calculate high and low result of squaring\n\t var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb;\n\t var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0);\n\n\t // High XOR low\n\t G[i] = gh ^ gl;\n\t }\n\n\t // Calculate new state values\n\t X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0;\n\t X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0;\n\t X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0;\n\t X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0;\n\t X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0;\n\t X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0;\n\t X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0;\n\t X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg);\n\t */\n\t C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy);\n\t}());\n\n\n\treturn CryptoJS.RabbitLegacy;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var BlockCipher = C_lib.BlockCipher;\n\t var C_algo = C.algo;\n\n\t const N = 16;\n\n\t //Origin pbox and sbox, derived from PI\n\t const ORIG_P = [\n\t 0x243F6A88, 0x85A308D3, 0x13198A2E, 0x03707344,\n\t 0xA4093822, 0x299F31D0, 0x082EFA98, 0xEC4E6C89,\n\t 0x452821E6, 0x38D01377, 0xBE5466CF, 0x34E90C6C,\n\t 0xC0AC29B7, 0xC97C50DD, 0x3F84D5B5, 0xB5470917,\n\t 0x9216D5D9, 0x8979FB1B\n\t ];\n\n\t const ORIG_S = [\n\t [ 0xD1310BA6, 0x98DFB5AC, 0x2FFD72DB, 0xD01ADFB7,\n\t 0xB8E1AFED, 0x6A267E96, 0xBA7C9045, 0xF12C7F99,\n\t 0x24A19947, 0xB3916CF7, 0x0801F2E2, 0x858EFC16,\n\t 0x636920D8, 0x71574E69, 0xA458FEA3, 0xF4933D7E,\n\t 0x0D95748F, 0x728EB658, 0x718BCD58, 0x82154AEE,\n\t 0x7B54A41D, 0xC25A59B5, 0x9C30D539, 0x2AF26013,\n\t 0xC5D1B023, 0x286085F0, 0xCA417918, 0xB8DB38EF,\n\t 0x8E79DCB0, 0x603A180E, 0x6C9E0E8B, 0xB01E8A3E,\n\t 0xD71577C1, 0xBD314B27, 0x78AF2FDA, 0x55605C60,\n\t 0xE65525F3, 0xAA55AB94, 0x57489862, 0x63E81440,\n\t 0x55CA396A, 0x2AAB10B6, 0xB4CC5C34, 0x1141E8CE,\n\t 0xA15486AF, 0x7C72E993, 0xB3EE1411, 0x636FBC2A,\n\t 0x2BA9C55D, 0x741831F6, 0xCE5C3E16, 0x9B87931E,\n\t 0xAFD6BA33, 0x6C24CF5C, 0x7A325381, 0x28958677,\n\t 0x3B8F4898, 0x6B4BB9AF, 0xC4BFE81B, 0x66282193,\n\t 0x61D809CC, 0xFB21A991, 0x487CAC60, 0x5DEC8032,\n\t 0xEF845D5D, 0xE98575B1, 0xDC262302, 0xEB651B88,\n\t 0x23893E81, 0xD396ACC5, 0x0F6D6FF3, 0x83F44239,\n\t 0x2E0B4482, 0xA4842004, 0x69C8F04A, 0x9E1F9B5E,\n\t 0x21C66842, 0xF6E96C9A, 0x670C9C61, 0xABD388F0,\n\t 0x6A51A0D2, 0xD8542F68, 0x960FA728, 0xAB5133A3,\n\t 0x6EEF0B6C, 0x137A3BE4, 0xBA3BF050, 0x7EFB2A98,\n\t 0xA1F1651D, 0x39AF0176, 0x66CA593E, 0x82430E88,\n\t 0x8CEE8619, 0x456F9FB4, 0x7D84A5C3, 0x3B8B5EBE,\n\t 0xE06F75D8, 0x85C12073, 0x401A449F, 0x56C16AA6,\n\t 0x4ED3AA62, 0x363F7706, 0x1BFEDF72, 0x429B023D,\n\t 0x37D0D724, 0xD00A1248, 0xDB0FEAD3, 0x49F1C09B,\n\t 0x075372C9, 0x80991B7B, 0x25D479D8, 0xF6E8DEF7,\n\t 0xE3FE501A, 0xB6794C3B, 0x976CE0BD, 0x04C006BA,\n\t 0xC1A94FB6, 0x409F60C4, 0x5E5C9EC2, 0x196A2463,\n\t 0x68FB6FAF, 0x3E6C53B5, 0x1339B2EB, 0x3B52EC6F,\n\t 0x6DFC511F, 0x9B30952C, 0xCC814544, 0xAF5EBD09,\n\t 0xBEE3D004, 0xDE334AFD, 0x660F2807, 0x192E4BB3,\n\t 0xC0CBA857, 0x45C8740F, 0xD20B5F39, 0xB9D3FBDB,\n\t 0x5579C0BD, 0x1A60320A, 0xD6A100C6, 0x402C7279,\n\t 0x679F25FE, 0xFB1FA3CC, 0x8EA5E9F8, 0xDB3222F8,\n\t 0x3C7516DF, 0xFD616B15, 0x2F501EC8, 0xAD0552AB,\n\t 0x323DB5FA, 0xFD238760, 0x53317B48, 0x3E00DF82,\n\t 0x9E5C57BB, 0xCA6F8CA0, 0x1A87562E, 0xDF1769DB,\n\t 0xD542A8F6, 0x287EFFC3, 0xAC6732C6, 0x8C4F5573,\n\t 0x695B27B0, 0xBBCA58C8, 0xE1FFA35D, 0xB8F011A0,\n\t 0x10FA3D98, 0xFD2183B8, 0x4AFCB56C, 0x2DD1D35B,\n\t 0x9A53E479, 0xB6F84565, 0xD28E49BC, 0x4BFB9790,\n\t 0xE1DDF2DA, 0xA4CB7E33, 0x62FB1341, 0xCEE4C6E8,\n\t 0xEF20CADA, 0x36774C01, 0xD07E9EFE, 0x2BF11FB4,\n\t 0x95DBDA4D, 0xAE909198, 0xEAAD8E71, 0x6B93D5A0,\n\t 0xD08ED1D0, 0xAFC725E0, 0x8E3C5B2F, 0x8E7594B7,\n\t 0x8FF6E2FB, 0xF2122B64, 0x8888B812, 0x900DF01C,\n\t 0x4FAD5EA0, 0x688FC31C, 0xD1CFF191, 0xB3A8C1AD,\n\t 0x2F2F2218, 0xBE0E1777, 0xEA752DFE, 0x8B021FA1,\n\t 0xE5A0CC0F, 0xB56F74E8, 0x18ACF3D6, 0xCE89E299,\n\t 0xB4A84FE0, 0xFD13E0B7, 0x7CC43B81, 0xD2ADA8D9,\n\t 0x165FA266, 0x80957705, 0x93CC7314, 0x211A1477,\n\t 0xE6AD2065, 0x77B5FA86, 0xC75442F5, 0xFB9D35CF,\n\t 0xEBCDAF0C, 0x7B3E89A0, 0xD6411BD3, 0xAE1E7E49,\n\t 0x00250E2D, 0x2071B35E, 0x226800BB, 0x57B8E0AF,\n\t 0x2464369B, 0xF009B91E, 0x5563911D, 0x59DFA6AA,\n\t 0x78C14389, 0xD95A537F, 0x207D5BA2, 0x02E5B9C5,\n\t 0x83260376, 0x6295CFA9, 0x11C81968, 0x4E734A41,\n\t 0xB3472DCA, 0x7B14A94A, 0x1B510052, 0x9A532915,\n\t 0xD60F573F, 0xBC9BC6E4, 0x2B60A476, 0x81E67400,\n\t 0x08BA6FB5, 0x571BE91F, 0xF296EC6B, 0x2A0DD915,\n\t 0xB6636521, 0xE7B9F9B6, 0xFF34052E, 0xC5855664,\n\t 0x53B02D5D, 0xA99F8FA1, 0x08BA4799, 0x6E85076A ],\n\t [ 0x4B7A70E9, 0xB5B32944, 0xDB75092E, 0xC4192623,\n\t 0xAD6EA6B0, 0x49A7DF7D, 0x9CEE60B8, 0x8FEDB266,\n\t 0xECAA8C71, 0x699A17FF, 0x5664526C, 0xC2B19EE1,\n\t 0x193602A5, 0x75094C29, 0xA0591340, 0xE4183A3E,\n\t 0x3F54989A, 0x5B429D65, 0x6B8FE4D6, 0x99F73FD6,\n\t 0xA1D29C07, 0xEFE830F5, 0x4D2D38E6, 0xF0255DC1,\n\t 0x4CDD2086, 0x8470EB26, 0x6382E9C6, 0x021ECC5E,\n\t 0x09686B3F, 0x3EBAEFC9, 0x3C971814, 0x6B6A70A1,\n\t 0x687F3584, 0x52A0E286, 0xB79C5305, 0xAA500737,\n\t 0x3E07841C, 0x7FDEAE5C, 0x8E7D44EC, 0x5716F2B8,\n\t 0xB03ADA37, 0xF0500C0D, 0xF01C1F04, 0x0200B3FF,\n\t 0xAE0CF51A, 0x3CB574B2, 0x25837A58, 0xDC0921BD,\n\t 0xD19113F9, 0x7CA92FF6, 0x94324773, 0x22F54701,\n\t 0x3AE5E581, 0x37C2DADC, 0xC8B57634, 0x9AF3DDA7,\n\t 0xA9446146, 0x0FD0030E, 0xECC8C73E, 0xA4751E41,\n\t 0xE238CD99, 0x3BEA0E2F, 0x3280BBA1, 0x183EB331,\n\t 0x4E548B38, 0x4F6DB908, 0x6F420D03, 0xF60A04BF,\n\t 0x2CB81290, 0x24977C79, 0x5679B072, 0xBCAF89AF,\n\t 0xDE9A771F, 0xD9930810, 0xB38BAE12, 0xDCCF3F2E,\n\t 0x5512721F, 0x2E6B7124, 0x501ADDE6, 0x9F84CD87,\n\t 0x7A584718, 0x7408DA17, 0xBC9F9ABC, 0xE94B7D8C,\n\t 0xEC7AEC3A, 0xDB851DFA, 0x63094366, 0xC464C3D2,\n\t 0xEF1C1847, 0x3215D908, 0xDD433B37, 0x24C2BA16,\n\t 0x12A14D43, 0x2A65C451, 0x50940002, 0x133AE4DD,\n\t 0x71DFF89E, 0x10314E55, 0x81AC77D6, 0x5F11199B,\n\t 0x043556F1, 0xD7A3C76B, 0x3C11183B, 0x5924A509,\n\t 0xF28FE6ED, 0x97F1FBFA, 0x9EBABF2C, 0x1E153C6E,\n\t 0x86E34570, 0xEAE96FB1, 0x860E5E0A, 0x5A3E2AB3,\n\t 0x771FE71C, 0x4E3D06FA, 0x2965DCB9, 0x99E71D0F,\n\t 0x803E89D6, 0x5266C825, 0x2E4CC978, 0x9C10B36A,\n\t 0xC6150EBA, 0x94E2EA78, 0xA5FC3C53, 0x1E0A2DF4,\n\t 0xF2F74EA7, 0x361D2B3D, 0x1939260F, 0x19C27960,\n\t 0x5223A708, 0xF71312B6, 0xEBADFE6E, 0xEAC31F66,\n\t 0xE3BC4595, 0xA67BC883, 0xB17F37D1, 0x018CFF28,\n\t 0xC332DDEF, 0xBE6C5AA5, 0x65582185, 0x68AB9802,\n\t 0xEECEA50F, 0xDB2F953B, 0x2AEF7DAD, 0x5B6E2F84,\n\t 0x1521B628, 0x29076170, 0xECDD4775, 0x619F1510,\n\t 0x13CCA830, 0xEB61BD96, 0x0334FE1E, 0xAA0363CF,\n\t 0xB5735C90, 0x4C70A239, 0xD59E9E0B, 0xCBAADE14,\n\t 0xEECC86BC, 0x60622CA7, 0x9CAB5CAB, 0xB2F3846E,\n\t 0x648B1EAF, 0x19BDF0CA, 0xA02369B9, 0x655ABB50,\n\t 0x40685A32, 0x3C2AB4B3, 0x319EE9D5, 0xC021B8F7,\n\t 0x9B540B19, 0x875FA099, 0x95F7997E, 0x623D7DA8,\n\t 0xF837889A, 0x97E32D77, 0x11ED935F, 0x16681281,\n\t 0x0E358829, 0xC7E61FD6, 0x96DEDFA1, 0x7858BA99,\n\t 0x57F584A5, 0x1B227263, 0x9B83C3FF, 0x1AC24696,\n\t 0xCDB30AEB, 0x532E3054, 0x8FD948E4, 0x6DBC3128,\n\t 0x58EBF2EF, 0x34C6FFEA, 0xFE28ED61, 0xEE7C3C73,\n\t 0x5D4A14D9, 0xE864B7E3, 0x42105D14, 0x203E13E0,\n\t 0x45EEE2B6, 0xA3AAABEA, 0xDB6C4F15, 0xFACB4FD0,\n\t 0xC742F442, 0xEF6ABBB5, 0x654F3B1D, 0x41CD2105,\n\t 0xD81E799E, 0x86854DC7, 0xE44B476A, 0x3D816250,\n\t 0xCF62A1F2, 0x5B8D2646, 0xFC8883A0, 0xC1C7B6A3,\n\t 0x7F1524C3, 0x69CB7492, 0x47848A0B, 0x5692B285,\n\t 0x095BBF00, 0xAD19489D, 0x1462B174, 0x23820E00,\n\t 0x58428D2A, 0x0C55F5EA, 0x1DADF43E, 0x233F7061,\n\t 0x3372F092, 0x8D937E41, 0xD65FECF1, 0x6C223BDB,\n\t 0x7CDE3759, 0xCBEE7460, 0x4085F2A7, 0xCE77326E,\n\t 0xA6078084, 0x19F8509E, 0xE8EFD855, 0x61D99735,\n\t 0xA969A7AA, 0xC50C06C2, 0x5A04ABFC, 0x800BCADC,\n\t 0x9E447A2E, 0xC3453484, 0xFDD56705, 0x0E1E9EC9,\n\t 0xDB73DBD3, 0x105588CD, 0x675FDA79, 0xE3674340,\n\t 0xC5C43465, 0x713E38D8, 0x3D28F89E, 0xF16DFF20,\n\t 0x153E21E7, 0x8FB03D4A, 0xE6E39F2B, 0xDB83ADF7 ],\n\t [ 0xE93D5A68, 0x948140F7, 0xF64C261C, 0x94692934,\n\t 0x411520F7, 0x7602D4F7, 0xBCF46B2E, 0xD4A20068,\n\t 0xD4082471, 0x3320F46A, 0x43B7D4B7, 0x500061AF,\n\t 0x1E39F62E, 0x97244546, 0x14214F74, 0xBF8B8840,\n\t 0x4D95FC1D, 0x96B591AF, 0x70F4DDD3, 0x66A02F45,\n\t 0xBFBC09EC, 0x03BD9785, 0x7FAC6DD0, 0x31CB8504,\n\t 0x96EB27B3, 0x55FD3941, 0xDA2547E6, 0xABCA0A9A,\n\t 0x28507825, 0x530429F4, 0x0A2C86DA, 0xE9B66DFB,\n\t 0x68DC1462, 0xD7486900, 0x680EC0A4, 0x27A18DEE,\n\t 0x4F3FFEA2, 0xE887AD8C, 0xB58CE006, 0x7AF4D6B6,\n\t 0xAACE1E7C, 0xD3375FEC, 0xCE78A399, 0x406B2A42,\n\t 0x20FE9E35, 0xD9F385B9, 0xEE39D7AB, 0x3B124E8B,\n\t 0x1DC9FAF7, 0x4B6D1856, 0x26A36631, 0xEAE397B2,\n\t 0x3A6EFA74, 0xDD5B4332, 0x6841E7F7, 0xCA7820FB,\n\t 0xFB0AF54E, 0xD8FEB397, 0x454056AC, 0xBA489527,\n\t 0x55533A3A, 0x20838D87, 0xFE6BA9B7, 0xD096954B,\n\t 0x55A867BC, 0xA1159A58, 0xCCA92963, 0x99E1DB33,\n\t 0xA62A4A56, 0x3F3125F9, 0x5EF47E1C, 0x9029317C,\n\t 0xFDF8E802, 0x04272F70, 0x80BB155C, 0x05282CE3,\n\t 0x95C11548, 0xE4C66D22, 0x48C1133F, 0xC70F86DC,\n\t 0x07F9C9EE, 0x41041F0F, 0x404779A4, 0x5D886E17,\n\t 0x325F51EB, 0xD59BC0D1, 0xF2BCC18F, 0x41113564,\n\t 0x257B7834, 0x602A9C60, 0xDFF8E8A3, 0x1F636C1B,\n\t 0x0E12B4C2, 0x02E1329E, 0xAF664FD1, 0xCAD18115,\n\t 0x6B2395E0, 0x333E92E1, 0x3B240B62, 0xEEBEB922,\n\t 0x85B2A20E, 0xE6BA0D99, 0xDE720C8C, 0x2DA2F728,\n\t 0xD0127845, 0x95B794FD, 0x647D0862, 0xE7CCF5F0,\n\t 0x5449A36F, 0x877D48FA, 0xC39DFD27, 0xF33E8D1E,\n\t 0x0A476341, 0x992EFF74, 0x3A6F6EAB, 0xF4F8FD37,\n\t 0xA812DC60, 0xA1EBDDF8, 0x991BE14C, 0xDB6E6B0D,\n\t 0xC67B5510, 0x6D672C37, 0x2765D43B, 0xDCD0E804,\n\t 0xF1290DC7, 0xCC00FFA3, 0xB5390F92, 0x690FED0B,\n\t 0x667B9FFB, 0xCEDB7D9C, 0xA091CF0B, 0xD9155EA3,\n\t 0xBB132F88, 0x515BAD24, 0x7B9479BF, 0x763BD6EB,\n\t 0x37392EB3, 0xCC115979, 0x8026E297, 0xF42E312D,\n\t 0x6842ADA7, 0xC66A2B3B, 0x12754CCC, 0x782EF11C,\n\t 0x6A124237, 0xB79251E7, 0x06A1BBE6, 0x4BFB6350,\n\t 0x1A6B1018, 0x11CAEDFA, 0x3D25BDD8, 0xE2E1C3C9,\n\t 0x44421659, 0x0A121386, 0xD90CEC6E, 0xD5ABEA2A,\n\t 0x64AF674E, 0xDA86A85F, 0xBEBFE988, 0x64E4C3FE,\n\t 0x9DBC8057, 0xF0F7C086, 0x60787BF8, 0x6003604D,\n\t 0xD1FD8346, 0xF6381FB0, 0x7745AE04, 0xD736FCCC,\n\t 0x83426B33, 0xF01EAB71, 0xB0804187, 0x3C005E5F,\n\t 0x77A057BE, 0xBDE8AE24, 0x55464299, 0xBF582E61,\n\t 0x4E58F48F, 0xF2DDFDA2, 0xF474EF38, 0x8789BDC2,\n\t 0x5366F9C3, 0xC8B38E74, 0xB475F255, 0x46FCD9B9,\n\t 0x7AEB2661, 0x8B1DDF84, 0x846A0E79, 0x915F95E2,\n\t 0x466E598E, 0x20B45770, 0x8CD55591, 0xC902DE4C,\n\t 0xB90BACE1, 0xBB8205D0, 0x11A86248, 0x7574A99E,\n\t 0xB77F19B6, 0xE0A9DC09, 0x662D09A1, 0xC4324633,\n\t 0xE85A1F02, 0x09F0BE8C, 0x4A99A025, 0x1D6EFE10,\n\t 0x1AB93D1D, 0x0BA5A4DF, 0xA186F20F, 0x2868F169,\n\t 0xDCB7DA83, 0x573906FE, 0xA1E2CE9B, 0x4FCD7F52,\n\t 0x50115E01, 0xA70683FA, 0xA002B5C4, 0x0DE6D027,\n\t 0x9AF88C27, 0x773F8641, 0xC3604C06, 0x61A806B5,\n\t 0xF0177A28, 0xC0F586E0, 0x006058AA, 0x30DC7D62,\n\t 0x11E69ED7, 0x2338EA63, 0x53C2DD94, 0xC2C21634,\n\t 0xBBCBEE56, 0x90BCB6DE, 0xEBFC7DA1, 0xCE591D76,\n\t 0x6F05E409, 0x4B7C0188, 0x39720A3D, 0x7C927C24,\n\t 0x86E3725F, 0x724D9DB9, 0x1AC15BB4, 0xD39EB8FC,\n\t 0xED545578, 0x08FCA5B5, 0xD83D7CD3, 0x4DAD0FC4,\n\t 0x1E50EF5E, 0xB161E6F8, 0xA28514D9, 0x6C51133C,\n\t 0x6FD5C7E7, 0x56E14EC4, 0x362ABFCE, 0xDDC6C837,\n\t 0xD79A3234, 0x92638212, 0x670EFA8E, 0x406000E0 ],\n\t [ 0x3A39CE37, 0xD3FAF5CF, 0xABC27737, 0x5AC52D1B,\n\t 0x5CB0679E, 0x4FA33742, 0xD3822740, 0x99BC9BBE,\n\t 0xD5118E9D, 0xBF0F7315, 0xD62D1C7E, 0xC700C47B,\n\t 0xB78C1B6B, 0x21A19045, 0xB26EB1BE, 0x6A366EB4,\n\t 0x5748AB2F, 0xBC946E79, 0xC6A376D2, 0x6549C2C8,\n\t 0x530FF8EE, 0x468DDE7D, 0xD5730A1D, 0x4CD04DC6,\n\t 0x2939BBDB, 0xA9BA4650, 0xAC9526E8, 0xBE5EE304,\n\t 0xA1FAD5F0, 0x6A2D519A, 0x63EF8CE2, 0x9A86EE22,\n\t 0xC089C2B8, 0x43242EF6, 0xA51E03AA, 0x9CF2D0A4,\n\t 0x83C061BA, 0x9BE96A4D, 0x8FE51550, 0xBA645BD6,\n\t 0x2826A2F9, 0xA73A3AE1, 0x4BA99586, 0xEF5562E9,\n\t 0xC72FEFD3, 0xF752F7DA, 0x3F046F69, 0x77FA0A59,\n\t 0x80E4A915, 0x87B08601, 0x9B09E6AD, 0x3B3EE593,\n\t 0xE990FD5A, 0x9E34D797, 0x2CF0B7D9, 0x022B8B51,\n\t 0x96D5AC3A, 0x017DA67D, 0xD1CF3ED6, 0x7C7D2D28,\n\t 0x1F9F25CF, 0xADF2B89B, 0x5AD6B472, 0x5A88F54C,\n\t 0xE029AC71, 0xE019A5E6, 0x47B0ACFD, 0xED93FA9B,\n\t 0xE8D3C48D, 0x283B57CC, 0xF8D56629, 0x79132E28,\n\t 0x785F0191, 0xED756055, 0xF7960E44, 0xE3D35E8C,\n\t 0x15056DD4, 0x88F46DBA, 0x03A16125, 0x0564F0BD,\n\t 0xC3EB9E15, 0x3C9057A2, 0x97271AEC, 0xA93A072A,\n\t 0x1B3F6D9B, 0x1E6321F5, 0xF59C66FB, 0x26DCF319,\n\t 0x7533D928, 0xB155FDF5, 0x03563482, 0x8ABA3CBB,\n\t 0x28517711, 0xC20AD9F8, 0xABCC5167, 0xCCAD925F,\n\t 0x4DE81751, 0x3830DC8E, 0x379D5862, 0x9320F991,\n\t 0xEA7A90C2, 0xFB3E7BCE, 0x5121CE64, 0x774FBE32,\n\t 0xA8B6E37E, 0xC3293D46, 0x48DE5369, 0x6413E680,\n\t 0xA2AE0810, 0xDD6DB224, 0x69852DFD, 0x09072166,\n\t 0xB39A460A, 0x6445C0DD, 0x586CDECF, 0x1C20C8AE,\n\t 0x5BBEF7DD, 0x1B588D40, 0xCCD2017F, 0x6BB4E3BB,\n\t 0xDDA26A7E, 0x3A59FF45, 0x3E350A44, 0xBCB4CDD5,\n\t 0x72EACEA8, 0xFA6484BB, 0x8D6612AE, 0xBF3C6F47,\n\t 0xD29BE463, 0x542F5D9E, 0xAEC2771B, 0xF64E6370,\n\t 0x740E0D8D, 0xE75B1357, 0xF8721671, 0xAF537D5D,\n\t 0x4040CB08, 0x4EB4E2CC, 0x34D2466A, 0x0115AF84,\n\t 0xE1B00428, 0x95983A1D, 0x06B89FB4, 0xCE6EA048,\n\t 0x6F3F3B82, 0x3520AB82, 0x011A1D4B, 0x277227F8,\n\t 0x611560B1, 0xE7933FDC, 0xBB3A792B, 0x344525BD,\n\t 0xA08839E1, 0x51CE794B, 0x2F32C9B7, 0xA01FBAC9,\n\t 0xE01CC87E, 0xBCC7D1F6, 0xCF0111C3, 0xA1E8AAC7,\n\t 0x1A908749, 0xD44FBD9A, 0xD0DADECB, 0xD50ADA38,\n\t 0x0339C32A, 0xC6913667, 0x8DF9317C, 0xE0B12B4F,\n\t 0xF79E59B7, 0x43F5BB3A, 0xF2D519FF, 0x27D9459C,\n\t 0xBF97222C, 0x15E6FC2A, 0x0F91FC71, 0x9B941525,\n\t 0xFAE59361, 0xCEB69CEB, 0xC2A86459, 0x12BAA8D1,\n\t 0xB6C1075E, 0xE3056A0C, 0x10D25065, 0xCB03A442,\n\t 0xE0EC6E0E, 0x1698DB3B, 0x4C98A0BE, 0x3278E964,\n\t 0x9F1F9532, 0xE0D392DF, 0xD3A0342B, 0x8971F21E,\n\t 0x1B0A7441, 0x4BA3348C, 0xC5BE7120, 0xC37632D8,\n\t 0xDF359F8D, 0x9B992F2E, 0xE60B6F47, 0x0FE3F11D,\n\t 0xE54CDA54, 0x1EDAD891, 0xCE6279CF, 0xCD3E7E6F,\n\t 0x1618B166, 0xFD2C1D05, 0x848FD2C5, 0xF6FB2299,\n\t 0xF523F357, 0xA6327623, 0x93A83531, 0x56CCCD02,\n\t 0xACF08162, 0x5A75EBB5, 0x6E163697, 0x88D273CC,\n\t 0xDE966292, 0x81B949D0, 0x4C50901B, 0x71C65614,\n\t 0xE6C6C7BD, 0x327A140A, 0x45E1D006, 0xC3F27B9A,\n\t 0xC9AA53FD, 0x62A80F00, 0xBB25BFE2, 0x35BDD2F6,\n\t 0x71126905, 0xB2040222, 0xB6CBCF7C, 0xCD769C2B,\n\t 0x53113EC0, 0x1640E3D3, 0x38ABBD60, 0x2547ADF0,\n\t 0xBA38209C, 0xF746CE76, 0x77AFA1C5, 0x20756060,\n\t 0x85CBFE4E, 0x8AE88DD8, 0x7AAAF9B0, 0x4CF9AA7E,\n\t 0x1948C25C, 0x02FB8A8C, 0x01C36AE4, 0xD6EBE1F9,\n\t 0x90D4F869, 0xA65CDEA0, 0x3F09252D, 0xC208E69F,\n\t 0xB74E6132, 0xCE77E25B, 0x578FDFE3, 0x3AC372E6 ]\n\t ];\n\n\t var BLOWFISH_CTX = {\n\t pbox: [],\n\t sbox: []\n\t }\n\n\t function F(ctx, x){\n\t let a = (x >> 24) & 0xFF;\n\t let b = (x >> 16) & 0xFF;\n\t let c = (x >> 8) & 0xFF;\n\t let d = x & 0xFF;\n\n\t let y = ctx.sbox[0][a] + ctx.sbox[1][b];\n\t y = y ^ ctx.sbox[2][c];\n\t y = y + ctx.sbox[3][d];\n\n\t return y;\n\t }\n\n\t function BlowFish_Encrypt(ctx, left, right){\n\t let Xl = left;\n\t let Xr = right;\n\t let temp;\n\n\t for(let i = 0; i < N; ++i){\n\t Xl = Xl ^ ctx.pbox[i];\n\t Xr = F(ctx, Xl) ^ Xr;\n\n\t temp = Xl;\n\t Xl = Xr;\n\t Xr = temp;\n\t }\n\n\t temp = Xl;\n\t Xl = Xr;\n\t Xr = temp;\n\n\t Xr = Xr ^ ctx.pbox[N];\n\t Xl = Xl ^ ctx.pbox[N + 1];\n\n\t return {left: Xl, right: Xr};\n\t }\n\n\t function BlowFish_Decrypt(ctx, left, right){\n\t let Xl = left;\n\t let Xr = right;\n\t let temp;\n\n\t for(let i = N + 1; i > 1; --i){\n\t Xl = Xl ^ ctx.pbox[i];\n\t Xr = F(ctx, Xl) ^ Xr;\n\n\t temp = Xl;\n\t Xl = Xr;\n\t Xr = temp;\n\t }\n\n\t temp = Xl;\n\t Xl = Xr;\n\t Xr = temp;\n\n\t Xr = Xr ^ ctx.pbox[1];\n\t Xl = Xl ^ ctx.pbox[0];\n\n\t return {left: Xl, right: Xr};\n\t }\n\n\t /**\n\t * Initialization ctx's pbox and sbox.\n\t *\n\t * @param {Object} ctx The object has pbox and sbox.\n\t * @param {Array} key An array of 32-bit words.\n\t * @param {int} keysize The length of the key.\n\t *\n\t * @example\n\t *\n\t * BlowFishInit(BLOWFISH_CTX, key, 128/32);\n\t */\n\t function BlowFishInit(ctx, key, keysize)\n\t {\n\t for(let Row = 0; Row < 4; Row++)\n\t {\n\t ctx.sbox[Row] = [];\n\t for(let Col = 0; Col < 256; Col++)\n\t {\n\t ctx.sbox[Row][Col] = ORIG_S[Row][Col];\n\t }\n\t }\n\n\t let keyIndex = 0;\n\t for(let index = 0; index < N + 2; index++)\n\t {\n\t ctx.pbox[index] = ORIG_P[index] ^ key[keyIndex];\n\t keyIndex++;\n\t if(keyIndex >= keysize)\n\t {\n\t keyIndex = 0;\n\t }\n\t }\n\n\t let Data1 = 0;\n\t let Data2 = 0;\n\t let res = 0;\n\t for(let i = 0; i < N + 2; i += 2)\n\t {\n\t res = BlowFish_Encrypt(ctx, Data1, Data2);\n\t Data1 = res.left;\n\t Data2 = res.right;\n\t ctx.pbox[i] = Data1;\n\t ctx.pbox[i + 1] = Data2;\n\t }\n\n\t for(let i = 0; i < 4; i++)\n\t {\n\t for(let j = 0; j < 256; j += 2)\n\t {\n\t res = BlowFish_Encrypt(ctx, Data1, Data2);\n\t Data1 = res.left;\n\t Data2 = res.right;\n\t ctx.sbox[i][j] = Data1;\n\t ctx.sbox[i][j + 1] = Data2;\n\t }\n\t }\n\n\t return true;\n\t }\n\n\t /**\n\t * Blowfish block cipher algorithm.\n\t */\n\t var Blowfish = C_algo.Blowfish = BlockCipher.extend({\n\t _doReset: function () {\n\t // Skip reset of nRounds has been set before and key did not change\n\t if (this._keyPriorReset === this._key) {\n\t return;\n\t }\n\n\t // Shortcuts\n\t var key = this._keyPriorReset = this._key;\n\t var keyWords = key.words;\n\t var keySize = key.sigBytes / 4;\n\n\t //Initialization pbox and sbox\n\t BlowFishInit(BLOWFISH_CTX, keyWords, keySize);\n\t },\n\n\t encryptBlock: function (M, offset) {\n\t var res = BlowFish_Encrypt(BLOWFISH_CTX, M[offset], M[offset + 1]);\n\t M[offset] = res.left;\n\t M[offset + 1] = res.right;\n\t },\n\n\t decryptBlock: function (M, offset) {\n\t var res = BlowFish_Decrypt(BLOWFISH_CTX, M[offset], M[offset + 1]);\n\t M[offset] = res.left;\n\t M[offset + 1] = res.right;\n\t },\n\n\t blockSize: 64/32,\n\n\t keySize: 128/32,\n\n\t ivSize: 64/32\n\t });\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.Blowfish.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.Blowfish.decrypt(ciphertext, key, cfg);\n\t */\n\t C.Blowfish = BlockCipher._createHelper(Blowfish);\n\t}());\n\n\n\treturn CryptoJS.Blowfish;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./x64-core\"), require(\"./lib-typedarrays\"), require(\"./enc-utf16\"), require(\"./enc-base64\"), require(\"./enc-base64url\"), require(\"./md5\"), require(\"./sha1\"), require(\"./sha256\"), require(\"./sha224\"), require(\"./sha512\"), require(\"./sha384\"), require(\"./sha3\"), require(\"./ripemd160\"), require(\"./hmac\"), require(\"./pbkdf2\"), require(\"./evpkdf\"), require(\"./cipher-core\"), require(\"./mode-cfb\"), require(\"./mode-ctr\"), require(\"./mode-ctr-gladman\"), require(\"./mode-ofb\"), require(\"./mode-ecb\"), require(\"./pad-ansix923\"), require(\"./pad-iso10126\"), require(\"./pad-iso97971\"), require(\"./pad-zeropadding\"), require(\"./pad-nopadding\"), require(\"./format-hex\"), require(\"./aes\"), require(\"./tripledes\"), require(\"./rc4\"), require(\"./rabbit\"), require(\"./rabbit-legacy\"), require(\"./blowfish\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./x64-core\", \"./lib-typedarrays\", \"./enc-utf16\", \"./enc-base64\", \"./enc-base64url\", \"./md5\", \"./sha1\", \"./sha256\", \"./sha224\", \"./sha512\", \"./sha384\", \"./sha3\", \"./ripemd160\", \"./hmac\", \"./pbkdf2\", \"./evpkdf\", \"./cipher-core\", \"./mode-cfb\", \"./mode-ctr\", \"./mode-ctr-gladman\", \"./mode-ofb\", \"./mode-ecb\", \"./pad-ansix923\", \"./pad-iso10126\", \"./pad-iso97971\", \"./pad-zeropadding\", \"./pad-nopadding\", \"./format-hex\", \"./aes\", \"./tripledes\", \"./rc4\", \"./rabbit\", \"./rabbit-legacy\", \"./blowfish\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\troot.CryptoJS = factory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\treturn CryptoJS;\n\n}));","/**\n * Node.js module for Forge.\n *\n * @author Dave Longley\n *\n * Copyright 2011-2016 Digital Bazaar, Inc.\n */\nmodule.exports = {\n // default options\n options: {\n usePureJavaScript: false\n }\n};\n","/**\n * Base-N/Base-X encoding/decoding functions.\n *\n * Original implementation from base-x:\n * https://github.com/cryptocoinjs/base-x\n *\n * Which is MIT licensed:\n *\n * The MIT License (MIT)\n *\n * Copyright base-x contributors (c) 2016\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n */\nvar api = {};\nmodule.exports = api;\n\n// baseN alphabet indexes\nvar _reverseAlphabets = {};\n\n/**\n * BaseN-encodes a Uint8Array using the given alphabet.\n *\n * @param input the Uint8Array to encode.\n * @param maxline the maximum number of encoded characters per line to use,\n * defaults to none.\n *\n * @return the baseN-encoded output string.\n */\napi.encode = function(input, alphabet, maxline) {\n if(typeof alphabet !== 'string') {\n throw new TypeError('\"alphabet\" must be a string.');\n }\n if(maxline !== undefined && typeof maxline !== 'number') {\n throw new TypeError('\"maxline\" must be a number.');\n }\n\n var output = '';\n\n if(!(input instanceof Uint8Array)) {\n // assume forge byte buffer\n output = _encodeWithByteBuffer(input, alphabet);\n } else {\n var i = 0;\n var base = alphabet.length;\n var first = alphabet.charAt(0);\n var digits = [0];\n for(i = 0; i < input.length; ++i) {\n for(var j = 0, carry = input[i]; j < digits.length; ++j) {\n carry += digits[j] << 8;\n digits[j] = carry % base;\n carry = (carry / base) | 0;\n }\n\n while(carry > 0) {\n digits.push(carry % base);\n carry = (carry / base) | 0;\n }\n }\n\n // deal with leading zeros\n for(i = 0; input[i] === 0 && i < input.length - 1; ++i) {\n output += first;\n }\n // convert digits to a string\n for(i = digits.length - 1; i >= 0; --i) {\n output += alphabet[digits[i]];\n }\n }\n\n if(maxline) {\n var regex = new RegExp('.{1,' + maxline + '}', 'g');\n output = output.match(regex).join('\\r\\n');\n }\n\n return output;\n};\n\n/**\n * Decodes a baseN-encoded (using the given alphabet) string to a\n * Uint8Array.\n *\n * @param input the baseN-encoded input string.\n *\n * @return the Uint8Array.\n */\napi.decode = function(input, alphabet) {\n if(typeof input !== 'string') {\n throw new TypeError('\"input\" must be a string.');\n }\n if(typeof alphabet !== 'string') {\n throw new TypeError('\"alphabet\" must be a string.');\n }\n\n var table = _reverseAlphabets[alphabet];\n if(!table) {\n // compute reverse alphabet\n table = _reverseAlphabets[alphabet] = [];\n for(var i = 0; i < alphabet.length; ++i) {\n table[alphabet.charCodeAt(i)] = i;\n }\n }\n\n // remove whitespace characters\n input = input.replace(/\\s/g, '');\n\n var base = alphabet.length;\n var first = alphabet.charAt(0);\n var bytes = [0];\n for(var i = 0; i < input.length; i++) {\n var value = table[input.charCodeAt(i)];\n if(value === undefined) {\n return;\n }\n\n for(var j = 0, carry = value; j < bytes.length; ++j) {\n carry += bytes[j] * base;\n bytes[j] = carry & 0xff;\n carry >>= 8;\n }\n\n while(carry > 0) {\n bytes.push(carry & 0xff);\n carry >>= 8;\n }\n }\n\n // deal with leading zeros\n for(var k = 0; input[k] === first && k < input.length - 1; ++k) {\n bytes.push(0);\n }\n\n if(typeof Buffer !== 'undefined') {\n return Buffer.from(bytes.reverse());\n }\n\n return new Uint8Array(bytes.reverse());\n};\n\nfunction _encodeWithByteBuffer(input, alphabet) {\n var i = 0;\n var base = alphabet.length;\n var first = alphabet.charAt(0);\n var digits = [0];\n for(i = 0; i < input.length(); ++i) {\n for(var j = 0, carry = input.at(i); j < digits.length; ++j) {\n carry += digits[j] << 8;\n digits[j] = carry % base;\n carry = (carry / base) | 0;\n }\n\n while(carry > 0) {\n digits.push(carry % base);\n carry = (carry / base) | 0;\n }\n }\n\n var output = '';\n\n // deal with leading zeros\n for(i = 0; input.at(i) === 0 && i < input.length() - 1; ++i) {\n output += first;\n }\n // convert digits to a string\n for(i = digits.length - 1; i >= 0; --i) {\n output += alphabet[digits[i]];\n }\n\n return output;\n}\n","/**\n * Utility functions for web applications.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2010-2018 Digital Bazaar, Inc.\n */\nvar forge = require('./forge');\nvar baseN = require('./baseN');\n\n/* Utilities API */\nvar util = module.exports = forge.util = forge.util || {};\n\n// define setImmediate and nextTick\n(function() {\n // use native nextTick (unless we're in webpack)\n // webpack (or better node-libs-browser polyfill) sets process.browser.\n // this way we can detect webpack properly\n if(typeof process !== 'undefined' && process.nextTick && !process.browser) {\n util.nextTick = process.nextTick;\n if(typeof setImmediate === 'function') {\n util.setImmediate = setImmediate;\n } else {\n // polyfill setImmediate with nextTick, older versions of node\n // (those w/o setImmediate) won't totally starve IO\n util.setImmediate = util.nextTick;\n }\n return;\n }\n\n // polyfill nextTick with native setImmediate\n if(typeof setImmediate === 'function') {\n util.setImmediate = function() { return setImmediate.apply(undefined, arguments); };\n util.nextTick = function(callback) {\n return setImmediate(callback);\n };\n return;\n }\n\n /* Note: A polyfill upgrade pattern is used here to allow combining\n polyfills. For example, MutationObserver is fast, but blocks UI updates,\n so it needs to allow UI updates periodically, so it falls back on\n postMessage or setTimeout. */\n\n // polyfill with setTimeout\n util.setImmediate = function(callback) {\n setTimeout(callback, 0);\n };\n\n // upgrade polyfill to use postMessage\n if(typeof window !== 'undefined' &&\n typeof window.postMessage === 'function') {\n var msg = 'forge.setImmediate';\n var callbacks = [];\n util.setImmediate = function(callback) {\n callbacks.push(callback);\n // only send message when one hasn't been sent in\n // the current turn of the event loop\n if(callbacks.length === 1) {\n window.postMessage(msg, '*');\n }\n };\n function handler(event) {\n if(event.source === window && event.data === msg) {\n event.stopPropagation();\n var copy = callbacks.slice();\n callbacks.length = 0;\n copy.forEach(function(callback) {\n callback();\n });\n }\n }\n window.addEventListener('message', handler, true);\n }\n\n // upgrade polyfill to use MutationObserver\n if(typeof MutationObserver !== 'undefined') {\n // polyfill with MutationObserver\n var now = Date.now();\n var attr = true;\n var div = document.createElement('div');\n var callbacks = [];\n new MutationObserver(function() {\n var copy = callbacks.slice();\n callbacks.length = 0;\n copy.forEach(function(callback) {\n callback();\n });\n }).observe(div, {attributes: true});\n var oldSetImmediate = util.setImmediate;\n util.setImmediate = function(callback) {\n if(Date.now() - now > 15) {\n now = Date.now();\n oldSetImmediate(callback);\n } else {\n callbacks.push(callback);\n // only trigger observer when it hasn't been triggered in\n // the current turn of the event loop\n if(callbacks.length === 1) {\n div.setAttribute('a', attr = !attr);\n }\n }\n };\n }\n\n util.nextTick = util.setImmediate;\n})();\n\n// check if running under Node.js\nutil.isNodejs =\n typeof process !== 'undefined' && process.versions && process.versions.node;\n\n\n// 'self' will also work in Web Workers (instance of WorkerGlobalScope) while\n// it will point to `window` in the main thread.\n// To remain compatible with older browsers, we fall back to 'window' if 'self'\n// is not available.\nutil.globalScope = (function() {\n if(util.isNodejs) {\n return global;\n }\n\n return typeof self === 'undefined' ? window : self;\n})();\n\n// define isArray\nutil.isArray = Array.isArray || function(x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n};\n\n// define isArrayBuffer\nutil.isArrayBuffer = function(x) {\n return typeof ArrayBuffer !== 'undefined' && x instanceof ArrayBuffer;\n};\n\n// define isArrayBufferView\nutil.isArrayBufferView = function(x) {\n return x && util.isArrayBuffer(x.buffer) && x.byteLength !== undefined;\n};\n\n/**\n * Ensure a bits param is 8, 16, 24, or 32. Used to validate input for\n * algorithms where bit manipulation, JavaScript limitations, and/or algorithm\n * design only allow for byte operations of a limited size.\n *\n * @param n number of bits.\n *\n * Throw Error if n invalid.\n */\nfunction _checkBitsParam(n) {\n if(!(n === 8 || n === 16 || n === 24 || n === 32)) {\n throw new Error('Only 8, 16, 24, or 32 bits supported: ' + n);\n }\n}\n\n// TODO: set ByteBuffer to best available backing\nutil.ByteBuffer = ByteStringBuffer;\n\n/** Buffer w/BinaryString backing */\n\n/**\n * Constructor for a binary string backed byte buffer.\n *\n * @param [b] the bytes to wrap (either encoded as string, one byte per\n * character, or as an ArrayBuffer or Typed Array).\n */\nfunction ByteStringBuffer(b) {\n // TODO: update to match DataBuffer API\n\n // the data in this buffer\n this.data = '';\n // the pointer for reading from this buffer\n this.read = 0;\n\n if(typeof b === 'string') {\n this.data = b;\n } else if(util.isArrayBuffer(b) || util.isArrayBufferView(b)) {\n if(typeof Buffer !== 'undefined' && b instanceof Buffer) {\n this.data = b.toString('binary');\n } else {\n // convert native buffer to forge buffer\n // FIXME: support native buffers internally instead\n var arr = new Uint8Array(b);\n try {\n this.data = String.fromCharCode.apply(null, arr);\n } catch(e) {\n for(var i = 0; i < arr.length; ++i) {\n this.putByte(arr[i]);\n }\n }\n }\n } else if(b instanceof ByteStringBuffer ||\n (typeof b === 'object' && typeof b.data === 'string' &&\n typeof b.read === 'number')) {\n // copy existing buffer\n this.data = b.data;\n this.read = b.read;\n }\n\n // used for v8 optimization\n this._constructedStringLength = 0;\n}\nutil.ByteStringBuffer = ByteStringBuffer;\n\n/* Note: This is an optimization for V8-based browsers. When V8 concatenates\n a string, the strings are only joined logically using a \"cons string\" or\n \"constructed/concatenated string\". These containers keep references to one\n another and can result in very large memory usage. For example, if a 2MB\n string is constructed by concatenating 4 bytes together at a time, the\n memory usage will be ~44MB; so ~22x increase. The strings are only joined\n together when an operation requiring their joining takes place, such as\n substr(). This function is called when adding data to this buffer to ensure\n these types of strings are periodically joined to reduce the memory\n footprint. */\nvar _MAX_CONSTRUCTED_STRING_LENGTH = 4096;\nutil.ByteStringBuffer.prototype._optimizeConstructedString = function(x) {\n this._constructedStringLength += x;\n if(this._constructedStringLength > _MAX_CONSTRUCTED_STRING_LENGTH) {\n // this substr() should cause the constructed string to join\n this.data.substr(0, 1);\n this._constructedStringLength = 0;\n }\n};\n\n/**\n * Gets the number of bytes in this buffer.\n *\n * @return the number of bytes in this buffer.\n */\nutil.ByteStringBuffer.prototype.length = function() {\n return this.data.length - this.read;\n};\n\n/**\n * Gets whether or not this buffer is empty.\n *\n * @return true if this buffer is empty, false if not.\n */\nutil.ByteStringBuffer.prototype.isEmpty = function() {\n return this.length() <= 0;\n};\n\n/**\n * Puts a byte in this buffer.\n *\n * @param b the byte to put.\n *\n * @return this buffer.\n */\nutil.ByteStringBuffer.prototype.putByte = function(b) {\n return this.putBytes(String.fromCharCode(b));\n};\n\n/**\n * Puts a byte in this buffer N times.\n *\n * @param b the byte to put.\n * @param n the number of bytes of value b to put.\n *\n * @return this buffer.\n */\nutil.ByteStringBuffer.prototype.fillWithByte = function(b, n) {\n b = String.fromCharCode(b);\n var d = this.data;\n while(n > 0) {\n if(n & 1) {\n d += b;\n }\n n >>>= 1;\n if(n > 0) {\n b += b;\n }\n }\n this.data = d;\n this._optimizeConstructedString(n);\n return this;\n};\n\n/**\n * Puts bytes in this buffer.\n *\n * @param bytes the bytes (as a binary encoded string) to put.\n *\n * @return this buffer.\n */\nutil.ByteStringBuffer.prototype.putBytes = function(bytes) {\n this.data += bytes;\n this._optimizeConstructedString(bytes.length);\n return this;\n};\n\n/**\n * Puts a UTF-16 encoded string into this buffer.\n *\n * @param str the string to put.\n *\n * @return this buffer.\n */\nutil.ByteStringBuffer.prototype.putString = function(str) {\n return this.putBytes(util.encodeUtf8(str));\n};\n\n/**\n * Puts a 16-bit integer in this buffer in big-endian order.\n *\n * @param i the 16-bit integer.\n *\n * @return this buffer.\n */\nutil.ByteStringBuffer.prototype.putInt16 = function(i) {\n return this.putBytes(\n String.fromCharCode(i >> 8 & 0xFF) +\n String.fromCharCode(i & 0xFF));\n};\n\n/**\n * Puts a 24-bit integer in this buffer in big-endian order.\n *\n * @param i the 24-bit integer.\n *\n * @return this buffer.\n */\nutil.ByteStringBuffer.prototype.putInt24 = function(i) {\n return this.putBytes(\n String.fromCharCode(i >> 16 & 0xFF) +\n String.fromCharCode(i >> 8 & 0xFF) +\n String.fromCharCode(i & 0xFF));\n};\n\n/**\n * Puts a 32-bit integer in this buffer in big-endian order.\n *\n * @param i the 32-bit integer.\n *\n * @return this buffer.\n */\nutil.ByteStringBuffer.prototype.putInt32 = function(i) {\n return this.putBytes(\n String.fromCharCode(i >> 24 & 0xFF) +\n String.fromCharCode(i >> 16 & 0xFF) +\n String.fromCharCode(i >> 8 & 0xFF) +\n String.fromCharCode(i & 0xFF));\n};\n\n/**\n * Puts a 16-bit integer in this buffer in little-endian order.\n *\n * @param i the 16-bit integer.\n *\n * @return this buffer.\n */\nutil.ByteStringBuffer.prototype.putInt16Le = function(i) {\n return this.putBytes(\n String.fromCharCode(i & 0xFF) +\n String.fromCharCode(i >> 8 & 0xFF));\n};\n\n/**\n * Puts a 24-bit integer in this buffer in little-endian order.\n *\n * @param i the 24-bit integer.\n *\n * @return this buffer.\n */\nutil.ByteStringBuffer.prototype.putInt24Le = function(i) {\n return this.putBytes(\n String.fromCharCode(i & 0xFF) +\n String.fromCharCode(i >> 8 & 0xFF) +\n String.fromCharCode(i >> 16 & 0xFF));\n};\n\n/**\n * Puts a 32-bit integer in this buffer in little-endian order.\n *\n * @param i the 32-bit integer.\n *\n * @return this buffer.\n */\nutil.ByteStringBuffer.prototype.putInt32Le = function(i) {\n return this.putBytes(\n String.fromCharCode(i & 0xFF) +\n String.fromCharCode(i >> 8 & 0xFF) +\n String.fromCharCode(i >> 16 & 0xFF) +\n String.fromCharCode(i >> 24 & 0xFF));\n};\n\n/**\n * Puts an n-bit integer in this buffer in big-endian order.\n *\n * @param i the n-bit integer.\n * @param n the number of bits in the integer (8, 16, 24, or 32).\n *\n * @return this buffer.\n */\nutil.ByteStringBuffer.prototype.putInt = function(i, n) {\n _checkBitsParam(n);\n var bytes = '';\n do {\n n -= 8;\n bytes += String.fromCharCode((i >> n) & 0xFF);\n } while(n > 0);\n return this.putBytes(bytes);\n};\n\n/**\n * Puts a signed n-bit integer in this buffer in big-endian order. Two's\n * complement representation is used.\n *\n * @param i the n-bit integer.\n * @param n the number of bits in the integer (8, 16, 24, or 32).\n *\n * @return this buffer.\n */\nutil.ByteStringBuffer.prototype.putSignedInt = function(i, n) {\n // putInt checks n\n if(i < 0) {\n i += 2 << (n - 1);\n }\n return this.putInt(i, n);\n};\n\n/**\n * Puts the given buffer into this buffer.\n *\n * @param buffer the buffer to put into this one.\n *\n * @return this buffer.\n */\nutil.ByteStringBuffer.prototype.putBuffer = function(buffer) {\n return this.putBytes(buffer.getBytes());\n};\n\n/**\n * Gets a byte from this buffer and advances the read pointer by 1.\n *\n * @return the byte.\n */\nutil.ByteStringBuffer.prototype.getByte = function() {\n return this.data.charCodeAt(this.read++);\n};\n\n/**\n * Gets a uint16 from this buffer in big-endian order and advances the read\n * pointer by 2.\n *\n * @return the uint16.\n */\nutil.ByteStringBuffer.prototype.getInt16 = function() {\n var rval = (\n this.data.charCodeAt(this.read) << 8 ^\n this.data.charCodeAt(this.read + 1));\n this.read += 2;\n return rval;\n};\n\n/**\n * Gets a uint24 from this buffer in big-endian order and advances the read\n * pointer by 3.\n *\n * @return the uint24.\n */\nutil.ByteStringBuffer.prototype.getInt24 = function() {\n var rval = (\n this.data.charCodeAt(this.read) << 16 ^\n this.data.charCodeAt(this.read + 1) << 8 ^\n this.data.charCodeAt(this.read + 2));\n this.read += 3;\n return rval;\n};\n\n/**\n * Gets a uint32 from this buffer in big-endian order and advances the read\n * pointer by 4.\n *\n * @return the word.\n */\nutil.ByteStringBuffer.prototype.getInt32 = function() {\n var rval = (\n this.data.charCodeAt(this.read) << 24 ^\n this.data.charCodeAt(this.read + 1) << 16 ^\n this.data.charCodeAt(this.read + 2) << 8 ^\n this.data.charCodeAt(this.read + 3));\n this.read += 4;\n return rval;\n};\n\n/**\n * Gets a uint16 from this buffer in little-endian order and advances the read\n * pointer by 2.\n *\n * @return the uint16.\n */\nutil.ByteStringBuffer.prototype.getInt16Le = function() {\n var rval = (\n this.data.charCodeAt(this.read) ^\n this.data.charCodeAt(this.read + 1) << 8);\n this.read += 2;\n return rval;\n};\n\n/**\n * Gets a uint24 from this buffer in little-endian order and advances the read\n * pointer by 3.\n *\n * @return the uint24.\n */\nutil.ByteStringBuffer.prototype.getInt24Le = function() {\n var rval = (\n this.data.charCodeAt(this.read) ^\n this.data.charCodeAt(this.read + 1) << 8 ^\n this.data.charCodeAt(this.read + 2) << 16);\n this.read += 3;\n return rval;\n};\n\n/**\n * Gets a uint32 from this buffer in little-endian order and advances the read\n * pointer by 4.\n *\n * @return the word.\n */\nutil.ByteStringBuffer.prototype.getInt32Le = function() {\n var rval = (\n this.data.charCodeAt(this.read) ^\n this.data.charCodeAt(this.read + 1) << 8 ^\n this.data.charCodeAt(this.read + 2) << 16 ^\n this.data.charCodeAt(this.read + 3) << 24);\n this.read += 4;\n return rval;\n};\n\n/**\n * Gets an n-bit integer from this buffer in big-endian order and advances the\n * read pointer by ceil(n/8).\n *\n * @param n the number of bits in the integer (8, 16, 24, or 32).\n *\n * @return the integer.\n */\nutil.ByteStringBuffer.prototype.getInt = function(n) {\n _checkBitsParam(n);\n var rval = 0;\n do {\n // TODO: Use (rval * 0x100) if adding support for 33 to 53 bits.\n rval = (rval << 8) + this.data.charCodeAt(this.read++);\n n -= 8;\n } while(n > 0);\n return rval;\n};\n\n/**\n * Gets a signed n-bit integer from this buffer in big-endian order, using\n * two's complement, and advances the read pointer by n/8.\n *\n * @param n the number of bits in the integer (8, 16, 24, or 32).\n *\n * @return the integer.\n */\nutil.ByteStringBuffer.prototype.getSignedInt = function(n) {\n // getInt checks n\n var x = this.getInt(n);\n var max = 2 << (n - 2);\n if(x >= max) {\n x -= max << 1;\n }\n return x;\n};\n\n/**\n * Reads bytes out as a binary encoded string and clears them from the\n * buffer. Note that the resulting string is binary encoded (in node.js this\n * encoding is referred to as `binary`, it is *not* `utf8`).\n *\n * @param count the number of bytes to read, undefined or null for all.\n *\n * @return a binary encoded string of bytes.\n */\nutil.ByteStringBuffer.prototype.getBytes = function(count) {\n var rval;\n if(count) {\n // read count bytes\n count = Math.min(this.length(), count);\n rval = this.data.slice(this.read, this.read + count);\n this.read += count;\n } else if(count === 0) {\n rval = '';\n } else {\n // read all bytes, optimize to only copy when needed\n rval = (this.read === 0) ? this.data : this.data.slice(this.read);\n this.clear();\n }\n return rval;\n};\n\n/**\n * Gets a binary encoded string of the bytes from this buffer without\n * modifying the read pointer.\n *\n * @param count the number of bytes to get, omit to get all.\n *\n * @return a string full of binary encoded characters.\n */\nutil.ByteStringBuffer.prototype.bytes = function(count) {\n return (typeof(count) === 'undefined' ?\n this.data.slice(this.read) :\n this.data.slice(this.read, this.read + count));\n};\n\n/**\n * Gets a byte at the given index without modifying the read pointer.\n *\n * @param i the byte index.\n *\n * @return the byte.\n */\nutil.ByteStringBuffer.prototype.at = function(i) {\n return this.data.charCodeAt(this.read + i);\n};\n\n/**\n * Puts a byte at the given index without modifying the read pointer.\n *\n * @param i the byte index.\n * @param b the byte to put.\n *\n * @return this buffer.\n */\nutil.ByteStringBuffer.prototype.setAt = function(i, b) {\n this.data = this.data.substr(0, this.read + i) +\n String.fromCharCode(b) +\n this.data.substr(this.read + i + 1);\n return this;\n};\n\n/**\n * Gets the last byte without modifying the read pointer.\n *\n * @return the last byte.\n */\nutil.ByteStringBuffer.prototype.last = function() {\n return this.data.charCodeAt(this.data.length - 1);\n};\n\n/**\n * Creates a copy of this buffer.\n *\n * @return the copy.\n */\nutil.ByteStringBuffer.prototype.copy = function() {\n var c = util.createBuffer(this.data);\n c.read = this.read;\n return c;\n};\n\n/**\n * Compacts this buffer.\n *\n * @return this buffer.\n */\nutil.ByteStringBuffer.prototype.compact = function() {\n if(this.read > 0) {\n this.data = this.data.slice(this.read);\n this.read = 0;\n }\n return this;\n};\n\n/**\n * Clears this buffer.\n *\n * @return this buffer.\n */\nutil.ByteStringBuffer.prototype.clear = function() {\n this.data = '';\n this.read = 0;\n return this;\n};\n\n/**\n * Shortens this buffer by triming bytes off of the end of this buffer.\n *\n * @param count the number of bytes to trim off.\n *\n * @return this buffer.\n */\nutil.ByteStringBuffer.prototype.truncate = function(count) {\n var len = Math.max(0, this.length() - count);\n this.data = this.data.substr(this.read, len);\n this.read = 0;\n return this;\n};\n\n/**\n * Converts this buffer to a hexadecimal string.\n *\n * @return a hexadecimal string.\n */\nutil.ByteStringBuffer.prototype.toHex = function() {\n var rval = '';\n for(var i = this.read; i < this.data.length; ++i) {\n var b = this.data.charCodeAt(i);\n if(b < 16) {\n rval += '0';\n }\n rval += b.toString(16);\n }\n return rval;\n};\n\n/**\n * Converts this buffer to a UTF-16 string (standard JavaScript string).\n *\n * @return a UTF-16 string.\n */\nutil.ByteStringBuffer.prototype.toString = function() {\n return util.decodeUtf8(this.bytes());\n};\n\n/** End Buffer w/BinaryString backing */\n\n/** Buffer w/UInt8Array backing */\n\n/**\n * FIXME: Experimental. Do not use yet.\n *\n * Constructor for an ArrayBuffer-backed byte buffer.\n *\n * The buffer may be constructed from a string, an ArrayBuffer, DataView, or a\n * TypedArray.\n *\n * If a string is given, its encoding should be provided as an option,\n * otherwise it will default to 'binary'. A 'binary' string is encoded such\n * that each character is one byte in length and size.\n *\n * If an ArrayBuffer, DataView, or TypedArray is given, it will be used\n * *directly* without any copying. Note that, if a write to the buffer requires\n * more space, the buffer will allocate a new backing ArrayBuffer to\n * accommodate. The starting read and write offsets for the buffer may be\n * given as options.\n *\n * @param [b] the initial bytes for this buffer.\n * @param options the options to use:\n * [readOffset] the starting read offset to use (default: 0).\n * [writeOffset] the starting write offset to use (default: the\n * length of the first parameter).\n * [growSize] the minimum amount, in bytes, to grow the buffer by to\n * accommodate writes (default: 1024).\n * [encoding] the encoding ('binary', 'utf8', 'utf16', 'hex') for the\n * first parameter, if it is a string (default: 'binary').\n */\nfunction DataBuffer(b, options) {\n // default options\n options = options || {};\n\n // pointers for read from/write to buffer\n this.read = options.readOffset || 0;\n this.growSize = options.growSize || 1024;\n\n var isArrayBuffer = util.isArrayBuffer(b);\n var isArrayBufferView = util.isArrayBufferView(b);\n if(isArrayBuffer || isArrayBufferView) {\n // use ArrayBuffer directly\n if(isArrayBuffer) {\n this.data = new DataView(b);\n } else {\n // TODO: adjust read/write offset based on the type of view\n // or specify that this must be done in the options ... that the\n // offsets are byte-based\n this.data = new DataView(b.buffer, b.byteOffset, b.byteLength);\n }\n this.write = ('writeOffset' in options ?\n options.writeOffset : this.data.byteLength);\n return;\n }\n\n // initialize to empty array buffer and add any given bytes using putBytes\n this.data = new DataView(new ArrayBuffer(0));\n this.write = 0;\n\n if(b !== null && b !== undefined) {\n this.putBytes(b);\n }\n\n if('writeOffset' in options) {\n this.write = options.writeOffset;\n }\n}\nutil.DataBuffer = DataBuffer;\n\n/**\n * Gets the number of bytes in this buffer.\n *\n * @return the number of bytes in this buffer.\n */\nutil.DataBuffer.prototype.length = function() {\n return this.write - this.read;\n};\n\n/**\n * Gets whether or not this buffer is empty.\n *\n * @return true if this buffer is empty, false if not.\n */\nutil.DataBuffer.prototype.isEmpty = function() {\n return this.length() <= 0;\n};\n\n/**\n * Ensures this buffer has enough empty space to accommodate the given number\n * of bytes. An optional parameter may be given that indicates a minimum\n * amount to grow the buffer if necessary. If the parameter is not given,\n * the buffer will be grown by some previously-specified default amount\n * or heuristic.\n *\n * @param amount the number of bytes to accommodate.\n * @param [growSize] the minimum amount, in bytes, to grow the buffer by if\n * necessary.\n */\nutil.DataBuffer.prototype.accommodate = function(amount, growSize) {\n if(this.length() >= amount) {\n return this;\n }\n growSize = Math.max(growSize || this.growSize, amount);\n\n // grow buffer\n var src = new Uint8Array(\n this.data.buffer, this.data.byteOffset, this.data.byteLength);\n var dst = new Uint8Array(this.length() + growSize);\n dst.set(src);\n this.data = new DataView(dst.buffer);\n\n return this;\n};\n\n/**\n * Puts a byte in this buffer.\n *\n * @param b the byte to put.\n *\n * @return this buffer.\n */\nutil.DataBuffer.prototype.putByte = function(b) {\n this.accommodate(1);\n this.data.setUint8(this.write++, b);\n return this;\n};\n\n/**\n * Puts a byte in this buffer N times.\n *\n * @param b the byte to put.\n * @param n the number of bytes of value b to put.\n *\n * @return this buffer.\n */\nutil.DataBuffer.prototype.fillWithByte = function(b, n) {\n this.accommodate(n);\n for(var i = 0; i < n; ++i) {\n this.data.setUint8(b);\n }\n return this;\n};\n\n/**\n * Puts bytes in this buffer. The bytes may be given as a string, an\n * ArrayBuffer, a DataView, or a TypedArray.\n *\n * @param bytes the bytes to put.\n * @param [encoding] the encoding for the first parameter ('binary', 'utf8',\n * 'utf16', 'hex'), if it is a string (default: 'binary').\n *\n * @return this buffer.\n */\nutil.DataBuffer.prototype.putBytes = function(bytes, encoding) {\n if(util.isArrayBufferView(bytes)) {\n var src = new Uint8Array(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n var len = src.byteLength - src.byteOffset;\n this.accommodate(len);\n var dst = new Uint8Array(this.data.buffer, this.write);\n dst.set(src);\n this.write += len;\n return this;\n }\n\n if(util.isArrayBuffer(bytes)) {\n var src = new Uint8Array(bytes);\n this.accommodate(src.byteLength);\n var dst = new Uint8Array(this.data.buffer);\n dst.set(src, this.write);\n this.write += src.byteLength;\n return this;\n }\n\n // bytes is a util.DataBuffer or equivalent\n if(bytes instanceof util.DataBuffer ||\n (typeof bytes === 'object' &&\n typeof bytes.read === 'number' && typeof bytes.write === 'number' &&\n util.isArrayBufferView(bytes.data))) {\n var src = new Uint8Array(bytes.data.byteLength, bytes.read, bytes.length());\n this.accommodate(src.byteLength);\n var dst = new Uint8Array(bytes.data.byteLength, this.write);\n dst.set(src);\n this.write += src.byteLength;\n return this;\n }\n\n if(bytes instanceof util.ByteStringBuffer) {\n // copy binary string and process as the same as a string parameter below\n bytes = bytes.data;\n encoding = 'binary';\n }\n\n // string conversion\n encoding = encoding || 'binary';\n if(typeof bytes === 'string') {\n var view;\n\n // decode from string\n if(encoding === 'hex') {\n this.accommodate(Math.ceil(bytes.length / 2));\n view = new Uint8Array(this.data.buffer, this.write);\n this.write += util.binary.hex.decode(bytes, view, this.write);\n return this;\n }\n if(encoding === 'base64') {\n this.accommodate(Math.ceil(bytes.length / 4) * 3);\n view = new Uint8Array(this.data.buffer, this.write);\n this.write += util.binary.base64.decode(bytes, view, this.write);\n return this;\n }\n\n // encode text as UTF-8 bytes\n if(encoding === 'utf8') {\n // encode as UTF-8 then decode string as raw binary\n bytes = util.encodeUtf8(bytes);\n encoding = 'binary';\n }\n\n // decode string as raw binary\n if(encoding === 'binary' || encoding === 'raw') {\n // one byte per character\n this.accommodate(bytes.length);\n view = new Uint8Array(this.data.buffer, this.write);\n this.write += util.binary.raw.decode(view);\n return this;\n }\n\n // encode text as UTF-16 bytes\n if(encoding === 'utf16') {\n // two bytes per character\n this.accommodate(bytes.length * 2);\n view = new Uint16Array(this.data.buffer, this.write);\n this.write += util.text.utf16.encode(view);\n return this;\n }\n\n throw new Error('Invalid encoding: ' + encoding);\n }\n\n throw Error('Invalid parameter: ' + bytes);\n};\n\n/**\n * Puts the given buffer into this buffer.\n *\n * @param buffer the buffer to put into this one.\n *\n * @return this buffer.\n */\nutil.DataBuffer.prototype.putBuffer = function(buffer) {\n this.putBytes(buffer);\n buffer.clear();\n return this;\n};\n\n/**\n * Puts a string into this buffer.\n *\n * @param str the string to put.\n * @param [encoding] the encoding for the string (default: 'utf16').\n *\n * @return this buffer.\n */\nutil.DataBuffer.prototype.putString = function(str) {\n return this.putBytes(str, 'utf16');\n};\n\n/**\n * Puts a 16-bit integer in this buffer in big-endian order.\n *\n * @param i the 16-bit integer.\n *\n * @return this buffer.\n */\nutil.DataBuffer.prototype.putInt16 = function(i) {\n this.accommodate(2);\n this.data.setInt16(this.write, i);\n this.write += 2;\n return this;\n};\n\n/**\n * Puts a 24-bit integer in this buffer in big-endian order.\n *\n * @param i the 24-bit integer.\n *\n * @return this buffer.\n */\nutil.DataBuffer.prototype.putInt24 = function(i) {\n this.accommodate(3);\n this.data.setInt16(this.write, i >> 8 & 0xFFFF);\n this.data.setInt8(this.write, i >> 16 & 0xFF);\n this.write += 3;\n return this;\n};\n\n/**\n * Puts a 32-bit integer in this buffer in big-endian order.\n *\n * @param i the 32-bit integer.\n *\n * @return this buffer.\n */\nutil.DataBuffer.prototype.putInt32 = function(i) {\n this.accommodate(4);\n this.data.setInt32(this.write, i);\n this.write += 4;\n return this;\n};\n\n/**\n * Puts a 16-bit integer in this buffer in little-endian order.\n *\n * @param i the 16-bit integer.\n *\n * @return this buffer.\n */\nutil.DataBuffer.prototype.putInt16Le = function(i) {\n this.accommodate(2);\n this.data.setInt16(this.write, i, true);\n this.write += 2;\n return this;\n};\n\n/**\n * Puts a 24-bit integer in this buffer in little-endian order.\n *\n * @param i the 24-bit integer.\n *\n * @return this buffer.\n */\nutil.DataBuffer.prototype.putInt24Le = function(i) {\n this.accommodate(3);\n this.data.setInt8(this.write, i >> 16 & 0xFF);\n this.data.setInt16(this.write, i >> 8 & 0xFFFF, true);\n this.write += 3;\n return this;\n};\n\n/**\n * Puts a 32-bit integer in this buffer in little-endian order.\n *\n * @param i the 32-bit integer.\n *\n * @return this buffer.\n */\nutil.DataBuffer.prototype.putInt32Le = function(i) {\n this.accommodate(4);\n this.data.setInt32(this.write, i, true);\n this.write += 4;\n return this;\n};\n\n/**\n * Puts an n-bit integer in this buffer in big-endian order.\n *\n * @param i the n-bit integer.\n * @param n the number of bits in the integer (8, 16, 24, or 32).\n *\n * @return this buffer.\n */\nutil.DataBuffer.prototype.putInt = function(i, n) {\n _checkBitsParam(n);\n this.accommodate(n / 8);\n do {\n n -= 8;\n this.data.setInt8(this.write++, (i >> n) & 0xFF);\n } while(n > 0);\n return this;\n};\n\n/**\n * Puts a signed n-bit integer in this buffer in big-endian order. Two's\n * complement representation is used.\n *\n * @param i the n-bit integer.\n * @param n the number of bits in the integer.\n *\n * @return this buffer.\n */\nutil.DataBuffer.prototype.putSignedInt = function(i, n) {\n _checkBitsParam(n);\n this.accommodate(n / 8);\n if(i < 0) {\n i += 2 << (n - 1);\n }\n return this.putInt(i, n);\n};\n\n/**\n * Gets a byte from this buffer and advances the read pointer by 1.\n *\n * @return the byte.\n */\nutil.DataBuffer.prototype.getByte = function() {\n return this.data.getInt8(this.read++);\n};\n\n/**\n * Gets a uint16 from this buffer in big-endian order and advances the read\n * pointer by 2.\n *\n * @return the uint16.\n */\nutil.DataBuffer.prototype.getInt16 = function() {\n var rval = this.data.getInt16(this.read);\n this.read += 2;\n return rval;\n};\n\n/**\n * Gets a uint24 from this buffer in big-endian order and advances the read\n * pointer by 3.\n *\n * @return the uint24.\n */\nutil.DataBuffer.prototype.getInt24 = function() {\n var rval = (\n this.data.getInt16(this.read) << 8 ^\n this.data.getInt8(this.read + 2));\n this.read += 3;\n return rval;\n};\n\n/**\n * Gets a uint32 from this buffer in big-endian order and advances the read\n * pointer by 4.\n *\n * @return the word.\n */\nutil.DataBuffer.prototype.getInt32 = function() {\n var rval = this.data.getInt32(this.read);\n this.read += 4;\n return rval;\n};\n\n/**\n * Gets a uint16 from this buffer in little-endian order and advances the read\n * pointer by 2.\n *\n * @return the uint16.\n */\nutil.DataBuffer.prototype.getInt16Le = function() {\n var rval = this.data.getInt16(this.read, true);\n this.read += 2;\n return rval;\n};\n\n/**\n * Gets a uint24 from this buffer in little-endian order and advances the read\n * pointer by 3.\n *\n * @return the uint24.\n */\nutil.DataBuffer.prototype.getInt24Le = function() {\n var rval = (\n this.data.getInt8(this.read) ^\n this.data.getInt16(this.read + 1, true) << 8);\n this.read += 3;\n return rval;\n};\n\n/**\n * Gets a uint32 from this buffer in little-endian order and advances the read\n * pointer by 4.\n *\n * @return the word.\n */\nutil.DataBuffer.prototype.getInt32Le = function() {\n var rval = this.data.getInt32(this.read, true);\n this.read += 4;\n return rval;\n};\n\n/**\n * Gets an n-bit integer from this buffer in big-endian order and advances the\n * read pointer by n/8.\n *\n * @param n the number of bits in the integer (8, 16, 24, or 32).\n *\n * @return the integer.\n */\nutil.DataBuffer.prototype.getInt = function(n) {\n _checkBitsParam(n);\n var rval = 0;\n do {\n // TODO: Use (rval * 0x100) if adding support for 33 to 53 bits.\n rval = (rval << 8) + this.data.getInt8(this.read++);\n n -= 8;\n } while(n > 0);\n return rval;\n};\n\n/**\n * Gets a signed n-bit integer from this buffer in big-endian order, using\n * two's complement, and advances the read pointer by n/8.\n *\n * @param n the number of bits in the integer (8, 16, 24, or 32).\n *\n * @return the integer.\n */\nutil.DataBuffer.prototype.getSignedInt = function(n) {\n // getInt checks n\n var x = this.getInt(n);\n var max = 2 << (n - 2);\n if(x >= max) {\n x -= max << 1;\n }\n return x;\n};\n\n/**\n * Reads bytes out as a binary encoded string and clears them from the\n * buffer.\n *\n * @param count the number of bytes to read, undefined or null for all.\n *\n * @return a binary encoded string of bytes.\n */\nutil.DataBuffer.prototype.getBytes = function(count) {\n // TODO: deprecate this method, it is poorly named and\n // this.toString('binary') replaces it\n // add a toTypedArray()/toArrayBuffer() function\n var rval;\n if(count) {\n // read count bytes\n count = Math.min(this.length(), count);\n rval = this.data.slice(this.read, this.read + count);\n this.read += count;\n } else if(count === 0) {\n rval = '';\n } else {\n // read all bytes, optimize to only copy when needed\n rval = (this.read === 0) ? this.data : this.data.slice(this.read);\n this.clear();\n }\n return rval;\n};\n\n/**\n * Gets a binary encoded string of the bytes from this buffer without\n * modifying the read pointer.\n *\n * @param count the number of bytes to get, omit to get all.\n *\n * @return a string full of binary encoded characters.\n */\nutil.DataBuffer.prototype.bytes = function(count) {\n // TODO: deprecate this method, it is poorly named, add \"getString()\"\n return (typeof(count) === 'undefined' ?\n this.data.slice(this.read) :\n this.data.slice(this.read, this.read + count));\n};\n\n/**\n * Gets a byte at the given index without modifying the read pointer.\n *\n * @param i the byte index.\n *\n * @return the byte.\n */\nutil.DataBuffer.prototype.at = function(i) {\n return this.data.getUint8(this.read + i);\n};\n\n/**\n * Puts a byte at the given index without modifying the read pointer.\n *\n * @param i the byte index.\n * @param b the byte to put.\n *\n * @return this buffer.\n */\nutil.DataBuffer.prototype.setAt = function(i, b) {\n this.data.setUint8(i, b);\n return this;\n};\n\n/**\n * Gets the last byte without modifying the read pointer.\n *\n * @return the last byte.\n */\nutil.DataBuffer.prototype.last = function() {\n return this.data.getUint8(this.write - 1);\n};\n\n/**\n * Creates a copy of this buffer.\n *\n * @return the copy.\n */\nutil.DataBuffer.prototype.copy = function() {\n return new util.DataBuffer(this);\n};\n\n/**\n * Compacts this buffer.\n *\n * @return this buffer.\n */\nutil.DataBuffer.prototype.compact = function() {\n if(this.read > 0) {\n var src = new Uint8Array(this.data.buffer, this.read);\n var dst = new Uint8Array(src.byteLength);\n dst.set(src);\n this.data = new DataView(dst);\n this.write -= this.read;\n this.read = 0;\n }\n return this;\n};\n\n/**\n * Clears this buffer.\n *\n * @return this buffer.\n */\nutil.DataBuffer.prototype.clear = function() {\n this.data = new DataView(new ArrayBuffer(0));\n this.read = this.write = 0;\n return this;\n};\n\n/**\n * Shortens this buffer by triming bytes off of the end of this buffer.\n *\n * @param count the number of bytes to trim off.\n *\n * @return this buffer.\n */\nutil.DataBuffer.prototype.truncate = function(count) {\n this.write = Math.max(0, this.length() - count);\n this.read = Math.min(this.read, this.write);\n return this;\n};\n\n/**\n * Converts this buffer to a hexadecimal string.\n *\n * @return a hexadecimal string.\n */\nutil.DataBuffer.prototype.toHex = function() {\n var rval = '';\n for(var i = this.read; i < this.data.byteLength; ++i) {\n var b = this.data.getUint8(i);\n if(b < 16) {\n rval += '0';\n }\n rval += b.toString(16);\n }\n return rval;\n};\n\n/**\n * Converts this buffer to a string, using the given encoding. If no\n * encoding is given, 'utf8' (UTF-8) is used.\n *\n * @param [encoding] the encoding to use: 'binary', 'utf8', 'utf16', 'hex',\n * 'base64' (default: 'utf8').\n *\n * @return a string representation of the bytes in this buffer.\n */\nutil.DataBuffer.prototype.toString = function(encoding) {\n var view = new Uint8Array(this.data, this.read, this.length());\n encoding = encoding || 'utf8';\n\n // encode to string\n if(encoding === 'binary' || encoding === 'raw') {\n return util.binary.raw.encode(view);\n }\n if(encoding === 'hex') {\n return util.binary.hex.encode(view);\n }\n if(encoding === 'base64') {\n return util.binary.base64.encode(view);\n }\n\n // decode to text\n if(encoding === 'utf8') {\n return util.text.utf8.decode(view);\n }\n if(encoding === 'utf16') {\n return util.text.utf16.decode(view);\n }\n\n throw new Error('Invalid encoding: ' + encoding);\n};\n\n/** End Buffer w/UInt8Array backing */\n\n/**\n * Creates a buffer that stores bytes. A value may be given to populate the\n * buffer with data. This value can either be string of encoded bytes or a\n * regular string of characters. When passing a string of binary encoded\n * bytes, the encoding `raw` should be given. This is also the default. When\n * passing a string of characters, the encoding `utf8` should be given.\n *\n * @param [input] a string with encoded bytes to store in the buffer.\n * @param [encoding] (default: 'raw', other: 'utf8').\n */\nutil.createBuffer = function(input, encoding) {\n // TODO: deprecate, use new ByteBuffer() instead\n encoding = encoding || 'raw';\n if(input !== undefined && encoding === 'utf8') {\n input = util.encodeUtf8(input);\n }\n return new util.ByteBuffer(input);\n};\n\n/**\n * Fills a string with a particular value. If you want the string to be a byte\n * string, pass in String.fromCharCode(theByte).\n *\n * @param c the character to fill the string with, use String.fromCharCode\n * to fill the string with a byte value.\n * @param n the number of characters of value c to fill with.\n *\n * @return the filled string.\n */\nutil.fillString = function(c, n) {\n var s = '';\n while(n > 0) {\n if(n & 1) {\n s += c;\n }\n n >>>= 1;\n if(n > 0) {\n c += c;\n }\n }\n return s;\n};\n\n/**\n * Performs a per byte XOR between two byte strings and returns the result as a\n * string of bytes.\n *\n * @param s1 first string of bytes.\n * @param s2 second string of bytes.\n * @param n the number of bytes to XOR.\n *\n * @return the XOR'd result.\n */\nutil.xorBytes = function(s1, s2, n) {\n var s3 = '';\n var b = '';\n var t = '';\n var i = 0;\n var c = 0;\n for(; n > 0; --n, ++i) {\n b = s1.charCodeAt(i) ^ s2.charCodeAt(i);\n if(c >= 10) {\n s3 += t;\n t = '';\n c = 0;\n }\n t += String.fromCharCode(b);\n ++c;\n }\n s3 += t;\n return s3;\n};\n\n/**\n * Converts a hex string into a 'binary' encoded string of bytes.\n *\n * @param hex the hexadecimal string to convert.\n *\n * @return the binary-encoded string of bytes.\n */\nutil.hexToBytes = function(hex) {\n // TODO: deprecate: \"Deprecated. Use util.binary.hex.decode instead.\"\n var rval = '';\n var i = 0;\n if(hex.length & 1 == 1) {\n // odd number of characters, convert first character alone\n i = 1;\n rval += String.fromCharCode(parseInt(hex[0], 16));\n }\n // convert 2 characters (1 byte) at a time\n for(; i < hex.length; i += 2) {\n rval += String.fromCharCode(parseInt(hex.substr(i, 2), 16));\n }\n return rval;\n};\n\n/**\n * Converts a 'binary' encoded string of bytes to hex.\n *\n * @param bytes the byte string to convert.\n *\n * @return the string of hexadecimal characters.\n */\nutil.bytesToHex = function(bytes) {\n // TODO: deprecate: \"Deprecated. Use util.binary.hex.encode instead.\"\n return util.createBuffer(bytes).toHex();\n};\n\n/**\n * Converts an 32-bit integer to 4-big-endian byte string.\n *\n * @param i the integer.\n *\n * @return the byte string.\n */\nutil.int32ToBytes = function(i) {\n return (\n String.fromCharCode(i >> 24 & 0xFF) +\n String.fromCharCode(i >> 16 & 0xFF) +\n String.fromCharCode(i >> 8 & 0xFF) +\n String.fromCharCode(i & 0xFF));\n};\n\n// base64 characters, reverse mapping\nvar _base64 =\n 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\nvar _base64Idx = [\n/*43 -43 = 0*/\n/*'+', 1, 2, 3,'/' */\n 62, -1, -1, -1, 63,\n\n/*'0','1','2','3','4','5','6','7','8','9' */\n 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,\n\n/*15, 16, 17,'=', 19, 20, 21 */\n -1, -1, -1, 64, -1, -1, -1,\n\n/*65 - 43 = 22*/\n/*'A','B','C','D','E','F','G','H','I','J','K','L','M', */\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,\n\n/*'N','O','P','Q','R','S','T','U','V','W','X','Y','Z' */\n 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,\n\n/*91 - 43 = 48 */\n/*48, 49, 50, 51, 52, 53 */\n -1, -1, -1, -1, -1, -1,\n\n/*97 - 43 = 54*/\n/*'a','b','c','d','e','f','g','h','i','j','k','l','m' */\n 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,\n\n/*'n','o','p','q','r','s','t','u','v','w','x','y','z' */\n 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51\n];\n\n// base58 characters (Bitcoin alphabet)\nvar _base58 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';\n\n/**\n * Base64 encodes a 'binary' encoded string of bytes.\n *\n * @param input the binary encoded string of bytes to base64-encode.\n * @param maxline the maximum number of encoded characters per line to use,\n * defaults to none.\n *\n * @return the base64-encoded output.\n */\nutil.encode64 = function(input, maxline) {\n // TODO: deprecate: \"Deprecated. Use util.binary.base64.encode instead.\"\n var line = '';\n var output = '';\n var chr1, chr2, chr3;\n var i = 0;\n while(i < input.length) {\n chr1 = input.charCodeAt(i++);\n chr2 = input.charCodeAt(i++);\n chr3 = input.charCodeAt(i++);\n\n // encode 4 character group\n line += _base64.charAt(chr1 >> 2);\n line += _base64.charAt(((chr1 & 3) << 4) | (chr2 >> 4));\n if(isNaN(chr2)) {\n line += '==';\n } else {\n line += _base64.charAt(((chr2 & 15) << 2) | (chr3 >> 6));\n line += isNaN(chr3) ? '=' : _base64.charAt(chr3 & 63);\n }\n\n if(maxline && line.length > maxline) {\n output += line.substr(0, maxline) + '\\r\\n';\n line = line.substr(maxline);\n }\n }\n output += line;\n return output;\n};\n\n/**\n * Base64 decodes a string into a 'binary' encoded string of bytes.\n *\n * @param input the base64-encoded input.\n *\n * @return the binary encoded string.\n */\nutil.decode64 = function(input) {\n // TODO: deprecate: \"Deprecated. Use util.binary.base64.decode instead.\"\n\n // remove all non-base64 characters\n input = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, '');\n\n var output = '';\n var enc1, enc2, enc3, enc4;\n var i = 0;\n\n while(i < input.length) {\n enc1 = _base64Idx[input.charCodeAt(i++) - 43];\n enc2 = _base64Idx[input.charCodeAt(i++) - 43];\n enc3 = _base64Idx[input.charCodeAt(i++) - 43];\n enc4 = _base64Idx[input.charCodeAt(i++) - 43];\n\n output += String.fromCharCode((enc1 << 2) | (enc2 >> 4));\n if(enc3 !== 64) {\n // decoded at least 2 bytes\n output += String.fromCharCode(((enc2 & 15) << 4) | (enc3 >> 2));\n if(enc4 !== 64) {\n // decoded 3 bytes\n output += String.fromCharCode(((enc3 & 3) << 6) | enc4);\n }\n }\n }\n\n return output;\n};\n\n/**\n * Encodes the given string of characters (a standard JavaScript\n * string) as a binary encoded string where the bytes represent\n * a UTF-8 encoded string of characters. Non-ASCII characters will be\n * encoded as multiple bytes according to UTF-8.\n *\n * @param str a standard string of characters to encode.\n *\n * @return the binary encoded string.\n */\nutil.encodeUtf8 = function(str) {\n return unescape(encodeURIComponent(str));\n};\n\n/**\n * Decodes a binary encoded string that contains bytes that\n * represent a UTF-8 encoded string of characters -- into a\n * string of characters (a standard JavaScript string).\n *\n * @param str the binary encoded string to decode.\n *\n * @return the resulting standard string of characters.\n */\nutil.decodeUtf8 = function(str) {\n return decodeURIComponent(escape(str));\n};\n\n// binary encoding/decoding tools\n// FIXME: Experimental. Do not use yet.\nutil.binary = {\n raw: {},\n hex: {},\n base64: {},\n base58: {},\n baseN : {\n encode: baseN.encode,\n decode: baseN.decode\n }\n};\n\n/**\n * Encodes a Uint8Array as a binary-encoded string. This encoding uses\n * a value between 0 and 255 for each character.\n *\n * @param bytes the Uint8Array to encode.\n *\n * @return the binary-encoded string.\n */\nutil.binary.raw.encode = function(bytes) {\n return String.fromCharCode.apply(null, bytes);\n};\n\n/**\n * Decodes a binary-encoded string to a Uint8Array. This encoding uses\n * a value between 0 and 255 for each character.\n *\n * @param str the binary-encoded string to decode.\n * @param [output] an optional Uint8Array to write the output to; if it\n * is too small, an exception will be thrown.\n * @param [offset] the start offset for writing to the output (default: 0).\n *\n * @return the Uint8Array or the number of bytes written if output was given.\n */\nutil.binary.raw.decode = function(str, output, offset) {\n var out = output;\n if(!out) {\n out = new Uint8Array(str.length);\n }\n offset = offset || 0;\n var j = offset;\n for(var i = 0; i < str.length; ++i) {\n out[j++] = str.charCodeAt(i);\n }\n return output ? (j - offset) : out;\n};\n\n/**\n * Encodes a 'binary' string, ArrayBuffer, DataView, TypedArray, or\n * ByteBuffer as a string of hexadecimal characters.\n *\n * @param bytes the bytes to convert.\n *\n * @return the string of hexadecimal characters.\n */\nutil.binary.hex.encode = util.bytesToHex;\n\n/**\n * Decodes a hex-encoded string to a Uint8Array.\n *\n * @param hex the hexadecimal string to convert.\n * @param [output] an optional Uint8Array to write the output to; if it\n * is too small, an exception will be thrown.\n * @param [offset] the start offset for writing to the output (default: 0).\n *\n * @return the Uint8Array or the number of bytes written if output was given.\n */\nutil.binary.hex.decode = function(hex, output, offset) {\n var out = output;\n if(!out) {\n out = new Uint8Array(Math.ceil(hex.length / 2));\n }\n offset = offset || 0;\n var i = 0, j = offset;\n if(hex.length & 1) {\n // odd number of characters, convert first character alone\n i = 1;\n out[j++] = parseInt(hex[0], 16);\n }\n // convert 2 characters (1 byte) at a time\n for(; i < hex.length; i += 2) {\n out[j++] = parseInt(hex.substr(i, 2), 16);\n }\n return output ? (j - offset) : out;\n};\n\n/**\n * Base64-encodes a Uint8Array.\n *\n * @param input the Uint8Array to encode.\n * @param maxline the maximum number of encoded characters per line to use,\n * defaults to none.\n *\n * @return the base64-encoded output string.\n */\nutil.binary.base64.encode = function(input, maxline) {\n var line = '';\n var output = '';\n var chr1, chr2, chr3;\n var i = 0;\n while(i < input.byteLength) {\n chr1 = input[i++];\n chr2 = input[i++];\n chr3 = input[i++];\n\n // encode 4 character group\n line += _base64.charAt(chr1 >> 2);\n line += _base64.charAt(((chr1 & 3) << 4) | (chr2 >> 4));\n if(isNaN(chr2)) {\n line += '==';\n } else {\n line += _base64.charAt(((chr2 & 15) << 2) | (chr3 >> 6));\n line += isNaN(chr3) ? '=' : _base64.charAt(chr3 & 63);\n }\n\n if(maxline && line.length > maxline) {\n output += line.substr(0, maxline) + '\\r\\n';\n line = line.substr(maxline);\n }\n }\n output += line;\n return output;\n};\n\n/**\n * Decodes a base64-encoded string to a Uint8Array.\n *\n * @param input the base64-encoded input string.\n * @param [output] an optional Uint8Array to write the output to; if it\n * is too small, an exception will be thrown.\n * @param [offset] the start offset for writing to the output (default: 0).\n *\n * @return the Uint8Array or the number of bytes written if output was given.\n */\nutil.binary.base64.decode = function(input, output, offset) {\n var out = output;\n if(!out) {\n out = new Uint8Array(Math.ceil(input.length / 4) * 3);\n }\n\n // remove all non-base64 characters\n input = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, '');\n\n offset = offset || 0;\n var enc1, enc2, enc3, enc4;\n var i = 0, j = offset;\n\n while(i < input.length) {\n enc1 = _base64Idx[input.charCodeAt(i++) - 43];\n enc2 = _base64Idx[input.charCodeAt(i++) - 43];\n enc3 = _base64Idx[input.charCodeAt(i++) - 43];\n enc4 = _base64Idx[input.charCodeAt(i++) - 43];\n\n out[j++] = (enc1 << 2) | (enc2 >> 4);\n if(enc3 !== 64) {\n // decoded at least 2 bytes\n out[j++] = ((enc2 & 15) << 4) | (enc3 >> 2);\n if(enc4 !== 64) {\n // decoded 3 bytes\n out[j++] = ((enc3 & 3) << 6) | enc4;\n }\n }\n }\n\n // make sure result is the exact decoded length\n return output ? (j - offset) : out.subarray(0, j);\n};\n\n// add support for base58 encoding/decoding with Bitcoin alphabet\nutil.binary.base58.encode = function(input, maxline) {\n return util.binary.baseN.encode(input, _base58, maxline);\n};\nutil.binary.base58.decode = function(input, maxline) {\n return util.binary.baseN.decode(input, _base58, maxline);\n};\n\n// text encoding/decoding tools\n// FIXME: Experimental. Do not use yet.\nutil.text = {\n utf8: {},\n utf16: {}\n};\n\n/**\n * Encodes the given string as UTF-8 in a Uint8Array.\n *\n * @param str the string to encode.\n * @param [output] an optional Uint8Array to write the output to; if it\n * is too small, an exception will be thrown.\n * @param [offset] the start offset for writing to the output (default: 0).\n *\n * @return the Uint8Array or the number of bytes written if output was given.\n */\nutil.text.utf8.encode = function(str, output, offset) {\n str = util.encodeUtf8(str);\n var out = output;\n if(!out) {\n out = new Uint8Array(str.length);\n }\n offset = offset || 0;\n var j = offset;\n for(var i = 0; i < str.length; ++i) {\n out[j++] = str.charCodeAt(i);\n }\n return output ? (j - offset) : out;\n};\n\n/**\n * Decodes the UTF-8 contents from a Uint8Array.\n *\n * @param bytes the Uint8Array to decode.\n *\n * @return the resulting string.\n */\nutil.text.utf8.decode = function(bytes) {\n return util.decodeUtf8(String.fromCharCode.apply(null, bytes));\n};\n\n/**\n * Encodes the given string as UTF-16 in a Uint8Array.\n *\n * @param str the string to encode.\n * @param [output] an optional Uint8Array to write the output to; if it\n * is too small, an exception will be thrown.\n * @param [offset] the start offset for writing to the output (default: 0).\n *\n * @return the Uint8Array or the number of bytes written if output was given.\n */\nutil.text.utf16.encode = function(str, output, offset) {\n var out = output;\n if(!out) {\n out = new Uint8Array(str.length * 2);\n }\n var view = new Uint16Array(out.buffer);\n offset = offset || 0;\n var j = offset;\n var k = offset;\n for(var i = 0; i < str.length; ++i) {\n view[k++] = str.charCodeAt(i);\n j += 2;\n }\n return output ? (j - offset) : out;\n};\n\n/**\n * Decodes the UTF-16 contents from a Uint8Array.\n *\n * @param bytes the Uint8Array to decode.\n *\n * @return the resulting string.\n */\nutil.text.utf16.decode = function(bytes) {\n return String.fromCharCode.apply(null, new Uint16Array(bytes.buffer));\n};\n\n/**\n * Deflates the given data using a flash interface.\n *\n * @param api the flash interface.\n * @param bytes the data.\n * @param raw true to return only raw deflate data, false to include zlib\n * header and trailer.\n *\n * @return the deflated data as a string.\n */\nutil.deflate = function(api, bytes, raw) {\n bytes = util.decode64(api.deflate(util.encode64(bytes)).rval);\n\n // strip zlib header and trailer if necessary\n if(raw) {\n // zlib header is 2 bytes (CMF,FLG) where FLG indicates that\n // there is a 4-byte DICT (alder-32) block before the data if\n // its 5th bit is set\n var start = 2;\n var flg = bytes.charCodeAt(1);\n if(flg & 0x20) {\n start = 6;\n }\n // zlib trailer is 4 bytes of adler-32\n bytes = bytes.substring(start, bytes.length - 4);\n }\n\n return bytes;\n};\n\n/**\n * Inflates the given data using a flash interface.\n *\n * @param api the flash interface.\n * @param bytes the data.\n * @param raw true if the incoming data has no zlib header or trailer and is\n * raw DEFLATE data.\n *\n * @return the inflated data as a string, null on error.\n */\nutil.inflate = function(api, bytes, raw) {\n // TODO: add zlib header and trailer if necessary/possible\n var rval = api.inflate(util.encode64(bytes)).rval;\n return (rval === null) ? null : util.decode64(rval);\n};\n\n/**\n * Sets a storage object.\n *\n * @param api the storage interface.\n * @param id the storage ID to use.\n * @param obj the storage object, null to remove.\n */\nvar _setStorageObject = function(api, id, obj) {\n if(!api) {\n throw new Error('WebStorage not available.');\n }\n\n var rval;\n if(obj === null) {\n rval = api.removeItem(id);\n } else {\n // json-encode and base64-encode object\n obj = util.encode64(JSON.stringify(obj));\n rval = api.setItem(id, obj);\n }\n\n // handle potential flash error\n if(typeof(rval) !== 'undefined' && rval.rval !== true) {\n var error = new Error(rval.error.message);\n error.id = rval.error.id;\n error.name = rval.error.name;\n throw error;\n }\n};\n\n/**\n * Gets a storage object.\n *\n * @param api the storage interface.\n * @param id the storage ID to use.\n *\n * @return the storage object entry or null if none exists.\n */\nvar _getStorageObject = function(api, id) {\n if(!api) {\n throw new Error('WebStorage not available.');\n }\n\n // get the existing entry\n var rval = api.getItem(id);\n\n /* Note: We check api.init because we can't do (api == localStorage)\n on IE because of \"Class doesn't support Automation\" exception. Only\n the flash api has an init method so this works too, but we need a\n better solution in the future. */\n\n // flash returns item wrapped in an object, handle special case\n if(api.init) {\n if(rval.rval === null) {\n if(rval.error) {\n var error = new Error(rval.error.message);\n error.id = rval.error.id;\n error.name = rval.error.name;\n throw error;\n }\n // no error, but also no item\n rval = null;\n } else {\n rval = rval.rval;\n }\n }\n\n // handle decoding\n if(rval !== null) {\n // base64-decode and json-decode data\n rval = JSON.parse(util.decode64(rval));\n }\n\n return rval;\n};\n\n/**\n * Stores an item in local storage.\n *\n * @param api the storage interface.\n * @param id the storage ID to use.\n * @param key the key for the item.\n * @param data the data for the item (any javascript object/primitive).\n */\nvar _setItem = function(api, id, key, data) {\n // get storage object\n var obj = _getStorageObject(api, id);\n if(obj === null) {\n // create a new storage object\n obj = {};\n }\n // update key\n obj[key] = data;\n\n // set storage object\n _setStorageObject(api, id, obj);\n};\n\n/**\n * Gets an item from local storage.\n *\n * @param api the storage interface.\n * @param id the storage ID to use.\n * @param key the key for the item.\n *\n * @return the item.\n */\nvar _getItem = function(api, id, key) {\n // get storage object\n var rval = _getStorageObject(api, id);\n if(rval !== null) {\n // return data at key\n rval = (key in rval) ? rval[key] : null;\n }\n\n return rval;\n};\n\n/**\n * Removes an item from local storage.\n *\n * @param api the storage interface.\n * @param id the storage ID to use.\n * @param key the key for the item.\n */\nvar _removeItem = function(api, id, key) {\n // get storage object\n var obj = _getStorageObject(api, id);\n if(obj !== null && key in obj) {\n // remove key\n delete obj[key];\n\n // see if entry has no keys remaining\n var empty = true;\n for(var prop in obj) {\n empty = false;\n break;\n }\n if(empty) {\n // remove entry entirely if no keys are left\n obj = null;\n }\n\n // set storage object\n _setStorageObject(api, id, obj);\n }\n};\n\n/**\n * Clears the local disk storage identified by the given ID.\n *\n * @param api the storage interface.\n * @param id the storage ID to use.\n */\nvar _clearItems = function(api, id) {\n _setStorageObject(api, id, null);\n};\n\n/**\n * Calls a storage function.\n *\n * @param func the function to call.\n * @param args the arguments for the function.\n * @param location the location argument.\n *\n * @return the return value from the function.\n */\nvar _callStorageFunction = function(func, args, location) {\n var rval = null;\n\n // default storage types\n if(typeof(location) === 'undefined') {\n location = ['web', 'flash'];\n }\n\n // apply storage types in order of preference\n var type;\n var done = false;\n var exception = null;\n for(var idx in location) {\n type = location[idx];\n try {\n if(type === 'flash' || type === 'both') {\n if(args[0] === null) {\n throw new Error('Flash local storage not available.');\n }\n rval = func.apply(this, args);\n done = (type === 'flash');\n }\n if(type === 'web' || type === 'both') {\n args[0] = localStorage;\n rval = func.apply(this, args);\n done = true;\n }\n } catch(ex) {\n exception = ex;\n }\n if(done) {\n break;\n }\n }\n\n if(!done) {\n throw exception;\n }\n\n return rval;\n};\n\n/**\n * Stores an item on local disk.\n *\n * The available types of local storage include 'flash', 'web', and 'both'.\n *\n * The type 'flash' refers to flash local storage (SharedObject). In order\n * to use flash local storage, the 'api' parameter must be valid. The type\n * 'web' refers to WebStorage, if supported by the browser. The type 'both'\n * refers to storing using both 'flash' and 'web', not just one or the\n * other.\n *\n * The location array should list the storage types to use in order of\n * preference:\n *\n * ['flash']: flash only storage\n * ['web']: web only storage\n * ['both']: try to store in both\n * ['flash','web']: store in flash first, but if not available, 'web'\n * ['web','flash']: store in web first, but if not available, 'flash'\n *\n * The location array defaults to: ['web', 'flash']\n *\n * @param api the flash interface, null to use only WebStorage.\n * @param id the storage ID to use.\n * @param key the key for the item.\n * @param data the data for the item (any javascript object/primitive).\n * @param location an array with the preferred types of storage to use.\n */\nutil.setItem = function(api, id, key, data, location) {\n _callStorageFunction(_setItem, arguments, location);\n};\n\n/**\n * Gets an item on local disk.\n *\n * Set setItem() for details on storage types.\n *\n * @param api the flash interface, null to use only WebStorage.\n * @param id the storage ID to use.\n * @param key the key for the item.\n * @param location an array with the preferred types of storage to use.\n *\n * @return the item.\n */\nutil.getItem = function(api, id, key, location) {\n return _callStorageFunction(_getItem, arguments, location);\n};\n\n/**\n * Removes an item on local disk.\n *\n * Set setItem() for details on storage types.\n *\n * @param api the flash interface.\n * @param id the storage ID to use.\n * @param key the key for the item.\n * @param location an array with the preferred types of storage to use.\n */\nutil.removeItem = function(api, id, key, location) {\n _callStorageFunction(_removeItem, arguments, location);\n};\n\n/**\n * Clears the local disk storage identified by the given ID.\n *\n * Set setItem() for details on storage types.\n *\n * @param api the flash interface if flash is available.\n * @param id the storage ID to use.\n * @param location an array with the preferred types of storage to use.\n */\nutil.clearItems = function(api, id, location) {\n _callStorageFunction(_clearItems, arguments, location);\n};\n\n/**\n * Check if an object is empty.\n *\n * Taken from:\n * http://stackoverflow.com/questions/679915/how-do-i-test-for-an-empty-javascript-object-from-json/679937#679937\n *\n * @param object the object to check.\n */\nutil.isEmpty = function(obj) {\n for(var prop in obj) {\n if(obj.hasOwnProperty(prop)) {\n return false;\n }\n }\n return true;\n};\n\n/**\n * Format with simple printf-style interpolation.\n *\n * %%: literal '%'\n * %s,%o: convert next argument into a string.\n *\n * @param format the string to format.\n * @param ... arguments to interpolate into the format string.\n */\nutil.format = function(format) {\n var re = /%./g;\n // current match\n var match;\n // current part\n var part;\n // current arg index\n var argi = 0;\n // collected parts to recombine later\n var parts = [];\n // last index found\n var last = 0;\n // loop while matches remain\n while((match = re.exec(format))) {\n part = format.substring(last, re.lastIndex - 2);\n // don't add empty strings (ie, parts between %s%s)\n if(part.length > 0) {\n parts.push(part);\n }\n last = re.lastIndex;\n // switch on % code\n var code = match[0][1];\n switch(code) {\n case 's':\n case 'o':\n // check if enough arguments were given\n if(argi < arguments.length) {\n parts.push(arguments[argi++ + 1]);\n } else {\n parts.push('');\n }\n break;\n // FIXME: do proper formating for numbers, etc\n //case 'f':\n //case 'd':\n case '%':\n parts.push('%');\n break;\n default:\n parts.push('<%' + code + '?>');\n }\n }\n // add trailing part of format string\n parts.push(format.substring(last));\n return parts.join('');\n};\n\n/**\n * Formats a number.\n *\n * http://snipplr.com/view/5945/javascript-numberformat--ported-from-php/\n */\nutil.formatNumber = function(number, decimals, dec_point, thousands_sep) {\n // http://kevin.vanzonneveld.net\n // + original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)\n // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)\n // + bugfix by: Michael White (http://crestidg.com)\n // + bugfix by: Benjamin Lupton\n // + bugfix by: Allan Jensen (http://www.winternet.no)\n // + revised by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)\n // * example 1: number_format(1234.5678, 2, '.', '');\n // * returns 1: 1234.57\n\n var n = number, c = isNaN(decimals = Math.abs(decimals)) ? 2 : decimals;\n var d = dec_point === undefined ? ',' : dec_point;\n var t = thousands_sep === undefined ?\n '.' : thousands_sep, s = n < 0 ? '-' : '';\n var i = parseInt((n = Math.abs(+n || 0).toFixed(c)), 10) + '';\n var j = (i.length > 3) ? i.length % 3 : 0;\n return s + (j ? i.substr(0, j) + t : '') +\n i.substr(j).replace(/(\\d{3})(?=\\d)/g, '$1' + t) +\n (c ? d + Math.abs(n - i).toFixed(c).slice(2) : '');\n};\n\n/**\n * Formats a byte size.\n *\n * http://snipplr.com/view/5949/format-humanize-file-byte-size-presentation-in-javascript/\n */\nutil.formatSize = function(size) {\n if(size >= 1073741824) {\n size = util.formatNumber(size / 1073741824, 2, '.', '') + ' GiB';\n } else if(size >= 1048576) {\n size = util.formatNumber(size / 1048576, 2, '.', '') + ' MiB';\n } else if(size >= 1024) {\n size = util.formatNumber(size / 1024, 0) + ' KiB';\n } else {\n size = util.formatNumber(size, 0) + ' bytes';\n }\n return size;\n};\n\n/**\n * Converts an IPv4 or IPv6 string representation into bytes (in network order).\n *\n * @param ip the IPv4 or IPv6 address to convert.\n *\n * @return the 4-byte IPv6 or 16-byte IPv6 address or null if the address can't\n * be parsed.\n */\nutil.bytesFromIP = function(ip) {\n if(ip.indexOf('.') !== -1) {\n return util.bytesFromIPv4(ip);\n }\n if(ip.indexOf(':') !== -1) {\n return util.bytesFromIPv6(ip);\n }\n return null;\n};\n\n/**\n * Converts an IPv4 string representation into bytes (in network order).\n *\n * @param ip the IPv4 address to convert.\n *\n * @return the 4-byte address or null if the address can't be parsed.\n */\nutil.bytesFromIPv4 = function(ip) {\n ip = ip.split('.');\n if(ip.length !== 4) {\n return null;\n }\n var b = util.createBuffer();\n for(var i = 0; i < ip.length; ++i) {\n var num = parseInt(ip[i], 10);\n if(isNaN(num)) {\n return null;\n }\n b.putByte(num);\n }\n return b.getBytes();\n};\n\n/**\n * Converts an IPv6 string representation into bytes (in network order).\n *\n * @param ip the IPv6 address to convert.\n *\n * @return the 16-byte address or null if the address can't be parsed.\n */\nutil.bytesFromIPv6 = function(ip) {\n var blanks = 0;\n ip = ip.split(':').filter(function(e) {\n if(e.length === 0) ++blanks;\n return true;\n });\n var zeros = (8 - ip.length + blanks) * 2;\n var b = util.createBuffer();\n for(var i = 0; i < 8; ++i) {\n if(!ip[i] || ip[i].length === 0) {\n b.fillWithByte(0, zeros);\n zeros = 0;\n continue;\n }\n var bytes = util.hexToBytes(ip[i]);\n if(bytes.length < 2) {\n b.putByte(0);\n }\n b.putBytes(bytes);\n }\n return b.getBytes();\n};\n\n/**\n * Converts 4-bytes into an IPv4 string representation or 16-bytes into\n * an IPv6 string representation. The bytes must be in network order.\n *\n * @param bytes the bytes to convert.\n *\n * @return the IPv4 or IPv6 string representation if 4 or 16 bytes,\n * respectively, are given, otherwise null.\n */\nutil.bytesToIP = function(bytes) {\n if(bytes.length === 4) {\n return util.bytesToIPv4(bytes);\n }\n if(bytes.length === 16) {\n return util.bytesToIPv6(bytes);\n }\n return null;\n};\n\n/**\n * Converts 4-bytes into an IPv4 string representation. The bytes must be\n * in network order.\n *\n * @param bytes the bytes to convert.\n *\n * @return the IPv4 string representation or null for an invalid # of bytes.\n */\nutil.bytesToIPv4 = function(bytes) {\n if(bytes.length !== 4) {\n return null;\n }\n var ip = [];\n for(var i = 0; i < bytes.length; ++i) {\n ip.push(bytes.charCodeAt(i));\n }\n return ip.join('.');\n};\n\n/**\n * Converts 16-bytes into an IPv16 string representation. The bytes must be\n * in network order.\n *\n * @param bytes the bytes to convert.\n *\n * @return the IPv16 string representation or null for an invalid # of bytes.\n */\nutil.bytesToIPv6 = function(bytes) {\n if(bytes.length !== 16) {\n return null;\n }\n var ip = [];\n var zeroGroups = [];\n var zeroMaxGroup = 0;\n for(var i = 0; i < bytes.length; i += 2) {\n var hex = util.bytesToHex(bytes[i] + bytes[i + 1]);\n // canonicalize zero representation\n while(hex[0] === '0' && hex !== '0') {\n hex = hex.substr(1);\n }\n if(hex === '0') {\n var last = zeroGroups[zeroGroups.length - 1];\n var idx = ip.length;\n if(!last || idx !== last.end + 1) {\n zeroGroups.push({start: idx, end: idx});\n } else {\n last.end = idx;\n if((last.end - last.start) >\n (zeroGroups[zeroMaxGroup].end - zeroGroups[zeroMaxGroup].start)) {\n zeroMaxGroup = zeroGroups.length - 1;\n }\n }\n }\n ip.push(hex);\n }\n if(zeroGroups.length > 0) {\n var group = zeroGroups[zeroMaxGroup];\n // only shorten group of length > 0\n if(group.end - group.start > 0) {\n ip.splice(group.start, group.end - group.start + 1, '');\n if(group.start === 0) {\n ip.unshift('');\n }\n if(group.end === 7) {\n ip.push('');\n }\n }\n }\n return ip.join(':');\n};\n\n/**\n * Estimates the number of processes that can be run concurrently. If\n * creating Web Workers, keep in mind that the main JavaScript process needs\n * its own core.\n *\n * @param options the options to use:\n * update true to force an update (not use the cached value).\n * @param callback(err, max) called once the operation completes.\n */\nutil.estimateCores = function(options, callback) {\n if(typeof options === 'function') {\n callback = options;\n options = {};\n }\n options = options || {};\n if('cores' in util && !options.update) {\n return callback(null, util.cores);\n }\n if(typeof navigator !== 'undefined' &&\n 'hardwareConcurrency' in navigator &&\n navigator.hardwareConcurrency > 0) {\n util.cores = navigator.hardwareConcurrency;\n return callback(null, util.cores);\n }\n if(typeof Worker === 'undefined') {\n // workers not available\n util.cores = 1;\n return callback(null, util.cores);\n }\n if(typeof Blob === 'undefined') {\n // can't estimate, default to 2\n util.cores = 2;\n return callback(null, util.cores);\n }\n\n // create worker concurrency estimation code as blob\n var blobUrl = URL.createObjectURL(new Blob(['(',\n function() {\n self.addEventListener('message', function(e) {\n // run worker for 4 ms\n var st = Date.now();\n var et = st + 4;\n while(Date.now() < et);\n self.postMessage({st: st, et: et});\n });\n }.toString(),\n ')()'], {type: 'application/javascript'}));\n\n // take 5 samples using 16 workers\n sample([], 5, 16);\n\n function sample(max, samples, numWorkers) {\n if(samples === 0) {\n // get overlap average\n var avg = Math.floor(max.reduce(function(avg, x) {\n return avg + x;\n }, 0) / max.length);\n util.cores = Math.max(1, avg);\n URL.revokeObjectURL(blobUrl);\n return callback(null, util.cores);\n }\n map(numWorkers, function(err, results) {\n max.push(reduce(numWorkers, results));\n sample(max, samples - 1, numWorkers);\n });\n }\n\n function map(numWorkers, callback) {\n var workers = [];\n var results = [];\n for(var i = 0; i < numWorkers; ++i) {\n var worker = new Worker(blobUrl);\n worker.addEventListener('message', function(e) {\n results.push(e.data);\n if(results.length === numWorkers) {\n for(var i = 0; i < numWorkers; ++i) {\n workers[i].terminate();\n }\n callback(null, results);\n }\n });\n workers.push(worker);\n }\n for(var i = 0; i < numWorkers; ++i) {\n workers[i].postMessage(i);\n }\n }\n\n function reduce(numWorkers, results) {\n // find overlapping time windows\n var overlaps = [];\n for(var n = 0; n < numWorkers; ++n) {\n var r1 = results[n];\n var overlap = overlaps[n] = [];\n for(var i = 0; i < numWorkers; ++i) {\n if(n === i) {\n continue;\n }\n var r2 = results[i];\n if((r1.st > r2.st && r1.st < r2.et) ||\n (r2.st > r1.st && r2.st < r1.et)) {\n overlap.push(i);\n }\n }\n }\n // get maximum overlaps ... don't include overlapping worker itself\n // as the main JS process was also being scheduled during the work and\n // would have to be subtracted from the estimate anyway\n return overlaps.reduce(function(max, overlap) {\n return Math.max(max, overlap.length);\n }, 0);\n }\n};\n","/**\n * Cipher base API.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2010-2014 Digital Bazaar, Inc.\n */\nvar forge = require('./forge');\nrequire('./util');\n\nmodule.exports = forge.cipher = forge.cipher || {};\n\n// registered algorithms\nforge.cipher.algorithms = forge.cipher.algorithms || {};\n\n/**\n * Creates a cipher object that can be used to encrypt data using the given\n * algorithm and key. The algorithm may be provided as a string value for a\n * previously registered algorithm or it may be given as a cipher algorithm\n * API object.\n *\n * @param algorithm the algorithm to use, either a string or an algorithm API\n * object.\n * @param key the key to use, as a binary-encoded string of bytes or a\n * byte buffer.\n *\n * @return the cipher.\n */\nforge.cipher.createCipher = function(algorithm, key) {\n var api = algorithm;\n if(typeof api === 'string') {\n api = forge.cipher.getAlgorithm(api);\n if(api) {\n api = api();\n }\n }\n if(!api) {\n throw new Error('Unsupported algorithm: ' + algorithm);\n }\n\n // assume block cipher\n return new forge.cipher.BlockCipher({\n algorithm: api,\n key: key,\n decrypt: false\n });\n};\n\n/**\n * Creates a decipher object that can be used to decrypt data using the given\n * algorithm and key. The algorithm may be provided as a string value for a\n * previously registered algorithm or it may be given as a cipher algorithm\n * API object.\n *\n * @param algorithm the algorithm to use, either a string or an algorithm API\n * object.\n * @param key the key to use, as a binary-encoded string of bytes or a\n * byte buffer.\n *\n * @return the cipher.\n */\nforge.cipher.createDecipher = function(algorithm, key) {\n var api = algorithm;\n if(typeof api === 'string') {\n api = forge.cipher.getAlgorithm(api);\n if(api) {\n api = api();\n }\n }\n if(!api) {\n throw new Error('Unsupported algorithm: ' + algorithm);\n }\n\n // assume block cipher\n return new forge.cipher.BlockCipher({\n algorithm: api,\n key: key,\n decrypt: true\n });\n};\n\n/**\n * Registers an algorithm by name. If the name was already registered, the\n * algorithm API object will be overwritten.\n *\n * @param name the name of the algorithm.\n * @param algorithm the algorithm API object.\n */\nforge.cipher.registerAlgorithm = function(name, algorithm) {\n name = name.toUpperCase();\n forge.cipher.algorithms[name] = algorithm;\n};\n\n/**\n * Gets a registered algorithm by name.\n *\n * @param name the name of the algorithm.\n *\n * @return the algorithm, if found, null if not.\n */\nforge.cipher.getAlgorithm = function(name) {\n name = name.toUpperCase();\n if(name in forge.cipher.algorithms) {\n return forge.cipher.algorithms[name];\n }\n return null;\n};\n\nvar BlockCipher = forge.cipher.BlockCipher = function(options) {\n this.algorithm = options.algorithm;\n this.mode = this.algorithm.mode;\n this.blockSize = this.mode.blockSize;\n this._finish = false;\n this._input = null;\n this.output = null;\n this._op = options.decrypt ? this.mode.decrypt : this.mode.encrypt;\n this._decrypt = options.decrypt;\n this.algorithm.initialize(options);\n};\n\n/**\n * Starts or restarts the encryption or decryption process, whichever\n * was previously configured.\n *\n * For non-GCM mode, the IV may be a binary-encoded string of bytes, an array\n * of bytes, a byte buffer, or an array of 32-bit integers. If the IV is in\n * bytes, then it must be Nb (16) bytes in length. If the IV is given in as\n * 32-bit integers, then it must be 4 integers long.\n *\n * Note: an IV is not required or used in ECB mode.\n *\n * For GCM-mode, the IV must be given as a binary-encoded string of bytes or\n * a byte buffer. The number of bytes should be 12 (96 bits) as recommended\n * by NIST SP-800-38D but another length may be given.\n *\n * @param options the options to use:\n * iv the initialization vector to use as a binary-encoded string of\n * bytes, null to reuse the last ciphered block from a previous\n * update() (this \"residue\" method is for legacy support only).\n * additionalData additional authentication data as a binary-encoded\n * string of bytes, for 'GCM' mode, (default: none).\n * tagLength desired length of authentication tag, in bits, for\n * 'GCM' mode (0-128, default: 128).\n * tag the authentication tag to check if decrypting, as a\n * binary-encoded string of bytes.\n * output the output the buffer to write to, null to create one.\n */\nBlockCipher.prototype.start = function(options) {\n options = options || {};\n var opts = {};\n for(var key in options) {\n opts[key] = options[key];\n }\n opts.decrypt = this._decrypt;\n this._finish = false;\n this._input = forge.util.createBuffer();\n this.output = options.output || forge.util.createBuffer();\n this.mode.start(opts);\n};\n\n/**\n * Updates the next block according to the cipher mode.\n *\n * @param input the buffer to read from.\n */\nBlockCipher.prototype.update = function(input) {\n if(input) {\n // input given, so empty it into the input buffer\n this._input.putBuffer(input);\n }\n\n // do cipher operation until it needs more input and not finished\n while(!this._op.call(this.mode, this._input, this.output, this._finish) &&\n !this._finish) {}\n\n // free consumed memory from input buffer\n this._input.compact();\n};\n\n/**\n * Finishes encrypting or decrypting.\n *\n * @param pad a padding function to use in CBC mode, null for default,\n * signature(blockSize, buffer, decrypt).\n *\n * @return true if successful, false on error.\n */\nBlockCipher.prototype.finish = function(pad) {\n // backwards-compatibility w/deprecated padding API\n // Note: will overwrite padding functions even after another start() call\n if(pad && (this.mode.name === 'ECB' || this.mode.name === 'CBC')) {\n this.mode.pad = function(input) {\n return pad(this.blockSize, input, false);\n };\n this.mode.unpad = function(output) {\n return pad(this.blockSize, output, true);\n };\n }\n\n // build options for padding and afterFinish functions\n var options = {};\n options.decrypt = this._decrypt;\n\n // get # of bytes that won't fill a block\n options.overflow = this._input.length() % this.blockSize;\n\n if(!this._decrypt && this.mode.pad) {\n if(!this.mode.pad(this._input, options)) {\n return false;\n }\n }\n\n // do final update\n this._finish = true;\n this.update();\n\n if(this._decrypt && this.mode.unpad) {\n if(!this.mode.unpad(this.output, options)) {\n return false;\n }\n }\n\n if(this.mode.afterFinish) {\n if(!this.mode.afterFinish(this.output, options)) {\n return false;\n }\n }\n\n return true;\n};\n","/**\n * Supported cipher modes.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2010-2014 Digital Bazaar, Inc.\n */\nvar forge = require('./forge');\nrequire('./util');\n\nforge.cipher = forge.cipher || {};\n\n// supported cipher modes\nvar modes = module.exports = forge.cipher.modes = forge.cipher.modes || {};\n\n/** Electronic codebook (ECB) (Don't use this; it's not secure) **/\n\nmodes.ecb = function(options) {\n options = options || {};\n this.name = 'ECB';\n this.cipher = options.cipher;\n this.blockSize = options.blockSize || 16;\n this._ints = this.blockSize / 4;\n this._inBlock = new Array(this._ints);\n this._outBlock = new Array(this._ints);\n};\n\nmodes.ecb.prototype.start = function(options) {};\n\nmodes.ecb.prototype.encrypt = function(input, output, finish) {\n // not enough input to encrypt\n if(input.length() < this.blockSize && !(finish && input.length() > 0)) {\n return true;\n }\n\n // get next block\n for(var i = 0; i < this._ints; ++i) {\n this._inBlock[i] = input.getInt32();\n }\n\n // encrypt block\n this.cipher.encrypt(this._inBlock, this._outBlock);\n\n // write output\n for(var i = 0; i < this._ints; ++i) {\n output.putInt32(this._outBlock[i]);\n }\n};\n\nmodes.ecb.prototype.decrypt = function(input, output, finish) {\n // not enough input to decrypt\n if(input.length() < this.blockSize && !(finish && input.length() > 0)) {\n return true;\n }\n\n // get next block\n for(var i = 0; i < this._ints; ++i) {\n this._inBlock[i] = input.getInt32();\n }\n\n // decrypt block\n this.cipher.decrypt(this._inBlock, this._outBlock);\n\n // write output\n for(var i = 0; i < this._ints; ++i) {\n output.putInt32(this._outBlock[i]);\n }\n};\n\nmodes.ecb.prototype.pad = function(input, options) {\n // add PKCS#7 padding to block (each pad byte is the\n // value of the number of pad bytes)\n var padding = (input.length() === this.blockSize ?\n this.blockSize : (this.blockSize - input.length()));\n input.fillWithByte(padding, padding);\n return true;\n};\n\nmodes.ecb.prototype.unpad = function(output, options) {\n // check for error: input data not a multiple of blockSize\n if(options.overflow > 0) {\n return false;\n }\n\n // ensure padding byte count is valid\n var len = output.length();\n var count = output.at(len - 1);\n if(count > (this.blockSize << 2)) {\n return false;\n }\n\n // trim off padding bytes\n output.truncate(count);\n return true;\n};\n\n/** Cipher-block Chaining (CBC) **/\n\nmodes.cbc = function(options) {\n options = options || {};\n this.name = 'CBC';\n this.cipher = options.cipher;\n this.blockSize = options.blockSize || 16;\n this._ints = this.blockSize / 4;\n this._inBlock = new Array(this._ints);\n this._outBlock = new Array(this._ints);\n};\n\nmodes.cbc.prototype.start = function(options) {\n // Note: legacy support for using IV residue (has security flaws)\n // if IV is null, reuse block from previous processing\n if(options.iv === null) {\n // must have a previous block\n if(!this._prev) {\n throw new Error('Invalid IV parameter.');\n }\n this._iv = this._prev.slice(0);\n } else if(!('iv' in options)) {\n throw new Error('Invalid IV parameter.');\n } else {\n // save IV as \"previous\" block\n this._iv = transformIV(options.iv, this.blockSize);\n this._prev = this._iv.slice(0);\n }\n};\n\nmodes.cbc.prototype.encrypt = function(input, output, finish) {\n // not enough input to encrypt\n if(input.length() < this.blockSize && !(finish && input.length() > 0)) {\n return true;\n }\n\n // get next block\n // CBC XOR's IV (or previous block) with plaintext\n for(var i = 0; i < this._ints; ++i) {\n this._inBlock[i] = this._prev[i] ^ input.getInt32();\n }\n\n // encrypt block\n this.cipher.encrypt(this._inBlock, this._outBlock);\n\n // write output, save previous block\n for(var i = 0; i < this._ints; ++i) {\n output.putInt32(this._outBlock[i]);\n }\n this._prev = this._outBlock;\n};\n\nmodes.cbc.prototype.decrypt = function(input, output, finish) {\n // not enough input to decrypt\n if(input.length() < this.blockSize && !(finish && input.length() > 0)) {\n return true;\n }\n\n // get next block\n for(var i = 0; i < this._ints; ++i) {\n this._inBlock[i] = input.getInt32();\n }\n\n // decrypt block\n this.cipher.decrypt(this._inBlock, this._outBlock);\n\n // write output, save previous ciphered block\n // CBC XOR's IV (or previous block) with ciphertext\n for(var i = 0; i < this._ints; ++i) {\n output.putInt32(this._prev[i] ^ this._outBlock[i]);\n }\n this._prev = this._inBlock.slice(0);\n};\n\nmodes.cbc.prototype.pad = function(input, options) {\n // add PKCS#7 padding to block (each pad byte is the\n // value of the number of pad bytes)\n var padding = (input.length() === this.blockSize ?\n this.blockSize : (this.blockSize - input.length()));\n input.fillWithByte(padding, padding);\n return true;\n};\n\nmodes.cbc.prototype.unpad = function(output, options) {\n // check for error: input data not a multiple of blockSize\n if(options.overflow > 0) {\n return false;\n }\n\n // ensure padding byte count is valid\n var len = output.length();\n var count = output.at(len - 1);\n if(count > (this.blockSize << 2)) {\n return false;\n }\n\n // trim off padding bytes\n output.truncate(count);\n return true;\n};\n\n/** Cipher feedback (CFB) **/\n\nmodes.cfb = function(options) {\n options = options || {};\n this.name = 'CFB';\n this.cipher = options.cipher;\n this.blockSize = options.blockSize || 16;\n this._ints = this.blockSize / 4;\n this._inBlock = null;\n this._outBlock = new Array(this._ints);\n this._partialBlock = new Array(this._ints);\n this._partialOutput = forge.util.createBuffer();\n this._partialBytes = 0;\n};\n\nmodes.cfb.prototype.start = function(options) {\n if(!('iv' in options)) {\n throw new Error('Invalid IV parameter.');\n }\n // use IV as first input\n this._iv = transformIV(options.iv, this.blockSize);\n this._inBlock = this._iv.slice(0);\n this._partialBytes = 0;\n};\n\nmodes.cfb.prototype.encrypt = function(input, output, finish) {\n // not enough input to encrypt\n var inputLength = input.length();\n if(inputLength === 0) {\n return true;\n }\n\n // encrypt block\n this.cipher.encrypt(this._inBlock, this._outBlock);\n\n // handle full block\n if(this._partialBytes === 0 && inputLength >= this.blockSize) {\n // XOR input with output, write input as output\n for(var i = 0; i < this._ints; ++i) {\n this._inBlock[i] = input.getInt32() ^ this._outBlock[i];\n output.putInt32(this._inBlock[i]);\n }\n return;\n }\n\n // handle partial block\n var partialBytes = (this.blockSize - inputLength) % this.blockSize;\n if(partialBytes > 0) {\n partialBytes = this.blockSize - partialBytes;\n }\n\n // XOR input with output, write input as partial output\n this._partialOutput.clear();\n for(var i = 0; i < this._ints; ++i) {\n this._partialBlock[i] = input.getInt32() ^ this._outBlock[i];\n this._partialOutput.putInt32(this._partialBlock[i]);\n }\n\n if(partialBytes > 0) {\n // block still incomplete, restore input buffer\n input.read -= this.blockSize;\n } else {\n // block complete, update input block\n for(var i = 0; i < this._ints; ++i) {\n this._inBlock[i] = this._partialBlock[i];\n }\n }\n\n // skip any previous partial bytes\n if(this._partialBytes > 0) {\n this._partialOutput.getBytes(this._partialBytes);\n }\n\n if(partialBytes > 0 && !finish) {\n output.putBytes(this._partialOutput.getBytes(\n partialBytes - this._partialBytes));\n this._partialBytes = partialBytes;\n return true;\n }\n\n output.putBytes(this._partialOutput.getBytes(\n inputLength - this._partialBytes));\n this._partialBytes = 0;\n};\n\nmodes.cfb.prototype.decrypt = function(input, output, finish) {\n // not enough input to decrypt\n var inputLength = input.length();\n if(inputLength === 0) {\n return true;\n }\n\n // encrypt block (CFB always uses encryption mode)\n this.cipher.encrypt(this._inBlock, this._outBlock);\n\n // handle full block\n if(this._partialBytes === 0 && inputLength >= this.blockSize) {\n // XOR input with output, write input as output\n for(var i = 0; i < this._ints; ++i) {\n this._inBlock[i] = input.getInt32();\n output.putInt32(this._inBlock[i] ^ this._outBlock[i]);\n }\n return;\n }\n\n // handle partial block\n var partialBytes = (this.blockSize - inputLength) % this.blockSize;\n if(partialBytes > 0) {\n partialBytes = this.blockSize - partialBytes;\n }\n\n // XOR input with output, write input as partial output\n this._partialOutput.clear();\n for(var i = 0; i < this._ints; ++i) {\n this._partialBlock[i] = input.getInt32();\n this._partialOutput.putInt32(this._partialBlock[i] ^ this._outBlock[i]);\n }\n\n if(partialBytes > 0) {\n // block still incomplete, restore input buffer\n input.read -= this.blockSize;\n } else {\n // block complete, update input block\n for(var i = 0; i < this._ints; ++i) {\n this._inBlock[i] = this._partialBlock[i];\n }\n }\n\n // skip any previous partial bytes\n if(this._partialBytes > 0) {\n this._partialOutput.getBytes(this._partialBytes);\n }\n\n if(partialBytes > 0 && !finish) {\n output.putBytes(this._partialOutput.getBytes(\n partialBytes - this._partialBytes));\n this._partialBytes = partialBytes;\n return true;\n }\n\n output.putBytes(this._partialOutput.getBytes(\n inputLength - this._partialBytes));\n this._partialBytes = 0;\n};\n\n/** Output feedback (OFB) **/\n\nmodes.ofb = function(options) {\n options = options || {};\n this.name = 'OFB';\n this.cipher = options.cipher;\n this.blockSize = options.blockSize || 16;\n this._ints = this.blockSize / 4;\n this._inBlock = null;\n this._outBlock = new Array(this._ints);\n this._partialOutput = forge.util.createBuffer();\n this._partialBytes = 0;\n};\n\nmodes.ofb.prototype.start = function(options) {\n if(!('iv' in options)) {\n throw new Error('Invalid IV parameter.');\n }\n // use IV as first input\n this._iv = transformIV(options.iv, this.blockSize);\n this._inBlock = this._iv.slice(0);\n this._partialBytes = 0;\n};\n\nmodes.ofb.prototype.encrypt = function(input, output, finish) {\n // not enough input to encrypt\n var inputLength = input.length();\n if(input.length() === 0) {\n return true;\n }\n\n // encrypt block (OFB always uses encryption mode)\n this.cipher.encrypt(this._inBlock, this._outBlock);\n\n // handle full block\n if(this._partialBytes === 0 && inputLength >= this.blockSize) {\n // XOR input with output and update next input\n for(var i = 0; i < this._ints; ++i) {\n output.putInt32(input.getInt32() ^ this._outBlock[i]);\n this._inBlock[i] = this._outBlock[i];\n }\n return;\n }\n\n // handle partial block\n var partialBytes = (this.blockSize - inputLength) % this.blockSize;\n if(partialBytes > 0) {\n partialBytes = this.blockSize - partialBytes;\n }\n\n // XOR input with output\n this._partialOutput.clear();\n for(var i = 0; i < this._ints; ++i) {\n this._partialOutput.putInt32(input.getInt32() ^ this._outBlock[i]);\n }\n\n if(partialBytes > 0) {\n // block still incomplete, restore input buffer\n input.read -= this.blockSize;\n } else {\n // block complete, update input block\n for(var i = 0; i < this._ints; ++i) {\n this._inBlock[i] = this._outBlock[i];\n }\n }\n\n // skip any previous partial bytes\n if(this._partialBytes > 0) {\n this._partialOutput.getBytes(this._partialBytes);\n }\n\n if(partialBytes > 0 && !finish) {\n output.putBytes(this._partialOutput.getBytes(\n partialBytes - this._partialBytes));\n this._partialBytes = partialBytes;\n return true;\n }\n\n output.putBytes(this._partialOutput.getBytes(\n inputLength - this._partialBytes));\n this._partialBytes = 0;\n};\n\nmodes.ofb.prototype.decrypt = modes.ofb.prototype.encrypt;\n\n/** Counter (CTR) **/\n\nmodes.ctr = function(options) {\n options = options || {};\n this.name = 'CTR';\n this.cipher = options.cipher;\n this.blockSize = options.blockSize || 16;\n this._ints = this.blockSize / 4;\n this._inBlock = null;\n this._outBlock = new Array(this._ints);\n this._partialOutput = forge.util.createBuffer();\n this._partialBytes = 0;\n};\n\nmodes.ctr.prototype.start = function(options) {\n if(!('iv' in options)) {\n throw new Error('Invalid IV parameter.');\n }\n // use IV as first input\n this._iv = transformIV(options.iv, this.blockSize);\n this._inBlock = this._iv.slice(0);\n this._partialBytes = 0;\n};\n\nmodes.ctr.prototype.encrypt = function(input, output, finish) {\n // not enough input to encrypt\n var inputLength = input.length();\n if(inputLength === 0) {\n return true;\n }\n\n // encrypt block (CTR always uses encryption mode)\n this.cipher.encrypt(this._inBlock, this._outBlock);\n\n // handle full block\n if(this._partialBytes === 0 && inputLength >= this.blockSize) {\n // XOR input with output\n for(var i = 0; i < this._ints; ++i) {\n output.putInt32(input.getInt32() ^ this._outBlock[i]);\n }\n } else {\n // handle partial block\n var partialBytes = (this.blockSize - inputLength) % this.blockSize;\n if(partialBytes > 0) {\n partialBytes = this.blockSize - partialBytes;\n }\n\n // XOR input with output\n this._partialOutput.clear();\n for(var i = 0; i < this._ints; ++i) {\n this._partialOutput.putInt32(input.getInt32() ^ this._outBlock[i]);\n }\n\n if(partialBytes > 0) {\n // block still incomplete, restore input buffer\n input.read -= this.blockSize;\n }\n\n // skip any previous partial bytes\n if(this._partialBytes > 0) {\n this._partialOutput.getBytes(this._partialBytes);\n }\n\n if(partialBytes > 0 && !finish) {\n output.putBytes(this._partialOutput.getBytes(\n partialBytes - this._partialBytes));\n this._partialBytes = partialBytes;\n return true;\n }\n\n output.putBytes(this._partialOutput.getBytes(\n inputLength - this._partialBytes));\n this._partialBytes = 0;\n }\n\n // block complete, increment counter (input block)\n inc32(this._inBlock);\n};\n\nmodes.ctr.prototype.decrypt = modes.ctr.prototype.encrypt;\n\n/** Galois/Counter Mode (GCM) **/\n\nmodes.gcm = function(options) {\n options = options || {};\n this.name = 'GCM';\n this.cipher = options.cipher;\n this.blockSize = options.blockSize || 16;\n this._ints = this.blockSize / 4;\n this._inBlock = new Array(this._ints);\n this._outBlock = new Array(this._ints);\n this._partialOutput = forge.util.createBuffer();\n this._partialBytes = 0;\n\n // R is actually this value concatenated with 120 more zero bits, but\n // we only XOR against R so the other zeros have no effect -- we just\n // apply this value to the first integer in a block\n this._R = 0xE1000000;\n};\n\nmodes.gcm.prototype.start = function(options) {\n if(!('iv' in options)) {\n throw new Error('Invalid IV parameter.');\n }\n // ensure IV is a byte buffer\n var iv = forge.util.createBuffer(options.iv);\n\n // no ciphered data processed yet\n this._cipherLength = 0;\n\n // default additional data is none\n var additionalData;\n if('additionalData' in options) {\n additionalData = forge.util.createBuffer(options.additionalData);\n } else {\n additionalData = forge.util.createBuffer();\n }\n\n // default tag length is 128 bits\n if('tagLength' in options) {\n this._tagLength = options.tagLength;\n } else {\n this._tagLength = 128;\n }\n\n // if tag is given, ensure tag matches tag length\n this._tag = null;\n if(options.decrypt) {\n // save tag to check later\n this._tag = forge.util.createBuffer(options.tag).getBytes();\n if(this._tag.length !== (this._tagLength / 8)) {\n throw new Error('Authentication tag does not match tag length.');\n }\n }\n\n // create tmp storage for hash calculation\n this._hashBlock = new Array(this._ints);\n\n // no tag generated yet\n this.tag = null;\n\n // generate hash subkey\n // (apply block cipher to \"zero\" block)\n this._hashSubkey = new Array(this._ints);\n this.cipher.encrypt([0, 0, 0, 0], this._hashSubkey);\n\n // generate table M\n // use 4-bit tables (32 component decomposition of a 16 byte value)\n // 8-bit tables take more space and are known to have security\n // vulnerabilities (in native implementations)\n this.componentBits = 4;\n this._m = this.generateHashTable(this._hashSubkey, this.componentBits);\n\n // Note: support IV length different from 96 bits? (only supporting\n // 96 bits is recommended by NIST SP-800-38D)\n // generate J_0\n var ivLength = iv.length();\n if(ivLength === 12) {\n // 96-bit IV\n this._j0 = [iv.getInt32(), iv.getInt32(), iv.getInt32(), 1];\n } else {\n // IV is NOT 96-bits\n this._j0 = [0, 0, 0, 0];\n while(iv.length() > 0) {\n this._j0 = this.ghash(\n this._hashSubkey, this._j0,\n [iv.getInt32(), iv.getInt32(), iv.getInt32(), iv.getInt32()]);\n }\n this._j0 = this.ghash(\n this._hashSubkey, this._j0, [0, 0].concat(from64To32(ivLength * 8)));\n }\n\n // generate ICB (initial counter block)\n this._inBlock = this._j0.slice(0);\n inc32(this._inBlock);\n this._partialBytes = 0;\n\n // consume authentication data\n additionalData = forge.util.createBuffer(additionalData);\n // save additional data length as a BE 64-bit number\n this._aDataLength = from64To32(additionalData.length() * 8);\n // pad additional data to 128 bit (16 byte) block size\n var overflow = additionalData.length() % this.blockSize;\n if(overflow) {\n additionalData.fillWithByte(0, this.blockSize - overflow);\n }\n this._s = [0, 0, 0, 0];\n while(additionalData.length() > 0) {\n this._s = this.ghash(this._hashSubkey, this._s, [\n additionalData.getInt32(),\n additionalData.getInt32(),\n additionalData.getInt32(),\n additionalData.getInt32()\n ]);\n }\n};\n\nmodes.gcm.prototype.encrypt = function(input, output, finish) {\n // not enough input to encrypt\n var inputLength = input.length();\n if(inputLength === 0) {\n return true;\n }\n\n // encrypt block\n this.cipher.encrypt(this._inBlock, this._outBlock);\n\n // handle full block\n if(this._partialBytes === 0 && inputLength >= this.blockSize) {\n // XOR input with output\n for(var i = 0; i < this._ints; ++i) {\n output.putInt32(this._outBlock[i] ^= input.getInt32());\n }\n this._cipherLength += this.blockSize;\n } else {\n // handle partial block\n var partialBytes = (this.blockSize - inputLength) % this.blockSize;\n if(partialBytes > 0) {\n partialBytes = this.blockSize - partialBytes;\n }\n\n // XOR input with output\n this._partialOutput.clear();\n for(var i = 0; i < this._ints; ++i) {\n this._partialOutput.putInt32(input.getInt32() ^ this._outBlock[i]);\n }\n\n if(partialBytes <= 0 || finish) {\n // handle overflow prior to hashing\n if(finish) {\n // get block overflow\n var overflow = inputLength % this.blockSize;\n this._cipherLength += overflow;\n // truncate for hash function\n this._partialOutput.truncate(this.blockSize - overflow);\n } else {\n this._cipherLength += this.blockSize;\n }\n\n // get output block for hashing\n for(var i = 0; i < this._ints; ++i) {\n this._outBlock[i] = this._partialOutput.getInt32();\n }\n this._partialOutput.read -= this.blockSize;\n }\n\n // skip any previous partial bytes\n if(this._partialBytes > 0) {\n this._partialOutput.getBytes(this._partialBytes);\n }\n\n if(partialBytes > 0 && !finish) {\n // block still incomplete, restore input buffer, get partial output,\n // and return early\n input.read -= this.blockSize;\n output.putBytes(this._partialOutput.getBytes(\n partialBytes - this._partialBytes));\n this._partialBytes = partialBytes;\n return true;\n }\n\n output.putBytes(this._partialOutput.getBytes(\n inputLength - this._partialBytes));\n this._partialBytes = 0;\n }\n\n // update hash block S\n this._s = this.ghash(this._hashSubkey, this._s, this._outBlock);\n\n // increment counter (input block)\n inc32(this._inBlock);\n};\n\nmodes.gcm.prototype.decrypt = function(input, output, finish) {\n // not enough input to decrypt\n var inputLength = input.length();\n if(inputLength < this.blockSize && !(finish && inputLength > 0)) {\n return true;\n }\n\n // encrypt block (GCM always uses encryption mode)\n this.cipher.encrypt(this._inBlock, this._outBlock);\n\n // increment counter (input block)\n inc32(this._inBlock);\n\n // update hash block S\n this._hashBlock[0] = input.getInt32();\n this._hashBlock[1] = input.getInt32();\n this._hashBlock[2] = input.getInt32();\n this._hashBlock[3] = input.getInt32();\n this._s = this.ghash(this._hashSubkey, this._s, this._hashBlock);\n\n // XOR hash input with output\n for(var i = 0; i < this._ints; ++i) {\n output.putInt32(this._outBlock[i] ^ this._hashBlock[i]);\n }\n\n // increment cipher data length\n if(inputLength < this.blockSize) {\n this._cipherLength += inputLength % this.blockSize;\n } else {\n this._cipherLength += this.blockSize;\n }\n};\n\nmodes.gcm.prototype.afterFinish = function(output, options) {\n var rval = true;\n\n // handle overflow\n if(options.decrypt && options.overflow) {\n output.truncate(this.blockSize - options.overflow);\n }\n\n // handle authentication tag\n this.tag = forge.util.createBuffer();\n\n // concatenate additional data length with cipher length\n var lengths = this._aDataLength.concat(from64To32(this._cipherLength * 8));\n\n // include lengths in hash\n this._s = this.ghash(this._hashSubkey, this._s, lengths);\n\n // do GCTR(J_0, S)\n var tag = [];\n this.cipher.encrypt(this._j0, tag);\n for(var i = 0; i < this._ints; ++i) {\n this.tag.putInt32(this._s[i] ^ tag[i]);\n }\n\n // trim tag to length\n this.tag.truncate(this.tag.length() % (this._tagLength / 8));\n\n // check authentication tag\n if(options.decrypt && this.tag.bytes() !== this._tag) {\n rval = false;\n }\n\n return rval;\n};\n\n/**\n * See NIST SP-800-38D 6.3 (Algorithm 1). This function performs Galois\n * field multiplication. The field, GF(2^128), is defined by the polynomial:\n *\n * x^128 + x^7 + x^2 + x + 1\n *\n * Which is represented in little-endian binary form as: 11100001 (0xe1). When\n * the value of a coefficient is 1, a bit is set. The value R, is the\n * concatenation of this value and 120 zero bits, yielding a 128-bit value\n * which matches the block size.\n *\n * This function will multiply two elements (vectors of bytes), X and Y, in\n * the field GF(2^128). The result is initialized to zero. For each bit of\n * X (out of 128), x_i, if x_i is set, then the result is multiplied (XOR'd)\n * by the current value of Y. For each bit, the value of Y will be raised by\n * a power of x (multiplied by the polynomial x). This can be achieved by\n * shifting Y once to the right. If the current value of Y, prior to being\n * multiplied by x, has 0 as its LSB, then it is a 127th degree polynomial.\n * Otherwise, we must divide by R after shifting to find the remainder.\n *\n * @param x the first block to multiply by the second.\n * @param y the second block to multiply by the first.\n *\n * @return the block result of the multiplication.\n */\nmodes.gcm.prototype.multiply = function(x, y) {\n var z_i = [0, 0, 0, 0];\n var v_i = y.slice(0);\n\n // calculate Z_128 (block has 128 bits)\n for(var i = 0; i < 128; ++i) {\n // if x_i is 0, Z_{i+1} = Z_i (unchanged)\n // else Z_{i+1} = Z_i ^ V_i\n // get x_i by finding 32-bit int position, then left shift 1 by remainder\n var x_i = x[(i / 32) | 0] & (1 << (31 - i % 32));\n if(x_i) {\n z_i[0] ^= v_i[0];\n z_i[1] ^= v_i[1];\n z_i[2] ^= v_i[2];\n z_i[3] ^= v_i[3];\n }\n\n // if LSB(V_i) is 1, V_i = V_i >> 1\n // else V_i = (V_i >> 1) ^ R\n this.pow(v_i, v_i);\n }\n\n return z_i;\n};\n\nmodes.gcm.prototype.pow = function(x, out) {\n // if LSB(x) is 1, x = x >>> 1\n // else x = (x >>> 1) ^ R\n var lsb = x[3] & 1;\n\n // always do x >>> 1:\n // starting with the rightmost integer, shift each integer to the right\n // one bit, pulling in the bit from the integer to the left as its top\n // most bit (do this for the last 3 integers)\n for(var i = 3; i > 0; --i) {\n out[i] = (x[i] >>> 1) | ((x[i - 1] & 1) << 31);\n }\n // shift the first integer normally\n out[0] = x[0] >>> 1;\n\n // if lsb was not set, then polynomial had a degree of 127 and doesn't\n // need to divided; otherwise, XOR with R to find the remainder; we only\n // need to XOR the first integer since R technically ends w/120 zero bits\n if(lsb) {\n out[0] ^= this._R;\n }\n};\n\nmodes.gcm.prototype.tableMultiply = function(x) {\n // assumes 4-bit tables are used\n var z = [0, 0, 0, 0];\n for(var i = 0; i < 32; ++i) {\n var idx = (i / 8) | 0;\n var x_i = (x[idx] >>> ((7 - (i % 8)) * 4)) & 0xF;\n var ah = this._m[i][x_i];\n z[0] ^= ah[0];\n z[1] ^= ah[1];\n z[2] ^= ah[2];\n z[3] ^= ah[3];\n }\n return z;\n};\n\n/**\n * A continuing version of the GHASH algorithm that operates on a single\n * block. The hash block, last hash value (Ym) and the new block to hash\n * are given.\n *\n * @param h the hash block.\n * @param y the previous value for Ym, use [0, 0, 0, 0] for a new hash.\n * @param x the block to hash.\n *\n * @return the hashed value (Ym).\n */\nmodes.gcm.prototype.ghash = function(h, y, x) {\n y[0] ^= x[0];\n y[1] ^= x[1];\n y[2] ^= x[2];\n y[3] ^= x[3];\n return this.tableMultiply(y);\n //return this.multiply(y, h);\n};\n\n/**\n * Precomputes a table for multiplying against the hash subkey. This\n * mechanism provides a substantial speed increase over multiplication\n * performed without a table. The table-based multiplication this table is\n * for solves X * H by multiplying each component of X by H and then\n * composing the results together using XOR.\n *\n * This function can be used to generate tables with different bit sizes\n * for the components, however, this implementation assumes there are\n * 32 components of X (which is a 16 byte vector), therefore each component\n * takes 4-bits (so the table is constructed with bits=4).\n *\n * @param h the hash subkey.\n * @param bits the bit size for a component.\n */\nmodes.gcm.prototype.generateHashTable = function(h, bits) {\n // TODO: There are further optimizations that would use only the\n // first table M_0 (or some variant) along with a remainder table;\n // this can be explored in the future\n var multiplier = 8 / bits;\n var perInt = 4 * multiplier;\n var size = 16 * multiplier;\n var m = new Array(size);\n for(var i = 0; i < size; ++i) {\n var tmp = [0, 0, 0, 0];\n var idx = (i / perInt) | 0;\n var shft = ((perInt - 1 - (i % perInt)) * bits);\n tmp[idx] = (1 << (bits - 1)) << shft;\n m[i] = this.generateSubHashTable(this.multiply(tmp, h), bits);\n }\n return m;\n};\n\n/**\n * Generates a table for multiplying against the hash subkey for one\n * particular component (out of all possible component values).\n *\n * @param mid the pre-multiplied value for the middle key of the table.\n * @param bits the bit size for a component.\n */\nmodes.gcm.prototype.generateSubHashTable = function(mid, bits) {\n // compute the table quickly by minimizing the number of\n // POW operations -- they only need to be performed for powers of 2,\n // all other entries can be composed from those powers using XOR\n var size = 1 << bits;\n var half = size >>> 1;\n var m = new Array(size);\n m[half] = mid.slice(0);\n var i = half >>> 1;\n while(i > 0) {\n // raise m0[2 * i] and store in m0[i]\n this.pow(m[2 * i], m[i] = []);\n i >>= 1;\n }\n i = 2;\n while(i < half) {\n for(var j = 1; j < i; ++j) {\n var m_i = m[i];\n var m_j = m[j];\n m[i + j] = [\n m_i[0] ^ m_j[0],\n m_i[1] ^ m_j[1],\n m_i[2] ^ m_j[2],\n m_i[3] ^ m_j[3]\n ];\n }\n i *= 2;\n }\n m[0] = [0, 0, 0, 0];\n /* Note: We could avoid storing these by doing composition during multiply\n calculate top half using composition by speed is preferred. */\n for(i = half + 1; i < size; ++i) {\n var c = m[i ^ half];\n m[i] = [mid[0] ^ c[0], mid[1] ^ c[1], mid[2] ^ c[2], mid[3] ^ c[3]];\n }\n return m;\n};\n\n/** Utility functions */\n\nfunction transformIV(iv, blockSize) {\n if(typeof iv === 'string') {\n // convert iv string into byte buffer\n iv = forge.util.createBuffer(iv);\n }\n\n if(forge.util.isArray(iv) && iv.length > 4) {\n // convert iv byte array into byte buffer\n var tmp = iv;\n iv = forge.util.createBuffer();\n for(var i = 0; i < tmp.length; ++i) {\n iv.putByte(tmp[i]);\n }\n }\n\n if(iv.length() < blockSize) {\n throw new Error(\n 'Invalid IV length; got ' + iv.length() +\n ' bytes and expected ' + blockSize + ' bytes.');\n }\n\n if(!forge.util.isArray(iv)) {\n // convert iv byte buffer into 32-bit integer array\n var ints = [];\n var blocks = blockSize / 4;\n for(var i = 0; i < blocks; ++i) {\n ints.push(iv.getInt32());\n }\n iv = ints;\n }\n\n return iv;\n}\n\nfunction inc32(block) {\n // increment last 32 bits of block only\n block[block.length - 1] = (block[block.length - 1] + 1) & 0xFFFFFFFF;\n}\n\nfunction from64To32(num) {\n // convert 64-bit number to two BE Int32s\n return [(num / 0x100000000) | 0, num & 0xFFFFFFFF];\n}\n","/**\n * Advanced Encryption Standard (AES) implementation.\n *\n * This implementation is based on the public domain library 'jscrypto' which\n * was written by:\n *\n * Emily Stark (estark@stanford.edu)\n * Mike Hamburg (mhamburg@stanford.edu)\n * Dan Boneh (dabo@cs.stanford.edu)\n *\n * Parts of this code are based on the OpenSSL implementation of AES:\n * http://www.openssl.org\n *\n * @author Dave Longley\n *\n * Copyright (c) 2010-2014 Digital Bazaar, Inc.\n */\nvar forge = require('./forge');\nrequire('./cipher');\nrequire('./cipherModes');\nrequire('./util');\n\n/* AES API */\nmodule.exports = forge.aes = forge.aes || {};\n\n/**\n * Deprecated. Instead, use:\n *\n * var cipher = forge.cipher.createCipher('AES-', key);\n * cipher.start({iv: iv});\n *\n * Creates an AES cipher object to encrypt data using the given symmetric key.\n * The output will be stored in the 'output' member of the returned cipher.\n *\n * The key and iv may be given as a string of bytes, an array of bytes,\n * a byte buffer, or an array of 32-bit words.\n *\n * @param key the symmetric key to use.\n * @param iv the initialization vector to use.\n * @param output the buffer to write to, null to create one.\n * @param mode the cipher mode to use (default: 'CBC').\n *\n * @return the cipher.\n */\nforge.aes.startEncrypting = function(key, iv, output, mode) {\n var cipher = _createCipher({\n key: key,\n output: output,\n decrypt: false,\n mode: mode\n });\n cipher.start(iv);\n return cipher;\n};\n\n/**\n * Deprecated. Instead, use:\n *\n * var cipher = forge.cipher.createCipher('AES-', key);\n *\n * Creates an AES cipher object to encrypt data using the given symmetric key.\n *\n * The key may be given as a string of bytes, an array of bytes, a\n * byte buffer, or an array of 32-bit words.\n *\n * @param key the symmetric key to use.\n * @param mode the cipher mode to use (default: 'CBC').\n *\n * @return the cipher.\n */\nforge.aes.createEncryptionCipher = function(key, mode) {\n return _createCipher({\n key: key,\n output: null,\n decrypt: false,\n mode: mode\n });\n};\n\n/**\n * Deprecated. Instead, use:\n *\n * var decipher = forge.cipher.createDecipher('AES-', key);\n * decipher.start({iv: iv});\n *\n * Creates an AES cipher object to decrypt data using the given symmetric key.\n * The output will be stored in the 'output' member of the returned cipher.\n *\n * The key and iv may be given as a string of bytes, an array of bytes,\n * a byte buffer, or an array of 32-bit words.\n *\n * @param key the symmetric key to use.\n * @param iv the initialization vector to use.\n * @param output the buffer to write to, null to create one.\n * @param mode the cipher mode to use (default: 'CBC').\n *\n * @return the cipher.\n */\nforge.aes.startDecrypting = function(key, iv, output, mode) {\n var cipher = _createCipher({\n key: key,\n output: output,\n decrypt: true,\n mode: mode\n });\n cipher.start(iv);\n return cipher;\n};\n\n/**\n * Deprecated. Instead, use:\n *\n * var decipher = forge.cipher.createDecipher('AES-', key);\n *\n * Creates an AES cipher object to decrypt data using the given symmetric key.\n *\n * The key may be given as a string of bytes, an array of bytes, a\n * byte buffer, or an array of 32-bit words.\n *\n * @param key the symmetric key to use.\n * @param mode the cipher mode to use (default: 'CBC').\n *\n * @return the cipher.\n */\nforge.aes.createDecryptionCipher = function(key, mode) {\n return _createCipher({\n key: key,\n output: null,\n decrypt: true,\n mode: mode\n });\n};\n\n/**\n * Creates a new AES cipher algorithm object.\n *\n * @param name the name of the algorithm.\n * @param mode the mode factory function.\n *\n * @return the AES algorithm object.\n */\nforge.aes.Algorithm = function(name, mode) {\n if(!init) {\n initialize();\n }\n var self = this;\n self.name = name;\n self.mode = new mode({\n blockSize: 16,\n cipher: {\n encrypt: function(inBlock, outBlock) {\n return _updateBlock(self._w, inBlock, outBlock, false);\n },\n decrypt: function(inBlock, outBlock) {\n return _updateBlock(self._w, inBlock, outBlock, true);\n }\n }\n });\n self._init = false;\n};\n\n/**\n * Initializes this AES algorithm by expanding its key.\n *\n * @param options the options to use.\n * key the key to use with this algorithm.\n * decrypt true if the algorithm should be initialized for decryption,\n * false for encryption.\n */\nforge.aes.Algorithm.prototype.initialize = function(options) {\n if(this._init) {\n return;\n }\n\n var key = options.key;\n var tmp;\n\n /* Note: The key may be a string of bytes, an array of bytes, a byte\n buffer, or an array of 32-bit integers. If the key is in bytes, then\n it must be 16, 24, or 32 bytes in length. If it is in 32-bit\n integers, it must be 4, 6, or 8 integers long. */\n\n if(typeof key === 'string' &&\n (key.length === 16 || key.length === 24 || key.length === 32)) {\n // convert key string into byte buffer\n key = forge.util.createBuffer(key);\n } else if(forge.util.isArray(key) &&\n (key.length === 16 || key.length === 24 || key.length === 32)) {\n // convert key integer array into byte buffer\n tmp = key;\n key = forge.util.createBuffer();\n for(var i = 0; i < tmp.length; ++i) {\n key.putByte(tmp[i]);\n }\n }\n\n // convert key byte buffer into 32-bit integer array\n if(!forge.util.isArray(key)) {\n tmp = key;\n key = [];\n\n // key lengths of 16, 24, 32 bytes allowed\n var len = tmp.length();\n if(len === 16 || len === 24 || len === 32) {\n len = len >>> 2;\n for(var i = 0; i < len; ++i) {\n key.push(tmp.getInt32());\n }\n }\n }\n\n // key must be an array of 32-bit integers by now\n if(!forge.util.isArray(key) ||\n !(key.length === 4 || key.length === 6 || key.length === 8)) {\n throw new Error('Invalid key parameter.');\n }\n\n // encryption operation is always used for these modes\n var mode = this.mode.name;\n var encryptOp = (['CFB', 'OFB', 'CTR', 'GCM'].indexOf(mode) !== -1);\n\n // do key expansion\n this._w = _expandKey(key, options.decrypt && !encryptOp);\n this._init = true;\n};\n\n/**\n * Expands a key. Typically only used for testing.\n *\n * @param key the symmetric key to expand, as an array of 32-bit words.\n * @param decrypt true to expand for decryption, false for encryption.\n *\n * @return the expanded key.\n */\nforge.aes._expandKey = function(key, decrypt) {\n if(!init) {\n initialize();\n }\n return _expandKey(key, decrypt);\n};\n\n/**\n * Updates a single block. Typically only used for testing.\n *\n * @param w the expanded key to use.\n * @param input an array of block-size 32-bit words.\n * @param output an array of block-size 32-bit words.\n * @param decrypt true to decrypt, false to encrypt.\n */\nforge.aes._updateBlock = _updateBlock;\n\n/** Register AES algorithms **/\n\nregisterAlgorithm('AES-ECB', forge.cipher.modes.ecb);\nregisterAlgorithm('AES-CBC', forge.cipher.modes.cbc);\nregisterAlgorithm('AES-CFB', forge.cipher.modes.cfb);\nregisterAlgorithm('AES-OFB', forge.cipher.modes.ofb);\nregisterAlgorithm('AES-CTR', forge.cipher.modes.ctr);\nregisterAlgorithm('AES-GCM', forge.cipher.modes.gcm);\n\nfunction registerAlgorithm(name, mode) {\n var factory = function() {\n return new forge.aes.Algorithm(name, mode);\n };\n forge.cipher.registerAlgorithm(name, factory);\n}\n\n/** AES implementation **/\n\nvar init = false; // not yet initialized\nvar Nb = 4; // number of words comprising the state (AES = 4)\nvar sbox; // non-linear substitution table used in key expansion\nvar isbox; // inversion of sbox\nvar rcon; // round constant word array\nvar mix; // mix-columns table\nvar imix; // inverse mix-columns table\n\n/**\n * Performs initialization, ie: precomputes tables to optimize for speed.\n *\n * One way to understand how AES works is to imagine that 'addition' and\n * 'multiplication' are interfaces that require certain mathematical\n * properties to hold true (ie: they are associative) but they might have\n * different implementations and produce different kinds of results ...\n * provided that their mathematical properties remain true. AES defines\n * its own methods of addition and multiplication but keeps some important\n * properties the same, ie: associativity and distributivity. The\n * explanation below tries to shed some light on how AES defines addition\n * and multiplication of bytes and 32-bit words in order to perform its\n * encryption and decryption algorithms.\n *\n * The basics:\n *\n * The AES algorithm views bytes as binary representations of polynomials\n * that have either 1 or 0 as the coefficients. It defines the addition\n * or subtraction of two bytes as the XOR operation. It also defines the\n * multiplication of two bytes as a finite field referred to as GF(2^8)\n * (Note: 'GF' means \"Galois Field\" which is a field that contains a finite\n * number of elements so GF(2^8) has 256 elements).\n *\n * This means that any two bytes can be represented as binary polynomials;\n * when they multiplied together and modularly reduced by an irreducible\n * polynomial of the 8th degree, the results are the field GF(2^8). The\n * specific irreducible polynomial that AES uses in hexadecimal is 0x11b.\n * This multiplication is associative with 0x01 as the identity:\n *\n * (b * 0x01 = GF(b, 0x01) = b).\n *\n * The operation GF(b, 0x02) can be performed at the byte level by left\n * shifting b once and then XOR'ing it (to perform the modular reduction)\n * with 0x11b if b is >= 128. Repeated application of the multiplication\n * of 0x02 can be used to implement the multiplication of any two bytes.\n *\n * For instance, multiplying 0x57 and 0x13, denoted as GF(0x57, 0x13), can\n * be performed by factoring 0x13 into 0x01, 0x02, and 0x10. Then these\n * factors can each be multiplied by 0x57 and then added together. To do\n * the multiplication, values for 0x57 multiplied by each of these 3 factors\n * can be precomputed and stored in a table. To add them, the values from\n * the table are XOR'd together.\n *\n * AES also defines addition and multiplication of words, that is 4-byte\n * numbers represented as polynomials of 3 degrees where the coefficients\n * are the values of the bytes.\n *\n * The word [a0, a1, a2, a3] is a polynomial a3x^3 + a2x^2 + a1x + a0.\n *\n * Addition is performed by XOR'ing like powers of x. Multiplication\n * is performed in two steps, the first is an algebriac expansion as\n * you would do normally (where addition is XOR). But the result is\n * a polynomial larger than 3 degrees and thus it cannot fit in a word. So\n * next the result is modularly reduced by an AES-specific polynomial of\n * degree 4 which will always produce a polynomial of less than 4 degrees\n * such that it will fit in a word. In AES, this polynomial is x^4 + 1.\n *\n * The modular product of two polynomials 'a' and 'b' is thus:\n *\n * d(x) = d3x^3 + d2x^2 + d1x + d0\n * with\n * d0 = GF(a0, b0) ^ GF(a3, b1) ^ GF(a2, b2) ^ GF(a1, b3)\n * d1 = GF(a1, b0) ^ GF(a0, b1) ^ GF(a3, b2) ^ GF(a2, b3)\n * d2 = GF(a2, b0) ^ GF(a1, b1) ^ GF(a0, b2) ^ GF(a3, b3)\n * d3 = GF(a3, b0) ^ GF(a2, b1) ^ GF(a1, b2) ^ GF(a0, b3)\n *\n * As a matrix:\n *\n * [d0] = [a0 a3 a2 a1][b0]\n * [d1] [a1 a0 a3 a2][b1]\n * [d2] [a2 a1 a0 a3][b2]\n * [d3] [a3 a2 a1 a0][b3]\n *\n * Special polynomials defined by AES (0x02 == {02}):\n * a(x) = {03}x^3 + {01}x^2 + {01}x + {02}\n * a^-1(x) = {0b}x^3 + {0d}x^2 + {09}x + {0e}.\n *\n * These polynomials are used in the MixColumns() and InverseMixColumns()\n * operations, respectively, to cause each element in the state to affect\n * the output (referred to as diffusing).\n *\n * RotWord() uses: a0 = a1 = a2 = {00} and a3 = {01}, which is the\n * polynomial x3.\n *\n * The ShiftRows() method modifies the last 3 rows in the state (where\n * the state is 4 words with 4 bytes per word) by shifting bytes cyclically.\n * The 1st byte in the second row is moved to the end of the row. The 1st\n * and 2nd bytes in the third row are moved to the end of the row. The 1st,\n * 2nd, and 3rd bytes are moved in the fourth row.\n *\n * More details on how AES arithmetic works:\n *\n * In the polynomial representation of binary numbers, XOR performs addition\n * and subtraction and multiplication in GF(2^8) denoted as GF(a, b)\n * corresponds with the multiplication of polynomials modulo an irreducible\n * polynomial of degree 8. In other words, for AES, GF(a, b) will multiply\n * polynomial 'a' with polynomial 'b' and then do a modular reduction by\n * an AES-specific irreducible polynomial of degree 8.\n *\n * A polynomial is irreducible if its only divisors are one and itself. For\n * the AES algorithm, this irreducible polynomial is:\n *\n * m(x) = x^8 + x^4 + x^3 + x + 1,\n *\n * or {01}{1b} in hexadecimal notation, where each coefficient is a bit:\n * 100011011 = 283 = 0x11b.\n *\n * For example, GF(0x57, 0x83) = 0xc1 because\n *\n * 0x57 = 87 = 01010111 = x^6 + x^4 + x^2 + x + 1\n * 0x85 = 131 = 10000101 = x^7 + x + 1\n *\n * (x^6 + x^4 + x^2 + x + 1) * (x^7 + x + 1)\n * = x^13 + x^11 + x^9 + x^8 + x^7 +\n * x^7 + x^5 + x^3 + x^2 + x +\n * x^6 + x^4 + x^2 + x + 1\n * = x^13 + x^11 + x^9 + x^8 + x^6 + x^5 + x^4 + x^3 + 1 = y\n * y modulo (x^8 + x^4 + x^3 + x + 1)\n * = x^7 + x^6 + 1.\n *\n * The modular reduction by m(x) guarantees the result will be a binary\n * polynomial of less than degree 8, so that it can fit in a byte.\n *\n * The operation to multiply a binary polynomial b with x (the polynomial\n * x in binary representation is 00000010) is:\n *\n * b_7x^8 + b_6x^7 + b_5x^6 + b_4x^5 + b_3x^4 + b_2x^3 + b_1x^2 + b_0x^1\n *\n * To get GF(b, x) we must reduce that by m(x). If b_7 is 0 (that is the\n * most significant bit is 0 in b) then the result is already reduced. If\n * it is 1, then we can reduce it by subtracting m(x) via an XOR.\n *\n * It follows that multiplication by x (00000010 or 0x02) can be implemented\n * by performing a left shift followed by a conditional bitwise XOR with\n * 0x1b. This operation on bytes is denoted by xtime(). Multiplication by\n * higher powers of x can be implemented by repeated application of xtime().\n *\n * By adding intermediate results, multiplication by any constant can be\n * implemented. For instance:\n *\n * GF(0x57, 0x13) = 0xfe because:\n *\n * xtime(b) = (b & 128) ? (b << 1 ^ 0x11b) : (b << 1)\n *\n * Note: We XOR with 0x11b instead of 0x1b because in javascript our\n * datatype for b can be larger than 1 byte, so a left shift will not\n * automatically eliminate bits that overflow a byte ... by XOR'ing the\n * overflow bit with 1 (the extra one from 0x11b) we zero it out.\n *\n * GF(0x57, 0x02) = xtime(0x57) = 0xae\n * GF(0x57, 0x04) = xtime(0xae) = 0x47\n * GF(0x57, 0x08) = xtime(0x47) = 0x8e\n * GF(0x57, 0x10) = xtime(0x8e) = 0x07\n *\n * GF(0x57, 0x13) = GF(0x57, (0x01 ^ 0x02 ^ 0x10))\n *\n * And by the distributive property (since XOR is addition and GF() is\n * multiplication):\n *\n * = GF(0x57, 0x01) ^ GF(0x57, 0x02) ^ GF(0x57, 0x10)\n * = 0x57 ^ 0xae ^ 0x07\n * = 0xfe.\n */\nfunction initialize() {\n init = true;\n\n /* Populate the Rcon table. These are the values given by\n [x^(i-1),{00},{00},{00}] where x^(i-1) are powers of x (and x = 0x02)\n in the field of GF(2^8), where i starts at 1.\n\n rcon[0] = [0x00, 0x00, 0x00, 0x00]\n rcon[1] = [0x01, 0x00, 0x00, 0x00] 2^(1-1) = 2^0 = 1\n rcon[2] = [0x02, 0x00, 0x00, 0x00] 2^(2-1) = 2^1 = 2\n ...\n rcon[9] = [0x1B, 0x00, 0x00, 0x00] 2^(9-1) = 2^8 = 0x1B\n rcon[10] = [0x36, 0x00, 0x00, 0x00] 2^(10-1) = 2^9 = 0x36\n\n We only store the first byte because it is the only one used.\n */\n rcon = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1B, 0x36];\n\n // compute xtime table which maps i onto GF(i, 0x02)\n var xtime = new Array(256);\n for(var i = 0; i < 128; ++i) {\n xtime[i] = i << 1;\n xtime[i + 128] = (i + 128) << 1 ^ 0x11B;\n }\n\n // compute all other tables\n sbox = new Array(256);\n isbox = new Array(256);\n mix = new Array(4);\n imix = new Array(4);\n for(var i = 0; i < 4; ++i) {\n mix[i] = new Array(256);\n imix[i] = new Array(256);\n }\n var e = 0, ei = 0, e2, e4, e8, sx, sx2, me, ime;\n for(var i = 0; i < 256; ++i) {\n /* We need to generate the SubBytes() sbox and isbox tables so that\n we can perform byte substitutions. This requires us to traverse\n all of the elements in GF, find their multiplicative inverses,\n and apply to each the following affine transformation:\n\n bi' = bi ^ b(i + 4) mod 8 ^ b(i + 5) mod 8 ^ b(i + 6) mod 8 ^\n b(i + 7) mod 8 ^ ci\n for 0 <= i < 8, where bi is the ith bit of the byte, and ci is the\n ith bit of a byte c with the value {63} or {01100011}.\n\n It is possible to traverse every possible value in a Galois field\n using what is referred to as a 'generator'. There are many\n generators (128 out of 256): 3,5,6,9,11,82 to name a few. To fully\n traverse GF we iterate 255 times, multiplying by our generator\n each time.\n\n On each iteration we can determine the multiplicative inverse for\n the current element.\n\n Suppose there is an element in GF 'e'. For a given generator 'g',\n e = g^x. The multiplicative inverse of e is g^(255 - x). It turns\n out that if use the inverse of a generator as another generator\n it will produce all of the corresponding multiplicative inverses\n at the same time. For this reason, we choose 5 as our inverse\n generator because it only requires 2 multiplies and 1 add and its\n inverse, 82, requires relatively few operations as well.\n\n In order to apply the affine transformation, the multiplicative\n inverse 'ei' of 'e' can be repeatedly XOR'd (4 times) with a\n bit-cycling of 'ei'. To do this 'ei' is first stored in 's' and\n 'x'. Then 's' is left shifted and the high bit of 's' is made the\n low bit. The resulting value is stored in 's'. Then 'x' is XOR'd\n with 's' and stored in 'x'. On each subsequent iteration the same\n operation is performed. When 4 iterations are complete, 'x' is\n XOR'd with 'c' (0x63) and the transformed value is stored in 'x'.\n For example:\n\n s = 01000001\n x = 01000001\n\n iteration 1: s = 10000010, x ^= s\n iteration 2: s = 00000101, x ^= s\n iteration 3: s = 00001010, x ^= s\n iteration 4: s = 00010100, x ^= s\n x ^= 0x63\n\n This can be done with a loop where s = (s << 1) | (s >> 7). However,\n it can also be done by using a single 16-bit (in this case 32-bit)\n number 'sx'. Since XOR is an associative operation, we can set 'sx'\n to 'ei' and then XOR it with 'sx' left-shifted 1,2,3, and 4 times.\n The most significant bits will flow into the high 8 bit positions\n and be correctly XOR'd with one another. All that remains will be\n to cycle the high 8 bits by XOR'ing them all with the lower 8 bits\n afterwards.\n\n At the same time we're populating sbox and isbox we can precompute\n the multiplication we'll need to do to do MixColumns() later.\n */\n\n // apply affine transformation\n sx = ei ^ (ei << 1) ^ (ei << 2) ^ (ei << 3) ^ (ei << 4);\n sx = (sx >> 8) ^ (sx & 255) ^ 0x63;\n\n // update tables\n sbox[e] = sx;\n isbox[sx] = e;\n\n /* Mixing columns is done using matrix multiplication. The columns\n that are to be mixed are each a single word in the current state.\n The state has Nb columns (4 columns). Therefore each column is a\n 4 byte word. So to mix the columns in a single column 'c' where\n its rows are r0, r1, r2, and r3, we use the following matrix\n multiplication:\n\n [2 3 1 1]*[r0,c]=[r'0,c]\n [1 2 3 1] [r1,c] [r'1,c]\n [1 1 2 3] [r2,c] [r'2,c]\n [3 1 1 2] [r3,c] [r'3,c]\n\n r0, r1, r2, and r3 are each 1 byte of one of the words in the\n state (a column). To do matrix multiplication for each mixed\n column c' we multiply the corresponding row from the left matrix\n with the corresponding column from the right matrix. In total, we\n get 4 equations:\n\n r0,c' = 2*r0,c + 3*r1,c + 1*r2,c + 1*r3,c\n r1,c' = 1*r0,c + 2*r1,c + 3*r2,c + 1*r3,c\n r2,c' = 1*r0,c + 1*r1,c + 2*r2,c + 3*r3,c\n r3,c' = 3*r0,c + 1*r1,c + 1*r2,c + 2*r3,c\n\n As usual, the multiplication is as previously defined and the\n addition is XOR. In order to optimize mixing columns we can store\n the multiplication results in tables. If you think of the whole\n column as a word (it might help to visualize by mentally rotating\n the equations above by counterclockwise 90 degrees) then you can\n see that it would be useful to map the multiplications performed on\n each byte (r0, r1, r2, r3) onto a word as well. For instance, we\n could map 2*r0,1*r0,1*r0,3*r0 onto a word by storing 2*r0 in the\n highest 8 bits and 3*r0 in the lowest 8 bits (with the other two\n respectively in the middle). This means that a table can be\n constructed that uses r0 as an index to the word. We can do the\n same with r1, r2, and r3, creating a total of 4 tables.\n\n To construct a full c', we can just look up each byte of c in\n their respective tables and XOR the results together.\n\n Also, to build each table we only have to calculate the word\n for 2,1,1,3 for every byte ... which we can do on each iteration\n of this loop since we will iterate over every byte. After we have\n calculated 2,1,1,3 we can get the results for the other tables\n by cycling the byte at the end to the beginning. For instance\n we can take the result of table 2,1,1,3 and produce table 3,2,1,1\n by moving the right most byte to the left most position just like\n how you can imagine the 3 moved out of 2,1,1,3 and to the front\n to produce 3,2,1,1.\n\n There is another optimization in that the same multiples of\n the current element we need in order to advance our generator\n to the next iteration can be reused in performing the 2,1,1,3\n calculation. We also calculate the inverse mix column tables,\n with e,9,d,b being the inverse of 2,1,1,3.\n\n When we're done, and we need to actually mix columns, the first\n byte of each state word should be put through mix[0] (2,1,1,3),\n the second through mix[1] (3,2,1,1) and so forth. Then they should\n be XOR'd together to produce the fully mixed column.\n */\n\n // calculate mix and imix table values\n sx2 = xtime[sx];\n e2 = xtime[e];\n e4 = xtime[e2];\n e8 = xtime[e4];\n me =\n (sx2 << 24) ^ // 2\n (sx << 16) ^ // 1\n (sx << 8) ^ // 1\n (sx ^ sx2); // 3\n ime =\n (e2 ^ e4 ^ e8) << 24 ^ // E (14)\n (e ^ e8) << 16 ^ // 9\n (e ^ e4 ^ e8) << 8 ^ // D (13)\n (e ^ e2 ^ e8); // B (11)\n // produce each of the mix tables by rotating the 2,1,1,3 value\n for(var n = 0; n < 4; ++n) {\n mix[n][e] = me;\n imix[n][sx] = ime;\n // cycle the right most byte to the left most position\n // ie: 2,1,1,3 becomes 3,2,1,1\n me = me << 24 | me >>> 8;\n ime = ime << 24 | ime >>> 8;\n }\n\n // get next element and inverse\n if(e === 0) {\n // 1 is the inverse of 1\n e = ei = 1;\n } else {\n // e = 2e + 2*2*2*(10e)) = multiply e by 82 (chosen generator)\n // ei = ei + 2*2*ei = multiply ei by 5 (inverse generator)\n e = e2 ^ xtime[xtime[xtime[e2 ^ e8]]];\n ei ^= xtime[xtime[ei]];\n }\n }\n}\n\n/**\n * Generates a key schedule using the AES key expansion algorithm.\n *\n * The AES algorithm takes the Cipher Key, K, and performs a Key Expansion\n * routine to generate a key schedule. The Key Expansion generates a total\n * of Nb*(Nr + 1) words: the algorithm requires an initial set of Nb words,\n * and each of the Nr rounds requires Nb words of key data. The resulting\n * key schedule consists of a linear array of 4-byte words, denoted [wi ],\n * with i in the range 0 <= i < Nb(Nr + 1).\n *\n * KeyExpansion(byte key[4*Nk], word w[Nb*(Nr+1)], Nk)\n * AES-128 (Nb=4, Nk=4, Nr=10)\n * AES-192 (Nb=4, Nk=6, Nr=12)\n * AES-256 (Nb=4, Nk=8, Nr=14)\n * Note: Nr=Nk+6.\n *\n * Nb is the number of columns (32-bit words) comprising the State (or\n * number of bytes in a block). For AES, Nb=4.\n *\n * @param key the key to schedule (as an array of 32-bit words).\n * @param decrypt true to modify the key schedule to decrypt, false not to.\n *\n * @return the generated key schedule.\n */\nfunction _expandKey(key, decrypt) {\n // copy the key's words to initialize the key schedule\n var w = key.slice(0);\n\n /* RotWord() will rotate a word, moving the first byte to the last\n byte's position (shifting the other bytes left).\n\n We will be getting the value of Rcon at i / Nk. 'i' will iterate\n from Nk to (Nb * Nr+1). Nk = 4 (4 byte key), Nb = 4 (4 words in\n a block), Nr = Nk + 6 (10). Therefore 'i' will iterate from\n 4 to 44 (exclusive). Each time we iterate 4 times, i / Nk will\n increase by 1. We use a counter iNk to keep track of this.\n */\n\n // go through the rounds expanding the key\n var temp, iNk = 1;\n var Nk = w.length;\n var Nr1 = Nk + 6 + 1;\n var end = Nb * Nr1;\n for(var i = Nk; i < end; ++i) {\n temp = w[i - 1];\n if(i % Nk === 0) {\n // temp = SubWord(RotWord(temp)) ^ Rcon[i / Nk]\n temp =\n sbox[temp >>> 16 & 255] << 24 ^\n sbox[temp >>> 8 & 255] << 16 ^\n sbox[temp & 255] << 8 ^\n sbox[temp >>> 24] ^ (rcon[iNk] << 24);\n iNk++;\n } else if(Nk > 6 && (i % Nk === 4)) {\n // temp = SubWord(temp)\n temp =\n sbox[temp >>> 24] << 24 ^\n sbox[temp >>> 16 & 255] << 16 ^\n sbox[temp >>> 8 & 255] << 8 ^\n sbox[temp & 255];\n }\n w[i] = w[i - Nk] ^ temp;\n }\n\n /* When we are updating a cipher block we always use the code path for\n encryption whether we are decrypting or not (to shorten code and\n simplify the generation of look up tables). However, because there\n are differences in the decryption algorithm, other than just swapping\n in different look up tables, we must transform our key schedule to\n account for these changes:\n\n 1. The decryption algorithm gets its key rounds in reverse order.\n 2. The decryption algorithm adds the round key before mixing columns\n instead of afterwards.\n\n We don't need to modify our key schedule to handle the first case,\n we can just traverse the key schedule in reverse order when decrypting.\n\n The second case requires a little work.\n\n The tables we built for performing rounds will take an input and then\n perform SubBytes() and MixColumns() or, for the decrypt version,\n InvSubBytes() and InvMixColumns(). But the decrypt algorithm requires\n us to AddRoundKey() before InvMixColumns(). This means we'll need to\n apply some transformations to the round key to inverse-mix its columns\n so they'll be correct for moving AddRoundKey() to after the state has\n had its columns inverse-mixed.\n\n To inverse-mix the columns of the state when we're decrypting we use a\n lookup table that will apply InvSubBytes() and InvMixColumns() at the\n same time. However, the round key's bytes are not inverse-substituted\n in the decryption algorithm. To get around this problem, we can first\n substitute the bytes in the round key so that when we apply the\n transformation via the InvSubBytes()+InvMixColumns() table, it will\n undo our substitution leaving us with the original value that we\n want -- and then inverse-mix that value.\n\n This change will correctly alter our key schedule so that we can XOR\n each round key with our already transformed decryption state. This\n allows us to use the same code path as the encryption algorithm.\n\n We make one more change to the decryption key. Since the decryption\n algorithm runs in reverse from the encryption algorithm, we reverse\n the order of the round keys to avoid having to iterate over the key\n schedule backwards when running the encryption algorithm later in\n decryption mode. In addition to reversing the order of the round keys,\n we also swap each round key's 2nd and 4th rows. See the comments\n section where rounds are performed for more details about why this is\n done. These changes are done inline with the other substitution\n described above.\n */\n if(decrypt) {\n var tmp;\n var m0 = imix[0];\n var m1 = imix[1];\n var m2 = imix[2];\n var m3 = imix[3];\n var wnew = w.slice(0);\n end = w.length;\n for(var i = 0, wi = end - Nb; i < end; i += Nb, wi -= Nb) {\n // do not sub the first or last round key (round keys are Nb\n // words) as no column mixing is performed before they are added,\n // but do change the key order\n if(i === 0 || i === (end - Nb)) {\n wnew[i] = w[wi];\n wnew[i + 1] = w[wi + 3];\n wnew[i + 2] = w[wi + 2];\n wnew[i + 3] = w[wi + 1];\n } else {\n // substitute each round key byte because the inverse-mix\n // table will inverse-substitute it (effectively cancel the\n // substitution because round key bytes aren't sub'd in\n // decryption mode) and swap indexes 3 and 1\n for(var n = 0; n < Nb; ++n) {\n tmp = w[wi + n];\n wnew[i + (3&-n)] =\n m0[sbox[tmp >>> 24]] ^\n m1[sbox[tmp >>> 16 & 255]] ^\n m2[sbox[tmp >>> 8 & 255]] ^\n m3[sbox[tmp & 255]];\n }\n }\n }\n w = wnew;\n }\n\n return w;\n}\n\n/**\n * Updates a single block (16 bytes) using AES. The update will either\n * encrypt or decrypt the block.\n *\n * @param w the key schedule.\n * @param input the input block (an array of 32-bit words).\n * @param output the updated output block.\n * @param decrypt true to decrypt the block, false to encrypt it.\n */\nfunction _updateBlock(w, input, output, decrypt) {\n /*\n Cipher(byte in[4*Nb], byte out[4*Nb], word w[Nb*(Nr+1)])\n begin\n byte state[4,Nb]\n state = in\n AddRoundKey(state, w[0, Nb-1])\n for round = 1 step 1 to Nr-1\n SubBytes(state)\n ShiftRows(state)\n MixColumns(state)\n AddRoundKey(state, w[round*Nb, (round+1)*Nb-1])\n end for\n SubBytes(state)\n ShiftRows(state)\n AddRoundKey(state, w[Nr*Nb, (Nr+1)*Nb-1])\n out = state\n end\n\n InvCipher(byte in[4*Nb], byte out[4*Nb], word w[Nb*(Nr+1)])\n begin\n byte state[4,Nb]\n state = in\n AddRoundKey(state, w[Nr*Nb, (Nr+1)*Nb-1])\n for round = Nr-1 step -1 downto 1\n InvShiftRows(state)\n InvSubBytes(state)\n AddRoundKey(state, w[round*Nb, (round+1)*Nb-1])\n InvMixColumns(state)\n end for\n InvShiftRows(state)\n InvSubBytes(state)\n AddRoundKey(state, w[0, Nb-1])\n out = state\n end\n */\n\n // Encrypt: AddRoundKey(state, w[0, Nb-1])\n // Decrypt: AddRoundKey(state, w[Nr*Nb, (Nr+1)*Nb-1])\n var Nr = w.length / 4 - 1;\n var m0, m1, m2, m3, sub;\n if(decrypt) {\n m0 = imix[0];\n m1 = imix[1];\n m2 = imix[2];\n m3 = imix[3];\n sub = isbox;\n } else {\n m0 = mix[0];\n m1 = mix[1];\n m2 = mix[2];\n m3 = mix[3];\n sub = sbox;\n }\n var a, b, c, d, a2, b2, c2;\n a = input[0] ^ w[0];\n b = input[decrypt ? 3 : 1] ^ w[1];\n c = input[2] ^ w[2];\n d = input[decrypt ? 1 : 3] ^ w[3];\n var i = 3;\n\n /* In order to share code we follow the encryption algorithm when both\n encrypting and decrypting. To account for the changes required in the\n decryption algorithm, we use different lookup tables when decrypting\n and use a modified key schedule to account for the difference in the\n order of transformations applied when performing rounds. We also get\n key rounds in reverse order (relative to encryption). */\n for(var round = 1; round < Nr; ++round) {\n /* As described above, we'll be using table lookups to perform the\n column mixing. Each column is stored as a word in the state (the\n array 'input' has one column as a word at each index). In order to\n mix a column, we perform these transformations on each row in c,\n which is 1 byte in each word. The new column for c0 is c'0:\n\n m0 m1 m2 m3\n r0,c'0 = 2*r0,c0 + 3*r1,c0 + 1*r2,c0 + 1*r3,c0\n r1,c'0 = 1*r0,c0 + 2*r1,c0 + 3*r2,c0 + 1*r3,c0\n r2,c'0 = 1*r0,c0 + 1*r1,c0 + 2*r2,c0 + 3*r3,c0\n r3,c'0 = 3*r0,c0 + 1*r1,c0 + 1*r2,c0 + 2*r3,c0\n\n So using mix tables where c0 is a word with r0 being its upper\n 8 bits and r3 being its lower 8 bits:\n\n m0[c0 >> 24] will yield this word: [2*r0,1*r0,1*r0,3*r0]\n ...\n m3[c0 & 255] will yield this word: [1*r3,1*r3,3*r3,2*r3]\n\n Therefore to mix the columns in each word in the state we\n do the following (& 255 omitted for brevity):\n c'0,r0 = m0[c0 >> 24] ^ m1[c1 >> 16] ^ m2[c2 >> 8] ^ m3[c3]\n c'0,r1 = m0[c0 >> 24] ^ m1[c1 >> 16] ^ m2[c2 >> 8] ^ m3[c3]\n c'0,r2 = m0[c0 >> 24] ^ m1[c1 >> 16] ^ m2[c2 >> 8] ^ m3[c3]\n c'0,r3 = m0[c0 >> 24] ^ m1[c1 >> 16] ^ m2[c2 >> 8] ^ m3[c3]\n\n However, before mixing, the algorithm requires us to perform\n ShiftRows(). The ShiftRows() transformation cyclically shifts the\n last 3 rows of the state over different offsets. The first row\n (r = 0) is not shifted.\n\n s'_r,c = s_r,(c + shift(r, Nb) mod Nb\n for 0 < r < 4 and 0 <= c < Nb and\n shift(1, 4) = 1\n shift(2, 4) = 2\n shift(3, 4) = 3.\n\n This causes the first byte in r = 1 to be moved to the end of\n the row, the first 2 bytes in r = 2 to be moved to the end of\n the row, the first 3 bytes in r = 3 to be moved to the end of\n the row:\n\n r1: [c0 c1 c2 c3] => [c1 c2 c3 c0]\n r2: [c0 c1 c2 c3] [c2 c3 c0 c1]\n r3: [c0 c1 c2 c3] [c3 c0 c1 c2]\n\n We can make these substitutions inline with our column mixing to\n generate an updated set of equations to produce each word in the\n state (note the columns have changed positions):\n\n c0 c1 c2 c3 => c0 c1 c2 c3\n c0 c1 c2 c3 c1 c2 c3 c0 (cycled 1 byte)\n c0 c1 c2 c3 c2 c3 c0 c1 (cycled 2 bytes)\n c0 c1 c2 c3 c3 c0 c1 c2 (cycled 3 bytes)\n\n Therefore:\n\n c'0 = 2*r0,c0 + 3*r1,c1 + 1*r2,c2 + 1*r3,c3\n c'0 = 1*r0,c0 + 2*r1,c1 + 3*r2,c2 + 1*r3,c3\n c'0 = 1*r0,c0 + 1*r1,c1 + 2*r2,c2 + 3*r3,c3\n c'0 = 3*r0,c0 + 1*r1,c1 + 1*r2,c2 + 2*r3,c3\n\n c'1 = 2*r0,c1 + 3*r1,c2 + 1*r2,c3 + 1*r3,c0\n c'1 = 1*r0,c1 + 2*r1,c2 + 3*r2,c3 + 1*r3,c0\n c'1 = 1*r0,c1 + 1*r1,c2 + 2*r2,c3 + 3*r3,c0\n c'1 = 3*r0,c1 + 1*r1,c2 + 1*r2,c3 + 2*r3,c0\n\n ... and so forth for c'2 and c'3. The important distinction is\n that the columns are cycling, with c0 being used with the m0\n map when calculating c0, but c1 being used with the m0 map when\n calculating c1 ... and so forth.\n\n When performing the inverse we transform the mirror image and\n skip the bottom row, instead of the top one, and move upwards:\n\n c3 c2 c1 c0 => c0 c3 c2 c1 (cycled 3 bytes) *same as encryption\n c3 c2 c1 c0 c1 c0 c3 c2 (cycled 2 bytes)\n c3 c2 c1 c0 c2 c1 c0 c3 (cycled 1 byte) *same as encryption\n c3 c2 c1 c0 c3 c2 c1 c0\n\n If you compare the resulting matrices for ShiftRows()+MixColumns()\n and for InvShiftRows()+InvMixColumns() the 2nd and 4th columns are\n different (in encrypt mode vs. decrypt mode). So in order to use\n the same code to handle both encryption and decryption, we will\n need to do some mapping.\n\n If in encryption mode we let a=c0, b=c1, c=c2, d=c3, and r be\n a row number in the state, then the resulting matrix in encryption\n mode for applying the above transformations would be:\n\n r1: a b c d\n r2: b c d a\n r3: c d a b\n r4: d a b c\n\n If we did the same in decryption mode we would get:\n\n r1: a d c b\n r2: b a d c\n r3: c b a d\n r4: d c b a\n\n If instead we swap d and b (set b=c3 and d=c1), then we get:\n\n r1: a b c d\n r2: d a b c\n r3: c d a b\n r4: b c d a\n\n Now the 1st and 3rd rows are the same as the encryption matrix. All\n we need to do then to make the mapping exactly the same is to swap\n the 2nd and 4th rows when in decryption mode. To do this without\n having to do it on each iteration, we swapped the 2nd and 4th rows\n in the decryption key schedule. We also have to do the swap above\n when we first pull in the input and when we set the final output. */\n a2 =\n m0[a >>> 24] ^\n m1[b >>> 16 & 255] ^\n m2[c >>> 8 & 255] ^\n m3[d & 255] ^ w[++i];\n b2 =\n m0[b >>> 24] ^\n m1[c >>> 16 & 255] ^\n m2[d >>> 8 & 255] ^\n m3[a & 255] ^ w[++i];\n c2 =\n m0[c >>> 24] ^\n m1[d >>> 16 & 255] ^\n m2[a >>> 8 & 255] ^\n m3[b & 255] ^ w[++i];\n d =\n m0[d >>> 24] ^\n m1[a >>> 16 & 255] ^\n m2[b >>> 8 & 255] ^\n m3[c & 255] ^ w[++i];\n a = a2;\n b = b2;\n c = c2;\n }\n\n /*\n Encrypt:\n SubBytes(state)\n ShiftRows(state)\n AddRoundKey(state, w[Nr*Nb, (Nr+1)*Nb-1])\n\n Decrypt:\n InvShiftRows(state)\n InvSubBytes(state)\n AddRoundKey(state, w[0, Nb-1])\n */\n // Note: rows are shifted inline\n output[0] =\n (sub[a >>> 24] << 24) ^\n (sub[b >>> 16 & 255] << 16) ^\n (sub[c >>> 8 & 255] << 8) ^\n (sub[d & 255]) ^ w[++i];\n output[decrypt ? 3 : 1] =\n (sub[b >>> 24] << 24) ^\n (sub[c >>> 16 & 255] << 16) ^\n (sub[d >>> 8 & 255] << 8) ^\n (sub[a & 255]) ^ w[++i];\n output[2] =\n (sub[c >>> 24] << 24) ^\n (sub[d >>> 16 & 255] << 16) ^\n (sub[a >>> 8 & 255] << 8) ^\n (sub[b & 255]) ^ w[++i];\n output[decrypt ? 1 : 3] =\n (sub[d >>> 24] << 24) ^\n (sub[a >>> 16 & 255] << 16) ^\n (sub[b >>> 8 & 255] << 8) ^\n (sub[c & 255]) ^ w[++i];\n}\n\n/**\n * Deprecated. Instead, use:\n *\n * forge.cipher.createCipher('AES-', key);\n * forge.cipher.createDecipher('AES-', key);\n *\n * Creates a deprecated AES cipher object. This object's mode will default to\n * CBC (cipher-block-chaining).\n *\n * The key and iv may be given as a string of bytes, an array of bytes, a\n * byte buffer, or an array of 32-bit words.\n *\n * @param options the options to use.\n * key the symmetric key to use.\n * output the buffer to write to.\n * decrypt true for decryption, false for encryption.\n * mode the cipher mode to use (default: 'CBC').\n *\n * @return the cipher.\n */\nfunction _createCipher(options) {\n options = options || {};\n var mode = (options.mode || 'CBC').toUpperCase();\n var algorithm = 'AES-' + mode;\n\n var cipher;\n if(options.decrypt) {\n cipher = forge.cipher.createDecipher(algorithm, options.key);\n } else {\n cipher = forge.cipher.createCipher(algorithm, options.key);\n }\n\n // backwards compatible start API\n var start = cipher.start;\n cipher.start = function(iv, options) {\n // backwards compatibility: support second arg as output buffer\n var output = null;\n if(options instanceof forge.util.ByteBuffer) {\n output = options;\n options = {};\n }\n options = options || {};\n options.output = output;\n options.iv = iv;\n start.call(cipher, options);\n };\n\n return cipher;\n}\n","/**\n * Object IDs for ASN.1.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2010-2013 Digital Bazaar, Inc.\n */\nvar forge = require('./forge');\n\nforge.pki = forge.pki || {};\nvar oids = module.exports = forge.pki.oids = forge.oids = forge.oids || {};\n\n// set id to name mapping and name to id mapping\nfunction _IN(id, name) {\n oids[id] = name;\n oids[name] = id;\n}\n// set id to name mapping only\nfunction _I_(id, name) {\n oids[id] = name;\n}\n\n// algorithm OIDs\n_IN('1.2.840.113549.1.1.1', 'rsaEncryption');\n// Note: md2 & md4 not implemented\n//_IN('1.2.840.113549.1.1.2', 'md2WithRSAEncryption');\n//_IN('1.2.840.113549.1.1.3', 'md4WithRSAEncryption');\n_IN('1.2.840.113549.1.1.4', 'md5WithRSAEncryption');\n_IN('1.2.840.113549.1.1.5', 'sha1WithRSAEncryption');\n_IN('1.2.840.113549.1.1.7', 'RSAES-OAEP');\n_IN('1.2.840.113549.1.1.8', 'mgf1');\n_IN('1.2.840.113549.1.1.9', 'pSpecified');\n_IN('1.2.840.113549.1.1.10', 'RSASSA-PSS');\n_IN('1.2.840.113549.1.1.11', 'sha256WithRSAEncryption');\n_IN('1.2.840.113549.1.1.12', 'sha384WithRSAEncryption');\n_IN('1.2.840.113549.1.1.13', 'sha512WithRSAEncryption');\n// Edwards-curve Digital Signature Algorithm (EdDSA) Ed25519\n_IN('1.3.101.112', 'EdDSA25519');\n\n_IN('1.2.840.10040.4.3', 'dsa-with-sha1');\n\n_IN('1.3.14.3.2.7', 'desCBC');\n\n_IN('1.3.14.3.2.26', 'sha1');\n// Deprecated equivalent of sha1WithRSAEncryption\n_IN('1.3.14.3.2.29', 'sha1WithRSASignature');\n_IN('2.16.840.1.101.3.4.2.1', 'sha256');\n_IN('2.16.840.1.101.3.4.2.2', 'sha384');\n_IN('2.16.840.1.101.3.4.2.3', 'sha512');\n_IN('2.16.840.1.101.3.4.2.4', 'sha224');\n_IN('2.16.840.1.101.3.4.2.5', 'sha512-224');\n_IN('2.16.840.1.101.3.4.2.6', 'sha512-256');\n_IN('1.2.840.113549.2.2', 'md2');\n_IN('1.2.840.113549.2.5', 'md5');\n\n// pkcs#7 content types\n_IN('1.2.840.113549.1.7.1', 'data');\n_IN('1.2.840.113549.1.7.2', 'signedData');\n_IN('1.2.840.113549.1.7.3', 'envelopedData');\n_IN('1.2.840.113549.1.7.4', 'signedAndEnvelopedData');\n_IN('1.2.840.113549.1.7.5', 'digestedData');\n_IN('1.2.840.113549.1.7.6', 'encryptedData');\n\n// pkcs#9 oids\n_IN('1.2.840.113549.1.9.1', 'emailAddress');\n_IN('1.2.840.113549.1.9.2', 'unstructuredName');\n_IN('1.2.840.113549.1.9.3', 'contentType');\n_IN('1.2.840.113549.1.9.4', 'messageDigest');\n_IN('1.2.840.113549.1.9.5', 'signingTime');\n_IN('1.2.840.113549.1.9.6', 'counterSignature');\n_IN('1.2.840.113549.1.9.7', 'challengePassword');\n_IN('1.2.840.113549.1.9.8', 'unstructuredAddress');\n_IN('1.2.840.113549.1.9.14', 'extensionRequest');\n\n_IN('1.2.840.113549.1.9.20', 'friendlyName');\n_IN('1.2.840.113549.1.9.21', 'localKeyId');\n_IN('1.2.840.113549.1.9.22.1', 'x509Certificate');\n\n// pkcs#12 safe bags\n_IN('1.2.840.113549.1.12.10.1.1', 'keyBag');\n_IN('1.2.840.113549.1.12.10.1.2', 'pkcs8ShroudedKeyBag');\n_IN('1.2.840.113549.1.12.10.1.3', 'certBag');\n_IN('1.2.840.113549.1.12.10.1.4', 'crlBag');\n_IN('1.2.840.113549.1.12.10.1.5', 'secretBag');\n_IN('1.2.840.113549.1.12.10.1.6', 'safeContentsBag');\n\n// password-based-encryption for pkcs#12\n_IN('1.2.840.113549.1.5.13', 'pkcs5PBES2');\n_IN('1.2.840.113549.1.5.12', 'pkcs5PBKDF2');\n\n_IN('1.2.840.113549.1.12.1.1', 'pbeWithSHAAnd128BitRC4');\n_IN('1.2.840.113549.1.12.1.2', 'pbeWithSHAAnd40BitRC4');\n_IN('1.2.840.113549.1.12.1.3', 'pbeWithSHAAnd3-KeyTripleDES-CBC');\n_IN('1.2.840.113549.1.12.1.4', 'pbeWithSHAAnd2-KeyTripleDES-CBC');\n_IN('1.2.840.113549.1.12.1.5', 'pbeWithSHAAnd128BitRC2-CBC');\n_IN('1.2.840.113549.1.12.1.6', 'pbewithSHAAnd40BitRC2-CBC');\n\n// hmac OIDs\n_IN('1.2.840.113549.2.7', 'hmacWithSHA1');\n_IN('1.2.840.113549.2.8', 'hmacWithSHA224');\n_IN('1.2.840.113549.2.9', 'hmacWithSHA256');\n_IN('1.2.840.113549.2.10', 'hmacWithSHA384');\n_IN('1.2.840.113549.2.11', 'hmacWithSHA512');\n\n// symmetric key algorithm oids\n_IN('1.2.840.113549.3.7', 'des-EDE3-CBC');\n_IN('2.16.840.1.101.3.4.1.2', 'aes128-CBC');\n_IN('2.16.840.1.101.3.4.1.22', 'aes192-CBC');\n_IN('2.16.840.1.101.3.4.1.42', 'aes256-CBC');\n\n// certificate issuer/subject OIDs\n_IN('2.5.4.3', 'commonName');\n_IN('2.5.4.4', 'surname');\n_IN('2.5.4.5', 'serialNumber');\n_IN('2.5.4.6', 'countryName');\n_IN('2.5.4.7', 'localityName');\n_IN('2.5.4.8', 'stateOrProvinceName');\n_IN('2.5.4.9', 'streetAddress');\n_IN('2.5.4.10', 'organizationName');\n_IN('2.5.4.11', 'organizationalUnitName');\n_IN('2.5.4.12', 'title');\n_IN('2.5.4.13', 'description');\n_IN('2.5.4.15', 'businessCategory');\n_IN('2.5.4.17', 'postalCode');\n_IN('2.5.4.42', 'givenName');\n_IN('1.3.6.1.4.1.311.60.2.1.2', 'jurisdictionOfIncorporationStateOrProvinceName');\n_IN('1.3.6.1.4.1.311.60.2.1.3', 'jurisdictionOfIncorporationCountryName');\n\n// X.509 extension OIDs\n_IN('2.16.840.1.113730.1.1', 'nsCertType');\n_IN('2.16.840.1.113730.1.13', 'nsComment'); // deprecated in theory; still widely used\n_I_('2.5.29.1', 'authorityKeyIdentifier'); // deprecated, use .35\n_I_('2.5.29.2', 'keyAttributes'); // obsolete use .37 or .15\n_I_('2.5.29.3', 'certificatePolicies'); // deprecated, use .32\n_I_('2.5.29.4', 'keyUsageRestriction'); // obsolete use .37 or .15\n_I_('2.5.29.5', 'policyMapping'); // deprecated use .33\n_I_('2.5.29.6', 'subtreesConstraint'); // obsolete use .30\n_I_('2.5.29.7', 'subjectAltName'); // deprecated use .17\n_I_('2.5.29.8', 'issuerAltName'); // deprecated use .18\n_I_('2.5.29.9', 'subjectDirectoryAttributes');\n_I_('2.5.29.10', 'basicConstraints'); // deprecated use .19\n_I_('2.5.29.11', 'nameConstraints'); // deprecated use .30\n_I_('2.5.29.12', 'policyConstraints'); // deprecated use .36\n_I_('2.5.29.13', 'basicConstraints'); // deprecated use .19\n_IN('2.5.29.14', 'subjectKeyIdentifier');\n_IN('2.5.29.15', 'keyUsage');\n_I_('2.5.29.16', 'privateKeyUsagePeriod');\n_IN('2.5.29.17', 'subjectAltName');\n_IN('2.5.29.18', 'issuerAltName');\n_IN('2.5.29.19', 'basicConstraints');\n_I_('2.5.29.20', 'cRLNumber');\n_I_('2.5.29.21', 'cRLReason');\n_I_('2.5.29.22', 'expirationDate');\n_I_('2.5.29.23', 'instructionCode');\n_I_('2.5.29.24', 'invalidityDate');\n_I_('2.5.29.25', 'cRLDistributionPoints'); // deprecated use .31\n_I_('2.5.29.26', 'issuingDistributionPoint'); // deprecated use .28\n_I_('2.5.29.27', 'deltaCRLIndicator');\n_I_('2.5.29.28', 'issuingDistributionPoint');\n_I_('2.5.29.29', 'certificateIssuer');\n_I_('2.5.29.30', 'nameConstraints');\n_IN('2.5.29.31', 'cRLDistributionPoints');\n_IN('2.5.29.32', 'certificatePolicies');\n_I_('2.5.29.33', 'policyMappings');\n_I_('2.5.29.34', 'policyConstraints'); // deprecated use .36\n_IN('2.5.29.35', 'authorityKeyIdentifier');\n_I_('2.5.29.36', 'policyConstraints');\n_IN('2.5.29.37', 'extKeyUsage');\n_I_('2.5.29.46', 'freshestCRL');\n_I_('2.5.29.54', 'inhibitAnyPolicy');\n\n// extKeyUsage purposes\n_IN('1.3.6.1.4.1.11129.2.4.2', 'timestampList');\n_IN('1.3.6.1.5.5.7.1.1', 'authorityInfoAccess');\n_IN('1.3.6.1.5.5.7.3.1', 'serverAuth');\n_IN('1.3.6.1.5.5.7.3.2', 'clientAuth');\n_IN('1.3.6.1.5.5.7.3.3', 'codeSigning');\n_IN('1.3.6.1.5.5.7.3.4', 'emailProtection');\n_IN('1.3.6.1.5.5.7.3.8', 'timeStamping');\n","/**\n * Javascript implementation of Abstract Syntax Notation Number One.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2010-2015 Digital Bazaar, Inc.\n *\n * An API for storing data using the Abstract Syntax Notation Number One\n * format using DER (Distinguished Encoding Rules) encoding. This encoding is\n * commonly used to store data for PKI, i.e. X.509 Certificates, and this\n * implementation exists for that purpose.\n *\n * Abstract Syntax Notation Number One (ASN.1) is used to define the abstract\n * syntax of information without restricting the way the information is encoded\n * for transmission. It provides a standard that allows for open systems\n * communication. ASN.1 defines the syntax of information data and a number of\n * simple data types as well as a notation for describing them and specifying\n * values for them.\n *\n * The RSA algorithm creates public and private keys that are often stored in\n * X.509 or PKCS#X formats -- which use ASN.1 (encoded in DER format). This\n * class provides the most basic functionality required to store and load DSA\n * keys that are encoded according to ASN.1.\n *\n * The most common binary encodings for ASN.1 are BER (Basic Encoding Rules)\n * and DER (Distinguished Encoding Rules). DER is just a subset of BER that\n * has stricter requirements for how data must be encoded.\n *\n * Each ASN.1 structure has a tag (a byte identifying the ASN.1 structure type)\n * and a byte array for the value of this ASN1 structure which may be data or a\n * list of ASN.1 structures.\n *\n * Each ASN.1 structure using BER is (Tag-Length-Value):\n *\n * | byte 0 | bytes X | bytes Y |\n * |--------|---------|----------\n * | tag | length | value |\n *\n * ASN.1 allows for tags to be of \"High-tag-number form\" which allows a tag to\n * be two or more octets, but that is not supported by this class. A tag is\n * only 1 byte. Bits 1-5 give the tag number (ie the data type within a\n * particular 'class'), 6 indicates whether or not the ASN.1 value is\n * constructed from other ASN.1 values, and bits 7 and 8 give the 'class'. If\n * bits 7 and 8 are both zero, the class is UNIVERSAL. If only bit 7 is set,\n * then the class is APPLICATION. If only bit 8 is set, then the class is\n * CONTEXT_SPECIFIC. If both bits 7 and 8 are set, then the class is PRIVATE.\n * The tag numbers for the data types for the class UNIVERSAL are listed below:\n *\n * UNIVERSAL 0 Reserved for use by the encoding rules\n * UNIVERSAL 1 Boolean type\n * UNIVERSAL 2 Integer type\n * UNIVERSAL 3 Bitstring type\n * UNIVERSAL 4 Octetstring type\n * UNIVERSAL 5 Null type\n * UNIVERSAL 6 Object identifier type\n * UNIVERSAL 7 Object descriptor type\n * UNIVERSAL 8 External type and Instance-of type\n * UNIVERSAL 9 Real type\n * UNIVERSAL 10 Enumerated type\n * UNIVERSAL 11 Embedded-pdv type\n * UNIVERSAL 12 UTF8String type\n * UNIVERSAL 13 Relative object identifier type\n * UNIVERSAL 14-15 Reserved for future editions\n * UNIVERSAL 16 Sequence and Sequence-of types\n * UNIVERSAL 17 Set and Set-of types\n * UNIVERSAL 18-22, 25-30 Character string types\n * UNIVERSAL 23-24 Time types\n *\n * The length of an ASN.1 structure is specified after the tag identifier.\n * There is a definite form and an indefinite form. The indefinite form may\n * be used if the encoding is constructed and not all immediately available.\n * The indefinite form is encoded using a length byte with only the 8th bit\n * set. The end of the constructed object is marked using end-of-contents\n * octets (two zero bytes).\n *\n * The definite form looks like this:\n *\n * The length may take up 1 or more bytes, it depends on the length of the\n * value of the ASN.1 structure. DER encoding requires that if the ASN.1\n * structure has a value that has a length greater than 127, more than 1 byte\n * will be used to store its length, otherwise just one byte will be used.\n * This is strict.\n *\n * In the case that the length of the ASN.1 value is less than 127, 1 octet\n * (byte) is used to store the \"short form\" length. The 8th bit has a value of\n * 0 indicating the length is \"short form\" and not \"long form\" and bits 7-1\n * give the length of the data. (The 8th bit is the left-most, most significant\n * bit: also known as big endian or network format).\n *\n * In the case that the length of the ASN.1 value is greater than 127, 2 to\n * 127 octets (bytes) are used to store the \"long form\" length. The first\n * byte's 8th bit is set to 1 to indicate the length is \"long form.\" Bits 7-1\n * give the number of additional octets. All following octets are in base 256\n * with the most significant digit first (typical big-endian binary unsigned\n * integer storage). So, for instance, if the length of a value was 257, the\n * first byte would be set to:\n *\n * 10000010 = 130 = 0x82.\n *\n * This indicates there are 2 octets (base 256) for the length. The second and\n * third bytes (the octets just mentioned) would store the length in base 256:\n *\n * octet 2: 00000001 = 1 * 256^1 = 256\n * octet 3: 00000001 = 1 * 256^0 = 1\n * total = 257\n *\n * The algorithm for converting a js integer value of 257 to base-256 is:\n *\n * var value = 257;\n * var bytes = [];\n * bytes[0] = (value >>> 8) & 0xFF; // most significant byte first\n * bytes[1] = value & 0xFF; // least significant byte last\n *\n * On the ASN.1 UNIVERSAL Object Identifier (OID) type:\n *\n * An OID can be written like: \"value1.value2.value3...valueN\"\n *\n * The DER encoding rules:\n *\n * The first byte has the value 40 * value1 + value2.\n * The following bytes, if any, encode the remaining values. Each value is\n * encoded in base 128, most significant digit first (big endian), with as\n * few digits as possible, and the most significant bit of each byte set\n * to 1 except the last in each value's encoding. For example: Given the\n * OID \"1.2.840.113549\", its DER encoding is (remember each byte except the\n * last one in each encoding is OR'd with 0x80):\n *\n * byte 1: 40 * 1 + 2 = 42 = 0x2A.\n * bytes 2-3: 128 * 6 + 72 = 840 = 6 72 = 6 72 = 0x0648 = 0x8648\n * bytes 4-6: 16384 * 6 + 128 * 119 + 13 = 6 119 13 = 0x06770D = 0x86F70D\n *\n * The final value is: 0x2A864886F70D.\n * The full OID (including ASN.1 tag and length of 6 bytes) is:\n * 0x06062A864886F70D\n */\nvar forge = require('./forge');\nrequire('./util');\nrequire('./oids');\n\n/* ASN.1 API */\nvar asn1 = module.exports = forge.asn1 = forge.asn1 || {};\n\n/**\n * ASN.1 classes.\n */\nasn1.Class = {\n UNIVERSAL: 0x00,\n APPLICATION: 0x40,\n CONTEXT_SPECIFIC: 0x80,\n PRIVATE: 0xC0\n};\n\n/**\n * ASN.1 types. Not all types are supported by this implementation, only\n * those necessary to implement a simple PKI are implemented.\n */\nasn1.Type = {\n NONE: 0,\n BOOLEAN: 1,\n INTEGER: 2,\n BITSTRING: 3,\n OCTETSTRING: 4,\n NULL: 5,\n OID: 6,\n ODESC: 7,\n EXTERNAL: 8,\n REAL: 9,\n ENUMERATED: 10,\n EMBEDDED: 11,\n UTF8: 12,\n ROID: 13,\n SEQUENCE: 16,\n SET: 17,\n PRINTABLESTRING: 19,\n IA5STRING: 22,\n UTCTIME: 23,\n GENERALIZEDTIME: 24,\n BMPSTRING: 30\n};\n\n/**\n * Creates a new asn1 object.\n *\n * @param tagClass the tag class for the object.\n * @param type the data type (tag number) for the object.\n * @param constructed true if the asn1 object is in constructed form.\n * @param value the value for the object, if it is not constructed.\n * @param [options] the options to use:\n * [bitStringContents] the plain BIT STRING content including padding\n * byte.\n *\n * @return the asn1 object.\n */\nasn1.create = function(tagClass, type, constructed, value, options) {\n /* An asn1 object has a tagClass, a type, a constructed flag, and a\n value. The value's type depends on the constructed flag. If\n constructed, it will contain a list of other asn1 objects. If not,\n it will contain the ASN.1 value as an array of bytes formatted\n according to the ASN.1 data type. */\n\n // remove undefined values\n if(forge.util.isArray(value)) {\n var tmp = [];\n for(var i = 0; i < value.length; ++i) {\n if(value[i] !== undefined) {\n tmp.push(value[i]);\n }\n }\n value = tmp;\n }\n\n var obj = {\n tagClass: tagClass,\n type: type,\n constructed: constructed,\n composed: constructed || forge.util.isArray(value),\n value: value\n };\n if(options && 'bitStringContents' in options) {\n // TODO: copy byte buffer if it's a buffer not a string\n obj.bitStringContents = options.bitStringContents;\n // TODO: add readonly flag to avoid this overhead\n // save copy to detect changes\n obj.original = asn1.copy(obj);\n }\n return obj;\n};\n\n/**\n * Copies an asn1 object.\n *\n * @param obj the asn1 object.\n * @param [options] copy options:\n * [excludeBitStringContents] true to not copy bitStringContents\n *\n * @return the a copy of the asn1 object.\n */\nasn1.copy = function(obj, options) {\n var copy;\n\n if(forge.util.isArray(obj)) {\n copy = [];\n for(var i = 0; i < obj.length; ++i) {\n copy.push(asn1.copy(obj[i], options));\n }\n return copy;\n }\n\n if(typeof obj === 'string') {\n // TODO: copy byte buffer if it's a buffer not a string\n return obj;\n }\n\n copy = {\n tagClass: obj.tagClass,\n type: obj.type,\n constructed: obj.constructed,\n composed: obj.composed,\n value: asn1.copy(obj.value, options)\n };\n if(options && !options.excludeBitStringContents) {\n // TODO: copy byte buffer if it's a buffer not a string\n copy.bitStringContents = obj.bitStringContents;\n }\n return copy;\n};\n\n/**\n * Compares asn1 objects for equality.\n *\n * Note this function does not run in constant time.\n *\n * @param obj1 the first asn1 object.\n * @param obj2 the second asn1 object.\n * @param [options] compare options:\n * [includeBitStringContents] true to compare bitStringContents\n *\n * @return true if the asn1 objects are equal.\n */\nasn1.equals = function(obj1, obj2, options) {\n if(forge.util.isArray(obj1)) {\n if(!forge.util.isArray(obj2)) {\n return false;\n }\n if(obj1.length !== obj2.length) {\n return false;\n }\n for(var i = 0; i < obj1.length; ++i) {\n if(!asn1.equals(obj1[i], obj2[i])) {\n return false;\n }\n }\n return true;\n }\n\n if(typeof obj1 !== typeof obj2) {\n return false;\n }\n\n if(typeof obj1 === 'string') {\n return obj1 === obj2;\n }\n\n var equal = obj1.tagClass === obj2.tagClass &&\n obj1.type === obj2.type &&\n obj1.constructed === obj2.constructed &&\n obj1.composed === obj2.composed &&\n asn1.equals(obj1.value, obj2.value);\n if(options && options.includeBitStringContents) {\n equal = equal && (obj1.bitStringContents === obj2.bitStringContents);\n }\n\n return equal;\n};\n\n/**\n * Gets the length of a BER-encoded ASN.1 value.\n *\n * In case the length is not specified, undefined is returned.\n *\n * @param b the BER-encoded ASN.1 byte buffer, starting with the first\n * length byte.\n *\n * @return the length of the BER-encoded ASN.1 value or undefined.\n */\nasn1.getBerValueLength = function(b) {\n // TODO: move this function and related DER/BER functions to a der.js\n // file; better abstract ASN.1 away from der/ber.\n var b2 = b.getByte();\n if(b2 === 0x80) {\n return undefined;\n }\n\n // see if the length is \"short form\" or \"long form\" (bit 8 set)\n var length;\n var longForm = b2 & 0x80;\n if(!longForm) {\n // length is just the first byte\n length = b2;\n } else {\n // the number of bytes the length is specified in bits 7 through 1\n // and each length byte is in big-endian base-256\n length = b.getInt((b2 & 0x7F) << 3);\n }\n return length;\n};\n\n/**\n * Check if the byte buffer has enough bytes. Throws an Error if not.\n *\n * @param bytes the byte buffer to parse from.\n * @param remaining the bytes remaining in the current parsing state.\n * @param n the number of bytes the buffer must have.\n */\nfunction _checkBufferLength(bytes, remaining, n) {\n if(n > remaining) {\n var error = new Error('Too few bytes to parse DER.');\n error.available = bytes.length();\n error.remaining = remaining;\n error.requested = n;\n throw error;\n }\n}\n\n/**\n * Gets the length of a BER-encoded ASN.1 value.\n *\n * In case the length is not specified, undefined is returned.\n *\n * @param bytes the byte buffer to parse from.\n * @param remaining the bytes remaining in the current parsing state.\n *\n * @return the length of the BER-encoded ASN.1 value or undefined.\n */\nvar _getValueLength = function(bytes, remaining) {\n // TODO: move this function and related DER/BER functions to a der.js\n // file; better abstract ASN.1 away from der/ber.\n // fromDer already checked that this byte exists\n var b2 = bytes.getByte();\n remaining--;\n if(b2 === 0x80) {\n return undefined;\n }\n\n // see if the length is \"short form\" or \"long form\" (bit 8 set)\n var length;\n var longForm = b2 & 0x80;\n if(!longForm) {\n // length is just the first byte\n length = b2;\n } else {\n // the number of bytes the length is specified in bits 7 through 1\n // and each length byte is in big-endian base-256\n var longFormBytes = b2 & 0x7F;\n _checkBufferLength(bytes, remaining, longFormBytes);\n length = bytes.getInt(longFormBytes << 3);\n }\n // FIXME: this will only happen for 32 bit getInt with high bit set\n if(length < 0) {\n throw new Error('Negative length: ' + length);\n }\n return length;\n};\n\n/**\n * Parses an asn1 object from a byte buffer in DER format.\n *\n * @param bytes the byte buffer to parse from.\n * @param [strict] true to be strict when checking value lengths, false to\n * allow truncated values (default: true).\n * @param [options] object with options or boolean strict flag\n * [strict] true to be strict when checking value lengths, false to\n * allow truncated values (default: true).\n * [parseAllBytes] true to ensure all bytes are parsed\n * (default: true)\n * [decodeBitStrings] true to attempt to decode the content of\n * BIT STRINGs (not OCTET STRINGs) using strict mode. Note that\n * without schema support to understand the data context this can\n * erroneously decode values that happen to be valid ASN.1. This\n * flag will be deprecated or removed as soon as schema support is\n * available. (default: true)\n *\n * @throws Will throw an error for various malformed input conditions.\n *\n * @return the parsed asn1 object.\n */\nasn1.fromDer = function(bytes, options) {\n if(options === undefined) {\n options = {\n strict: true,\n parseAllBytes: true,\n decodeBitStrings: true\n };\n }\n if(typeof options === 'boolean') {\n options = {\n strict: options,\n parseAllBytes: true,\n decodeBitStrings: true\n };\n }\n if(!('strict' in options)) {\n options.strict = true;\n }\n if(!('parseAllBytes' in options)) {\n options.parseAllBytes = true;\n }\n if(!('decodeBitStrings' in options)) {\n options.decodeBitStrings = true;\n }\n\n // wrap in buffer if needed\n if(typeof bytes === 'string') {\n bytes = forge.util.createBuffer(bytes);\n }\n\n var byteCount = bytes.length();\n var value = _fromDer(bytes, bytes.length(), 0, options);\n if(options.parseAllBytes && bytes.length() !== 0) {\n var error = new Error('Unparsed DER bytes remain after ASN.1 parsing.');\n error.byteCount = byteCount;\n error.remaining = bytes.length();\n throw error;\n }\n return value;\n};\n\n/**\n * Internal function to parse an asn1 object from a byte buffer in DER format.\n *\n * @param bytes the byte buffer to parse from.\n * @param remaining the number of bytes remaining for this chunk.\n * @param depth the current parsing depth.\n * @param options object with same options as fromDer().\n *\n * @return the parsed asn1 object.\n */\nfunction _fromDer(bytes, remaining, depth, options) {\n // temporary storage for consumption calculations\n var start;\n\n // minimum length for ASN.1 DER structure is 2\n _checkBufferLength(bytes, remaining, 2);\n\n // get the first byte\n var b1 = bytes.getByte();\n // consumed one byte\n remaining--;\n\n // get the tag class\n var tagClass = (b1 & 0xC0);\n\n // get the type (bits 1-5)\n var type = b1 & 0x1F;\n\n // get the variable value length and adjust remaining bytes\n start = bytes.length();\n var length = _getValueLength(bytes, remaining);\n remaining -= start - bytes.length();\n\n // ensure there are enough bytes to get the value\n if(length !== undefined && length > remaining) {\n if(options.strict) {\n var error = new Error('Too few bytes to read ASN.1 value.');\n error.available = bytes.length();\n error.remaining = remaining;\n error.requested = length;\n throw error;\n }\n // Note: be lenient with truncated values and use remaining state bytes\n length = remaining;\n }\n\n // value storage\n var value;\n // possible BIT STRING contents storage\n var bitStringContents;\n\n // constructed flag is bit 6 (32 = 0x20) of the first byte\n var constructed = ((b1 & 0x20) === 0x20);\n if(constructed) {\n // parse child asn1 objects from the value\n value = [];\n if(length === undefined) {\n // asn1 object of indefinite length, read until end tag\n for(;;) {\n _checkBufferLength(bytes, remaining, 2);\n if(bytes.bytes(2) === String.fromCharCode(0, 0)) {\n bytes.getBytes(2);\n remaining -= 2;\n break;\n }\n start = bytes.length();\n value.push(_fromDer(bytes, remaining, depth + 1, options));\n remaining -= start - bytes.length();\n }\n } else {\n // parsing asn1 object of definite length\n while(length > 0) {\n start = bytes.length();\n value.push(_fromDer(bytes, length, depth + 1, options));\n remaining -= start - bytes.length();\n length -= start - bytes.length();\n }\n }\n }\n\n // if a BIT STRING, save the contents including padding\n if(value === undefined && tagClass === asn1.Class.UNIVERSAL &&\n type === asn1.Type.BITSTRING) {\n bitStringContents = bytes.bytes(length);\n }\n\n // determine if a non-constructed value should be decoded as a composed\n // value that contains other ASN.1 objects. BIT STRINGs (and OCTET STRINGs)\n // can be used this way.\n if(value === undefined && options.decodeBitStrings &&\n tagClass === asn1.Class.UNIVERSAL &&\n // FIXME: OCTET STRINGs not yet supported here\n // .. other parts of forge expect to decode OCTET STRINGs manually\n (type === asn1.Type.BITSTRING /*|| type === asn1.Type.OCTETSTRING*/) &&\n length > 1) {\n // save read position\n var savedRead = bytes.read;\n var savedRemaining = remaining;\n var unused = 0;\n if(type === asn1.Type.BITSTRING) {\n /* The first octet gives the number of bits by which the length of the\n bit string is less than the next multiple of eight (this is called\n the \"number of unused bits\").\n\n The second and following octets give the value of the bit string\n converted to an octet string. */\n _checkBufferLength(bytes, remaining, 1);\n unused = bytes.getByte();\n remaining--;\n }\n // if all bits are used, maybe the BIT/OCTET STRING holds ASN.1 objs\n if(unused === 0) {\n try {\n // attempt to parse child asn1 object from the value\n // (stored in array to signal composed value)\n start = bytes.length();\n var subOptions = {\n // enforce strict mode to avoid parsing ASN.1 from plain data\n strict: true,\n decodeBitStrings: true\n };\n var composed = _fromDer(bytes, remaining, depth + 1, subOptions);\n var used = start - bytes.length();\n remaining -= used;\n if(type == asn1.Type.BITSTRING) {\n used++;\n }\n\n // if the data all decoded and the class indicates UNIVERSAL or\n // CONTEXT_SPECIFIC then assume we've got an encapsulated ASN.1 object\n var tc = composed.tagClass;\n if(used === length &&\n (tc === asn1.Class.UNIVERSAL || tc === asn1.Class.CONTEXT_SPECIFIC)) {\n value = [composed];\n }\n } catch(ex) {\n }\n }\n if(value === undefined) {\n // restore read position\n bytes.read = savedRead;\n remaining = savedRemaining;\n }\n }\n\n if(value === undefined) {\n // asn1 not constructed or composed, get raw value\n // TODO: do DER to OID conversion and vice-versa in .toDer?\n\n if(length === undefined) {\n if(options.strict) {\n throw new Error('Non-constructed ASN.1 object of indefinite length.');\n }\n // be lenient and use remaining state bytes\n length = remaining;\n }\n\n if(type === asn1.Type.BMPSTRING) {\n value = '';\n for(; length > 0; length -= 2) {\n _checkBufferLength(bytes, remaining, 2);\n value += String.fromCharCode(bytes.getInt16());\n remaining -= 2;\n }\n } else {\n value = bytes.getBytes(length);\n remaining -= length;\n }\n }\n\n // add BIT STRING contents if available\n var asn1Options = bitStringContents === undefined ? null : {\n bitStringContents: bitStringContents\n };\n\n // create and return asn1 object\n return asn1.create(tagClass, type, constructed, value, asn1Options);\n}\n\n/**\n * Converts the given asn1 object to a buffer of bytes in DER format.\n *\n * @param asn1 the asn1 object to convert to bytes.\n *\n * @return the buffer of bytes.\n */\nasn1.toDer = function(obj) {\n var bytes = forge.util.createBuffer();\n\n // build the first byte\n var b1 = obj.tagClass | obj.type;\n\n // for storing the ASN.1 value\n var value = forge.util.createBuffer();\n\n // use BIT STRING contents if available and data not changed\n var useBitStringContents = false;\n if('bitStringContents' in obj) {\n useBitStringContents = true;\n if(obj.original) {\n useBitStringContents = asn1.equals(obj, obj.original);\n }\n }\n\n if(useBitStringContents) {\n value.putBytes(obj.bitStringContents);\n } else if(obj.composed) {\n // if composed, use each child asn1 object's DER bytes as value\n // turn on 6th bit (0x20 = 32) to indicate asn1 is constructed\n // from other asn1 objects\n if(obj.constructed) {\n b1 |= 0x20;\n } else {\n // type is a bit string, add unused bits of 0x00\n value.putByte(0x00);\n }\n\n // add all of the child DER bytes together\n for(var i = 0; i < obj.value.length; ++i) {\n if(obj.value[i] !== undefined) {\n value.putBuffer(asn1.toDer(obj.value[i]));\n }\n }\n } else {\n // use asn1.value directly\n if(obj.type === asn1.Type.BMPSTRING) {\n for(var i = 0; i < obj.value.length; ++i) {\n value.putInt16(obj.value.charCodeAt(i));\n }\n } else {\n // ensure integer is minimally-encoded\n // TODO: should all leading bytes be stripped vs just one?\n // .. ex '00 00 01' => '01'?\n if(obj.type === asn1.Type.INTEGER &&\n obj.value.length > 1 &&\n // leading 0x00 for positive integer\n ((obj.value.charCodeAt(0) === 0 &&\n (obj.value.charCodeAt(1) & 0x80) === 0) ||\n // leading 0xFF for negative integer\n (obj.value.charCodeAt(0) === 0xFF &&\n (obj.value.charCodeAt(1) & 0x80) === 0x80))) {\n value.putBytes(obj.value.substr(1));\n } else {\n value.putBytes(obj.value);\n }\n }\n }\n\n // add tag byte\n bytes.putByte(b1);\n\n // use \"short form\" encoding\n if(value.length() <= 127) {\n // one byte describes the length\n // bit 8 = 0 and bits 7-1 = length\n bytes.putByte(value.length() & 0x7F);\n } else {\n // use \"long form\" encoding\n // 2 to 127 bytes describe the length\n // first byte: bit 8 = 1 and bits 7-1 = # of additional bytes\n // other bytes: length in base 256, big-endian\n var len = value.length();\n var lenBytes = '';\n do {\n lenBytes += String.fromCharCode(len & 0xFF);\n len = len >>> 8;\n } while(len > 0);\n\n // set first byte to # bytes used to store the length and turn on\n // bit 8 to indicate long-form length is used\n bytes.putByte(lenBytes.length | 0x80);\n\n // concatenate length bytes in reverse since they were generated\n // little endian and we need big endian\n for(var i = lenBytes.length - 1; i >= 0; --i) {\n bytes.putByte(lenBytes.charCodeAt(i));\n }\n }\n\n // concatenate value bytes\n bytes.putBuffer(value);\n return bytes;\n};\n\n/**\n * Converts an OID dot-separated string to a byte buffer. The byte buffer\n * contains only the DER-encoded value, not any tag or length bytes.\n *\n * @param oid the OID dot-separated string.\n *\n * @return the byte buffer.\n */\nasn1.oidToDer = function(oid) {\n // split OID into individual values\n var values = oid.split('.');\n var bytes = forge.util.createBuffer();\n\n // first byte is 40 * value1 + value2\n bytes.putByte(40 * parseInt(values[0], 10) + parseInt(values[1], 10));\n // other bytes are each value in base 128 with 8th bit set except for\n // the last byte for each value\n var last, valueBytes, value, b;\n for(var i = 2; i < values.length; ++i) {\n // produce value bytes in reverse because we don't know how many\n // bytes it will take to store the value\n last = true;\n valueBytes = [];\n value = parseInt(values[i], 10);\n do {\n b = value & 0x7F;\n value = value >>> 7;\n // if value is not last, then turn on 8th bit\n if(!last) {\n b |= 0x80;\n }\n valueBytes.push(b);\n last = false;\n } while(value > 0);\n\n // add value bytes in reverse (needs to be in big endian)\n for(var n = valueBytes.length - 1; n >= 0; --n) {\n bytes.putByte(valueBytes[n]);\n }\n }\n\n return bytes;\n};\n\n/**\n * Converts a DER-encoded byte buffer to an OID dot-separated string. The\n * byte buffer should contain only the DER-encoded value, not any tag or\n * length bytes.\n *\n * @param bytes the byte buffer.\n *\n * @return the OID dot-separated string.\n */\nasn1.derToOid = function(bytes) {\n var oid;\n\n // wrap in buffer if needed\n if(typeof bytes === 'string') {\n bytes = forge.util.createBuffer(bytes);\n }\n\n // first byte is 40 * value1 + value2\n var b = bytes.getByte();\n oid = Math.floor(b / 40) + '.' + (b % 40);\n\n // other bytes are each value in base 128 with 8th bit set except for\n // the last byte for each value\n var value = 0;\n while(bytes.length() > 0) {\n b = bytes.getByte();\n value = value << 7;\n // not the last byte for the value\n if(b & 0x80) {\n value += b & 0x7F;\n } else {\n // last byte\n oid += '.' + (value + b);\n value = 0;\n }\n }\n\n return oid;\n};\n\n/**\n * Converts a UTCTime value to a date.\n *\n * Note: GeneralizedTime has 4 digits for the year and is used for X.509\n * dates past 2049. Parsing that structure hasn't been implemented yet.\n *\n * @param utc the UTCTime value to convert.\n *\n * @return the date.\n */\nasn1.utcTimeToDate = function(utc) {\n /* The following formats can be used:\n\n YYMMDDhhmmZ\n YYMMDDhhmm+hh'mm'\n YYMMDDhhmm-hh'mm'\n YYMMDDhhmmssZ\n YYMMDDhhmmss+hh'mm'\n YYMMDDhhmmss-hh'mm'\n\n Where:\n\n YY is the least significant two digits of the year\n MM is the month (01 to 12)\n DD is the day (01 to 31)\n hh is the hour (00 to 23)\n mm are the minutes (00 to 59)\n ss are the seconds (00 to 59)\n Z indicates that local time is GMT, + indicates that local time is\n later than GMT, and - indicates that local time is earlier than GMT\n hh' is the absolute value of the offset from GMT in hours\n mm' is the absolute value of the offset from GMT in minutes */\n var date = new Date();\n\n // if YY >= 50 use 19xx, if YY < 50 use 20xx\n var year = parseInt(utc.substr(0, 2), 10);\n year = (year >= 50) ? 1900 + year : 2000 + year;\n var MM = parseInt(utc.substr(2, 2), 10) - 1; // use 0-11 for month\n var DD = parseInt(utc.substr(4, 2), 10);\n var hh = parseInt(utc.substr(6, 2), 10);\n var mm = parseInt(utc.substr(8, 2), 10);\n var ss = 0;\n\n // not just YYMMDDhhmmZ\n if(utc.length > 11) {\n // get character after minutes\n var c = utc.charAt(10);\n var end = 10;\n\n // see if seconds are present\n if(c !== '+' && c !== '-') {\n // get seconds\n ss = parseInt(utc.substr(10, 2), 10);\n end += 2;\n }\n }\n\n // update date\n date.setUTCFullYear(year, MM, DD);\n date.setUTCHours(hh, mm, ss, 0);\n\n if(end) {\n // get +/- after end of time\n c = utc.charAt(end);\n if(c === '+' || c === '-') {\n // get hours+minutes offset\n var hhoffset = parseInt(utc.substr(end + 1, 2), 10);\n var mmoffset = parseInt(utc.substr(end + 4, 2), 10);\n\n // calculate offset in milliseconds\n var offset = hhoffset * 60 + mmoffset;\n offset *= 60000;\n\n // apply offset\n if(c === '+') {\n date.setTime(+date - offset);\n } else {\n date.setTime(+date + offset);\n }\n }\n }\n\n return date;\n};\n\n/**\n * Converts a GeneralizedTime value to a date.\n *\n * @param gentime the GeneralizedTime value to convert.\n *\n * @return the date.\n */\nasn1.generalizedTimeToDate = function(gentime) {\n /* The following formats can be used:\n\n YYYYMMDDHHMMSS\n YYYYMMDDHHMMSS.fff\n YYYYMMDDHHMMSSZ\n YYYYMMDDHHMMSS.fffZ\n YYYYMMDDHHMMSS+hh'mm'\n YYYYMMDDHHMMSS.fff+hh'mm'\n YYYYMMDDHHMMSS-hh'mm'\n YYYYMMDDHHMMSS.fff-hh'mm'\n\n Where:\n\n YYYY is the year\n MM is the month (01 to 12)\n DD is the day (01 to 31)\n hh is the hour (00 to 23)\n mm are the minutes (00 to 59)\n ss are the seconds (00 to 59)\n .fff is the second fraction, accurate to three decimal places\n Z indicates that local time is GMT, + indicates that local time is\n later than GMT, and - indicates that local time is earlier than GMT\n hh' is the absolute value of the offset from GMT in hours\n mm' is the absolute value of the offset from GMT in minutes */\n var date = new Date();\n\n var YYYY = parseInt(gentime.substr(0, 4), 10);\n var MM = parseInt(gentime.substr(4, 2), 10) - 1; // use 0-11 for month\n var DD = parseInt(gentime.substr(6, 2), 10);\n var hh = parseInt(gentime.substr(8, 2), 10);\n var mm = parseInt(gentime.substr(10, 2), 10);\n var ss = parseInt(gentime.substr(12, 2), 10);\n var fff = 0;\n var offset = 0;\n var isUTC = false;\n\n if(gentime.charAt(gentime.length - 1) === 'Z') {\n isUTC = true;\n }\n\n var end = gentime.length - 5, c = gentime.charAt(end);\n if(c === '+' || c === '-') {\n // get hours+minutes offset\n var hhoffset = parseInt(gentime.substr(end + 1, 2), 10);\n var mmoffset = parseInt(gentime.substr(end + 4, 2), 10);\n\n // calculate offset in milliseconds\n offset = hhoffset * 60 + mmoffset;\n offset *= 60000;\n\n // apply offset\n if(c === '+') {\n offset *= -1;\n }\n\n isUTC = true;\n }\n\n // check for second fraction\n if(gentime.charAt(14) === '.') {\n fff = parseFloat(gentime.substr(14), 10) * 1000;\n }\n\n if(isUTC) {\n date.setUTCFullYear(YYYY, MM, DD);\n date.setUTCHours(hh, mm, ss, fff);\n\n // apply offset\n date.setTime(+date + offset);\n } else {\n date.setFullYear(YYYY, MM, DD);\n date.setHours(hh, mm, ss, fff);\n }\n\n return date;\n};\n\n/**\n * Converts a date to a UTCTime value.\n *\n * Note: GeneralizedTime has 4 digits for the year and is used for X.509\n * dates past 2049. Converting to a GeneralizedTime hasn't been\n * implemented yet.\n *\n * @param date the date to convert.\n *\n * @return the UTCTime value.\n */\nasn1.dateToUtcTime = function(date) {\n // TODO: validate; currently assumes proper format\n if(typeof date === 'string') {\n return date;\n }\n\n var rval = '';\n\n // create format YYMMDDhhmmssZ\n var format = [];\n format.push(('' + date.getUTCFullYear()).substr(2));\n format.push('' + (date.getUTCMonth() + 1));\n format.push('' + date.getUTCDate());\n format.push('' + date.getUTCHours());\n format.push('' + date.getUTCMinutes());\n format.push('' + date.getUTCSeconds());\n\n // ensure 2 digits are used for each format entry\n for(var i = 0; i < format.length; ++i) {\n if(format[i].length < 2) {\n rval += '0';\n }\n rval += format[i];\n }\n rval += 'Z';\n\n return rval;\n};\n\n/**\n * Converts a date to a GeneralizedTime value.\n *\n * @param date the date to convert.\n *\n * @return the GeneralizedTime value as a string.\n */\nasn1.dateToGeneralizedTime = function(date) {\n // TODO: validate; currently assumes proper format\n if(typeof date === 'string') {\n return date;\n }\n\n var rval = '';\n\n // create format YYYYMMDDHHMMSSZ\n var format = [];\n format.push('' + date.getUTCFullYear());\n format.push('' + (date.getUTCMonth() + 1));\n format.push('' + date.getUTCDate());\n format.push('' + date.getUTCHours());\n format.push('' + date.getUTCMinutes());\n format.push('' + date.getUTCSeconds());\n\n // ensure 2 digits are used for each format entry\n for(var i = 0; i < format.length; ++i) {\n if(format[i].length < 2) {\n rval += '0';\n }\n rval += format[i];\n }\n rval += 'Z';\n\n return rval;\n};\n\n/**\n * Converts a javascript integer to a DER-encoded byte buffer to be used\n * as the value for an INTEGER type.\n *\n * @param x the integer.\n *\n * @return the byte buffer.\n */\nasn1.integerToDer = function(x) {\n var rval = forge.util.createBuffer();\n if(x >= -0x80 && x < 0x80) {\n return rval.putSignedInt(x, 8);\n }\n if(x >= -0x8000 && x < 0x8000) {\n return rval.putSignedInt(x, 16);\n }\n if(x >= -0x800000 && x < 0x800000) {\n return rval.putSignedInt(x, 24);\n }\n if(x >= -0x80000000 && x < 0x80000000) {\n return rval.putSignedInt(x, 32);\n }\n var error = new Error('Integer too large; max is 32-bits.');\n error.integer = x;\n throw error;\n};\n\n/**\n * Converts a DER-encoded byte buffer to a javascript integer. This is\n * typically used to decode the value of an INTEGER type.\n *\n * @param bytes the byte buffer.\n *\n * @return the integer.\n */\nasn1.derToInteger = function(bytes) {\n // wrap in buffer if needed\n if(typeof bytes === 'string') {\n bytes = forge.util.createBuffer(bytes);\n }\n\n var n = bytes.length() * 8;\n if(n > 32) {\n throw new Error('Integer too large; max is 32-bits.');\n }\n return bytes.getSignedInt(n);\n};\n\n/**\n * Validates that the given ASN.1 object is at least a super set of the\n * given ASN.1 structure. Only tag classes and types are checked. An\n * optional map may also be provided to capture ASN.1 values while the\n * structure is checked.\n *\n * To capture an ASN.1 value, set an object in the validator's 'capture'\n * parameter to the key to use in the capture map. To capture the full\n * ASN.1 object, specify 'captureAsn1'. To capture BIT STRING bytes, including\n * the leading unused bits counter byte, specify 'captureBitStringContents'.\n * To capture BIT STRING bytes, without the leading unused bits counter byte,\n * specify 'captureBitStringValue'.\n *\n * Objects in the validator may set a field 'optional' to true to indicate\n * that it isn't necessary to pass validation.\n *\n * @param obj the ASN.1 object to validate.\n * @param v the ASN.1 structure validator.\n * @param capture an optional map to capture values in.\n * @param errors an optional array for storing validation errors.\n *\n * @return true on success, false on failure.\n */\nasn1.validate = function(obj, v, capture, errors) {\n var rval = false;\n\n // ensure tag class and type are the same if specified\n if((obj.tagClass === v.tagClass || typeof(v.tagClass) === 'undefined') &&\n (obj.type === v.type || typeof(v.type) === 'undefined')) {\n // ensure constructed flag is the same if specified\n if(obj.constructed === v.constructed ||\n typeof(v.constructed) === 'undefined') {\n rval = true;\n\n // handle sub values\n if(v.value && forge.util.isArray(v.value)) {\n var j = 0;\n for(var i = 0; rval && i < v.value.length; ++i) {\n rval = v.value[i].optional || false;\n if(obj.value[j]) {\n rval = asn1.validate(obj.value[j], v.value[i], capture, errors);\n if(rval) {\n ++j;\n } else if(v.value[i].optional) {\n rval = true;\n }\n }\n if(!rval && errors) {\n errors.push(\n '[' + v.name + '] ' +\n 'Tag class \"' + v.tagClass + '\", type \"' +\n v.type + '\" expected value length \"' +\n v.value.length + '\", got \"' +\n obj.value.length + '\"');\n }\n }\n }\n\n if(rval && capture) {\n if(v.capture) {\n capture[v.capture] = obj.value;\n }\n if(v.captureAsn1) {\n capture[v.captureAsn1] = obj;\n }\n if(v.captureBitStringContents && 'bitStringContents' in obj) {\n capture[v.captureBitStringContents] = obj.bitStringContents;\n }\n if(v.captureBitStringValue && 'bitStringContents' in obj) {\n var value;\n if(obj.bitStringContents.length < 2) {\n capture[v.captureBitStringValue] = '';\n } else {\n // FIXME: support unused bits with data shifting\n var unused = obj.bitStringContents.charCodeAt(0);\n if(unused !== 0) {\n throw new Error(\n 'captureBitStringValue only supported for zero unused bits');\n }\n capture[v.captureBitStringValue] = obj.bitStringContents.slice(1);\n }\n }\n }\n } else if(errors) {\n errors.push(\n '[' + v.name + '] ' +\n 'Expected constructed \"' + v.constructed + '\", got \"' +\n obj.constructed + '\"');\n }\n } else if(errors) {\n if(obj.tagClass !== v.tagClass) {\n errors.push(\n '[' + v.name + '] ' +\n 'Expected tag class \"' + v.tagClass + '\", got \"' +\n obj.tagClass + '\"');\n }\n if(obj.type !== v.type) {\n errors.push(\n '[' + v.name + '] ' +\n 'Expected type \"' + v.type + '\", got \"' + obj.type + '\"');\n }\n }\n return rval;\n};\n\n// regex for testing for non-latin characters\nvar _nonLatinRegex = /[^\\\\u0000-\\\\u00ff]/;\n\n/**\n * Pretty prints an ASN.1 object to a string.\n *\n * @param obj the object to write out.\n * @param level the level in the tree.\n * @param indentation the indentation to use.\n *\n * @return the string.\n */\nasn1.prettyPrint = function(obj, level, indentation) {\n var rval = '';\n\n // set default level and indentation\n level = level || 0;\n indentation = indentation || 2;\n\n // start new line for deep levels\n if(level > 0) {\n rval += '\\n';\n }\n\n // create indent\n var indent = '';\n for(var i = 0; i < level * indentation; ++i) {\n indent += ' ';\n }\n\n // print class:type\n rval += indent + 'Tag: ';\n switch(obj.tagClass) {\n case asn1.Class.UNIVERSAL:\n rval += 'Universal:';\n break;\n case asn1.Class.APPLICATION:\n rval += 'Application:';\n break;\n case asn1.Class.CONTEXT_SPECIFIC:\n rval += 'Context-Specific:';\n break;\n case asn1.Class.PRIVATE:\n rval += 'Private:';\n break;\n }\n\n if(obj.tagClass === asn1.Class.UNIVERSAL) {\n rval += obj.type;\n\n // known types\n switch(obj.type) {\n case asn1.Type.NONE:\n rval += ' (None)';\n break;\n case asn1.Type.BOOLEAN:\n rval += ' (Boolean)';\n break;\n case asn1.Type.INTEGER:\n rval += ' (Integer)';\n break;\n case asn1.Type.BITSTRING:\n rval += ' (Bit string)';\n break;\n case asn1.Type.OCTETSTRING:\n rval += ' (Octet string)';\n break;\n case asn1.Type.NULL:\n rval += ' (Null)';\n break;\n case asn1.Type.OID:\n rval += ' (Object Identifier)';\n break;\n case asn1.Type.ODESC:\n rval += ' (Object Descriptor)';\n break;\n case asn1.Type.EXTERNAL:\n rval += ' (External or Instance of)';\n break;\n case asn1.Type.REAL:\n rval += ' (Real)';\n break;\n case asn1.Type.ENUMERATED:\n rval += ' (Enumerated)';\n break;\n case asn1.Type.EMBEDDED:\n rval += ' (Embedded PDV)';\n break;\n case asn1.Type.UTF8:\n rval += ' (UTF8)';\n break;\n case asn1.Type.ROID:\n rval += ' (Relative Object Identifier)';\n break;\n case asn1.Type.SEQUENCE:\n rval += ' (Sequence)';\n break;\n case asn1.Type.SET:\n rval += ' (Set)';\n break;\n case asn1.Type.PRINTABLESTRING:\n rval += ' (Printable String)';\n break;\n case asn1.Type.IA5String:\n rval += ' (IA5String (ASCII))';\n break;\n case asn1.Type.UTCTIME:\n rval += ' (UTC time)';\n break;\n case asn1.Type.GENERALIZEDTIME:\n rval += ' (Generalized time)';\n break;\n case asn1.Type.BMPSTRING:\n rval += ' (BMP String)';\n break;\n }\n } else {\n rval += obj.type;\n }\n\n rval += '\\n';\n rval += indent + 'Constructed: ' + obj.constructed + '\\n';\n\n if(obj.composed) {\n var subvalues = 0;\n var sub = '';\n for(var i = 0; i < obj.value.length; ++i) {\n if(obj.value[i] !== undefined) {\n subvalues += 1;\n sub += asn1.prettyPrint(obj.value[i], level + 1, indentation);\n if((i + 1) < obj.value.length) {\n sub += ',';\n }\n }\n }\n rval += indent + 'Sub values: ' + subvalues + sub;\n } else {\n rval += indent + 'Value: ';\n if(obj.type === asn1.Type.OID) {\n var oid = asn1.derToOid(obj.value);\n rval += oid;\n if(forge.pki && forge.pki.oids) {\n if(oid in forge.pki.oids) {\n rval += ' (' + forge.pki.oids[oid] + ') ';\n }\n }\n }\n if(obj.type === asn1.Type.INTEGER) {\n try {\n rval += asn1.derToInteger(obj.value);\n } catch(ex) {\n rval += '0x' + forge.util.bytesToHex(obj.value);\n }\n } else if(obj.type === asn1.Type.BITSTRING) {\n // TODO: shift bits as needed to display without padding\n if(obj.value.length > 1) {\n // remove unused bits field\n rval += '0x' + forge.util.bytesToHex(obj.value.slice(1));\n } else {\n rval += '(none)';\n }\n // show unused bit count\n if(obj.value.length > 0) {\n var unused = obj.value.charCodeAt(0);\n if(unused == 1) {\n rval += ' (1 unused bit shown)';\n } else if(unused > 1) {\n rval += ' (' + unused + ' unused bits shown)';\n }\n }\n } else if(obj.type === asn1.Type.OCTETSTRING) {\n if(!_nonLatinRegex.test(obj.value)) {\n rval += '(' + obj.value + ') ';\n }\n rval += '0x' + forge.util.bytesToHex(obj.value);\n } else if(obj.type === asn1.Type.UTF8) {\n try {\n rval += forge.util.decodeUtf8(obj.value);\n } catch(e) {\n if(e.message === 'URI malformed') {\n rval +=\n '0x' + forge.util.bytesToHex(obj.value) + ' (malformed UTF8)';\n } else {\n throw e;\n }\n }\n } else if(obj.type === asn1.Type.PRINTABLESTRING ||\n obj.type === asn1.Type.IA5String) {\n rval += obj.value;\n } else if(_nonLatinRegex.test(obj.value)) {\n rval += '0x' + forge.util.bytesToHex(obj.value);\n } else if(obj.value.length === 0) {\n rval += '[null]';\n } else {\n rval += obj.value;\n }\n }\n\n return rval;\n};\n","/**\n * Node.js module for Forge message digests.\n *\n * @author Dave Longley\n *\n * Copyright 2011-2017 Digital Bazaar, Inc.\n */\nvar forge = require('./forge');\n\nmodule.exports = forge.md = forge.md || {};\nforge.md.algorithms = forge.md.algorithms || {};\n","/**\n * Hash-based Message Authentication Code implementation. Requires a message\n * digest object that can be obtained, for example, from forge.md.sha1 or\n * forge.md.md5.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2010-2012 Digital Bazaar, Inc. All rights reserved.\n */\nvar forge = require('./forge');\nrequire('./md');\nrequire('./util');\n\n/* HMAC API */\nvar hmac = module.exports = forge.hmac = forge.hmac || {};\n\n/**\n * Creates an HMAC object that uses the given message digest object.\n *\n * @return an HMAC object.\n */\nhmac.create = function() {\n // the hmac key to use\n var _key = null;\n\n // the message digest to use\n var _md = null;\n\n // the inner padding\n var _ipadding = null;\n\n // the outer padding\n var _opadding = null;\n\n // hmac context\n var ctx = {};\n\n /**\n * Starts or restarts the HMAC with the given key and message digest.\n *\n * @param md the message digest to use, null to reuse the previous one,\n * a string to use builtin 'sha1', 'md5', 'sha256'.\n * @param key the key to use as a string, array of bytes, byte buffer,\n * or null to reuse the previous key.\n */\n ctx.start = function(md, key) {\n if(md !== null) {\n if(typeof md === 'string') {\n // create builtin message digest\n md = md.toLowerCase();\n if(md in forge.md.algorithms) {\n _md = forge.md.algorithms[md].create();\n } else {\n throw new Error('Unknown hash algorithm \"' + md + '\"');\n }\n } else {\n // store message digest\n _md = md;\n }\n }\n\n if(key === null) {\n // reuse previous key\n key = _key;\n } else {\n if(typeof key === 'string') {\n // convert string into byte buffer\n key = forge.util.createBuffer(key);\n } else if(forge.util.isArray(key)) {\n // convert byte array into byte buffer\n var tmp = key;\n key = forge.util.createBuffer();\n for(var i = 0; i < tmp.length; ++i) {\n key.putByte(tmp[i]);\n }\n }\n\n // if key is longer than blocksize, hash it\n var keylen = key.length();\n if(keylen > _md.blockLength) {\n _md.start();\n _md.update(key.bytes());\n key = _md.digest();\n }\n\n // mix key into inner and outer padding\n // ipadding = [0x36 * blocksize] ^ key\n // opadding = [0x5C * blocksize] ^ key\n _ipadding = forge.util.createBuffer();\n _opadding = forge.util.createBuffer();\n keylen = key.length();\n for(var i = 0; i < keylen; ++i) {\n var tmp = key.at(i);\n _ipadding.putByte(0x36 ^ tmp);\n _opadding.putByte(0x5C ^ tmp);\n }\n\n // if key is shorter than blocksize, add additional padding\n if(keylen < _md.blockLength) {\n var tmp = _md.blockLength - keylen;\n for(var i = 0; i < tmp; ++i) {\n _ipadding.putByte(0x36);\n _opadding.putByte(0x5C);\n }\n }\n _key = key;\n _ipadding = _ipadding.bytes();\n _opadding = _opadding.bytes();\n }\n\n // digest is done like so: hash(opadding | hash(ipadding | message))\n\n // prepare to do inner hash\n // hash(ipadding | message)\n _md.start();\n _md.update(_ipadding);\n };\n\n /**\n * Updates the HMAC with the given message bytes.\n *\n * @param bytes the bytes to update with.\n */\n ctx.update = function(bytes) {\n _md.update(bytes);\n };\n\n /**\n * Produces the Message Authentication Code (MAC).\n *\n * @return a byte buffer containing the digest value.\n */\n ctx.getMac = function() {\n // digest is done like so: hash(opadding | hash(ipadding | message))\n // here we do the outer hashing\n var inner = _md.digest().bytes();\n _md.start();\n _md.update(_opadding);\n _md.update(inner);\n return _md.digest();\n };\n // alias for getMac\n ctx.digest = ctx.getMac;\n\n return ctx;\n};\n","/**\n * Message Digest Algorithm 5 with 128-bit digest (MD5) implementation.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2010-2014 Digital Bazaar, Inc.\n */\nvar forge = require('./forge');\nrequire('./md');\nrequire('./util');\n\nvar md5 = module.exports = forge.md5 = forge.md5 || {};\nforge.md.md5 = forge.md.algorithms.md5 = md5;\n\n/**\n * Creates an MD5 message digest object.\n *\n * @return a message digest object.\n */\nmd5.create = function() {\n // do initialization as necessary\n if(!_initialized) {\n _init();\n }\n\n // MD5 state contains four 32-bit integers\n var _state = null;\n\n // input buffer\n var _input = forge.util.createBuffer();\n\n // used for word storage\n var _w = new Array(16);\n\n // message digest object\n var md = {\n algorithm: 'md5',\n blockLength: 64,\n digestLength: 16,\n // 56-bit length of message so far (does not including padding)\n messageLength: 0,\n // true message length\n fullMessageLength: null,\n // size of message length in bytes\n messageLengthSize: 8\n };\n\n /**\n * Starts the digest.\n *\n * @return this digest object.\n */\n md.start = function() {\n // up to 56-bit message length for convenience\n md.messageLength = 0;\n\n // full message length (set md.messageLength64 for backwards-compatibility)\n md.fullMessageLength = md.messageLength64 = [];\n var int32s = md.messageLengthSize / 4;\n for(var i = 0; i < int32s; ++i) {\n md.fullMessageLength.push(0);\n }\n _input = forge.util.createBuffer();\n _state = {\n h0: 0x67452301,\n h1: 0xEFCDAB89,\n h2: 0x98BADCFE,\n h3: 0x10325476\n };\n return md;\n };\n // start digest automatically for first time\n md.start();\n\n /**\n * Updates the digest with the given message input. The given input can\n * treated as raw input (no encoding will be applied) or an encoding of\n * 'utf8' maybe given to encode the input using UTF-8.\n *\n * @param msg the message input to update with.\n * @param encoding the encoding to use (default: 'raw', other: 'utf8').\n *\n * @return this digest object.\n */\n md.update = function(msg, encoding) {\n if(encoding === 'utf8') {\n msg = forge.util.encodeUtf8(msg);\n }\n\n // update message length\n var len = msg.length;\n md.messageLength += len;\n len = [(len / 0x100000000) >>> 0, len >>> 0];\n for(var i = md.fullMessageLength.length - 1; i >= 0; --i) {\n md.fullMessageLength[i] += len[1];\n len[1] = len[0] + ((md.fullMessageLength[i] / 0x100000000) >>> 0);\n md.fullMessageLength[i] = md.fullMessageLength[i] >>> 0;\n len[0] = (len[1] / 0x100000000) >>> 0;\n }\n\n // add bytes to input buffer\n _input.putBytes(msg);\n\n // process bytes\n _update(_state, _w, _input);\n\n // compact input buffer every 2K or if empty\n if(_input.read > 2048 || _input.length() === 0) {\n _input.compact();\n }\n\n return md;\n };\n\n /**\n * Produces the digest.\n *\n * @return a byte buffer containing the digest value.\n */\n md.digest = function() {\n /* Note: Here we copy the remaining bytes in the input buffer and\n add the appropriate MD5 padding. Then we do the final update\n on a copy of the state so that if the user wants to get\n intermediate digests they can do so. */\n\n /* Determine the number of bytes that must be added to the message\n to ensure its length is congruent to 448 mod 512. In other words,\n the data to be digested must be a multiple of 512 bits (or 128 bytes).\n This data includes the message, some padding, and the length of the\n message. Since the length of the message will be encoded as 8 bytes (64\n bits), that means that the last segment of the data must have 56 bytes\n (448 bits) of message and padding. Therefore, the length of the message\n plus the padding must be congruent to 448 mod 512 because\n 512 - 128 = 448.\n\n In order to fill up the message length it must be filled with\n padding that begins with 1 bit followed by all 0 bits. Padding\n must *always* be present, so if the message length is already\n congruent to 448 mod 512, then 512 padding bits must be added. */\n\n var finalBlock = forge.util.createBuffer();\n finalBlock.putBytes(_input.bytes());\n\n // compute remaining size to be digested (include message length size)\n var remaining = (\n md.fullMessageLength[md.fullMessageLength.length - 1] +\n md.messageLengthSize);\n\n // add padding for overflow blockSize - overflow\n // _padding starts with 1 byte with first bit is set (byte value 128), then\n // there may be up to (blockSize - 1) other pad bytes\n var overflow = remaining & (md.blockLength - 1);\n finalBlock.putBytes(_padding.substr(0, md.blockLength - overflow));\n\n // serialize message length in bits in little-endian order; since length\n // is stored in bytes we multiply by 8 and add carry\n var bits, carry = 0;\n for(var i = md.fullMessageLength.length - 1; i >= 0; --i) {\n bits = md.fullMessageLength[i] * 8 + carry;\n carry = (bits / 0x100000000) >>> 0;\n finalBlock.putInt32Le(bits >>> 0);\n }\n\n var s2 = {\n h0: _state.h0,\n h1: _state.h1,\n h2: _state.h2,\n h3: _state.h3\n };\n _update(s2, _w, finalBlock);\n var rval = forge.util.createBuffer();\n rval.putInt32Le(s2.h0);\n rval.putInt32Le(s2.h1);\n rval.putInt32Le(s2.h2);\n rval.putInt32Le(s2.h3);\n return rval;\n };\n\n return md;\n};\n\n// padding, constant tables for calculating md5\nvar _padding = null;\nvar _g = null;\nvar _r = null;\nvar _k = null;\nvar _initialized = false;\n\n/**\n * Initializes the constant tables.\n */\nfunction _init() {\n // create padding\n _padding = String.fromCharCode(128);\n _padding += forge.util.fillString(String.fromCharCode(0x00), 64);\n\n // g values\n _g = [\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n 1, 6, 11, 0, 5, 10, 15, 4, 9, 14, 3, 8, 13, 2, 7, 12,\n 5, 8, 11, 14, 1, 4, 7, 10, 13, 0, 3, 6, 9, 12, 15, 2,\n 0, 7, 14, 5, 12, 3, 10, 1, 8, 15, 6, 13, 4, 11, 2, 9];\n\n // rounds table\n _r = [\n 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22,\n 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20,\n 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23,\n 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21];\n\n // get the result of abs(sin(i + 1)) as a 32-bit integer\n _k = new Array(64);\n for(var i = 0; i < 64; ++i) {\n _k[i] = Math.floor(Math.abs(Math.sin(i + 1)) * 0x100000000);\n }\n\n // now initialized\n _initialized = true;\n}\n\n/**\n * Updates an MD5 state with the given byte buffer.\n *\n * @param s the MD5 state to update.\n * @param w the array to use to store words.\n * @param bytes the byte buffer to update with.\n */\nfunction _update(s, w, bytes) {\n // consume 512 bit (64 byte) chunks\n var t, a, b, c, d, f, r, i;\n var len = bytes.length();\n while(len >= 64) {\n // initialize hash value for this chunk\n a = s.h0;\n b = s.h1;\n c = s.h2;\n d = s.h3;\n\n // round 1\n for(i = 0; i < 16; ++i) {\n w[i] = bytes.getInt32Le();\n f = d ^ (b & (c ^ d));\n t = (a + f + _k[i] + w[i]);\n r = _r[i];\n a = d;\n d = c;\n c = b;\n b += (t << r) | (t >>> (32 - r));\n }\n // round 2\n for(; i < 32; ++i) {\n f = c ^ (d & (b ^ c));\n t = (a + f + _k[i] + w[_g[i]]);\n r = _r[i];\n a = d;\n d = c;\n c = b;\n b += (t << r) | (t >>> (32 - r));\n }\n // round 3\n for(; i < 48; ++i) {\n f = b ^ c ^ d;\n t = (a + f + _k[i] + w[_g[i]]);\n r = _r[i];\n a = d;\n d = c;\n c = b;\n b += (t << r) | (t >>> (32 - r));\n }\n // round 4\n for(; i < 64; ++i) {\n f = c ^ (b | ~d);\n t = (a + f + _k[i] + w[_g[i]]);\n r = _r[i];\n a = d;\n d = c;\n c = b;\n b += (t << r) | (t >>> (32 - r));\n }\n\n // update hash state\n s.h0 = (s.h0 + a) | 0;\n s.h1 = (s.h1 + b) | 0;\n s.h2 = (s.h2 + c) | 0;\n s.h3 = (s.h3 + d) | 0;\n\n len -= 64;\n }\n}\n","/**\n * Javascript implementation of basic PEM (Privacy Enhanced Mail) algorithms.\n *\n * See: RFC 1421.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2013-2014 Digital Bazaar, Inc.\n *\n * A Forge PEM object has the following fields:\n *\n * type: identifies the type of message (eg: \"RSA PRIVATE KEY\").\n *\n * procType: identifies the type of processing performed on the message,\n * it has two subfields: version and type, eg: 4,ENCRYPTED.\n *\n * contentDomain: identifies the type of content in the message, typically\n * only uses the value: \"RFC822\".\n *\n * dekInfo: identifies the message encryption algorithm and mode and includes\n * any parameters for the algorithm, it has two subfields: algorithm and\n * parameters, eg: DES-CBC,F8143EDE5960C597.\n *\n * headers: contains all other PEM encapsulated headers -- where order is\n * significant (for pairing data like recipient ID + key info).\n *\n * body: the binary-encoded body.\n */\nvar forge = require('./forge');\nrequire('./util');\n\n// shortcut for pem API\nvar pem = module.exports = forge.pem = forge.pem || {};\n\n/**\n * Encodes (serializes) the given PEM object.\n *\n * @param msg the PEM message object to encode.\n * @param options the options to use:\n * maxline the maximum characters per line for the body, (default: 64).\n *\n * @return the PEM-formatted string.\n */\npem.encode = function(msg, options) {\n options = options || {};\n var rval = '-----BEGIN ' + msg.type + '-----\\r\\n';\n\n // encode special headers\n var header;\n if(msg.procType) {\n header = {\n name: 'Proc-Type',\n values: [String(msg.procType.version), msg.procType.type]\n };\n rval += foldHeader(header);\n }\n if(msg.contentDomain) {\n header = {name: 'Content-Domain', values: [msg.contentDomain]};\n rval += foldHeader(header);\n }\n if(msg.dekInfo) {\n header = {name: 'DEK-Info', values: [msg.dekInfo.algorithm]};\n if(msg.dekInfo.parameters) {\n header.values.push(msg.dekInfo.parameters);\n }\n rval += foldHeader(header);\n }\n\n if(msg.headers) {\n // encode all other headers\n for(var i = 0; i < msg.headers.length; ++i) {\n rval += foldHeader(msg.headers[i]);\n }\n }\n\n // terminate header\n if(msg.procType) {\n rval += '\\r\\n';\n }\n\n // add body\n rval += forge.util.encode64(msg.body, options.maxline || 64) + '\\r\\n';\n\n rval += '-----END ' + msg.type + '-----\\r\\n';\n return rval;\n};\n\n/**\n * Decodes (deserializes) all PEM messages found in the given string.\n *\n * @param str the PEM-formatted string to decode.\n *\n * @return the PEM message objects in an array.\n */\npem.decode = function(str) {\n var rval = [];\n\n // split string into PEM messages (be lenient w/EOF on BEGIN line)\n var rMessage = /\\s*-----BEGIN ([A-Z0-9- ]+)-----\\r?\\n?([\\x21-\\x7e\\s]+?(?:\\r?\\n\\r?\\n))?([:A-Za-z0-9+\\/=\\s]+?)-----END \\1-----/g;\n var rHeader = /([\\x21-\\x7e]+):\\s*([\\x21-\\x7e\\s^:]+)/;\n var rCRLF = /\\r?\\n/;\n var match;\n while(true) {\n match = rMessage.exec(str);\n if(!match) {\n break;\n }\n\n // accept \"NEW CERTIFICATE REQUEST\" as \"CERTIFICATE REQUEST\"\n // https://datatracker.ietf.org/doc/html/rfc7468#section-7\n var type = match[1];\n if(type === 'NEW CERTIFICATE REQUEST') {\n type = 'CERTIFICATE REQUEST';\n }\n\n var msg = {\n type: type,\n procType: null,\n contentDomain: null,\n dekInfo: null,\n headers: [],\n body: forge.util.decode64(match[3])\n };\n rval.push(msg);\n\n // no headers\n if(!match[2]) {\n continue;\n }\n\n // parse headers\n var lines = match[2].split(rCRLF);\n var li = 0;\n while(match && li < lines.length) {\n // get line, trim any rhs whitespace\n var line = lines[li].replace(/\\s+$/, '');\n\n // RFC2822 unfold any following folded lines\n for(var nl = li + 1; nl < lines.length; ++nl) {\n var next = lines[nl];\n if(!/\\s/.test(next[0])) {\n break;\n }\n line += next;\n li = nl;\n }\n\n // parse header\n match = line.match(rHeader);\n if(match) {\n var header = {name: match[1], values: []};\n var values = match[2].split(',');\n for(var vi = 0; vi < values.length; ++vi) {\n header.values.push(ltrim(values[vi]));\n }\n\n // Proc-Type must be the first header\n if(!msg.procType) {\n if(header.name !== 'Proc-Type') {\n throw new Error('Invalid PEM formatted message. The first ' +\n 'encapsulated header must be \"Proc-Type\".');\n } else if(header.values.length !== 2) {\n throw new Error('Invalid PEM formatted message. The \"Proc-Type\" ' +\n 'header must have two subfields.');\n }\n msg.procType = {version: values[0], type: values[1]};\n } else if(!msg.contentDomain && header.name === 'Content-Domain') {\n // special-case Content-Domain\n msg.contentDomain = values[0] || '';\n } else if(!msg.dekInfo && header.name === 'DEK-Info') {\n // special-case DEK-Info\n if(header.values.length === 0) {\n throw new Error('Invalid PEM formatted message. The \"DEK-Info\" ' +\n 'header must have at least one subfield.');\n }\n msg.dekInfo = {algorithm: values[0], parameters: values[1] || null};\n } else {\n msg.headers.push(header);\n }\n }\n\n ++li;\n }\n\n if(msg.procType === 'ENCRYPTED' && !msg.dekInfo) {\n throw new Error('Invalid PEM formatted message. The \"DEK-Info\" ' +\n 'header must be present if \"Proc-Type\" is \"ENCRYPTED\".');\n }\n }\n\n if(rval.length === 0) {\n throw new Error('Invalid PEM formatted message.');\n }\n\n return rval;\n};\n\nfunction foldHeader(header) {\n var rval = header.name + ': ';\n\n // ensure values with CRLF are folded\n var values = [];\n var insertSpace = function(match, $1) {\n return ' ' + $1;\n };\n for(var i = 0; i < header.values.length; ++i) {\n values.push(header.values[i].replace(/^(\\S+\\r\\n)/, insertSpace));\n }\n rval += values.join(',') + '\\r\\n';\n\n // do folding\n var length = 0;\n var candidate = -1;\n for(var i = 0; i < rval.length; ++i, ++length) {\n if(length > 65 && candidate !== -1) {\n var insert = rval[candidate];\n if(insert === ',') {\n ++candidate;\n rval = rval.substr(0, candidate) + '\\r\\n ' + rval.substr(candidate);\n } else {\n rval = rval.substr(0, candidate) +\n '\\r\\n' + insert + rval.substr(candidate + 1);\n }\n length = (i - candidate - 1);\n candidate = -1;\n ++i;\n } else if(rval[i] === ' ' || rval[i] === '\\t' || rval[i] === ',') {\n candidate = i;\n }\n }\n\n return rval;\n}\n\nfunction ltrim(str) {\n return str.replace(/^\\s+/, '');\n}\n","/**\n * DES (Data Encryption Standard) implementation.\n *\n * This implementation supports DES as well as 3DES-EDE in ECB and CBC mode.\n * It is based on the BSD-licensed implementation by Paul Tero:\n *\n * Paul Tero, July 2001\n * http://www.tero.co.uk/des/\n *\n * Optimised for performance with large blocks by\n * Michael Hayworth, November 2001\n * http://www.netdealing.com\n *\n * THIS SOFTWARE IS PROVIDED \"AS IS\" AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * @author Stefan Siegl\n * @author Dave Longley\n *\n * Copyright (c) 2012 Stefan Siegl \n * Copyright (c) 2012-2014 Digital Bazaar, Inc.\n */\nvar forge = require('./forge');\nrequire('./cipher');\nrequire('./cipherModes');\nrequire('./util');\n\n/* DES API */\nmodule.exports = forge.des = forge.des || {};\n\n/**\n * Deprecated. Instead, use:\n *\n * var cipher = forge.cipher.createCipher('DES-', key);\n * cipher.start({iv: iv});\n *\n * Creates an DES cipher object to encrypt data using the given symmetric key.\n * The output will be stored in the 'output' member of the returned cipher.\n *\n * The key and iv may be given as binary-encoded strings of bytes or\n * byte buffers.\n *\n * @param key the symmetric key to use (64 or 192 bits).\n * @param iv the initialization vector to use.\n * @param output the buffer to write to, null to create one.\n * @param mode the cipher mode to use (default: 'CBC' if IV is\n * given, 'ECB' if null).\n *\n * @return the cipher.\n */\nforge.des.startEncrypting = function(key, iv, output, mode) {\n var cipher = _createCipher({\n key: key,\n output: output,\n decrypt: false,\n mode: mode || (iv === null ? 'ECB' : 'CBC')\n });\n cipher.start(iv);\n return cipher;\n};\n\n/**\n * Deprecated. Instead, use:\n *\n * var cipher = forge.cipher.createCipher('DES-', key);\n *\n * Creates an DES cipher object to encrypt data using the given symmetric key.\n *\n * The key may be given as a binary-encoded string of bytes or a byte buffer.\n *\n * @param key the symmetric key to use (64 or 192 bits).\n * @param mode the cipher mode to use (default: 'CBC').\n *\n * @return the cipher.\n */\nforge.des.createEncryptionCipher = function(key, mode) {\n return _createCipher({\n key: key,\n output: null,\n decrypt: false,\n mode: mode\n });\n};\n\n/**\n * Deprecated. Instead, use:\n *\n * var decipher = forge.cipher.createDecipher('DES-', key);\n * decipher.start({iv: iv});\n *\n * Creates an DES cipher object to decrypt data using the given symmetric key.\n * The output will be stored in the 'output' member of the returned cipher.\n *\n * The key and iv may be given as binary-encoded strings of bytes or\n * byte buffers.\n *\n * @param key the symmetric key to use (64 or 192 bits).\n * @param iv the initialization vector to use.\n * @param output the buffer to write to, null to create one.\n * @param mode the cipher mode to use (default: 'CBC' if IV is\n * given, 'ECB' if null).\n *\n * @return the cipher.\n */\nforge.des.startDecrypting = function(key, iv, output, mode) {\n var cipher = _createCipher({\n key: key,\n output: output,\n decrypt: true,\n mode: mode || (iv === null ? 'ECB' : 'CBC')\n });\n cipher.start(iv);\n return cipher;\n};\n\n/**\n * Deprecated. Instead, use:\n *\n * var decipher = forge.cipher.createDecipher('DES-', key);\n *\n * Creates an DES cipher object to decrypt data using the given symmetric key.\n *\n * The key may be given as a binary-encoded string of bytes or a byte buffer.\n *\n * @param key the symmetric key to use (64 or 192 bits).\n * @param mode the cipher mode to use (default: 'CBC').\n *\n * @return the cipher.\n */\nforge.des.createDecryptionCipher = function(key, mode) {\n return _createCipher({\n key: key,\n output: null,\n decrypt: true,\n mode: mode\n });\n};\n\n/**\n * Creates a new DES cipher algorithm object.\n *\n * @param name the name of the algorithm.\n * @param mode the mode factory function.\n *\n * @return the DES algorithm object.\n */\nforge.des.Algorithm = function(name, mode) {\n var self = this;\n self.name = name;\n self.mode = new mode({\n blockSize: 8,\n cipher: {\n encrypt: function(inBlock, outBlock) {\n return _updateBlock(self._keys, inBlock, outBlock, false);\n },\n decrypt: function(inBlock, outBlock) {\n return _updateBlock(self._keys, inBlock, outBlock, true);\n }\n }\n });\n self._init = false;\n};\n\n/**\n * Initializes this DES algorithm by expanding its key.\n *\n * @param options the options to use.\n * key the key to use with this algorithm.\n * decrypt true if the algorithm should be initialized for decryption,\n * false for encryption.\n */\nforge.des.Algorithm.prototype.initialize = function(options) {\n if(this._init) {\n return;\n }\n\n var key = forge.util.createBuffer(options.key);\n if(this.name.indexOf('3DES') === 0) {\n if(key.length() !== 24) {\n throw new Error('Invalid Triple-DES key size: ' + key.length() * 8);\n }\n }\n\n // do key expansion to 16 or 48 subkeys (single or triple DES)\n this._keys = _createKeys(key);\n this._init = true;\n};\n\n/** Register DES algorithms **/\n\nregisterAlgorithm('DES-ECB', forge.cipher.modes.ecb);\nregisterAlgorithm('DES-CBC', forge.cipher.modes.cbc);\nregisterAlgorithm('DES-CFB', forge.cipher.modes.cfb);\nregisterAlgorithm('DES-OFB', forge.cipher.modes.ofb);\nregisterAlgorithm('DES-CTR', forge.cipher.modes.ctr);\n\nregisterAlgorithm('3DES-ECB', forge.cipher.modes.ecb);\nregisterAlgorithm('3DES-CBC', forge.cipher.modes.cbc);\nregisterAlgorithm('3DES-CFB', forge.cipher.modes.cfb);\nregisterAlgorithm('3DES-OFB', forge.cipher.modes.ofb);\nregisterAlgorithm('3DES-CTR', forge.cipher.modes.ctr);\n\nfunction registerAlgorithm(name, mode) {\n var factory = function() {\n return new forge.des.Algorithm(name, mode);\n };\n forge.cipher.registerAlgorithm(name, factory);\n}\n\n/** DES implementation **/\n\nvar spfunction1 = [0x1010400,0,0x10000,0x1010404,0x1010004,0x10404,0x4,0x10000,0x400,0x1010400,0x1010404,0x400,0x1000404,0x1010004,0x1000000,0x4,0x404,0x1000400,0x1000400,0x10400,0x10400,0x1010000,0x1010000,0x1000404,0x10004,0x1000004,0x1000004,0x10004,0,0x404,0x10404,0x1000000,0x10000,0x1010404,0x4,0x1010000,0x1010400,0x1000000,0x1000000,0x400,0x1010004,0x10000,0x10400,0x1000004,0x400,0x4,0x1000404,0x10404,0x1010404,0x10004,0x1010000,0x1000404,0x1000004,0x404,0x10404,0x1010400,0x404,0x1000400,0x1000400,0,0x10004,0x10400,0,0x1010004];\nvar spfunction2 = [-0x7fef7fe0,-0x7fff8000,0x8000,0x108020,0x100000,0x20,-0x7fefffe0,-0x7fff7fe0,-0x7fffffe0,-0x7fef7fe0,-0x7fef8000,-0x80000000,-0x7fff8000,0x100000,0x20,-0x7fefffe0,0x108000,0x100020,-0x7fff7fe0,0,-0x80000000,0x8000,0x108020,-0x7ff00000,0x100020,-0x7fffffe0,0,0x108000,0x8020,-0x7fef8000,-0x7ff00000,0x8020,0,0x108020,-0x7fefffe0,0x100000,-0x7fff7fe0,-0x7ff00000,-0x7fef8000,0x8000,-0x7ff00000,-0x7fff8000,0x20,-0x7fef7fe0,0x108020,0x20,0x8000,-0x80000000,0x8020,-0x7fef8000,0x100000,-0x7fffffe0,0x100020,-0x7fff7fe0,-0x7fffffe0,0x100020,0x108000,0,-0x7fff8000,0x8020,-0x80000000,-0x7fefffe0,-0x7fef7fe0,0x108000];\nvar spfunction3 = [0x208,0x8020200,0,0x8020008,0x8000200,0,0x20208,0x8000200,0x20008,0x8000008,0x8000008,0x20000,0x8020208,0x20008,0x8020000,0x208,0x8000000,0x8,0x8020200,0x200,0x20200,0x8020000,0x8020008,0x20208,0x8000208,0x20200,0x20000,0x8000208,0x8,0x8020208,0x200,0x8000000,0x8020200,0x8000000,0x20008,0x208,0x20000,0x8020200,0x8000200,0,0x200,0x20008,0x8020208,0x8000200,0x8000008,0x200,0,0x8020008,0x8000208,0x20000,0x8000000,0x8020208,0x8,0x20208,0x20200,0x8000008,0x8020000,0x8000208,0x208,0x8020000,0x20208,0x8,0x8020008,0x20200];\nvar spfunction4 = [0x802001,0x2081,0x2081,0x80,0x802080,0x800081,0x800001,0x2001,0,0x802000,0x802000,0x802081,0x81,0,0x800080,0x800001,0x1,0x2000,0x800000,0x802001,0x80,0x800000,0x2001,0x2080,0x800081,0x1,0x2080,0x800080,0x2000,0x802080,0x802081,0x81,0x800080,0x800001,0x802000,0x802081,0x81,0,0,0x802000,0x2080,0x800080,0x800081,0x1,0x802001,0x2081,0x2081,0x80,0x802081,0x81,0x1,0x2000,0x800001,0x2001,0x802080,0x800081,0x2001,0x2080,0x800000,0x802001,0x80,0x800000,0x2000,0x802080];\nvar spfunction5 = [0x100,0x2080100,0x2080000,0x42000100,0x80000,0x100,0x40000000,0x2080000,0x40080100,0x80000,0x2000100,0x40080100,0x42000100,0x42080000,0x80100,0x40000000,0x2000000,0x40080000,0x40080000,0,0x40000100,0x42080100,0x42080100,0x2000100,0x42080000,0x40000100,0,0x42000000,0x2080100,0x2000000,0x42000000,0x80100,0x80000,0x42000100,0x100,0x2000000,0x40000000,0x2080000,0x42000100,0x40080100,0x2000100,0x40000000,0x42080000,0x2080100,0x40080100,0x100,0x2000000,0x42080000,0x42080100,0x80100,0x42000000,0x42080100,0x2080000,0,0x40080000,0x42000000,0x80100,0x2000100,0x40000100,0x80000,0,0x40080000,0x2080100,0x40000100];\nvar spfunction6 = [0x20000010,0x20400000,0x4000,0x20404010,0x20400000,0x10,0x20404010,0x400000,0x20004000,0x404010,0x400000,0x20000010,0x400010,0x20004000,0x20000000,0x4010,0,0x400010,0x20004010,0x4000,0x404000,0x20004010,0x10,0x20400010,0x20400010,0,0x404010,0x20404000,0x4010,0x404000,0x20404000,0x20000000,0x20004000,0x10,0x20400010,0x404000,0x20404010,0x400000,0x4010,0x20000010,0x400000,0x20004000,0x20000000,0x4010,0x20000010,0x20404010,0x404000,0x20400000,0x404010,0x20404000,0,0x20400010,0x10,0x4000,0x20400000,0x404010,0x4000,0x400010,0x20004010,0,0x20404000,0x20000000,0x400010,0x20004010];\nvar spfunction7 = [0x200000,0x4200002,0x4000802,0,0x800,0x4000802,0x200802,0x4200800,0x4200802,0x200000,0,0x4000002,0x2,0x4000000,0x4200002,0x802,0x4000800,0x200802,0x200002,0x4000800,0x4000002,0x4200000,0x4200800,0x200002,0x4200000,0x800,0x802,0x4200802,0x200800,0x2,0x4000000,0x200800,0x4000000,0x200800,0x200000,0x4000802,0x4000802,0x4200002,0x4200002,0x2,0x200002,0x4000000,0x4000800,0x200000,0x4200800,0x802,0x200802,0x4200800,0x802,0x4000002,0x4200802,0x4200000,0x200800,0,0x2,0x4200802,0,0x200802,0x4200000,0x800,0x4000002,0x4000800,0x800,0x200002];\nvar spfunction8 = [0x10001040,0x1000,0x40000,0x10041040,0x10000000,0x10001040,0x40,0x10000000,0x40040,0x10040000,0x10041040,0x41000,0x10041000,0x41040,0x1000,0x40,0x10040000,0x10000040,0x10001000,0x1040,0x41000,0x40040,0x10040040,0x10041000,0x1040,0,0,0x10040040,0x10000040,0x10001000,0x41040,0x40000,0x41040,0x40000,0x10041000,0x1000,0x40,0x10040040,0x1000,0x41040,0x10001000,0x40,0x10000040,0x10040000,0x10040040,0x10000000,0x40000,0x10001040,0,0x10041040,0x40040,0x10000040,0x10040000,0x10001000,0x10001040,0,0x10041040,0x41000,0x41000,0x1040,0x1040,0x40040,0x10000000,0x10041000];\n\n/**\n * Create necessary sub keys.\n *\n * @param key the 64-bit or 192-bit key.\n *\n * @return the expanded keys.\n */\nfunction _createKeys(key) {\n var pc2bytes0 = [0,0x4,0x20000000,0x20000004,0x10000,0x10004,0x20010000,0x20010004,0x200,0x204,0x20000200,0x20000204,0x10200,0x10204,0x20010200,0x20010204],\n pc2bytes1 = [0,0x1,0x100000,0x100001,0x4000000,0x4000001,0x4100000,0x4100001,0x100,0x101,0x100100,0x100101,0x4000100,0x4000101,0x4100100,0x4100101],\n pc2bytes2 = [0,0x8,0x800,0x808,0x1000000,0x1000008,0x1000800,0x1000808,0,0x8,0x800,0x808,0x1000000,0x1000008,0x1000800,0x1000808],\n pc2bytes3 = [0,0x200000,0x8000000,0x8200000,0x2000,0x202000,0x8002000,0x8202000,0x20000,0x220000,0x8020000,0x8220000,0x22000,0x222000,0x8022000,0x8222000],\n pc2bytes4 = [0,0x40000,0x10,0x40010,0,0x40000,0x10,0x40010,0x1000,0x41000,0x1010,0x41010,0x1000,0x41000,0x1010,0x41010],\n pc2bytes5 = [0,0x400,0x20,0x420,0,0x400,0x20,0x420,0x2000000,0x2000400,0x2000020,0x2000420,0x2000000,0x2000400,0x2000020,0x2000420],\n pc2bytes6 = [0,0x10000000,0x80000,0x10080000,0x2,0x10000002,0x80002,0x10080002,0,0x10000000,0x80000,0x10080000,0x2,0x10000002,0x80002,0x10080002],\n pc2bytes7 = [0,0x10000,0x800,0x10800,0x20000000,0x20010000,0x20000800,0x20010800,0x20000,0x30000,0x20800,0x30800,0x20020000,0x20030000,0x20020800,0x20030800],\n pc2bytes8 = [0,0x40000,0,0x40000,0x2,0x40002,0x2,0x40002,0x2000000,0x2040000,0x2000000,0x2040000,0x2000002,0x2040002,0x2000002,0x2040002],\n pc2bytes9 = [0,0x10000000,0x8,0x10000008,0,0x10000000,0x8,0x10000008,0x400,0x10000400,0x408,0x10000408,0x400,0x10000400,0x408,0x10000408],\n pc2bytes10 = [0,0x20,0,0x20,0x100000,0x100020,0x100000,0x100020,0x2000,0x2020,0x2000,0x2020,0x102000,0x102020,0x102000,0x102020],\n pc2bytes11 = [0,0x1000000,0x200,0x1000200,0x200000,0x1200000,0x200200,0x1200200,0x4000000,0x5000000,0x4000200,0x5000200,0x4200000,0x5200000,0x4200200,0x5200200],\n pc2bytes12 = [0,0x1000,0x8000000,0x8001000,0x80000,0x81000,0x8080000,0x8081000,0x10,0x1010,0x8000010,0x8001010,0x80010,0x81010,0x8080010,0x8081010],\n pc2bytes13 = [0,0x4,0x100,0x104,0,0x4,0x100,0x104,0x1,0x5,0x101,0x105,0x1,0x5,0x101,0x105];\n\n // how many iterations (1 for des, 3 for triple des)\n // changed by Paul 16/6/2007 to use Triple DES for 9+ byte keys\n var iterations = key.length() > 8 ? 3 : 1;\n\n // stores the return keys\n var keys = [];\n\n // now define the left shifts which need to be done\n var shifts = [0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0];\n\n var n = 0, tmp;\n for(var j = 0; j < iterations; j++) {\n var left = key.getInt32();\n var right = key.getInt32();\n\n tmp = ((left >>> 4) ^ right) & 0x0f0f0f0f;\n right ^= tmp;\n left ^= (tmp << 4);\n\n tmp = ((right >>> -16) ^ left) & 0x0000ffff;\n left ^= tmp;\n right ^= (tmp << -16);\n\n tmp = ((left >>> 2) ^ right) & 0x33333333;\n right ^= tmp;\n left ^= (tmp << 2);\n\n tmp = ((right >>> -16) ^ left) & 0x0000ffff;\n left ^= tmp;\n right ^= (tmp << -16);\n\n tmp = ((left >>> 1) ^ right) & 0x55555555;\n right ^= tmp;\n left ^= (tmp << 1);\n\n tmp = ((right >>> 8) ^ left) & 0x00ff00ff;\n left ^= tmp;\n right ^= (tmp << 8);\n\n tmp = ((left >>> 1) ^ right) & 0x55555555;\n right ^= tmp;\n left ^= (tmp << 1);\n\n // right needs to be shifted and OR'd with last four bits of left\n tmp = (left << 8) | ((right >>> 20) & 0x000000f0);\n\n // left needs to be put upside down\n left = ((right << 24) | ((right << 8) & 0xff0000) |\n ((right >>> 8) & 0xff00) | ((right >>> 24) & 0xf0));\n right = tmp;\n\n // now go through and perform these shifts on the left and right keys\n for(var i = 0; i < shifts.length; ++i) {\n //shift the keys either one or two bits to the left\n if(shifts[i]) {\n left = (left << 2) | (left >>> 26);\n right = (right << 2) | (right >>> 26);\n } else {\n left = (left << 1) | (left >>> 27);\n right = (right << 1) | (right >>> 27);\n }\n left &= -0xf;\n right &= -0xf;\n\n // now apply PC-2, in such a way that E is easier when encrypting or\n // decrypting this conversion will look like PC-2 except only the last 6\n // bits of each byte are used rather than 48 consecutive bits and the\n // order of lines will be according to how the S selection functions will\n // be applied: S2, S4, S6, S8, S1, S3, S5, S7\n var lefttmp = (\n pc2bytes0[left >>> 28] | pc2bytes1[(left >>> 24) & 0xf] |\n pc2bytes2[(left >>> 20) & 0xf] | pc2bytes3[(left >>> 16) & 0xf] |\n pc2bytes4[(left >>> 12) & 0xf] | pc2bytes5[(left >>> 8) & 0xf] |\n pc2bytes6[(left >>> 4) & 0xf]);\n var righttmp = (\n pc2bytes7[right >>> 28] | pc2bytes8[(right >>> 24) & 0xf] |\n pc2bytes9[(right >>> 20) & 0xf] | pc2bytes10[(right >>> 16) & 0xf] |\n pc2bytes11[(right >>> 12) & 0xf] | pc2bytes12[(right >>> 8) & 0xf] |\n pc2bytes13[(right >>> 4) & 0xf]);\n tmp = ((righttmp >>> 16) ^ lefttmp) & 0x0000ffff;\n keys[n++] = lefttmp ^ tmp;\n keys[n++] = righttmp ^ (tmp << 16);\n }\n }\n\n return keys;\n}\n\n/**\n * Updates a single block (1 byte) using DES. The update will either\n * encrypt or decrypt the block.\n *\n * @param keys the expanded keys.\n * @param input the input block (an array of 32-bit words).\n * @param output the updated output block.\n * @param decrypt true to decrypt the block, false to encrypt it.\n */\nfunction _updateBlock(keys, input, output, decrypt) {\n // set up loops for single or triple DES\n var iterations = keys.length === 32 ? 3 : 9;\n var looping;\n if(iterations === 3) {\n looping = decrypt ? [30, -2, -2] : [0, 32, 2];\n } else {\n looping = (decrypt ?\n [94, 62, -2, 32, 64, 2, 30, -2, -2] :\n [0, 32, 2, 62, 30, -2, 64, 96, 2]);\n }\n\n var tmp;\n\n var left = input[0];\n var right = input[1];\n\n // first each 64 bit chunk of the message must be permuted according to IP\n tmp = ((left >>> 4) ^ right) & 0x0f0f0f0f;\n right ^= tmp;\n left ^= (tmp << 4);\n\n tmp = ((left >>> 16) ^ right) & 0x0000ffff;\n right ^= tmp;\n left ^= (tmp << 16);\n\n tmp = ((right >>> 2) ^ left) & 0x33333333;\n left ^= tmp;\n right ^= (tmp << 2);\n\n tmp = ((right >>> 8) ^ left) & 0x00ff00ff;\n left ^= tmp;\n right ^= (tmp << 8);\n\n tmp = ((left >>> 1) ^ right) & 0x55555555;\n right ^= tmp;\n left ^= (tmp << 1);\n\n // rotate left 1 bit\n left = ((left << 1) | (left >>> 31));\n right = ((right << 1) | (right >>> 31));\n\n for(var j = 0; j < iterations; j += 3) {\n var endloop = looping[j + 1];\n var loopinc = looping[j + 2];\n\n // now go through and perform the encryption or decryption\n for(var i = looping[j]; i != endloop; i += loopinc) {\n var right1 = right ^ keys[i];\n var right2 = ((right >>> 4) | (right << 28)) ^ keys[i + 1];\n\n // passing these bytes through the S selection functions\n tmp = left;\n left = right;\n right = tmp ^ (\n spfunction2[(right1 >>> 24) & 0x3f] |\n spfunction4[(right1 >>> 16) & 0x3f] |\n spfunction6[(right1 >>> 8) & 0x3f] |\n spfunction8[right1 & 0x3f] |\n spfunction1[(right2 >>> 24) & 0x3f] |\n spfunction3[(right2 >>> 16) & 0x3f] |\n spfunction5[(right2 >>> 8) & 0x3f] |\n spfunction7[right2 & 0x3f]);\n }\n // unreverse left and right\n tmp = left;\n left = right;\n right = tmp;\n }\n\n // rotate right 1 bit\n left = ((left >>> 1) | (left << 31));\n right = ((right >>> 1) | (right << 31));\n\n // now perform IP-1, which is IP in the opposite direction\n tmp = ((left >>> 1) ^ right) & 0x55555555;\n right ^= tmp;\n left ^= (tmp << 1);\n\n tmp = ((right >>> 8) ^ left) & 0x00ff00ff;\n left ^= tmp;\n right ^= (tmp << 8);\n\n tmp = ((right >>> 2) ^ left) & 0x33333333;\n left ^= tmp;\n right ^= (tmp << 2);\n\n tmp = ((left >>> 16) ^ right) & 0x0000ffff;\n right ^= tmp;\n left ^= (tmp << 16);\n\n tmp = ((left >>> 4) ^ right) & 0x0f0f0f0f;\n right ^= tmp;\n left ^= (tmp << 4);\n\n output[0] = left;\n output[1] = right;\n}\n\n/**\n * Deprecated. Instead, use:\n *\n * forge.cipher.createCipher('DES-', key);\n * forge.cipher.createDecipher('DES-', key);\n *\n * Creates a deprecated DES cipher object. This object's mode will default to\n * CBC (cipher-block-chaining).\n *\n * The key may be given as a binary-encoded string of bytes or a byte buffer.\n *\n * @param options the options to use.\n * key the symmetric key to use (64 or 192 bits).\n * output the buffer to write to.\n * decrypt true for decryption, false for encryption.\n * mode the cipher mode to use (default: 'CBC').\n *\n * @return the cipher.\n */\nfunction _createCipher(options) {\n options = options || {};\n var mode = (options.mode || 'CBC').toUpperCase();\n var algorithm = 'DES-' + mode;\n\n var cipher;\n if(options.decrypt) {\n cipher = forge.cipher.createDecipher(algorithm, options.key);\n } else {\n cipher = forge.cipher.createCipher(algorithm, options.key);\n }\n\n // backwards compatible start API\n var start = cipher.start;\n cipher.start = function(iv, options) {\n // backwards compatibility: support second arg as output buffer\n var output = null;\n if(options instanceof forge.util.ByteBuffer) {\n output = options;\n options = {};\n }\n options = options || {};\n options.output = output;\n options.iv = iv;\n start.call(cipher, options);\n };\n\n return cipher;\n}\n","/**\n * Password-Based Key-Derivation Function #2 implementation.\n *\n * See RFC 2898 for details.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2010-2013 Digital Bazaar, Inc.\n */\nvar forge = require('./forge');\nrequire('./hmac');\nrequire('./md');\nrequire('./util');\n\nvar pkcs5 = forge.pkcs5 = forge.pkcs5 || {};\n\nvar crypto;\nif(forge.util.isNodejs && !forge.options.usePureJavaScript) {\n crypto = require('crypto');\n}\n\n/**\n * Derives a key from a password.\n *\n * @param p the password as a binary-encoded string of bytes.\n * @param s the salt as a binary-encoded string of bytes.\n * @param c the iteration count, a positive integer.\n * @param dkLen the intended length, in bytes, of the derived key,\n * (max: 2^32 - 1) * hash length of the PRF.\n * @param [md] the message digest (or algorithm identifier as a string) to use\n * in the PRF, defaults to SHA-1.\n * @param [callback(err, key)] presence triggers asynchronous version, called\n * once the operation completes.\n *\n * @return the derived key, as a binary-encoded string of bytes, for the\n * synchronous version (if no callback is specified).\n */\nmodule.exports = forge.pbkdf2 = pkcs5.pbkdf2 = function(\n p, s, c, dkLen, md, callback) {\n if(typeof md === 'function') {\n callback = md;\n md = null;\n }\n\n // use native implementation if possible and not disabled, note that\n // some node versions only support SHA-1, others allow digest to be changed\n if(forge.util.isNodejs && !forge.options.usePureJavaScript &&\n crypto.pbkdf2 && (md === null || typeof md !== 'object') &&\n (crypto.pbkdf2Sync.length > 4 || (!md || md === 'sha1'))) {\n if(typeof md !== 'string') {\n // default prf to SHA-1\n md = 'sha1';\n }\n p = Buffer.from(p, 'binary');\n s = Buffer.from(s, 'binary');\n if(!callback) {\n if(crypto.pbkdf2Sync.length === 4) {\n return crypto.pbkdf2Sync(p, s, c, dkLen).toString('binary');\n }\n return crypto.pbkdf2Sync(p, s, c, dkLen, md).toString('binary');\n }\n if(crypto.pbkdf2Sync.length === 4) {\n return crypto.pbkdf2(p, s, c, dkLen, function(err, key) {\n if(err) {\n return callback(err);\n }\n callback(null, key.toString('binary'));\n });\n }\n return crypto.pbkdf2(p, s, c, dkLen, md, function(err, key) {\n if(err) {\n return callback(err);\n }\n callback(null, key.toString('binary'));\n });\n }\n\n if(typeof md === 'undefined' || md === null) {\n // default prf to SHA-1\n md = 'sha1';\n }\n if(typeof md === 'string') {\n if(!(md in forge.md.algorithms)) {\n throw new Error('Unknown hash algorithm: ' + md);\n }\n md = forge.md[md].create();\n }\n\n var hLen = md.digestLength;\n\n /* 1. If dkLen > (2^32 - 1) * hLen, output \"derived key too long\" and\n stop. */\n if(dkLen > (0xFFFFFFFF * hLen)) {\n var err = new Error('Derived key is too long.');\n if(callback) {\n return callback(err);\n }\n throw err;\n }\n\n /* 2. Let len be the number of hLen-octet blocks in the derived key,\n rounding up, and let r be the number of octets in the last\n block:\n\n len = CEIL(dkLen / hLen),\n r = dkLen - (len - 1) * hLen. */\n var len = Math.ceil(dkLen / hLen);\n var r = dkLen - (len - 1) * hLen;\n\n /* 3. For each block of the derived key apply the function F defined\n below to the password P, the salt S, the iteration count c, and\n the block index to compute the block:\n\n T_1 = F(P, S, c, 1),\n T_2 = F(P, S, c, 2),\n ...\n T_len = F(P, S, c, len),\n\n where the function F is defined as the exclusive-or sum of the\n first c iterates of the underlying pseudorandom function PRF\n applied to the password P and the concatenation of the salt S\n and the block index i:\n\n F(P, S, c, i) = u_1 XOR u_2 XOR ... XOR u_c\n\n where\n\n u_1 = PRF(P, S || INT(i)),\n u_2 = PRF(P, u_1),\n ...\n u_c = PRF(P, u_{c-1}).\n\n Here, INT(i) is a four-octet encoding of the integer i, most\n significant octet first. */\n var prf = forge.hmac.create();\n prf.start(md, p);\n var dk = '';\n var xor, u_c, u_c1;\n\n // sync version\n if(!callback) {\n for(var i = 1; i <= len; ++i) {\n // PRF(P, S || INT(i)) (first iteration)\n prf.start(null, null);\n prf.update(s);\n prf.update(forge.util.int32ToBytes(i));\n xor = u_c1 = prf.digest().getBytes();\n\n // PRF(P, u_{c-1}) (other iterations)\n for(var j = 2; j <= c; ++j) {\n prf.start(null, null);\n prf.update(u_c1);\n u_c = prf.digest().getBytes();\n // F(p, s, c, i)\n xor = forge.util.xorBytes(xor, u_c, hLen);\n u_c1 = u_c;\n }\n\n /* 4. Concatenate the blocks and extract the first dkLen octets to\n produce a derived key DK:\n\n DK = T_1 || T_2 || ... || T_len<0..r-1> */\n dk += (i < len) ? xor : xor.substr(0, r);\n }\n /* 5. Output the derived key DK. */\n return dk;\n }\n\n // async version\n var i = 1, j;\n function outer() {\n if(i > len) {\n // done\n return callback(null, dk);\n }\n\n // PRF(P, S || INT(i)) (first iteration)\n prf.start(null, null);\n prf.update(s);\n prf.update(forge.util.int32ToBytes(i));\n xor = u_c1 = prf.digest().getBytes();\n\n // PRF(P, u_{c-1}) (other iterations)\n j = 2;\n inner();\n }\n\n function inner() {\n if(j <= c) {\n prf.start(null, null);\n prf.update(u_c1);\n u_c = prf.digest().getBytes();\n // F(p, s, c, i)\n xor = forge.util.xorBytes(xor, u_c, hLen);\n u_c1 = u_c;\n ++j;\n return forge.util.setImmediate(inner);\n }\n\n /* 4. Concatenate the blocks and extract the first dkLen octets to\n produce a derived key DK:\n\n DK = T_1 || T_2 || ... || T_len<0..r-1> */\n dk += (i < len) ? xor : xor.substr(0, r);\n\n ++i;\n outer();\n }\n\n outer();\n};\n","/**\n * Secure Hash Algorithm with 256-bit digest (SHA-256) implementation.\n *\n * See FIPS 180-2 for details.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2010-2015 Digital Bazaar, Inc.\n */\nvar forge = require('./forge');\nrequire('./md');\nrequire('./util');\n\nvar sha256 = module.exports = forge.sha256 = forge.sha256 || {};\nforge.md.sha256 = forge.md.algorithms.sha256 = sha256;\n\n/**\n * Creates a SHA-256 message digest object.\n *\n * @return a message digest object.\n */\nsha256.create = function() {\n // do initialization as necessary\n if(!_initialized) {\n _init();\n }\n\n // SHA-256 state contains eight 32-bit integers\n var _state = null;\n\n // input buffer\n var _input = forge.util.createBuffer();\n\n // used for word storage\n var _w = new Array(64);\n\n // message digest object\n var md = {\n algorithm: 'sha256',\n blockLength: 64,\n digestLength: 32,\n // 56-bit length of message so far (does not including padding)\n messageLength: 0,\n // true message length\n fullMessageLength: null,\n // size of message length in bytes\n messageLengthSize: 8\n };\n\n /**\n * Starts the digest.\n *\n * @return this digest object.\n */\n md.start = function() {\n // up to 56-bit message length for convenience\n md.messageLength = 0;\n\n // full message length (set md.messageLength64 for backwards-compatibility)\n md.fullMessageLength = md.messageLength64 = [];\n var int32s = md.messageLengthSize / 4;\n for(var i = 0; i < int32s; ++i) {\n md.fullMessageLength.push(0);\n }\n _input = forge.util.createBuffer();\n _state = {\n h0: 0x6A09E667,\n h1: 0xBB67AE85,\n h2: 0x3C6EF372,\n h3: 0xA54FF53A,\n h4: 0x510E527F,\n h5: 0x9B05688C,\n h6: 0x1F83D9AB,\n h7: 0x5BE0CD19\n };\n return md;\n };\n // start digest automatically for first time\n md.start();\n\n /**\n * Updates the digest with the given message input. The given input can\n * treated as raw input (no encoding will be applied) or an encoding of\n * 'utf8' maybe given to encode the input using UTF-8.\n *\n * @param msg the message input to update with.\n * @param encoding the encoding to use (default: 'raw', other: 'utf8').\n *\n * @return this digest object.\n */\n md.update = function(msg, encoding) {\n if(encoding === 'utf8') {\n msg = forge.util.encodeUtf8(msg);\n }\n\n // update message length\n var len = msg.length;\n md.messageLength += len;\n len = [(len / 0x100000000) >>> 0, len >>> 0];\n for(var i = md.fullMessageLength.length - 1; i >= 0; --i) {\n md.fullMessageLength[i] += len[1];\n len[1] = len[0] + ((md.fullMessageLength[i] / 0x100000000) >>> 0);\n md.fullMessageLength[i] = md.fullMessageLength[i] >>> 0;\n len[0] = ((len[1] / 0x100000000) >>> 0);\n }\n\n // add bytes to input buffer\n _input.putBytes(msg);\n\n // process bytes\n _update(_state, _w, _input);\n\n // compact input buffer every 2K or if empty\n if(_input.read > 2048 || _input.length() === 0) {\n _input.compact();\n }\n\n return md;\n };\n\n /**\n * Produces the digest.\n *\n * @return a byte buffer containing the digest value.\n */\n md.digest = function() {\n /* Note: Here we copy the remaining bytes in the input buffer and\n add the appropriate SHA-256 padding. Then we do the final update\n on a copy of the state so that if the user wants to get\n intermediate digests they can do so. */\n\n /* Determine the number of bytes that must be added to the message\n to ensure its length is congruent to 448 mod 512. In other words,\n the data to be digested must be a multiple of 512 bits (or 128 bytes).\n This data includes the message, some padding, and the length of the\n message. Since the length of the message will be encoded as 8 bytes (64\n bits), that means that the last segment of the data must have 56 bytes\n (448 bits) of message and padding. Therefore, the length of the message\n plus the padding must be congruent to 448 mod 512 because\n 512 - 128 = 448.\n\n In order to fill up the message length it must be filled with\n padding that begins with 1 bit followed by all 0 bits. Padding\n must *always* be present, so if the message length is already\n congruent to 448 mod 512, then 512 padding bits must be added. */\n\n var finalBlock = forge.util.createBuffer();\n finalBlock.putBytes(_input.bytes());\n\n // compute remaining size to be digested (include message length size)\n var remaining = (\n md.fullMessageLength[md.fullMessageLength.length - 1] +\n md.messageLengthSize);\n\n // add padding for overflow blockSize - overflow\n // _padding starts with 1 byte with first bit is set (byte value 128), then\n // there may be up to (blockSize - 1) other pad bytes\n var overflow = remaining & (md.blockLength - 1);\n finalBlock.putBytes(_padding.substr(0, md.blockLength - overflow));\n\n // serialize message length in bits in big-endian order; since length\n // is stored in bytes we multiply by 8 and add carry from next int\n var next, carry;\n var bits = md.fullMessageLength[0] * 8;\n for(var i = 0; i < md.fullMessageLength.length - 1; ++i) {\n next = md.fullMessageLength[i + 1] * 8;\n carry = (next / 0x100000000) >>> 0;\n bits += carry;\n finalBlock.putInt32(bits >>> 0);\n bits = next >>> 0;\n }\n finalBlock.putInt32(bits);\n\n var s2 = {\n h0: _state.h0,\n h1: _state.h1,\n h2: _state.h2,\n h3: _state.h3,\n h4: _state.h4,\n h5: _state.h5,\n h6: _state.h6,\n h7: _state.h7\n };\n _update(s2, _w, finalBlock);\n var rval = forge.util.createBuffer();\n rval.putInt32(s2.h0);\n rval.putInt32(s2.h1);\n rval.putInt32(s2.h2);\n rval.putInt32(s2.h3);\n rval.putInt32(s2.h4);\n rval.putInt32(s2.h5);\n rval.putInt32(s2.h6);\n rval.putInt32(s2.h7);\n return rval;\n };\n\n return md;\n};\n\n// sha-256 padding bytes not initialized yet\nvar _padding = null;\nvar _initialized = false;\n\n// table of constants\nvar _k = null;\n\n/**\n * Initializes the constant tables.\n */\nfunction _init() {\n // create padding\n _padding = String.fromCharCode(128);\n _padding += forge.util.fillString(String.fromCharCode(0x00), 64);\n\n // create K table for SHA-256\n _k = [\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,\n 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,\n 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,\n 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,\n 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,\n 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,\n 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,\n 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2];\n\n // now initialized\n _initialized = true;\n}\n\n/**\n * Updates a SHA-256 state with the given byte buffer.\n *\n * @param s the SHA-256 state to update.\n * @param w the array to use to store words.\n * @param bytes the byte buffer to update with.\n */\nfunction _update(s, w, bytes) {\n // consume 512 bit (64 byte) chunks\n var t1, t2, s0, s1, ch, maj, i, a, b, c, d, e, f, g, h;\n var len = bytes.length();\n while(len >= 64) {\n // the w array will be populated with sixteen 32-bit big-endian words\n // and then extended into 64 32-bit words according to SHA-256\n for(i = 0; i < 16; ++i) {\n w[i] = bytes.getInt32();\n }\n for(; i < 64; ++i) {\n // XOR word 2 words ago rot right 17, rot right 19, shft right 10\n t1 = w[i - 2];\n t1 =\n ((t1 >>> 17) | (t1 << 15)) ^\n ((t1 >>> 19) | (t1 << 13)) ^\n (t1 >>> 10);\n // XOR word 15 words ago rot right 7, rot right 18, shft right 3\n t2 = w[i - 15];\n t2 =\n ((t2 >>> 7) | (t2 << 25)) ^\n ((t2 >>> 18) | (t2 << 14)) ^\n (t2 >>> 3);\n // sum(t1, word 7 ago, t2, word 16 ago) modulo 2^32\n w[i] = (t1 + w[i - 7] + t2 + w[i - 16]) | 0;\n }\n\n // initialize hash value for this chunk\n a = s.h0;\n b = s.h1;\n c = s.h2;\n d = s.h3;\n e = s.h4;\n f = s.h5;\n g = s.h6;\n h = s.h7;\n\n // round function\n for(i = 0; i < 64; ++i) {\n // Sum1(e)\n s1 =\n ((e >>> 6) | (e << 26)) ^\n ((e >>> 11) | (e << 21)) ^\n ((e >>> 25) | (e << 7));\n // Ch(e, f, g) (optimized the same way as SHA-1)\n ch = g ^ (e & (f ^ g));\n // Sum0(a)\n s0 =\n ((a >>> 2) | (a << 30)) ^\n ((a >>> 13) | (a << 19)) ^\n ((a >>> 22) | (a << 10));\n // Maj(a, b, c) (optimized the same way as SHA-1)\n maj = (a & b) | (c & (a ^ b));\n\n // main algorithm\n t1 = h + s1 + ch + _k[i] + w[i];\n t2 = s0 + maj;\n h = g;\n g = f;\n f = e;\n // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug\n // can't truncate with `| 0`\n e = (d + t1) >>> 0;\n d = c;\n c = b;\n b = a;\n // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug\n // can't truncate with `| 0`\n a = (t1 + t2) >>> 0;\n }\n\n // update hash state\n s.h0 = (s.h0 + a) | 0;\n s.h1 = (s.h1 + b) | 0;\n s.h2 = (s.h2 + c) | 0;\n s.h3 = (s.h3 + d) | 0;\n s.h4 = (s.h4 + e) | 0;\n s.h5 = (s.h5 + f) | 0;\n s.h6 = (s.h6 + g) | 0;\n s.h7 = (s.h7 + h) | 0;\n len -= 64;\n }\n}\n","/**\n * A javascript implementation of a cryptographically-secure\n * Pseudo Random Number Generator (PRNG). The Fortuna algorithm is followed\n * here though the use of SHA-256 is not enforced; when generating an\n * a PRNG context, the hashing algorithm and block cipher used for\n * the generator are specified via a plugin.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2010-2014 Digital Bazaar, Inc.\n */\nvar forge = require('./forge');\nrequire('./util');\n\nvar _crypto = null;\nif(forge.util.isNodejs && !forge.options.usePureJavaScript &&\n !process.versions['node-webkit']) {\n _crypto = require('crypto');\n}\n\n/* PRNG API */\nvar prng = module.exports = forge.prng = forge.prng || {};\n\n/**\n * Creates a new PRNG context.\n *\n * A PRNG plugin must be passed in that will provide:\n *\n * 1. A function that initializes the key and seed of a PRNG context. It\n * will be given a 16 byte key and a 16 byte seed. Any key expansion\n * or transformation of the seed from a byte string into an array of\n * integers (or similar) should be performed.\n * 2. The cryptographic function used by the generator. It takes a key and\n * a seed.\n * 3. A seed increment function. It takes the seed and returns seed + 1.\n * 4. An api to create a message digest.\n *\n * For an example, see random.js.\n *\n * @param plugin the PRNG plugin to use.\n */\nprng.create = function(plugin) {\n var ctx = {\n plugin: plugin,\n key: null,\n seed: null,\n time: null,\n // number of reseeds so far\n reseeds: 0,\n // amount of data generated so far\n generated: 0,\n // no initial key bytes\n keyBytes: ''\n };\n\n // create 32 entropy pools (each is a message digest)\n var md = plugin.md;\n var pools = new Array(32);\n for(var i = 0; i < 32; ++i) {\n pools[i] = md.create();\n }\n ctx.pools = pools;\n\n // entropy pools are written to cyclically, starting at index 0\n ctx.pool = 0;\n\n /**\n * Generates random bytes. The bytes may be generated synchronously or\n * asynchronously. Web workers must use the asynchronous interface or\n * else the behavior is undefined.\n *\n * @param count the number of random bytes to generate.\n * @param [callback(err, bytes)] called once the operation completes.\n *\n * @return count random bytes as a string.\n */\n ctx.generate = function(count, callback) {\n // do synchronously\n if(!callback) {\n return ctx.generateSync(count);\n }\n\n // simple generator using counter-based CBC\n var cipher = ctx.plugin.cipher;\n var increment = ctx.plugin.increment;\n var formatKey = ctx.plugin.formatKey;\n var formatSeed = ctx.plugin.formatSeed;\n var b = forge.util.createBuffer();\n\n // paranoid deviation from Fortuna:\n // reset key for every request to protect previously\n // generated random bytes should the key be discovered;\n // there is no 100ms based reseeding because of this\n // forced reseed for every `generate` call\n ctx.key = null;\n\n generate();\n\n function generate(err) {\n if(err) {\n return callback(err);\n }\n\n // sufficient bytes generated\n if(b.length() >= count) {\n return callback(null, b.getBytes(count));\n }\n\n // if amount of data generated is greater than 1 MiB, trigger reseed\n if(ctx.generated > 0xfffff) {\n ctx.key = null;\n }\n\n if(ctx.key === null) {\n // prevent stack overflow\n return forge.util.nextTick(function() {\n _reseed(generate);\n });\n }\n\n // generate the random bytes\n var bytes = cipher(ctx.key, ctx.seed);\n ctx.generated += bytes.length;\n b.putBytes(bytes);\n\n // generate bytes for a new key and seed\n ctx.key = formatKey(cipher(ctx.key, increment(ctx.seed)));\n ctx.seed = formatSeed(cipher(ctx.key, ctx.seed));\n\n forge.util.setImmediate(generate);\n }\n };\n\n /**\n * Generates random bytes synchronously.\n *\n * @param count the number of random bytes to generate.\n *\n * @return count random bytes as a string.\n */\n ctx.generateSync = function(count) {\n // simple generator using counter-based CBC\n var cipher = ctx.plugin.cipher;\n var increment = ctx.plugin.increment;\n var formatKey = ctx.plugin.formatKey;\n var formatSeed = ctx.plugin.formatSeed;\n\n // paranoid deviation from Fortuna:\n // reset key for every request to protect previously\n // generated random bytes should the key be discovered;\n // there is no 100ms based reseeding because of this\n // forced reseed for every `generateSync` call\n ctx.key = null;\n\n var b = forge.util.createBuffer();\n while(b.length() < count) {\n // if amount of data generated is greater than 1 MiB, trigger reseed\n if(ctx.generated > 0xfffff) {\n ctx.key = null;\n }\n\n if(ctx.key === null) {\n _reseedSync();\n }\n\n // generate the random bytes\n var bytes = cipher(ctx.key, ctx.seed);\n ctx.generated += bytes.length;\n b.putBytes(bytes);\n\n // generate bytes for a new key and seed\n ctx.key = formatKey(cipher(ctx.key, increment(ctx.seed)));\n ctx.seed = formatSeed(cipher(ctx.key, ctx.seed));\n }\n\n return b.getBytes(count);\n };\n\n /**\n * Private function that asynchronously reseeds a generator.\n *\n * @param callback(err) called once the operation completes.\n */\n function _reseed(callback) {\n if(ctx.pools[0].messageLength >= 32) {\n _seed();\n return callback();\n }\n // not enough seed data...\n var needed = (32 - ctx.pools[0].messageLength) << 5;\n ctx.seedFile(needed, function(err, bytes) {\n if(err) {\n return callback(err);\n }\n ctx.collect(bytes);\n _seed();\n callback();\n });\n }\n\n /**\n * Private function that synchronously reseeds a generator.\n */\n function _reseedSync() {\n if(ctx.pools[0].messageLength >= 32) {\n return _seed();\n }\n // not enough seed data...\n var needed = (32 - ctx.pools[0].messageLength) << 5;\n ctx.collect(ctx.seedFileSync(needed));\n _seed();\n }\n\n /**\n * Private function that seeds a generator once enough bytes are available.\n */\n function _seed() {\n // update reseed count\n ctx.reseeds = (ctx.reseeds === 0xffffffff) ? 0 : ctx.reseeds + 1;\n\n // goal is to update `key` via:\n // key = hash(key + s)\n // where 's' is all collected entropy from selected pools, then...\n\n // create a plugin-based message digest\n var md = ctx.plugin.md.create();\n\n // consume current key bytes\n md.update(ctx.keyBytes);\n\n // digest the entropy of pools whose index k meet the\n // condition 'n mod 2^k == 0' where n is the number of reseeds\n var _2powK = 1;\n for(var k = 0; k < 32; ++k) {\n if(ctx.reseeds % _2powK === 0) {\n md.update(ctx.pools[k].digest().getBytes());\n ctx.pools[k].start();\n }\n _2powK = _2powK << 1;\n }\n\n // get digest for key bytes\n ctx.keyBytes = md.digest().getBytes();\n\n // paranoid deviation from Fortuna:\n // update `seed` via `seed = hash(key)`\n // instead of initializing to zero once and only\n // ever incrementing it\n md.start();\n md.update(ctx.keyBytes);\n var seedBytes = md.digest().getBytes();\n\n // update state\n ctx.key = ctx.plugin.formatKey(ctx.keyBytes);\n ctx.seed = ctx.plugin.formatSeed(seedBytes);\n ctx.generated = 0;\n }\n\n /**\n * The built-in default seedFile. This seedFile is used when entropy\n * is needed immediately.\n *\n * @param needed the number of bytes that are needed.\n *\n * @return the random bytes.\n */\n function defaultSeedFile(needed) {\n // use window.crypto.getRandomValues strong source of entropy if available\n var getRandomValues = null;\n var globalScope = forge.util.globalScope;\n var _crypto = globalScope.crypto || globalScope.msCrypto;\n if(_crypto && _crypto.getRandomValues) {\n getRandomValues = function(arr) {\n return _crypto.getRandomValues(arr);\n };\n }\n\n var b = forge.util.createBuffer();\n if(getRandomValues) {\n while(b.length() < needed) {\n // max byte length is 65536 before QuotaExceededError is thrown\n // http://www.w3.org/TR/WebCryptoAPI/#RandomSource-method-getRandomValues\n var count = Math.max(1, Math.min(needed - b.length(), 65536) / 4);\n var entropy = new Uint32Array(Math.floor(count));\n try {\n getRandomValues(entropy);\n for(var i = 0; i < entropy.length; ++i) {\n b.putInt32(entropy[i]);\n }\n } catch(e) {\n /* only ignore QuotaExceededError */\n if(!(typeof QuotaExceededError !== 'undefined' &&\n e instanceof QuotaExceededError)) {\n throw e;\n }\n }\n }\n }\n\n // be sad and add some weak random data\n if(b.length() < needed) {\n /* Draws from Park-Miller \"minimal standard\" 31 bit PRNG,\n implemented with David G. Carta's optimization: with 32 bit math\n and without division (Public Domain). */\n var hi, lo, next;\n var seed = Math.floor(Math.random() * 0x010000);\n while(b.length() < needed) {\n lo = 16807 * (seed & 0xFFFF);\n hi = 16807 * (seed >> 16);\n lo += (hi & 0x7FFF) << 16;\n lo += hi >> 15;\n lo = (lo & 0x7FFFFFFF) + (lo >> 31);\n seed = lo & 0xFFFFFFFF;\n\n // consume lower 3 bytes of seed\n for(var i = 0; i < 3; ++i) {\n // throw in more pseudo random\n next = seed >>> (i << 3);\n next ^= Math.floor(Math.random() * 0x0100);\n b.putByte(next & 0xFF);\n }\n }\n }\n\n return b.getBytes(needed);\n }\n // initialize seed file APIs\n if(_crypto) {\n // use nodejs async API\n ctx.seedFile = function(needed, callback) {\n _crypto.randomBytes(needed, function(err, bytes) {\n if(err) {\n return callback(err);\n }\n callback(null, bytes.toString());\n });\n };\n // use nodejs sync API\n ctx.seedFileSync = function(needed) {\n return _crypto.randomBytes(needed).toString();\n };\n } else {\n ctx.seedFile = function(needed, callback) {\n try {\n callback(null, defaultSeedFile(needed));\n } catch(e) {\n callback(e);\n }\n };\n ctx.seedFileSync = defaultSeedFile;\n }\n\n /**\n * Adds entropy to a prng ctx's accumulator.\n *\n * @param bytes the bytes of entropy as a string.\n */\n ctx.collect = function(bytes) {\n // iterate over pools distributing entropy cyclically\n var count = bytes.length;\n for(var i = 0; i < count; ++i) {\n ctx.pools[ctx.pool].update(bytes.substr(i, 1));\n ctx.pool = (ctx.pool === 31) ? 0 : ctx.pool + 1;\n }\n };\n\n /**\n * Collects an integer of n bits.\n *\n * @param i the integer entropy.\n * @param n the number of bits in the integer.\n */\n ctx.collectInt = function(i, n) {\n var bytes = '';\n for(var x = 0; x < n; x += 8) {\n bytes += String.fromCharCode((i >> x) & 0xFF);\n }\n ctx.collect(bytes);\n };\n\n /**\n * Registers a Web Worker to receive immediate entropy from the main thread.\n * This method is required until Web Workers can access the native crypto\n * API. This method should be called twice for each created worker, once in\n * the main thread, and once in the worker itself.\n *\n * @param worker the worker to register.\n */\n ctx.registerWorker = function(worker) {\n // worker receives random bytes\n if(worker === self) {\n ctx.seedFile = function(needed, callback) {\n function listener(e) {\n var data = e.data;\n if(data.forge && data.forge.prng) {\n self.removeEventListener('message', listener);\n callback(data.forge.prng.err, data.forge.prng.bytes);\n }\n }\n self.addEventListener('message', listener);\n self.postMessage({forge: {prng: {needed: needed}}});\n };\n } else {\n // main thread sends random bytes upon request\n var listener = function(e) {\n var data = e.data;\n if(data.forge && data.forge.prng) {\n ctx.seedFile(data.forge.prng.needed, function(err, bytes) {\n worker.postMessage({forge: {prng: {err: err, bytes: bytes}}});\n });\n }\n };\n // TODO: do we need to remove the event listener when the worker dies?\n worker.addEventListener('message', listener);\n }\n };\n\n return ctx;\n};\n","/**\n * An API for getting cryptographically-secure random bytes. The bytes are\n * generated using the Fortuna algorithm devised by Bruce Schneier and\n * Niels Ferguson.\n *\n * Getting strong random bytes is not yet easy to do in javascript. The only\n * truish random entropy that can be collected is from the mouse, keyboard, or\n * from timing with respect to page loads, etc. This generator makes a poor\n * attempt at providing random bytes when those sources haven't yet provided\n * enough entropy to initially seed or to reseed the PRNG.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2009-2014 Digital Bazaar, Inc.\n */\nvar forge = require('./forge');\nrequire('./aes');\nrequire('./sha256');\nrequire('./prng');\nrequire('./util');\n\n(function() {\n\n// forge.random already defined\nif(forge.random && forge.random.getBytes) {\n module.exports = forge.random;\n return;\n}\n\n(function(jQuery) {\n\n// the default prng plugin, uses AES-128\nvar prng_aes = {};\nvar _prng_aes_output = new Array(4);\nvar _prng_aes_buffer = forge.util.createBuffer();\nprng_aes.formatKey = function(key) {\n // convert the key into 32-bit integers\n var tmp = forge.util.createBuffer(key);\n key = new Array(4);\n key[0] = tmp.getInt32();\n key[1] = tmp.getInt32();\n key[2] = tmp.getInt32();\n key[3] = tmp.getInt32();\n\n // return the expanded key\n return forge.aes._expandKey(key, false);\n};\nprng_aes.formatSeed = function(seed) {\n // convert seed into 32-bit integers\n var tmp = forge.util.createBuffer(seed);\n seed = new Array(4);\n seed[0] = tmp.getInt32();\n seed[1] = tmp.getInt32();\n seed[2] = tmp.getInt32();\n seed[3] = tmp.getInt32();\n return seed;\n};\nprng_aes.cipher = function(key, seed) {\n forge.aes._updateBlock(key, seed, _prng_aes_output, false);\n _prng_aes_buffer.putInt32(_prng_aes_output[0]);\n _prng_aes_buffer.putInt32(_prng_aes_output[1]);\n _prng_aes_buffer.putInt32(_prng_aes_output[2]);\n _prng_aes_buffer.putInt32(_prng_aes_output[3]);\n return _prng_aes_buffer.getBytes();\n};\nprng_aes.increment = function(seed) {\n // FIXME: do we care about carry or signed issues?\n ++seed[3];\n return seed;\n};\nprng_aes.md = forge.md.sha256;\n\n/**\n * Creates a new PRNG.\n */\nfunction spawnPrng() {\n var ctx = forge.prng.create(prng_aes);\n\n /**\n * Gets random bytes. If a native secure crypto API is unavailable, this\n * method tries to make the bytes more unpredictable by drawing from data that\n * can be collected from the user of the browser, eg: mouse movement.\n *\n * If a callback is given, this method will be called asynchronously.\n *\n * @param count the number of random bytes to get.\n * @param [callback(err, bytes)] called once the operation completes.\n *\n * @return the random bytes in a string.\n */\n ctx.getBytes = function(count, callback) {\n return ctx.generate(count, callback);\n };\n\n /**\n * Gets random bytes asynchronously. If a native secure crypto API is\n * unavailable, this method tries to make the bytes more unpredictable by\n * drawing from data that can be collected from the user of the browser,\n * eg: mouse movement.\n *\n * @param count the number of random bytes to get.\n *\n * @return the random bytes in a string.\n */\n ctx.getBytesSync = function(count) {\n return ctx.generate(count);\n };\n\n return ctx;\n}\n\n// create default prng context\nvar _ctx = spawnPrng();\n\n// add other sources of entropy only if window.crypto.getRandomValues is not\n// available -- otherwise this source will be automatically used by the prng\nvar getRandomValues = null;\nvar globalScope = forge.util.globalScope;\nvar _crypto = globalScope.crypto || globalScope.msCrypto;\nif(_crypto && _crypto.getRandomValues) {\n getRandomValues = function(arr) {\n return _crypto.getRandomValues(arr);\n };\n}\n\nif(forge.options.usePureJavaScript ||\n (!forge.util.isNodejs && !getRandomValues)) {\n // if this is a web worker, do not use weak entropy, instead register to\n // receive strong entropy asynchronously from the main thread\n if(typeof window === 'undefined' || window.document === undefined) {\n // FIXME:\n }\n\n // get load time entropy\n _ctx.collectInt(+new Date(), 32);\n\n // add some entropy from navigator object\n if(typeof(navigator) !== 'undefined') {\n var _navBytes = '';\n for(var key in navigator) {\n try {\n if(typeof(navigator[key]) == 'string') {\n _navBytes += navigator[key];\n }\n } catch(e) {\n /* Some navigator keys might not be accessible, e.g. the geolocation\n attribute throws an exception if touched in Mozilla chrome://\n context.\n\n Silently ignore this and just don't use this as a source of\n entropy. */\n }\n }\n _ctx.collect(_navBytes);\n _navBytes = null;\n }\n\n // add mouse and keyboard collectors if jquery is available\n if(jQuery) {\n // set up mouse entropy capture\n jQuery().mousemove(function(e) {\n // add mouse coords\n _ctx.collectInt(e.clientX, 16);\n _ctx.collectInt(e.clientY, 16);\n });\n\n // set up keyboard entropy capture\n jQuery().keypress(function(e) {\n _ctx.collectInt(e.charCode, 8);\n });\n }\n}\n\n/* Random API */\nif(!forge.random) {\n forge.random = _ctx;\n} else {\n // extend forge.random with _ctx\n for(var key in _ctx) {\n forge.random[key] = _ctx[key];\n }\n}\n\n// expose spawn PRNG\nforge.random.createInstance = spawnPrng;\n\nmodule.exports = forge.random;\n\n})(typeof(jQuery) !== 'undefined' ? jQuery : null);\n\n})();\n","/**\n * RC2 implementation.\n *\n * @author Stefan Siegl\n *\n * Copyright (c) 2012 Stefan Siegl \n *\n * Information on the RC2 cipher is available from RFC #2268,\n * http://www.ietf.org/rfc/rfc2268.txt\n */\nvar forge = require('./forge');\nrequire('./util');\n\nvar piTable = [\n 0xd9, 0x78, 0xf9, 0xc4, 0x19, 0xdd, 0xb5, 0xed, 0x28, 0xe9, 0xfd, 0x79, 0x4a, 0xa0, 0xd8, 0x9d,\n 0xc6, 0x7e, 0x37, 0x83, 0x2b, 0x76, 0x53, 0x8e, 0x62, 0x4c, 0x64, 0x88, 0x44, 0x8b, 0xfb, 0xa2,\n 0x17, 0x9a, 0x59, 0xf5, 0x87, 0xb3, 0x4f, 0x13, 0x61, 0x45, 0x6d, 0x8d, 0x09, 0x81, 0x7d, 0x32,\n 0xbd, 0x8f, 0x40, 0xeb, 0x86, 0xb7, 0x7b, 0x0b, 0xf0, 0x95, 0x21, 0x22, 0x5c, 0x6b, 0x4e, 0x82,\n 0x54, 0xd6, 0x65, 0x93, 0xce, 0x60, 0xb2, 0x1c, 0x73, 0x56, 0xc0, 0x14, 0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n\nvar s = [1, 2, 3, 5];\n\n/**\n * Rotate a word left by given number of bits.\n *\n * Bits that are shifted out on the left are put back in on the right\n * hand side.\n *\n * @param word The word to shift left.\n * @param bits The number of bits to shift by.\n * @return The rotated word.\n */\nvar rol = function(word, bits) {\n return ((word << bits) & 0xffff) | ((word & 0xffff) >> (16 - bits));\n};\n\n/**\n * Rotate a word right by given number of bits.\n *\n * Bits that are shifted out on the right are put back in on the left\n * hand side.\n *\n * @param word The word to shift right.\n * @param bits The number of bits to shift by.\n * @return The rotated word.\n */\nvar ror = function(word, bits) {\n return ((word & 0xffff) >> bits) | ((word << (16 - bits)) & 0xffff);\n};\n\n/* RC2 API */\nmodule.exports = forge.rc2 = forge.rc2 || {};\n\n/**\n * Perform RC2 key expansion as per RFC #2268, section 2.\n *\n * @param key variable-length user key (between 1 and 128 bytes)\n * @param effKeyBits number of effective key bits (default: 128)\n * @return the expanded RC2 key (ByteBuffer of 128 bytes)\n */\nforge.rc2.expandKey = function(key, effKeyBits) {\n if(typeof key === 'string') {\n key = forge.util.createBuffer(key);\n }\n effKeyBits = effKeyBits || 128;\n\n /* introduce variables that match the names used in RFC #2268 */\n var L = key;\n var T = key.length();\n var T1 = effKeyBits;\n var T8 = Math.ceil(T1 / 8);\n var TM = 0xff >> (T1 & 0x07);\n var i;\n\n for(i = T; i < 128; i++) {\n L.putByte(piTable[(L.at(i - 1) + L.at(i - T)) & 0xff]);\n }\n\n L.setAt(128 - T8, piTable[L.at(128 - T8) & TM]);\n\n for(i = 127 - T8; i >= 0; i--) {\n L.setAt(i, piTable[L.at(i + 1) ^ L.at(i + T8)]);\n }\n\n return L;\n};\n\n/**\n * Creates a RC2 cipher object.\n *\n * @param key the symmetric key to use (as base for key generation).\n * @param bits the number of effective key bits.\n * @param encrypt false for decryption, true for encryption.\n *\n * @return the cipher.\n */\nvar createCipher = function(key, bits, encrypt) {\n var _finish = false, _input = null, _output = null, _iv = null;\n var mixRound, mashRound;\n var i, j, K = [];\n\n /* Expand key and fill into K[] Array */\n key = forge.rc2.expandKey(key, bits);\n for(i = 0; i < 64; i++) {\n K.push(key.getInt16Le());\n }\n\n if(encrypt) {\n /**\n * Perform one mixing round \"in place\".\n *\n * @param R Array of four words to perform mixing on.\n */\n mixRound = function(R) {\n for(i = 0; i < 4; i++) {\n R[i] += K[j] + (R[(i + 3) % 4] & R[(i + 2) % 4]) +\n ((~R[(i + 3) % 4]) & R[(i + 1) % 4]);\n R[i] = rol(R[i], s[i]);\n j++;\n }\n };\n\n /**\n * Perform one mashing round \"in place\".\n *\n * @param R Array of four words to perform mashing on.\n */\n mashRound = function(R) {\n for(i = 0; i < 4; i++) {\n R[i] += K[R[(i + 3) % 4] & 63];\n }\n };\n } else {\n /**\n * Perform one r-mixing round \"in place\".\n *\n * @param R Array of four words to perform mixing on.\n */\n mixRound = function(R) {\n for(i = 3; i >= 0; i--) {\n R[i] = ror(R[i], s[i]);\n R[i] -= K[j] + (R[(i + 3) % 4] & R[(i + 2) % 4]) +\n ((~R[(i + 3) % 4]) & R[(i + 1) % 4]);\n j--;\n }\n };\n\n /**\n * Perform one r-mashing round \"in place\".\n *\n * @param R Array of four words to perform mashing on.\n */\n mashRound = function(R) {\n for(i = 3; i >= 0; i--) {\n R[i] -= K[R[(i + 3) % 4] & 63];\n }\n };\n }\n\n /**\n * Run the specified cipher execution plan.\n *\n * This function takes four words from the input buffer, applies the IV on\n * it (if requested) and runs the provided execution plan.\n *\n * The plan must be put together in form of a array of arrays. Where the\n * outer one is simply a list of steps to perform and the inner one needs\n * to have two elements: the first one telling how many rounds to perform,\n * the second one telling what to do (i.e. the function to call).\n *\n * @param {Array} plan The plan to execute.\n */\n var runPlan = function(plan) {\n var R = [];\n\n /* Get data from input buffer and fill the four words into R */\n for(i = 0; i < 4; i++) {\n var val = _input.getInt16Le();\n\n if(_iv !== null) {\n if(encrypt) {\n /* We're encrypting, apply the IV first. */\n val ^= _iv.getInt16Le();\n } else {\n /* We're decryption, keep cipher text for next block. */\n _iv.putInt16Le(val);\n }\n }\n\n R.push(val & 0xffff);\n }\n\n /* Reset global \"j\" variable as per spec. */\n j = encrypt ? 0 : 63;\n\n /* Run execution plan. */\n for(var ptr = 0; ptr < plan.length; ptr++) {\n for(var ctr = 0; ctr < plan[ptr][0]; ctr++) {\n plan[ptr][1](R);\n }\n }\n\n /* Write back result to output buffer. */\n for(i = 0; i < 4; i++) {\n if(_iv !== null) {\n if(encrypt) {\n /* We're encrypting in CBC-mode, feed back encrypted bytes into\n IV buffer to carry it forward to next block. */\n _iv.putInt16Le(R[i]);\n } else {\n R[i] ^= _iv.getInt16Le();\n }\n }\n\n _output.putInt16Le(R[i]);\n }\n };\n\n /* Create cipher object */\n var cipher = null;\n cipher = {\n /**\n * Starts or restarts the encryption or decryption process, whichever\n * was previously configured.\n *\n * To use the cipher in CBC mode, iv may be given either as a string\n * of bytes, or as a byte buffer. For ECB mode, give null as iv.\n *\n * @param iv the initialization vector to use, null for ECB mode.\n * @param output the output the buffer to write to, null to create one.\n */\n start: function(iv, output) {\n if(iv) {\n /* CBC mode */\n if(typeof iv === 'string') {\n iv = forge.util.createBuffer(iv);\n }\n }\n\n _finish = false;\n _input = forge.util.createBuffer();\n _output = output || new forge.util.createBuffer();\n _iv = iv;\n\n cipher.output = _output;\n },\n\n /**\n * Updates the next block.\n *\n * @param input the buffer to read from.\n */\n update: function(input) {\n if(!_finish) {\n // not finishing, so fill the input buffer with more input\n _input.putBuffer(input);\n }\n\n while(_input.length() >= 8) {\n runPlan([\n [ 5, mixRound ],\n [ 1, mashRound ],\n [ 6, mixRound ],\n [ 1, mashRound ],\n [ 5, mixRound ]\n ]);\n }\n },\n\n /**\n * Finishes encrypting or decrypting.\n *\n * @param pad a padding function to use, null for PKCS#7 padding,\n * signature(blockSize, buffer, decrypt).\n *\n * @return true if successful, false on error.\n */\n finish: function(pad) {\n var rval = true;\n\n if(encrypt) {\n if(pad) {\n rval = pad(8, _input, !encrypt);\n } else {\n // add PKCS#7 padding to block (each pad byte is the\n // value of the number of pad bytes)\n var padding = (_input.length() === 8) ? 8 : (8 - _input.length());\n _input.fillWithByte(padding, padding);\n }\n }\n\n if(rval) {\n // do final update\n _finish = true;\n cipher.update();\n }\n\n if(!encrypt) {\n // check for error: input data not a multiple of block size\n rval = (_input.length() === 0);\n if(rval) {\n if(pad) {\n rval = pad(8, _output, !encrypt);\n } else {\n // ensure padding byte count is valid\n var len = _output.length();\n var count = _output.at(len - 1);\n\n if(count > len) {\n rval = false;\n } else {\n // trim off padding bytes\n _output.truncate(count);\n }\n }\n }\n }\n\n return rval;\n }\n };\n\n return cipher;\n};\n\n/**\n * Creates an RC2 cipher object to encrypt data in ECB or CBC mode using the\n * given symmetric key. The output will be stored in the 'output' member\n * of the returned cipher.\n *\n * The key and iv may be given as a string of bytes or a byte buffer.\n * The cipher is initialized to use 128 effective key bits.\n *\n * @param key the symmetric key to use.\n * @param iv the initialization vector to use.\n * @param output the buffer to write to, null to create one.\n *\n * @return the cipher.\n */\nforge.rc2.startEncrypting = function(key, iv, output) {\n var cipher = forge.rc2.createEncryptionCipher(key, 128);\n cipher.start(iv, output);\n return cipher;\n};\n\n/**\n * Creates an RC2 cipher object to encrypt data in ECB or CBC mode using the\n * given symmetric key.\n *\n * The key may be given as a string of bytes or a byte buffer.\n *\n * To start encrypting call start() on the cipher with an iv and optional\n * output buffer.\n *\n * @param key the symmetric key to use.\n *\n * @return the cipher.\n */\nforge.rc2.createEncryptionCipher = function(key, bits) {\n return createCipher(key, bits, true);\n};\n\n/**\n * Creates an RC2 cipher object to decrypt data in ECB or CBC mode using the\n * given symmetric key. The output will be stored in the 'output' member\n * of the returned cipher.\n *\n * The key and iv may be given as a string of bytes or a byte buffer.\n * The cipher is initialized to use 128 effective key bits.\n *\n * @param key the symmetric key to use.\n * @param iv the initialization vector to use.\n * @param output the buffer to write to, null to create one.\n *\n * @return the cipher.\n */\nforge.rc2.startDecrypting = function(key, iv, output) {\n var cipher = forge.rc2.createDecryptionCipher(key, 128);\n cipher.start(iv, output);\n return cipher;\n};\n\n/**\n * Creates an RC2 cipher object to decrypt data in ECB or CBC mode using the\n * given symmetric key.\n *\n * The key may be given as a string of bytes or a byte buffer.\n *\n * To start decrypting call start() on the cipher with an iv and optional\n * output buffer.\n *\n * @param key the symmetric key to use.\n *\n * @return the cipher.\n */\nforge.rc2.createDecryptionCipher = function(key, bits) {\n return createCipher(key, bits, false);\n};\n","// Copyright (c) 2005 Tom Wu\n// All Rights Reserved.\n// See \"LICENSE\" for details.\n\n// Basic JavaScript BN library - subset useful for RSA encryption.\n\n/*\nLicensing (LICENSE)\n-------------------\n\nThis software is covered under the following copyright:\n*/\n/*\n * Copyright (c) 2003-2005 Tom Wu\n * All Rights Reserved.\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS-IS\" AND WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY\n * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.\n *\n * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL,\n * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER\n * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF\n * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT\n * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n *\n * In addition, the following condition applies:\n *\n * All redistributions must retain an intact copy of this copyright notice\n * and disclaimer.\n */\n/*\nAddress all questions regarding this license to:\n\n Tom Wu\n tjw@cs.Stanford.EDU\n*/\nvar forge = require('./forge');\n\nmodule.exports = forge.jsbn = forge.jsbn || {};\n\n// Bits per digit\nvar dbits;\n\n// JavaScript engine analysis\nvar canary = 0xdeadbeefcafe;\nvar j_lm = ((canary&0xffffff)==0xefcafe);\n\n// (public) Constructor\nfunction BigInteger(a,b,c) {\n this.data = [];\n if(a != null)\n if(\"number\" == typeof a) this.fromNumber(a,b,c);\n else if(b == null && \"string\" != typeof a) this.fromString(a,256);\n else this.fromString(a,b);\n}\nforge.jsbn.BigInteger = BigInteger;\n\n// return new, unset BigInteger\nfunction nbi() { return new BigInteger(null); }\n\n// am: Compute w_j += (x*this_i), propagate carries,\n// c is initial carry, returns final carry.\n// c < 3*dvalue, x < 2*dvalue, this_i < dvalue\n// We need to select the fastest one that works in this environment.\n\n// am1: use a single mult and divide to get the high bits,\n// max digit bits should be 26 because\n// max internal value = 2*dvalue^2-2*dvalue (< 2^53)\nfunction am1(i,x,w,j,c,n) {\n while(--n >= 0) {\n var v = x*this.data[i++]+w.data[j]+c;\n c = Math.floor(v/0x4000000);\n w.data[j++] = v&0x3ffffff;\n }\n return c;\n}\n// am2 avoids a big mult-and-extract completely.\n// Max digit bits should be <= 30 because we do bitwise ops\n// on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)\nfunction am2(i,x,w,j,c,n) {\n var xl = x&0x7fff, xh = x>>15;\n while(--n >= 0) {\n var l = this.data[i]&0x7fff;\n var h = this.data[i++]>>15;\n var m = xh*l+h*xl;\n l = xl*l+((m&0x7fff)<<15)+w.data[j]+(c&0x3fffffff);\n c = (l>>>30)+(m>>>15)+xh*h+(c>>>30);\n w.data[j++] = l&0x3fffffff;\n }\n return c;\n}\n// Alternately, set max digit bits to 28 since some\n// browsers slow down when dealing with 32-bit numbers.\nfunction am3(i,x,w,j,c,n) {\n var xl = x&0x3fff, xh = x>>14;\n while(--n >= 0) {\n var l = this.data[i]&0x3fff;\n var h = this.data[i++]>>14;\n var m = xh*l+h*xl;\n l = xl*l+((m&0x3fff)<<14)+w.data[j]+c;\n c = (l>>28)+(m>>14)+xh*h;\n w.data[j++] = l&0xfffffff;\n }\n return c;\n}\n\n// node.js (no browser)\nif(typeof(navigator) === 'undefined')\n{\n BigInteger.prototype.am = am3;\n dbits = 28;\n} else if(j_lm && (navigator.appName == \"Microsoft Internet Explorer\")) {\n BigInteger.prototype.am = am2;\n dbits = 30;\n} else if(j_lm && (navigator.appName != \"Netscape\")) {\n BigInteger.prototype.am = am1;\n dbits = 26;\n} else { // Mozilla/Netscape seems to prefer am3\n BigInteger.prototype.am = am3;\n dbits = 28;\n}\n\nBigInteger.prototype.DB = dbits;\nBigInteger.prototype.DM = ((1<= 0; --i) r.data[i] = this.data[i];\n r.t = this.t;\n r.s = this.s;\n}\n\n// (protected) set from integer value x, -DV <= x < DV\nfunction bnpFromInt(x) {\n this.t = 1;\n this.s = (x<0)?-1:0;\n if(x > 0) this.data[0] = x;\n else if(x < -1) this.data[0] = x+this.DV;\n else this.t = 0;\n}\n\n// return bigint initialized to value\nfunction nbv(i) { var r = nbi(); r.fromInt(i); return r; }\n\n// (protected) set from string and radix\nfunction bnpFromString(s,b) {\n var k;\n if(b == 16) k = 4;\n else if(b == 8) k = 3;\n else if(b == 256) k = 8; // byte array\n else if(b == 2) k = 1;\n else if(b == 32) k = 5;\n else if(b == 4) k = 2;\n else { this.fromRadix(s,b); return; }\n this.t = 0;\n this.s = 0;\n var i = s.length, mi = false, sh = 0;\n while(--i >= 0) {\n var x = (k==8)?s[i]&0xff:intAt(s,i);\n if(x < 0) {\n if(s.charAt(i) == \"-\") mi = true;\n continue;\n }\n mi = false;\n if(sh == 0)\n this.data[this.t++] = x;\n else if(sh+k > this.DB) {\n this.data[this.t-1] |= (x&((1<<(this.DB-sh))-1))<>(this.DB-sh));\n } else\n this.data[this.t-1] |= x<= this.DB) sh -= this.DB;\n }\n if(k == 8 && (s[0]&0x80) != 0) {\n this.s = -1;\n if(sh > 0) this.data[this.t-1] |= ((1<<(this.DB-sh))-1)< 0 && this.data[this.t-1] == c) --this.t;\n}\n\n// (public) return string representation in given radix\nfunction bnToString(b) {\n if(this.s < 0) return \"-\"+this.negate().toString(b);\n var k;\n if(b == 16) k = 4;\n else if(b == 8) k = 3;\n else if(b == 2) k = 1;\n else if(b == 32) k = 5;\n else if(b == 4) k = 2;\n else return this.toRadix(b);\n var km = (1< 0) {\n if(p < this.DB && (d = this.data[i]>>p) > 0) { m = true; r = int2char(d); }\n while(i >= 0) {\n if(p < k) {\n d = (this.data[i]&((1<>(p+=this.DB-k);\n } else {\n d = (this.data[i]>>(p-=k))&km;\n if(p <= 0) { p += this.DB; --i; }\n }\n if(d > 0) m = true;\n if(m) r += int2char(d);\n }\n }\n return m?r:\"0\";\n}\n\n// (public) -this\nfunction bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; }\n\n// (public) |this|\nfunction bnAbs() { return (this.s<0)?this.negate():this; }\n\n// (public) return + if this > a, - if this < a, 0 if equal\nfunction bnCompareTo(a) {\n var r = this.s-a.s;\n if(r != 0) return r;\n var i = this.t;\n r = i-a.t;\n if(r != 0) return (this.s<0)?-r:r;\n while(--i >= 0) if((r=this.data[i]-a.data[i]) != 0) return r;\n return 0;\n}\n\n// returns bit length of the integer x\nfunction nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}\n\n// (public) return the number of bits in \"this\"\nfunction bnBitLength() {\n if(this.t <= 0) return 0;\n return this.DB*(this.t-1)+nbits(this.data[this.t-1]^(this.s&this.DM));\n}\n\n// (protected) r = this << n*DB\nfunction bnpDLShiftTo(n,r) {\n var i;\n for(i = this.t-1; i >= 0; --i) r.data[i+n] = this.data[i];\n for(i = n-1; i >= 0; --i) r.data[i] = 0;\n r.t = this.t+n;\n r.s = this.s;\n}\n\n// (protected) r = this >> n*DB\nfunction bnpDRShiftTo(n,r) {\n for(var i = n; i < this.t; ++i) r.data[i-n] = this.data[i];\n r.t = Math.max(this.t-n,0);\n r.s = this.s;\n}\n\n// (protected) r = this << n\nfunction bnpLShiftTo(n,r) {\n var bs = n%this.DB;\n var cbs = this.DB-bs;\n var bm = (1<= 0; --i) {\n r.data[i+ds+1] = (this.data[i]>>cbs)|c;\n c = (this.data[i]&bm)<= 0; --i) r.data[i] = 0;\n r.data[ds] = c;\n r.t = this.t+ds+1;\n r.s = this.s;\n r.clamp();\n}\n\n// (protected) r = this >> n\nfunction bnpRShiftTo(n,r) {\n r.s = this.s;\n var ds = Math.floor(n/this.DB);\n if(ds >= this.t) { r.t = 0; return; }\n var bs = n%this.DB;\n var cbs = this.DB-bs;\n var bm = (1<>bs;\n for(var i = ds+1; i < this.t; ++i) {\n r.data[i-ds-1] |= (this.data[i]&bm)<>bs;\n }\n if(bs > 0) r.data[this.t-ds-1] |= (this.s&bm)<>= this.DB;\n }\n if(a.t < this.t) {\n c -= a.s;\n while(i < this.t) {\n c += this.data[i];\n r.data[i++] = c&this.DM;\n c >>= this.DB;\n }\n c += this.s;\n } else {\n c += this.s;\n while(i < a.t) {\n c -= a.data[i];\n r.data[i++] = c&this.DM;\n c >>= this.DB;\n }\n c -= a.s;\n }\n r.s = (c<0)?-1:0;\n if(c < -1) r.data[i++] = this.DV+c;\n else if(c > 0) r.data[i++] = c;\n r.t = i;\n r.clamp();\n}\n\n// (protected) r = this * a, r != this,a (HAC 14.12)\n// \"this\" should be the larger one if appropriate.\nfunction bnpMultiplyTo(a,r) {\n var x = this.abs(), y = a.abs();\n var i = x.t;\n r.t = i+y.t;\n while(--i >= 0) r.data[i] = 0;\n for(i = 0; i < y.t; ++i) r.data[i+x.t] = x.am(0,y.data[i],r,i,0,x.t);\n r.s = 0;\n r.clamp();\n if(this.s != a.s) BigInteger.ZERO.subTo(r,r);\n}\n\n// (protected) r = this^2, r != this (HAC 14.16)\nfunction bnpSquareTo(r) {\n var x = this.abs();\n var i = r.t = 2*x.t;\n while(--i >= 0) r.data[i] = 0;\n for(i = 0; i < x.t-1; ++i) {\n var c = x.am(i,x.data[i],r,2*i,0,1);\n if((r.data[i+x.t]+=x.am(i+1,2*x.data[i],r,2*i+1,c,x.t-i-1)) >= x.DV) {\n r.data[i+x.t] -= x.DV;\n r.data[i+x.t+1] = 1;\n }\n }\n if(r.t > 0) r.data[r.t-1] += x.am(i,x.data[i],r,2*i,0,1);\n r.s = 0;\n r.clamp();\n}\n\n// (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)\n// r != q, this != m. q or r may be null.\nfunction bnpDivRemTo(m,q,r) {\n var pm = m.abs();\n if(pm.t <= 0) return;\n var pt = this.abs();\n if(pt.t < pm.t) {\n if(q != null) q.fromInt(0);\n if(r != null) this.copyTo(r);\n return;\n }\n if(r == null) r = nbi();\n var y = nbi(), ts = this.s, ms = m.s;\n var nsh = this.DB-nbits(pm.data[pm.t-1]);\t// normalize modulus\n if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); } else { pm.copyTo(y); pt.copyTo(r); }\n var ys = y.t;\n var y0 = y.data[ys-1];\n if(y0 == 0) return;\n var yt = y0*(1<1)?y.data[ys-2]>>this.F2:0);\n var d1 = this.FV/yt, d2 = (1<= 0) {\n r.data[r.t++] = 1;\n r.subTo(t,r);\n }\n BigInteger.ONE.dlShiftTo(ys,t);\n t.subTo(y,y);\t// \"negative\" y so we can replace sub with am later\n while(y.t < ys) y.data[y.t++] = 0;\n while(--j >= 0) {\n // Estimate quotient digit\n var qd = (r.data[--i]==y0)?this.DM:Math.floor(r.data[i]*d1+(r.data[i-1]+e)*d2);\n if((r.data[i]+=y.am(0,qd,r,j,0,ys)) < qd) {\t// Try it out\n y.dlShiftTo(j,t);\n r.subTo(t,r);\n while(r.data[i] < --qd) r.subTo(t,r);\n }\n }\n if(q != null) {\n r.drShiftTo(ys,q);\n if(ts != ms) BigInteger.ZERO.subTo(q,q);\n }\n r.t = ys;\n r.clamp();\n if(nsh > 0) r.rShiftTo(nsh,r);\t// Denormalize remainder\n if(ts < 0) BigInteger.ZERO.subTo(r,r);\n}\n\n// (public) this mod a\nfunction bnMod(a) {\n var r = nbi();\n this.abs().divRemTo(a,null,r);\n if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r);\n return r;\n}\n\n// Modular reduction using \"classic\" algorithm\nfunction Classic(m) { this.m = m; }\nfunction cConvert(x) {\n if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m);\n else return x;\n}\nfunction cRevert(x) { return x; }\nfunction cReduce(x) { x.divRemTo(this.m,null,x); }\nfunction cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }\nfunction cSqrTo(x,r) { x.squareTo(r); this.reduce(r); }\n\nClassic.prototype.convert = cConvert;\nClassic.prototype.revert = cRevert;\nClassic.prototype.reduce = cReduce;\nClassic.prototype.mulTo = cMulTo;\nClassic.prototype.sqrTo = cSqrTo;\n\n// (protected) return \"-1/this % 2^DB\"; useful for Mont. reduction\n// justification:\n// xy == 1 (mod m)\n// xy = 1+km\n// xy(2-xy) = (1+km)(1-km)\n// x[y(2-xy)] = 1-k^2m^2\n// x[y(2-xy)] == 1 (mod m^2)\n// if y is 1/x mod m, then y(2-xy) is 1/x mod m^2\n// should reduce x and y(2-xy) by m^2 at each step to keep size bounded.\n// JS multiply \"overflows\" differently from C/C++, so care is needed here.\nfunction bnpInvDigit() {\n if(this.t < 1) return 0;\n var x = this.data[0];\n if((x&1) == 0) return 0;\n var y = x&3;\t\t// y == 1/x mod 2^2\n y = (y*(2-(x&0xf)*y))&0xf;\t// y == 1/x mod 2^4\n y = (y*(2-(x&0xff)*y))&0xff;\t// y == 1/x mod 2^8\n y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff;\t// y == 1/x mod 2^16\n // last step - calculate inverse mod DV directly;\n // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints\n y = (y*(2-x*y%this.DV))%this.DV;\t\t// y == 1/x mod 2^dbits\n // we really want the negative inverse, and -DV < y < DV\n return (y>0)?this.DV-y:-y;\n}\n\n// Montgomery reduction\nfunction Montgomery(m) {\n this.m = m;\n this.mp = m.invDigit();\n this.mpl = this.mp&0x7fff;\n this.mph = this.mp>>15;\n this.um = (1<<(m.DB-15))-1;\n this.mt2 = 2*m.t;\n}\n\n// xR mod m\nfunction montConvert(x) {\n var r = nbi();\n x.abs().dlShiftTo(this.m.t,r);\n r.divRemTo(this.m,null,r);\n if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r);\n return r;\n}\n\n// x/R mod m\nfunction montRevert(x) {\n var r = nbi();\n x.copyTo(r);\n this.reduce(r);\n return r;\n}\n\n// x = x/R mod m (HAC 14.32)\nfunction montReduce(x) {\n while(x.t <= this.mt2)\t// pad x so am has enough room later\n x.data[x.t++] = 0;\n for(var i = 0; i < this.m.t; ++i) {\n // faster way of calculating u0 = x.data[i]*mp mod DV\n var j = x.data[i]&0x7fff;\n var u0 = (j*this.mpl+(((j*this.mph+(x.data[i]>>15)*this.mpl)&this.um)<<15))&x.DM;\n // use am to combine the multiply-shift-add into one call\n j = i+this.m.t;\n x.data[j] += this.m.am(0,u0,x,i,0,this.m.t);\n // propagate carry\n while(x.data[j] >= x.DV) { x.data[j] -= x.DV; x.data[++j]++; }\n }\n x.clamp();\n x.drShiftTo(this.m.t,x);\n if(x.compareTo(this.m) >= 0) x.subTo(this.m,x);\n}\n\n// r = \"x^2/R mod m\"; x != r\nfunction montSqrTo(x,r) { x.squareTo(r); this.reduce(r); }\n\n// r = \"xy/R mod m\"; x,y != r\nfunction montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }\n\nMontgomery.prototype.convert = montConvert;\nMontgomery.prototype.revert = montRevert;\nMontgomery.prototype.reduce = montReduce;\nMontgomery.prototype.mulTo = montMulTo;\nMontgomery.prototype.sqrTo = montSqrTo;\n\n// (protected) true iff this is even\nfunction bnpIsEven() { return ((this.t>0)?(this.data[0]&1):this.s) == 0; }\n\n// (protected) this^e, e < 2^32, doing sqr and mul with \"r\" (HAC 14.79)\nfunction bnpExp(e,z) {\n if(e > 0xffffffff || e < 1) return BigInteger.ONE;\n var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1;\n g.copyTo(r);\n while(--i >= 0) {\n z.sqrTo(r,r2);\n if((e&(1< 0) z.mulTo(r2,g,r);\n else { var t = r; r = r2; r2 = t; }\n }\n return z.revert(r);\n}\n\n// (public) this^e % m, 0 <= e < 2^32\nfunction bnModPowInt(e,m) {\n var z;\n if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m);\n return this.exp(e,z);\n}\n\n// protected\nBigInteger.prototype.copyTo = bnpCopyTo;\nBigInteger.prototype.fromInt = bnpFromInt;\nBigInteger.prototype.fromString = bnpFromString;\nBigInteger.prototype.clamp = bnpClamp;\nBigInteger.prototype.dlShiftTo = bnpDLShiftTo;\nBigInteger.prototype.drShiftTo = bnpDRShiftTo;\nBigInteger.prototype.lShiftTo = bnpLShiftTo;\nBigInteger.prototype.rShiftTo = bnpRShiftTo;\nBigInteger.prototype.subTo = bnpSubTo;\nBigInteger.prototype.multiplyTo = bnpMultiplyTo;\nBigInteger.prototype.squareTo = bnpSquareTo;\nBigInteger.prototype.divRemTo = bnpDivRemTo;\nBigInteger.prototype.invDigit = bnpInvDigit;\nBigInteger.prototype.isEven = bnpIsEven;\nBigInteger.prototype.exp = bnpExp;\n\n// public\nBigInteger.prototype.toString = bnToString;\nBigInteger.prototype.negate = bnNegate;\nBigInteger.prototype.abs = bnAbs;\nBigInteger.prototype.compareTo = bnCompareTo;\nBigInteger.prototype.bitLength = bnBitLength;\nBigInteger.prototype.mod = bnMod;\nBigInteger.prototype.modPowInt = bnModPowInt;\n\n// \"constants\"\nBigInteger.ZERO = nbv(0);\nBigInteger.ONE = nbv(1);\n\n// jsbn2 lib\n\n//Copyright (c) 2005-2009 Tom Wu\n//All Rights Reserved.\n//See \"LICENSE\" for details (See jsbn.js for LICENSE).\n\n//Extended JavaScript BN functions, required for RSA private ops.\n\n//Version 1.1: new BigInteger(\"0\", 10) returns \"proper\" zero\n\n//(public)\nfunction bnClone() { var r = nbi(); this.copyTo(r); return r; }\n\n//(public) return value as integer\nfunction bnIntValue() {\nif(this.s < 0) {\n if(this.t == 1) return this.data[0]-this.DV;\n else if(this.t == 0) return -1;\n} else if(this.t == 1) return this.data[0];\nelse if(this.t == 0) return 0;\n// assumes 16 < DB < 32\nreturn ((this.data[1]&((1<<(32-this.DB))-1))<>24; }\n\n//(public) return value as short (assumes DB>=16)\nfunction bnShortValue() { return (this.t==0)?this.s:(this.data[0]<<16)>>16; }\n\n//(protected) return x s.t. r^x < DV\nfunction bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); }\n\n//(public) 0 if this == 0, 1 if this > 0\nfunction bnSigNum() {\nif(this.s < 0) return -1;\nelse if(this.t <= 0 || (this.t == 1 && this.data[0] <= 0)) return 0;\nelse return 1;\n}\n\n//(protected) convert to radix string\nfunction bnpToRadix(b) {\nif(b == null) b = 10;\nif(this.signum() == 0 || b < 2 || b > 36) return \"0\";\nvar cs = this.chunkSize(b);\nvar a = Math.pow(b,cs);\nvar d = nbv(a), y = nbi(), z = nbi(), r = \"\";\nthis.divRemTo(d,y,z);\nwhile(y.signum() > 0) {\n r = (a+z.intValue()).toString(b).substr(1) + r;\n y.divRemTo(d,y,z);\n}\nreturn z.intValue().toString(b) + r;\n}\n\n//(protected) convert from radix string\nfunction bnpFromRadix(s,b) {\nthis.fromInt(0);\nif(b == null) b = 10;\nvar cs = this.chunkSize(b);\nvar d = Math.pow(b,cs), mi = false, j = 0, w = 0;\nfor(var i = 0; i < s.length; ++i) {\n var x = intAt(s,i);\n if(x < 0) {\n if(s.charAt(i) == \"-\" && this.signum() == 0) mi = true;\n continue;\n }\n w = b*w+x;\n if(++j >= cs) {\n this.dMultiply(d);\n this.dAddOffset(w,0);\n j = 0;\n w = 0;\n }\n}\nif(j > 0) {\n this.dMultiply(Math.pow(b,j));\n this.dAddOffset(w,0);\n}\nif(mi) BigInteger.ZERO.subTo(this,this);\n}\n\n//(protected) alternate constructor\nfunction bnpFromNumber(a,b,c) {\nif(\"number\" == typeof b) {\n // new BigInteger(int,int,RNG)\n if(a < 2) this.fromInt(1);\n else {\n this.fromNumber(a,c);\n if(!this.testBit(a-1)) // force MSB set\n this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this);\n if(this.isEven()) this.dAddOffset(1,0); // force odd\n while(!this.isProbablePrime(b)) {\n this.dAddOffset(2,0);\n if(this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a-1),this);\n }\n }\n} else {\n // new BigInteger(int,RNG)\n var x = new Array(), t = a&7;\n x.length = (a>>3)+1;\n b.nextBytes(x);\n if(t > 0) x[0] &= ((1< 0) {\n if(p < this.DB && (d = this.data[i]>>p) != (this.s&this.DM)>>p)\n r[k++] = d|(this.s<<(this.DB-p));\n while(i >= 0) {\n if(p < 8) {\n d = (this.data[i]&((1<>(p+=this.DB-8);\n } else {\n d = (this.data[i]>>(p-=8))&0xff;\n if(p <= 0) { p += this.DB; --i; }\n }\n if((d&0x80) != 0) d |= -256;\n if(k == 0 && (this.s&0x80) != (d&0x80)) ++k;\n if(k > 0 || d != this.s) r[k++] = d;\n }\n}\nreturn r;\n}\n\nfunction bnEquals(a) { return(this.compareTo(a)==0); }\nfunction bnMin(a) { return(this.compareTo(a)<0)?this:a; }\nfunction bnMax(a) { return(this.compareTo(a)>0)?this:a; }\n\n//(protected) r = this op a (bitwise)\nfunction bnpBitwiseTo(a,op,r) {\nvar i, f, m = Math.min(a.t,this.t);\nfor(i = 0; i < m; ++i) r.data[i] = op(this.data[i],a.data[i]);\nif(a.t < this.t) {\n f = a.s&this.DM;\n for(i = m; i < this.t; ++i) r.data[i] = op(this.data[i],f);\n r.t = this.t;\n} else {\n f = this.s&this.DM;\n for(i = m; i < a.t; ++i) r.data[i] = op(f,a.data[i]);\n r.t = a.t;\n}\nr.s = op(this.s,a.s);\nr.clamp();\n}\n\n//(public) this & a\nfunction op_and(x,y) { return x&y; }\nfunction bnAnd(a) { var r = nbi(); this.bitwiseTo(a,op_and,r); return r; }\n\n//(public) this | a\nfunction op_or(x,y) { return x|y; }\nfunction bnOr(a) { var r = nbi(); this.bitwiseTo(a,op_or,r); return r; }\n\n//(public) this ^ a\nfunction op_xor(x,y) { return x^y; }\nfunction bnXor(a) { var r = nbi(); this.bitwiseTo(a,op_xor,r); return r; }\n\n//(public) this & ~a\nfunction op_andnot(x,y) { return x&~y; }\nfunction bnAndNot(a) { var r = nbi(); this.bitwiseTo(a,op_andnot,r); return r; }\n\n//(public) ~this\nfunction bnNot() {\nvar r = nbi();\nfor(var i = 0; i < this.t; ++i) r.data[i] = this.DM&~this.data[i];\nr.t = this.t;\nr.s = ~this.s;\nreturn r;\n}\n\n//(public) this << n\nfunction bnShiftLeft(n) {\nvar r = nbi();\nif(n < 0) this.rShiftTo(-n,r); else this.lShiftTo(n,r);\nreturn r;\n}\n\n//(public) this >> n\nfunction bnShiftRight(n) {\nvar r = nbi();\nif(n < 0) this.lShiftTo(-n,r); else this.rShiftTo(n,r);\nreturn r;\n}\n\n//return index of lowest 1-bit in x, x < 2^31\nfunction lbit(x) {\nif(x == 0) return -1;\nvar r = 0;\nif((x&0xffff) == 0) { x >>= 16; r += 16; }\nif((x&0xff) == 0) { x >>= 8; r += 8; }\nif((x&0xf) == 0) { x >>= 4; r += 4; }\nif((x&3) == 0) { x >>= 2; r += 2; }\nif((x&1) == 0) ++r;\nreturn r;\n}\n\n//(public) returns index of lowest 1-bit (or -1 if none)\nfunction bnGetLowestSetBit() {\nfor(var i = 0; i < this.t; ++i)\n if(this.data[i] != 0) return i*this.DB+lbit(this.data[i]);\nif(this.s < 0) return this.t*this.DB;\nreturn -1;\n}\n\n//return number of 1 bits in x\nfunction cbit(x) {\nvar r = 0;\nwhile(x != 0) { x &= x-1; ++r; }\nreturn r;\n}\n\n//(public) return number of set bits\nfunction bnBitCount() {\nvar r = 0, x = this.s&this.DM;\nfor(var i = 0; i < this.t; ++i) r += cbit(this.data[i]^x);\nreturn r;\n}\n\n//(public) true iff nth bit is set\nfunction bnTestBit(n) {\nvar j = Math.floor(n/this.DB);\nif(j >= this.t) return(this.s!=0);\nreturn((this.data[j]&(1<<(n%this.DB)))!=0);\n}\n\n//(protected) this op (1<>= this.DB;\n}\nif(a.t < this.t) {\n c += a.s;\n while(i < this.t) {\n c += this.data[i];\n r.data[i++] = c&this.DM;\n c >>= this.DB;\n }\n c += this.s;\n} else {\n c += this.s;\n while(i < a.t) {\n c += a.data[i];\n r.data[i++] = c&this.DM;\n c >>= this.DB;\n }\n c += a.s;\n}\nr.s = (c<0)?-1:0;\nif(c > 0) r.data[i++] = c;\nelse if(c < -1) r.data[i++] = this.DV+c;\nr.t = i;\nr.clamp();\n}\n\n//(public) this + a\nfunction bnAdd(a) { var r = nbi(); this.addTo(a,r); return r; }\n\n//(public) this - a\nfunction bnSubtract(a) { var r = nbi(); this.subTo(a,r); return r; }\n\n//(public) this * a\nfunction bnMultiply(a) { var r = nbi(); this.multiplyTo(a,r); return r; }\n\n//(public) this / a\nfunction bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }\n\n//(public) this % a\nfunction bnRemainder(a) { var r = nbi(); this.divRemTo(a,null,r); return r; }\n\n//(public) [this/a,this%a]\nfunction bnDivideAndRemainder(a) {\nvar q = nbi(), r = nbi();\nthis.divRemTo(a,q,r);\nreturn new Array(q,r);\n}\n\n//(protected) this *= n, this >= 0, 1 < n < DV\nfunction bnpDMultiply(n) {\nthis.data[this.t] = this.am(0,n-1,this,0,0,this.t);\n++this.t;\nthis.clamp();\n}\n\n//(protected) this += n << w words, this >= 0\nfunction bnpDAddOffset(n,w) {\nif(n == 0) return;\nwhile(this.t <= w) this.data[this.t++] = 0;\nthis.data[w] += n;\nwhile(this.data[w] >= this.DV) {\n this.data[w] -= this.DV;\n if(++w >= this.t) this.data[this.t++] = 0;\n ++this.data[w];\n}\n}\n\n//A \"null\" reducer\nfunction NullExp() {}\nfunction nNop(x) { return x; }\nfunction nMulTo(x,y,r) { x.multiplyTo(y,r); }\nfunction nSqrTo(x,r) { x.squareTo(r); }\n\nNullExp.prototype.convert = nNop;\nNullExp.prototype.revert = nNop;\nNullExp.prototype.mulTo = nMulTo;\nNullExp.prototype.sqrTo = nSqrTo;\n\n//(public) this^e\nfunction bnPow(e) { return this.exp(e,new NullExp()); }\n\n//(protected) r = lower n words of \"this * a\", a.t <= n\n//\"this\" should be the larger one if appropriate.\nfunction bnpMultiplyLowerTo(a,n,r) {\nvar i = Math.min(this.t+a.t,n);\nr.s = 0; // assumes a,this >= 0\nr.t = i;\nwhile(i > 0) r.data[--i] = 0;\nvar j;\nfor(j = r.t-this.t; i < j; ++i) r.data[i+this.t] = this.am(0,a.data[i],r,i,0,this.t);\nfor(j = Math.min(a.t,n); i < j; ++i) this.am(0,a.data[i],r,i,0,n-i);\nr.clamp();\n}\n\n//(protected) r = \"this * a\" without lower n words, n > 0\n//\"this\" should be the larger one if appropriate.\nfunction bnpMultiplyUpperTo(a,n,r) {\n--n;\nvar i = r.t = this.t+a.t-n;\nr.s = 0; // assumes a,this >= 0\nwhile(--i >= 0) r.data[i] = 0;\nfor(i = Math.max(n-this.t,0); i < a.t; ++i)\n r.data[this.t+i-n] = this.am(n-i,a.data[i],r,0,0,this.t+i-n);\nr.clamp();\nr.drShiftTo(1,r);\n}\n\n//Barrett modular reduction\nfunction Barrett(m) {\n// setup Barrett\nthis.r2 = nbi();\nthis.q3 = nbi();\nBigInteger.ONE.dlShiftTo(2*m.t,this.r2);\nthis.mu = this.r2.divide(m);\nthis.m = m;\n}\n\nfunction barrettConvert(x) {\nif(x.s < 0 || x.t > 2*this.m.t) return x.mod(this.m);\nelse if(x.compareTo(this.m) < 0) return x;\nelse { var r = nbi(); x.copyTo(r); this.reduce(r); return r; }\n}\n\nfunction barrettRevert(x) { return x; }\n\n//x = x mod m (HAC 14.42)\nfunction barrettReduce(x) {\nx.drShiftTo(this.m.t-1,this.r2);\nif(x.t > this.m.t+1) { x.t = this.m.t+1; x.clamp(); }\nthis.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);\nthis.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);\nwhile(x.compareTo(this.r2) < 0) x.dAddOffset(1,this.m.t+1);\nx.subTo(this.r2,x);\nwhile(x.compareTo(this.m) >= 0) x.subTo(this.m,x);\n}\n\n//r = x^2 mod m; x != r\nfunction barrettSqrTo(x,r) { x.squareTo(r); this.reduce(r); }\n\n//r = x*y mod m; x,y != r\nfunction barrettMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }\n\nBarrett.prototype.convert = barrettConvert;\nBarrett.prototype.revert = barrettRevert;\nBarrett.prototype.reduce = barrettReduce;\nBarrett.prototype.mulTo = barrettMulTo;\nBarrett.prototype.sqrTo = barrettSqrTo;\n\n//(public) this^e % m (HAC 14.85)\nfunction bnModPow(e,m) {\nvar i = e.bitLength(), k, r = nbv(1), z;\nif(i <= 0) return r;\nelse if(i < 18) k = 1;\nelse if(i < 48) k = 3;\nelse if(i < 144) k = 4;\nelse if(i < 768) k = 5;\nelse k = 6;\nif(i < 8)\n z = new Classic(m);\nelse if(m.isEven())\n z = new Barrett(m);\nelse\n z = new Montgomery(m);\n\n// precomputation\nvar g = new Array(), n = 3, k1 = k-1, km = (1< 1) {\n var g2 = nbi();\n z.sqrTo(g[1],g2);\n while(n <= km) {\n g[n] = nbi();\n z.mulTo(g2,g[n-2],g[n]);\n n += 2;\n }\n}\n\nvar j = e.t-1, w, is1 = true, r2 = nbi(), t;\ni = nbits(e.data[j])-1;\nwhile(j >= 0) {\n if(i >= k1) w = (e.data[j]>>(i-k1))&km;\n else {\n w = (e.data[j]&((1<<(i+1))-1))<<(k1-i);\n if(j > 0) w |= e.data[j-1]>>(this.DB+i-k1);\n }\n\n n = k;\n while((w&1) == 0) { w >>= 1; --n; }\n if((i -= n) < 0) { i += this.DB; --j; }\n if(is1) { // ret == 1, don't bother squaring or multiplying it\n g[w].copyTo(r);\n is1 = false;\n } else {\n while(n > 1) { z.sqrTo(r,r2); z.sqrTo(r2,r); n -= 2; }\n if(n > 0) z.sqrTo(r,r2); else { t = r; r = r2; r2 = t; }\n z.mulTo(r2,g[w],r);\n }\n\n while(j >= 0 && (e.data[j]&(1< 0) {\n x.rShiftTo(g,x);\n y.rShiftTo(g,y);\n}\nwhile(x.signum() > 0) {\n if((i = x.getLowestSetBit()) > 0) x.rShiftTo(i,x);\n if((i = y.getLowestSetBit()) > 0) y.rShiftTo(i,y);\n if(x.compareTo(y) >= 0) {\n x.subTo(y,x);\n x.rShiftTo(1,x);\n } else {\n y.subTo(x,y);\n y.rShiftTo(1,y);\n }\n}\nif(g > 0) y.lShiftTo(g,y);\nreturn y;\n}\n\n//(protected) this % n, n < 2^26\nfunction bnpModInt(n) {\nif(n <= 0) return 0;\nvar d = this.DV%n, r = (this.s<0)?n-1:0;\nif(this.t > 0)\n if(d == 0) r = this.data[0]%n;\n else for(var i = this.t-1; i >= 0; --i) r = (d*r+this.data[i])%n;\nreturn r;\n}\n\n//(public) 1/this % m (HAC 14.61)\nfunction bnModInverse(m) {\nvar ac = m.isEven();\nif((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO;\nvar u = m.clone(), v = this.clone();\nvar a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1);\nwhile(u.signum() != 0) {\n while(u.isEven()) {\n u.rShiftTo(1,u);\n if(ac) {\n if(!a.isEven() || !b.isEven()) { a.addTo(this,a); b.subTo(m,b); }\n a.rShiftTo(1,a);\n } else if(!b.isEven()) b.subTo(m,b);\n b.rShiftTo(1,b);\n }\n while(v.isEven()) {\n v.rShiftTo(1,v);\n if(ac) {\n if(!c.isEven() || !d.isEven()) { c.addTo(this,c); d.subTo(m,d); }\n c.rShiftTo(1,c);\n } else if(!d.isEven()) d.subTo(m,d);\n d.rShiftTo(1,d);\n }\n if(u.compareTo(v) >= 0) {\n u.subTo(v,u);\n if(ac) a.subTo(c,a);\n b.subTo(d,b);\n } else {\n v.subTo(u,v);\n if(ac) c.subTo(a,c);\n d.subTo(b,d);\n }\n}\nif(v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO;\nif(d.compareTo(m) >= 0) return d.subtract(m);\nif(d.signum() < 0) d.addTo(m,d); else return d;\nif(d.signum() < 0) return d.add(m); else return d;\n}\n\nvar lowprimes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509];\nvar lplim = (1<<26)/lowprimes[lowprimes.length-1];\n\n//(public) test primality with certainty >= 1-.5^t\nfunction bnIsProbablePrime(t) {\nvar i, x = this.abs();\nif(x.t == 1 && x.data[0] <= lowprimes[lowprimes.length-1]) {\n for(i = 0; i < lowprimes.length; ++i)\n if(x.data[0] == lowprimes[i]) return true;\n return false;\n}\nif(x.isEven()) return false;\ni = 1;\nwhile(i < lowprimes.length) {\n var m = lowprimes[i], j = i+1;\n while(j < lowprimes.length && m < lplim) m *= lowprimes[j++];\n m = x.modInt(m);\n while(i < j) if(m%lowprimes[i++] == 0) return false;\n}\nreturn x.millerRabin(t);\n}\n\n//(protected) true if probably prime (HAC 4.24, Miller-Rabin)\nfunction bnpMillerRabin(t) {\nvar n1 = this.subtract(BigInteger.ONE);\nvar k = n1.getLowestSetBit();\nif(k <= 0) return false;\nvar r = n1.shiftRight(k);\nvar prng = bnGetPrng();\nvar a;\nfor(var i = 0; i < t; ++i) {\n // select witness 'a' at random from between 1 and n1\n do {\n a = new BigInteger(this.bitLength(), prng);\n }\n while(a.compareTo(BigInteger.ONE) <= 0 || a.compareTo(n1) >= 0);\n var y = a.modPow(r,this);\n if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) {\n var j = 1;\n while(j++ < k && y.compareTo(n1) != 0) {\n y = y.modPowInt(2,this);\n if(y.compareTo(BigInteger.ONE) == 0) return false;\n }\n if(y.compareTo(n1) != 0) return false;\n }\n}\nreturn true;\n}\n\n// get pseudo random number generator\nfunction bnGetPrng() {\n // create prng with api that matches BigInteger secure random\n return {\n // x is an array to fill with bytes\n nextBytes: function(x) {\n for(var i = 0; i < x.length; ++i) {\n x[i] = Math.floor(Math.random() * 0x0100);\n }\n }\n };\n}\n\n//protected\nBigInteger.prototype.chunkSize = bnpChunkSize;\nBigInteger.prototype.toRadix = bnpToRadix;\nBigInteger.prototype.fromRadix = bnpFromRadix;\nBigInteger.prototype.fromNumber = bnpFromNumber;\nBigInteger.prototype.bitwiseTo = bnpBitwiseTo;\nBigInteger.prototype.changeBit = bnpChangeBit;\nBigInteger.prototype.addTo = bnpAddTo;\nBigInteger.prototype.dMultiply = bnpDMultiply;\nBigInteger.prototype.dAddOffset = bnpDAddOffset;\nBigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo;\nBigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo;\nBigInteger.prototype.modInt = bnpModInt;\nBigInteger.prototype.millerRabin = bnpMillerRabin;\n\n//public\nBigInteger.prototype.clone = bnClone;\nBigInteger.prototype.intValue = bnIntValue;\nBigInteger.prototype.byteValue = bnByteValue;\nBigInteger.prototype.shortValue = bnShortValue;\nBigInteger.prototype.signum = bnSigNum;\nBigInteger.prototype.toByteArray = bnToByteArray;\nBigInteger.prototype.equals = bnEquals;\nBigInteger.prototype.min = bnMin;\nBigInteger.prototype.max = bnMax;\nBigInteger.prototype.and = bnAnd;\nBigInteger.prototype.or = bnOr;\nBigInteger.prototype.xor = bnXor;\nBigInteger.prototype.andNot = bnAndNot;\nBigInteger.prototype.not = bnNot;\nBigInteger.prototype.shiftLeft = bnShiftLeft;\nBigInteger.prototype.shiftRight = bnShiftRight;\nBigInteger.prototype.getLowestSetBit = bnGetLowestSetBit;\nBigInteger.prototype.bitCount = bnBitCount;\nBigInteger.prototype.testBit = bnTestBit;\nBigInteger.prototype.setBit = bnSetBit;\nBigInteger.prototype.clearBit = bnClearBit;\nBigInteger.prototype.flipBit = bnFlipBit;\nBigInteger.prototype.add = bnAdd;\nBigInteger.prototype.subtract = bnSubtract;\nBigInteger.prototype.multiply = bnMultiply;\nBigInteger.prototype.divide = bnDivide;\nBigInteger.prototype.remainder = bnRemainder;\nBigInteger.prototype.divideAndRemainder = bnDivideAndRemainder;\nBigInteger.prototype.modPow = bnModPow;\nBigInteger.prototype.modInverse = bnModInverse;\nBigInteger.prototype.pow = bnPow;\nBigInteger.prototype.gcd = bnGCD;\nBigInteger.prototype.isProbablePrime = bnIsProbablePrime;\n\n//BigInteger interfaces not implemented in jsbn:\n\n//BigInteger(int signum, byte[] magnitude)\n//double doubleValue()\n//float floatValue()\n//int hashCode()\n//long longValue()\n//static BigInteger valueOf(long val)\n","/**\n * Secure Hash Algorithm with 160-bit digest (SHA-1) implementation.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2010-2015 Digital Bazaar, Inc.\n */\nvar forge = require('./forge');\nrequire('./md');\nrequire('./util');\n\nvar sha1 = module.exports = forge.sha1 = forge.sha1 || {};\nforge.md.sha1 = forge.md.algorithms.sha1 = sha1;\n\n/**\n * Creates a SHA-1 message digest object.\n *\n * @return a message digest object.\n */\nsha1.create = function() {\n // do initialization as necessary\n if(!_initialized) {\n _init();\n }\n\n // SHA-1 state contains five 32-bit integers\n var _state = null;\n\n // input buffer\n var _input = forge.util.createBuffer();\n\n // used for word storage\n var _w = new Array(80);\n\n // message digest object\n var md = {\n algorithm: 'sha1',\n blockLength: 64,\n digestLength: 20,\n // 56-bit length of message so far (does not including padding)\n messageLength: 0,\n // true message length\n fullMessageLength: null,\n // size of message length in bytes\n messageLengthSize: 8\n };\n\n /**\n * Starts the digest.\n *\n * @return this digest object.\n */\n md.start = function() {\n // up to 56-bit message length for convenience\n md.messageLength = 0;\n\n // full message length (set md.messageLength64 for backwards-compatibility)\n md.fullMessageLength = md.messageLength64 = [];\n var int32s = md.messageLengthSize / 4;\n for(var i = 0; i < int32s; ++i) {\n md.fullMessageLength.push(0);\n }\n _input = forge.util.createBuffer();\n _state = {\n h0: 0x67452301,\n h1: 0xEFCDAB89,\n h2: 0x98BADCFE,\n h3: 0x10325476,\n h4: 0xC3D2E1F0\n };\n return md;\n };\n // start digest automatically for first time\n md.start();\n\n /**\n * Updates the digest with the given message input. The given input can\n * treated as raw input (no encoding will be applied) or an encoding of\n * 'utf8' maybe given to encode the input using UTF-8.\n *\n * @param msg the message input to update with.\n * @param encoding the encoding to use (default: 'raw', other: 'utf8').\n *\n * @return this digest object.\n */\n md.update = function(msg, encoding) {\n if(encoding === 'utf8') {\n msg = forge.util.encodeUtf8(msg);\n }\n\n // update message length\n var len = msg.length;\n md.messageLength += len;\n len = [(len / 0x100000000) >>> 0, len >>> 0];\n for(var i = md.fullMessageLength.length - 1; i >= 0; --i) {\n md.fullMessageLength[i] += len[1];\n len[1] = len[0] + ((md.fullMessageLength[i] / 0x100000000) >>> 0);\n md.fullMessageLength[i] = md.fullMessageLength[i] >>> 0;\n len[0] = ((len[1] / 0x100000000) >>> 0);\n }\n\n // add bytes to input buffer\n _input.putBytes(msg);\n\n // process bytes\n _update(_state, _w, _input);\n\n // compact input buffer every 2K or if empty\n if(_input.read > 2048 || _input.length() === 0) {\n _input.compact();\n }\n\n return md;\n };\n\n /**\n * Produces the digest.\n *\n * @return a byte buffer containing the digest value.\n */\n md.digest = function() {\n /* Note: Here we copy the remaining bytes in the input buffer and\n add the appropriate SHA-1 padding. Then we do the final update\n on a copy of the state so that if the user wants to get\n intermediate digests they can do so. */\n\n /* Determine the number of bytes that must be added to the message\n to ensure its length is congruent to 448 mod 512. In other words,\n the data to be digested must be a multiple of 512 bits (or 128 bytes).\n This data includes the message, some padding, and the length of the\n message. Since the length of the message will be encoded as 8 bytes (64\n bits), that means that the last segment of the data must have 56 bytes\n (448 bits) of message and padding. Therefore, the length of the message\n plus the padding must be congruent to 448 mod 512 because\n 512 - 128 = 448.\n\n In order to fill up the message length it must be filled with\n padding that begins with 1 bit followed by all 0 bits. Padding\n must *always* be present, so if the message length is already\n congruent to 448 mod 512, then 512 padding bits must be added. */\n\n var finalBlock = forge.util.createBuffer();\n finalBlock.putBytes(_input.bytes());\n\n // compute remaining size to be digested (include message length size)\n var remaining = (\n md.fullMessageLength[md.fullMessageLength.length - 1] +\n md.messageLengthSize);\n\n // add padding for overflow blockSize - overflow\n // _padding starts with 1 byte with first bit is set (byte value 128), then\n // there may be up to (blockSize - 1) other pad bytes\n var overflow = remaining & (md.blockLength - 1);\n finalBlock.putBytes(_padding.substr(0, md.blockLength - overflow));\n\n // serialize message length in bits in big-endian order; since length\n // is stored in bytes we multiply by 8 and add carry from next int\n var next, carry;\n var bits = md.fullMessageLength[0] * 8;\n for(var i = 0; i < md.fullMessageLength.length - 1; ++i) {\n next = md.fullMessageLength[i + 1] * 8;\n carry = (next / 0x100000000) >>> 0;\n bits += carry;\n finalBlock.putInt32(bits >>> 0);\n bits = next >>> 0;\n }\n finalBlock.putInt32(bits);\n\n var s2 = {\n h0: _state.h0,\n h1: _state.h1,\n h2: _state.h2,\n h3: _state.h3,\n h4: _state.h4\n };\n _update(s2, _w, finalBlock);\n var rval = forge.util.createBuffer();\n rval.putInt32(s2.h0);\n rval.putInt32(s2.h1);\n rval.putInt32(s2.h2);\n rval.putInt32(s2.h3);\n rval.putInt32(s2.h4);\n return rval;\n };\n\n return md;\n};\n\n// sha-1 padding bytes not initialized yet\nvar _padding = null;\nvar _initialized = false;\n\n/**\n * Initializes the constant tables.\n */\nfunction _init() {\n // create padding\n _padding = String.fromCharCode(128);\n _padding += forge.util.fillString(String.fromCharCode(0x00), 64);\n\n // now initialized\n _initialized = true;\n}\n\n/**\n * Updates a SHA-1 state with the given byte buffer.\n *\n * @param s the SHA-1 state to update.\n * @param w the array to use to store words.\n * @param bytes the byte buffer to update with.\n */\nfunction _update(s, w, bytes) {\n // consume 512 bit (64 byte) chunks\n var t, a, b, c, d, e, f, i;\n var len = bytes.length();\n while(len >= 64) {\n // the w array will be populated with sixteen 32-bit big-endian words\n // and then extended into 80 32-bit words according to SHA-1 algorithm\n // and for 32-79 using Max Locktyukhin's optimization\n\n // initialize hash value for this chunk\n a = s.h0;\n b = s.h1;\n c = s.h2;\n d = s.h3;\n e = s.h4;\n\n // round 1\n for(i = 0; i < 16; ++i) {\n t = bytes.getInt32();\n w[i] = t;\n f = d ^ (b & (c ^ d));\n t = ((a << 5) | (a >>> 27)) + f + e + 0x5A827999 + t;\n e = d;\n d = c;\n // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug\n c = ((b << 30) | (b >>> 2)) >>> 0;\n b = a;\n a = t;\n }\n for(; i < 20; ++i) {\n t = (w[i - 3] ^ w[i - 8] ^ w[i - 14] ^ w[i - 16]);\n t = (t << 1) | (t >>> 31);\n w[i] = t;\n f = d ^ (b & (c ^ d));\n t = ((a << 5) | (a >>> 27)) + f + e + 0x5A827999 + t;\n e = d;\n d = c;\n // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug\n c = ((b << 30) | (b >>> 2)) >>> 0;\n b = a;\n a = t;\n }\n // round 2\n for(; i < 32; ++i) {\n t = (w[i - 3] ^ w[i - 8] ^ w[i - 14] ^ w[i - 16]);\n t = (t << 1) | (t >>> 31);\n w[i] = t;\n f = b ^ c ^ d;\n t = ((a << 5) | (a >>> 27)) + f + e + 0x6ED9EBA1 + t;\n e = d;\n d = c;\n // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug\n c = ((b << 30) | (b >>> 2)) >>> 0;\n b = a;\n a = t;\n }\n for(; i < 40; ++i) {\n t = (w[i - 6] ^ w[i - 16] ^ w[i - 28] ^ w[i - 32]);\n t = (t << 2) | (t >>> 30);\n w[i] = t;\n f = b ^ c ^ d;\n t = ((a << 5) | (a >>> 27)) + f + e + 0x6ED9EBA1 + t;\n e = d;\n d = c;\n // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug\n c = ((b << 30) | (b >>> 2)) >>> 0;\n b = a;\n a = t;\n }\n // round 3\n for(; i < 60; ++i) {\n t = (w[i - 6] ^ w[i - 16] ^ w[i - 28] ^ w[i - 32]);\n t = (t << 2) | (t >>> 30);\n w[i] = t;\n f = (b & c) | (d & (b ^ c));\n t = ((a << 5) | (a >>> 27)) + f + e + 0x8F1BBCDC + t;\n e = d;\n d = c;\n // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug\n c = ((b << 30) | (b >>> 2)) >>> 0;\n b = a;\n a = t;\n }\n // round 4\n for(; i < 80; ++i) {\n t = (w[i - 6] ^ w[i - 16] ^ w[i - 28] ^ w[i - 32]);\n t = (t << 2) | (t >>> 30);\n w[i] = t;\n f = b ^ c ^ d;\n t = ((a << 5) | (a >>> 27)) + f + e + 0xCA62C1D6 + t;\n e = d;\n d = c;\n // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug\n c = ((b << 30) | (b >>> 2)) >>> 0;\n b = a;\n a = t;\n }\n\n // update hash state\n s.h0 = (s.h0 + a) | 0;\n s.h1 = (s.h1 + b) | 0;\n s.h2 = (s.h2 + c) | 0;\n s.h3 = (s.h3 + d) | 0;\n s.h4 = (s.h4 + e) | 0;\n\n len -= 64;\n }\n}\n","/**\n * Partial implementation of PKCS#1 v2.2: RSA-OEAP\n *\n * Modified but based on the following MIT and BSD licensed code:\n *\n * https://github.com/kjur/jsjws/blob/master/rsa.js:\n *\n * The 'jsjws'(JSON Web Signature JavaScript Library) License\n *\n * Copyright (c) 2012 Kenji Urushima\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\n * http://webrsa.cvs.sourceforge.net/viewvc/webrsa/Client/RSAES-OAEP.js?content-type=text%2Fplain:\n *\n * RSAES-OAEP.js\n * $Id: RSAES-OAEP.js,v 1.1.1.1 2003/03/19 15:37:20 ellispritchard Exp $\n * JavaScript Implementation of PKCS #1 v2.1 RSA CRYPTOGRAPHY STANDARD (RSA Laboratories, June 14, 2002)\n * Copyright (C) Ellis Pritchard, Guardian Unlimited 2003.\n * Contact: ellis@nukinetics.com\n * Distributed under the BSD License.\n *\n * Official documentation: http://www.rsa.com/rsalabs/node.asp?id=2125\n *\n * @author Evan Jones (http://evanjones.ca/)\n * @author Dave Longley\n *\n * Copyright (c) 2013-2014 Digital Bazaar, Inc.\n */\nvar forge = require('./forge');\nrequire('./util');\nrequire('./random');\nrequire('./sha1');\n\n// shortcut for PKCS#1 API\nvar pkcs1 = module.exports = forge.pkcs1 = forge.pkcs1 || {};\n\n/**\n * Encode the given RSAES-OAEP message (M) using key, with optional label (L)\n * and seed.\n *\n * This method does not perform RSA encryption, it only encodes the message\n * using RSAES-OAEP.\n *\n * @param key the RSA key to use.\n * @param message the message to encode.\n * @param options the options to use:\n * label an optional label to use.\n * seed the seed to use.\n * md the message digest object to use, undefined for SHA-1.\n * mgf1 optional mgf1 parameters:\n * md the message digest object to use for MGF1.\n *\n * @return the encoded message bytes.\n */\npkcs1.encode_rsa_oaep = function(key, message, options) {\n // parse arguments\n var label;\n var seed;\n var md;\n var mgf1Md;\n // legacy args (label, seed, md)\n if(typeof options === 'string') {\n label = options;\n seed = arguments[3] || undefined;\n md = arguments[4] || undefined;\n } else if(options) {\n label = options.label || undefined;\n seed = options.seed || undefined;\n md = options.md || undefined;\n if(options.mgf1 && options.mgf1.md) {\n mgf1Md = options.mgf1.md;\n }\n }\n\n // default OAEP to SHA-1 message digest\n if(!md) {\n md = forge.md.sha1.create();\n } else {\n md.start();\n }\n\n // default MGF-1 to same as OAEP\n if(!mgf1Md) {\n mgf1Md = md;\n }\n\n // compute length in bytes and check output\n var keyLength = Math.ceil(key.n.bitLength() / 8);\n var maxLength = keyLength - 2 * md.digestLength - 2;\n if(message.length > maxLength) {\n var error = new Error('RSAES-OAEP input message length is too long.');\n error.length = message.length;\n error.maxLength = maxLength;\n throw error;\n }\n\n if(!label) {\n label = '';\n }\n md.update(label, 'raw');\n var lHash = md.digest();\n\n var PS = '';\n var PS_length = maxLength - message.length;\n for(var i = 0; i < PS_length; i++) {\n PS += '\\x00';\n }\n\n var DB = lHash.getBytes() + PS + '\\x01' + message;\n\n if(!seed) {\n seed = forge.random.getBytes(md.digestLength);\n } else if(seed.length !== md.digestLength) {\n var error = new Error('Invalid RSAES-OAEP seed. The seed length must ' +\n 'match the digest length.');\n error.seedLength = seed.length;\n error.digestLength = md.digestLength;\n throw error;\n }\n\n var dbMask = rsa_mgf1(seed, keyLength - md.digestLength - 1, mgf1Md);\n var maskedDB = forge.util.xorBytes(DB, dbMask, DB.length);\n\n var seedMask = rsa_mgf1(maskedDB, md.digestLength, mgf1Md);\n var maskedSeed = forge.util.xorBytes(seed, seedMask, seed.length);\n\n // return encoded message\n return '\\x00' + maskedSeed + maskedDB;\n};\n\n/**\n * Decode the given RSAES-OAEP encoded message (EM) using key, with optional\n * label (L).\n *\n * This method does not perform RSA decryption, it only decodes the message\n * using RSAES-OAEP.\n *\n * @param key the RSA key to use.\n * @param em the encoded message to decode.\n * @param options the options to use:\n * label an optional label to use.\n * md the message digest object to use for OAEP, undefined for SHA-1.\n * mgf1 optional mgf1 parameters:\n * md the message digest object to use for MGF1.\n *\n * @return the decoded message bytes.\n */\npkcs1.decode_rsa_oaep = function(key, em, options) {\n // parse args\n var label;\n var md;\n var mgf1Md;\n // legacy args\n if(typeof options === 'string') {\n label = options;\n md = arguments[3] || undefined;\n } else if(options) {\n label = options.label || undefined;\n md = options.md || undefined;\n if(options.mgf1 && options.mgf1.md) {\n mgf1Md = options.mgf1.md;\n }\n }\n\n // compute length in bytes\n var keyLength = Math.ceil(key.n.bitLength() / 8);\n\n if(em.length !== keyLength) {\n var error = new Error('RSAES-OAEP encoded message length is invalid.');\n error.length = em.length;\n error.expectedLength = keyLength;\n throw error;\n }\n\n // default OAEP to SHA-1 message digest\n if(md === undefined) {\n md = forge.md.sha1.create();\n } else {\n md.start();\n }\n\n // default MGF-1 to same as OAEP\n if(!mgf1Md) {\n mgf1Md = md;\n }\n\n if(keyLength < 2 * md.digestLength + 2) {\n throw new Error('RSAES-OAEP key is too short for the hash function.');\n }\n\n if(!label) {\n label = '';\n }\n md.update(label, 'raw');\n var lHash = md.digest().getBytes();\n\n // split the message into its parts\n var y = em.charAt(0);\n var maskedSeed = em.substring(1, md.digestLength + 1);\n var maskedDB = em.substring(1 + md.digestLength);\n\n var seedMask = rsa_mgf1(maskedDB, md.digestLength, mgf1Md);\n var seed = forge.util.xorBytes(maskedSeed, seedMask, maskedSeed.length);\n\n var dbMask = rsa_mgf1(seed, keyLength - md.digestLength - 1, mgf1Md);\n var db = forge.util.xorBytes(maskedDB, dbMask, maskedDB.length);\n\n var lHashPrime = db.substring(0, md.digestLength);\n\n // constant time check that all values match what is expected\n var error = (y !== '\\x00');\n\n // constant time check lHash vs lHashPrime\n for(var i = 0; i < md.digestLength; ++i) {\n error |= (lHash.charAt(i) !== lHashPrime.charAt(i));\n }\n\n // \"constant time\" find the 0x1 byte separating the padding (zeros) from the\n // message\n // TODO: It must be possible to do this in a better/smarter way?\n var in_ps = 1;\n var index = md.digestLength;\n for(var j = md.digestLength; j < db.length; j++) {\n var code = db.charCodeAt(j);\n\n var is_0 = (code & 0x1) ^ 0x1;\n\n // non-zero if not 0 or 1 in the ps section\n var error_mask = in_ps ? 0xfffe : 0x0000;\n error |= (code & error_mask);\n\n // latch in_ps to zero after we find 0x1\n in_ps = in_ps & is_0;\n index += in_ps;\n }\n\n if(error || db.charCodeAt(index) !== 0x1) {\n throw new Error('Invalid RSAES-OAEP padding.');\n }\n\n return db.substring(index + 1);\n};\n\nfunction rsa_mgf1(seed, maskLength, hash) {\n // default to SHA-1 message digest\n if(!hash) {\n hash = forge.md.sha1.create();\n }\n var t = '';\n var count = Math.ceil(maskLength / hash.digestLength);\n for(var i = 0; i < count; ++i) {\n var c = String.fromCharCode(\n (i >> 24) & 0xFF, (i >> 16) & 0xFF, (i >> 8) & 0xFF, i & 0xFF);\n hash.start();\n hash.update(seed + c);\n t += hash.digest().getBytes();\n }\n return t.substring(0, maskLength);\n}\n","/**\n * Prime number generation API.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2014 Digital Bazaar, Inc.\n */\nvar forge = require('./forge');\nrequire('./util');\nrequire('./jsbn');\nrequire('./random');\n\n(function() {\n\n// forge.prime already defined\nif(forge.prime) {\n module.exports = forge.prime;\n return;\n}\n\n/* PRIME API */\nvar prime = module.exports = forge.prime = forge.prime || {};\n\nvar BigInteger = forge.jsbn.BigInteger;\n\n// primes are 30k+i for i = 1, 7, 11, 13, 17, 19, 23, 29\nvar GCD_30_DELTA = [6, 4, 2, 4, 2, 4, 6, 2];\nvar THIRTY = new BigInteger(null);\nTHIRTY.fromInt(30);\nvar op_or = function(x, y) {return x|y;};\n\n/**\n * Generates a random probable prime with the given number of bits.\n *\n * Alternative algorithms can be specified by name as a string or as an\n * object with custom options like so:\n *\n * {\n * name: 'PRIMEINC',\n * options: {\n * maxBlockTime: ,\n * millerRabinTests: ,\n * workerScript: ,\n * workers: .\n * workLoad: the size of the work load, ie: number of possible prime\n * numbers for each web worker to check per work assignment,\n * (default: 100).\n * }\n * }\n *\n * @param bits the number of bits for the prime number.\n * @param options the options to use.\n * [algorithm] the algorithm to use (default: 'PRIMEINC').\n * [prng] a custom crypto-secure pseudo-random number generator to use,\n * that must define \"getBytesSync\".\n *\n * @return callback(err, num) called once the operation completes.\n */\nprime.generateProbablePrime = function(bits, options, callback) {\n if(typeof options === 'function') {\n callback = options;\n options = {};\n }\n options = options || {};\n\n // default to PRIMEINC algorithm\n var algorithm = options.algorithm || 'PRIMEINC';\n if(typeof algorithm === 'string') {\n algorithm = {name: algorithm};\n }\n algorithm.options = algorithm.options || {};\n\n // create prng with api that matches BigInteger secure random\n var prng = options.prng || forge.random;\n var rng = {\n // x is an array to fill with bytes\n nextBytes: function(x) {\n var b = prng.getBytesSync(x.length);\n for(var i = 0; i < x.length; ++i) {\n x[i] = b.charCodeAt(i);\n }\n }\n };\n\n if(algorithm.name === 'PRIMEINC') {\n return primeincFindPrime(bits, rng, algorithm.options, callback);\n }\n\n throw new Error('Invalid prime generation algorithm: ' + algorithm.name);\n};\n\nfunction primeincFindPrime(bits, rng, options, callback) {\n if('workers' in options) {\n return primeincFindPrimeWithWorkers(bits, rng, options, callback);\n }\n return primeincFindPrimeWithoutWorkers(bits, rng, options, callback);\n}\n\nfunction primeincFindPrimeWithoutWorkers(bits, rng, options, callback) {\n // initialize random number\n var num = generateRandom(bits, rng);\n\n /* Note: All primes are of the form 30k+i for i < 30 and gcd(30, i)=1. The\n number we are given is always aligned at 30k + 1. Each time the number is\n determined not to be prime we add to get to the next 'i', eg: if the number\n was at 30k + 1 we add 6. */\n var deltaIdx = 0;\n\n // get required number of MR tests\n var mrTests = getMillerRabinTests(num.bitLength());\n if('millerRabinTests' in options) {\n mrTests = options.millerRabinTests;\n }\n\n // find prime nearest to 'num' for maxBlockTime ms\n // 10 ms gives 5ms of leeway for other calculations before dropping\n // below 60fps (1000/60 == 16.67), but in reality, the number will\n // likely be higher due to an 'atomic' big int modPow\n var maxBlockTime = 10;\n if('maxBlockTime' in options) {\n maxBlockTime = options.maxBlockTime;\n }\n\n _primeinc(num, bits, rng, deltaIdx, mrTests, maxBlockTime, callback);\n}\n\nfunction _primeinc(num, bits, rng, deltaIdx, mrTests, maxBlockTime, callback) {\n var start = +new Date();\n do {\n // overflow, regenerate random number\n if(num.bitLength() > bits) {\n num = generateRandom(bits, rng);\n }\n // do primality test\n if(num.isProbablePrime(mrTests)) {\n return callback(null, num);\n }\n // get next potential prime\n num.dAddOffset(GCD_30_DELTA[deltaIdx++ % 8], 0);\n } while(maxBlockTime < 0 || (+new Date() - start < maxBlockTime));\n\n // keep trying later\n forge.util.setImmediate(function() {\n _primeinc(num, bits, rng, deltaIdx, mrTests, maxBlockTime, callback);\n });\n}\n\n// NOTE: This algorithm is indeterminate in nature because workers\n// run in parallel looking at different segments of numbers. Even if this\n// algorithm is run twice with the same input from a predictable RNG, it\n// may produce different outputs.\nfunction primeincFindPrimeWithWorkers(bits, rng, options, callback) {\n // web workers unavailable\n if(typeof Worker === 'undefined') {\n return primeincFindPrimeWithoutWorkers(bits, rng, options, callback);\n }\n\n // initialize random number\n var num = generateRandom(bits, rng);\n\n // use web workers to generate keys\n var numWorkers = options.workers;\n var workLoad = options.workLoad || 100;\n var range = workLoad * 30 / 8;\n var workerScript = options.workerScript || 'forge/prime.worker.js';\n if(numWorkers === -1) {\n return forge.util.estimateCores(function(err, cores) {\n if(err) {\n // default to 2\n cores = 2;\n }\n numWorkers = cores - 1;\n generate();\n });\n }\n generate();\n\n function generate() {\n // require at least 1 worker\n numWorkers = Math.max(1, numWorkers);\n\n // TODO: consider optimizing by starting workers outside getPrime() ...\n // note that in order to clean up they will have to be made internally\n // asynchronous which may actually be slower\n\n // start workers immediately\n var workers = [];\n for(var i = 0; i < numWorkers; ++i) {\n // FIXME: fix path or use blob URLs\n workers[i] = new Worker(workerScript);\n }\n var running = numWorkers;\n\n // listen for requests from workers and assign ranges to find prime\n for(var i = 0; i < numWorkers; ++i) {\n workers[i].addEventListener('message', workerMessage);\n }\n\n /* Note: The distribution of random numbers is unknown. Therefore, each\n web worker is continuously allocated a range of numbers to check for a\n random number until one is found.\n\n Every 30 numbers will be checked just 8 times, because prime numbers\n have the form:\n\n 30k+i, for i < 30 and gcd(30, i)=1 (there are 8 values of i for this)\n\n Therefore, if we want a web worker to run N checks before asking for\n a new range of numbers, each range must contain N*30/8 numbers.\n\n For 100 checks (workLoad), this is a range of 375. */\n\n var found = false;\n function workerMessage(e) {\n // ignore message, prime already found\n if(found) {\n return;\n }\n\n --running;\n var data = e.data;\n if(data.found) {\n // terminate all workers\n for(var i = 0; i < workers.length; ++i) {\n workers[i].terminate();\n }\n found = true;\n return callback(null, new BigInteger(data.prime, 16));\n }\n\n // overflow, regenerate random number\n if(num.bitLength() > bits) {\n num = generateRandom(bits, rng);\n }\n\n // assign new range to check\n var hex = num.toString(16);\n\n // start prime search\n e.target.postMessage({\n hex: hex,\n workLoad: workLoad\n });\n\n num.dAddOffset(range, 0);\n }\n }\n}\n\n/**\n * Generates a random number using the given number of bits and RNG.\n *\n * @param bits the number of bits for the number.\n * @param rng the random number generator to use.\n *\n * @return the random number.\n */\nfunction generateRandom(bits, rng) {\n var num = new BigInteger(bits, rng);\n // force MSB set\n var bits1 = bits - 1;\n if(!num.testBit(bits1)) {\n num.bitwiseTo(BigInteger.ONE.shiftLeft(bits1), op_or, num);\n }\n // align number on 30k+1 boundary\n num.dAddOffset(31 - num.mod(THIRTY).byteValue(), 0);\n return num;\n}\n\n/**\n * Returns the required number of Miller-Rabin tests to generate a\n * prime with an error probability of (1/2)^80.\n *\n * See Handbook of Applied Cryptography Chapter 4, Table 4.4.\n *\n * @param bits the bit size.\n *\n * @return the required number of iterations.\n */\nfunction getMillerRabinTests(bits) {\n if(bits <= 100) return 27;\n if(bits <= 150) return 18;\n if(bits <= 200) return 15;\n if(bits <= 250) return 12;\n if(bits <= 300) return 9;\n if(bits <= 350) return 8;\n if(bits <= 400) return 7;\n if(bits <= 500) return 6;\n if(bits <= 600) return 5;\n if(bits <= 800) return 4;\n if(bits <= 1250) return 3;\n return 2;\n}\n\n})();\n","/**\n * Javascript implementation of basic RSA algorithms.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2010-2014 Digital Bazaar, Inc.\n *\n * The only algorithm currently supported for PKI is RSA.\n *\n * An RSA key is often stored in ASN.1 DER format. The SubjectPublicKeyInfo\n * ASN.1 structure is composed of an algorithm of type AlgorithmIdentifier\n * and a subjectPublicKey of type bit string.\n *\n * The AlgorithmIdentifier contains an Object Identifier (OID) and parameters\n * for the algorithm, if any. In the case of RSA, there aren't any.\n *\n * SubjectPublicKeyInfo ::= SEQUENCE {\n * algorithm AlgorithmIdentifier,\n * subjectPublicKey BIT STRING\n * }\n *\n * AlgorithmIdentifer ::= SEQUENCE {\n * algorithm OBJECT IDENTIFIER,\n * parameters ANY DEFINED BY algorithm OPTIONAL\n * }\n *\n * For an RSA public key, the subjectPublicKey is:\n *\n * RSAPublicKey ::= SEQUENCE {\n * modulus INTEGER, -- n\n * publicExponent INTEGER -- e\n * }\n *\n * PrivateKeyInfo ::= SEQUENCE {\n * version Version,\n * privateKeyAlgorithm PrivateKeyAlgorithmIdentifier,\n * privateKey PrivateKey,\n * attributes [0] IMPLICIT Attributes OPTIONAL\n * }\n *\n * Version ::= INTEGER\n * PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier\n * PrivateKey ::= OCTET STRING\n * Attributes ::= SET OF Attribute\n *\n * An RSA private key as the following structure:\n *\n * RSAPrivateKey ::= SEQUENCE {\n * version Version,\n * modulus INTEGER, -- n\n * publicExponent INTEGER, -- e\n * privateExponent INTEGER, -- d\n * prime1 INTEGER, -- p\n * prime2 INTEGER, -- q\n * exponent1 INTEGER, -- d mod (p-1)\n * exponent2 INTEGER, -- d mod (q-1)\n * coefficient INTEGER -- (inverse of q) mod p\n * }\n *\n * Version ::= INTEGER\n *\n * The OID for the RSA key algorithm is: 1.2.840.113549.1.1.1\n */\nvar forge = require('./forge');\nrequire('./asn1');\nrequire('./jsbn');\nrequire('./oids');\nrequire('./pkcs1');\nrequire('./prime');\nrequire('./random');\nrequire('./util');\n\nif(typeof BigInteger === 'undefined') {\n var BigInteger = forge.jsbn.BigInteger;\n}\n\nvar _crypto = forge.util.isNodejs ? require('crypto') : null;\n\n// shortcut for asn.1 API\nvar asn1 = forge.asn1;\n\n// shortcut for util API\nvar util = forge.util;\n\n/*\n * RSA encryption and decryption, see RFC 2313.\n */\nforge.pki = forge.pki || {};\nmodule.exports = forge.pki.rsa = forge.rsa = forge.rsa || {};\nvar pki = forge.pki;\n\n// for finding primes, which are 30k+i for i = 1, 7, 11, 13, 17, 19, 23, 29\nvar GCD_30_DELTA = [6, 4, 2, 4, 2, 4, 6, 2];\n\n// validator for a PrivateKeyInfo structure\nvar privateKeyValidator = {\n // PrivateKeyInfo\n name: 'PrivateKeyInfo',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n // Version (INTEGER)\n name: 'PrivateKeyInfo.version',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.INTEGER,\n constructed: false,\n capture: 'privateKeyVersion'\n }, {\n // privateKeyAlgorithm\n name: 'PrivateKeyInfo.privateKeyAlgorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'AlgorithmIdentifier.algorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OID,\n constructed: false,\n capture: 'privateKeyOid'\n }]\n }, {\n // PrivateKey\n name: 'PrivateKeyInfo',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OCTETSTRING,\n constructed: false,\n capture: 'privateKey'\n }]\n};\n\n// validator for an RSA private key\nvar rsaPrivateKeyValidator = {\n // RSAPrivateKey\n name: 'RSAPrivateKey',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n // Version (INTEGER)\n name: 'RSAPrivateKey.version',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.INTEGER,\n constructed: false,\n capture: 'privateKeyVersion'\n }, {\n // modulus (n)\n name: 'RSAPrivateKey.modulus',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.INTEGER,\n constructed: false,\n capture: 'privateKeyModulus'\n }, {\n // publicExponent (e)\n name: 'RSAPrivateKey.publicExponent',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.INTEGER,\n constructed: false,\n capture: 'privateKeyPublicExponent'\n }, {\n // privateExponent (d)\n name: 'RSAPrivateKey.privateExponent',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.INTEGER,\n constructed: false,\n capture: 'privateKeyPrivateExponent'\n }, {\n // prime1 (p)\n name: 'RSAPrivateKey.prime1',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.INTEGER,\n constructed: false,\n capture: 'privateKeyPrime1'\n }, {\n // prime2 (q)\n name: 'RSAPrivateKey.prime2',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.INTEGER,\n constructed: false,\n capture: 'privateKeyPrime2'\n }, {\n // exponent1 (d mod (p-1))\n name: 'RSAPrivateKey.exponent1',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.INTEGER,\n constructed: false,\n capture: 'privateKeyExponent1'\n }, {\n // exponent2 (d mod (q-1))\n name: 'RSAPrivateKey.exponent2',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.INTEGER,\n constructed: false,\n capture: 'privateKeyExponent2'\n }, {\n // coefficient ((inverse of q) mod p)\n name: 'RSAPrivateKey.coefficient',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.INTEGER,\n constructed: false,\n capture: 'privateKeyCoefficient'\n }]\n};\n\n// validator for an RSA public key\nvar rsaPublicKeyValidator = {\n // RSAPublicKey\n name: 'RSAPublicKey',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n // modulus (n)\n name: 'RSAPublicKey.modulus',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.INTEGER,\n constructed: false,\n capture: 'publicKeyModulus'\n }, {\n // publicExponent (e)\n name: 'RSAPublicKey.exponent',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.INTEGER,\n constructed: false,\n capture: 'publicKeyExponent'\n }]\n};\n\n// validator for an SubjectPublicKeyInfo structure\n// Note: Currently only works with an RSA public key\nvar publicKeyValidator = forge.pki.rsa.publicKeyValidator = {\n name: 'SubjectPublicKeyInfo',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n captureAsn1: 'subjectPublicKeyInfo',\n value: [{\n name: 'SubjectPublicKeyInfo.AlgorithmIdentifier',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'AlgorithmIdentifier.algorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OID,\n constructed: false,\n capture: 'publicKeyOid'\n }]\n }, {\n // subjectPublicKey\n name: 'SubjectPublicKeyInfo.subjectPublicKey',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.BITSTRING,\n constructed: false,\n value: [{\n // RSAPublicKey\n name: 'SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n optional: true,\n captureAsn1: 'rsaPublicKey'\n }]\n }]\n};\n\n// validator for a DigestInfo structure\nvar digestInfoValidator = {\n name: 'DigestInfo',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'DigestInfo.DigestAlgorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'DigestInfo.DigestAlgorithm.algorithmIdentifier',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OID,\n constructed: false,\n capture: 'algorithmIdentifier'\n }, {\n // NULL paramters\n name: 'DigestInfo.DigestAlgorithm.parameters',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.NULL,\n // captured only to check existence for md2 and md5\n capture: 'parameters',\n optional: true,\n constructed: false\n }]\n }, {\n // digest\n name: 'DigestInfo.digest',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OCTETSTRING,\n constructed: false,\n capture: 'digest'\n }]\n};\n\n/**\n * Wrap digest in DigestInfo object.\n *\n * This function implements EMSA-PKCS1-v1_5-ENCODE as per RFC 3447.\n *\n * DigestInfo ::= SEQUENCE {\n * digestAlgorithm DigestAlgorithmIdentifier,\n * digest Digest\n * }\n *\n * DigestAlgorithmIdentifier ::= AlgorithmIdentifier\n * Digest ::= OCTET STRING\n *\n * @param md the message digest object with the hash to sign.\n *\n * @return the encoded message (ready for RSA encrytion)\n */\nvar emsaPkcs1v15encode = function(md) {\n // get the oid for the algorithm\n var oid;\n if(md.algorithm in pki.oids) {\n oid = pki.oids[md.algorithm];\n } else {\n var error = new Error('Unknown message digest algorithm.');\n error.algorithm = md.algorithm;\n throw error;\n }\n var oidBytes = asn1.oidToDer(oid).getBytes();\n\n // create the digest info\n var digestInfo = asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, []);\n var digestAlgorithm = asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, []);\n digestAlgorithm.value.push(asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.OID, false, oidBytes));\n digestAlgorithm.value.push(asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.NULL, false, ''));\n var digest = asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING,\n false, md.digest().getBytes());\n digestInfo.value.push(digestAlgorithm);\n digestInfo.value.push(digest);\n\n // encode digest info\n return asn1.toDer(digestInfo).getBytes();\n};\n\n/**\n * Performs x^c mod n (RSA encryption or decryption operation).\n *\n * @param x the number to raise and mod.\n * @param key the key to use.\n * @param pub true if the key is public, false if private.\n *\n * @return the result of x^c mod n.\n */\nvar _modPow = function(x, key, pub) {\n if(pub) {\n return x.modPow(key.e, key.n);\n }\n\n if(!key.p || !key.q) {\n // allow calculation without CRT params (slow)\n return x.modPow(key.d, key.n);\n }\n\n // pre-compute dP, dQ, and qInv if necessary\n if(!key.dP) {\n key.dP = key.d.mod(key.p.subtract(BigInteger.ONE));\n }\n if(!key.dQ) {\n key.dQ = key.d.mod(key.q.subtract(BigInteger.ONE));\n }\n if(!key.qInv) {\n key.qInv = key.q.modInverse(key.p);\n }\n\n /* Chinese remainder theorem (CRT) states:\n\n Suppose n1, n2, ..., nk are positive integers which are pairwise\n coprime (n1 and n2 have no common factors other than 1). For any\n integers x1, x2, ..., xk there exists an integer x solving the\n system of simultaneous congruences (where ~= means modularly\n congruent so a ~= b mod n means a mod n = b mod n):\n\n x ~= x1 mod n1\n x ~= x2 mod n2\n ...\n x ~= xk mod nk\n\n This system of congruences has a single simultaneous solution x\n between 0 and n - 1. Furthermore, each xk solution and x itself\n is congruent modulo the product n = n1*n2*...*nk.\n So x1 mod n = x2 mod n = xk mod n = x mod n.\n\n The single simultaneous solution x can be solved with the following\n equation:\n\n x = sum(xi*ri*si) mod n where ri = n/ni and si = ri^-1 mod ni.\n\n Where x is less than n, xi = x mod ni.\n\n For RSA we are only concerned with k = 2. The modulus n = pq, where\n p and q are coprime. The RSA decryption algorithm is:\n\n y = x^d mod n\n\n Given the above:\n\n x1 = x^d mod p\n r1 = n/p = q\n s1 = q^-1 mod p\n x2 = x^d mod q\n r2 = n/q = p\n s2 = p^-1 mod q\n\n So y = (x1r1s1 + x2r2s2) mod n\n = ((x^d mod p)q(q^-1 mod p) + (x^d mod q)p(p^-1 mod q)) mod n\n\n According to Fermat's Little Theorem, if the modulus P is prime,\n for any integer A not evenly divisible by P, A^(P-1) ~= 1 mod P.\n Since A is not divisible by P it follows that if:\n N ~= M mod (P - 1), then A^N mod P = A^M mod P. Therefore:\n\n A^N mod P = A^(M mod (P - 1)) mod P. (The latter takes less effort\n to calculate). In order to calculate x^d mod p more quickly the\n exponent d mod (p - 1) is stored in the RSA private key (the same\n is done for x^d mod q). These values are referred to as dP and dQ\n respectively. Therefore we now have:\n\n y = ((x^dP mod p)q(q^-1 mod p) + (x^dQ mod q)p(p^-1 mod q)) mod n\n\n Since we'll be reducing x^dP by modulo p (same for q) we can also\n reduce x by p (and q respectively) before hand. Therefore, let\n\n xp = ((x mod p)^dP mod p), and\n xq = ((x mod q)^dQ mod q), yielding:\n\n y = (xp*q*(q^-1 mod p) + xq*p*(p^-1 mod q)) mod n\n\n This can be further reduced to a simple algorithm that only\n requires 1 inverse (the q inverse is used) to be used and stored.\n The algorithm is called Garner's algorithm. If qInv is the\n inverse of q, we simply calculate:\n\n y = (qInv*(xp - xq) mod p) * q + xq\n\n However, there are two further complications. First, we need to\n ensure that xp > xq to prevent signed BigIntegers from being used\n so we add p until this is true (since we will be mod'ing with\n p anyway). Then, there is a known timing attack on algorithms\n using the CRT. To mitigate this risk, \"cryptographic blinding\"\n should be used. This requires simply generating a random number r\n between 0 and n-1 and its inverse and multiplying x by r^e before\n calculating y and then multiplying y by r^-1 afterwards. Note that\n r must be coprime with n (gcd(r, n) === 1) in order to have an\n inverse.\n */\n\n // cryptographic blinding\n var r;\n do {\n r = new BigInteger(\n forge.util.bytesToHex(forge.random.getBytes(key.n.bitLength() / 8)),\n 16);\n } while(r.compareTo(key.n) >= 0 || !r.gcd(key.n).equals(BigInteger.ONE));\n x = x.multiply(r.modPow(key.e, key.n)).mod(key.n);\n\n // calculate xp and xq\n var xp = x.mod(key.p).modPow(key.dP, key.p);\n var xq = x.mod(key.q).modPow(key.dQ, key.q);\n\n // xp must be larger than xq to avoid signed bit usage\n while(xp.compareTo(xq) < 0) {\n xp = xp.add(key.p);\n }\n\n // do last step\n var y = xp.subtract(xq)\n .multiply(key.qInv).mod(key.p)\n .multiply(key.q).add(xq);\n\n // remove effect of random for cryptographic blinding\n y = y.multiply(r.modInverse(key.n)).mod(key.n);\n\n return y;\n};\n\n/**\n * NOTE: THIS METHOD IS DEPRECATED, use 'sign' on a private key object or\n * 'encrypt' on a public key object instead.\n *\n * Performs RSA encryption.\n *\n * The parameter bt controls whether to put padding bytes before the\n * message passed in. Set bt to either true or false to disable padding\n * completely (in order to handle e.g. EMSA-PSS encoding seperately before),\n * signaling whether the encryption operation is a public key operation\n * (i.e. encrypting data) or not, i.e. private key operation (data signing).\n *\n * For PKCS#1 v1.5 padding pass in the block type to use, i.e. either 0x01\n * (for signing) or 0x02 (for encryption). The key operation mode (private\n * or public) is derived from this flag in that case).\n *\n * @param m the message to encrypt as a byte string.\n * @param key the RSA key to use.\n * @param bt for PKCS#1 v1.5 padding, the block type to use\n * (0x01 for private key, 0x02 for public),\n * to disable padding: true = public key, false = private key.\n *\n * @return the encrypted bytes as a string.\n */\npki.rsa.encrypt = function(m, key, bt) {\n var pub = bt;\n var eb;\n\n // get the length of the modulus in bytes\n var k = Math.ceil(key.n.bitLength() / 8);\n\n if(bt !== false && bt !== true) {\n // legacy, default to PKCS#1 v1.5 padding\n pub = (bt === 0x02);\n eb = _encodePkcs1_v1_5(m, key, bt);\n } else {\n eb = forge.util.createBuffer();\n eb.putBytes(m);\n }\n\n // load encryption block as big integer 'x'\n // FIXME: hex conversion inefficient, get BigInteger w/byte strings\n var x = new BigInteger(eb.toHex(), 16);\n\n // do RSA encryption\n var y = _modPow(x, key, pub);\n\n // convert y into the encrypted data byte string, if y is shorter in\n // bytes than k, then prepend zero bytes to fill up ed\n // FIXME: hex conversion inefficient, get BigInteger w/byte strings\n var yhex = y.toString(16);\n var ed = forge.util.createBuffer();\n var zeros = k - Math.ceil(yhex.length / 2);\n while(zeros > 0) {\n ed.putByte(0x00);\n --zeros;\n }\n ed.putBytes(forge.util.hexToBytes(yhex));\n return ed.getBytes();\n};\n\n/**\n * NOTE: THIS METHOD IS DEPRECATED, use 'decrypt' on a private key object or\n * 'verify' on a public key object instead.\n *\n * Performs RSA decryption.\n *\n * The parameter ml controls whether to apply PKCS#1 v1.5 padding\n * or not. Set ml = false to disable padding removal completely\n * (in order to handle e.g. EMSA-PSS later on) and simply pass back\n * the RSA encryption block.\n *\n * @param ed the encrypted data to decrypt in as a byte string.\n * @param key the RSA key to use.\n * @param pub true for a public key operation, false for private.\n * @param ml the message length, if known, false to disable padding.\n *\n * @return the decrypted message as a byte string.\n */\npki.rsa.decrypt = function(ed, key, pub, ml) {\n // get the length of the modulus in bytes\n var k = Math.ceil(key.n.bitLength() / 8);\n\n // error if the length of the encrypted data ED is not k\n if(ed.length !== k) {\n var error = new Error('Encrypted message length is invalid.');\n error.length = ed.length;\n error.expected = k;\n throw error;\n }\n\n // convert encrypted data into a big integer\n // FIXME: hex conversion inefficient, get BigInteger w/byte strings\n var y = new BigInteger(forge.util.createBuffer(ed).toHex(), 16);\n\n // y must be less than the modulus or it wasn't the result of\n // a previous mod operation (encryption) using that modulus\n if(y.compareTo(key.n) >= 0) {\n throw new Error('Encrypted message is invalid.');\n }\n\n // do RSA decryption\n var x = _modPow(y, key, pub);\n\n // create the encryption block, if x is shorter in bytes than k, then\n // prepend zero bytes to fill up eb\n // FIXME: hex conversion inefficient, get BigInteger w/byte strings\n var xhex = x.toString(16);\n var eb = forge.util.createBuffer();\n var zeros = k - Math.ceil(xhex.length / 2);\n while(zeros > 0) {\n eb.putByte(0x00);\n --zeros;\n }\n eb.putBytes(forge.util.hexToBytes(xhex));\n\n if(ml !== false) {\n // legacy, default to PKCS#1 v1.5 padding\n return _decodePkcs1_v1_5(eb.getBytes(), key, pub);\n }\n\n // return message\n return eb.getBytes();\n};\n\n/**\n * Creates an RSA key-pair generation state object. It is used to allow\n * key-generation to be performed in steps. It also allows for a UI to\n * display progress updates.\n *\n * @param bits the size for the private key in bits, defaults to 2048.\n * @param e the public exponent to use, defaults to 65537 (0x10001).\n * @param [options] the options to use.\n * prng a custom crypto-secure pseudo-random number generator to use,\n * that must define \"getBytesSync\".\n * algorithm the algorithm to use (default: 'PRIMEINC').\n *\n * @return the state object to use to generate the key-pair.\n */\npki.rsa.createKeyPairGenerationState = function(bits, e, options) {\n // TODO: migrate step-based prime generation code to forge.prime\n\n // set default bits\n if(typeof(bits) === 'string') {\n bits = parseInt(bits, 10);\n }\n bits = bits || 2048;\n\n // create prng with api that matches BigInteger secure random\n options = options || {};\n var prng = options.prng || forge.random;\n var rng = {\n // x is an array to fill with bytes\n nextBytes: function(x) {\n var b = prng.getBytesSync(x.length);\n for(var i = 0; i < x.length; ++i) {\n x[i] = b.charCodeAt(i);\n }\n }\n };\n\n var algorithm = options.algorithm || 'PRIMEINC';\n\n // create PRIMEINC algorithm state\n var rval;\n if(algorithm === 'PRIMEINC') {\n rval = {\n algorithm: algorithm,\n state: 0,\n bits: bits,\n rng: rng,\n eInt: e || 65537,\n e: new BigInteger(null),\n p: null,\n q: null,\n qBits: bits >> 1,\n pBits: bits - (bits >> 1),\n pqState: 0,\n num: null,\n keys: null\n };\n rval.e.fromInt(rval.eInt);\n } else {\n throw new Error('Invalid key generation algorithm: ' + algorithm);\n }\n\n return rval;\n};\n\n/**\n * Attempts to runs the key-generation algorithm for at most n seconds\n * (approximately) using the given state. When key-generation has completed,\n * the keys will be stored in state.keys.\n *\n * To use this function to update a UI while generating a key or to prevent\n * causing browser lockups/warnings, set \"n\" to a value other than 0. A\n * simple pattern for generating a key and showing a progress indicator is:\n *\n * var state = pki.rsa.createKeyPairGenerationState(2048);\n * var step = function() {\n * // step key-generation, run algorithm for 100 ms, repeat\n * if(!forge.pki.rsa.stepKeyPairGenerationState(state, 100)) {\n * setTimeout(step, 1);\n * } else {\n * // key-generation complete\n * // TODO: turn off progress indicator here\n * // TODO: use the generated key-pair in \"state.keys\"\n * }\n * };\n * // TODO: turn on progress indicator here\n * setTimeout(step, 0);\n *\n * @param state the state to use.\n * @param n the maximum number of milliseconds to run the algorithm for, 0\n * to run the algorithm to completion.\n *\n * @return true if the key-generation completed, false if not.\n */\npki.rsa.stepKeyPairGenerationState = function(state, n) {\n // set default algorithm if not set\n if(!('algorithm' in state)) {\n state.algorithm = 'PRIMEINC';\n }\n\n // TODO: migrate step-based prime generation code to forge.prime\n // TODO: abstract as PRIMEINC algorithm\n\n // do key generation (based on Tom Wu's rsa.js, see jsbn.js license)\n // with some minor optimizations and designed to run in steps\n\n // local state vars\n var THIRTY = new BigInteger(null);\n THIRTY.fromInt(30);\n var deltaIdx = 0;\n var op_or = function(x, y) {return x | y;};\n\n // keep stepping until time limit is reached or done\n var t1 = +new Date();\n var t2;\n var total = 0;\n while(state.keys === null && (n <= 0 || total < n)) {\n // generate p or q\n if(state.state === 0) {\n /* Note: All primes are of the form:\n\n 30k+i, for i < 30 and gcd(30, i)=1, where there are 8 values for i\n\n When we generate a random number, we always align it at 30k + 1. Each\n time the number is determined not to be prime we add to get to the\n next 'i', eg: if the number was at 30k + 1 we add 6. */\n var bits = (state.p === null) ? state.pBits : state.qBits;\n var bits1 = bits - 1;\n\n // get a random number\n if(state.pqState === 0) {\n state.num = new BigInteger(bits, state.rng);\n // force MSB set\n if(!state.num.testBit(bits1)) {\n state.num.bitwiseTo(\n BigInteger.ONE.shiftLeft(bits1), op_or, state.num);\n }\n // align number on 30k+1 boundary\n state.num.dAddOffset(31 - state.num.mod(THIRTY).byteValue(), 0);\n deltaIdx = 0;\n\n ++state.pqState;\n } else if(state.pqState === 1) {\n // try to make the number a prime\n if(state.num.bitLength() > bits) {\n // overflow, try again\n state.pqState = 0;\n // do primality test\n } else if(state.num.isProbablePrime(\n _getMillerRabinTests(state.num.bitLength()))) {\n ++state.pqState;\n } else {\n // get next potential prime\n state.num.dAddOffset(GCD_30_DELTA[deltaIdx++ % 8], 0);\n }\n } else if(state.pqState === 2) {\n // ensure number is coprime with e\n state.pqState =\n (state.num.subtract(BigInteger.ONE).gcd(state.e)\n .compareTo(BigInteger.ONE) === 0) ? 3 : 0;\n } else if(state.pqState === 3) {\n // store p or q\n state.pqState = 0;\n if(state.p === null) {\n state.p = state.num;\n } else {\n state.q = state.num;\n }\n\n // advance state if both p and q are ready\n if(state.p !== null && state.q !== null) {\n ++state.state;\n }\n state.num = null;\n }\n } else if(state.state === 1) {\n // ensure p is larger than q (swap them if not)\n if(state.p.compareTo(state.q) < 0) {\n state.num = state.p;\n state.p = state.q;\n state.q = state.num;\n }\n ++state.state;\n } else if(state.state === 2) {\n // compute phi: (p - 1)(q - 1) (Euler's totient function)\n state.p1 = state.p.subtract(BigInteger.ONE);\n state.q1 = state.q.subtract(BigInteger.ONE);\n state.phi = state.p1.multiply(state.q1);\n ++state.state;\n } else if(state.state === 3) {\n // ensure e and phi are coprime\n if(state.phi.gcd(state.e).compareTo(BigInteger.ONE) === 0) {\n // phi and e are coprime, advance\n ++state.state;\n } else {\n // phi and e aren't coprime, so generate a new p and q\n state.p = null;\n state.q = null;\n state.state = 0;\n }\n } else if(state.state === 4) {\n // create n, ensure n is has the right number of bits\n state.n = state.p.multiply(state.q);\n\n // ensure n is right number of bits\n if(state.n.bitLength() === state.bits) {\n // success, advance\n ++state.state;\n } else {\n // failed, get new q\n state.q = null;\n state.state = 0;\n }\n } else if(state.state === 5) {\n // set keys\n var d = state.e.modInverse(state.phi);\n state.keys = {\n privateKey: pki.rsa.setPrivateKey(\n state.n, state.e, d, state.p, state.q,\n d.mod(state.p1), d.mod(state.q1),\n state.q.modInverse(state.p)),\n publicKey: pki.rsa.setPublicKey(state.n, state.e)\n };\n }\n\n // update timing\n t2 = +new Date();\n total += t2 - t1;\n t1 = t2;\n }\n\n return state.keys !== null;\n};\n\n/**\n * Generates an RSA public-private key pair in a single call.\n *\n * To generate a key-pair in steps (to allow for progress updates and to\n * prevent blocking or warnings in slow browsers) then use the key-pair\n * generation state functions.\n *\n * To generate a key-pair asynchronously (either through web-workers, if\n * available, or by breaking up the work on the main thread), pass a\n * callback function.\n *\n * @param [bits] the size for the private key in bits, defaults to 2048.\n * @param [e] the public exponent to use, defaults to 65537.\n * @param [options] options for key-pair generation, if given then 'bits'\n * and 'e' must *not* be given:\n * bits the size for the private key in bits, (default: 2048).\n * e the public exponent to use, (default: 65537 (0x10001)).\n * workerScript the worker script URL.\n * workers the number of web workers (if supported) to use,\n * (default: 2).\n * workLoad the size of the work load, ie: number of possible prime\n * numbers for each web worker to check per work assignment,\n * (default: 100).\n * prng a custom crypto-secure pseudo-random number generator to use,\n * that must define \"getBytesSync\". Disables use of native APIs.\n * algorithm the algorithm to use (default: 'PRIMEINC').\n * @param [callback(err, keypair)] called once the operation completes.\n *\n * @return an object with privateKey and publicKey properties.\n */\npki.rsa.generateKeyPair = function(bits, e, options, callback) {\n // (bits), (options), (callback)\n if(arguments.length === 1) {\n if(typeof bits === 'object') {\n options = bits;\n bits = undefined;\n } else if(typeof bits === 'function') {\n callback = bits;\n bits = undefined;\n }\n } else if(arguments.length === 2) {\n // (bits, e), (bits, options), (bits, callback), (options, callback)\n if(typeof bits === 'number') {\n if(typeof e === 'function') {\n callback = e;\n e = undefined;\n } else if(typeof e !== 'number') {\n options = e;\n e = undefined;\n }\n } else {\n options = bits;\n callback = e;\n bits = undefined;\n e = undefined;\n }\n } else if(arguments.length === 3) {\n // (bits, e, options), (bits, e, callback), (bits, options, callback)\n if(typeof e === 'number') {\n if(typeof options === 'function') {\n callback = options;\n options = undefined;\n }\n } else {\n callback = options;\n options = e;\n e = undefined;\n }\n }\n options = options || {};\n if(bits === undefined) {\n bits = options.bits || 2048;\n }\n if(e === undefined) {\n e = options.e || 0x10001;\n }\n\n // use native code if permitted, available, and parameters are acceptable\n if(!forge.options.usePureJavaScript && !options.prng &&\n bits >= 256 && bits <= 16384 && (e === 0x10001 || e === 3)) {\n if(callback) {\n // try native async\n if(_detectNodeCrypto('generateKeyPair')) {\n return _crypto.generateKeyPair('rsa', {\n modulusLength: bits,\n publicExponent: e,\n publicKeyEncoding: {\n type: 'spki',\n format: 'pem'\n },\n privateKeyEncoding: {\n type: 'pkcs8',\n format: 'pem'\n }\n }, function(err, pub, priv) {\n if(err) {\n return callback(err);\n }\n callback(null, {\n privateKey: pki.privateKeyFromPem(priv),\n publicKey: pki.publicKeyFromPem(pub)\n });\n });\n }\n if(_detectSubtleCrypto('generateKey') &&\n _detectSubtleCrypto('exportKey')) {\n // use standard native generateKey\n return util.globalScope.crypto.subtle.generateKey({\n name: 'RSASSA-PKCS1-v1_5',\n modulusLength: bits,\n publicExponent: _intToUint8Array(e),\n hash: {name: 'SHA-256'}\n }, true /* key can be exported*/, ['sign', 'verify'])\n .then(function(pair) {\n return util.globalScope.crypto.subtle.exportKey(\n 'pkcs8', pair.privateKey);\n // avoiding catch(function(err) {...}) to support IE <= 8\n }).then(undefined, function(err) {\n callback(err);\n }).then(function(pkcs8) {\n if(pkcs8) {\n var privateKey = pki.privateKeyFromAsn1(\n asn1.fromDer(forge.util.createBuffer(pkcs8)));\n callback(null, {\n privateKey: privateKey,\n publicKey: pki.setRsaPublicKey(privateKey.n, privateKey.e)\n });\n }\n });\n }\n if(_detectSubtleMsCrypto('generateKey') &&\n _detectSubtleMsCrypto('exportKey')) {\n var genOp = util.globalScope.msCrypto.subtle.generateKey({\n name: 'RSASSA-PKCS1-v1_5',\n modulusLength: bits,\n publicExponent: _intToUint8Array(e),\n hash: {name: 'SHA-256'}\n }, true /* key can be exported*/, ['sign', 'verify']);\n genOp.oncomplete = function(e) {\n var pair = e.target.result;\n var exportOp = util.globalScope.msCrypto.subtle.exportKey(\n 'pkcs8', pair.privateKey);\n exportOp.oncomplete = function(e) {\n var pkcs8 = e.target.result;\n var privateKey = pki.privateKeyFromAsn1(\n asn1.fromDer(forge.util.createBuffer(pkcs8)));\n callback(null, {\n privateKey: privateKey,\n publicKey: pki.setRsaPublicKey(privateKey.n, privateKey.e)\n });\n };\n exportOp.onerror = function(err) {\n callback(err);\n };\n };\n genOp.onerror = function(err) {\n callback(err);\n };\n return;\n }\n } else {\n // try native sync\n if(_detectNodeCrypto('generateKeyPairSync')) {\n var keypair = _crypto.generateKeyPairSync('rsa', {\n modulusLength: bits,\n publicExponent: e,\n publicKeyEncoding: {\n type: 'spki',\n format: 'pem'\n },\n privateKeyEncoding: {\n type: 'pkcs8',\n format: 'pem'\n }\n });\n return {\n privateKey: pki.privateKeyFromPem(keypair.privateKey),\n publicKey: pki.publicKeyFromPem(keypair.publicKey)\n };\n }\n }\n }\n\n // use JavaScript implementation\n var state = pki.rsa.createKeyPairGenerationState(bits, e, options);\n if(!callback) {\n pki.rsa.stepKeyPairGenerationState(state, 0);\n return state.keys;\n }\n _generateKeyPair(state, options, callback);\n};\n\n/**\n * Sets an RSA public key from BigIntegers modulus and exponent.\n *\n * @param n the modulus.\n * @param e the exponent.\n *\n * @return the public key.\n */\npki.setRsaPublicKey = pki.rsa.setPublicKey = function(n, e) {\n var key = {\n n: n,\n e: e\n };\n\n /**\n * Encrypts the given data with this public key. Newer applications\n * should use the 'RSA-OAEP' decryption scheme, 'RSAES-PKCS1-V1_5' is for\n * legacy applications.\n *\n * @param data the byte string to encrypt.\n * @param scheme the encryption scheme to use:\n * 'RSAES-PKCS1-V1_5' (default),\n * 'RSA-OAEP',\n * 'RAW', 'NONE', or null to perform raw RSA encryption,\n * an object with an 'encode' property set to a function\n * with the signature 'function(data, key)' that returns\n * a binary-encoded string representing the encoded data.\n * @param schemeOptions any scheme-specific options.\n *\n * @return the encrypted byte string.\n */\n key.encrypt = function(data, scheme, schemeOptions) {\n if(typeof scheme === 'string') {\n scheme = scheme.toUpperCase();\n } else if(scheme === undefined) {\n scheme = 'RSAES-PKCS1-V1_5';\n }\n\n if(scheme === 'RSAES-PKCS1-V1_5') {\n scheme = {\n encode: function(m, key, pub) {\n return _encodePkcs1_v1_5(m, key, 0x02).getBytes();\n }\n };\n } else if(scheme === 'RSA-OAEP' || scheme === 'RSAES-OAEP') {\n scheme = {\n encode: function(m, key) {\n return forge.pkcs1.encode_rsa_oaep(key, m, schemeOptions);\n }\n };\n } else if(['RAW', 'NONE', 'NULL', null].indexOf(scheme) !== -1) {\n scheme = {encode: function(e) {return e;}};\n } else if(typeof scheme === 'string') {\n throw new Error('Unsupported encryption scheme: \"' + scheme + '\".');\n }\n\n // do scheme-based encoding then rsa encryption\n var e = scheme.encode(data, key, true);\n return pki.rsa.encrypt(e, key, true);\n };\n\n /**\n * Verifies the given signature against the given digest.\n *\n * PKCS#1 supports multiple (currently two) signature schemes:\n * RSASSA-PKCS1-V1_5 and RSASSA-PSS.\n *\n * By default this implementation uses the \"old scheme\", i.e.\n * RSASSA-PKCS1-V1_5, in which case once RSA-decrypted, the\n * signature is an OCTET STRING that holds a DigestInfo.\n *\n * DigestInfo ::= SEQUENCE {\n * digestAlgorithm DigestAlgorithmIdentifier,\n * digest Digest\n * }\n * DigestAlgorithmIdentifier ::= AlgorithmIdentifier\n * Digest ::= OCTET STRING\n *\n * To perform PSS signature verification, provide an instance\n * of Forge PSS object as the scheme parameter.\n *\n * @param digest the message digest hash to compare against the signature,\n * as a binary-encoded string.\n * @param signature the signature to verify, as a binary-encoded string.\n * @param scheme signature verification scheme to use:\n * 'RSASSA-PKCS1-V1_5' or undefined for RSASSA PKCS#1 v1.5,\n * a Forge PSS object for RSASSA-PSS,\n * 'NONE' or null for none, DigestInfo will not be expected, but\n * PKCS#1 v1.5 padding will still be used.\n * @param options optional verify options\n * _parseAllDigestBytes testing flag to control parsing of all\n * digest bytes. Unsupported and not for general usage.\n * (default: true)\n *\n * @return true if the signature was verified, false if not.\n */\n key.verify = function(digest, signature, scheme, options) {\n if(typeof scheme === 'string') {\n scheme = scheme.toUpperCase();\n } else if(scheme === undefined) {\n scheme = 'RSASSA-PKCS1-V1_5';\n }\n if(options === undefined) {\n options = {\n _parseAllDigestBytes: true\n };\n }\n if(!('_parseAllDigestBytes' in options)) {\n options._parseAllDigestBytes = true;\n }\n\n if(scheme === 'RSASSA-PKCS1-V1_5') {\n scheme = {\n verify: function(digest, d) {\n // remove padding\n d = _decodePkcs1_v1_5(d, key, true);\n // d is ASN.1 BER-encoded DigestInfo\n var obj = asn1.fromDer(d, {\n parseAllBytes: options._parseAllDigestBytes\n });\n\n // validate DigestInfo\n var capture = {};\n var errors = [];\n if(!asn1.validate(obj, digestInfoValidator, capture, errors)) {\n var error = new Error(\n 'ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 ' +\n 'DigestInfo value.');\n error.errors = errors;\n throw error;\n }\n // check hash algorithm identifier\n // see PKCS1-v1-5DigestAlgorithms in RFC 8017\n // FIXME: add support to vaidator for strict value choices\n var oid = asn1.derToOid(capture.algorithmIdentifier);\n if(!(oid === forge.oids.md2 ||\n oid === forge.oids.md5 ||\n oid === forge.oids.sha1 ||\n oid === forge.oids.sha224 ||\n oid === forge.oids.sha256 ||\n oid === forge.oids.sha384 ||\n oid === forge.oids.sha512 ||\n oid === forge.oids['sha512-224'] ||\n oid === forge.oids['sha512-256'])) {\n var error = new Error(\n 'Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.');\n error.oid = oid;\n throw error;\n }\n\n // special check for md2 and md5 that NULL parameters exist\n if(oid === forge.oids.md2 || oid === forge.oids.md5) {\n if(!('parameters' in capture)) {\n throw new Error(\n 'ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 ' +\n 'DigestInfo value. ' +\n 'Missing algorithm identifer NULL parameters.');\n }\n }\n\n // compare the given digest to the decrypted one\n return digest === capture.digest;\n }\n };\n } else if(scheme === 'NONE' || scheme === 'NULL' || scheme === null) {\n scheme = {\n verify: function(digest, d) {\n // remove padding\n d = _decodePkcs1_v1_5(d, key, true);\n return digest === d;\n }\n };\n }\n\n // do rsa decryption w/o any decoding, then verify -- which does decoding\n var d = pki.rsa.decrypt(signature, key, true, false);\n return scheme.verify(digest, d, key.n.bitLength());\n };\n\n return key;\n};\n\n/**\n * Sets an RSA private key from BigIntegers modulus, exponent, primes,\n * prime exponents, and modular multiplicative inverse.\n *\n * @param n the modulus.\n * @param e the public exponent.\n * @param d the private exponent ((inverse of e) mod n).\n * @param p the first prime.\n * @param q the second prime.\n * @param dP exponent1 (d mod (p-1)).\n * @param dQ exponent2 (d mod (q-1)).\n * @param qInv ((inverse of q) mod p)\n *\n * @return the private key.\n */\npki.setRsaPrivateKey = pki.rsa.setPrivateKey = function(\n n, e, d, p, q, dP, dQ, qInv) {\n var key = {\n n: n,\n e: e,\n d: d,\n p: p,\n q: q,\n dP: dP,\n dQ: dQ,\n qInv: qInv\n };\n\n /**\n * Decrypts the given data with this private key. The decryption scheme\n * must match the one used to encrypt the data.\n *\n * @param data the byte string to decrypt.\n * @param scheme the decryption scheme to use:\n * 'RSAES-PKCS1-V1_5' (default),\n * 'RSA-OAEP',\n * 'RAW', 'NONE', or null to perform raw RSA decryption.\n * @param schemeOptions any scheme-specific options.\n *\n * @return the decrypted byte string.\n */\n key.decrypt = function(data, scheme, schemeOptions) {\n if(typeof scheme === 'string') {\n scheme = scheme.toUpperCase();\n } else if(scheme === undefined) {\n scheme = 'RSAES-PKCS1-V1_5';\n }\n\n // do rsa decryption w/o any decoding\n var d = pki.rsa.decrypt(data, key, false, false);\n\n if(scheme === 'RSAES-PKCS1-V1_5') {\n scheme = {decode: _decodePkcs1_v1_5};\n } else if(scheme === 'RSA-OAEP' || scheme === 'RSAES-OAEP') {\n scheme = {\n decode: function(d, key) {\n return forge.pkcs1.decode_rsa_oaep(key, d, schemeOptions);\n }\n };\n } else if(['RAW', 'NONE', 'NULL', null].indexOf(scheme) !== -1) {\n scheme = {decode: function(d) {return d;}};\n } else {\n throw new Error('Unsupported encryption scheme: \"' + scheme + '\".');\n }\n\n // decode according to scheme\n return scheme.decode(d, key, false);\n };\n\n /**\n * Signs the given digest, producing a signature.\n *\n * PKCS#1 supports multiple (currently two) signature schemes:\n * RSASSA-PKCS1-V1_5 and RSASSA-PSS.\n *\n * By default this implementation uses the \"old scheme\", i.e.\n * RSASSA-PKCS1-V1_5. In order to generate a PSS signature, provide\n * an instance of Forge PSS object as the scheme parameter.\n *\n * @param md the message digest object with the hash to sign.\n * @param scheme the signature scheme to use:\n * 'RSASSA-PKCS1-V1_5' or undefined for RSASSA PKCS#1 v1.5,\n * a Forge PSS object for RSASSA-PSS,\n * 'NONE' or null for none, DigestInfo will not be used but\n * PKCS#1 v1.5 padding will still be used.\n *\n * @return the signature as a byte string.\n */\n key.sign = function(md, scheme) {\n /* Note: The internal implementation of RSA operations is being\n transitioned away from a PKCS#1 v1.5 hard-coded scheme. Some legacy\n code like the use of an encoding block identifier 'bt' will eventually\n be removed. */\n\n // private key operation\n var bt = false;\n\n if(typeof scheme === 'string') {\n scheme = scheme.toUpperCase();\n }\n\n if(scheme === undefined || scheme === 'RSASSA-PKCS1-V1_5') {\n scheme = {encode: emsaPkcs1v15encode};\n bt = 0x01;\n } else if(scheme === 'NONE' || scheme === 'NULL' || scheme === null) {\n scheme = {encode: function() {return md;}};\n bt = 0x01;\n }\n\n // encode and then encrypt\n var d = scheme.encode(md, key.n.bitLength());\n return pki.rsa.encrypt(d, key, bt);\n };\n\n return key;\n};\n\n/**\n * Wraps an RSAPrivateKey ASN.1 object in an ASN.1 PrivateKeyInfo object.\n *\n * @param rsaKey the ASN.1 RSAPrivateKey.\n *\n * @return the ASN.1 PrivateKeyInfo.\n */\npki.wrapRsaPrivateKey = function(rsaKey) {\n // PrivateKeyInfo\n return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // version (0)\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,\n asn1.integerToDer(0).getBytes()),\n // privateKeyAlgorithm\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(pki.oids.rsaEncryption).getBytes()),\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, '')\n ]),\n // PrivateKey\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false,\n asn1.toDer(rsaKey).getBytes())\n ]);\n};\n\n/**\n * Converts a private key from an ASN.1 object.\n *\n * @param obj the ASN.1 representation of a PrivateKeyInfo containing an\n * RSAPrivateKey or an RSAPrivateKey.\n *\n * @return the private key.\n */\npki.privateKeyFromAsn1 = function(obj) {\n // get PrivateKeyInfo\n var capture = {};\n var errors = [];\n if(asn1.validate(obj, privateKeyValidator, capture, errors)) {\n obj = asn1.fromDer(forge.util.createBuffer(capture.privateKey));\n }\n\n // get RSAPrivateKey\n capture = {};\n errors = [];\n if(!asn1.validate(obj, rsaPrivateKeyValidator, capture, errors)) {\n var error = new Error('Cannot read private key. ' +\n 'ASN.1 object does not contain an RSAPrivateKey.');\n error.errors = errors;\n throw error;\n }\n\n // Note: Version is currently ignored.\n // capture.privateKeyVersion\n // FIXME: inefficient, get a BigInteger that uses byte strings\n var n, e, d, p, q, dP, dQ, qInv;\n n = forge.util.createBuffer(capture.privateKeyModulus).toHex();\n e = forge.util.createBuffer(capture.privateKeyPublicExponent).toHex();\n d = forge.util.createBuffer(capture.privateKeyPrivateExponent).toHex();\n p = forge.util.createBuffer(capture.privateKeyPrime1).toHex();\n q = forge.util.createBuffer(capture.privateKeyPrime2).toHex();\n dP = forge.util.createBuffer(capture.privateKeyExponent1).toHex();\n dQ = forge.util.createBuffer(capture.privateKeyExponent2).toHex();\n qInv = forge.util.createBuffer(capture.privateKeyCoefficient).toHex();\n\n // set private key\n return pki.setRsaPrivateKey(\n new BigInteger(n, 16),\n new BigInteger(e, 16),\n new BigInteger(d, 16),\n new BigInteger(p, 16),\n new BigInteger(q, 16),\n new BigInteger(dP, 16),\n new BigInteger(dQ, 16),\n new BigInteger(qInv, 16));\n};\n\n/**\n * Converts a private key to an ASN.1 RSAPrivateKey.\n *\n * @param key the private key.\n *\n * @return the ASN.1 representation of an RSAPrivateKey.\n */\npki.privateKeyToAsn1 = pki.privateKeyToRSAPrivateKey = function(key) {\n // RSAPrivateKey\n return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // version (0 = only 2 primes, 1 multiple primes)\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,\n asn1.integerToDer(0).getBytes()),\n // modulus (n)\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,\n _bnToBytes(key.n)),\n // publicExponent (e)\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,\n _bnToBytes(key.e)),\n // privateExponent (d)\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,\n _bnToBytes(key.d)),\n // privateKeyPrime1 (p)\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,\n _bnToBytes(key.p)),\n // privateKeyPrime2 (q)\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,\n _bnToBytes(key.q)),\n // privateKeyExponent1 (dP)\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,\n _bnToBytes(key.dP)),\n // privateKeyExponent2 (dQ)\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,\n _bnToBytes(key.dQ)),\n // coefficient (qInv)\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,\n _bnToBytes(key.qInv))\n ]);\n};\n\n/**\n * Converts a public key from an ASN.1 SubjectPublicKeyInfo or RSAPublicKey.\n *\n * @param obj the asn1 representation of a SubjectPublicKeyInfo or RSAPublicKey.\n *\n * @return the public key.\n */\npki.publicKeyFromAsn1 = function(obj) {\n // get SubjectPublicKeyInfo\n var capture = {};\n var errors = [];\n if(asn1.validate(obj, publicKeyValidator, capture, errors)) {\n // get oid\n var oid = asn1.derToOid(capture.publicKeyOid);\n if(oid !== pki.oids.rsaEncryption) {\n var error = new Error('Cannot read public key. Unknown OID.');\n error.oid = oid;\n throw error;\n }\n obj = capture.rsaPublicKey;\n }\n\n // get RSA params\n errors = [];\n if(!asn1.validate(obj, rsaPublicKeyValidator, capture, errors)) {\n var error = new Error('Cannot read public key. ' +\n 'ASN.1 object does not contain an RSAPublicKey.');\n error.errors = errors;\n throw error;\n }\n\n // FIXME: inefficient, get a BigInteger that uses byte strings\n var n = forge.util.createBuffer(capture.publicKeyModulus).toHex();\n var e = forge.util.createBuffer(capture.publicKeyExponent).toHex();\n\n // set public key\n return pki.setRsaPublicKey(\n new BigInteger(n, 16),\n new BigInteger(e, 16));\n};\n\n/**\n * Converts a public key to an ASN.1 SubjectPublicKeyInfo.\n *\n * @param key the public key.\n *\n * @return the asn1 representation of a SubjectPublicKeyInfo.\n */\npki.publicKeyToAsn1 = pki.publicKeyToSubjectPublicKeyInfo = function(key) {\n // SubjectPublicKeyInfo\n return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // AlgorithmIdentifier\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // algorithm\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(pki.oids.rsaEncryption).getBytes()),\n // parameters (null)\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, '')\n ]),\n // subjectPublicKey\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.BITSTRING, false, [\n pki.publicKeyToRSAPublicKey(key)\n ])\n ]);\n};\n\n/**\n * Converts a public key to an ASN.1 RSAPublicKey.\n *\n * @param key the public key.\n *\n * @return the asn1 representation of a RSAPublicKey.\n */\npki.publicKeyToRSAPublicKey = function(key) {\n // RSAPublicKey\n return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // modulus (n)\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,\n _bnToBytes(key.n)),\n // publicExponent (e)\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,\n _bnToBytes(key.e))\n ]);\n};\n\n/**\n * Encodes a message using PKCS#1 v1.5 padding.\n *\n * @param m the message to encode.\n * @param key the RSA key to use.\n * @param bt the block type to use, i.e. either 0x01 (for signing) or 0x02\n * (for encryption).\n *\n * @return the padded byte buffer.\n */\nfunction _encodePkcs1_v1_5(m, key, bt) {\n var eb = forge.util.createBuffer();\n\n // get the length of the modulus in bytes\n var k = Math.ceil(key.n.bitLength() / 8);\n\n /* use PKCS#1 v1.5 padding */\n if(m.length > (k - 11)) {\n var error = new Error('Message is too long for PKCS#1 v1.5 padding.');\n error.length = m.length;\n error.max = k - 11;\n throw error;\n }\n\n /* A block type BT, a padding string PS, and the data D shall be\n formatted into an octet string EB, the encryption block:\n\n EB = 00 || BT || PS || 00 || D\n\n The block type BT shall be a single octet indicating the structure of\n the encryption block. For this version of the document it shall have\n value 00, 01, or 02. For a private-key operation, the block type\n shall be 00 or 01. For a public-key operation, it shall be 02.\n\n The padding string PS shall consist of k-3-||D|| octets. For block\n type 00, the octets shall have value 00; for block type 01, they\n shall have value FF; and for block type 02, they shall be\n pseudorandomly generated and nonzero. This makes the length of the\n encryption block EB equal to k. */\n\n // build the encryption block\n eb.putByte(0x00);\n eb.putByte(bt);\n\n // create the padding\n var padNum = k - 3 - m.length;\n var padByte;\n // private key op\n if(bt === 0x00 || bt === 0x01) {\n padByte = (bt === 0x00) ? 0x00 : 0xFF;\n for(var i = 0; i < padNum; ++i) {\n eb.putByte(padByte);\n }\n } else {\n // public key op\n // pad with random non-zero values\n while(padNum > 0) {\n var numZeros = 0;\n var padBytes = forge.random.getBytes(padNum);\n for(var i = 0; i < padNum; ++i) {\n padByte = padBytes.charCodeAt(i);\n if(padByte === 0) {\n ++numZeros;\n } else {\n eb.putByte(padByte);\n }\n }\n padNum = numZeros;\n }\n }\n\n // zero followed by message\n eb.putByte(0x00);\n eb.putBytes(m);\n\n return eb;\n}\n\n/**\n * Decodes a message using PKCS#1 v1.5 padding.\n *\n * @param em the message to decode.\n * @param key the RSA key to use.\n * @param pub true if the key is a public key, false if it is private.\n * @param ml the message length, if specified.\n *\n * @return the decoded bytes.\n */\nfunction _decodePkcs1_v1_5(em, key, pub, ml) {\n // get the length of the modulus in bytes\n var k = Math.ceil(key.n.bitLength() / 8);\n\n /* It is an error if any of the following conditions occurs:\n\n 1. The encryption block EB cannot be parsed unambiguously.\n 2. The padding string PS consists of fewer than eight octets\n or is inconsisent with the block type BT.\n 3. The decryption process is a public-key operation and the block\n type BT is not 00 or 01, or the decryption process is a\n private-key operation and the block type is not 02.\n */\n\n // parse the encryption block\n var eb = forge.util.createBuffer(em);\n var first = eb.getByte();\n var bt = eb.getByte();\n if(first !== 0x00 ||\n (pub && bt !== 0x00 && bt !== 0x01) ||\n (!pub && bt != 0x02) ||\n (pub && bt === 0x00 && typeof(ml) === 'undefined')) {\n throw new Error('Encryption block is invalid.');\n }\n\n var padNum = 0;\n if(bt === 0x00) {\n // check all padding bytes for 0x00\n padNum = k - 3 - ml;\n for(var i = 0; i < padNum; ++i) {\n if(eb.getByte() !== 0x00) {\n throw new Error('Encryption block is invalid.');\n }\n }\n } else if(bt === 0x01) {\n // find the first byte that isn't 0xFF, should be after all padding\n padNum = 0;\n while(eb.length() > 1) {\n if(eb.getByte() !== 0xFF) {\n --eb.read;\n break;\n }\n ++padNum;\n }\n } else if(bt === 0x02) {\n // look for 0x00 byte\n padNum = 0;\n while(eb.length() > 1) {\n if(eb.getByte() === 0x00) {\n --eb.read;\n break;\n }\n ++padNum;\n }\n }\n\n // zero must be 0x00 and padNum must be (k - 3 - message length)\n var zero = eb.getByte();\n if(zero !== 0x00 || padNum !== (k - 3 - eb.length())) {\n throw new Error('Encryption block is invalid.');\n }\n\n return eb.getBytes();\n}\n\n/**\n * Runs the key-generation algorithm asynchronously, either in the background\n * via Web Workers, or using the main thread and setImmediate.\n *\n * @param state the key-pair generation state.\n * @param [options] options for key-pair generation:\n * workerScript the worker script URL.\n * workers the number of web workers (if supported) to use,\n * (default: 2, -1 to use estimated cores minus one).\n * workLoad the size of the work load, ie: number of possible prime\n * numbers for each web worker to check per work assignment,\n * (default: 100).\n * @param callback(err, keypair) called once the operation completes.\n */\nfunction _generateKeyPair(state, options, callback) {\n if(typeof options === 'function') {\n callback = options;\n options = {};\n }\n options = options || {};\n\n var opts = {\n algorithm: {\n name: options.algorithm || 'PRIMEINC',\n options: {\n workers: options.workers || 2,\n workLoad: options.workLoad || 100,\n workerScript: options.workerScript\n }\n }\n };\n if('prng' in options) {\n opts.prng = options.prng;\n }\n\n generate();\n\n function generate() {\n // find p and then q (done in series to simplify)\n getPrime(state.pBits, function(err, num) {\n if(err) {\n return callback(err);\n }\n state.p = num;\n if(state.q !== null) {\n return finish(err, state.q);\n }\n getPrime(state.qBits, finish);\n });\n }\n\n function getPrime(bits, callback) {\n forge.prime.generateProbablePrime(bits, opts, callback);\n }\n\n function finish(err, num) {\n if(err) {\n return callback(err);\n }\n\n // set q\n state.q = num;\n\n // ensure p is larger than q (swap them if not)\n if(state.p.compareTo(state.q) < 0) {\n var tmp = state.p;\n state.p = state.q;\n state.q = tmp;\n }\n\n // ensure p is coprime with e\n if(state.p.subtract(BigInteger.ONE).gcd(state.e)\n .compareTo(BigInteger.ONE) !== 0) {\n state.p = null;\n generate();\n return;\n }\n\n // ensure q is coprime with e\n if(state.q.subtract(BigInteger.ONE).gcd(state.e)\n .compareTo(BigInteger.ONE) !== 0) {\n state.q = null;\n getPrime(state.qBits, finish);\n return;\n }\n\n // compute phi: (p - 1)(q - 1) (Euler's totient function)\n state.p1 = state.p.subtract(BigInteger.ONE);\n state.q1 = state.q.subtract(BigInteger.ONE);\n state.phi = state.p1.multiply(state.q1);\n\n // ensure e and phi are coprime\n if(state.phi.gcd(state.e).compareTo(BigInteger.ONE) !== 0) {\n // phi and e aren't coprime, so generate a new p and q\n state.p = state.q = null;\n generate();\n return;\n }\n\n // create n, ensure n is has the right number of bits\n state.n = state.p.multiply(state.q);\n if(state.n.bitLength() !== state.bits) {\n // failed, get new q\n state.q = null;\n getPrime(state.qBits, finish);\n return;\n }\n\n // set keys\n var d = state.e.modInverse(state.phi);\n state.keys = {\n privateKey: pki.rsa.setPrivateKey(\n state.n, state.e, d, state.p, state.q,\n d.mod(state.p1), d.mod(state.q1),\n state.q.modInverse(state.p)),\n publicKey: pki.rsa.setPublicKey(state.n, state.e)\n };\n\n callback(null, state.keys);\n }\n}\n\n/**\n * Converts a positive BigInteger into 2's-complement big-endian bytes.\n *\n * @param b the big integer to convert.\n *\n * @return the bytes.\n */\nfunction _bnToBytes(b) {\n // prepend 0x00 if first byte >= 0x80\n var hex = b.toString(16);\n if(hex[0] >= '8') {\n hex = '00' + hex;\n }\n var bytes = forge.util.hexToBytes(hex);\n\n // ensure integer is minimally-encoded\n if(bytes.length > 1 &&\n // leading 0x00 for positive integer\n ((bytes.charCodeAt(0) === 0 &&\n (bytes.charCodeAt(1) & 0x80) === 0) ||\n // leading 0xFF for negative integer\n (bytes.charCodeAt(0) === 0xFF &&\n (bytes.charCodeAt(1) & 0x80) === 0x80))) {\n return bytes.substr(1);\n }\n return bytes;\n}\n\n/**\n * Returns the required number of Miller-Rabin tests to generate a\n * prime with an error probability of (1/2)^80.\n *\n * See Handbook of Applied Cryptography Chapter 4, Table 4.4.\n *\n * @param bits the bit size.\n *\n * @return the required number of iterations.\n */\nfunction _getMillerRabinTests(bits) {\n if(bits <= 100) return 27;\n if(bits <= 150) return 18;\n if(bits <= 200) return 15;\n if(bits <= 250) return 12;\n if(bits <= 300) return 9;\n if(bits <= 350) return 8;\n if(bits <= 400) return 7;\n if(bits <= 500) return 6;\n if(bits <= 600) return 5;\n if(bits <= 800) return 4;\n if(bits <= 1250) return 3;\n return 2;\n}\n\n/**\n * Performs feature detection on the Node crypto interface.\n *\n * @param fn the feature (function) to detect.\n *\n * @return true if detected, false if not.\n */\nfunction _detectNodeCrypto(fn) {\n return forge.util.isNodejs && typeof _crypto[fn] === 'function';\n}\n\n/**\n * Performs feature detection on the SubtleCrypto interface.\n *\n * @param fn the feature (function) to detect.\n *\n * @return true if detected, false if not.\n */\nfunction _detectSubtleCrypto(fn) {\n return (typeof util.globalScope !== 'undefined' &&\n typeof util.globalScope.crypto === 'object' &&\n typeof util.globalScope.crypto.subtle === 'object' &&\n typeof util.globalScope.crypto.subtle[fn] === 'function');\n}\n\n/**\n * Performs feature detection on the deprecated Microsoft Internet Explorer\n * outdated SubtleCrypto interface. This function should only be used after\n * checking for the modern, standard SubtleCrypto interface.\n *\n * @param fn the feature (function) to detect.\n *\n * @return true if detected, false if not.\n */\nfunction _detectSubtleMsCrypto(fn) {\n return (typeof util.globalScope !== 'undefined' &&\n typeof util.globalScope.msCrypto === 'object' &&\n typeof util.globalScope.msCrypto.subtle === 'object' &&\n typeof util.globalScope.msCrypto.subtle[fn] === 'function');\n}\n\nfunction _intToUint8Array(x) {\n var bytes = forge.util.hexToBytes(x.toString(16));\n var buffer = new Uint8Array(bytes.length);\n for(var i = 0; i < bytes.length; ++i) {\n buffer[i] = bytes.charCodeAt(i);\n }\n return buffer;\n}\n\nfunction _privateKeyFromJwk(jwk) {\n if(jwk.kty !== 'RSA') {\n throw new Error(\n 'Unsupported key algorithm \"' + jwk.kty + '\"; algorithm must be \"RSA\".');\n }\n return pki.setRsaPrivateKey(\n _base64ToBigInt(jwk.n),\n _base64ToBigInt(jwk.e),\n _base64ToBigInt(jwk.d),\n _base64ToBigInt(jwk.p),\n _base64ToBigInt(jwk.q),\n _base64ToBigInt(jwk.dp),\n _base64ToBigInt(jwk.dq),\n _base64ToBigInt(jwk.qi));\n}\n\nfunction _publicKeyFromJwk(jwk) {\n if(jwk.kty !== 'RSA') {\n throw new Error('Key algorithm must be \"RSA\".');\n }\n return pki.setRsaPublicKey(\n _base64ToBigInt(jwk.n),\n _base64ToBigInt(jwk.e));\n}\n\nfunction _base64ToBigInt(b64) {\n return new BigInteger(forge.util.bytesToHex(forge.util.decode64(b64)), 16);\n}\n","/**\n * Password-based encryption functions.\n *\n * @author Dave Longley\n * @author Stefan Siegl \n *\n * Copyright (c) 2010-2013 Digital Bazaar, Inc.\n * Copyright (c) 2012 Stefan Siegl \n *\n * An EncryptedPrivateKeyInfo:\n *\n * EncryptedPrivateKeyInfo ::= SEQUENCE {\n * encryptionAlgorithm EncryptionAlgorithmIdentifier,\n * encryptedData EncryptedData }\n *\n * EncryptionAlgorithmIdentifier ::= AlgorithmIdentifier\n *\n * EncryptedData ::= OCTET STRING\n */\nvar forge = require('./forge');\nrequire('./aes');\nrequire('./asn1');\nrequire('./des');\nrequire('./md');\nrequire('./oids');\nrequire('./pbkdf2');\nrequire('./pem');\nrequire('./random');\nrequire('./rc2');\nrequire('./rsa');\nrequire('./util');\n\nif(typeof BigInteger === 'undefined') {\n var BigInteger = forge.jsbn.BigInteger;\n}\n\n// shortcut for asn.1 API\nvar asn1 = forge.asn1;\n\n/* Password-based encryption implementation. */\nvar pki = forge.pki = forge.pki || {};\nmodule.exports = pki.pbe = forge.pbe = forge.pbe || {};\nvar oids = pki.oids;\n\n// validator for an EncryptedPrivateKeyInfo structure\n// Note: Currently only works w/algorithm params\nvar encryptedPrivateKeyValidator = {\n name: 'EncryptedPrivateKeyInfo',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'EncryptedPrivateKeyInfo.encryptionAlgorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'AlgorithmIdentifier.algorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OID,\n constructed: false,\n capture: 'encryptionOid'\n }, {\n name: 'AlgorithmIdentifier.parameters',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n captureAsn1: 'encryptionParams'\n }]\n }, {\n // encryptedData\n name: 'EncryptedPrivateKeyInfo.encryptedData',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OCTETSTRING,\n constructed: false,\n capture: 'encryptedData'\n }]\n};\n\n// validator for a PBES2Algorithms structure\n// Note: Currently only works w/PBKDF2 + AES encryption schemes\nvar PBES2AlgorithmsValidator = {\n name: 'PBES2Algorithms',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'PBES2Algorithms.keyDerivationFunc',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'PBES2Algorithms.keyDerivationFunc.oid',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OID,\n constructed: false,\n capture: 'kdfOid'\n }, {\n name: 'PBES2Algorithms.params',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'PBES2Algorithms.params.salt',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OCTETSTRING,\n constructed: false,\n capture: 'kdfSalt'\n }, {\n name: 'PBES2Algorithms.params.iterationCount',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.INTEGER,\n constructed: false,\n capture: 'kdfIterationCount'\n }, {\n name: 'PBES2Algorithms.params.keyLength',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.INTEGER,\n constructed: false,\n optional: true,\n capture: 'keyLength'\n }, {\n // prf\n name: 'PBES2Algorithms.params.prf',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n optional: true,\n value: [{\n name: 'PBES2Algorithms.params.prf.algorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OID,\n constructed: false,\n capture: 'prfOid'\n }]\n }]\n }]\n }, {\n name: 'PBES2Algorithms.encryptionScheme',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'PBES2Algorithms.encryptionScheme.oid',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OID,\n constructed: false,\n capture: 'encOid'\n }, {\n name: 'PBES2Algorithms.encryptionScheme.iv',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OCTETSTRING,\n constructed: false,\n capture: 'encIv'\n }]\n }]\n};\n\nvar pkcs12PbeParamsValidator = {\n name: 'pkcs-12PbeParams',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'pkcs-12PbeParams.salt',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OCTETSTRING,\n constructed: false,\n capture: 'salt'\n }, {\n name: 'pkcs-12PbeParams.iterations',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.INTEGER,\n constructed: false,\n capture: 'iterations'\n }]\n};\n\n/**\n * Encrypts a ASN.1 PrivateKeyInfo object, producing an EncryptedPrivateKeyInfo.\n *\n * PBES2Algorithms ALGORITHM-IDENTIFIER ::=\n * { {PBES2-params IDENTIFIED BY id-PBES2}, ...}\n *\n * id-PBES2 OBJECT IDENTIFIER ::= {pkcs-5 13}\n *\n * PBES2-params ::= SEQUENCE {\n * keyDerivationFunc AlgorithmIdentifier {{PBES2-KDFs}},\n * encryptionScheme AlgorithmIdentifier {{PBES2-Encs}}\n * }\n *\n * PBES2-KDFs ALGORITHM-IDENTIFIER ::=\n * { {PBKDF2-params IDENTIFIED BY id-PBKDF2}, ... }\n *\n * PBES2-Encs ALGORITHM-IDENTIFIER ::= { ... }\n *\n * PBKDF2-params ::= SEQUENCE {\n * salt CHOICE {\n * specified OCTET STRING,\n * otherSource AlgorithmIdentifier {{PBKDF2-SaltSources}}\n * },\n * iterationCount INTEGER (1..MAX),\n * keyLength INTEGER (1..MAX) OPTIONAL,\n * prf AlgorithmIdentifier {{PBKDF2-PRFs}} DEFAULT algid-hmacWithSHA1\n * }\n *\n * @param obj the ASN.1 PrivateKeyInfo object.\n * @param password the password to encrypt with.\n * @param options:\n * algorithm the encryption algorithm to use\n * ('aes128', 'aes192', 'aes256', '3des'), defaults to 'aes128'.\n * count the iteration count to use.\n * saltSize the salt size to use.\n * prfAlgorithm the PRF message digest algorithm to use\n * ('sha1', 'sha224', 'sha256', 'sha384', 'sha512')\n *\n * @return the ASN.1 EncryptedPrivateKeyInfo.\n */\npki.encryptPrivateKeyInfo = function(obj, password, options) {\n // set default options\n options = options || {};\n options.saltSize = options.saltSize || 8;\n options.count = options.count || 2048;\n options.algorithm = options.algorithm || 'aes128';\n options.prfAlgorithm = options.prfAlgorithm || 'sha1';\n\n // generate PBE params\n var salt = forge.random.getBytesSync(options.saltSize);\n var count = options.count;\n var countBytes = asn1.integerToDer(count);\n var dkLen;\n var encryptionAlgorithm;\n var encryptedData;\n if(options.algorithm.indexOf('aes') === 0 || options.algorithm === 'des') {\n // do PBES2\n var ivLen, encOid, cipherFn;\n switch(options.algorithm) {\n case 'aes128':\n dkLen = 16;\n ivLen = 16;\n encOid = oids['aes128-CBC'];\n cipherFn = forge.aes.createEncryptionCipher;\n break;\n case 'aes192':\n dkLen = 24;\n ivLen = 16;\n encOid = oids['aes192-CBC'];\n cipherFn = forge.aes.createEncryptionCipher;\n break;\n case 'aes256':\n dkLen = 32;\n ivLen = 16;\n encOid = oids['aes256-CBC'];\n cipherFn = forge.aes.createEncryptionCipher;\n break;\n case 'des':\n dkLen = 8;\n ivLen = 8;\n encOid = oids['desCBC'];\n cipherFn = forge.des.createEncryptionCipher;\n break;\n default:\n var error = new Error('Cannot encrypt private key. Unknown encryption algorithm.');\n error.algorithm = options.algorithm;\n throw error;\n }\n\n // get PRF message digest\n var prfAlgorithm = 'hmacWith' + options.prfAlgorithm.toUpperCase();\n var md = prfAlgorithmToMessageDigest(prfAlgorithm);\n\n // encrypt private key using pbe SHA-1 and AES/DES\n var dk = forge.pkcs5.pbkdf2(password, salt, count, dkLen, md);\n var iv = forge.random.getBytesSync(ivLen);\n var cipher = cipherFn(dk);\n cipher.start(iv);\n cipher.update(asn1.toDer(obj));\n cipher.finish();\n encryptedData = cipher.output.getBytes();\n\n // get PBKDF2-params\n var params = createPbkdf2Params(salt, countBytes, dkLen, prfAlgorithm);\n\n encryptionAlgorithm = asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(oids['pkcs5PBES2']).getBytes()),\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // keyDerivationFunc\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(oids['pkcs5PBKDF2']).getBytes()),\n // PBKDF2-params\n params\n ]),\n // encryptionScheme\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(encOid).getBytes()),\n // iv\n asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, iv)\n ])\n ])\n ]);\n } else if(options.algorithm === '3des') {\n // Do PKCS12 PBE\n dkLen = 24;\n\n var saltBytes = new forge.util.ByteBuffer(salt);\n var dk = pki.pbe.generatePkcs12Key(password, saltBytes, 1, count, dkLen);\n var iv = pki.pbe.generatePkcs12Key(password, saltBytes, 2, count, dkLen);\n var cipher = forge.des.createEncryptionCipher(dk);\n cipher.start(iv);\n cipher.update(asn1.toDer(obj));\n cipher.finish();\n encryptedData = cipher.output.getBytes();\n\n encryptionAlgorithm = asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(oids['pbeWithSHAAnd3-KeyTripleDES-CBC']).getBytes()),\n // pkcs-12PbeParams\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // salt\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, salt),\n // iteration count\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,\n countBytes.getBytes())\n ])\n ]);\n } else {\n var error = new Error('Cannot encrypt private key. Unknown encryption algorithm.');\n error.algorithm = options.algorithm;\n throw error;\n }\n\n // EncryptedPrivateKeyInfo\n var rval = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // encryptionAlgorithm\n encryptionAlgorithm,\n // encryptedData\n asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, encryptedData)\n ]);\n return rval;\n};\n\n/**\n * Decrypts a ASN.1 PrivateKeyInfo object.\n *\n * @param obj the ASN.1 EncryptedPrivateKeyInfo object.\n * @param password the password to decrypt with.\n *\n * @return the ASN.1 PrivateKeyInfo on success, null on failure.\n */\npki.decryptPrivateKeyInfo = function(obj, password) {\n var rval = null;\n\n // get PBE params\n var capture = {};\n var errors = [];\n if(!asn1.validate(obj, encryptedPrivateKeyValidator, capture, errors)) {\n var error = new Error('Cannot read encrypted private key. ' +\n 'ASN.1 object is not a supported EncryptedPrivateKeyInfo.');\n error.errors = errors;\n throw error;\n }\n\n // get cipher\n var oid = asn1.derToOid(capture.encryptionOid);\n var cipher = pki.pbe.getCipher(oid, capture.encryptionParams, password);\n\n // get encrypted data\n var encrypted = forge.util.createBuffer(capture.encryptedData);\n\n cipher.update(encrypted);\n if(cipher.finish()) {\n rval = asn1.fromDer(cipher.output);\n }\n\n return rval;\n};\n\n/**\n * Converts a EncryptedPrivateKeyInfo to PEM format.\n *\n * @param epki the EncryptedPrivateKeyInfo.\n * @param maxline the maximum characters per line, defaults to 64.\n *\n * @return the PEM-formatted encrypted private key.\n */\npki.encryptedPrivateKeyToPem = function(epki, maxline) {\n // convert to DER, then PEM-encode\n var msg = {\n type: 'ENCRYPTED PRIVATE KEY',\n body: asn1.toDer(epki).getBytes()\n };\n return forge.pem.encode(msg, {maxline: maxline});\n};\n\n/**\n * Converts a PEM-encoded EncryptedPrivateKeyInfo to ASN.1 format. Decryption\n * is not performed.\n *\n * @param pem the EncryptedPrivateKeyInfo in PEM-format.\n *\n * @return the ASN.1 EncryptedPrivateKeyInfo.\n */\npki.encryptedPrivateKeyFromPem = function(pem) {\n var msg = forge.pem.decode(pem)[0];\n\n if(msg.type !== 'ENCRYPTED PRIVATE KEY') {\n var error = new Error('Could not convert encrypted private key from PEM; ' +\n 'PEM header type is \"ENCRYPTED PRIVATE KEY\".');\n error.headerType = msg.type;\n throw error;\n }\n if(msg.procType && msg.procType.type === 'ENCRYPTED') {\n throw new Error('Could not convert encrypted private key from PEM; ' +\n 'PEM is encrypted.');\n }\n\n // convert DER to ASN.1 object\n return asn1.fromDer(msg.body);\n};\n\n/**\n * Encrypts an RSA private key. By default, the key will be wrapped in\n * a PrivateKeyInfo and encrypted to produce a PKCS#8 EncryptedPrivateKeyInfo.\n * This is the standard, preferred way to encrypt a private key.\n *\n * To produce a non-standard PEM-encrypted private key that uses encapsulated\n * headers to indicate the encryption algorithm (old-style non-PKCS#8 OpenSSL\n * private key encryption), set the 'legacy' option to true. Note: Using this\n * option will cause the iteration count to be forced to 1.\n *\n * Note: The 'des' algorithm is supported, but it is not considered to be\n * secure because it only uses a single 56-bit key. If possible, it is highly\n * recommended that a different algorithm be used.\n *\n * @param rsaKey the RSA key to encrypt.\n * @param password the password to use.\n * @param options:\n * algorithm: the encryption algorithm to use\n * ('aes128', 'aes192', 'aes256', '3des', 'des').\n * count: the iteration count to use.\n * saltSize: the salt size to use.\n * legacy: output an old non-PKCS#8 PEM-encrypted+encapsulated\n * headers (DEK-Info) private key.\n *\n * @return the PEM-encoded ASN.1 EncryptedPrivateKeyInfo.\n */\npki.encryptRsaPrivateKey = function(rsaKey, password, options) {\n // standard PKCS#8\n options = options || {};\n if(!options.legacy) {\n // encrypt PrivateKeyInfo\n var rval = pki.wrapRsaPrivateKey(pki.privateKeyToAsn1(rsaKey));\n rval = pki.encryptPrivateKeyInfo(rval, password, options);\n return pki.encryptedPrivateKeyToPem(rval);\n }\n\n // legacy non-PKCS#8\n var algorithm;\n var iv;\n var dkLen;\n var cipherFn;\n switch(options.algorithm) {\n case 'aes128':\n algorithm = 'AES-128-CBC';\n dkLen = 16;\n iv = forge.random.getBytesSync(16);\n cipherFn = forge.aes.createEncryptionCipher;\n break;\n case 'aes192':\n algorithm = 'AES-192-CBC';\n dkLen = 24;\n iv = forge.random.getBytesSync(16);\n cipherFn = forge.aes.createEncryptionCipher;\n break;\n case 'aes256':\n algorithm = 'AES-256-CBC';\n dkLen = 32;\n iv = forge.random.getBytesSync(16);\n cipherFn = forge.aes.createEncryptionCipher;\n break;\n case '3des':\n algorithm = 'DES-EDE3-CBC';\n dkLen = 24;\n iv = forge.random.getBytesSync(8);\n cipherFn = forge.des.createEncryptionCipher;\n break;\n case 'des':\n algorithm = 'DES-CBC';\n dkLen = 8;\n iv = forge.random.getBytesSync(8);\n cipherFn = forge.des.createEncryptionCipher;\n break;\n default:\n var error = new Error('Could not encrypt RSA private key; unsupported ' +\n 'encryption algorithm \"' + options.algorithm + '\".');\n error.algorithm = options.algorithm;\n throw error;\n }\n\n // encrypt private key using OpenSSL legacy key derivation\n var dk = forge.pbe.opensslDeriveBytes(password, iv.substr(0, 8), dkLen);\n var cipher = cipherFn(dk);\n cipher.start(iv);\n cipher.update(asn1.toDer(pki.privateKeyToAsn1(rsaKey)));\n cipher.finish();\n\n var msg = {\n type: 'RSA PRIVATE KEY',\n procType: {\n version: '4',\n type: 'ENCRYPTED'\n },\n dekInfo: {\n algorithm: algorithm,\n parameters: forge.util.bytesToHex(iv).toUpperCase()\n },\n body: cipher.output.getBytes()\n };\n return forge.pem.encode(msg);\n};\n\n/**\n * Decrypts an RSA private key.\n *\n * @param pem the PEM-formatted EncryptedPrivateKeyInfo to decrypt.\n * @param password the password to use.\n *\n * @return the RSA key on success, null on failure.\n */\npki.decryptRsaPrivateKey = function(pem, password) {\n var rval = null;\n\n var msg = forge.pem.decode(pem)[0];\n\n if(msg.type !== 'ENCRYPTED PRIVATE KEY' &&\n msg.type !== 'PRIVATE KEY' &&\n msg.type !== 'RSA PRIVATE KEY') {\n var error = new Error('Could not convert private key from PEM; PEM header type ' +\n 'is not \"ENCRYPTED PRIVATE KEY\", \"PRIVATE KEY\", or \"RSA PRIVATE KEY\".');\n error.headerType = error;\n throw error;\n }\n\n if(msg.procType && msg.procType.type === 'ENCRYPTED') {\n var dkLen;\n var cipherFn;\n switch(msg.dekInfo.algorithm) {\n case 'DES-CBC':\n dkLen = 8;\n cipherFn = forge.des.createDecryptionCipher;\n break;\n case 'DES-EDE3-CBC':\n dkLen = 24;\n cipherFn = forge.des.createDecryptionCipher;\n break;\n case 'AES-128-CBC':\n dkLen = 16;\n cipherFn = forge.aes.createDecryptionCipher;\n break;\n case 'AES-192-CBC':\n dkLen = 24;\n cipherFn = forge.aes.createDecryptionCipher;\n break;\n case 'AES-256-CBC':\n dkLen = 32;\n cipherFn = forge.aes.createDecryptionCipher;\n break;\n case 'RC2-40-CBC':\n dkLen = 5;\n cipherFn = function(key) {\n return forge.rc2.createDecryptionCipher(key, 40);\n };\n break;\n case 'RC2-64-CBC':\n dkLen = 8;\n cipherFn = function(key) {\n return forge.rc2.createDecryptionCipher(key, 64);\n };\n break;\n case 'RC2-128-CBC':\n dkLen = 16;\n cipherFn = function(key) {\n return forge.rc2.createDecryptionCipher(key, 128);\n };\n break;\n default:\n var error = new Error('Could not decrypt private key; unsupported ' +\n 'encryption algorithm \"' + msg.dekInfo.algorithm + '\".');\n error.algorithm = msg.dekInfo.algorithm;\n throw error;\n }\n\n // use OpenSSL legacy key derivation\n var iv = forge.util.hexToBytes(msg.dekInfo.parameters);\n var dk = forge.pbe.opensslDeriveBytes(password, iv.substr(0, 8), dkLen);\n var cipher = cipherFn(dk);\n cipher.start(iv);\n cipher.update(forge.util.createBuffer(msg.body));\n if(cipher.finish()) {\n rval = cipher.output.getBytes();\n } else {\n return rval;\n }\n } else {\n rval = msg.body;\n }\n\n if(msg.type === 'ENCRYPTED PRIVATE KEY') {\n rval = pki.decryptPrivateKeyInfo(asn1.fromDer(rval), password);\n } else {\n // decryption already performed above\n rval = asn1.fromDer(rval);\n }\n\n if(rval !== null) {\n rval = pki.privateKeyFromAsn1(rval);\n }\n\n return rval;\n};\n\n/**\n * Derives a PKCS#12 key.\n *\n * @param password the password to derive the key material from, null or\n * undefined for none.\n * @param salt the salt, as a ByteBuffer, to use.\n * @param id the PKCS#12 ID byte (1 = key material, 2 = IV, 3 = MAC).\n * @param iter the iteration count.\n * @param n the number of bytes to derive from the password.\n * @param md the message digest to use, defaults to SHA-1.\n *\n * @return a ByteBuffer with the bytes derived from the password.\n */\npki.pbe.generatePkcs12Key = function(password, salt, id, iter, n, md) {\n var j, l;\n\n if(typeof md === 'undefined' || md === null) {\n if(!('sha1' in forge.md)) {\n throw new Error('\"sha1\" hash algorithm unavailable.');\n }\n md = forge.md.sha1.create();\n }\n\n var u = md.digestLength;\n var v = md.blockLength;\n var result = new forge.util.ByteBuffer();\n\n /* Convert password to Unicode byte buffer + trailing 0-byte. */\n var passBuf = new forge.util.ByteBuffer();\n if(password !== null && password !== undefined) {\n for(l = 0; l < password.length; l++) {\n passBuf.putInt16(password.charCodeAt(l));\n }\n passBuf.putInt16(0);\n }\n\n /* Length of salt and password in BYTES. */\n var p = passBuf.length();\n var s = salt.length();\n\n /* 1. Construct a string, D (the \"diversifier\"), by concatenating\n v copies of ID. */\n var D = new forge.util.ByteBuffer();\n D.fillWithByte(id, v);\n\n /* 2. Concatenate copies of the salt together to create a string S of length\n v * ceil(s / v) bytes (the final copy of the salt may be trunacted\n to create S).\n Note that if the salt is the empty string, then so is S. */\n var Slen = v * Math.ceil(s / v);\n var S = new forge.util.ByteBuffer();\n for(l = 0; l < Slen; l++) {\n S.putByte(salt.at(l % s));\n }\n\n /* 3. Concatenate copies of the password together to create a string P of\n length v * ceil(p / v) bytes (the final copy of the password may be\n truncated to create P).\n Note that if the password is the empty string, then so is P. */\n var Plen = v * Math.ceil(p / v);\n var P = new forge.util.ByteBuffer();\n for(l = 0; l < Plen; l++) {\n P.putByte(passBuf.at(l % p));\n }\n\n /* 4. Set I=S||P to be the concatenation of S and P. */\n var I = S;\n I.putBuffer(P);\n\n /* 5. Set c=ceil(n / u). */\n var c = Math.ceil(n / u);\n\n /* 6. For i=1, 2, ..., c, do the following: */\n for(var i = 1; i <= c; i++) {\n /* a) Set Ai=H^r(D||I). (l.e. the rth hash of D||I, H(H(H(...H(D||I)))) */\n var buf = new forge.util.ByteBuffer();\n buf.putBytes(D.bytes());\n buf.putBytes(I.bytes());\n for(var round = 0; round < iter; round++) {\n md.start();\n md.update(buf.getBytes());\n buf = md.digest();\n }\n\n /* b) Concatenate copies of Ai to create a string B of length v bytes (the\n final copy of Ai may be truncated to create B). */\n var B = new forge.util.ByteBuffer();\n for(l = 0; l < v; l++) {\n B.putByte(buf.at(l % u));\n }\n\n /* c) Treating I as a concatenation I0, I1, ..., Ik-1 of v-byte blocks,\n where k=ceil(s / v) + ceil(p / v), modify I by setting\n Ij=(Ij+B+1) mod 2v for each j. */\n var k = Math.ceil(s / v) + Math.ceil(p / v);\n var Inew = new forge.util.ByteBuffer();\n for(j = 0; j < k; j++) {\n var chunk = new forge.util.ByteBuffer(I.getBytes(v));\n var x = 0x1ff;\n for(l = B.length() - 1; l >= 0; l--) {\n x = x >> 8;\n x += B.at(l) + chunk.at(l);\n chunk.setAt(l, x & 0xff);\n }\n Inew.putBuffer(chunk);\n }\n I = Inew;\n\n /* Add Ai to A. */\n result.putBuffer(buf);\n }\n\n result.truncate(result.length() - n);\n return result;\n};\n\n/**\n * Get new Forge cipher object instance.\n *\n * @param oid the OID (in string notation).\n * @param params the ASN.1 params object.\n * @param password the password to decrypt with.\n *\n * @return new cipher object instance.\n */\npki.pbe.getCipher = function(oid, params, password) {\n switch(oid) {\n case pki.oids['pkcs5PBES2']:\n return pki.pbe.getCipherForPBES2(oid, params, password);\n\n case pki.oids['pbeWithSHAAnd3-KeyTripleDES-CBC']:\n case pki.oids['pbewithSHAAnd40BitRC2-CBC']:\n return pki.pbe.getCipherForPKCS12PBE(oid, params, password);\n\n default:\n var error = new Error('Cannot read encrypted PBE data block. Unsupported OID.');\n error.oid = oid;\n error.supportedOids = [\n 'pkcs5PBES2',\n 'pbeWithSHAAnd3-KeyTripleDES-CBC',\n 'pbewithSHAAnd40BitRC2-CBC'\n ];\n throw error;\n }\n};\n\n/**\n * Get new Forge cipher object instance according to PBES2 params block.\n *\n * The returned cipher instance is already started using the IV\n * from PBES2 parameter block.\n *\n * @param oid the PKCS#5 PBKDF2 OID (in string notation).\n * @param params the ASN.1 PBES2-params object.\n * @param password the password to decrypt with.\n *\n * @return new cipher object instance.\n */\npki.pbe.getCipherForPBES2 = function(oid, params, password) {\n // get PBE params\n var capture = {};\n var errors = [];\n if(!asn1.validate(params, PBES2AlgorithmsValidator, capture, errors)) {\n var error = new Error('Cannot read password-based-encryption algorithm ' +\n 'parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.');\n error.errors = errors;\n throw error;\n }\n\n // check oids\n oid = asn1.derToOid(capture.kdfOid);\n if(oid !== pki.oids['pkcs5PBKDF2']) {\n var error = new Error('Cannot read encrypted private key. ' +\n 'Unsupported key derivation function OID.');\n error.oid = oid;\n error.supportedOids = ['pkcs5PBKDF2'];\n throw error;\n }\n oid = asn1.derToOid(capture.encOid);\n if(oid !== pki.oids['aes128-CBC'] &&\n oid !== pki.oids['aes192-CBC'] &&\n oid !== pki.oids['aes256-CBC'] &&\n oid !== pki.oids['des-EDE3-CBC'] &&\n oid !== pki.oids['desCBC']) {\n var error = new Error('Cannot read encrypted private key. ' +\n 'Unsupported encryption scheme OID.');\n error.oid = oid;\n error.supportedOids = [\n 'aes128-CBC', 'aes192-CBC', 'aes256-CBC', 'des-EDE3-CBC', 'desCBC'];\n throw error;\n }\n\n // set PBE params\n var salt = capture.kdfSalt;\n var count = forge.util.createBuffer(capture.kdfIterationCount);\n count = count.getInt(count.length() << 3);\n var dkLen;\n var cipherFn;\n switch(pki.oids[oid]) {\n case 'aes128-CBC':\n dkLen = 16;\n cipherFn = forge.aes.createDecryptionCipher;\n break;\n case 'aes192-CBC':\n dkLen = 24;\n cipherFn = forge.aes.createDecryptionCipher;\n break;\n case 'aes256-CBC':\n dkLen = 32;\n cipherFn = forge.aes.createDecryptionCipher;\n break;\n case 'des-EDE3-CBC':\n dkLen = 24;\n cipherFn = forge.des.createDecryptionCipher;\n break;\n case 'desCBC':\n dkLen = 8;\n cipherFn = forge.des.createDecryptionCipher;\n break;\n }\n\n // get PRF message digest\n var md = prfOidToMessageDigest(capture.prfOid);\n\n // decrypt private key using pbe with chosen PRF and AES/DES\n var dk = forge.pkcs5.pbkdf2(password, salt, count, dkLen, md);\n var iv = capture.encIv;\n var cipher = cipherFn(dk);\n cipher.start(iv);\n\n return cipher;\n};\n\n/**\n * Get new Forge cipher object instance for PKCS#12 PBE.\n *\n * The returned cipher instance is already started using the key & IV\n * derived from the provided password and PKCS#12 PBE salt.\n *\n * @param oid The PKCS#12 PBE OID (in string notation).\n * @param params The ASN.1 PKCS#12 PBE-params object.\n * @param password The password to decrypt with.\n *\n * @return the new cipher object instance.\n */\npki.pbe.getCipherForPKCS12PBE = function(oid, params, password) {\n // get PBE params\n var capture = {};\n var errors = [];\n if(!asn1.validate(params, pkcs12PbeParamsValidator, capture, errors)) {\n var error = new Error('Cannot read password-based-encryption algorithm ' +\n 'parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.');\n error.errors = errors;\n throw error;\n }\n\n var salt = forge.util.createBuffer(capture.salt);\n var count = forge.util.createBuffer(capture.iterations);\n count = count.getInt(count.length() << 3);\n\n var dkLen, dIvLen, cipherFn;\n switch(oid) {\n case pki.oids['pbeWithSHAAnd3-KeyTripleDES-CBC']:\n dkLen = 24;\n dIvLen = 8;\n cipherFn = forge.des.startDecrypting;\n break;\n\n case pki.oids['pbewithSHAAnd40BitRC2-CBC']:\n dkLen = 5;\n dIvLen = 8;\n cipherFn = function(key, iv) {\n var cipher = forge.rc2.createDecryptionCipher(key, 40);\n cipher.start(iv, null);\n return cipher;\n };\n break;\n\n default:\n var error = new Error('Cannot read PKCS #12 PBE data block. Unsupported OID.');\n error.oid = oid;\n throw error;\n }\n\n // get PRF message digest\n var md = prfOidToMessageDigest(capture.prfOid);\n var key = pki.pbe.generatePkcs12Key(password, salt, 1, count, dkLen, md);\n md.start();\n var iv = pki.pbe.generatePkcs12Key(password, salt, 2, count, dIvLen, md);\n\n return cipherFn(key, iv);\n};\n\n/**\n * OpenSSL's legacy key derivation function.\n *\n * See: http://www.openssl.org/docs/crypto/EVP_BytesToKey.html\n *\n * @param password the password to derive the key from.\n * @param salt the salt to use, null for none.\n * @param dkLen the number of bytes needed for the derived key.\n * @param [options] the options to use:\n * [md] an optional message digest object to use.\n */\npki.pbe.opensslDeriveBytes = function(password, salt, dkLen, md) {\n if(typeof md === 'undefined' || md === null) {\n if(!('md5' in forge.md)) {\n throw new Error('\"md5\" hash algorithm unavailable.');\n }\n md = forge.md.md5.create();\n }\n if(salt === null) {\n salt = '';\n }\n var digests = [hash(md, password + salt)];\n for(var length = 16, i = 1; length < dkLen; ++i, length += 16) {\n digests.push(hash(md, digests[i - 1] + password + salt));\n }\n return digests.join('').substr(0, dkLen);\n};\n\nfunction hash(md, bytes) {\n return md.start().update(bytes).digest().getBytes();\n}\n\nfunction prfOidToMessageDigest(prfOid) {\n // get PRF algorithm, default to SHA-1\n var prfAlgorithm;\n if(!prfOid) {\n prfAlgorithm = 'hmacWithSHA1';\n } else {\n prfAlgorithm = pki.oids[asn1.derToOid(prfOid)];\n if(!prfAlgorithm) {\n var error = new Error('Unsupported PRF OID.');\n error.oid = prfOid;\n error.supported = [\n 'hmacWithSHA1', 'hmacWithSHA224', 'hmacWithSHA256', 'hmacWithSHA384',\n 'hmacWithSHA512'];\n throw error;\n }\n }\n return prfAlgorithmToMessageDigest(prfAlgorithm);\n}\n\nfunction prfAlgorithmToMessageDigest(prfAlgorithm) {\n var factory = forge.md;\n switch(prfAlgorithm) {\n case 'hmacWithSHA224':\n factory = forge.md.sha512;\n case 'hmacWithSHA1':\n case 'hmacWithSHA256':\n case 'hmacWithSHA384':\n case 'hmacWithSHA512':\n prfAlgorithm = prfAlgorithm.substr(8).toLowerCase();\n break;\n default:\n var error = new Error('Unsupported PRF algorithm.');\n error.algorithm = prfAlgorithm;\n error.supported = [\n 'hmacWithSHA1', 'hmacWithSHA224', 'hmacWithSHA256', 'hmacWithSHA384',\n 'hmacWithSHA512'];\n throw error;\n }\n if(!factory || !(prfAlgorithm in factory)) {\n throw new Error('Unknown hash algorithm: ' + prfAlgorithm);\n }\n return factory[prfAlgorithm].create();\n}\n\nfunction createPbkdf2Params(salt, countBytes, dkLen, prfAlgorithm) {\n var params = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // salt\n asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, salt),\n // iteration count\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,\n countBytes.getBytes())\n ]);\n // when PRF algorithm is not SHA-1 default, add key length and PRF algorithm\n if(prfAlgorithm !== 'hmacWithSHA1') {\n params.value.push(\n // key length\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,\n forge.util.hexToBytes(dkLen.toString(16))),\n // AlgorithmIdentifier\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // algorithm\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(pki.oids[prfAlgorithm]).getBytes()),\n // parameters (null)\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, '')\n ]));\n }\n return params;\n}\n","/**\n * Javascript implementation of ASN.1 validators for PKCS#7 v1.5.\n *\n * @author Dave Longley\n * @author Stefan Siegl\n *\n * Copyright (c) 2012-2015 Digital Bazaar, Inc.\n * Copyright (c) 2012 Stefan Siegl \n *\n * The ASN.1 representation of PKCS#7 is as follows\n * (see RFC #2315 for details, http://www.ietf.org/rfc/rfc2315.txt):\n *\n * A PKCS#7 message consists of a ContentInfo on root level, which may\n * contain any number of further ContentInfo nested into it.\n *\n * ContentInfo ::= SEQUENCE {\n * contentType ContentType,\n * content [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL\n * }\n *\n * ContentType ::= OBJECT IDENTIFIER\n *\n * EnvelopedData ::= SEQUENCE {\n * version Version,\n * recipientInfos RecipientInfos,\n * encryptedContentInfo EncryptedContentInfo\n * }\n *\n * EncryptedData ::= SEQUENCE {\n * version Version,\n * encryptedContentInfo EncryptedContentInfo\n * }\n *\n * id-signedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)\n * us(840) rsadsi(113549) pkcs(1) pkcs7(7) 2 }\n *\n * SignedData ::= SEQUENCE {\n * version INTEGER,\n * digestAlgorithms DigestAlgorithmIdentifiers,\n * contentInfo ContentInfo,\n * certificates [0] IMPLICIT Certificates OPTIONAL,\n * crls [1] IMPLICIT CertificateRevocationLists OPTIONAL,\n * signerInfos SignerInfos\n * }\n *\n * SignerInfos ::= SET OF SignerInfo\n *\n * SignerInfo ::= SEQUENCE {\n * version Version,\n * issuerAndSerialNumber IssuerAndSerialNumber,\n * digestAlgorithm DigestAlgorithmIdentifier,\n * authenticatedAttributes [0] IMPLICIT Attributes OPTIONAL,\n * digestEncryptionAlgorithm DigestEncryptionAlgorithmIdentifier,\n * encryptedDigest EncryptedDigest,\n * unauthenticatedAttributes [1] IMPLICIT Attributes OPTIONAL\n * }\n *\n * EncryptedDigest ::= OCTET STRING\n *\n * Attributes ::= SET OF Attribute\n *\n * Attribute ::= SEQUENCE {\n * attrType OBJECT IDENTIFIER,\n * attrValues SET OF AttributeValue\n * }\n *\n * AttributeValue ::= ANY\n *\n * Version ::= INTEGER\n *\n * RecipientInfos ::= SET OF RecipientInfo\n *\n * EncryptedContentInfo ::= SEQUENCE {\n * contentType ContentType,\n * contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier,\n * encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL\n * }\n *\n * ContentEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier\n *\n * The AlgorithmIdentifier contains an Object Identifier (OID) and parameters\n * for the algorithm, if any. In the case of AES and DES3, there is only one,\n * the IV.\n *\n * AlgorithmIdentifer ::= SEQUENCE {\n * algorithm OBJECT IDENTIFIER,\n * parameters ANY DEFINED BY algorithm OPTIONAL\n * }\n *\n * EncryptedContent ::= OCTET STRING\n *\n * RecipientInfo ::= SEQUENCE {\n * version Version,\n * issuerAndSerialNumber IssuerAndSerialNumber,\n * keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,\n * encryptedKey EncryptedKey\n * }\n *\n * IssuerAndSerialNumber ::= SEQUENCE {\n * issuer Name,\n * serialNumber CertificateSerialNumber\n * }\n *\n * CertificateSerialNumber ::= INTEGER\n *\n * KeyEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier\n *\n * EncryptedKey ::= OCTET STRING\n */\nvar forge = require('./forge');\nrequire('./asn1');\nrequire('./util');\n\n// shortcut for ASN.1 API\nvar asn1 = forge.asn1;\n\n// shortcut for PKCS#7 API\nvar p7v = module.exports = forge.pkcs7asn1 = forge.pkcs7asn1 || {};\nforge.pkcs7 = forge.pkcs7 || {};\nforge.pkcs7.asn1 = p7v;\n\nvar contentInfoValidator = {\n name: 'ContentInfo',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'ContentInfo.ContentType',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OID,\n constructed: false,\n capture: 'contentType'\n }, {\n name: 'ContentInfo.content',\n tagClass: asn1.Class.CONTEXT_SPECIFIC,\n type: 0,\n constructed: true,\n optional: true,\n captureAsn1: 'content'\n }]\n};\np7v.contentInfoValidator = contentInfoValidator;\n\nvar encryptedContentInfoValidator = {\n name: 'EncryptedContentInfo',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'EncryptedContentInfo.contentType',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OID,\n constructed: false,\n capture: 'contentType'\n }, {\n name: 'EncryptedContentInfo.contentEncryptionAlgorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'EncryptedContentInfo.contentEncryptionAlgorithm.algorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OID,\n constructed: false,\n capture: 'encAlgorithm'\n }, {\n name: 'EncryptedContentInfo.contentEncryptionAlgorithm.parameter',\n tagClass: asn1.Class.UNIVERSAL,\n captureAsn1: 'encParameter'\n }]\n }, {\n name: 'EncryptedContentInfo.encryptedContent',\n tagClass: asn1.Class.CONTEXT_SPECIFIC,\n type: 0,\n /* The PKCS#7 structure output by OpenSSL somewhat differs from what\n * other implementations do generate.\n *\n * OpenSSL generates a structure like this:\n * SEQUENCE {\n * ...\n * [0]\n * 26 DA 67 D2 17 9C 45 3C B1 2A A8 59 2F 29 33 38\n * C3 C3 DF 86 71 74 7A 19 9F 40 D0 29 BE 85 90 45\n * ...\n * }\n *\n * Whereas other implementations (and this PKCS#7 module) generate:\n * SEQUENCE {\n * ...\n * [0] {\n * OCTET STRING\n * 26 DA 67 D2 17 9C 45 3C B1 2A A8 59 2F 29 33 38\n * C3 C3 DF 86 71 74 7A 19 9F 40 D0 29 BE 85 90 45\n * ...\n * }\n * }\n *\n * In order to support both, we just capture the context specific\n * field here. The OCTET STRING bit is removed below.\n */\n capture: 'encryptedContent',\n captureAsn1: 'encryptedContentAsn1'\n }]\n};\n\np7v.envelopedDataValidator = {\n name: 'EnvelopedData',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'EnvelopedData.Version',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.INTEGER,\n constructed: false,\n capture: 'version'\n }, {\n name: 'EnvelopedData.RecipientInfos',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SET,\n constructed: true,\n captureAsn1: 'recipientInfos'\n }].concat(encryptedContentInfoValidator)\n};\n\np7v.encryptedDataValidator = {\n name: 'EncryptedData',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'EncryptedData.Version',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.INTEGER,\n constructed: false,\n capture: 'version'\n }].concat(encryptedContentInfoValidator)\n};\n\nvar signerValidator = {\n name: 'SignerInfo',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'SignerInfo.version',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.INTEGER,\n constructed: false\n }, {\n name: 'SignerInfo.issuerAndSerialNumber',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'SignerInfo.issuerAndSerialNumber.issuer',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n captureAsn1: 'issuer'\n }, {\n name: 'SignerInfo.issuerAndSerialNumber.serialNumber',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.INTEGER,\n constructed: false,\n capture: 'serial'\n }]\n }, {\n name: 'SignerInfo.digestAlgorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'SignerInfo.digestAlgorithm.algorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OID,\n constructed: false,\n capture: 'digestAlgorithm'\n }, {\n name: 'SignerInfo.digestAlgorithm.parameter',\n tagClass: asn1.Class.UNIVERSAL,\n constructed: false,\n captureAsn1: 'digestParameter',\n optional: true\n }]\n }, {\n name: 'SignerInfo.authenticatedAttributes',\n tagClass: asn1.Class.CONTEXT_SPECIFIC,\n type: 0,\n constructed: true,\n optional: true,\n capture: 'authenticatedAttributes'\n }, {\n name: 'SignerInfo.digestEncryptionAlgorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n capture: 'signatureAlgorithm'\n }, {\n name: 'SignerInfo.encryptedDigest',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OCTETSTRING,\n constructed: false,\n capture: 'signature'\n }, {\n name: 'SignerInfo.unauthenticatedAttributes',\n tagClass: asn1.Class.CONTEXT_SPECIFIC,\n type: 1,\n constructed: true,\n optional: true,\n capture: 'unauthenticatedAttributes'\n }]\n};\n\np7v.signedDataValidator = {\n name: 'SignedData',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'SignedData.Version',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.INTEGER,\n constructed: false,\n capture: 'version'\n }, {\n name: 'SignedData.DigestAlgorithms',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SET,\n constructed: true,\n captureAsn1: 'digestAlgorithms'\n },\n contentInfoValidator,\n {\n name: 'SignedData.Certificates',\n tagClass: asn1.Class.CONTEXT_SPECIFIC,\n type: 0,\n optional: true,\n captureAsn1: 'certificates'\n }, {\n name: 'SignedData.CertificateRevocationLists',\n tagClass: asn1.Class.CONTEXT_SPECIFIC,\n type: 1,\n optional: true,\n captureAsn1: 'crls'\n }, {\n name: 'SignedData.SignerInfos',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SET,\n capture: 'signerInfos',\n optional: true,\n value: [signerValidator]\n }]\n};\n\np7v.recipientInfoValidator = {\n name: 'RecipientInfo',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'RecipientInfo.version',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.INTEGER,\n constructed: false,\n capture: 'version'\n }, {\n name: 'RecipientInfo.issuerAndSerial',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'RecipientInfo.issuerAndSerial.issuer',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n captureAsn1: 'issuer'\n }, {\n name: 'RecipientInfo.issuerAndSerial.serialNumber',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.INTEGER,\n constructed: false,\n capture: 'serial'\n }]\n }, {\n name: 'RecipientInfo.keyEncryptionAlgorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'RecipientInfo.keyEncryptionAlgorithm.algorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OID,\n constructed: false,\n capture: 'encAlgorithm'\n }, {\n name: 'RecipientInfo.keyEncryptionAlgorithm.parameter',\n tagClass: asn1.Class.UNIVERSAL,\n constructed: false,\n captureAsn1: 'encParameter',\n optional: true\n }]\n }, {\n name: 'RecipientInfo.encryptedKey',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OCTETSTRING,\n constructed: false,\n capture: 'encKey'\n }]\n};\n","/**\n * Javascript implementation of mask generation function MGF1.\n *\n * @author Stefan Siegl\n * @author Dave Longley\n *\n * Copyright (c) 2012 Stefan Siegl \n * Copyright (c) 2014 Digital Bazaar, Inc.\n */\nvar forge = require('./forge');\nrequire('./util');\n\nforge.mgf = forge.mgf || {};\nvar mgf1 = module.exports = forge.mgf.mgf1 = forge.mgf1 = forge.mgf1 || {};\n\n/**\n * Creates a MGF1 mask generation function object.\n *\n * @param md the message digest API to use (eg: forge.md.sha1.create()).\n *\n * @return a mask generation function object.\n */\nmgf1.create = function(md) {\n var mgf = {\n /**\n * Generate mask of specified length.\n *\n * @param {String} seed The seed for mask generation.\n * @param maskLen Number of bytes to generate.\n * @return {String} The generated mask.\n */\n generate: function(seed, maskLen) {\n /* 2. Let T be the empty octet string. */\n var t = new forge.util.ByteBuffer();\n\n /* 3. For counter from 0 to ceil(maskLen / hLen), do the following: */\n var len = Math.ceil(maskLen / md.digestLength);\n for(var i = 0; i < len; i++) {\n /* a. Convert counter to an octet string C of length 4 octets */\n var c = new forge.util.ByteBuffer();\n c.putInt32(i);\n\n /* b. Concatenate the hash of the seed mgfSeed and C to the octet\n * string T: */\n md.start();\n md.update(seed + c.getBytes());\n t.putBuffer(md.digest());\n }\n\n /* Output the leading maskLen octets of T as the octet string mask. */\n t.truncate(t.length() - maskLen);\n return t.getBytes();\n }\n };\n\n return mgf;\n};\n","/**\n * Node.js module for Forge mask generation functions.\n *\n * @author Stefan Siegl\n *\n * Copyright 2012 Stefan Siegl \n */\nvar forge = require('./forge');\nrequire('./mgf1');\n\nmodule.exports = forge.mgf = forge.mgf || {};\nforge.mgf.mgf1 = forge.mgf1;\n","/**\n * Javascript implementation of PKCS#1 PSS signature padding.\n *\n * @author Stefan Siegl\n *\n * Copyright (c) 2012 Stefan Siegl \n */\nvar forge = require('./forge');\nrequire('./random');\nrequire('./util');\n\n// shortcut for PSS API\nvar pss = module.exports = forge.pss = forge.pss || {};\n\n/**\n * Creates a PSS signature scheme object.\n *\n * There are several ways to provide a salt for encoding:\n *\n * 1. Specify the saltLength only and the built-in PRNG will generate it.\n * 2. Specify the saltLength and a custom PRNG with 'getBytesSync' defined that\n * will be used.\n * 3. Specify the salt itself as a forge.util.ByteBuffer.\n *\n * @param options the options to use:\n * md the message digest object to use, a forge md instance.\n * mgf the mask generation function to use, a forge mgf instance.\n * [saltLength] the length of the salt in octets.\n * [prng] the pseudo-random number generator to use to produce a salt.\n * [salt] the salt to use when encoding.\n *\n * @return a signature scheme object.\n */\npss.create = function(options) {\n // backwards compatibility w/legacy args: hash, mgf, sLen\n if(arguments.length === 3) {\n options = {\n md: arguments[0],\n mgf: arguments[1],\n saltLength: arguments[2]\n };\n }\n\n var hash = options.md;\n var mgf = options.mgf;\n var hLen = hash.digestLength;\n\n var salt_ = options.salt || null;\n if(typeof salt_ === 'string') {\n // assume binary-encoded string\n salt_ = forge.util.createBuffer(salt_);\n }\n\n var sLen;\n if('saltLength' in options) {\n sLen = options.saltLength;\n } else if(salt_ !== null) {\n sLen = salt_.length();\n } else {\n throw new Error('Salt length not specified or specific salt not given.');\n }\n\n if(salt_ !== null && salt_.length() !== sLen) {\n throw new Error('Given salt length does not match length of given salt.');\n }\n\n var prng = options.prng || forge.random;\n\n var pssobj = {};\n\n /**\n * Encodes a PSS signature.\n *\n * This function implements EMSA-PSS-ENCODE as per RFC 3447, section 9.1.1.\n *\n * @param md the message digest object with the hash to sign.\n * @param modsBits the length of the RSA modulus in bits.\n *\n * @return the encoded message as a binary-encoded string of length\n * ceil((modBits - 1) / 8).\n */\n pssobj.encode = function(md, modBits) {\n var i;\n var emBits = modBits - 1;\n var emLen = Math.ceil(emBits / 8);\n\n /* 2. Let mHash = Hash(M), an octet string of length hLen. */\n var mHash = md.digest().getBytes();\n\n /* 3. If emLen < hLen + sLen + 2, output \"encoding error\" and stop. */\n if(emLen < hLen + sLen + 2) {\n throw new Error('Message is too long to encrypt.');\n }\n\n /* 4. Generate a random octet string salt of length sLen; if sLen = 0,\n * then salt is the empty string. */\n var salt;\n if(salt_ === null) {\n salt = prng.getBytesSync(sLen);\n } else {\n salt = salt_.bytes();\n }\n\n /* 5. Let M' = (0x)00 00 00 00 00 00 00 00 || mHash || salt; */\n var m_ = new forge.util.ByteBuffer();\n m_.fillWithByte(0, 8);\n m_.putBytes(mHash);\n m_.putBytes(salt);\n\n /* 6. Let H = Hash(M'), an octet string of length hLen. */\n hash.start();\n hash.update(m_.getBytes());\n var h = hash.digest().getBytes();\n\n /* 7. Generate an octet string PS consisting of emLen - sLen - hLen - 2\n * zero octets. The length of PS may be 0. */\n var ps = new forge.util.ByteBuffer();\n ps.fillWithByte(0, emLen - sLen - hLen - 2);\n\n /* 8. Let DB = PS || 0x01 || salt; DB is an octet string of length\n * emLen - hLen - 1. */\n ps.putByte(0x01);\n ps.putBytes(salt);\n var db = ps.getBytes();\n\n /* 9. Let dbMask = MGF(H, emLen - hLen - 1). */\n var maskLen = emLen - hLen - 1;\n var dbMask = mgf.generate(h, maskLen);\n\n /* 10. Let maskedDB = DB \\xor dbMask. */\n var maskedDB = '';\n for(i = 0; i < maskLen; i++) {\n maskedDB += String.fromCharCode(db.charCodeAt(i) ^ dbMask.charCodeAt(i));\n }\n\n /* 11. Set the leftmost 8emLen - emBits bits of the leftmost octet in\n * maskedDB to zero. */\n var mask = (0xFF00 >> (8 * emLen - emBits)) & 0xFF;\n maskedDB = String.fromCharCode(maskedDB.charCodeAt(0) & ~mask) +\n maskedDB.substr(1);\n\n /* 12. Let EM = maskedDB || H || 0xbc.\n * 13. Output EM. */\n return maskedDB + h + String.fromCharCode(0xbc);\n };\n\n /**\n * Verifies a PSS signature.\n *\n * This function implements EMSA-PSS-VERIFY as per RFC 3447, section 9.1.2.\n *\n * @param mHash the message digest hash, as a binary-encoded string, to\n * compare against the signature.\n * @param em the encoded message, as a binary-encoded string\n * (RSA decryption result).\n * @param modsBits the length of the RSA modulus in bits.\n *\n * @return true if the signature was verified, false if not.\n */\n pssobj.verify = function(mHash, em, modBits) {\n var i;\n var emBits = modBits - 1;\n var emLen = Math.ceil(emBits / 8);\n\n /* c. Convert the message representative m to an encoded message EM\n * of length emLen = ceil((modBits - 1) / 8) octets, where modBits\n * is the length in bits of the RSA modulus n */\n em = em.substr(-emLen);\n\n /* 3. If emLen < hLen + sLen + 2, output \"inconsistent\" and stop. */\n if(emLen < hLen + sLen + 2) {\n throw new Error('Inconsistent parameters to PSS signature verification.');\n }\n\n /* 4. If the rightmost octet of EM does not have hexadecimal value\n * 0xbc, output \"inconsistent\" and stop. */\n if(em.charCodeAt(emLen - 1) !== 0xbc) {\n throw new Error('Encoded message does not end in 0xBC.');\n }\n\n /* 5. Let maskedDB be the leftmost emLen - hLen - 1 octets of EM, and\n * let H be the next hLen octets. */\n var maskLen = emLen - hLen - 1;\n var maskedDB = em.substr(0, maskLen);\n var h = em.substr(maskLen, hLen);\n\n /* 6. If the leftmost 8emLen - emBits bits of the leftmost octet in\n * maskedDB are not all equal to zero, output \"inconsistent\" and stop. */\n var mask = (0xFF00 >> (8 * emLen - emBits)) & 0xFF;\n if((maskedDB.charCodeAt(0) & mask) !== 0) {\n throw new Error('Bits beyond keysize not zero as expected.');\n }\n\n /* 7. Let dbMask = MGF(H, emLen - hLen - 1). */\n var dbMask = mgf.generate(h, maskLen);\n\n /* 8. Let DB = maskedDB \\xor dbMask. */\n var db = '';\n for(i = 0; i < maskLen; i++) {\n db += String.fromCharCode(maskedDB.charCodeAt(i) ^ dbMask.charCodeAt(i));\n }\n\n /* 9. Set the leftmost 8emLen - emBits bits of the leftmost octet\n * in DB to zero. */\n db = String.fromCharCode(db.charCodeAt(0) & ~mask) + db.substr(1);\n\n /* 10. If the emLen - hLen - sLen - 2 leftmost octets of DB are not zero\n * or if the octet at position emLen - hLen - sLen - 1 (the leftmost\n * position is \"position 1\") does not have hexadecimal value 0x01,\n * output \"inconsistent\" and stop. */\n var checkLen = emLen - hLen - sLen - 2;\n for(i = 0; i < checkLen; i++) {\n if(db.charCodeAt(i) !== 0x00) {\n throw new Error('Leftmost octets not zero as expected');\n }\n }\n\n if(db.charCodeAt(checkLen) !== 0x01) {\n throw new Error('Inconsistent PSS signature, 0x01 marker not found');\n }\n\n /* 11. Let salt be the last sLen octets of DB. */\n var salt = db.substr(-sLen);\n\n /* 12. Let M' = (0x)00 00 00 00 00 00 00 00 || mHash || salt */\n var m_ = new forge.util.ByteBuffer();\n m_.fillWithByte(0, 8);\n m_.putBytes(mHash);\n m_.putBytes(salt);\n\n /* 13. Let H' = Hash(M'), an octet string of length hLen. */\n hash.start();\n hash.update(m_.getBytes());\n var h_ = hash.digest().getBytes();\n\n /* 14. If H = H', output \"consistent.\" Otherwise, output \"inconsistent.\" */\n return h === h_;\n };\n\n return pssobj;\n};\n","/**\n * Javascript implementation of X.509 and related components (such as\n * Certification Signing Requests) of a Public Key Infrastructure.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2010-2014 Digital Bazaar, Inc.\n *\n * The ASN.1 representation of an X.509v3 certificate is as follows\n * (see RFC 2459):\n *\n * Certificate ::= SEQUENCE {\n * tbsCertificate TBSCertificate,\n * signatureAlgorithm AlgorithmIdentifier,\n * signatureValue BIT STRING\n * }\n *\n * TBSCertificate ::= SEQUENCE {\n * version [0] EXPLICIT Version DEFAULT v1,\n * serialNumber CertificateSerialNumber,\n * signature AlgorithmIdentifier,\n * issuer Name,\n * validity Validity,\n * subject Name,\n * subjectPublicKeyInfo SubjectPublicKeyInfo,\n * issuerUniqueID [1] IMPLICIT UniqueIdentifier OPTIONAL,\n * -- If present, version shall be v2 or v3\n * subjectUniqueID [2] IMPLICIT UniqueIdentifier OPTIONAL,\n * -- If present, version shall be v2 or v3\n * extensions [3] EXPLICIT Extensions OPTIONAL\n * -- If present, version shall be v3\n * }\n *\n * Version ::= INTEGER { v1(0), v2(1), v3(2) }\n *\n * CertificateSerialNumber ::= INTEGER\n *\n * Name ::= CHOICE {\n * // only one possible choice for now\n * RDNSequence\n * }\n *\n * RDNSequence ::= SEQUENCE OF RelativeDistinguishedName\n *\n * RelativeDistinguishedName ::= SET OF AttributeTypeAndValue\n *\n * AttributeTypeAndValue ::= SEQUENCE {\n * type AttributeType,\n * value AttributeValue\n * }\n * AttributeType ::= OBJECT IDENTIFIER\n * AttributeValue ::= ANY DEFINED BY AttributeType\n *\n * Validity ::= SEQUENCE {\n * notBefore Time,\n * notAfter Time\n * }\n *\n * Time ::= CHOICE {\n * utcTime UTCTime,\n * generalTime GeneralizedTime\n * }\n *\n * UniqueIdentifier ::= BIT STRING\n *\n * SubjectPublicKeyInfo ::= SEQUENCE {\n * algorithm AlgorithmIdentifier,\n * subjectPublicKey BIT STRING\n * }\n *\n * Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension\n *\n * Extension ::= SEQUENCE {\n * extnID OBJECT IDENTIFIER,\n * critical BOOLEAN DEFAULT FALSE,\n * extnValue OCTET STRING\n * }\n *\n * The only key algorithm currently supported for PKI is RSA.\n *\n * RSASSA-PSS signatures are described in RFC 3447 and RFC 4055.\n *\n * PKCS#10 v1.7 describes certificate signing requests:\n *\n * CertificationRequestInfo:\n *\n * CertificationRequestInfo ::= SEQUENCE {\n * version INTEGER { v1(0) } (v1,...),\n * subject Name,\n * subjectPKInfo SubjectPublicKeyInfo{{ PKInfoAlgorithms }},\n * attributes [0] Attributes{{ CRIAttributes }}\n * }\n *\n * Attributes { ATTRIBUTE:IOSet } ::= SET OF Attribute{{ IOSet }}\n *\n * CRIAttributes ATTRIBUTE ::= {\n * ... -- add any locally defined attributes here -- }\n *\n * Attribute { ATTRIBUTE:IOSet } ::= SEQUENCE {\n * type ATTRIBUTE.&id({IOSet}),\n * values SET SIZE(1..MAX) OF ATTRIBUTE.&Type({IOSet}{@type})\n * }\n *\n * CertificationRequest ::= SEQUENCE {\n * certificationRequestInfo CertificationRequestInfo,\n * signatureAlgorithm AlgorithmIdentifier{{ SignatureAlgorithms }},\n * signature BIT STRING\n * }\n */\nvar forge = require('./forge');\nrequire('./aes');\nrequire('./asn1');\nrequire('./des');\nrequire('./md');\nrequire('./mgf');\nrequire('./oids');\nrequire('./pem');\nrequire('./pss');\nrequire('./rsa');\nrequire('./util');\n\n// shortcut for asn.1 API\nvar asn1 = forge.asn1;\n\n/* Public Key Infrastructure (PKI) implementation. */\nvar pki = module.exports = forge.pki = forge.pki || {};\nvar oids = pki.oids;\n\n// short name OID mappings\nvar _shortNames = {};\n_shortNames['CN'] = oids['commonName'];\n_shortNames['commonName'] = 'CN';\n_shortNames['C'] = oids['countryName'];\n_shortNames['countryName'] = 'C';\n_shortNames['L'] = oids['localityName'];\n_shortNames['localityName'] = 'L';\n_shortNames['ST'] = oids['stateOrProvinceName'];\n_shortNames['stateOrProvinceName'] = 'ST';\n_shortNames['O'] = oids['organizationName'];\n_shortNames['organizationName'] = 'O';\n_shortNames['OU'] = oids['organizationalUnitName'];\n_shortNames['organizationalUnitName'] = 'OU';\n_shortNames['E'] = oids['emailAddress'];\n_shortNames['emailAddress'] = 'E';\n\n// validator for an SubjectPublicKeyInfo structure\n// Note: Currently only works with an RSA public key\nvar publicKeyValidator = forge.pki.rsa.publicKeyValidator;\n\n// validator for an X.509v3 certificate\nvar x509CertificateValidator = {\n name: 'Certificate',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'Certificate.TBSCertificate',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n captureAsn1: 'tbsCertificate',\n value: [{\n name: 'Certificate.TBSCertificate.version',\n tagClass: asn1.Class.CONTEXT_SPECIFIC,\n type: 0,\n constructed: true,\n optional: true,\n value: [{\n name: 'Certificate.TBSCertificate.version.integer',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.INTEGER,\n constructed: false,\n capture: 'certVersion'\n }]\n }, {\n name: 'Certificate.TBSCertificate.serialNumber',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.INTEGER,\n constructed: false,\n capture: 'certSerialNumber'\n }, {\n name: 'Certificate.TBSCertificate.signature',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'Certificate.TBSCertificate.signature.algorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OID,\n constructed: false,\n capture: 'certinfoSignatureOid'\n }, {\n name: 'Certificate.TBSCertificate.signature.parameters',\n tagClass: asn1.Class.UNIVERSAL,\n optional: true,\n captureAsn1: 'certinfoSignatureParams'\n }]\n }, {\n name: 'Certificate.TBSCertificate.issuer',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n captureAsn1: 'certIssuer'\n }, {\n name: 'Certificate.TBSCertificate.validity',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n // Note: UTC and generalized times may both appear so the capture\n // names are based on their detected order, the names used below\n // are only for the common case, which validity time really means\n // \"notBefore\" and which means \"notAfter\" will be determined by order\n value: [{\n // notBefore (Time) (UTC time case)\n name: 'Certificate.TBSCertificate.validity.notBefore (utc)',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.UTCTIME,\n constructed: false,\n optional: true,\n capture: 'certValidity1UTCTime'\n }, {\n // notBefore (Time) (generalized time case)\n name: 'Certificate.TBSCertificate.validity.notBefore (generalized)',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.GENERALIZEDTIME,\n constructed: false,\n optional: true,\n capture: 'certValidity2GeneralizedTime'\n }, {\n // notAfter (Time) (only UTC time is supported)\n name: 'Certificate.TBSCertificate.validity.notAfter (utc)',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.UTCTIME,\n constructed: false,\n optional: true,\n capture: 'certValidity3UTCTime'\n }, {\n // notAfter (Time) (only UTC time is supported)\n name: 'Certificate.TBSCertificate.validity.notAfter (generalized)',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.GENERALIZEDTIME,\n constructed: false,\n optional: true,\n capture: 'certValidity4GeneralizedTime'\n }]\n }, {\n // Name (subject) (RDNSequence)\n name: 'Certificate.TBSCertificate.subject',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n captureAsn1: 'certSubject'\n },\n // SubjectPublicKeyInfo\n publicKeyValidator,\n {\n // issuerUniqueID (optional)\n name: 'Certificate.TBSCertificate.issuerUniqueID',\n tagClass: asn1.Class.CONTEXT_SPECIFIC,\n type: 1,\n constructed: true,\n optional: true,\n value: [{\n name: 'Certificate.TBSCertificate.issuerUniqueID.id',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.BITSTRING,\n constructed: false,\n // TODO: support arbitrary bit length ids\n captureBitStringValue: 'certIssuerUniqueId'\n }]\n }, {\n // subjectUniqueID (optional)\n name: 'Certificate.TBSCertificate.subjectUniqueID',\n tagClass: asn1.Class.CONTEXT_SPECIFIC,\n type: 2,\n constructed: true,\n optional: true,\n value: [{\n name: 'Certificate.TBSCertificate.subjectUniqueID.id',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.BITSTRING,\n constructed: false,\n // TODO: support arbitrary bit length ids\n captureBitStringValue: 'certSubjectUniqueId'\n }]\n }, {\n // Extensions (optional)\n name: 'Certificate.TBSCertificate.extensions',\n tagClass: asn1.Class.CONTEXT_SPECIFIC,\n type: 3,\n constructed: true,\n captureAsn1: 'certExtensions',\n optional: true\n }]\n }, {\n // AlgorithmIdentifier (signature algorithm)\n name: 'Certificate.signatureAlgorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n // algorithm\n name: 'Certificate.signatureAlgorithm.algorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OID,\n constructed: false,\n capture: 'certSignatureOid'\n }, {\n name: 'Certificate.TBSCertificate.signature.parameters',\n tagClass: asn1.Class.UNIVERSAL,\n optional: true,\n captureAsn1: 'certSignatureParams'\n }]\n }, {\n // SignatureValue\n name: 'Certificate.signatureValue',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.BITSTRING,\n constructed: false,\n captureBitStringValue: 'certSignature'\n }]\n};\n\nvar rsassaPssParameterValidator = {\n name: 'rsapss',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'rsapss.hashAlgorithm',\n tagClass: asn1.Class.CONTEXT_SPECIFIC,\n type: 0,\n constructed: true,\n value: [{\n name: 'rsapss.hashAlgorithm.AlgorithmIdentifier',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Class.SEQUENCE,\n constructed: true,\n optional: true,\n value: [{\n name: 'rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OID,\n constructed: false,\n capture: 'hashOid'\n /* parameter block omitted, for SHA1 NULL anyhow. */\n }]\n }]\n }, {\n name: 'rsapss.maskGenAlgorithm',\n tagClass: asn1.Class.CONTEXT_SPECIFIC,\n type: 1,\n constructed: true,\n value: [{\n name: 'rsapss.maskGenAlgorithm.AlgorithmIdentifier',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Class.SEQUENCE,\n constructed: true,\n optional: true,\n value: [{\n name: 'rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OID,\n constructed: false,\n capture: 'maskGenOid'\n }, {\n name: 'rsapss.maskGenAlgorithm.AlgorithmIdentifier.params',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OID,\n constructed: false,\n capture: 'maskGenHashOid'\n /* parameter block omitted, for SHA1 NULL anyhow. */\n }]\n }]\n }]\n }, {\n name: 'rsapss.saltLength',\n tagClass: asn1.Class.CONTEXT_SPECIFIC,\n type: 2,\n optional: true,\n value: [{\n name: 'rsapss.saltLength.saltLength',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Class.INTEGER,\n constructed: false,\n capture: 'saltLength'\n }]\n }, {\n name: 'rsapss.trailerField',\n tagClass: asn1.Class.CONTEXT_SPECIFIC,\n type: 3,\n optional: true,\n value: [{\n name: 'rsapss.trailer.trailer',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Class.INTEGER,\n constructed: false,\n capture: 'trailer'\n }]\n }]\n};\n\n// validator for a CertificationRequestInfo structure\nvar certificationRequestInfoValidator = {\n name: 'CertificationRequestInfo',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n captureAsn1: 'certificationRequestInfo',\n value: [{\n name: 'CertificationRequestInfo.integer',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.INTEGER,\n constructed: false,\n capture: 'certificationRequestInfoVersion'\n }, {\n // Name (subject) (RDNSequence)\n name: 'CertificationRequestInfo.subject',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n captureAsn1: 'certificationRequestInfoSubject'\n },\n // SubjectPublicKeyInfo\n publicKeyValidator,\n {\n name: 'CertificationRequestInfo.attributes',\n tagClass: asn1.Class.CONTEXT_SPECIFIC,\n type: 0,\n constructed: true,\n optional: true,\n capture: 'certificationRequestInfoAttributes',\n value: [{\n name: 'CertificationRequestInfo.attributes',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'CertificationRequestInfo.attributes.type',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OID,\n constructed: false\n }, {\n name: 'CertificationRequestInfo.attributes.value',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SET,\n constructed: true\n }]\n }]\n }]\n};\n\n// validator for a CertificationRequest structure\nvar certificationRequestValidator = {\n name: 'CertificationRequest',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n captureAsn1: 'csr',\n value: [\n certificationRequestInfoValidator, {\n // AlgorithmIdentifier (signature algorithm)\n name: 'CertificationRequest.signatureAlgorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n // algorithm\n name: 'CertificationRequest.signatureAlgorithm.algorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OID,\n constructed: false,\n capture: 'csrSignatureOid'\n }, {\n name: 'CertificationRequest.signatureAlgorithm.parameters',\n tagClass: asn1.Class.UNIVERSAL,\n optional: true,\n captureAsn1: 'csrSignatureParams'\n }]\n }, {\n // signature\n name: 'CertificationRequest.signature',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.BITSTRING,\n constructed: false,\n captureBitStringValue: 'csrSignature'\n }\n ]\n};\n\n/**\n * Converts an RDNSequence of ASN.1 DER-encoded RelativeDistinguishedName\n * sets into an array with objects that have type and value properties.\n *\n * @param rdn the RDNSequence to convert.\n * @param md a message digest to append type and value to if provided.\n */\npki.RDNAttributesAsArray = function(rdn, md) {\n var rval = [];\n\n // each value in 'rdn' in is a SET of RelativeDistinguishedName\n var set, attr, obj;\n for(var si = 0; si < rdn.value.length; ++si) {\n // get the RelativeDistinguishedName set\n set = rdn.value[si];\n\n // each value in the SET is an AttributeTypeAndValue sequence\n // containing first a type (an OID) and second a value (defined by\n // the OID)\n for(var i = 0; i < set.value.length; ++i) {\n obj = {};\n attr = set.value[i];\n obj.type = asn1.derToOid(attr.value[0].value);\n obj.value = attr.value[1].value;\n obj.valueTagClass = attr.value[1].type;\n // if the OID is known, get its name and short name\n if(obj.type in oids) {\n obj.name = oids[obj.type];\n if(obj.name in _shortNames) {\n obj.shortName = _shortNames[obj.name];\n }\n }\n if(md) {\n md.update(obj.type);\n md.update(obj.value);\n }\n rval.push(obj);\n }\n }\n\n return rval;\n};\n\n/**\n * Converts ASN.1 CRIAttributes into an array with objects that have type and\n * value properties.\n *\n * @param attributes the CRIAttributes to convert.\n */\npki.CRIAttributesAsArray = function(attributes) {\n var rval = [];\n\n // each value in 'attributes' in is a SEQUENCE with an OID and a SET\n for(var si = 0; si < attributes.length; ++si) {\n // get the attribute sequence\n var seq = attributes[si];\n\n // each value in the SEQUENCE containing first a type (an OID) and\n // second a set of values (defined by the OID)\n var type = asn1.derToOid(seq.value[0].value);\n var values = seq.value[1].value;\n for(var vi = 0; vi < values.length; ++vi) {\n var obj = {};\n obj.type = type;\n obj.value = values[vi].value;\n obj.valueTagClass = values[vi].type;\n // if the OID is known, get its name and short name\n if(obj.type in oids) {\n obj.name = oids[obj.type];\n if(obj.name in _shortNames) {\n obj.shortName = _shortNames[obj.name];\n }\n }\n // parse extensions\n if(obj.type === oids.extensionRequest) {\n obj.extensions = [];\n for(var ei = 0; ei < obj.value.length; ++ei) {\n obj.extensions.push(pki.certificateExtensionFromAsn1(obj.value[ei]));\n }\n }\n rval.push(obj);\n }\n }\n\n return rval;\n};\n\n/**\n * Gets an issuer or subject attribute from its name, type, or short name.\n *\n * @param obj the issuer or subject object.\n * @param options a short name string or an object with:\n * shortName the short name for the attribute.\n * name the name for the attribute.\n * type the type for the attribute.\n *\n * @return the attribute.\n */\nfunction _getAttribute(obj, options) {\n if(typeof options === 'string') {\n options = {shortName: options};\n }\n\n var rval = null;\n var attr;\n for(var i = 0; rval === null && i < obj.attributes.length; ++i) {\n attr = obj.attributes[i];\n if(options.type && options.type === attr.type) {\n rval = attr;\n } else if(options.name && options.name === attr.name) {\n rval = attr;\n } else if(options.shortName && options.shortName === attr.shortName) {\n rval = attr;\n }\n }\n return rval;\n}\n\n/**\n * Converts signature parameters from ASN.1 structure.\n *\n * Currently only RSASSA-PSS supported. The PKCS#1 v1.5 signature scheme had\n * no parameters.\n *\n * RSASSA-PSS-params ::= SEQUENCE {\n * hashAlgorithm [0] HashAlgorithm DEFAULT\n * sha1Identifier,\n * maskGenAlgorithm [1] MaskGenAlgorithm DEFAULT\n * mgf1SHA1Identifier,\n * saltLength [2] INTEGER DEFAULT 20,\n * trailerField [3] INTEGER DEFAULT 1\n * }\n *\n * HashAlgorithm ::= AlgorithmIdentifier\n *\n * MaskGenAlgorithm ::= AlgorithmIdentifier\n *\n * AlgorithmIdentifer ::= SEQUENCE {\n * algorithm OBJECT IDENTIFIER,\n * parameters ANY DEFINED BY algorithm OPTIONAL\n * }\n *\n * @param oid The OID specifying the signature algorithm\n * @param obj The ASN.1 structure holding the parameters\n * @param fillDefaults Whether to use return default values where omitted\n * @return signature parameter object\n */\nvar _readSignatureParameters = function(oid, obj, fillDefaults) {\n var params = {};\n\n if(oid !== oids['RSASSA-PSS']) {\n return params;\n }\n\n if(fillDefaults) {\n params = {\n hash: {\n algorithmOid: oids['sha1']\n },\n mgf: {\n algorithmOid: oids['mgf1'],\n hash: {\n algorithmOid: oids['sha1']\n }\n },\n saltLength: 20\n };\n }\n\n var capture = {};\n var errors = [];\n if(!asn1.validate(obj, rsassaPssParameterValidator, capture, errors)) {\n var error = new Error('Cannot read RSASSA-PSS parameter block.');\n error.errors = errors;\n throw error;\n }\n\n if(capture.hashOid !== undefined) {\n params.hash = params.hash || {};\n params.hash.algorithmOid = asn1.derToOid(capture.hashOid);\n }\n\n if(capture.maskGenOid !== undefined) {\n params.mgf = params.mgf || {};\n params.mgf.algorithmOid = asn1.derToOid(capture.maskGenOid);\n params.mgf.hash = params.mgf.hash || {};\n params.mgf.hash.algorithmOid = asn1.derToOid(capture.maskGenHashOid);\n }\n\n if(capture.saltLength !== undefined) {\n params.saltLength = capture.saltLength.charCodeAt(0);\n }\n\n return params;\n};\n\n/**\n * Create signature digest for OID.\n *\n * @param options\n * signatureOid: the OID specifying the signature algorithm.\n * type: a human readable type for error messages\n * @return a created md instance. throws if unknown oid.\n */\nvar _createSignatureDigest = function(options) {\n switch(oids[options.signatureOid]) {\n case 'sha1WithRSAEncryption':\n // deprecated alias\n case 'sha1WithRSASignature':\n return forge.md.sha1.create();\n case 'md5WithRSAEncryption':\n return forge.md.md5.create();\n case 'sha256WithRSAEncryption':\n return forge.md.sha256.create();\n case 'sha384WithRSAEncryption':\n return forge.md.sha384.create();\n case 'sha512WithRSAEncryption':\n return forge.md.sha512.create();\n case 'RSASSA-PSS':\n return forge.md.sha256.create();\n default:\n var error = new Error(\n 'Could not compute ' + options.type + ' digest. ' +\n 'Unknown signature OID.');\n error.signatureOid = options.signatureOid;\n throw error;\n }\n};\n\n/**\n * Verify signature on certificate or CSR.\n *\n * @param options:\n * certificate the certificate or CSR to verify.\n * md the signature digest.\n * signature the signature\n * @return a created md instance. throws if unknown oid.\n */\nvar _verifySignature = function(options) {\n var cert = options.certificate;\n var scheme;\n\n switch(cert.signatureOid) {\n case oids.sha1WithRSAEncryption:\n // deprecated alias\n case oids.sha1WithRSASignature:\n /* use PKCS#1 v1.5 padding scheme */\n break;\n case oids['RSASSA-PSS']:\n var hash, mgf;\n\n /* initialize mgf */\n hash = oids[cert.signatureParameters.mgf.hash.algorithmOid];\n if(hash === undefined || forge.md[hash] === undefined) {\n var error = new Error('Unsupported MGF hash function.');\n error.oid = cert.signatureParameters.mgf.hash.algorithmOid;\n error.name = hash;\n throw error;\n }\n\n mgf = oids[cert.signatureParameters.mgf.algorithmOid];\n if(mgf === undefined || forge.mgf[mgf] === undefined) {\n var error = new Error('Unsupported MGF function.');\n error.oid = cert.signatureParameters.mgf.algorithmOid;\n error.name = mgf;\n throw error;\n }\n\n mgf = forge.mgf[mgf].create(forge.md[hash].create());\n\n /* initialize hash function */\n hash = oids[cert.signatureParameters.hash.algorithmOid];\n if(hash === undefined || forge.md[hash] === undefined) {\n var error = new Error('Unsupported RSASSA-PSS hash function.');\n error.oid = cert.signatureParameters.hash.algorithmOid;\n error.name = hash;\n throw error;\n }\n\n scheme = forge.pss.create(\n forge.md[hash].create(), mgf, cert.signatureParameters.saltLength\n );\n break;\n }\n\n // verify signature on cert using public key\n return cert.publicKey.verify(\n options.md.digest().getBytes(), options.signature, scheme\n );\n};\n\n/**\n * Converts an X.509 certificate from PEM format.\n *\n * Note: If the certificate is to be verified then compute hash should\n * be set to true. This will scan the TBSCertificate part of the ASN.1\n * object while it is converted so it doesn't need to be converted back\n * to ASN.1-DER-encoding later.\n *\n * @param pem the PEM-formatted certificate.\n * @param computeHash true to compute the hash for verification.\n * @param strict true to be strict when checking ASN.1 value lengths, false to\n * allow truncated values (default: true).\n *\n * @return the certificate.\n */\npki.certificateFromPem = function(pem, computeHash, strict) {\n var msg = forge.pem.decode(pem)[0];\n\n if(msg.type !== 'CERTIFICATE' &&\n msg.type !== 'X509 CERTIFICATE' &&\n msg.type !== 'TRUSTED CERTIFICATE') {\n var error = new Error(\n 'Could not convert certificate from PEM; PEM header type ' +\n 'is not \"CERTIFICATE\", \"X509 CERTIFICATE\", or \"TRUSTED CERTIFICATE\".');\n error.headerType = msg.type;\n throw error;\n }\n if(msg.procType && msg.procType.type === 'ENCRYPTED') {\n throw new Error(\n 'Could not convert certificate from PEM; PEM is encrypted.');\n }\n\n // convert DER to ASN.1 object\n var obj = asn1.fromDer(msg.body, strict);\n\n return pki.certificateFromAsn1(obj, computeHash);\n};\n\n/**\n * Converts an X.509 certificate to PEM format.\n *\n * @param cert the certificate.\n * @param maxline the maximum characters per line, defaults to 64.\n *\n * @return the PEM-formatted certificate.\n */\npki.certificateToPem = function(cert, maxline) {\n // convert to ASN.1, then DER, then PEM-encode\n var msg = {\n type: 'CERTIFICATE',\n body: asn1.toDer(pki.certificateToAsn1(cert)).getBytes()\n };\n return forge.pem.encode(msg, {maxline: maxline});\n};\n\n/**\n * Converts an RSA public key from PEM format.\n *\n * @param pem the PEM-formatted public key.\n *\n * @return the public key.\n */\npki.publicKeyFromPem = function(pem) {\n var msg = forge.pem.decode(pem)[0];\n\n if(msg.type !== 'PUBLIC KEY' && msg.type !== 'RSA PUBLIC KEY') {\n var error = new Error('Could not convert public key from PEM; PEM header ' +\n 'type is not \"PUBLIC KEY\" or \"RSA PUBLIC KEY\".');\n error.headerType = msg.type;\n throw error;\n }\n if(msg.procType && msg.procType.type === 'ENCRYPTED') {\n throw new Error('Could not convert public key from PEM; PEM is encrypted.');\n }\n\n // convert DER to ASN.1 object\n var obj = asn1.fromDer(msg.body);\n\n return pki.publicKeyFromAsn1(obj);\n};\n\n/**\n * Converts an RSA public key to PEM format (using a SubjectPublicKeyInfo).\n *\n * @param key the public key.\n * @param maxline the maximum characters per line, defaults to 64.\n *\n * @return the PEM-formatted public key.\n */\npki.publicKeyToPem = function(key, maxline) {\n // convert to ASN.1, then DER, then PEM-encode\n var msg = {\n type: 'PUBLIC KEY',\n body: asn1.toDer(pki.publicKeyToAsn1(key)).getBytes()\n };\n return forge.pem.encode(msg, {maxline: maxline});\n};\n\n/**\n * Converts an RSA public key to PEM format (using an RSAPublicKey).\n *\n * @param key the public key.\n * @param maxline the maximum characters per line, defaults to 64.\n *\n * @return the PEM-formatted public key.\n */\npki.publicKeyToRSAPublicKeyPem = function(key, maxline) {\n // convert to ASN.1, then DER, then PEM-encode\n var msg = {\n type: 'RSA PUBLIC KEY',\n body: asn1.toDer(pki.publicKeyToRSAPublicKey(key)).getBytes()\n };\n return forge.pem.encode(msg, {maxline: maxline});\n};\n\n/**\n * Gets a fingerprint for the given public key.\n *\n * @param options the options to use.\n * [md] the message digest object to use (defaults to forge.md.sha1).\n * [type] the type of fingerprint, such as 'RSAPublicKey',\n * 'SubjectPublicKeyInfo' (defaults to 'RSAPublicKey').\n * [encoding] an alternative output encoding, such as 'hex'\n * (defaults to none, outputs a byte buffer).\n * [delimiter] the delimiter to use between bytes for 'hex' encoded\n * output, eg: ':' (defaults to none).\n *\n * @return the fingerprint as a byte buffer or other encoding based on options.\n */\npki.getPublicKeyFingerprint = function(key, options) {\n options = options || {};\n var md = options.md || forge.md.sha1.create();\n var type = options.type || 'RSAPublicKey';\n\n var bytes;\n switch(type) {\n case 'RSAPublicKey':\n bytes = asn1.toDer(pki.publicKeyToRSAPublicKey(key)).getBytes();\n break;\n case 'SubjectPublicKeyInfo':\n bytes = asn1.toDer(pki.publicKeyToAsn1(key)).getBytes();\n break;\n default:\n throw new Error('Unknown fingerprint type \"' + options.type + '\".');\n }\n\n // hash public key bytes\n md.start();\n md.update(bytes);\n var digest = md.digest();\n if(options.encoding === 'hex') {\n var hex = digest.toHex();\n if(options.delimiter) {\n return hex.match(/.{2}/g).join(options.delimiter);\n }\n return hex;\n } else if(options.encoding === 'binary') {\n return digest.getBytes();\n } else if(options.encoding) {\n throw new Error('Unknown encoding \"' + options.encoding + '\".');\n }\n return digest;\n};\n\n/**\n * Converts a PKCS#10 certification request (CSR) from PEM format.\n *\n * Note: If the certification request is to be verified then compute hash\n * should be set to true. This will scan the CertificationRequestInfo part of\n * the ASN.1 object while it is converted so it doesn't need to be converted\n * back to ASN.1-DER-encoding later.\n *\n * @param pem the PEM-formatted certificate.\n * @param computeHash true to compute the hash for verification.\n * @param strict true to be strict when checking ASN.1 value lengths, false to\n * allow truncated values (default: true).\n *\n * @return the certification request (CSR).\n */\npki.certificationRequestFromPem = function(pem, computeHash, strict) {\n var msg = forge.pem.decode(pem)[0];\n\n if(msg.type !== 'CERTIFICATE REQUEST') {\n var error = new Error('Could not convert certification request from PEM; ' +\n 'PEM header type is not \"CERTIFICATE REQUEST\".');\n error.headerType = msg.type;\n throw error;\n }\n if(msg.procType && msg.procType.type === 'ENCRYPTED') {\n throw new Error('Could not convert certification request from PEM; ' +\n 'PEM is encrypted.');\n }\n\n // convert DER to ASN.1 object\n var obj = asn1.fromDer(msg.body, strict);\n\n return pki.certificationRequestFromAsn1(obj, computeHash);\n};\n\n/**\n * Converts a PKCS#10 certification request (CSR) to PEM format.\n *\n * @param csr the certification request.\n * @param maxline the maximum characters per line, defaults to 64.\n *\n * @return the PEM-formatted certification request.\n */\npki.certificationRequestToPem = function(csr, maxline) {\n // convert to ASN.1, then DER, then PEM-encode\n var msg = {\n type: 'CERTIFICATE REQUEST',\n body: asn1.toDer(pki.certificationRequestToAsn1(csr)).getBytes()\n };\n return forge.pem.encode(msg, {maxline: maxline});\n};\n\n/**\n * Creates an empty X.509v3 RSA certificate.\n *\n * @return the certificate.\n */\npki.createCertificate = function() {\n var cert = {};\n cert.version = 0x02;\n cert.serialNumber = '00';\n cert.signatureOid = null;\n cert.signature = null;\n cert.siginfo = {};\n cert.siginfo.algorithmOid = null;\n cert.validity = {};\n cert.validity.notBefore = new Date();\n cert.validity.notAfter = new Date();\n\n cert.issuer = {};\n cert.issuer.getField = function(sn) {\n return _getAttribute(cert.issuer, sn);\n };\n cert.issuer.addField = function(attr) {\n _fillMissingFields([attr]);\n cert.issuer.attributes.push(attr);\n };\n cert.issuer.attributes = [];\n cert.issuer.hash = null;\n\n cert.subject = {};\n cert.subject.getField = function(sn) {\n return _getAttribute(cert.subject, sn);\n };\n cert.subject.addField = function(attr) {\n _fillMissingFields([attr]);\n cert.subject.attributes.push(attr);\n };\n cert.subject.attributes = [];\n cert.subject.hash = null;\n\n cert.extensions = [];\n cert.publicKey = null;\n cert.md = null;\n\n /**\n * Sets the subject of this certificate.\n *\n * @param attrs the array of subject attributes to use.\n * @param uniqueId an optional a unique ID to use.\n */\n cert.setSubject = function(attrs, uniqueId) {\n // set new attributes, clear hash\n _fillMissingFields(attrs);\n cert.subject.attributes = attrs;\n delete cert.subject.uniqueId;\n if(uniqueId) {\n // TODO: support arbitrary bit length ids\n cert.subject.uniqueId = uniqueId;\n }\n cert.subject.hash = null;\n };\n\n /**\n * Sets the issuer of this certificate.\n *\n * @param attrs the array of issuer attributes to use.\n * @param uniqueId an optional a unique ID to use.\n */\n cert.setIssuer = function(attrs, uniqueId) {\n // set new attributes, clear hash\n _fillMissingFields(attrs);\n cert.issuer.attributes = attrs;\n delete cert.issuer.uniqueId;\n if(uniqueId) {\n // TODO: support arbitrary bit length ids\n cert.issuer.uniqueId = uniqueId;\n }\n cert.issuer.hash = null;\n };\n\n /**\n * Sets the extensions of this certificate.\n *\n * @param exts the array of extensions to use.\n */\n cert.setExtensions = function(exts) {\n for(var i = 0; i < exts.length; ++i) {\n _fillMissingExtensionFields(exts[i], {cert: cert});\n }\n // set new extensions\n cert.extensions = exts;\n };\n\n /**\n * Gets an extension by its name or id.\n *\n * @param options the name to use or an object with:\n * name the name to use.\n * id the id to use.\n *\n * @return the extension or null if not found.\n */\n cert.getExtension = function(options) {\n if(typeof options === 'string') {\n options = {name: options};\n }\n\n var rval = null;\n var ext;\n for(var i = 0; rval === null && i < cert.extensions.length; ++i) {\n ext = cert.extensions[i];\n if(options.id && ext.id === options.id) {\n rval = ext;\n } else if(options.name && ext.name === options.name) {\n rval = ext;\n }\n }\n return rval;\n };\n\n /**\n * Signs this certificate using the given private key.\n *\n * @param key the private key to sign with.\n * @param md the message digest object to use (defaults to forge.md.sha1).\n */\n cert.sign = function(key, md) {\n // TODO: get signature OID from private key\n cert.md = md || forge.md.sha1.create();\n var algorithmOid = oids[cert.md.algorithm + 'WithRSAEncryption'];\n if(!algorithmOid) {\n var error = new Error('Could not compute certificate digest. ' +\n 'Unknown message digest algorithm OID.');\n error.algorithm = cert.md.algorithm;\n throw error;\n }\n cert.signatureOid = cert.siginfo.algorithmOid = algorithmOid;\n\n // get TBSCertificate, convert to DER\n cert.tbsCertificate = pki.getTBSCertificate(cert);\n var bytes = asn1.toDer(cert.tbsCertificate);\n\n // digest and sign\n cert.md.update(bytes.getBytes());\n cert.signature = key.sign(cert.md);\n };\n\n /**\n * Attempts verify the signature on the passed certificate using this\n * certificate's public key.\n *\n * @param child the certificate to verify.\n *\n * @return true if verified, false if not.\n */\n cert.verify = function(child) {\n var rval = false;\n\n if(!cert.issued(child)) {\n var issuer = child.issuer;\n var subject = cert.subject;\n var error = new Error(\n 'The parent certificate did not issue the given child ' +\n 'certificate; the child certificate\\'s issuer does not match the ' +\n 'parent\\'s subject.');\n error.expectedIssuer = subject.attributes;\n error.actualIssuer = issuer.attributes;\n throw error;\n }\n\n var md = child.md;\n if(md === null) {\n // create digest for OID signature types\n md = _createSignatureDigest({\n signatureOid: child.signatureOid,\n type: 'certificate'\n });\n\n // produce DER formatted TBSCertificate and digest it\n var tbsCertificate = child.tbsCertificate || pki.getTBSCertificate(child);\n var bytes = asn1.toDer(tbsCertificate);\n md.update(bytes.getBytes());\n }\n\n if(md !== null) {\n rval = _verifySignature({\n certificate: cert, md: md, signature: child.signature\n });\n }\n\n return rval;\n };\n\n /**\n * Returns true if this certificate's issuer matches the passed\n * certificate's subject. Note that no signature check is performed.\n *\n * @param parent the certificate to check.\n *\n * @return true if this certificate's issuer matches the passed certificate's\n * subject.\n */\n cert.isIssuer = function(parent) {\n var rval = false;\n\n var i = cert.issuer;\n var s = parent.subject;\n\n // compare hashes if present\n if(i.hash && s.hash) {\n rval = (i.hash === s.hash);\n } else if(i.attributes.length === s.attributes.length) {\n // all attributes are the same so issuer matches subject\n rval = true;\n var iattr, sattr;\n for(var n = 0; rval && n < i.attributes.length; ++n) {\n iattr = i.attributes[n];\n sattr = s.attributes[n];\n if(iattr.type !== sattr.type || iattr.value !== sattr.value) {\n // attribute mismatch\n rval = false;\n }\n }\n }\n\n return rval;\n };\n\n /**\n * Returns true if this certificate's subject matches the issuer of the\n * given certificate). Note that not signature check is performed.\n *\n * @param child the certificate to check.\n *\n * @return true if this certificate's subject matches the passed\n * certificate's issuer.\n */\n cert.issued = function(child) {\n return child.isIssuer(cert);\n };\n\n /**\n * Generates the subjectKeyIdentifier for this certificate as byte buffer.\n *\n * @return the subjectKeyIdentifier for this certificate as byte buffer.\n */\n cert.generateSubjectKeyIdentifier = function() {\n /* See: 4.2.1.2 section of the the RFC3280, keyIdentifier is either:\n\n (1) The keyIdentifier is composed of the 160-bit SHA-1 hash of the\n value of the BIT STRING subjectPublicKey (excluding the tag,\n length, and number of unused bits).\n\n (2) The keyIdentifier is composed of a four bit type field with\n the value 0100 followed by the least significant 60 bits of the\n SHA-1 hash of the value of the BIT STRING subjectPublicKey\n (excluding the tag, length, and number of unused bit string bits).\n */\n\n // skipping the tag, length, and number of unused bits is the same\n // as just using the RSAPublicKey (for RSA keys, which are the\n // only ones supported)\n return pki.getPublicKeyFingerprint(cert.publicKey, {type: 'RSAPublicKey'});\n };\n\n /**\n * Verifies the subjectKeyIdentifier extension value for this certificate\n * against its public key. If no extension is found, false will be\n * returned.\n *\n * @return true if verified, false if not.\n */\n cert.verifySubjectKeyIdentifier = function() {\n var oid = oids['subjectKeyIdentifier'];\n for(var i = 0; i < cert.extensions.length; ++i) {\n var ext = cert.extensions[i];\n if(ext.id === oid) {\n var ski = cert.generateSubjectKeyIdentifier().getBytes();\n return (forge.util.hexToBytes(ext.subjectKeyIdentifier) === ski);\n }\n }\n return false;\n };\n\n return cert;\n};\n\n/**\n * Converts an X.509v3 RSA certificate from an ASN.1 object.\n *\n * Note: If the certificate is to be verified then compute hash should\n * be set to true. There is currently no implementation for converting\n * a certificate back to ASN.1 so the TBSCertificate part of the ASN.1\n * object needs to be scanned before the cert object is created.\n *\n * @param obj the asn1 representation of an X.509v3 RSA certificate.\n * @param computeHash true to compute the hash for verification.\n *\n * @return the certificate.\n */\npki.certificateFromAsn1 = function(obj, computeHash) {\n // validate certificate and capture data\n var capture = {};\n var errors = [];\n if(!asn1.validate(obj, x509CertificateValidator, capture, errors)) {\n var error = new Error('Cannot read X.509 certificate. ' +\n 'ASN.1 object is not an X509v3 Certificate.');\n error.errors = errors;\n throw error;\n }\n\n // get oid\n var oid = asn1.derToOid(capture.publicKeyOid);\n if(oid !== pki.oids.rsaEncryption) {\n throw new Error('Cannot read public key. OID is not RSA.');\n }\n\n // create certificate\n var cert = pki.createCertificate();\n cert.version = capture.certVersion ?\n capture.certVersion.charCodeAt(0) : 0;\n var serial = forge.util.createBuffer(capture.certSerialNumber);\n cert.serialNumber = serial.toHex();\n cert.signatureOid = forge.asn1.derToOid(capture.certSignatureOid);\n cert.signatureParameters = _readSignatureParameters(\n cert.signatureOid, capture.certSignatureParams, true);\n cert.siginfo.algorithmOid = forge.asn1.derToOid(capture.certinfoSignatureOid);\n cert.siginfo.parameters = _readSignatureParameters(cert.siginfo.algorithmOid,\n capture.certinfoSignatureParams, false);\n cert.signature = capture.certSignature;\n\n var validity = [];\n if(capture.certValidity1UTCTime !== undefined) {\n validity.push(asn1.utcTimeToDate(capture.certValidity1UTCTime));\n }\n if(capture.certValidity2GeneralizedTime !== undefined) {\n validity.push(asn1.generalizedTimeToDate(\n capture.certValidity2GeneralizedTime));\n }\n if(capture.certValidity3UTCTime !== undefined) {\n validity.push(asn1.utcTimeToDate(capture.certValidity3UTCTime));\n }\n if(capture.certValidity4GeneralizedTime !== undefined) {\n validity.push(asn1.generalizedTimeToDate(\n capture.certValidity4GeneralizedTime));\n }\n if(validity.length > 2) {\n throw new Error('Cannot read notBefore/notAfter validity times; more ' +\n 'than two times were provided in the certificate.');\n }\n if(validity.length < 2) {\n throw new Error('Cannot read notBefore/notAfter validity times; they ' +\n 'were not provided as either UTCTime or GeneralizedTime.');\n }\n cert.validity.notBefore = validity[0];\n cert.validity.notAfter = validity[1];\n\n // keep TBSCertificate to preserve signature when exporting\n cert.tbsCertificate = capture.tbsCertificate;\n\n if(computeHash) {\n // create digest for OID signature type\n cert.md = _createSignatureDigest({\n signatureOid: cert.signatureOid,\n type: 'certificate'\n });\n\n // produce DER formatted TBSCertificate and digest it\n var bytes = asn1.toDer(cert.tbsCertificate);\n cert.md.update(bytes.getBytes());\n }\n\n // handle issuer, build issuer message digest\n var imd = forge.md.sha1.create();\n var ibytes = asn1.toDer(capture.certIssuer);\n imd.update(ibytes.getBytes());\n cert.issuer.getField = function(sn) {\n return _getAttribute(cert.issuer, sn);\n };\n cert.issuer.addField = function(attr) {\n _fillMissingFields([attr]);\n cert.issuer.attributes.push(attr);\n };\n cert.issuer.attributes = pki.RDNAttributesAsArray(capture.certIssuer);\n if(capture.certIssuerUniqueId) {\n cert.issuer.uniqueId = capture.certIssuerUniqueId;\n }\n cert.issuer.hash = imd.digest().toHex();\n\n // handle subject, build subject message digest\n var smd = forge.md.sha1.create();\n var sbytes = asn1.toDer(capture.certSubject);\n smd.update(sbytes.getBytes());\n cert.subject.getField = function(sn) {\n return _getAttribute(cert.subject, sn);\n };\n cert.subject.addField = function(attr) {\n _fillMissingFields([attr]);\n cert.subject.attributes.push(attr);\n };\n cert.subject.attributes = pki.RDNAttributesAsArray(capture.certSubject);\n if(capture.certSubjectUniqueId) {\n cert.subject.uniqueId = capture.certSubjectUniqueId;\n }\n cert.subject.hash = smd.digest().toHex();\n\n // handle extensions\n if(capture.certExtensions) {\n cert.extensions = pki.certificateExtensionsFromAsn1(capture.certExtensions);\n } else {\n cert.extensions = [];\n }\n\n // convert RSA public key from ASN.1\n cert.publicKey = pki.publicKeyFromAsn1(capture.subjectPublicKeyInfo);\n\n return cert;\n};\n\n/**\n * Converts an ASN.1 extensions object (with extension sequences as its\n * values) into an array of extension objects with types and values.\n *\n * Supported extensions:\n *\n * id-ce-keyUsage OBJECT IDENTIFIER ::= { id-ce 15 }\n * KeyUsage ::= BIT STRING {\n * digitalSignature (0),\n * nonRepudiation (1),\n * keyEncipherment (2),\n * dataEncipherment (3),\n * keyAgreement (4),\n * keyCertSign (5),\n * cRLSign (6),\n * encipherOnly (7),\n * decipherOnly (8)\n * }\n *\n * id-ce-basicConstraints OBJECT IDENTIFIER ::= { id-ce 19 }\n * BasicConstraints ::= SEQUENCE {\n * cA BOOLEAN DEFAULT FALSE,\n * pathLenConstraint INTEGER (0..MAX) OPTIONAL\n * }\n *\n * subjectAltName EXTENSION ::= {\n * SYNTAX GeneralNames\n * IDENTIFIED BY id-ce-subjectAltName\n * }\n *\n * GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName\n *\n * GeneralName ::= CHOICE {\n * otherName [0] INSTANCE OF OTHER-NAME,\n * rfc822Name [1] IA5String,\n * dNSName [2] IA5String,\n * x400Address [3] ORAddress,\n * directoryName [4] Name,\n * ediPartyName [5] EDIPartyName,\n * uniformResourceIdentifier [6] IA5String,\n * IPAddress [7] OCTET STRING,\n * registeredID [8] OBJECT IDENTIFIER\n * }\n *\n * OTHER-NAME ::= TYPE-IDENTIFIER\n *\n * EDIPartyName ::= SEQUENCE {\n * nameAssigner [0] DirectoryString {ub-name} OPTIONAL,\n * partyName [1] DirectoryString {ub-name}\n * }\n *\n * @param exts the extensions ASN.1 with extension sequences to parse.\n *\n * @return the array.\n */\npki.certificateExtensionsFromAsn1 = function(exts) {\n var rval = [];\n for(var i = 0; i < exts.value.length; ++i) {\n // get extension sequence\n var extseq = exts.value[i];\n for(var ei = 0; ei < extseq.value.length; ++ei) {\n rval.push(pki.certificateExtensionFromAsn1(extseq.value[ei]));\n }\n }\n\n return rval;\n};\n\n/**\n * Parses a single certificate extension from ASN.1.\n *\n * @param ext the extension in ASN.1 format.\n *\n * @return the parsed extension as an object.\n */\npki.certificateExtensionFromAsn1 = function(ext) {\n // an extension has:\n // [0] extnID OBJECT IDENTIFIER\n // [1] critical BOOLEAN DEFAULT FALSE\n // [2] extnValue OCTET STRING\n var e = {};\n e.id = asn1.derToOid(ext.value[0].value);\n e.critical = false;\n if(ext.value[1].type === asn1.Type.BOOLEAN) {\n e.critical = (ext.value[1].value.charCodeAt(0) !== 0x00);\n e.value = ext.value[2].value;\n } else {\n e.value = ext.value[1].value;\n }\n // if the oid is known, get its name\n if(e.id in oids) {\n e.name = oids[e.id];\n\n // handle key usage\n if(e.name === 'keyUsage') {\n // get value as BIT STRING\n var ev = asn1.fromDer(e.value);\n var b2 = 0x00;\n var b3 = 0x00;\n if(ev.value.length > 1) {\n // skip first byte, just indicates unused bits which\n // will be padded with 0s anyway\n // get bytes with flag bits\n b2 = ev.value.charCodeAt(1);\n b3 = ev.value.length > 2 ? ev.value.charCodeAt(2) : 0;\n }\n // set flags\n e.digitalSignature = (b2 & 0x80) === 0x80;\n e.nonRepudiation = (b2 & 0x40) === 0x40;\n e.keyEncipherment = (b2 & 0x20) === 0x20;\n e.dataEncipherment = (b2 & 0x10) === 0x10;\n e.keyAgreement = (b2 & 0x08) === 0x08;\n e.keyCertSign = (b2 & 0x04) === 0x04;\n e.cRLSign = (b2 & 0x02) === 0x02;\n e.encipherOnly = (b2 & 0x01) === 0x01;\n e.decipherOnly = (b3 & 0x80) === 0x80;\n } else if(e.name === 'basicConstraints') {\n // handle basic constraints\n // get value as SEQUENCE\n var ev = asn1.fromDer(e.value);\n // get cA BOOLEAN flag (defaults to false)\n if(ev.value.length > 0 && ev.value[0].type === asn1.Type.BOOLEAN) {\n e.cA = (ev.value[0].value.charCodeAt(0) !== 0x00);\n } else {\n e.cA = false;\n }\n // get path length constraint\n var value = null;\n if(ev.value.length > 0 && ev.value[0].type === asn1.Type.INTEGER) {\n value = ev.value[0].value;\n } else if(ev.value.length > 1) {\n value = ev.value[1].value;\n }\n if(value !== null) {\n e.pathLenConstraint = asn1.derToInteger(value);\n }\n } else if(e.name === 'extKeyUsage') {\n // handle extKeyUsage\n // value is a SEQUENCE of OIDs\n var ev = asn1.fromDer(e.value);\n for(var vi = 0; vi < ev.value.length; ++vi) {\n var oid = asn1.derToOid(ev.value[vi].value);\n if(oid in oids) {\n e[oids[oid]] = true;\n } else {\n e[oid] = true;\n }\n }\n } else if(e.name === 'nsCertType') {\n // handle nsCertType\n // get value as BIT STRING\n var ev = asn1.fromDer(e.value);\n var b2 = 0x00;\n if(ev.value.length > 1) {\n // skip first byte, just indicates unused bits which\n // will be padded with 0s anyway\n // get bytes with flag bits\n b2 = ev.value.charCodeAt(1);\n }\n // set flags\n e.client = (b2 & 0x80) === 0x80;\n e.server = (b2 & 0x40) === 0x40;\n e.email = (b2 & 0x20) === 0x20;\n e.objsign = (b2 & 0x10) === 0x10;\n e.reserved = (b2 & 0x08) === 0x08;\n e.sslCA = (b2 & 0x04) === 0x04;\n e.emailCA = (b2 & 0x02) === 0x02;\n e.objCA = (b2 & 0x01) === 0x01;\n } else if(\n e.name === 'subjectAltName' ||\n e.name === 'issuerAltName') {\n // handle subjectAltName/issuerAltName\n e.altNames = [];\n\n // ev is a SYNTAX SEQUENCE\n var gn;\n var ev = asn1.fromDer(e.value);\n for(var n = 0; n < ev.value.length; ++n) {\n // get GeneralName\n gn = ev.value[n];\n\n var altName = {\n type: gn.type,\n value: gn.value\n };\n e.altNames.push(altName);\n\n // Note: Support for types 1,2,6,7,8\n switch(gn.type) {\n // rfc822Name\n case 1:\n // dNSName\n case 2:\n // uniformResourceIdentifier (URI)\n case 6:\n break;\n // IPAddress\n case 7:\n // convert to IPv4/IPv6 string representation\n altName.ip = forge.util.bytesToIP(gn.value);\n break;\n // registeredID\n case 8:\n altName.oid = asn1.derToOid(gn.value);\n break;\n default:\n // unsupported\n }\n }\n } else if(e.name === 'subjectKeyIdentifier') {\n // value is an OCTETSTRING w/the hash of the key-type specific\n // public key structure (eg: RSAPublicKey)\n var ev = asn1.fromDer(e.value);\n e.subjectKeyIdentifier = forge.util.bytesToHex(ev.value);\n }\n }\n return e;\n};\n\n/**\n * Converts a PKCS#10 certification request (CSR) from an ASN.1 object.\n *\n * Note: If the certification request is to be verified then compute hash\n * should be set to true. There is currently no implementation for converting\n * a certificate back to ASN.1 so the CertificationRequestInfo part of the\n * ASN.1 object needs to be scanned before the csr object is created.\n *\n * @param obj the asn1 representation of a PKCS#10 certification request (CSR).\n * @param computeHash true to compute the hash for verification.\n *\n * @return the certification request (CSR).\n */\npki.certificationRequestFromAsn1 = function(obj, computeHash) {\n // validate certification request and capture data\n var capture = {};\n var errors = [];\n if(!asn1.validate(obj, certificationRequestValidator, capture, errors)) {\n var error = new Error('Cannot read PKCS#10 certificate request. ' +\n 'ASN.1 object is not a PKCS#10 CertificationRequest.');\n error.errors = errors;\n throw error;\n }\n\n // get oid\n var oid = asn1.derToOid(capture.publicKeyOid);\n if(oid !== pki.oids.rsaEncryption) {\n throw new Error('Cannot read public key. OID is not RSA.');\n }\n\n // create certification request\n var csr = pki.createCertificationRequest();\n csr.version = capture.csrVersion ? capture.csrVersion.charCodeAt(0) : 0;\n csr.signatureOid = forge.asn1.derToOid(capture.csrSignatureOid);\n csr.signatureParameters = _readSignatureParameters(\n csr.signatureOid, capture.csrSignatureParams, true);\n csr.siginfo.algorithmOid = forge.asn1.derToOid(capture.csrSignatureOid);\n csr.siginfo.parameters = _readSignatureParameters(\n csr.siginfo.algorithmOid, capture.csrSignatureParams, false);\n csr.signature = capture.csrSignature;\n\n // keep CertificationRequestInfo to preserve signature when exporting\n csr.certificationRequestInfo = capture.certificationRequestInfo;\n\n if(computeHash) {\n // create digest for OID signature type\n csr.md = _createSignatureDigest({\n signatureOid: csr.signatureOid,\n type: 'certification request'\n });\n\n // produce DER formatted CertificationRequestInfo and digest it\n var bytes = asn1.toDer(csr.certificationRequestInfo);\n csr.md.update(bytes.getBytes());\n }\n\n // handle subject, build subject message digest\n var smd = forge.md.sha1.create();\n csr.subject.getField = function(sn) {\n return _getAttribute(csr.subject, sn);\n };\n csr.subject.addField = function(attr) {\n _fillMissingFields([attr]);\n csr.subject.attributes.push(attr);\n };\n csr.subject.attributes = pki.RDNAttributesAsArray(\n capture.certificationRequestInfoSubject, smd);\n csr.subject.hash = smd.digest().toHex();\n\n // convert RSA public key from ASN.1\n csr.publicKey = pki.publicKeyFromAsn1(capture.subjectPublicKeyInfo);\n\n // convert attributes from ASN.1\n csr.getAttribute = function(sn) {\n return _getAttribute(csr, sn);\n };\n csr.addAttribute = function(attr) {\n _fillMissingFields([attr]);\n csr.attributes.push(attr);\n };\n csr.attributes = pki.CRIAttributesAsArray(\n capture.certificationRequestInfoAttributes || []);\n\n return csr;\n};\n\n/**\n * Creates an empty certification request (a CSR or certificate signing\n * request). Once created, its public key and attributes can be set and then\n * it can be signed.\n *\n * @return the empty certification request.\n */\npki.createCertificationRequest = function() {\n var csr = {};\n csr.version = 0x00;\n csr.signatureOid = null;\n csr.signature = null;\n csr.siginfo = {};\n csr.siginfo.algorithmOid = null;\n\n csr.subject = {};\n csr.subject.getField = function(sn) {\n return _getAttribute(csr.subject, sn);\n };\n csr.subject.addField = function(attr) {\n _fillMissingFields([attr]);\n csr.subject.attributes.push(attr);\n };\n csr.subject.attributes = [];\n csr.subject.hash = null;\n\n csr.publicKey = null;\n csr.attributes = [];\n csr.getAttribute = function(sn) {\n return _getAttribute(csr, sn);\n };\n csr.addAttribute = function(attr) {\n _fillMissingFields([attr]);\n csr.attributes.push(attr);\n };\n csr.md = null;\n\n /**\n * Sets the subject of this certification request.\n *\n * @param attrs the array of subject attributes to use.\n */\n csr.setSubject = function(attrs) {\n // set new attributes\n _fillMissingFields(attrs);\n csr.subject.attributes = attrs;\n csr.subject.hash = null;\n };\n\n /**\n * Sets the attributes of this certification request.\n *\n * @param attrs the array of attributes to use.\n */\n csr.setAttributes = function(attrs) {\n // set new attributes\n _fillMissingFields(attrs);\n csr.attributes = attrs;\n };\n\n /**\n * Signs this certification request using the given private key.\n *\n * @param key the private key to sign with.\n * @param md the message digest object to use (defaults to forge.md.sha1).\n */\n csr.sign = function(key, md) {\n // TODO: get signature OID from private key\n csr.md = md || forge.md.sha1.create();\n var algorithmOid = oids[csr.md.algorithm + 'WithRSAEncryption'];\n if(!algorithmOid) {\n var error = new Error('Could not compute certification request digest. ' +\n 'Unknown message digest algorithm OID.');\n error.algorithm = csr.md.algorithm;\n throw error;\n }\n csr.signatureOid = csr.siginfo.algorithmOid = algorithmOid;\n\n // get CertificationRequestInfo, convert to DER\n csr.certificationRequestInfo = pki.getCertificationRequestInfo(csr);\n var bytes = asn1.toDer(csr.certificationRequestInfo);\n\n // digest and sign\n csr.md.update(bytes.getBytes());\n csr.signature = key.sign(csr.md);\n };\n\n /**\n * Attempts verify the signature on the passed certification request using\n * its public key.\n *\n * A CSR that has been exported to a file in PEM format can be verified using\n * OpenSSL using this command:\n *\n * openssl req -in -verify -noout -text\n *\n * @return true if verified, false if not.\n */\n csr.verify = function() {\n var rval = false;\n\n var md = csr.md;\n if(md === null) {\n md = _createSignatureDigest({\n signatureOid: csr.signatureOid,\n type: 'certification request'\n });\n\n // produce DER formatted CertificationRequestInfo and digest it\n var cri = csr.certificationRequestInfo ||\n pki.getCertificationRequestInfo(csr);\n var bytes = asn1.toDer(cri);\n md.update(bytes.getBytes());\n }\n\n if(md !== null) {\n rval = _verifySignature({\n certificate: csr, md: md, signature: csr.signature\n });\n }\n\n return rval;\n };\n\n return csr;\n};\n\n/**\n * Converts an X.509 subject or issuer to an ASN.1 RDNSequence.\n *\n * @param obj the subject or issuer (distinguished name).\n *\n * @return the ASN.1 RDNSequence.\n */\nfunction _dnToAsn1(obj) {\n // create an empty RDNSequence\n var rval = asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, []);\n\n // iterate over attributes\n var attr, set;\n var attrs = obj.attributes;\n for(var i = 0; i < attrs.length; ++i) {\n attr = attrs[i];\n var value = attr.value;\n\n // reuse tag class for attribute value if available\n var valueTagClass = asn1.Type.PRINTABLESTRING;\n if('valueTagClass' in attr) {\n valueTagClass = attr.valueTagClass;\n\n if(valueTagClass === asn1.Type.UTF8) {\n value = forge.util.encodeUtf8(value);\n }\n // FIXME: handle more encodings\n }\n\n // create a RelativeDistinguishedName set\n // each value in the set is an AttributeTypeAndValue first\n // containing the type (an OID) and second the value\n set = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SET, true, [\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // AttributeType\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(attr.type).getBytes()),\n // AttributeValue\n asn1.create(asn1.Class.UNIVERSAL, valueTagClass, false, value)\n ])\n ]);\n rval.value.push(set);\n }\n\n return rval;\n}\n\n/**\n * Gets all printable attributes (typically of an issuer or subject) in a\n * simplified JSON format for display.\n *\n * @param attrs the attributes.\n *\n * @return the JSON for display.\n */\nfunction _getAttributesAsJson(attrs) {\n var rval = {};\n for(var i = 0; i < attrs.length; ++i) {\n var attr = attrs[i];\n if(attr.shortName && (\n attr.valueTagClass === asn1.Type.UTF8 ||\n attr.valueTagClass === asn1.Type.PRINTABLESTRING ||\n attr.valueTagClass === asn1.Type.IA5STRING)) {\n var value = attr.value;\n if(attr.valueTagClass === asn1.Type.UTF8) {\n value = forge.util.encodeUtf8(attr.value);\n }\n if(!(attr.shortName in rval)) {\n rval[attr.shortName] = value;\n } else if(forge.util.isArray(rval[attr.shortName])) {\n rval[attr.shortName].push(value);\n } else {\n rval[attr.shortName] = [rval[attr.shortName], value];\n }\n }\n }\n return rval;\n}\n\n/**\n * Fills in missing fields in attributes.\n *\n * @param attrs the attributes to fill missing fields in.\n */\nfunction _fillMissingFields(attrs) {\n var attr;\n for(var i = 0; i < attrs.length; ++i) {\n attr = attrs[i];\n\n // populate missing name\n if(typeof attr.name === 'undefined') {\n if(attr.type && attr.type in pki.oids) {\n attr.name = pki.oids[attr.type];\n } else if(attr.shortName && attr.shortName in _shortNames) {\n attr.name = pki.oids[_shortNames[attr.shortName]];\n }\n }\n\n // populate missing type (OID)\n if(typeof attr.type === 'undefined') {\n if(attr.name && attr.name in pki.oids) {\n attr.type = pki.oids[attr.name];\n } else {\n var error = new Error('Attribute type not specified.');\n error.attribute = attr;\n throw error;\n }\n }\n\n // populate missing shortname\n if(typeof attr.shortName === 'undefined') {\n if(attr.name && attr.name in _shortNames) {\n attr.shortName = _shortNames[attr.name];\n }\n }\n\n // convert extensions to value\n if(attr.type === oids.extensionRequest) {\n attr.valueConstructed = true;\n attr.valueTagClass = asn1.Type.SEQUENCE;\n if(!attr.value && attr.extensions) {\n attr.value = [];\n for(var ei = 0; ei < attr.extensions.length; ++ei) {\n attr.value.push(pki.certificateExtensionToAsn1(\n _fillMissingExtensionFields(attr.extensions[ei])));\n }\n }\n }\n\n if(typeof attr.value === 'undefined') {\n var error = new Error('Attribute value not specified.');\n error.attribute = attr;\n throw error;\n }\n }\n}\n\n/**\n * Fills in missing fields in certificate extensions.\n *\n * @param e the extension.\n * @param [options] the options to use.\n * [cert] the certificate the extensions are for.\n *\n * @return the extension.\n */\nfunction _fillMissingExtensionFields(e, options) {\n options = options || {};\n\n // populate missing name\n if(typeof e.name === 'undefined') {\n if(e.id && e.id in pki.oids) {\n e.name = pki.oids[e.id];\n }\n }\n\n // populate missing id\n if(typeof e.id === 'undefined') {\n if(e.name && e.name in pki.oids) {\n e.id = pki.oids[e.name];\n } else {\n var error = new Error('Extension ID not specified.');\n error.extension = e;\n throw error;\n }\n }\n\n if(typeof e.value !== 'undefined') {\n return e;\n }\n\n // handle missing value:\n\n // value is a BIT STRING\n if(e.name === 'keyUsage') {\n // build flags\n var unused = 0;\n var b2 = 0x00;\n var b3 = 0x00;\n if(e.digitalSignature) {\n b2 |= 0x80;\n unused = 7;\n }\n if(e.nonRepudiation) {\n b2 |= 0x40;\n unused = 6;\n }\n if(e.keyEncipherment) {\n b2 |= 0x20;\n unused = 5;\n }\n if(e.dataEncipherment) {\n b2 |= 0x10;\n unused = 4;\n }\n if(e.keyAgreement) {\n b2 |= 0x08;\n unused = 3;\n }\n if(e.keyCertSign) {\n b2 |= 0x04;\n unused = 2;\n }\n if(e.cRLSign) {\n b2 |= 0x02;\n unused = 1;\n }\n if(e.encipherOnly) {\n b2 |= 0x01;\n unused = 0;\n }\n if(e.decipherOnly) {\n b3 |= 0x80;\n unused = 7;\n }\n\n // create bit string\n var value = String.fromCharCode(unused);\n if(b3 !== 0) {\n value += String.fromCharCode(b2) + String.fromCharCode(b3);\n } else if(b2 !== 0) {\n value += String.fromCharCode(b2);\n }\n e.value = asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.BITSTRING, false, value);\n } else if(e.name === 'basicConstraints') {\n // basicConstraints is a SEQUENCE\n e.value = asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, []);\n // cA BOOLEAN flag defaults to false\n if(e.cA) {\n e.value.value.push(asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.BOOLEAN, false,\n String.fromCharCode(0xFF)));\n }\n if('pathLenConstraint' in e) {\n e.value.value.push(asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,\n asn1.integerToDer(e.pathLenConstraint).getBytes()));\n }\n } else if(e.name === 'extKeyUsage') {\n // extKeyUsage is a SEQUENCE of OIDs\n e.value = asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, []);\n var seq = e.value.value;\n for(var key in e) {\n if(e[key] !== true) {\n continue;\n }\n // key is name in OID map\n if(key in oids) {\n seq.push(asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID,\n false, asn1.oidToDer(oids[key]).getBytes()));\n } else if(key.indexOf('.') !== -1) {\n // assume key is an OID\n seq.push(asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID,\n false, asn1.oidToDer(key).getBytes()));\n }\n }\n } else if(e.name === 'nsCertType') {\n // nsCertType is a BIT STRING\n // build flags\n var unused = 0;\n var b2 = 0x00;\n\n if(e.client) {\n b2 |= 0x80;\n unused = 7;\n }\n if(e.server) {\n b2 |= 0x40;\n unused = 6;\n }\n if(e.email) {\n b2 |= 0x20;\n unused = 5;\n }\n if(e.objsign) {\n b2 |= 0x10;\n unused = 4;\n }\n if(e.reserved) {\n b2 |= 0x08;\n unused = 3;\n }\n if(e.sslCA) {\n b2 |= 0x04;\n unused = 2;\n }\n if(e.emailCA) {\n b2 |= 0x02;\n unused = 1;\n }\n if(e.objCA) {\n b2 |= 0x01;\n unused = 0;\n }\n\n // create bit string\n var value = String.fromCharCode(unused);\n if(b2 !== 0) {\n value += String.fromCharCode(b2);\n }\n e.value = asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.BITSTRING, false, value);\n } else if(e.name === 'subjectAltName' || e.name === 'issuerAltName') {\n // SYNTAX SEQUENCE\n e.value = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, []);\n\n var altName;\n for(var n = 0; n < e.altNames.length; ++n) {\n altName = e.altNames[n];\n var value = altName.value;\n // handle IP\n if(altName.type === 7 && altName.ip) {\n value = forge.util.bytesFromIP(altName.ip);\n if(value === null) {\n var error = new Error(\n 'Extension \"ip\" value is not a valid IPv4 or IPv6 address.');\n error.extension = e;\n throw error;\n }\n } else if(altName.type === 8) {\n // handle OID\n if(altName.oid) {\n value = asn1.oidToDer(asn1.oidToDer(altName.oid));\n } else {\n // deprecated ... convert value to OID\n value = asn1.oidToDer(value);\n }\n }\n e.value.value.push(asn1.create(\n asn1.Class.CONTEXT_SPECIFIC, altName.type, false,\n value));\n }\n } else if(e.name === 'nsComment' && options.cert) {\n // sanity check value is ASCII (req'd) and not too big\n if(!(/^[\\x00-\\x7F]*$/.test(e.comment)) ||\n (e.comment.length < 1) || (e.comment.length > 128)) {\n throw new Error('Invalid \"nsComment\" content.');\n }\n // IA5STRING opaque comment\n e.value = asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.IA5STRING, false, e.comment);\n } else if(e.name === 'subjectKeyIdentifier' && options.cert) {\n var ski = options.cert.generateSubjectKeyIdentifier();\n e.subjectKeyIdentifier = ski.toHex();\n // OCTETSTRING w/digest\n e.value = asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, ski.getBytes());\n } else if(e.name === 'authorityKeyIdentifier' && options.cert) {\n // SYNTAX SEQUENCE\n e.value = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, []);\n var seq = e.value.value;\n\n if(e.keyIdentifier) {\n var keyIdentifier = (e.keyIdentifier === true ?\n options.cert.generateSubjectKeyIdentifier().getBytes() :\n e.keyIdentifier);\n seq.push(\n asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, false, keyIdentifier));\n }\n\n if(e.authorityCertIssuer) {\n var authorityCertIssuer = [\n asn1.create(asn1.Class.CONTEXT_SPECIFIC, 4, true, [\n _dnToAsn1(e.authorityCertIssuer === true ?\n options.cert.issuer : e.authorityCertIssuer)\n ])\n ];\n seq.push(\n asn1.create(asn1.Class.CONTEXT_SPECIFIC, 1, true, authorityCertIssuer));\n }\n\n if(e.serialNumber) {\n var serialNumber = forge.util.hexToBytes(e.serialNumber === true ?\n options.cert.serialNumber : e.serialNumber);\n seq.push(\n asn1.create(asn1.Class.CONTEXT_SPECIFIC, 2, false, serialNumber));\n }\n } else if(e.name === 'cRLDistributionPoints') {\n e.value = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, []);\n var seq = e.value.value;\n\n // Create sub SEQUENCE of DistributionPointName\n var subSeq = asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, []);\n\n // Create fullName CHOICE\n var fullNameGeneralNames = asn1.create(\n asn1.Class.CONTEXT_SPECIFIC, 0, true, []);\n var altName;\n for(var n = 0; n < e.altNames.length; ++n) {\n altName = e.altNames[n];\n var value = altName.value;\n // handle IP\n if(altName.type === 7 && altName.ip) {\n value = forge.util.bytesFromIP(altName.ip);\n if(value === null) {\n var error = new Error(\n 'Extension \"ip\" value is not a valid IPv4 or IPv6 address.');\n error.extension = e;\n throw error;\n }\n } else if(altName.type === 8) {\n // handle OID\n if(altName.oid) {\n value = asn1.oidToDer(asn1.oidToDer(altName.oid));\n } else {\n // deprecated ... convert value to OID\n value = asn1.oidToDer(value);\n }\n }\n fullNameGeneralNames.value.push(asn1.create(\n asn1.Class.CONTEXT_SPECIFIC, altName.type, false,\n value));\n }\n\n // Add to the parent SEQUENCE\n subSeq.value.push(asn1.create(\n asn1.Class.CONTEXT_SPECIFIC, 0, true, [fullNameGeneralNames]));\n seq.push(subSeq);\n }\n\n // ensure value has been defined by now\n if(typeof e.value === 'undefined') {\n var error = new Error('Extension value not specified.');\n error.extension = e;\n throw error;\n }\n\n return e;\n}\n\n/**\n * Convert signature parameters object to ASN.1\n *\n * @param {String} oid Signature algorithm OID\n * @param params The signature parametrs object\n * @return ASN.1 object representing signature parameters\n */\nfunction _signatureParametersToAsn1(oid, params) {\n switch(oid) {\n case oids['RSASSA-PSS']:\n var parts = [];\n\n if(params.hash.algorithmOid !== undefined) {\n parts.push(asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(params.hash.algorithmOid).getBytes()),\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, '')\n ])\n ]));\n }\n\n if(params.mgf.algorithmOid !== undefined) {\n parts.push(asn1.create(asn1.Class.CONTEXT_SPECIFIC, 1, true, [\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(params.mgf.algorithmOid).getBytes()),\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(params.mgf.hash.algorithmOid).getBytes()),\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, '')\n ])\n ])\n ]));\n }\n\n if(params.saltLength !== undefined) {\n parts.push(asn1.create(asn1.Class.CONTEXT_SPECIFIC, 2, true, [\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,\n asn1.integerToDer(params.saltLength).getBytes())\n ]));\n }\n\n return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, parts);\n\n default:\n return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, '');\n }\n}\n\n/**\n * Converts a certification request's attributes to an ASN.1 set of\n * CRIAttributes.\n *\n * @param csr certification request.\n *\n * @return the ASN.1 set of CRIAttributes.\n */\nfunction _CRIAttributesToAsn1(csr) {\n // create an empty context-specific container\n var rval = asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, []);\n\n // no attributes, return empty container\n if(csr.attributes.length === 0) {\n return rval;\n }\n\n // each attribute has a sequence with a type and a set of values\n var attrs = csr.attributes;\n for(var i = 0; i < attrs.length; ++i) {\n var attr = attrs[i];\n var value = attr.value;\n\n // reuse tag class for attribute value if available\n var valueTagClass = asn1.Type.UTF8;\n if('valueTagClass' in attr) {\n valueTagClass = attr.valueTagClass;\n }\n if(valueTagClass === asn1.Type.UTF8) {\n value = forge.util.encodeUtf8(value);\n }\n var valueConstructed = false;\n if('valueConstructed' in attr) {\n valueConstructed = attr.valueConstructed;\n }\n // FIXME: handle more encodings\n\n // create a RelativeDistinguishedName set\n // each value in the set is an AttributeTypeAndValue first\n // containing the type (an OID) and second the value\n var seq = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // AttributeType\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(attr.type).getBytes()),\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SET, true, [\n // AttributeValue\n asn1.create(\n asn1.Class.UNIVERSAL, valueTagClass, valueConstructed, value)\n ])\n ]);\n rval.value.push(seq);\n }\n\n return rval;\n}\n\nvar jan_1_1950 = new Date('1950-01-01T00:00:00Z');\nvar jan_1_2050 = new Date('2050-01-01T00:00:00Z');\n\n/**\n * Converts a Date object to ASN.1\n * Handles the different format before and after 1st January 2050\n *\n * @param date date object.\n *\n * @return the ASN.1 object representing the date.\n */\nfunction _dateToAsn1(date) {\n if(date >= jan_1_1950 && date < jan_1_2050) {\n return asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.UTCTIME, false,\n asn1.dateToUtcTime(date));\n } else {\n return asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.GENERALIZEDTIME, false,\n asn1.dateToGeneralizedTime(date));\n }\n}\n\n/**\n * Gets the ASN.1 TBSCertificate part of an X.509v3 certificate.\n *\n * @param cert the certificate.\n *\n * @return the asn1 TBSCertificate.\n */\npki.getTBSCertificate = function(cert) {\n // TBSCertificate\n var notBefore = _dateToAsn1(cert.validity.notBefore);\n var notAfter = _dateToAsn1(cert.validity.notAfter);\n var tbs = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // version\n asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [\n // integer\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,\n asn1.integerToDer(cert.version).getBytes())\n ]),\n // serialNumber\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,\n forge.util.hexToBytes(cert.serialNumber)),\n // signature\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // algorithm\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(cert.siginfo.algorithmOid).getBytes()),\n // parameters\n _signatureParametersToAsn1(\n cert.siginfo.algorithmOid, cert.siginfo.parameters)\n ]),\n // issuer\n _dnToAsn1(cert.issuer),\n // validity\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n notBefore,\n notAfter\n ]),\n // subject\n _dnToAsn1(cert.subject),\n // SubjectPublicKeyInfo\n pki.publicKeyToAsn1(cert.publicKey)\n ]);\n\n if(cert.issuer.uniqueId) {\n // issuerUniqueID (optional)\n tbs.value.push(\n asn1.create(asn1.Class.CONTEXT_SPECIFIC, 1, true, [\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.BITSTRING, false,\n // TODO: support arbitrary bit length ids\n String.fromCharCode(0x00) +\n cert.issuer.uniqueId\n )\n ])\n );\n }\n if(cert.subject.uniqueId) {\n // subjectUniqueID (optional)\n tbs.value.push(\n asn1.create(asn1.Class.CONTEXT_SPECIFIC, 2, true, [\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.BITSTRING, false,\n // TODO: support arbitrary bit length ids\n String.fromCharCode(0x00) +\n cert.subject.uniqueId\n )\n ])\n );\n }\n\n if(cert.extensions.length > 0) {\n // extensions (optional)\n tbs.value.push(pki.certificateExtensionsToAsn1(cert.extensions));\n }\n\n return tbs;\n};\n\n/**\n * Gets the ASN.1 CertificationRequestInfo part of a\n * PKCS#10 CertificationRequest.\n *\n * @param csr the certification request.\n *\n * @return the asn1 CertificationRequestInfo.\n */\npki.getCertificationRequestInfo = function(csr) {\n // CertificationRequestInfo\n var cri = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // version\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,\n asn1.integerToDer(csr.version).getBytes()),\n // subject\n _dnToAsn1(csr.subject),\n // SubjectPublicKeyInfo\n pki.publicKeyToAsn1(csr.publicKey),\n // attributes\n _CRIAttributesToAsn1(csr)\n ]);\n\n return cri;\n};\n\n/**\n * Converts a DistinguishedName (subject or issuer) to an ASN.1 object.\n *\n * @param dn the DistinguishedName.\n *\n * @return the asn1 representation of a DistinguishedName.\n */\npki.distinguishedNameToAsn1 = function(dn) {\n return _dnToAsn1(dn);\n};\n\n/**\n * Converts an X.509v3 RSA certificate to an ASN.1 object.\n *\n * @param cert the certificate.\n *\n * @return the asn1 representation of an X.509v3 RSA certificate.\n */\npki.certificateToAsn1 = function(cert) {\n // prefer cached TBSCertificate over generating one\n var tbsCertificate = cert.tbsCertificate || pki.getTBSCertificate(cert);\n\n // Certificate\n return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // TBSCertificate\n tbsCertificate,\n // AlgorithmIdentifier (signature algorithm)\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // algorithm\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(cert.signatureOid).getBytes()),\n // parameters\n _signatureParametersToAsn1(cert.signatureOid, cert.signatureParameters)\n ]),\n // SignatureValue\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.BITSTRING, false,\n String.fromCharCode(0x00) + cert.signature)\n ]);\n};\n\n/**\n * Converts X.509v3 certificate extensions to ASN.1.\n *\n * @param exts the extensions to convert.\n *\n * @return the extensions in ASN.1 format.\n */\npki.certificateExtensionsToAsn1 = function(exts) {\n // create top-level extension container\n var rval = asn1.create(asn1.Class.CONTEXT_SPECIFIC, 3, true, []);\n\n // create extension sequence (stores a sequence for each extension)\n var seq = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, []);\n rval.value.push(seq);\n\n for(var i = 0; i < exts.length; ++i) {\n seq.value.push(pki.certificateExtensionToAsn1(exts[i]));\n }\n\n return rval;\n};\n\n/**\n * Converts a single certificate extension to ASN.1.\n *\n * @param ext the extension to convert.\n *\n * @return the extension in ASN.1 format.\n */\npki.certificateExtensionToAsn1 = function(ext) {\n // create a sequence for each extension\n var extseq = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, []);\n\n // extnID (OID)\n extseq.value.push(asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(ext.id).getBytes()));\n\n // critical defaults to false\n if(ext.critical) {\n // critical BOOLEAN DEFAULT FALSE\n extseq.value.push(asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.BOOLEAN, false,\n String.fromCharCode(0xFF)));\n }\n\n var value = ext.value;\n if(typeof ext.value !== 'string') {\n // value is asn.1\n value = asn1.toDer(value).getBytes();\n }\n\n // extnValue (OCTET STRING)\n extseq.value.push(asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, value));\n\n return extseq;\n};\n\n/**\n * Converts a PKCS#10 certification request to an ASN.1 object.\n *\n * @param csr the certification request.\n *\n * @return the asn1 representation of a certification request.\n */\npki.certificationRequestToAsn1 = function(csr) {\n // prefer cached CertificationRequestInfo over generating one\n var cri = csr.certificationRequestInfo ||\n pki.getCertificationRequestInfo(csr);\n\n // Certificate\n return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // CertificationRequestInfo\n cri,\n // AlgorithmIdentifier (signature algorithm)\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // algorithm\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(csr.signatureOid).getBytes()),\n // parameters\n _signatureParametersToAsn1(csr.signatureOid, csr.signatureParameters)\n ]),\n // signature\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.BITSTRING, false,\n String.fromCharCode(0x00) + csr.signature)\n ]);\n};\n\n/**\n * Creates a CA store.\n *\n * @param certs an optional array of certificate objects or PEM-formatted\n * certificate strings to add to the CA store.\n *\n * @return the CA store.\n */\npki.createCaStore = function(certs) {\n // create CA store\n var caStore = {\n // stored certificates\n certs: {}\n };\n\n /**\n * Gets the certificate that issued the passed certificate or its\n * 'parent'.\n *\n * @param cert the certificate to get the parent for.\n *\n * @return the parent certificate or null if none was found.\n */\n caStore.getIssuer = function(cert) {\n var rval = getBySubject(cert.issuer);\n\n // see if there are multiple matches\n /*if(forge.util.isArray(rval)) {\n // TODO: resolve multiple matches by checking\n // authorityKey/subjectKey/issuerUniqueID/other identifiers, etc.\n // FIXME: or alternatively do authority key mapping\n // if possible (X.509v1 certs can't work?)\n throw new Error('Resolving multiple issuer matches not implemented yet.');\n }*/\n\n return rval;\n };\n\n /**\n * Adds a trusted certificate to the store.\n *\n * @param cert the certificate to add as a trusted certificate (either a\n * pki.certificate object or a PEM-formatted certificate).\n */\n caStore.addCertificate = function(cert) {\n // convert from pem if necessary\n if(typeof cert === 'string') {\n cert = forge.pki.certificateFromPem(cert);\n }\n\n ensureSubjectHasHash(cert.subject);\n\n if(!caStore.hasCertificate(cert)) { // avoid duplicate certificates in store\n if(cert.subject.hash in caStore.certs) {\n // subject hash already exists, append to array\n var tmp = caStore.certs[cert.subject.hash];\n if(!forge.util.isArray(tmp)) {\n tmp = [tmp];\n }\n tmp.push(cert);\n caStore.certs[cert.subject.hash] = tmp;\n } else {\n caStore.certs[cert.subject.hash] = cert;\n }\n }\n };\n\n /**\n * Checks to see if the given certificate is in the store.\n *\n * @param cert the certificate to check (either a pki.certificate or a\n * PEM-formatted certificate).\n *\n * @return true if the certificate is in the store, false if not.\n */\n caStore.hasCertificate = function(cert) {\n // convert from pem if necessary\n if(typeof cert === 'string') {\n cert = forge.pki.certificateFromPem(cert);\n }\n\n var match = getBySubject(cert.subject);\n if(!match) {\n return false;\n }\n if(!forge.util.isArray(match)) {\n match = [match];\n }\n // compare DER-encoding of certificates\n var der1 = asn1.toDer(pki.certificateToAsn1(cert)).getBytes();\n for(var i = 0; i < match.length; ++i) {\n var der2 = asn1.toDer(pki.certificateToAsn1(match[i])).getBytes();\n if(der1 === der2) {\n return true;\n }\n }\n return false;\n };\n\n /**\n * Lists all of the certificates kept in the store.\n *\n * @return an array of all of the pki.certificate objects in the store.\n */\n caStore.listAllCertificates = function() {\n var certList = [];\n\n for(var hash in caStore.certs) {\n if(caStore.certs.hasOwnProperty(hash)) {\n var value = caStore.certs[hash];\n if(!forge.util.isArray(value)) {\n certList.push(value);\n } else {\n for(var i = 0; i < value.length; ++i) {\n certList.push(value[i]);\n }\n }\n }\n }\n\n return certList;\n };\n\n /**\n * Removes a certificate from the store.\n *\n * @param cert the certificate to remove (either a pki.certificate or a\n * PEM-formatted certificate).\n *\n * @return the certificate that was removed or null if the certificate\n * wasn't in store.\n */\n caStore.removeCertificate = function(cert) {\n var result;\n\n // convert from pem if necessary\n if(typeof cert === 'string') {\n cert = forge.pki.certificateFromPem(cert);\n }\n ensureSubjectHasHash(cert.subject);\n if(!caStore.hasCertificate(cert)) {\n return null;\n }\n\n var match = getBySubject(cert.subject);\n\n if(!forge.util.isArray(match)) {\n result = caStore.certs[cert.subject.hash];\n delete caStore.certs[cert.subject.hash];\n return result;\n }\n\n // compare DER-encoding of certificates\n var der1 = asn1.toDer(pki.certificateToAsn1(cert)).getBytes();\n for(var i = 0; i < match.length; ++i) {\n var der2 = asn1.toDer(pki.certificateToAsn1(match[i])).getBytes();\n if(der1 === der2) {\n result = match[i];\n match.splice(i, 1);\n }\n }\n if(match.length === 0) {\n delete caStore.certs[cert.subject.hash];\n }\n\n return result;\n };\n\n function getBySubject(subject) {\n ensureSubjectHasHash(subject);\n return caStore.certs[subject.hash] || null;\n }\n\n function ensureSubjectHasHash(subject) {\n // produce subject hash if it doesn't exist\n if(!subject.hash) {\n var md = forge.md.sha1.create();\n subject.attributes = pki.RDNAttributesAsArray(_dnToAsn1(subject), md);\n subject.hash = md.digest().toHex();\n }\n }\n\n // auto-add passed in certs\n if(certs) {\n // parse PEM-formatted certificates as necessary\n for(var i = 0; i < certs.length; ++i) {\n var cert = certs[i];\n caStore.addCertificate(cert);\n }\n }\n\n return caStore;\n};\n\n/**\n * Certificate verification errors, based on TLS.\n */\npki.certificateError = {\n bad_certificate: 'forge.pki.BadCertificate',\n unsupported_certificate: 'forge.pki.UnsupportedCertificate',\n certificate_revoked: 'forge.pki.CertificateRevoked',\n certificate_expired: 'forge.pki.CertificateExpired',\n certificate_unknown: 'forge.pki.CertificateUnknown',\n unknown_ca: 'forge.pki.UnknownCertificateAuthority'\n};\n\n/**\n * Verifies a certificate chain against the given Certificate Authority store\n * with an optional custom verify callback.\n *\n * @param caStore a certificate store to verify against.\n * @param chain the certificate chain to verify, with the root or highest\n * authority at the end (an array of certificates).\n * @param options a callback to be called for every certificate in the chain or\n * an object with:\n * verify a callback to be called for every certificate in the\n * chain\n * validityCheckDate the date against which the certificate\n * validity period should be checked. Pass null to not check\n * the validity period. By default, the current date is used.\n *\n * The verify callback has the following signature:\n *\n * verified - Set to true if certificate was verified, otherwise the\n * pki.certificateError for why the certificate failed.\n * depth - The current index in the chain, where 0 is the end point's cert.\n * certs - The certificate chain, *NOTE* an empty chain indicates an anonymous\n * end point.\n *\n * The function returns true on success and on failure either the appropriate\n * pki.certificateError or an object with 'error' set to the appropriate\n * pki.certificateError and 'message' set to a custom error message.\n *\n * @return true if successful, error thrown if not.\n */\npki.verifyCertificateChain = function(caStore, chain, options) {\n /* From: RFC3280 - Internet X.509 Public Key Infrastructure Certificate\n Section 6: Certification Path Validation\n See inline parentheticals related to this particular implementation.\n\n The primary goal of path validation is to verify the binding between\n a subject distinguished name or a subject alternative name and subject\n public key, as represented in the end entity certificate, based on the\n public key of the trust anchor. This requires obtaining a sequence of\n certificates that support that binding. That sequence should be provided\n in the passed 'chain'. The trust anchor should be in the given CA\n store. The 'end entity' certificate is the certificate provided by the\n end point (typically a server) and is the first in the chain.\n\n To meet this goal, the path validation process verifies, among other\n things, that a prospective certification path (a sequence of n\n certificates or a 'chain') satisfies the following conditions:\n\n (a) for all x in {1, ..., n-1}, the subject of certificate x is\n the issuer of certificate x+1;\n\n (b) certificate 1 is issued by the trust anchor;\n\n (c) certificate n is the certificate to be validated; and\n\n (d) for all x in {1, ..., n}, the certificate was valid at the\n time in question.\n\n Note that here 'n' is index 0 in the chain and 1 is the last certificate\n in the chain and it must be signed by a certificate in the connection's\n CA store.\n\n The path validation process also determines the set of certificate\n policies that are valid for this path, based on the certificate policies\n extension, policy mapping extension, policy constraints extension, and\n inhibit any-policy extension.\n\n Note: Policy mapping extension not supported (Not Required).\n\n Note: If the certificate has an unsupported critical extension, then it\n must be rejected.\n\n Note: A certificate is self-issued if the DNs that appear in the subject\n and issuer fields are identical and are not empty.\n\n The path validation algorithm assumes the following seven inputs are\n provided to the path processing logic. What this specific implementation\n will use is provided parenthetically:\n\n (a) a prospective certification path of length n (the 'chain')\n (b) the current date/time: ('now').\n (c) user-initial-policy-set: A set of certificate policy identifiers\n naming the policies that are acceptable to the certificate user.\n The user-initial-policy-set contains the special value any-policy\n if the user is not concerned about certificate policy\n (Not implemented. Any policy is accepted).\n (d) trust anchor information, describing a CA that serves as a trust\n anchor for the certification path. The trust anchor information\n includes:\n\n (1) the trusted issuer name,\n (2) the trusted public key algorithm,\n (3) the trusted public key, and\n (4) optionally, the trusted public key parameters associated\n with the public key.\n\n (Trust anchors are provided via certificates in the CA store).\n\n The trust anchor information may be provided to the path processing\n procedure in the form of a self-signed certificate. The trusted anchor\n information is trusted because it was delivered to the path processing\n procedure by some trustworthy out-of-band procedure. If the trusted\n public key algorithm requires parameters, then the parameters are\n provided along with the trusted public key (No parameters used in this\n implementation).\n\n (e) initial-policy-mapping-inhibit, which indicates if policy mapping is\n allowed in the certification path.\n (Not implemented, no policy checking)\n\n (f) initial-explicit-policy, which indicates if the path must be valid\n for at least one of the certificate policies in the user-initial-\n policy-set.\n (Not implemented, no policy checking)\n\n (g) initial-any-policy-inhibit, which indicates whether the\n anyPolicy OID should be processed if it is included in a\n certificate.\n (Not implemented, so any policy is valid provided that it is\n not marked as critical) */\n\n /* Basic Path Processing:\n\n For each certificate in the 'chain', the following is checked:\n\n 1. The certificate validity period includes the current time.\n 2. The certificate was signed by its parent (where the parent is either\n the next in the chain or from the CA store). Allow processing to\n continue to the next step if no parent is found but the certificate is\n in the CA store.\n 3. TODO: The certificate has not been revoked.\n 4. The certificate issuer name matches the parent's subject name.\n 5. TODO: If the certificate is self-issued and not the final certificate\n in the chain, skip this step, otherwise verify that the subject name\n is within one of the permitted subtrees of X.500 distinguished names\n and that each of the alternative names in the subjectAltName extension\n (critical or non-critical) is within one of the permitted subtrees for\n that name type.\n 6. TODO: If the certificate is self-issued and not the final certificate\n in the chain, skip this step, otherwise verify that the subject name\n is not within one of the excluded subtrees for X.500 distinguished\n names and none of the subjectAltName extension names are excluded for\n that name type.\n 7. The other steps in the algorithm for basic path processing involve\n handling the policy extension which is not presently supported in this\n implementation. Instead, if a critical policy extension is found, the\n certificate is rejected as not supported.\n 8. If the certificate is not the first or if its the only certificate in\n the chain (having no parent from the CA store or is self-signed) and it\n has a critical key usage extension, verify that the keyCertSign bit is\n set. If the key usage extension exists, verify that the basic\n constraints extension exists. If the basic constraints extension exists,\n verify that the cA flag is set. If pathLenConstraint is set, ensure that\n the number of certificates that precede in the chain (come earlier\n in the chain as implemented below), excluding the very first in the\n chain (typically the end-entity one), isn't greater than the\n pathLenConstraint. This constraint limits the number of intermediate\n CAs that may appear below a CA before only end-entity certificates\n may be issued. */\n\n // if a verify callback is passed as the third parameter, package it within\n // the options object. This is to support a legacy function signature that\n // expected the verify callback as the third parameter.\n if(typeof options === 'function') {\n options = {verify: options};\n }\n options = options || {};\n\n // copy cert chain references to another array to protect against changes\n // in verify callback\n chain = chain.slice(0);\n var certs = chain.slice(0);\n\n var validityCheckDate = options.validityCheckDate;\n // if no validityCheckDate is specified, default to the current date. Make\n // sure to maintain the value null because it indicates that the validity\n // period should not be checked.\n if(typeof validityCheckDate === 'undefined') {\n validityCheckDate = new Date();\n }\n\n // verify each cert in the chain using its parent, where the parent\n // is either the next in the chain or from the CA store\n var first = true;\n var error = null;\n var depth = 0;\n do {\n var cert = chain.shift();\n var parent = null;\n var selfSigned = false;\n\n if(validityCheckDate) {\n // 1. check valid time\n if(validityCheckDate < cert.validity.notBefore ||\n validityCheckDate > cert.validity.notAfter) {\n error = {\n message: 'Certificate is not valid yet or has expired.',\n error: pki.certificateError.certificate_expired,\n notBefore: cert.validity.notBefore,\n notAfter: cert.validity.notAfter,\n // TODO: we might want to reconsider renaming 'now' to\n // 'validityCheckDate' should this API be changed in the future.\n now: validityCheckDate\n };\n }\n }\n\n // 2. verify with parent from chain or CA store\n if(error === null) {\n parent = chain[0] || caStore.getIssuer(cert);\n if(parent === null) {\n // check for self-signed cert\n if(cert.isIssuer(cert)) {\n selfSigned = true;\n parent = cert;\n }\n }\n\n if(parent) {\n // FIXME: current CA store implementation might have multiple\n // certificates where the issuer can't be determined from the\n // certificate (happens rarely with, eg: old certificates) so normalize\n // by always putting parents into an array\n // TODO: there's may be an extreme degenerate case currently uncovered\n // where an old intermediate certificate seems to have a matching parent\n // but none of the parents actually verify ... but the intermediate\n // is in the CA and it should pass this check; needs investigation\n var parents = parent;\n if(!forge.util.isArray(parents)) {\n parents = [parents];\n }\n\n // try to verify with each possible parent (typically only one)\n var verified = false;\n while(!verified && parents.length > 0) {\n parent = parents.shift();\n try {\n verified = parent.verify(cert);\n } catch(ex) {\n // failure to verify, don't care why, try next one\n }\n }\n\n if(!verified) {\n error = {\n message: 'Certificate signature is invalid.',\n error: pki.certificateError.bad_certificate\n };\n }\n }\n\n if(error === null && (!parent || selfSigned) &&\n !caStore.hasCertificate(cert)) {\n // no parent issuer and certificate itself is not trusted\n error = {\n message: 'Certificate is not trusted.',\n error: pki.certificateError.unknown_ca\n };\n }\n }\n\n // TODO: 3. check revoked\n\n // 4. check for matching issuer/subject\n if(error === null && parent && !cert.isIssuer(parent)) {\n // parent is not issuer\n error = {\n message: 'Certificate issuer is invalid.',\n error: pki.certificateError.bad_certificate\n };\n }\n\n // 5. TODO: check names with permitted names tree\n\n // 6. TODO: check names against excluded names tree\n\n // 7. check for unsupported critical extensions\n if(error === null) {\n // supported extensions\n var se = {\n keyUsage: true,\n basicConstraints: true\n };\n for(var i = 0; error === null && i < cert.extensions.length; ++i) {\n var ext = cert.extensions[i];\n if(ext.critical && !(ext.name in se)) {\n error = {\n message:\n 'Certificate has an unsupported critical extension.',\n error: pki.certificateError.unsupported_certificate\n };\n }\n }\n }\n\n // 8. check for CA if cert is not first or is the only certificate\n // remaining in chain with no parent or is self-signed\n if(error === null &&\n (!first || (chain.length === 0 && (!parent || selfSigned)))) {\n // first check keyUsage extension and then basic constraints\n var bcExt = cert.getExtension('basicConstraints');\n var keyUsageExt = cert.getExtension('keyUsage');\n if(keyUsageExt !== null) {\n // keyCertSign must be true and there must be a basic\n // constraints extension\n if(!keyUsageExt.keyCertSign || bcExt === null) {\n // bad certificate\n error = {\n message:\n 'Certificate keyUsage or basicConstraints conflict ' +\n 'or indicate that the certificate is not a CA. ' +\n 'If the certificate is the only one in the chain or ' +\n 'isn\\'t the first then the certificate must be a ' +\n 'valid CA.',\n error: pki.certificateError.bad_certificate\n };\n }\n }\n // basic constraints cA flag must be set\n if(error === null && bcExt !== null && !bcExt.cA) {\n // bad certificate\n error = {\n message:\n 'Certificate basicConstraints indicates the certificate ' +\n 'is not a CA.',\n error: pki.certificateError.bad_certificate\n };\n }\n // if error is not null and keyUsage is available, then we know it\n // has keyCertSign and there is a basic constraints extension too,\n // which means we can check pathLenConstraint (if it exists)\n if(error === null && keyUsageExt !== null &&\n 'pathLenConstraint' in bcExt) {\n // pathLen is the maximum # of intermediate CA certs that can be\n // found between the current certificate and the end-entity (depth 0)\n // certificate; this number does not include the end-entity (depth 0,\n // last in the chain) even if it happens to be a CA certificate itself\n var pathLen = depth - 1;\n if(pathLen > bcExt.pathLenConstraint) {\n // pathLenConstraint violated, bad certificate\n error = {\n message:\n 'Certificate basicConstraints pathLenConstraint violated.',\n error: pki.certificateError.bad_certificate\n };\n }\n }\n }\n\n // call application callback\n var vfd = (error === null) ? true : error.error;\n var ret = options.verify ? options.verify(vfd, depth, certs) : vfd;\n if(ret === true) {\n // clear any set error\n error = null;\n } else {\n // if passed basic tests, set default message and alert\n if(vfd === true) {\n error = {\n message: 'The application rejected the certificate.',\n error: pki.certificateError.bad_certificate\n };\n }\n\n // check for custom error info\n if(ret || ret === 0) {\n // set custom message and error\n if(typeof ret === 'object' && !forge.util.isArray(ret)) {\n if(ret.message) {\n error.message = ret.message;\n }\n if(ret.error) {\n error.error = ret.error;\n }\n } else if(typeof ret === 'string') {\n // set custom error\n error.error = ret;\n }\n }\n\n // throw error\n throw error;\n }\n\n // no longer first cert in chain\n first = false;\n ++depth;\n } while(chain.length > 0);\n\n return true;\n};\n","/**\n * Javascript implementation of PKCS#12.\n *\n * @author Dave Longley\n * @author Stefan Siegl \n *\n * Copyright (c) 2010-2014 Digital Bazaar, Inc.\n * Copyright (c) 2012 Stefan Siegl \n *\n * The ASN.1 representation of PKCS#12 is as follows\n * (see ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-12/pkcs-12-tc1.pdf for details)\n *\n * PFX ::= SEQUENCE {\n * version INTEGER {v3(3)}(v3,...),\n * authSafe ContentInfo,\n * macData MacData OPTIONAL\n * }\n *\n * MacData ::= SEQUENCE {\n * mac DigestInfo,\n * macSalt OCTET STRING,\n * iterations INTEGER DEFAULT 1\n * }\n * Note: The iterations default is for historical reasons and its use is\n * deprecated. A higher value, like 1024, is recommended.\n *\n * DigestInfo is defined in PKCS#7 as follows:\n *\n * DigestInfo ::= SEQUENCE {\n * digestAlgorithm DigestAlgorithmIdentifier,\n * digest Digest\n * }\n *\n * DigestAlgorithmIdentifier ::= AlgorithmIdentifier\n *\n * The AlgorithmIdentifier contains an Object Identifier (OID) and parameters\n * for the algorithm, if any. In the case of SHA1 there is none.\n *\n * AlgorithmIdentifer ::= SEQUENCE {\n * algorithm OBJECT IDENTIFIER,\n * parameters ANY DEFINED BY algorithm OPTIONAL\n * }\n *\n * Digest ::= OCTET STRING\n *\n *\n * ContentInfo ::= SEQUENCE {\n * contentType ContentType,\n * content [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL\n * }\n *\n * ContentType ::= OBJECT IDENTIFIER\n *\n * AuthenticatedSafe ::= SEQUENCE OF ContentInfo\n * -- Data if unencrypted\n * -- EncryptedData if password-encrypted\n * -- EnvelopedData if public key-encrypted\n *\n *\n * SafeContents ::= SEQUENCE OF SafeBag\n *\n * SafeBag ::= SEQUENCE {\n * bagId BAG-TYPE.&id ({PKCS12BagSet})\n * bagValue [0] EXPLICIT BAG-TYPE.&Type({PKCS12BagSet}{@bagId}),\n * bagAttributes SET OF PKCS12Attribute OPTIONAL\n * }\n *\n * PKCS12Attribute ::= SEQUENCE {\n * attrId ATTRIBUTE.&id ({PKCS12AttrSet}),\n * attrValues SET OF ATTRIBUTE.&Type ({PKCS12AttrSet}{@attrId})\n * } -- This type is compatible with the X.500 type 'Attribute'\n *\n * PKCS12AttrSet ATTRIBUTE ::= {\n * friendlyName | -- from PKCS #9\n * localKeyId, -- from PKCS #9\n * ... -- Other attributes are allowed\n * }\n *\n * CertBag ::= SEQUENCE {\n * certId BAG-TYPE.&id ({CertTypes}),\n * certValue [0] EXPLICIT BAG-TYPE.&Type ({CertTypes}{@certId})\n * }\n *\n * x509Certificate BAG-TYPE ::= {OCTET STRING IDENTIFIED BY {certTypes 1}}\n * -- DER-encoded X.509 certificate stored in OCTET STRING\n *\n * sdsiCertificate BAG-TYPE ::= {IA5String IDENTIFIED BY {certTypes 2}}\n * -- Base64-encoded SDSI certificate stored in IA5String\n *\n * CertTypes BAG-TYPE ::= {\n * x509Certificate |\n * sdsiCertificate,\n * ... -- For future extensions\n * }\n */\nvar forge = require('./forge');\nrequire('./asn1');\nrequire('./hmac');\nrequire('./oids');\nrequire('./pkcs7asn1');\nrequire('./pbe');\nrequire('./random');\nrequire('./rsa');\nrequire('./sha1');\nrequire('./util');\nrequire('./x509');\n\n// shortcut for asn.1 & PKI API\nvar asn1 = forge.asn1;\nvar pki = forge.pki;\n\n// shortcut for PKCS#12 API\nvar p12 = module.exports = forge.pkcs12 = forge.pkcs12 || {};\n\nvar contentInfoValidator = {\n name: 'ContentInfo',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE, // a ContentInfo\n constructed: true,\n value: [{\n name: 'ContentInfo.contentType',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OID,\n constructed: false,\n capture: 'contentType'\n }, {\n name: 'ContentInfo.content',\n tagClass: asn1.Class.CONTEXT_SPECIFIC,\n constructed: true,\n captureAsn1: 'content'\n }]\n};\n\nvar pfxValidator = {\n name: 'PFX',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'PFX.version',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.INTEGER,\n constructed: false,\n capture: 'version'\n },\n contentInfoValidator, {\n name: 'PFX.macData',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n optional: true,\n captureAsn1: 'mac',\n value: [{\n name: 'PFX.macData.mac',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE, // DigestInfo\n constructed: true,\n value: [{\n name: 'PFX.macData.mac.digestAlgorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE, // DigestAlgorithmIdentifier\n constructed: true,\n value: [{\n name: 'PFX.macData.mac.digestAlgorithm.algorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OID,\n constructed: false,\n capture: 'macAlgorithm'\n }, {\n name: 'PFX.macData.mac.digestAlgorithm.parameters',\n tagClass: asn1.Class.UNIVERSAL,\n captureAsn1: 'macAlgorithmParameters'\n }]\n }, {\n name: 'PFX.macData.mac.digest',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OCTETSTRING,\n constructed: false,\n capture: 'macDigest'\n }]\n }, {\n name: 'PFX.macData.macSalt',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OCTETSTRING,\n constructed: false,\n capture: 'macSalt'\n }, {\n name: 'PFX.macData.iterations',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.INTEGER,\n constructed: false,\n optional: true,\n capture: 'macIterations'\n }]\n }]\n};\n\nvar safeBagValidator = {\n name: 'SafeBag',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'SafeBag.bagId',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OID,\n constructed: false,\n capture: 'bagId'\n }, {\n name: 'SafeBag.bagValue',\n tagClass: asn1.Class.CONTEXT_SPECIFIC,\n constructed: true,\n captureAsn1: 'bagValue'\n }, {\n name: 'SafeBag.bagAttributes',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SET,\n constructed: true,\n optional: true,\n capture: 'bagAttributes'\n }]\n};\n\nvar attributeValidator = {\n name: 'Attribute',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'Attribute.attrId',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OID,\n constructed: false,\n capture: 'oid'\n }, {\n name: 'Attribute.attrValues',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SET,\n constructed: true,\n capture: 'values'\n }]\n};\n\nvar certBagValidator = {\n name: 'CertBag',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'CertBag.certId',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OID,\n constructed: false,\n capture: 'certId'\n }, {\n name: 'CertBag.certValue',\n tagClass: asn1.Class.CONTEXT_SPECIFIC,\n constructed: true,\n /* So far we only support X.509 certificates (which are wrapped in\n an OCTET STRING, hence hard code that here). */\n value: [{\n name: 'CertBag.certValue[0]',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Class.OCTETSTRING,\n constructed: false,\n capture: 'cert'\n }]\n }]\n};\n\n/**\n * Search SafeContents structure for bags with matching attributes.\n *\n * The search can optionally be narrowed by a certain bag type.\n *\n * @param safeContents the SafeContents structure to search in.\n * @param attrName the name of the attribute to compare against.\n * @param attrValue the attribute value to search for.\n * @param [bagType] bag type to narrow search by.\n *\n * @return an array of matching bags.\n */\nfunction _getBagsByAttribute(safeContents, attrName, attrValue, bagType) {\n var result = [];\n\n for(var i = 0; i < safeContents.length; i++) {\n for(var j = 0; j < safeContents[i].safeBags.length; j++) {\n var bag = safeContents[i].safeBags[j];\n if(bagType !== undefined && bag.type !== bagType) {\n continue;\n }\n // only filter by bag type, no attribute specified\n if(attrName === null) {\n result.push(bag);\n continue;\n }\n if(bag.attributes[attrName] !== undefined &&\n bag.attributes[attrName].indexOf(attrValue) >= 0) {\n result.push(bag);\n }\n }\n }\n\n return result;\n}\n\n/**\n * Converts a PKCS#12 PFX in ASN.1 notation into a PFX object.\n *\n * @param obj The PKCS#12 PFX in ASN.1 notation.\n * @param strict true to use strict DER decoding, false not to (default: true).\n * @param {String} password Password to decrypt with (optional).\n *\n * @return PKCS#12 PFX object.\n */\np12.pkcs12FromAsn1 = function(obj, strict, password) {\n // handle args\n if(typeof strict === 'string') {\n password = strict;\n strict = true;\n } else if(strict === undefined) {\n strict = true;\n }\n\n // validate PFX and capture data\n var capture = {};\n var errors = [];\n if(!asn1.validate(obj, pfxValidator, capture, errors)) {\n var error = new Error('Cannot read PKCS#12 PFX. ' +\n 'ASN.1 object is not an PKCS#12 PFX.');\n error.errors = error;\n throw error;\n }\n\n var pfx = {\n version: capture.version.charCodeAt(0),\n safeContents: [],\n\n /**\n * Gets bags with matching attributes.\n *\n * @param filter the attributes to filter by:\n * [localKeyId] the localKeyId to search for.\n * [localKeyIdHex] the localKeyId in hex to search for.\n * [friendlyName] the friendly name to search for.\n * [bagType] bag type to narrow each attribute search by.\n *\n * @return a map of attribute type to an array of matching bags or, if no\n * attribute was given but a bag type, the map key will be the\n * bag type.\n */\n getBags: function(filter) {\n var rval = {};\n\n var localKeyId;\n if('localKeyId' in filter) {\n localKeyId = filter.localKeyId;\n } else if('localKeyIdHex' in filter) {\n localKeyId = forge.util.hexToBytes(filter.localKeyIdHex);\n }\n\n // filter on bagType only\n if(localKeyId === undefined && !('friendlyName' in filter) &&\n 'bagType' in filter) {\n rval[filter.bagType] = _getBagsByAttribute(\n pfx.safeContents, null, null, filter.bagType);\n }\n\n if(localKeyId !== undefined) {\n rval.localKeyId = _getBagsByAttribute(\n pfx.safeContents, 'localKeyId',\n localKeyId, filter.bagType);\n }\n if('friendlyName' in filter) {\n rval.friendlyName = _getBagsByAttribute(\n pfx.safeContents, 'friendlyName',\n filter.friendlyName, filter.bagType);\n }\n\n return rval;\n },\n\n /**\n * DEPRECATED: use getBags() instead.\n *\n * Get bags with matching friendlyName attribute.\n *\n * @param friendlyName the friendly name to search for.\n * @param [bagType] bag type to narrow search by.\n *\n * @return an array of bags with matching friendlyName attribute.\n */\n getBagsByFriendlyName: function(friendlyName, bagType) {\n return _getBagsByAttribute(\n pfx.safeContents, 'friendlyName', friendlyName, bagType);\n },\n\n /**\n * DEPRECATED: use getBags() instead.\n *\n * Get bags with matching localKeyId attribute.\n *\n * @param localKeyId the localKeyId to search for.\n * @param [bagType] bag type to narrow search by.\n *\n * @return an array of bags with matching localKeyId attribute.\n */\n getBagsByLocalKeyId: function(localKeyId, bagType) {\n return _getBagsByAttribute(\n pfx.safeContents, 'localKeyId', localKeyId, bagType);\n }\n };\n\n if(capture.version.charCodeAt(0) !== 3) {\n var error = new Error('PKCS#12 PFX of version other than 3 not supported.');\n error.version = capture.version.charCodeAt(0);\n throw error;\n }\n\n if(asn1.derToOid(capture.contentType) !== pki.oids.data) {\n var error = new Error('Only PKCS#12 PFX in password integrity mode supported.');\n error.oid = asn1.derToOid(capture.contentType);\n throw error;\n }\n\n var data = capture.content.value[0];\n if(data.tagClass !== asn1.Class.UNIVERSAL ||\n data.type !== asn1.Type.OCTETSTRING) {\n throw new Error('PKCS#12 authSafe content data is not an OCTET STRING.');\n }\n data = _decodePkcs7Data(data);\n\n // check for MAC\n if(capture.mac) {\n var md = null;\n var macKeyBytes = 0;\n var macAlgorithm = asn1.derToOid(capture.macAlgorithm);\n switch(macAlgorithm) {\n case pki.oids.sha1:\n md = forge.md.sha1.create();\n macKeyBytes = 20;\n break;\n case pki.oids.sha256:\n md = forge.md.sha256.create();\n macKeyBytes = 32;\n break;\n case pki.oids.sha384:\n md = forge.md.sha384.create();\n macKeyBytes = 48;\n break;\n case pki.oids.sha512:\n md = forge.md.sha512.create();\n macKeyBytes = 64;\n break;\n case pki.oids.md5:\n md = forge.md.md5.create();\n macKeyBytes = 16;\n break;\n }\n if(md === null) {\n throw new Error('PKCS#12 uses unsupported MAC algorithm: ' + macAlgorithm);\n }\n\n // verify MAC (iterations default to 1)\n var macSalt = new forge.util.ByteBuffer(capture.macSalt);\n var macIterations = (('macIterations' in capture) ?\n parseInt(forge.util.bytesToHex(capture.macIterations), 16) : 1);\n var macKey = p12.generateKey(\n password, macSalt, 3, macIterations, macKeyBytes, md);\n var mac = forge.hmac.create();\n mac.start(md, macKey);\n mac.update(data.value);\n var macValue = mac.getMac();\n if(macValue.getBytes() !== capture.macDigest) {\n throw new Error('PKCS#12 MAC could not be verified. Invalid password?');\n }\n }\n\n _decodeAuthenticatedSafe(pfx, data.value, strict, password);\n return pfx;\n};\n\n/**\n * Decodes PKCS#7 Data. PKCS#7 (RFC 2315) defines \"Data\" as an OCTET STRING,\n * but it is sometimes an OCTET STRING that is composed/constructed of chunks,\n * each its own OCTET STRING. This is BER-encoding vs. DER-encoding. This\n * function transforms this corner-case into the usual simple,\n * non-composed/constructed OCTET STRING.\n *\n * This function may be moved to ASN.1 at some point to better deal with\n * more BER-encoding issues, should they arise.\n *\n * @param data the ASN.1 Data object to transform.\n */\nfunction _decodePkcs7Data(data) {\n // handle special case of \"chunked\" data content: an octet string composed\n // of other octet strings\n if(data.composed || data.constructed) {\n var value = forge.util.createBuffer();\n for(var i = 0; i < data.value.length; ++i) {\n value.putBytes(data.value[i].value);\n }\n data.composed = data.constructed = false;\n data.value = value.getBytes();\n }\n return data;\n}\n\n/**\n * Decode PKCS#12 AuthenticatedSafe (BER encoded) into PFX object.\n *\n * The AuthenticatedSafe is a BER-encoded SEQUENCE OF ContentInfo.\n *\n * @param pfx The PKCS#12 PFX object to fill.\n * @param {String} authSafe BER-encoded AuthenticatedSafe.\n * @param strict true to use strict DER decoding, false not to.\n * @param {String} password Password to decrypt with (optional).\n */\nfunction _decodeAuthenticatedSafe(pfx, authSafe, strict, password) {\n authSafe = asn1.fromDer(authSafe, strict); /* actually it's BER encoded */\n\n if(authSafe.tagClass !== asn1.Class.UNIVERSAL ||\n authSafe.type !== asn1.Type.SEQUENCE ||\n authSafe.constructed !== true) {\n throw new Error('PKCS#12 AuthenticatedSafe expected to be a ' +\n 'SEQUENCE OF ContentInfo');\n }\n\n for(var i = 0; i < authSafe.value.length; i++) {\n var contentInfo = authSafe.value[i];\n\n // validate contentInfo and capture data\n var capture = {};\n var errors = [];\n if(!asn1.validate(contentInfo, contentInfoValidator, capture, errors)) {\n var error = new Error('Cannot read ContentInfo.');\n error.errors = errors;\n throw error;\n }\n\n var obj = {\n encrypted: false\n };\n var safeContents = null;\n var data = capture.content.value[0];\n switch(asn1.derToOid(capture.contentType)) {\n case pki.oids.data:\n if(data.tagClass !== asn1.Class.UNIVERSAL ||\n data.type !== asn1.Type.OCTETSTRING) {\n throw new Error('PKCS#12 SafeContents Data is not an OCTET STRING.');\n }\n safeContents = _decodePkcs7Data(data).value;\n break;\n case pki.oids.encryptedData:\n safeContents = _decryptSafeContents(data, password);\n obj.encrypted = true;\n break;\n default:\n var error = new Error('Unsupported PKCS#12 contentType.');\n error.contentType = asn1.derToOid(capture.contentType);\n throw error;\n }\n\n obj.safeBags = _decodeSafeContents(safeContents, strict, password);\n pfx.safeContents.push(obj);\n }\n}\n\n/**\n * Decrypt PKCS#7 EncryptedData structure.\n *\n * @param data ASN.1 encoded EncryptedContentInfo object.\n * @param password The user-provided password.\n *\n * @return The decrypted SafeContents (ASN.1 object).\n */\nfunction _decryptSafeContents(data, password) {\n var capture = {};\n var errors = [];\n if(!asn1.validate(\n data, forge.pkcs7.asn1.encryptedDataValidator, capture, errors)) {\n var error = new Error('Cannot read EncryptedContentInfo.');\n error.errors = errors;\n throw error;\n }\n\n var oid = asn1.derToOid(capture.contentType);\n if(oid !== pki.oids.data) {\n var error = new Error(\n 'PKCS#12 EncryptedContentInfo ContentType is not Data.');\n error.oid = oid;\n throw error;\n }\n\n // get cipher\n oid = asn1.derToOid(capture.encAlgorithm);\n var cipher = pki.pbe.getCipher(oid, capture.encParameter, password);\n\n // get encrypted data\n var encryptedContentAsn1 = _decodePkcs7Data(capture.encryptedContentAsn1);\n var encrypted = forge.util.createBuffer(encryptedContentAsn1.value);\n\n cipher.update(encrypted);\n if(!cipher.finish()) {\n throw new Error('Failed to decrypt PKCS#12 SafeContents.');\n }\n\n return cipher.output.getBytes();\n}\n\n/**\n * Decode PKCS#12 SafeContents (BER-encoded) into array of Bag objects.\n *\n * The safeContents is a BER-encoded SEQUENCE OF SafeBag.\n *\n * @param {String} safeContents BER-encoded safeContents.\n * @param strict true to use strict DER decoding, false not to.\n * @param {String} password Password to decrypt with (optional).\n *\n * @return {Array} Array of Bag objects.\n */\nfunction _decodeSafeContents(safeContents, strict, password) {\n // if strict and no safe contents, return empty safes\n if(!strict && safeContents.length === 0) {\n return [];\n }\n\n // actually it's BER-encoded\n safeContents = asn1.fromDer(safeContents, strict);\n\n if(safeContents.tagClass !== asn1.Class.UNIVERSAL ||\n safeContents.type !== asn1.Type.SEQUENCE ||\n safeContents.constructed !== true) {\n throw new Error(\n 'PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.');\n }\n\n var res = [];\n for(var i = 0; i < safeContents.value.length; i++) {\n var safeBag = safeContents.value[i];\n\n // validate SafeBag and capture data\n var capture = {};\n var errors = [];\n if(!asn1.validate(safeBag, safeBagValidator, capture, errors)) {\n var error = new Error('Cannot read SafeBag.');\n error.errors = errors;\n throw error;\n }\n\n /* Create bag object and push to result array. */\n var bag = {\n type: asn1.derToOid(capture.bagId),\n attributes: _decodeBagAttributes(capture.bagAttributes)\n };\n res.push(bag);\n\n var validator, decoder;\n var bagAsn1 = capture.bagValue.value[0];\n switch(bag.type) {\n case pki.oids.pkcs8ShroudedKeyBag:\n /* bagAsn1 has a EncryptedPrivateKeyInfo, which we need to decrypt.\n Afterwards we can handle it like a keyBag,\n which is a PrivateKeyInfo. */\n bagAsn1 = pki.decryptPrivateKeyInfo(bagAsn1, password);\n if(bagAsn1 === null) {\n throw new Error(\n 'Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?');\n }\n\n /* fall through */\n case pki.oids.keyBag:\n /* A PKCS#12 keyBag is a simple PrivateKeyInfo as understood by our\n PKI module, hence we don't have to do validation/capturing here,\n just pass what we already got. */\n try {\n bag.key = pki.privateKeyFromAsn1(bagAsn1);\n } catch(e) {\n // ignore unknown key type, pass asn1 value\n bag.key = null;\n bag.asn1 = bagAsn1;\n }\n continue; /* Nothing more to do. */\n\n case pki.oids.certBag:\n /* A PKCS#12 certBag can wrap both X.509 and sdsi certificates.\n Therefore put the SafeBag content through another validator to\n capture the fields. Afterwards check & store the results. */\n validator = certBagValidator;\n decoder = function() {\n if(asn1.derToOid(capture.certId) !== pki.oids.x509Certificate) {\n var error = new Error(\n 'Unsupported certificate type, only X.509 supported.');\n error.oid = asn1.derToOid(capture.certId);\n throw error;\n }\n\n // true=produce cert hash\n var certAsn1 = asn1.fromDer(capture.cert, strict);\n try {\n bag.cert = pki.certificateFromAsn1(certAsn1, true);\n } catch(e) {\n // ignore unknown cert type, pass asn1 value\n bag.cert = null;\n bag.asn1 = certAsn1;\n }\n };\n break;\n\n default:\n var error = new Error('Unsupported PKCS#12 SafeBag type.');\n error.oid = bag.type;\n throw error;\n }\n\n /* Validate SafeBag value (i.e. CertBag, etc.) and capture data if needed. */\n if(validator !== undefined &&\n !asn1.validate(bagAsn1, validator, capture, errors)) {\n var error = new Error('Cannot read PKCS#12 ' + validator.name);\n error.errors = errors;\n throw error;\n }\n\n /* Call decoder function from above to store the results. */\n decoder();\n }\n\n return res;\n}\n\n/**\n * Decode PKCS#12 SET OF PKCS12Attribute into JavaScript object.\n *\n * @param attributes SET OF PKCS12Attribute (ASN.1 object).\n *\n * @return the decoded attributes.\n */\nfunction _decodeBagAttributes(attributes) {\n var decodedAttrs = {};\n\n if(attributes !== undefined) {\n for(var i = 0; i < attributes.length; ++i) {\n var capture = {};\n var errors = [];\n if(!asn1.validate(attributes[i], attributeValidator, capture, errors)) {\n var error = new Error('Cannot read PKCS#12 BagAttribute.');\n error.errors = errors;\n throw error;\n }\n\n var oid = asn1.derToOid(capture.oid);\n if(pki.oids[oid] === undefined) {\n // unsupported attribute type, ignore.\n continue;\n }\n\n decodedAttrs[pki.oids[oid]] = [];\n for(var j = 0; j < capture.values.length; ++j) {\n decodedAttrs[pki.oids[oid]].push(capture.values[j].value);\n }\n }\n }\n\n return decodedAttrs;\n}\n\n/**\n * Wraps a private key and certificate in a PKCS#12 PFX wrapper. If a\n * password is provided then the private key will be encrypted.\n *\n * An entire certificate chain may also be included. To do this, pass\n * an array for the \"cert\" parameter where the first certificate is\n * the one that is paired with the private key and each subsequent one\n * verifies the previous one. The certificates may be in PEM format or\n * have been already parsed by Forge.\n *\n * @todo implement password-based-encryption for the whole package\n *\n * @param key the private key.\n * @param cert the certificate (may be an array of certificates in order\n * to specify a certificate chain).\n * @param password the password to use, null for none.\n * @param options:\n * algorithm the encryption algorithm to use\n * ('aes128', 'aes192', 'aes256', '3des'), defaults to 'aes128'.\n * count the iteration count to use.\n * saltSize the salt size to use.\n * useMac true to include a MAC, false not to, defaults to true.\n * localKeyId the local key ID to use, in hex.\n * friendlyName the friendly name to use.\n * generateLocalKeyId true to generate a random local key ID,\n * false not to, defaults to true.\n *\n * @return the PKCS#12 PFX ASN.1 object.\n */\np12.toPkcs12Asn1 = function(key, cert, password, options) {\n // set default options\n options = options || {};\n options.saltSize = options.saltSize || 8;\n options.count = options.count || 2048;\n options.algorithm = options.algorithm || options.encAlgorithm || 'aes128';\n if(!('useMac' in options)) {\n options.useMac = true;\n }\n if(!('localKeyId' in options)) {\n options.localKeyId = null;\n }\n if(!('generateLocalKeyId' in options)) {\n options.generateLocalKeyId = true;\n }\n\n var localKeyId = options.localKeyId;\n var bagAttrs;\n if(localKeyId !== null) {\n localKeyId = forge.util.hexToBytes(localKeyId);\n } else if(options.generateLocalKeyId) {\n // use SHA-1 of paired cert, if available\n if(cert) {\n var pairedCert = forge.util.isArray(cert) ? cert[0] : cert;\n if(typeof pairedCert === 'string') {\n pairedCert = pki.certificateFromPem(pairedCert);\n }\n var sha1 = forge.md.sha1.create();\n sha1.update(asn1.toDer(pki.certificateToAsn1(pairedCert)).getBytes());\n localKeyId = sha1.digest().getBytes();\n } else {\n // FIXME: consider using SHA-1 of public key (which can be generated\n // from private key components), see: cert.generateSubjectKeyIdentifier\n // generate random bytes\n localKeyId = forge.random.getBytes(20);\n }\n }\n\n var attrs = [];\n if(localKeyId !== null) {\n attrs.push(\n // localKeyID\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // attrId\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(pki.oids.localKeyId).getBytes()),\n // attrValues\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SET, true, [\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false,\n localKeyId)\n ])\n ]));\n }\n if('friendlyName' in options) {\n attrs.push(\n // friendlyName\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // attrId\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(pki.oids.friendlyName).getBytes()),\n // attrValues\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SET, true, [\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.BMPSTRING, false,\n options.friendlyName)\n ])\n ]));\n }\n\n if(attrs.length > 0) {\n bagAttrs = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SET, true, attrs);\n }\n\n // collect contents for AuthenticatedSafe\n var contents = [];\n\n // create safe bag(s) for certificate chain\n var chain = [];\n if(cert !== null) {\n if(forge.util.isArray(cert)) {\n chain = cert;\n } else {\n chain = [cert];\n }\n }\n\n var certSafeBags = [];\n for(var i = 0; i < chain.length; ++i) {\n // convert cert from PEM as necessary\n cert = chain[i];\n if(typeof cert === 'string') {\n cert = pki.certificateFromPem(cert);\n }\n\n // SafeBag\n var certBagAttrs = (i === 0) ? bagAttrs : undefined;\n var certAsn1 = pki.certificateToAsn1(cert);\n var certSafeBag =\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // bagId\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(pki.oids.certBag).getBytes()),\n // bagValue\n asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [\n // CertBag\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // certId\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(pki.oids.x509Certificate).getBytes()),\n // certValue (x509Certificate)\n asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [\n asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false,\n asn1.toDer(certAsn1).getBytes())\n ])])]),\n // bagAttributes (OPTIONAL)\n certBagAttrs\n ]);\n certSafeBags.push(certSafeBag);\n }\n\n if(certSafeBags.length > 0) {\n // SafeContents\n var certSafeContents = asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, certSafeBags);\n\n // ContentInfo\n var certCI =\n // PKCS#7 ContentInfo\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // contentType\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n // OID for the content type is 'data'\n asn1.oidToDer(pki.oids.data).getBytes()),\n // content\n asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [\n asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false,\n asn1.toDer(certSafeContents).getBytes())\n ])\n ]);\n contents.push(certCI);\n }\n\n // create safe contents for private key\n var keyBag = null;\n if(key !== null) {\n // SafeBag\n var pkAsn1 = pki.wrapRsaPrivateKey(pki.privateKeyToAsn1(key));\n if(password === null) {\n // no encryption\n keyBag = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // bagId\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(pki.oids.keyBag).getBytes()),\n // bagValue\n asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [\n // PrivateKeyInfo\n pkAsn1\n ]),\n // bagAttributes (OPTIONAL)\n bagAttrs\n ]);\n } else {\n // encrypted PrivateKeyInfo\n keyBag = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // bagId\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(pki.oids.pkcs8ShroudedKeyBag).getBytes()),\n // bagValue\n asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [\n // EncryptedPrivateKeyInfo\n pki.encryptPrivateKeyInfo(pkAsn1, password, options)\n ]),\n // bagAttributes (OPTIONAL)\n bagAttrs\n ]);\n }\n\n // SafeContents\n var keySafeContents =\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [keyBag]);\n\n // ContentInfo\n var keyCI =\n // PKCS#7 ContentInfo\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // contentType\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n // OID for the content type is 'data'\n asn1.oidToDer(pki.oids.data).getBytes()),\n // content\n asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [\n asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false,\n asn1.toDer(keySafeContents).getBytes())\n ])\n ]);\n contents.push(keyCI);\n }\n\n // create AuthenticatedSafe by stringing together the contents\n var safe = asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, contents);\n\n var macData;\n if(options.useMac) {\n // MacData\n var sha1 = forge.md.sha1.create();\n var macSalt = new forge.util.ByteBuffer(\n forge.random.getBytes(options.saltSize));\n var count = options.count;\n // 160-bit key\n var key = p12.generateKey(password, macSalt, 3, count, 20);\n var mac = forge.hmac.create();\n mac.start(sha1, key);\n mac.update(asn1.toDer(safe).getBytes());\n var macValue = mac.getMac();\n macData = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // mac DigestInfo\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // digestAlgorithm\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // algorithm = SHA-1\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(pki.oids.sha1).getBytes()),\n // parameters = Null\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, '')\n ]),\n // digest\n asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING,\n false, macValue.getBytes())\n ]),\n // macSalt OCTET STRING\n asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, macSalt.getBytes()),\n // iterations INTEGER (XXX: Only support count < 65536)\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,\n asn1.integerToDer(count).getBytes()\n )\n ]);\n }\n\n // PFX\n return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // version (3)\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,\n asn1.integerToDer(3).getBytes()),\n // PKCS#7 ContentInfo\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // contentType\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n // OID for the content type is 'data'\n asn1.oidToDer(pki.oids.data).getBytes()),\n // content\n asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [\n asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false,\n asn1.toDer(safe).getBytes())\n ])\n ]),\n macData\n ]);\n};\n\n/**\n * Derives a PKCS#12 key.\n *\n * @param password the password to derive the key material from, null or\n * undefined for none.\n * @param salt the salt, as a ByteBuffer, to use.\n * @param id the PKCS#12 ID byte (1 = key material, 2 = IV, 3 = MAC).\n * @param iter the iteration count.\n * @param n the number of bytes to derive from the password.\n * @param md the message digest to use, defaults to SHA-1.\n *\n * @return a ByteBuffer with the bytes derived from the password.\n */\np12.generateKey = forge.pbe.generatePkcs12Key;\n","/**\n * Javascript implementation of a basic Public Key Infrastructure, including\n * support for RSA public and private keys.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2010-2013 Digital Bazaar, Inc.\n */\nvar forge = require('./forge');\nrequire('./asn1');\nrequire('./oids');\nrequire('./pbe');\nrequire('./pem');\nrequire('./pbkdf2');\nrequire('./pkcs12');\nrequire('./pss');\nrequire('./rsa');\nrequire('./util');\nrequire('./x509');\n\n// shortcut for asn.1 API\nvar asn1 = forge.asn1;\n\n/* Public Key Infrastructure (PKI) implementation. */\nvar pki = module.exports = forge.pki = forge.pki || {};\n\n/**\n * NOTE: THIS METHOD IS DEPRECATED. Use pem.decode() instead.\n *\n * Converts PEM-formatted data to DER.\n *\n * @param pem the PEM-formatted data.\n *\n * @return the DER-formatted data.\n */\npki.pemToDer = function(pem) {\n var msg = forge.pem.decode(pem)[0];\n if(msg.procType && msg.procType.type === 'ENCRYPTED') {\n throw new Error('Could not convert PEM to DER; PEM is encrypted.');\n }\n return forge.util.createBuffer(msg.body);\n};\n\n/**\n * Converts an RSA private key from PEM format.\n *\n * @param pem the PEM-formatted private key.\n *\n * @return the private key.\n */\npki.privateKeyFromPem = function(pem) {\n var msg = forge.pem.decode(pem)[0];\n\n if(msg.type !== 'PRIVATE KEY' && msg.type !== 'RSA PRIVATE KEY') {\n var error = new Error('Could not convert private key from PEM; PEM ' +\n 'header type is not \"PRIVATE KEY\" or \"RSA PRIVATE KEY\".');\n error.headerType = msg.type;\n throw error;\n }\n if(msg.procType && msg.procType.type === 'ENCRYPTED') {\n throw new Error('Could not convert private key from PEM; PEM is encrypted.');\n }\n\n // convert DER to ASN.1 object\n var obj = asn1.fromDer(msg.body);\n\n return pki.privateKeyFromAsn1(obj);\n};\n\n/**\n * Converts an RSA private key to PEM format.\n *\n * @param key the private key.\n * @param maxline the maximum characters per line, defaults to 64.\n *\n * @return the PEM-formatted private key.\n */\npki.privateKeyToPem = function(key, maxline) {\n // convert to ASN.1, then DER, then PEM-encode\n var msg = {\n type: 'RSA PRIVATE KEY',\n body: asn1.toDer(pki.privateKeyToAsn1(key)).getBytes()\n };\n return forge.pem.encode(msg, {maxline: maxline});\n};\n\n/**\n * Converts a PrivateKeyInfo to PEM format.\n *\n * @param pki the PrivateKeyInfo.\n * @param maxline the maximum characters per line, defaults to 64.\n *\n * @return the PEM-formatted private key.\n */\npki.privateKeyInfoToPem = function(pki, maxline) {\n // convert to DER, then PEM-encode\n var msg = {\n type: 'PRIVATE KEY',\n body: asn1.toDer(pki).getBytes()\n };\n return forge.pem.encode(msg, {maxline: maxline});\n};\n","/**\n * A Javascript implementation of Transport Layer Security (TLS).\n *\n * @author Dave Longley\n *\n * Copyright (c) 2009-2014 Digital Bazaar, Inc.\n *\n * The TLS Handshake Protocol involves the following steps:\n *\n * - Exchange hello messages to agree on algorithms, exchange random values,\n * and check for session resumption.\n *\n * - Exchange the necessary cryptographic parameters to allow the client and\n * server to agree on a premaster secret.\n *\n * - Exchange certificates and cryptographic information to allow the client\n * and server to authenticate themselves.\n *\n * - Generate a master secret from the premaster secret and exchanged random\n * values.\n *\n * - Provide security parameters to the record layer.\n *\n * - Allow the client and server to verify that their peer has calculated the\n * same security parameters and that the handshake occurred without tampering\n * by an attacker.\n *\n * Up to 4 different messages may be sent during a key exchange. The server\n * certificate, the server key exchange, the client certificate, and the\n * client key exchange.\n *\n * A typical handshake (from the client's perspective).\n *\n * 1. Client sends ClientHello.\n * 2. Client receives ServerHello.\n * 3. Client receives optional Certificate.\n * 4. Client receives optional ServerKeyExchange.\n * 5. Client receives ServerHelloDone.\n * 6. Client sends optional Certificate.\n * 7. Client sends ClientKeyExchange.\n * 8. Client sends optional CertificateVerify.\n * 9. Client sends ChangeCipherSpec.\n * 10. Client sends Finished.\n * 11. Client receives ChangeCipherSpec.\n * 12. Client receives Finished.\n * 13. Client sends/receives application data.\n *\n * To reuse an existing session:\n *\n * 1. Client sends ClientHello with session ID for reuse.\n * 2. Client receives ServerHello with same session ID if reusing.\n * 3. Client receives ChangeCipherSpec message if reusing.\n * 4. Client receives Finished.\n * 5. Client sends ChangeCipherSpec.\n * 6. Client sends Finished.\n *\n * Note: Client ignores HelloRequest if in the middle of a handshake.\n *\n * Record Layer:\n *\n * The record layer fragments information blocks into TLSPlaintext records\n * carrying data in chunks of 2^14 bytes or less. Client message boundaries are\n * not preserved in the record layer (i.e., multiple client messages of the\n * same ContentType MAY be coalesced into a single TLSPlaintext record, or a\n * single message MAY be fragmented across several records).\n *\n * struct {\n * uint8 major;\n * uint8 minor;\n * } ProtocolVersion;\n *\n * struct {\n * ContentType type;\n * ProtocolVersion version;\n * uint16 length;\n * opaque fragment[TLSPlaintext.length];\n * } TLSPlaintext;\n *\n * type:\n * The higher-level protocol used to process the enclosed fragment.\n *\n * version:\n * The version of the protocol being employed. TLS Version 1.2 uses version\n * {3, 3}. TLS Version 1.0 uses version {3, 1}. Note that a client that\n * supports multiple versions of TLS may not know what version will be\n * employed before it receives the ServerHello.\n *\n * length:\n * The length (in bytes) of the following TLSPlaintext.fragment. The length\n * MUST NOT exceed 2^14 = 16384 bytes.\n *\n * fragment:\n * The application data. This data is transparent and treated as an\n * independent block to be dealt with by the higher-level protocol specified\n * by the type field.\n *\n * Implementations MUST NOT send zero-length fragments of Handshake, Alert, or\n * ChangeCipherSpec content types. Zero-length fragments of Application data\n * MAY be sent as they are potentially useful as a traffic analysis\n * countermeasure.\n *\n * Note: Data of different TLS record layer content types MAY be interleaved.\n * Application data is generally of lower precedence for transmission than\n * other content types. However, records MUST be delivered to the network in\n * the same order as they are protected by the record layer. Recipients MUST\n * receive and process interleaved application layer traffic during handshakes\n * subsequent to the first one on a connection.\n *\n * struct {\n * ContentType type; // same as TLSPlaintext.type\n * ProtocolVersion version;// same as TLSPlaintext.version\n * uint16 length;\n * opaque fragment[TLSCompressed.length];\n * } TLSCompressed;\n *\n * length:\n * The length (in bytes) of the following TLSCompressed.fragment.\n * The length MUST NOT exceed 2^14 + 1024.\n *\n * fragment:\n * The compressed form of TLSPlaintext.fragment.\n *\n * Note: A CompressionMethod.null operation is an identity operation; no fields\n * are altered. In this implementation, since no compression is supported,\n * uncompressed records are always the same as compressed records.\n *\n * Encryption Information:\n *\n * The encryption and MAC functions translate a TLSCompressed structure into a\n * TLSCiphertext. The decryption functions reverse the process. The MAC of the\n * record also includes a sequence number so that missing, extra, or repeated\n * messages are detectable.\n *\n * struct {\n * ContentType type;\n * ProtocolVersion version;\n * uint16 length;\n * select (SecurityParameters.cipher_type) {\n * case stream: GenericStreamCipher;\n * case block: GenericBlockCipher;\n * case aead: GenericAEADCipher;\n * } fragment;\n * } TLSCiphertext;\n *\n * type:\n * The type field is identical to TLSCompressed.type.\n *\n * version:\n * The version field is identical to TLSCompressed.version.\n *\n * length:\n * The length (in bytes) of the following TLSCiphertext.fragment.\n * The length MUST NOT exceed 2^14 + 2048.\n *\n * fragment:\n * The encrypted form of TLSCompressed.fragment, with the MAC.\n *\n * Note: Only CBC Block Ciphers are supported by this implementation.\n *\n * The TLSCompressed.fragment structures are converted to/from block\n * TLSCiphertext.fragment structures.\n *\n * struct {\n * opaque IV[SecurityParameters.record_iv_length];\n * block-ciphered struct {\n * opaque content[TLSCompressed.length];\n * opaque MAC[SecurityParameters.mac_length];\n * uint8 padding[GenericBlockCipher.padding_length];\n * uint8 padding_length;\n * };\n * } GenericBlockCipher;\n *\n * The MAC is generated as described in Section 6.2.3.1.\n *\n * IV:\n * The Initialization Vector (IV) SHOULD be chosen at random, and MUST be\n * unpredictable. Note that in versions of TLS prior to 1.1, there was no\n * IV field, and the last ciphertext block of the previous record (the \"CBC\n * residue\") was used as the IV. This was changed to prevent the attacks\n * described in [CBCATT]. For block ciphers, the IV length is of length\n * SecurityParameters.record_iv_length, which is equal to the\n * SecurityParameters.block_size.\n *\n * padding:\n * Padding that is added to force the length of the plaintext to be an\n * integral multiple of the block cipher's block length. The padding MAY be\n * any length up to 255 bytes, as long as it results in the\n * TLSCiphertext.length being an integral multiple of the block length.\n * Lengths longer than necessary might be desirable to frustrate attacks on\n * a protocol that are based on analysis of the lengths of exchanged\n * messages. Each uint8 in the padding data vector MUST be filled with the\n * padding length value. The receiver MUST check this padding and MUST use\n * the bad_record_mac alert to indicate padding errors.\n *\n * padding_length:\n * The padding length MUST be such that the total size of the\n * GenericBlockCipher structure is a multiple of the cipher's block length.\n * Legal values range from zero to 255, inclusive. This length specifies the\n * length of the padding field exclusive of the padding_length field itself.\n *\n * The encrypted data length (TLSCiphertext.length) is one more than the sum of\n * SecurityParameters.block_length, TLSCompressed.length,\n * SecurityParameters.mac_length, and padding_length.\n *\n * Example: If the block length is 8 bytes, the content length\n * (TLSCompressed.length) is 61 bytes, and the MAC length is 20 bytes, then the\n * length before padding is 82 bytes (this does not include the IV. Thus, the\n * padding length modulo 8 must be equal to 6 in order to make the total length\n * an even multiple of 8 bytes (the block length). The padding length can be\n * 6, 14, 22, and so on, through 254. If the padding length were the minimum\n * necessary, 6, the padding would be 6 bytes, each containing the value 6.\n * Thus, the last 8 octets of the GenericBlockCipher before block encryption\n * would be xx 06 06 06 06 06 06 06, where xx is the last octet of the MAC.\n *\n * Note: With block ciphers in CBC mode (Cipher Block Chaining), it is critical\n * that the entire plaintext of the record be known before any ciphertext is\n * transmitted. Otherwise, it is possible for the attacker to mount the attack\n * described in [CBCATT].\n *\n * Implementation note: Canvel et al. [CBCTIME] have demonstrated a timing\n * attack on CBC padding based on the time required to compute the MAC. In\n * order to defend against this attack, implementations MUST ensure that\n * record processing time is essentially the same whether or not the padding\n * is correct. In general, the best way to do this is to compute the MAC even\n * if the padding is incorrect, and only then reject the packet. For instance,\n * if the pad appears to be incorrect, the implementation might assume a\n * zero-length pad and then compute the MAC. This leaves a small timing\n * channel, since MAC performance depends, to some extent, on the size of the\n * data fragment, but it is not believed to be large enough to be exploitable,\n * due to the large block size of existing MACs and the small size of the\n * timing signal.\n */\nvar forge = require('./forge');\nrequire('./asn1');\nrequire('./hmac');\nrequire('./md5');\nrequire('./pem');\nrequire('./pki');\nrequire('./random');\nrequire('./sha1');\nrequire('./util');\n\n/**\n * Generates pseudo random bytes by mixing the result of two hash functions,\n * MD5 and SHA-1.\n *\n * prf_TLS1(secret, label, seed) =\n * P_MD5(S1, label + seed) XOR P_SHA-1(S2, label + seed);\n *\n * Each P_hash function functions as follows:\n *\n * P_hash(secret, seed) = HMAC_hash(secret, A(1) + seed) +\n * HMAC_hash(secret, A(2) + seed) +\n * HMAC_hash(secret, A(3) + seed) + ...\n * A() is defined as:\n * A(0) = seed\n * A(i) = HMAC_hash(secret, A(i-1))\n *\n * The '+' operator denotes concatenation.\n *\n * As many iterations A(N) as are needed are performed to generate enough\n * pseudo random byte output. If an iteration creates more data than is\n * necessary, then it is truncated.\n *\n * Therefore:\n * A(1) = HMAC_hash(secret, A(0))\n * = HMAC_hash(secret, seed)\n * A(2) = HMAC_hash(secret, A(1))\n * = HMAC_hash(secret, HMAC_hash(secret, seed))\n *\n * Therefore:\n * P_hash(secret, seed) =\n * HMAC_hash(secret, HMAC_hash(secret, A(0)) + seed) +\n * HMAC_hash(secret, HMAC_hash(secret, A(1)) + seed) +\n * ...\n *\n * Therefore:\n * P_hash(secret, seed) =\n * HMAC_hash(secret, HMAC_hash(secret, seed) + seed) +\n * HMAC_hash(secret, HMAC_hash(secret, HMAC_hash(secret, seed)) + seed) +\n * ...\n *\n * @param secret the secret to use.\n * @param label the label to use.\n * @param seed the seed value to use.\n * @param length the number of bytes to generate.\n *\n * @return the pseudo random bytes in a byte buffer.\n */\nvar prf_TLS1 = function(secret, label, seed, length) {\n var rval = forge.util.createBuffer();\n\n /* For TLS 1.0, the secret is split in half, into two secrets of equal\n length. If the secret has an odd length then the last byte of the first\n half will be the same as the first byte of the second. The length of the\n two secrets is half of the secret rounded up. */\n var idx = (secret.length >> 1);\n var slen = idx + (secret.length & 1);\n var s1 = secret.substr(0, slen);\n var s2 = secret.substr(idx, slen);\n var ai = forge.util.createBuffer();\n var hmac = forge.hmac.create();\n seed = label + seed;\n\n // determine the number of iterations that must be performed to generate\n // enough output bytes, md5 creates 16 byte hashes, sha1 creates 20\n var md5itr = Math.ceil(length / 16);\n var sha1itr = Math.ceil(length / 20);\n\n // do md5 iterations\n hmac.start('MD5', s1);\n var md5bytes = forge.util.createBuffer();\n ai.putBytes(seed);\n for(var i = 0; i < md5itr; ++i) {\n // HMAC_hash(secret, A(i-1))\n hmac.start(null, null);\n hmac.update(ai.getBytes());\n ai.putBuffer(hmac.digest());\n\n // HMAC_hash(secret, A(i) + seed)\n hmac.start(null, null);\n hmac.update(ai.bytes() + seed);\n md5bytes.putBuffer(hmac.digest());\n }\n\n // do sha1 iterations\n hmac.start('SHA1', s2);\n var sha1bytes = forge.util.createBuffer();\n ai.clear();\n ai.putBytes(seed);\n for(var i = 0; i < sha1itr; ++i) {\n // HMAC_hash(secret, A(i-1))\n hmac.start(null, null);\n hmac.update(ai.getBytes());\n ai.putBuffer(hmac.digest());\n\n // HMAC_hash(secret, A(i) + seed)\n hmac.start(null, null);\n hmac.update(ai.bytes() + seed);\n sha1bytes.putBuffer(hmac.digest());\n }\n\n // XOR the md5 bytes with the sha1 bytes\n rval.putBytes(forge.util.xorBytes(\n md5bytes.getBytes(), sha1bytes.getBytes(), length));\n\n return rval;\n};\n\n/**\n * Generates pseudo random bytes using a SHA256 algorithm. For TLS 1.2.\n *\n * @param secret the secret to use.\n * @param label the label to use.\n * @param seed the seed value to use.\n * @param length the number of bytes to generate.\n *\n * @return the pseudo random bytes in a byte buffer.\n */\nvar prf_sha256 = function(secret, label, seed, length) {\n // FIXME: implement me for TLS 1.2\n};\n\n/**\n * Gets a MAC for a record using the SHA-1 hash algorithm.\n *\n * @param key the mac key.\n * @param state the sequence number (array of two 32-bit integers).\n * @param record the record.\n *\n * @return the sha-1 hash (20 bytes) for the given record.\n */\nvar hmac_sha1 = function(key, seqNum, record) {\n /* MAC is computed like so:\n HMAC_hash(\n key, seqNum +\n TLSCompressed.type +\n TLSCompressed.version +\n TLSCompressed.length +\n TLSCompressed.fragment)\n */\n var hmac = forge.hmac.create();\n hmac.start('SHA1', key);\n var b = forge.util.createBuffer();\n b.putInt32(seqNum[0]);\n b.putInt32(seqNum[1]);\n b.putByte(record.type);\n b.putByte(record.version.major);\n b.putByte(record.version.minor);\n b.putInt16(record.length);\n b.putBytes(record.fragment.bytes());\n hmac.update(b.getBytes());\n return hmac.digest().getBytes();\n};\n\n/**\n * Compresses the TLSPlaintext record into a TLSCompressed record using the\n * deflate algorithm.\n *\n * @param c the TLS connection.\n * @param record the TLSPlaintext record to compress.\n * @param s the ConnectionState to use.\n *\n * @return true on success, false on failure.\n */\nvar deflate = function(c, record, s) {\n var rval = false;\n\n try {\n var bytes = c.deflate(record.fragment.getBytes());\n record.fragment = forge.util.createBuffer(bytes);\n record.length = bytes.length;\n rval = true;\n } catch(ex) {\n // deflate error, fail out\n }\n\n return rval;\n};\n\n/**\n * Decompresses the TLSCompressed record into a TLSPlaintext record using the\n * deflate algorithm.\n *\n * @param c the TLS connection.\n * @param record the TLSCompressed record to decompress.\n * @param s the ConnectionState to use.\n *\n * @return true on success, false on failure.\n */\nvar inflate = function(c, record, s) {\n var rval = false;\n\n try {\n var bytes = c.inflate(record.fragment.getBytes());\n record.fragment = forge.util.createBuffer(bytes);\n record.length = bytes.length;\n rval = true;\n } catch(ex) {\n // inflate error, fail out\n }\n\n return rval;\n};\n\n/**\n * Reads a TLS variable-length vector from a byte buffer.\n *\n * Variable-length vectors are defined by specifying a subrange of legal\n * lengths, inclusively, using the notation . When these are\n * encoded, the actual length precedes the vector's contents in the byte\n * stream. The length will be in the form of a number consuming as many bytes\n * as required to hold the vector's specified maximum (ceiling) length. A\n * variable-length vector with an actual length field of zero is referred to\n * as an empty vector.\n *\n * @param b the byte buffer.\n * @param lenBytes the number of bytes required to store the length.\n *\n * @return the resulting byte buffer.\n */\nvar readVector = function(b, lenBytes) {\n var len = 0;\n switch(lenBytes) {\n case 1:\n len = b.getByte();\n break;\n case 2:\n len = b.getInt16();\n break;\n case 3:\n len = b.getInt24();\n break;\n case 4:\n len = b.getInt32();\n break;\n }\n\n // read vector bytes into a new buffer\n return forge.util.createBuffer(b.getBytes(len));\n};\n\n/**\n * Writes a TLS variable-length vector to a byte buffer.\n *\n * @param b the byte buffer.\n * @param lenBytes the number of bytes required to store the length.\n * @param v the byte buffer vector.\n */\nvar writeVector = function(b, lenBytes, v) {\n // encode length at the start of the vector, where the number of bytes for\n // the length is the maximum number of bytes it would take to encode the\n // vector's ceiling\n b.putInt(v.length(), lenBytes << 3);\n b.putBuffer(v);\n};\n\n/**\n * The tls implementation.\n */\nvar tls = {};\n\n/**\n * Version: TLS 1.2 = 3.3, TLS 1.1 = 3.2, TLS 1.0 = 3.1. Both TLS 1.1 and\n * TLS 1.2 were still too new (ie: openSSL didn't implement them) at the time\n * of this implementation so TLS 1.0 was implemented instead.\n */\ntls.Versions = {\n TLS_1_0: {major: 3, minor: 1},\n TLS_1_1: {major: 3, minor: 2},\n TLS_1_2: {major: 3, minor: 3}\n};\ntls.SupportedVersions = [\n tls.Versions.TLS_1_1,\n tls.Versions.TLS_1_0\n];\ntls.Version = tls.SupportedVersions[0];\n\n/**\n * Maximum fragment size. True maximum is 16384, but we fragment before that\n * to allow for unusual small increases during compression.\n */\ntls.MaxFragment = 16384 - 1024;\n\n/**\n * Whether this entity is considered the \"client\" or \"server\".\n * enum { server, client } ConnectionEnd;\n */\ntls.ConnectionEnd = {\n server: 0,\n client: 1\n};\n\n/**\n * Pseudo-random function algorithm used to generate keys from the master\n * secret.\n * enum { tls_prf_sha256 } PRFAlgorithm;\n */\ntls.PRFAlgorithm = {\n tls_prf_sha256: 0\n};\n\n/**\n * Bulk encryption algorithms.\n * enum { null, rc4, des3, aes } BulkCipherAlgorithm;\n */\ntls.BulkCipherAlgorithm = {\n none: null,\n rc4: 0,\n des3: 1,\n aes: 2\n};\n\n/**\n * Cipher types.\n * enum { stream, block, aead } CipherType;\n */\ntls.CipherType = {\n stream: 0,\n block: 1,\n aead: 2\n};\n\n/**\n * MAC (Message Authentication Code) algorithms.\n * enum { null, hmac_md5, hmac_sha1, hmac_sha256,\n * hmac_sha384, hmac_sha512} MACAlgorithm;\n */\ntls.MACAlgorithm = {\n none: null,\n hmac_md5: 0,\n hmac_sha1: 1,\n hmac_sha256: 2,\n hmac_sha384: 3,\n hmac_sha512: 4\n};\n\n/**\n * Compression algorithms.\n * enum { null(0), deflate(1), (255) } CompressionMethod;\n */\ntls.CompressionMethod = {\n none: 0,\n deflate: 1\n};\n\n/**\n * TLS record content types.\n * enum {\n * change_cipher_spec(20), alert(21), handshake(22),\n * application_data(23), (255)\n * } ContentType;\n */\ntls.ContentType = {\n change_cipher_spec: 20,\n alert: 21,\n handshake: 22,\n application_data: 23,\n heartbeat: 24\n};\n\n/**\n * TLS handshake types.\n * enum {\n * hello_request(0), client_hello(1), server_hello(2),\n * certificate(11), server_key_exchange (12),\n * certificate_request(13), server_hello_done(14),\n * certificate_verify(15), client_key_exchange(16),\n * finished(20), (255)\n * } HandshakeType;\n */\ntls.HandshakeType = {\n hello_request: 0,\n client_hello: 1,\n server_hello: 2,\n certificate: 11,\n server_key_exchange: 12,\n certificate_request: 13,\n server_hello_done: 14,\n certificate_verify: 15,\n client_key_exchange: 16,\n finished: 20\n};\n\n/**\n * TLS Alert Protocol.\n *\n * enum { warning(1), fatal(2), (255) } AlertLevel;\n *\n * enum {\n * close_notify(0),\n * unexpected_message(10),\n * bad_record_mac(20),\n * decryption_failed(21),\n * record_overflow(22),\n * decompression_failure(30),\n * handshake_failure(40),\n * bad_certificate(42),\n * unsupported_certificate(43),\n * certificate_revoked(44),\n * certificate_expired(45),\n * certificate_unknown(46),\n * illegal_parameter(47),\n * unknown_ca(48),\n * access_denied(49),\n * decode_error(50),\n * decrypt_error(51),\n * export_restriction(60),\n * protocol_version(70),\n * insufficient_security(71),\n * internal_error(80),\n * user_canceled(90),\n * no_renegotiation(100),\n * (255)\n * } AlertDescription;\n *\n * struct {\n * AlertLevel level;\n * AlertDescription description;\n * } Alert;\n */\ntls.Alert = {};\ntls.Alert.Level = {\n warning: 1,\n fatal: 2\n};\ntls.Alert.Description = {\n close_notify: 0,\n unexpected_message: 10,\n bad_record_mac: 20,\n decryption_failed: 21,\n record_overflow: 22,\n decompression_failure: 30,\n handshake_failure: 40,\n bad_certificate: 42,\n unsupported_certificate: 43,\n certificate_revoked: 44,\n certificate_expired: 45,\n certificate_unknown: 46,\n illegal_parameter: 47,\n unknown_ca: 48,\n access_denied: 49,\n decode_error: 50,\n decrypt_error: 51,\n export_restriction: 60,\n protocol_version: 70,\n insufficient_security: 71,\n internal_error: 80,\n user_canceled: 90,\n no_renegotiation: 100\n};\n\n/**\n * TLS Heartbeat Message types.\n * enum {\n * heartbeat_request(1),\n * heartbeat_response(2),\n * (255)\n * } HeartbeatMessageType;\n */\ntls.HeartbeatMessageType = {\n heartbeat_request: 1,\n heartbeat_response: 2\n};\n\n/**\n * Supported cipher suites.\n */\ntls.CipherSuites = {};\n\n/**\n * Gets a supported cipher suite from its 2 byte ID.\n *\n * @param twoBytes two bytes in a string.\n *\n * @return the matching supported cipher suite or null.\n */\ntls.getCipherSuite = function(twoBytes) {\n var rval = null;\n for(var key in tls.CipherSuites) {\n var cs = tls.CipherSuites[key];\n if(cs.id[0] === twoBytes.charCodeAt(0) &&\n cs.id[1] === twoBytes.charCodeAt(1)) {\n rval = cs;\n break;\n }\n }\n return rval;\n};\n\n/**\n * Called when an unexpected record is encountered.\n *\n * @param c the connection.\n * @param record the record.\n */\ntls.handleUnexpected = function(c, record) {\n // if connection is client and closed, ignore unexpected messages\n var ignore = (!c.open && c.entity === tls.ConnectionEnd.client);\n if(!ignore) {\n c.error(c, {\n message: 'Unexpected message. Received TLS record out of order.',\n send: true,\n alert: {\n level: tls.Alert.Level.fatal,\n description: tls.Alert.Description.unexpected_message\n }\n });\n }\n};\n\n/**\n * Called when a client receives a HelloRequest record.\n *\n * @param c the connection.\n * @param record the record.\n * @param length the length of the handshake message.\n */\ntls.handleHelloRequest = function(c, record, length) {\n // ignore renegotiation requests from the server during a handshake, but\n // if handshaking, send a warning alert that renegotation is denied\n if(!c.handshaking && c.handshakes > 0) {\n // send alert warning\n tls.queue(c, tls.createAlert(c, {\n level: tls.Alert.Level.warning,\n description: tls.Alert.Description.no_renegotiation\n }));\n tls.flush(c);\n }\n\n // continue\n c.process();\n};\n\n/**\n * Parses a hello message from a ClientHello or ServerHello record.\n *\n * @param record the record to parse.\n *\n * @return the parsed message.\n */\ntls.parseHelloMessage = function(c, record, length) {\n var msg = null;\n\n var client = (c.entity === tls.ConnectionEnd.client);\n\n // minimum of 38 bytes in message\n if(length < 38) {\n c.error(c, {\n message: client ?\n 'Invalid ServerHello message. Message too short.' :\n 'Invalid ClientHello message. Message too short.',\n send: true,\n alert: {\n level: tls.Alert.Level.fatal,\n description: tls.Alert.Description.illegal_parameter\n }\n });\n } else {\n // use 'remaining' to calculate # of remaining bytes in the message\n var b = record.fragment;\n var remaining = b.length();\n msg = {\n version: {\n major: b.getByte(),\n minor: b.getByte()\n },\n random: forge.util.createBuffer(b.getBytes(32)),\n session_id: readVector(b, 1),\n extensions: []\n };\n if(client) {\n msg.cipher_suite = b.getBytes(2);\n msg.compression_method = b.getByte();\n } else {\n msg.cipher_suites = readVector(b, 2);\n msg.compression_methods = readVector(b, 1);\n }\n\n // read extensions if there are any bytes left in the message\n remaining = length - (remaining - b.length());\n if(remaining > 0) {\n // parse extensions\n var exts = readVector(b, 2);\n while(exts.length() > 0) {\n msg.extensions.push({\n type: [exts.getByte(), exts.getByte()],\n data: readVector(exts, 2)\n });\n }\n\n // TODO: make extension support modular\n if(!client) {\n for(var i = 0; i < msg.extensions.length; ++i) {\n var ext = msg.extensions[i];\n\n // support SNI extension\n if(ext.type[0] === 0x00 && ext.type[1] === 0x00) {\n // get server name list\n var snl = readVector(ext.data, 2);\n while(snl.length() > 0) {\n // read server name type\n var snType = snl.getByte();\n\n // only HostName type (0x00) is known, break out if\n // another type is detected\n if(snType !== 0x00) {\n break;\n }\n\n // add host name to server name list\n c.session.extensions.server_name.serverNameList.push(\n readVector(snl, 2).getBytes());\n }\n }\n }\n }\n }\n\n // version already set, do not allow version change\n if(c.session.version) {\n if(msg.version.major !== c.session.version.major ||\n msg.version.minor !== c.session.version.minor) {\n return c.error(c, {\n message: 'TLS version change is disallowed during renegotiation.',\n send: true,\n alert: {\n level: tls.Alert.Level.fatal,\n description: tls.Alert.Description.protocol_version\n }\n });\n }\n }\n\n // get the chosen (ServerHello) cipher suite\n if(client) {\n // FIXME: should be checking configured acceptable cipher suites\n c.session.cipherSuite = tls.getCipherSuite(msg.cipher_suite);\n } else {\n // get a supported preferred (ClientHello) cipher suite\n // choose the first supported cipher suite\n var tmp = forge.util.createBuffer(msg.cipher_suites.bytes());\n while(tmp.length() > 0) {\n // FIXME: should be checking configured acceptable suites\n // cipher suites take up 2 bytes\n c.session.cipherSuite = tls.getCipherSuite(tmp.getBytes(2));\n if(c.session.cipherSuite !== null) {\n break;\n }\n }\n }\n\n // cipher suite not supported\n if(c.session.cipherSuite === null) {\n return c.error(c, {\n message: 'No cipher suites in common.',\n send: true,\n alert: {\n level: tls.Alert.Level.fatal,\n description: tls.Alert.Description.handshake_failure\n },\n cipherSuite: forge.util.bytesToHex(msg.cipher_suite)\n });\n }\n\n // TODO: handle compression methods\n if(client) {\n c.session.compressionMethod = msg.compression_method;\n } else {\n // no compression\n c.session.compressionMethod = tls.CompressionMethod.none;\n }\n }\n\n return msg;\n};\n\n/**\n * Creates security parameters for the given connection based on the given\n * hello message.\n *\n * @param c the TLS connection.\n * @param msg the hello message.\n */\ntls.createSecurityParameters = function(c, msg) {\n /* Note: security params are from TLS 1.2, some values like prf_algorithm\n are ignored for TLS 1.0/1.1 and the builtin as specified in the spec is\n used. */\n\n // TODO: handle other options from server when more supported\n\n // get client and server randoms\n var client = (c.entity === tls.ConnectionEnd.client);\n var msgRandom = msg.random.bytes();\n var cRandom = client ? c.session.sp.client_random : msgRandom;\n var sRandom = client ? msgRandom : tls.createRandom().getBytes();\n\n // create new security parameters\n c.session.sp = {\n entity: c.entity,\n prf_algorithm: tls.PRFAlgorithm.tls_prf_sha256,\n bulk_cipher_algorithm: null,\n cipher_type: null,\n enc_key_length: null,\n block_length: null,\n fixed_iv_length: null,\n record_iv_length: null,\n mac_algorithm: null,\n mac_length: null,\n mac_key_length: null,\n compression_algorithm: c.session.compressionMethod,\n pre_master_secret: null,\n master_secret: null,\n client_random: cRandom,\n server_random: sRandom\n };\n};\n\n/**\n * Called when a client receives a ServerHello record.\n *\n * When a ServerHello message will be sent:\n * The server will send this message in response to a client hello message\n * when it was able to find an acceptable set of algorithms. If it cannot\n * find such a match, it will respond with a handshake failure alert.\n *\n * uint24 length;\n * struct {\n * ProtocolVersion server_version;\n * Random random;\n * SessionID session_id;\n * CipherSuite cipher_suite;\n * CompressionMethod compression_method;\n * select(extensions_present) {\n * case false:\n * struct {};\n * case true:\n * Extension extensions<0..2^16-1>;\n * };\n * } ServerHello;\n *\n * @param c the connection.\n * @param record the record.\n * @param length the length of the handshake message.\n */\ntls.handleServerHello = function(c, record, length) {\n var msg = tls.parseHelloMessage(c, record, length);\n if(c.fail) {\n return;\n }\n\n // ensure server version is compatible\n if(msg.version.minor <= c.version.minor) {\n c.version.minor = msg.version.minor;\n } else {\n return c.error(c, {\n message: 'Incompatible TLS version.',\n send: true,\n alert: {\n level: tls.Alert.Level.fatal,\n description: tls.Alert.Description.protocol_version\n }\n });\n }\n\n // indicate session version has been set\n c.session.version = c.version;\n\n // get the session ID from the message\n var sessionId = msg.session_id.bytes();\n\n // if the session ID is not blank and matches the cached one, resume\n // the session\n if(sessionId.length > 0 && sessionId === c.session.id) {\n // resuming session, expect a ChangeCipherSpec next\n c.expect = SCC;\n c.session.resuming = true;\n\n // get new server random\n c.session.sp.server_random = msg.random.bytes();\n } else {\n // not resuming, expect a server Certificate message next\n c.expect = SCE;\n c.session.resuming = false;\n\n // create new security parameters\n tls.createSecurityParameters(c, msg);\n }\n\n // set new session ID\n c.session.id = sessionId;\n\n // continue\n c.process();\n};\n\n/**\n * Called when a server receives a ClientHello record.\n *\n * When a ClientHello message will be sent:\n * When a client first connects to a server it is required to send the\n * client hello as its first message. The client can also send a client\n * hello in response to a hello request or on its own initiative in order\n * to renegotiate the security parameters in an existing connection.\n *\n * @param c the connection.\n * @param record the record.\n * @param length the length of the handshake message.\n */\ntls.handleClientHello = function(c, record, length) {\n var msg = tls.parseHelloMessage(c, record, length);\n if(c.fail) {\n return;\n }\n\n // get the session ID from the message\n var sessionId = msg.session_id.bytes();\n\n // see if the given session ID is in the cache\n var session = null;\n if(c.sessionCache) {\n session = c.sessionCache.getSession(sessionId);\n if(session === null) {\n // session ID not found\n sessionId = '';\n } else if(session.version.major !== msg.version.major ||\n session.version.minor > msg.version.minor) {\n // if session version is incompatible with client version, do not resume\n session = null;\n sessionId = '';\n }\n }\n\n // no session found to resume, generate a new session ID\n if(sessionId.length === 0) {\n sessionId = forge.random.getBytes(32);\n }\n\n // update session\n c.session.id = sessionId;\n c.session.clientHelloVersion = msg.version;\n c.session.sp = {};\n if(session) {\n // use version and security parameters from resumed session\n c.version = c.session.version = session.version;\n c.session.sp = session.sp;\n } else {\n // use highest compatible minor version\n var version;\n for(var i = 1; i < tls.SupportedVersions.length; ++i) {\n version = tls.SupportedVersions[i];\n if(version.minor <= msg.version.minor) {\n break;\n }\n }\n c.version = {major: version.major, minor: version.minor};\n c.session.version = c.version;\n }\n\n // if a session is set, resume it\n if(session !== null) {\n // resuming session, expect a ChangeCipherSpec next\n c.expect = CCC;\n c.session.resuming = true;\n\n // get new client random\n c.session.sp.client_random = msg.random.bytes();\n } else {\n // not resuming, expect a Certificate or ClientKeyExchange\n c.expect = (c.verifyClient !== false) ? CCE : CKE;\n c.session.resuming = false;\n\n // create new security parameters\n tls.createSecurityParameters(c, msg);\n }\n\n // connection now open\n c.open = true;\n\n // queue server hello\n tls.queue(c, tls.createRecord(c, {\n type: tls.ContentType.handshake,\n data: tls.createServerHello(c)\n }));\n\n if(c.session.resuming) {\n // queue change cipher spec message\n tls.queue(c, tls.createRecord(c, {\n type: tls.ContentType.change_cipher_spec,\n data: tls.createChangeCipherSpec()\n }));\n\n // create pending state\n c.state.pending = tls.createConnectionState(c);\n\n // change current write state to pending write state\n c.state.current.write = c.state.pending.write;\n\n // queue finished\n tls.queue(c, tls.createRecord(c, {\n type: tls.ContentType.handshake,\n data: tls.createFinished(c)\n }));\n } else {\n // queue server certificate\n tls.queue(c, tls.createRecord(c, {\n type: tls.ContentType.handshake,\n data: tls.createCertificate(c)\n }));\n\n if(!c.fail) {\n // queue server key exchange\n tls.queue(c, tls.createRecord(c, {\n type: tls.ContentType.handshake,\n data: tls.createServerKeyExchange(c)\n }));\n\n // request client certificate if set\n if(c.verifyClient !== false) {\n // queue certificate request\n tls.queue(c, tls.createRecord(c, {\n type: tls.ContentType.handshake,\n data: tls.createCertificateRequest(c)\n }));\n }\n\n // queue server hello done\n tls.queue(c, tls.createRecord(c, {\n type: tls.ContentType.handshake,\n data: tls.createServerHelloDone(c)\n }));\n }\n }\n\n // send records\n tls.flush(c);\n\n // continue\n c.process();\n};\n\n/**\n * Called when a client receives a Certificate record.\n *\n * When this message will be sent:\n * The server must send a certificate whenever the agreed-upon key exchange\n * method is not an anonymous one. This message will always immediately\n * follow the server hello message.\n *\n * Meaning of this message:\n * The certificate type must be appropriate for the selected cipher suite's\n * key exchange algorithm, and is generally an X.509v3 certificate. It must\n * contain a key which matches the key exchange method, as follows. Unless\n * otherwise specified, the signing algorithm for the certificate must be\n * the same as the algorithm for the certificate key. Unless otherwise\n * specified, the public key may be of any length.\n *\n * opaque ASN.1Cert<1..2^24-1>;\n * struct {\n * ASN.1Cert certificate_list<1..2^24-1>;\n * } Certificate;\n *\n * @param c the connection.\n * @param record the record.\n * @param length the length of the handshake message.\n */\ntls.handleCertificate = function(c, record, length) {\n // minimum of 3 bytes in message\n if(length < 3) {\n return c.error(c, {\n message: 'Invalid Certificate message. Message too short.',\n send: true,\n alert: {\n level: tls.Alert.Level.fatal,\n description: tls.Alert.Description.illegal_parameter\n }\n });\n }\n\n var b = record.fragment;\n var msg = {\n certificate_list: readVector(b, 3)\n };\n\n /* The sender's certificate will be first in the list (chain), each\n subsequent one that follows will certify the previous one, but root\n certificates (self-signed) that specify the certificate authority may\n be omitted under the assumption that clients must already possess it. */\n var cert, asn1;\n var certs = [];\n try {\n while(msg.certificate_list.length() > 0) {\n // each entry in msg.certificate_list is a vector with 3 len bytes\n cert = readVector(msg.certificate_list, 3);\n asn1 = forge.asn1.fromDer(cert);\n cert = forge.pki.certificateFromAsn1(asn1, true);\n certs.push(cert);\n }\n } catch(ex) {\n return c.error(c, {\n message: 'Could not parse certificate list.',\n cause: ex,\n send: true,\n alert: {\n level: tls.Alert.Level.fatal,\n description: tls.Alert.Description.bad_certificate\n }\n });\n }\n\n // ensure at least 1 certificate was provided if in client-mode\n // or if verifyClient was set to true to require a certificate\n // (as opposed to 'optional')\n var client = (c.entity === tls.ConnectionEnd.client);\n if((client || c.verifyClient === true) && certs.length === 0) {\n // error, no certificate\n c.error(c, {\n message: client ?\n 'No server certificate provided.' :\n 'No client certificate provided.',\n send: true,\n alert: {\n level: tls.Alert.Level.fatal,\n description: tls.Alert.Description.illegal_parameter\n }\n });\n } else if(certs.length === 0) {\n // no certs to verify\n // expect a ServerKeyExchange or ClientKeyExchange message next\n c.expect = client ? SKE : CKE;\n } else {\n // save certificate in session\n if(client) {\n c.session.serverCertificate = certs[0];\n } else {\n c.session.clientCertificate = certs[0];\n }\n\n if(tls.verifyCertificateChain(c, certs)) {\n // expect a ServerKeyExchange or ClientKeyExchange message next\n c.expect = client ? SKE : CKE;\n }\n }\n\n // continue\n c.process();\n};\n\n/**\n * Called when a client receives a ServerKeyExchange record.\n *\n * When this message will be sent:\n * This message will be sent immediately after the server certificate\n * message (or the server hello message, if this is an anonymous\n * negotiation).\n *\n * The server key exchange message is sent by the server only when the\n * server certificate message (if sent) does not contain enough data to\n * allow the client to exchange a premaster secret.\n *\n * Meaning of this message:\n * This message conveys cryptographic information to allow the client to\n * communicate the premaster secret: either an RSA public key to encrypt\n * the premaster secret with, or a Diffie-Hellman public key with which the\n * client can complete a key exchange (with the result being the premaster\n * secret.)\n *\n * enum {\n * dhe_dss, dhe_rsa, dh_anon, rsa, dh_dss, dh_rsa\n * } KeyExchangeAlgorithm;\n *\n * struct {\n * opaque dh_p<1..2^16-1>;\n * opaque dh_g<1..2^16-1>;\n * opaque dh_Ys<1..2^16-1>;\n * } ServerDHParams;\n *\n * struct {\n * select(KeyExchangeAlgorithm) {\n * case dh_anon:\n * ServerDHParams params;\n * case dhe_dss:\n * case dhe_rsa:\n * ServerDHParams params;\n * digitally-signed struct {\n * opaque client_random[32];\n * opaque server_random[32];\n * ServerDHParams params;\n * } signed_params;\n * case rsa:\n * case dh_dss:\n * case dh_rsa:\n * struct {};\n * };\n * } ServerKeyExchange;\n *\n * @param c the connection.\n * @param record the record.\n * @param length the length of the handshake message.\n */\ntls.handleServerKeyExchange = function(c, record, length) {\n // this implementation only supports RSA, no Diffie-Hellman support\n // so any length > 0 is invalid\n if(length > 0) {\n return c.error(c, {\n message: 'Invalid key parameters. Only RSA is supported.',\n send: true,\n alert: {\n level: tls.Alert.Level.fatal,\n description: tls.Alert.Description.unsupported_certificate\n }\n });\n }\n\n // expect an optional CertificateRequest message next\n c.expect = SCR;\n\n // continue\n c.process();\n};\n\n/**\n * Called when a client receives a ClientKeyExchange record.\n *\n * @param c the connection.\n * @param record the record.\n * @param length the length of the handshake message.\n */\ntls.handleClientKeyExchange = function(c, record, length) {\n // this implementation only supports RSA, no Diffie-Hellman support\n // so any length < 48 is invalid\n if(length < 48) {\n return c.error(c, {\n message: 'Invalid key parameters. Only RSA is supported.',\n send: true,\n alert: {\n level: tls.Alert.Level.fatal,\n description: tls.Alert.Description.unsupported_certificate\n }\n });\n }\n\n var b = record.fragment;\n var msg = {\n enc_pre_master_secret: readVector(b, 2).getBytes()\n };\n\n // do rsa decryption\n var privateKey = null;\n if(c.getPrivateKey) {\n try {\n privateKey = c.getPrivateKey(c, c.session.serverCertificate);\n privateKey = forge.pki.privateKeyFromPem(privateKey);\n } catch(ex) {\n c.error(c, {\n message: 'Could not get private key.',\n cause: ex,\n send: true,\n alert: {\n level: tls.Alert.Level.fatal,\n description: tls.Alert.Description.internal_error\n }\n });\n }\n }\n\n if(privateKey === null) {\n return c.error(c, {\n message: 'No private key set.',\n send: true,\n alert: {\n level: tls.Alert.Level.fatal,\n description: tls.Alert.Description.internal_error\n }\n });\n }\n\n try {\n // decrypt 48-byte pre-master secret\n var sp = c.session.sp;\n sp.pre_master_secret = privateKey.decrypt(msg.enc_pre_master_secret);\n\n // ensure client hello version matches first 2 bytes\n var version = c.session.clientHelloVersion;\n if(version.major !== sp.pre_master_secret.charCodeAt(0) ||\n version.minor !== sp.pre_master_secret.charCodeAt(1)) {\n // error, do not send alert (see BLEI attack below)\n throw new Error('TLS version rollback attack detected.');\n }\n } catch(ex) {\n /* Note: Daniel Bleichenbacher [BLEI] can be used to attack a\n TLS server which is using PKCS#1 encoded RSA, so instead of\n failing here, we generate 48 random bytes and use that as\n the pre-master secret. */\n sp.pre_master_secret = forge.random.getBytes(48);\n }\n\n // expect a CertificateVerify message if a Certificate was received that\n // does not have fixed Diffie-Hellman params, otherwise expect\n // ChangeCipherSpec\n c.expect = CCC;\n if(c.session.clientCertificate !== null) {\n // only RSA support, so expect CertificateVerify\n // TODO: support Diffie-Hellman\n c.expect = CCV;\n }\n\n // continue\n c.process();\n};\n\n/**\n * Called when a client receives a CertificateRequest record.\n *\n * When this message will be sent:\n * A non-anonymous server can optionally request a certificate from the\n * client, if appropriate for the selected cipher suite. This message, if\n * sent, will immediately follow the Server Key Exchange message (if it is\n * sent; otherwise, the Server Certificate message).\n *\n * enum {\n * rsa_sign(1), dss_sign(2), rsa_fixed_dh(3), dss_fixed_dh(4),\n * rsa_ephemeral_dh_RESERVED(5), dss_ephemeral_dh_RESERVED(6),\n * fortezza_dms_RESERVED(20), (255)\n * } ClientCertificateType;\n *\n * opaque DistinguishedName<1..2^16-1>;\n *\n * struct {\n * ClientCertificateType certificate_types<1..2^8-1>;\n * SignatureAndHashAlgorithm supported_signature_algorithms<2^16-1>;\n * DistinguishedName certificate_authorities<0..2^16-1>;\n * } CertificateRequest;\n *\n * @param c the connection.\n * @param record the record.\n * @param length the length of the handshake message.\n */\ntls.handleCertificateRequest = function(c, record, length) {\n // minimum of 3 bytes in message\n if(length < 3) {\n return c.error(c, {\n message: 'Invalid CertificateRequest. Message too short.',\n send: true,\n alert: {\n level: tls.Alert.Level.fatal,\n description: tls.Alert.Description.illegal_parameter\n }\n });\n }\n\n // TODO: TLS 1.2+ has different format including\n // SignatureAndHashAlgorithm after cert types\n var b = record.fragment;\n var msg = {\n certificate_types: readVector(b, 1),\n certificate_authorities: readVector(b, 2)\n };\n\n // save certificate request in session\n c.session.certificateRequest = msg;\n\n // expect a ServerHelloDone message next\n c.expect = SHD;\n\n // continue\n c.process();\n};\n\n/**\n * Called when a server receives a CertificateVerify record.\n *\n * @param c the connection.\n * @param record the record.\n * @param length the length of the handshake message.\n */\ntls.handleCertificateVerify = function(c, record, length) {\n if(length < 2) {\n return c.error(c, {\n message: 'Invalid CertificateVerify. Message too short.',\n send: true,\n alert: {\n level: tls.Alert.Level.fatal,\n description: tls.Alert.Description.illegal_parameter\n }\n });\n }\n\n // rewind to get full bytes for message so it can be manually\n // digested below (special case for CertificateVerify messages because\n // they must be digested *after* handling as opposed to all others)\n var b = record.fragment;\n b.read -= 4;\n var msgBytes = b.bytes();\n b.read += 4;\n\n var msg = {\n signature: readVector(b, 2).getBytes()\n };\n\n // TODO: add support for DSA\n\n // generate data to verify\n var verify = forge.util.createBuffer();\n verify.putBuffer(c.session.md5.digest());\n verify.putBuffer(c.session.sha1.digest());\n verify = verify.getBytes();\n\n try {\n var cert = c.session.clientCertificate;\n /*b = forge.pki.rsa.decrypt(\n msg.signature, cert.publicKey, true, verify.length);\n if(b !== verify) {*/\n if(!cert.publicKey.verify(verify, msg.signature, 'NONE')) {\n throw new Error('CertificateVerify signature does not match.');\n }\n\n // digest message now that it has been handled\n c.session.md5.update(msgBytes);\n c.session.sha1.update(msgBytes);\n } catch(ex) {\n return c.error(c, {\n message: 'Bad signature in CertificateVerify.',\n send: true,\n alert: {\n level: tls.Alert.Level.fatal,\n description: tls.Alert.Description.handshake_failure\n }\n });\n }\n\n // expect ChangeCipherSpec\n c.expect = CCC;\n\n // continue\n c.process();\n};\n\n/**\n * Called when a client receives a ServerHelloDone record.\n *\n * When this message will be sent:\n * The server hello done message is sent by the server to indicate the end\n * of the server hello and associated messages. After sending this message\n * the server will wait for a client response.\n *\n * Meaning of this message:\n * This message means that the server is done sending messages to support\n * the key exchange, and the client can proceed with its phase of the key\n * exchange.\n *\n * Upon receipt of the server hello done message the client should verify\n * that the server provided a valid certificate if required and check that\n * the server hello parameters are acceptable.\n *\n * struct {} ServerHelloDone;\n *\n * @param c the connection.\n * @param record the record.\n * @param length the length of the handshake message.\n */\ntls.handleServerHelloDone = function(c, record, length) {\n // len must be 0 bytes\n if(length > 0) {\n return c.error(c, {\n message: 'Invalid ServerHelloDone message. Invalid length.',\n send: true,\n alert: {\n level: tls.Alert.Level.fatal,\n description: tls.Alert.Description.record_overflow\n }\n });\n }\n\n if(c.serverCertificate === null) {\n // no server certificate was provided\n var error = {\n message: 'No server certificate provided. Not enough security.',\n send: true,\n alert: {\n level: tls.Alert.Level.fatal,\n description: tls.Alert.Description.insufficient_security\n }\n };\n\n // call application callback\n var depth = 0;\n var ret = c.verify(c, error.alert.description, depth, []);\n if(ret !== true) {\n // check for custom alert info\n if(ret || ret === 0) {\n // set custom message and alert description\n if(typeof ret === 'object' && !forge.util.isArray(ret)) {\n if(ret.message) {\n error.message = ret.message;\n }\n if(ret.alert) {\n error.alert.description = ret.alert;\n }\n } else if(typeof ret === 'number') {\n // set custom alert description\n error.alert.description = ret;\n }\n }\n\n // send error\n return c.error(c, error);\n }\n }\n\n // create client certificate message if requested\n if(c.session.certificateRequest !== null) {\n record = tls.createRecord(c, {\n type: tls.ContentType.handshake,\n data: tls.createCertificate(c)\n });\n tls.queue(c, record);\n }\n\n // create client key exchange message\n record = tls.createRecord(c, {\n type: tls.ContentType.handshake,\n data: tls.createClientKeyExchange(c)\n });\n tls.queue(c, record);\n\n // expect no messages until the following callback has been called\n c.expect = SER;\n\n // create callback to handle client signature (for client-certs)\n var callback = function(c, signature) {\n if(c.session.certificateRequest !== null &&\n c.session.clientCertificate !== null) {\n // create certificate verify message\n tls.queue(c, tls.createRecord(c, {\n type: tls.ContentType.handshake,\n data: tls.createCertificateVerify(c, signature)\n }));\n }\n\n // create change cipher spec message\n tls.queue(c, tls.createRecord(c, {\n type: tls.ContentType.change_cipher_spec,\n data: tls.createChangeCipherSpec()\n }));\n\n // create pending state\n c.state.pending = tls.createConnectionState(c);\n\n // change current write state to pending write state\n c.state.current.write = c.state.pending.write;\n\n // create finished message\n tls.queue(c, tls.createRecord(c, {\n type: tls.ContentType.handshake,\n data: tls.createFinished(c)\n }));\n\n // expect a server ChangeCipherSpec message next\n c.expect = SCC;\n\n // send records\n tls.flush(c);\n\n // continue\n c.process();\n };\n\n // if there is no certificate request or no client certificate, do\n // callback immediately\n if(c.session.certificateRequest === null ||\n c.session.clientCertificate === null) {\n return callback(c, null);\n }\n\n // otherwise get the client signature\n tls.getClientSignature(c, callback);\n};\n\n/**\n * Called when a ChangeCipherSpec record is received.\n *\n * @param c the connection.\n * @param record the record.\n */\ntls.handleChangeCipherSpec = function(c, record) {\n if(record.fragment.getByte() !== 0x01) {\n return c.error(c, {\n message: 'Invalid ChangeCipherSpec message received.',\n send: true,\n alert: {\n level: tls.Alert.Level.fatal,\n description: tls.Alert.Description.illegal_parameter\n }\n });\n }\n\n // create pending state if:\n // 1. Resuming session in client mode OR\n // 2. NOT resuming session in server mode\n var client = (c.entity === tls.ConnectionEnd.client);\n if((c.session.resuming && client) || (!c.session.resuming && !client)) {\n c.state.pending = tls.createConnectionState(c);\n }\n\n // change current read state to pending read state\n c.state.current.read = c.state.pending.read;\n\n // clear pending state if:\n // 1. NOT resuming session in client mode OR\n // 2. resuming a session in server mode\n if((!c.session.resuming && client) || (c.session.resuming && !client)) {\n c.state.pending = null;\n }\n\n // expect a Finished record next\n c.expect = client ? SFI : CFI;\n\n // continue\n c.process();\n};\n\n/**\n * Called when a Finished record is received.\n *\n * When this message will be sent:\n * A finished message is always sent immediately after a change\n * cipher spec message to verify that the key exchange and\n * authentication processes were successful. It is essential that a\n * change cipher spec message be received between the other\n * handshake messages and the Finished message.\n *\n * Meaning of this message:\n * The finished message is the first protected with the just-\n * negotiated algorithms, keys, and secrets. Recipients of finished\n * messages must verify that the contents are correct. Once a side\n * has sent its Finished message and received and validated the\n * Finished message from its peer, it may begin to send and receive\n * application data over the connection.\n *\n * struct {\n * opaque verify_data[verify_data_length];\n * } Finished;\n *\n * verify_data\n * PRF(master_secret, finished_label, Hash(handshake_messages))\n * [0..verify_data_length-1];\n *\n * finished_label\n * For Finished messages sent by the client, the string\n * \"client finished\". For Finished messages sent by the server, the\n * string \"server finished\".\n *\n * verify_data_length depends on the cipher suite. If it is not specified\n * by the cipher suite, then it is 12. Versions of TLS < 1.2 always used\n * 12 bytes.\n *\n * @param c the connection.\n * @param record the record.\n * @param length the length of the handshake message.\n */\ntls.handleFinished = function(c, record, length) {\n // rewind to get full bytes for message so it can be manually\n // digested below (special case for Finished messages because they\n // must be digested *after* handling as opposed to all others)\n var b = record.fragment;\n b.read -= 4;\n var msgBytes = b.bytes();\n b.read += 4;\n\n // message contains only verify_data\n var vd = record.fragment.getBytes();\n\n // ensure verify data is correct\n b = forge.util.createBuffer();\n b.putBuffer(c.session.md5.digest());\n b.putBuffer(c.session.sha1.digest());\n\n // set label based on entity type\n var client = (c.entity === tls.ConnectionEnd.client);\n var label = client ? 'server finished' : 'client finished';\n\n // TODO: determine prf function and verify length for TLS 1.2\n var sp = c.session.sp;\n var vdl = 12;\n var prf = prf_TLS1;\n b = prf(sp.master_secret, label, b.getBytes(), vdl);\n if(b.getBytes() !== vd) {\n return c.error(c, {\n message: 'Invalid verify_data in Finished message.',\n send: true,\n alert: {\n level: tls.Alert.Level.fatal,\n description: tls.Alert.Description.decrypt_error\n }\n });\n }\n\n // digest finished message now that it has been handled\n c.session.md5.update(msgBytes);\n c.session.sha1.update(msgBytes);\n\n // resuming session as client or NOT resuming session as server\n if((c.session.resuming && client) || (!c.session.resuming && !client)) {\n // create change cipher spec message\n tls.queue(c, tls.createRecord(c, {\n type: tls.ContentType.change_cipher_spec,\n data: tls.createChangeCipherSpec()\n }));\n\n // change current write state to pending write state, clear pending\n c.state.current.write = c.state.pending.write;\n c.state.pending = null;\n\n // create finished message\n tls.queue(c, tls.createRecord(c, {\n type: tls.ContentType.handshake,\n data: tls.createFinished(c)\n }));\n }\n\n // expect application data next\n c.expect = client ? SAD : CAD;\n\n // handshake complete\n c.handshaking = false;\n ++c.handshakes;\n\n // save access to peer certificate\n c.peerCertificate = client ?\n c.session.serverCertificate : c.session.clientCertificate;\n\n // send records\n tls.flush(c);\n\n // now connected\n c.isConnected = true;\n c.connected(c);\n\n // continue\n c.process();\n};\n\n/**\n * Called when an Alert record is received.\n *\n * @param c the connection.\n * @param record the record.\n */\ntls.handleAlert = function(c, record) {\n // read alert\n var b = record.fragment;\n var alert = {\n level: b.getByte(),\n description: b.getByte()\n };\n\n // TODO: consider using a table?\n // get appropriate message\n var msg;\n switch(alert.description) {\n case tls.Alert.Description.close_notify:\n msg = 'Connection closed.';\n break;\n case tls.Alert.Description.unexpected_message:\n msg = 'Unexpected message.';\n break;\n case tls.Alert.Description.bad_record_mac:\n msg = 'Bad record MAC.';\n break;\n case tls.Alert.Description.decryption_failed:\n msg = 'Decryption failed.';\n break;\n case tls.Alert.Description.record_overflow:\n msg = 'Record overflow.';\n break;\n case tls.Alert.Description.decompression_failure:\n msg = 'Decompression failed.';\n break;\n case tls.Alert.Description.handshake_failure:\n msg = 'Handshake failure.';\n break;\n case tls.Alert.Description.bad_certificate:\n msg = 'Bad certificate.';\n break;\n case tls.Alert.Description.unsupported_certificate:\n msg = 'Unsupported certificate.';\n break;\n case tls.Alert.Description.certificate_revoked:\n msg = 'Certificate revoked.';\n break;\n case tls.Alert.Description.certificate_expired:\n msg = 'Certificate expired.';\n break;\n case tls.Alert.Description.certificate_unknown:\n msg = 'Certificate unknown.';\n break;\n case tls.Alert.Description.illegal_parameter:\n msg = 'Illegal parameter.';\n break;\n case tls.Alert.Description.unknown_ca:\n msg = 'Unknown certificate authority.';\n break;\n case tls.Alert.Description.access_denied:\n msg = 'Access denied.';\n break;\n case tls.Alert.Description.decode_error:\n msg = 'Decode error.';\n break;\n case tls.Alert.Description.decrypt_error:\n msg = 'Decrypt error.';\n break;\n case tls.Alert.Description.export_restriction:\n msg = 'Export restriction.';\n break;\n case tls.Alert.Description.protocol_version:\n msg = 'Unsupported protocol version.';\n break;\n case tls.Alert.Description.insufficient_security:\n msg = 'Insufficient security.';\n break;\n case tls.Alert.Description.internal_error:\n msg = 'Internal error.';\n break;\n case tls.Alert.Description.user_canceled:\n msg = 'User canceled.';\n break;\n case tls.Alert.Description.no_renegotiation:\n msg = 'Renegotiation not supported.';\n break;\n default:\n msg = 'Unknown error.';\n break;\n }\n\n // close connection on close_notify, not an error\n if(alert.description === tls.Alert.Description.close_notify) {\n return c.close();\n }\n\n // call error handler\n c.error(c, {\n message: msg,\n send: false,\n // origin is the opposite end\n origin: (c.entity === tls.ConnectionEnd.client) ? 'server' : 'client',\n alert: alert\n });\n\n // continue\n c.process();\n};\n\n/**\n * Called when a Handshake record is received.\n *\n * @param c the connection.\n * @param record the record.\n */\ntls.handleHandshake = function(c, record) {\n // get the handshake type and message length\n var b = record.fragment;\n var type = b.getByte();\n var length = b.getInt24();\n\n // see if the record fragment doesn't yet contain the full message\n if(length > b.length()) {\n // cache the record, clear its fragment, and reset the buffer read\n // pointer before the type and length were read\n c.fragmented = record;\n record.fragment = forge.util.createBuffer();\n b.read -= 4;\n\n // continue\n return c.process();\n }\n\n // full message now available, clear cache, reset read pointer to\n // before type and length\n c.fragmented = null;\n b.read -= 4;\n\n // save the handshake bytes for digestion after handler is found\n // (include type and length of handshake msg)\n var bytes = b.bytes(length + 4);\n\n // restore read pointer\n b.read += 4;\n\n // handle expected message\n if(type in hsTable[c.entity][c.expect]) {\n // initialize server session\n if(c.entity === tls.ConnectionEnd.server && !c.open && !c.fail) {\n c.handshaking = true;\n c.session = {\n version: null,\n extensions: {\n server_name: {\n serverNameList: []\n }\n },\n cipherSuite: null,\n compressionMethod: null,\n serverCertificate: null,\n clientCertificate: null,\n md5: forge.md.md5.create(),\n sha1: forge.md.sha1.create()\n };\n }\n\n /* Update handshake messages digest. Finished and CertificateVerify\n messages are not digested here. They can't be digested as part of\n the verify_data that they contain. These messages are manually\n digested in their handlers. HelloRequest messages are simply never\n included in the handshake message digest according to spec. */\n if(type !== tls.HandshakeType.hello_request &&\n type !== tls.HandshakeType.certificate_verify &&\n type !== tls.HandshakeType.finished) {\n c.session.md5.update(bytes);\n c.session.sha1.update(bytes);\n }\n\n // handle specific handshake type record\n hsTable[c.entity][c.expect][type](c, record, length);\n } else {\n // unexpected record\n tls.handleUnexpected(c, record);\n }\n};\n\n/**\n * Called when an ApplicationData record is received.\n *\n * @param c the connection.\n * @param record the record.\n */\ntls.handleApplicationData = function(c, record) {\n // buffer data, notify that its ready\n c.data.putBuffer(record.fragment);\n c.dataReady(c);\n\n // continue\n c.process();\n};\n\n/**\n * Called when a Heartbeat record is received.\n *\n * @param c the connection.\n * @param record the record.\n */\ntls.handleHeartbeat = function(c, record) {\n // get the heartbeat type and payload\n var b = record.fragment;\n var type = b.getByte();\n var length = b.getInt16();\n var payload = b.getBytes(length);\n\n if(type === tls.HeartbeatMessageType.heartbeat_request) {\n // discard request during handshake or if length is too large\n if(c.handshaking || length > payload.length) {\n // continue\n return c.process();\n }\n // retransmit payload\n tls.queue(c, tls.createRecord(c, {\n type: tls.ContentType.heartbeat,\n data: tls.createHeartbeat(\n tls.HeartbeatMessageType.heartbeat_response, payload)\n }));\n tls.flush(c);\n } else if(type === tls.HeartbeatMessageType.heartbeat_response) {\n // check payload against expected payload, discard heartbeat if no match\n if(payload !== c.expectedHeartbeatPayload) {\n // continue\n return c.process();\n }\n\n // notify that a valid heartbeat was received\n if(c.heartbeatReceived) {\n c.heartbeatReceived(c, forge.util.createBuffer(payload));\n }\n }\n\n // continue\n c.process();\n};\n\n/**\n * The transistional state tables for receiving TLS records. It maps the\n * current TLS engine state and a received record to a function to handle the\n * record and update the state.\n *\n * For instance, if the current state is SHE, then the TLS engine is expecting\n * a ServerHello record. Once a record is received, the handler function is\n * looked up using the state SHE and the record's content type.\n *\n * The resulting function will either be an error handler or a record handler.\n * The function will take whatever action is appropriate and update the state\n * for the next record.\n *\n * The states are all based on possible server record types. Note that the\n * client will never specifically expect to receive a HelloRequest or an alert\n * from the server so there is no state that reflects this. These messages may\n * occur at any time.\n *\n * There are two tables for mapping states because there is a second tier of\n * types for handshake messages. Once a record with a content type of handshake\n * is received, the handshake record handler will look up the handshake type in\n * the secondary map to get its appropriate handler.\n *\n * Valid message orders are as follows:\n *\n * =======================FULL HANDSHAKE======================\n * Client Server\n *\n * ClientHello -------->\n * ServerHello\n * Certificate*\n * ServerKeyExchange*\n * CertificateRequest*\n * <-------- ServerHelloDone\n * Certificate*\n * ClientKeyExchange\n * CertificateVerify*\n * [ChangeCipherSpec]\n * Finished -------->\n * [ChangeCipherSpec]\n * <-------- Finished\n * Application Data <-------> Application Data\n *\n * =====================SESSION RESUMPTION=====================\n * Client Server\n *\n * ClientHello -------->\n * ServerHello\n * [ChangeCipherSpec]\n * <-------- Finished\n * [ChangeCipherSpec]\n * Finished -------->\n * Application Data <-------> Application Data\n */\n// client expect states (indicate which records are expected to be received)\nvar SHE = 0; // rcv server hello\nvar SCE = 1; // rcv server certificate\nvar SKE = 2; // rcv server key exchange\nvar SCR = 3; // rcv certificate request\nvar SHD = 4; // rcv server hello done\nvar SCC = 5; // rcv change cipher spec\nvar SFI = 6; // rcv finished\nvar SAD = 7; // rcv application data\nvar SER = 8; // not expecting any messages at this point\n\n// server expect states\nvar CHE = 0; // rcv client hello\nvar CCE = 1; // rcv client certificate\nvar CKE = 2; // rcv client key exchange\nvar CCV = 3; // rcv certificate verify\nvar CCC = 4; // rcv change cipher spec\nvar CFI = 5; // rcv finished\nvar CAD = 6; // rcv application data\nvar CER = 7; // not expecting any messages at this point\n\n// map client current expect state and content type to function\nvar __ = tls.handleUnexpected;\nvar R0 = tls.handleChangeCipherSpec;\nvar R1 = tls.handleAlert;\nvar R2 = tls.handleHandshake;\nvar R3 = tls.handleApplicationData;\nvar R4 = tls.handleHeartbeat;\nvar ctTable = [];\nctTable[tls.ConnectionEnd.client] = [\n// CC,AL,HS,AD,HB\n/*SHE*/[__,R1,R2,__,R4],\n/*SCE*/[__,R1,R2,__,R4],\n/*SKE*/[__,R1,R2,__,R4],\n/*SCR*/[__,R1,R2,__,R4],\n/*SHD*/[__,R1,R2,__,R4],\n/*SCC*/[R0,R1,__,__,R4],\n/*SFI*/[__,R1,R2,__,R4],\n/*SAD*/[__,R1,R2,R3,R4],\n/*SER*/[__,R1,R2,__,R4]\n];\n\n// map server current expect state and content type to function\nctTable[tls.ConnectionEnd.server] = [\n// CC,AL,HS,AD\n/*CHE*/[__,R1,R2,__,R4],\n/*CCE*/[__,R1,R2,__,R4],\n/*CKE*/[__,R1,R2,__,R4],\n/*CCV*/[__,R1,R2,__,R4],\n/*CCC*/[R0,R1,__,__,R4],\n/*CFI*/[__,R1,R2,__,R4],\n/*CAD*/[__,R1,R2,R3,R4],\n/*CER*/[__,R1,R2,__,R4]\n];\n\n// map client current expect state and handshake type to function\nvar H0 = tls.handleHelloRequest;\nvar H1 = tls.handleServerHello;\nvar H2 = tls.handleCertificate;\nvar H3 = tls.handleServerKeyExchange;\nvar H4 = tls.handleCertificateRequest;\nvar H5 = tls.handleServerHelloDone;\nvar H6 = tls.handleFinished;\nvar hsTable = [];\nhsTable[tls.ConnectionEnd.client] = [\n// HR,01,SH,03,04,05,06,07,08,09,10,SC,SK,CR,HD,15,CK,17,18,19,FI\n/*SHE*/[__,__,H1,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__],\n/*SCE*/[H0,__,__,__,__,__,__,__,__,__,__,H2,H3,H4,H5,__,__,__,__,__,__],\n/*SKE*/[H0,__,__,__,__,__,__,__,__,__,__,__,H3,H4,H5,__,__,__,__,__,__],\n/*SCR*/[H0,__,__,__,__,__,__,__,__,__,__,__,__,H4,H5,__,__,__,__,__,__],\n/*SHD*/[H0,__,__,__,__,__,__,__,__,__,__,__,__,__,H5,__,__,__,__,__,__],\n/*SCC*/[H0,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__],\n/*SFI*/[H0,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,H6],\n/*SAD*/[H0,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__],\n/*SER*/[H0,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__]\n];\n\n// map server current expect state and handshake type to function\n// Note: CAD[CH] does not map to FB because renegotation is prohibited\nvar H7 = tls.handleClientHello;\nvar H8 = tls.handleClientKeyExchange;\nvar H9 = tls.handleCertificateVerify;\nhsTable[tls.ConnectionEnd.server] = [\n// 01,CH,02,03,04,05,06,07,08,09,10,CC,12,13,14,CV,CK,17,18,19,FI\n/*CHE*/[__,H7,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__],\n/*CCE*/[__,__,__,__,__,__,__,__,__,__,__,H2,__,__,__,__,__,__,__,__,__],\n/*CKE*/[__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,H8,__,__,__,__],\n/*CCV*/[__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,H9,__,__,__,__,__],\n/*CCC*/[__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__],\n/*CFI*/[__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,H6],\n/*CAD*/[__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__],\n/*CER*/[__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__]\n];\n\n/**\n * Generates the master_secret and keys using the given security parameters.\n *\n * The security parameters for a TLS connection state are defined as such:\n *\n * struct {\n * ConnectionEnd entity;\n * PRFAlgorithm prf_algorithm;\n * BulkCipherAlgorithm bulk_cipher_algorithm;\n * CipherType cipher_type;\n * uint8 enc_key_length;\n * uint8 block_length;\n * uint8 fixed_iv_length;\n * uint8 record_iv_length;\n * MACAlgorithm mac_algorithm;\n * uint8 mac_length;\n * uint8 mac_key_length;\n * CompressionMethod compression_algorithm;\n * opaque master_secret[48];\n * opaque client_random[32];\n * opaque server_random[32];\n * } SecurityParameters;\n *\n * Note that this definition is from TLS 1.2. In TLS 1.0 some of these\n * parameters are ignored because, for instance, the PRFAlgorithm is a\n * builtin-fixed algorithm combining iterations of MD5 and SHA-1 in TLS 1.0.\n *\n * The Record Protocol requires an algorithm to generate keys required by the\n * current connection state.\n *\n * The master secret is expanded into a sequence of secure bytes, which is then\n * split to a client write MAC key, a server write MAC key, a client write\n * encryption key, and a server write encryption key. In TLS 1.0 a client write\n * IV and server write IV are also generated. Each of these is generated from\n * the byte sequence in that order. Unused values are empty. In TLS 1.2, some\n * AEAD ciphers may additionally require a client write IV and a server write\n * IV (see Section 6.2.3.3).\n *\n * When keys, MAC keys, and IVs are generated, the master secret is used as an\n * entropy source.\n *\n * To generate the key material, compute:\n *\n * master_secret = PRF(pre_master_secret, \"master secret\",\n * ClientHello.random + ServerHello.random)\n *\n * key_block = PRF(SecurityParameters.master_secret,\n * \"key expansion\",\n * SecurityParameters.server_random +\n * SecurityParameters.client_random);\n *\n * until enough output has been generated. Then, the key_block is\n * partitioned as follows:\n *\n * client_write_MAC_key[SecurityParameters.mac_key_length]\n * server_write_MAC_key[SecurityParameters.mac_key_length]\n * client_write_key[SecurityParameters.enc_key_length]\n * server_write_key[SecurityParameters.enc_key_length]\n * client_write_IV[SecurityParameters.fixed_iv_length]\n * server_write_IV[SecurityParameters.fixed_iv_length]\n *\n * In TLS 1.2, the client_write_IV and server_write_IV are only generated for\n * implicit nonce techniques as described in Section 3.2.1 of [AEAD]. This\n * implementation uses TLS 1.0 so IVs are generated.\n *\n * Implementation note: The currently defined cipher suite which requires the\n * most material is AES_256_CBC_SHA256. It requires 2 x 32 byte keys and 2 x 32\n * byte MAC keys, for a total 128 bytes of key material. In TLS 1.0 it also\n * requires 2 x 16 byte IVs, so it actually takes 160 bytes of key material.\n *\n * @param c the connection.\n * @param sp the security parameters to use.\n *\n * @return the security keys.\n */\ntls.generateKeys = function(c, sp) {\n // TLS_RSA_WITH_AES_128_CBC_SHA (required to be compliant with TLS 1.2) &\n // TLS_RSA_WITH_AES_256_CBC_SHA are the only cipher suites implemented\n // at present\n\n // TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA is required to be compliant with\n // TLS 1.0 but we don't care right now because AES is better and we have\n // an implementation for it\n\n // TODO: TLS 1.2 implementation\n /*\n // determine the PRF\n var prf;\n switch(sp.prf_algorithm) {\n case tls.PRFAlgorithm.tls_prf_sha256:\n prf = prf_sha256;\n break;\n default:\n // should never happen\n throw new Error('Invalid PRF');\n }\n */\n\n // TLS 1.0/1.1 implementation\n var prf = prf_TLS1;\n\n // concatenate server and client random\n var random = sp.client_random + sp.server_random;\n\n // only create master secret if session is new\n if(!c.session.resuming) {\n // create master secret, clean up pre-master secret\n sp.master_secret = prf(\n sp.pre_master_secret, 'master secret', random, 48).bytes();\n sp.pre_master_secret = null;\n }\n\n // generate the amount of key material needed\n random = sp.server_random + sp.client_random;\n var length = 2 * sp.mac_key_length + 2 * sp.enc_key_length;\n\n // include IV for TLS/1.0\n var tls10 = (c.version.major === tls.Versions.TLS_1_0.major &&\n c.version.minor === tls.Versions.TLS_1_0.minor);\n if(tls10) {\n length += 2 * sp.fixed_iv_length;\n }\n var km = prf(sp.master_secret, 'key expansion', random, length);\n\n // split the key material into the MAC and encryption keys\n var rval = {\n client_write_MAC_key: km.getBytes(sp.mac_key_length),\n server_write_MAC_key: km.getBytes(sp.mac_key_length),\n client_write_key: km.getBytes(sp.enc_key_length),\n server_write_key: km.getBytes(sp.enc_key_length)\n };\n\n // include TLS 1.0 IVs\n if(tls10) {\n rval.client_write_IV = km.getBytes(sp.fixed_iv_length);\n rval.server_write_IV = km.getBytes(sp.fixed_iv_length);\n }\n\n return rval;\n};\n\n/**\n * Creates a new initialized TLS connection state. A connection state has\n * a read mode and a write mode.\n *\n * compression state:\n * The current state of the compression algorithm.\n *\n * cipher state:\n * The current state of the encryption algorithm. This will consist of the\n * scheduled key for that connection. For stream ciphers, this will also\n * contain whatever state information is necessary to allow the stream to\n * continue to encrypt or decrypt data.\n *\n * MAC key:\n * The MAC key for the connection.\n *\n * sequence number:\n * Each connection state contains a sequence number, which is maintained\n * separately for read and write states. The sequence number MUST be set to\n * zero whenever a connection state is made the active state. Sequence\n * numbers are of type uint64 and may not exceed 2^64-1. Sequence numbers do\n * not wrap. If a TLS implementation would need to wrap a sequence number,\n * it must renegotiate instead. A sequence number is incremented after each\n * record: specifically, the first record transmitted under a particular\n * connection state MUST use sequence number 0.\n *\n * @param c the connection.\n *\n * @return the new initialized TLS connection state.\n */\ntls.createConnectionState = function(c) {\n var client = (c.entity === tls.ConnectionEnd.client);\n\n var createMode = function() {\n var mode = {\n // two 32-bit numbers, first is most significant\n sequenceNumber: [0, 0],\n macKey: null,\n macLength: 0,\n macFunction: null,\n cipherState: null,\n cipherFunction: function(record) {return true;},\n compressionState: null,\n compressFunction: function(record) {return true;},\n updateSequenceNumber: function() {\n if(mode.sequenceNumber[1] === 0xFFFFFFFF) {\n mode.sequenceNumber[1] = 0;\n ++mode.sequenceNumber[0];\n } else {\n ++mode.sequenceNumber[1];\n }\n }\n };\n return mode;\n };\n var state = {\n read: createMode(),\n write: createMode()\n };\n\n // update function in read mode will decrypt then decompress a record\n state.read.update = function(c, record) {\n if(!state.read.cipherFunction(record, state.read)) {\n c.error(c, {\n message: 'Could not decrypt record or bad MAC.',\n send: true,\n alert: {\n level: tls.Alert.Level.fatal,\n // doesn't matter if decryption failed or MAC was\n // invalid, return the same error so as not to reveal\n // which one occurred\n description: tls.Alert.Description.bad_record_mac\n }\n });\n } else if(!state.read.compressFunction(c, record, state.read)) {\n c.error(c, {\n message: 'Could not decompress record.',\n send: true,\n alert: {\n level: tls.Alert.Level.fatal,\n description: tls.Alert.Description.decompression_failure\n }\n });\n }\n return !c.fail;\n };\n\n // update function in write mode will compress then encrypt a record\n state.write.update = function(c, record) {\n if(!state.write.compressFunction(c, record, state.write)) {\n // error, but do not send alert since it would require\n // compression as well\n c.error(c, {\n message: 'Could not compress record.',\n send: false,\n alert: {\n level: tls.Alert.Level.fatal,\n description: tls.Alert.Description.internal_error\n }\n });\n } else if(!state.write.cipherFunction(record, state.write)) {\n // error, but do not send alert since it would require\n // encryption as well\n c.error(c, {\n message: 'Could not encrypt record.',\n send: false,\n alert: {\n level: tls.Alert.Level.fatal,\n description: tls.Alert.Description.internal_error\n }\n });\n }\n return !c.fail;\n };\n\n // handle security parameters\n if(c.session) {\n var sp = c.session.sp;\n c.session.cipherSuite.initSecurityParameters(sp);\n\n // generate keys\n sp.keys = tls.generateKeys(c, sp);\n state.read.macKey = client ?\n sp.keys.server_write_MAC_key : sp.keys.client_write_MAC_key;\n state.write.macKey = client ?\n sp.keys.client_write_MAC_key : sp.keys.server_write_MAC_key;\n\n // cipher suite setup\n c.session.cipherSuite.initConnectionState(state, c, sp);\n\n // compression setup\n switch(sp.compression_algorithm) {\n case tls.CompressionMethod.none:\n break;\n case tls.CompressionMethod.deflate:\n state.read.compressFunction = inflate;\n state.write.compressFunction = deflate;\n break;\n default:\n throw new Error('Unsupported compression algorithm.');\n }\n }\n\n return state;\n};\n\n/**\n * Creates a Random structure.\n *\n * struct {\n * uint32 gmt_unix_time;\n * opaque random_bytes[28];\n * } Random;\n *\n * gmt_unix_time:\n * The current time and date in standard UNIX 32-bit format (seconds since\n * the midnight starting Jan 1, 1970, UTC, ignoring leap seconds) according\n * to the sender's internal clock. Clocks are not required to be set\n * correctly by the basic TLS protocol; higher-level or application\n * protocols may define additional requirements. Note that, for historical\n * reasons, the data element is named using GMT, the predecessor of the\n * current worldwide time base, UTC.\n * random_bytes:\n * 28 bytes generated by a secure random number generator.\n *\n * @return the Random structure as a byte array.\n */\ntls.createRandom = function() {\n // get UTC milliseconds\n var d = new Date();\n var utc = +d + d.getTimezoneOffset() * 60000;\n var rval = forge.util.createBuffer();\n rval.putInt32(utc);\n rval.putBytes(forge.random.getBytes(28));\n return rval;\n};\n\n/**\n * Creates a TLS record with the given type and data.\n *\n * @param c the connection.\n * @param options:\n * type: the record type.\n * data: the plain text data in a byte buffer.\n *\n * @return the created record.\n */\ntls.createRecord = function(c, options) {\n if(!options.data) {\n return null;\n }\n var record = {\n type: options.type,\n version: {\n major: c.version.major,\n minor: c.version.minor\n },\n length: options.data.length(),\n fragment: options.data\n };\n return record;\n};\n\n/**\n * Creates a TLS alert record.\n *\n * @param c the connection.\n * @param alert:\n * level: the TLS alert level.\n * description: the TLS alert description.\n *\n * @return the created alert record.\n */\ntls.createAlert = function(c, alert) {\n var b = forge.util.createBuffer();\n b.putByte(alert.level);\n b.putByte(alert.description);\n return tls.createRecord(c, {\n type: tls.ContentType.alert,\n data: b\n });\n};\n\n/* The structure of a TLS handshake message.\n *\n * struct {\n * HandshakeType msg_type; // handshake type\n * uint24 length; // bytes in message\n * select(HandshakeType) {\n * case hello_request: HelloRequest;\n * case client_hello: ClientHello;\n * case server_hello: ServerHello;\n * case certificate: Certificate;\n * case server_key_exchange: ServerKeyExchange;\n * case certificate_request: CertificateRequest;\n * case server_hello_done: ServerHelloDone;\n * case certificate_verify: CertificateVerify;\n * case client_key_exchange: ClientKeyExchange;\n * case finished: Finished;\n * } body;\n * } Handshake;\n */\n\n/**\n * Creates a ClientHello message.\n *\n * opaque SessionID<0..32>;\n * enum { null(0), deflate(1), (255) } CompressionMethod;\n * uint8 CipherSuite[2];\n *\n * struct {\n * ProtocolVersion client_version;\n * Random random;\n * SessionID session_id;\n * CipherSuite cipher_suites<2..2^16-2>;\n * CompressionMethod compression_methods<1..2^8-1>;\n * select(extensions_present) {\n * case false:\n * struct {};\n * case true:\n * Extension extensions<0..2^16-1>;\n * };\n * } ClientHello;\n *\n * The extension format for extended client hellos and server hellos is:\n *\n * struct {\n * ExtensionType extension_type;\n * opaque extension_data<0..2^16-1>;\n * } Extension;\n *\n * Here:\n *\n * - \"extension_type\" identifies the particular extension type.\n * - \"extension_data\" contains information specific to the particular\n * extension type.\n *\n * The extension types defined in this document are:\n *\n * enum {\n * server_name(0), max_fragment_length(1),\n * client_certificate_url(2), trusted_ca_keys(3),\n * truncated_hmac(4), status_request(5), (65535)\n * } ExtensionType;\n *\n * @param c the connection.\n *\n * @return the ClientHello byte buffer.\n */\ntls.createClientHello = function(c) {\n // save hello version\n c.session.clientHelloVersion = {\n major: c.version.major,\n minor: c.version.minor\n };\n\n // create supported cipher suites\n var cipherSuites = forge.util.createBuffer();\n for(var i = 0; i < c.cipherSuites.length; ++i) {\n var cs = c.cipherSuites[i];\n cipherSuites.putByte(cs.id[0]);\n cipherSuites.putByte(cs.id[1]);\n }\n var cSuites = cipherSuites.length();\n\n // create supported compression methods, null always supported, but\n // also support deflate if connection has inflate and deflate methods\n var compressionMethods = forge.util.createBuffer();\n compressionMethods.putByte(tls.CompressionMethod.none);\n // FIXME: deflate support disabled until issues with raw deflate data\n // without zlib headers are resolved\n /*\n if(c.inflate !== null && c.deflate !== null) {\n compressionMethods.putByte(tls.CompressionMethod.deflate);\n }\n */\n var cMethods = compressionMethods.length();\n\n // create TLS SNI (server name indication) extension if virtual host\n // has been specified, see RFC 3546\n var extensions = forge.util.createBuffer();\n if(c.virtualHost) {\n // create extension struct\n var ext = forge.util.createBuffer();\n ext.putByte(0x00); // type server_name (ExtensionType is 2 bytes)\n ext.putByte(0x00);\n\n /* In order to provide the server name, clients MAY include an\n * extension of type \"server_name\" in the (extended) client hello.\n * The \"extension_data\" field of this extension SHALL contain\n * \"ServerNameList\" where:\n *\n * struct {\n * NameType name_type;\n * select(name_type) {\n * case host_name: HostName;\n * } name;\n * } ServerName;\n *\n * enum {\n * host_name(0), (255)\n * } NameType;\n *\n * opaque HostName<1..2^16-1>;\n *\n * struct {\n * ServerName server_name_list<1..2^16-1>\n * } ServerNameList;\n */\n var serverName = forge.util.createBuffer();\n serverName.putByte(0x00); // type host_name\n writeVector(serverName, 2, forge.util.createBuffer(c.virtualHost));\n\n // ServerNameList is in extension_data\n var snList = forge.util.createBuffer();\n writeVector(snList, 2, serverName);\n writeVector(ext, 2, snList);\n extensions.putBuffer(ext);\n }\n var extLength = extensions.length();\n if(extLength > 0) {\n // add extension vector length\n extLength += 2;\n }\n\n // determine length of the handshake message\n // cipher suites and compression methods size will need to be\n // updated if more get added to the list\n var sessionId = c.session.id;\n var length =\n sessionId.length + 1 + // session ID vector\n 2 + // version (major + minor)\n 4 + 28 + // random time and random bytes\n 2 + cSuites + // cipher suites vector\n 1 + cMethods + // compression methods vector\n extLength; // extensions vector\n\n // build record fragment\n var rval = forge.util.createBuffer();\n rval.putByte(tls.HandshakeType.client_hello);\n rval.putInt24(length); // handshake length\n rval.putByte(c.version.major); // major version\n rval.putByte(c.version.minor); // minor version\n rval.putBytes(c.session.sp.client_random); // random time + bytes\n writeVector(rval, 1, forge.util.createBuffer(sessionId));\n writeVector(rval, 2, cipherSuites);\n writeVector(rval, 1, compressionMethods);\n if(extLength > 0) {\n writeVector(rval, 2, extensions);\n }\n return rval;\n};\n\n/**\n * Creates a ServerHello message.\n *\n * @param c the connection.\n *\n * @return the ServerHello byte buffer.\n */\ntls.createServerHello = function(c) {\n // determine length of the handshake message\n var sessionId = c.session.id;\n var length =\n sessionId.length + 1 + // session ID vector\n 2 + // version (major + minor)\n 4 + 28 + // random time and random bytes\n 2 + // chosen cipher suite\n 1; // chosen compression method\n\n // build record fragment\n var rval = forge.util.createBuffer();\n rval.putByte(tls.HandshakeType.server_hello);\n rval.putInt24(length); // handshake length\n rval.putByte(c.version.major); // major version\n rval.putByte(c.version.minor); // minor version\n rval.putBytes(c.session.sp.server_random); // random time + bytes\n writeVector(rval, 1, forge.util.createBuffer(sessionId));\n rval.putByte(c.session.cipherSuite.id[0]);\n rval.putByte(c.session.cipherSuite.id[1]);\n rval.putByte(c.session.compressionMethod);\n return rval;\n};\n\n/**\n * Creates a Certificate message.\n *\n * When this message will be sent:\n * This is the first message the client can send after receiving a server\n * hello done message and the first message the server can send after\n * sending a ServerHello. This client message is only sent if the server\n * requests a certificate. If no suitable certificate is available, the\n * client should send a certificate message containing no certificates. If\n * client authentication is required by the server for the handshake to\n * continue, it may respond with a fatal handshake failure alert.\n *\n * opaque ASN.1Cert<1..2^24-1>;\n *\n * struct {\n * ASN.1Cert certificate_list<0..2^24-1>;\n * } Certificate;\n *\n * @param c the connection.\n *\n * @return the Certificate byte buffer.\n */\ntls.createCertificate = function(c) {\n // TODO: check certificate request to ensure types are supported\n\n // get a certificate (a certificate as a PEM string)\n var client = (c.entity === tls.ConnectionEnd.client);\n var cert = null;\n if(c.getCertificate) {\n var hint;\n if(client) {\n hint = c.session.certificateRequest;\n } else {\n hint = c.session.extensions.server_name.serverNameList;\n }\n cert = c.getCertificate(c, hint);\n }\n\n // buffer to hold certificate list\n var certList = forge.util.createBuffer();\n if(cert !== null) {\n try {\n // normalize cert to a chain of certificates\n if(!forge.util.isArray(cert)) {\n cert = [cert];\n }\n var asn1 = null;\n for(var i = 0; i < cert.length; ++i) {\n var msg = forge.pem.decode(cert[i])[0];\n if(msg.type !== 'CERTIFICATE' &&\n msg.type !== 'X509 CERTIFICATE' &&\n msg.type !== 'TRUSTED CERTIFICATE') {\n var error = new Error('Could not convert certificate from PEM; PEM ' +\n 'header type is not \"CERTIFICATE\", \"X509 CERTIFICATE\", or ' +\n '\"TRUSTED CERTIFICATE\".');\n error.headerType = msg.type;\n throw error;\n }\n if(msg.procType && msg.procType.type === 'ENCRYPTED') {\n throw new Error('Could not convert certificate from PEM; PEM is encrypted.');\n }\n\n var der = forge.util.createBuffer(msg.body);\n if(asn1 === null) {\n asn1 = forge.asn1.fromDer(der.bytes(), false);\n }\n\n // certificate entry is itself a vector with 3 length bytes\n var certBuffer = forge.util.createBuffer();\n writeVector(certBuffer, 3, der);\n\n // add cert vector to cert list vector\n certList.putBuffer(certBuffer);\n }\n\n // save certificate\n cert = forge.pki.certificateFromAsn1(asn1);\n if(client) {\n c.session.clientCertificate = cert;\n } else {\n c.session.serverCertificate = cert;\n }\n } catch(ex) {\n return c.error(c, {\n message: 'Could not send certificate list.',\n cause: ex,\n send: true,\n alert: {\n level: tls.Alert.Level.fatal,\n description: tls.Alert.Description.bad_certificate\n }\n });\n }\n }\n\n // determine length of the handshake message\n var length = 3 + certList.length(); // cert list vector\n\n // build record fragment\n var rval = forge.util.createBuffer();\n rval.putByte(tls.HandshakeType.certificate);\n rval.putInt24(length);\n writeVector(rval, 3, certList);\n return rval;\n};\n\n/**\n * Creates a ClientKeyExchange message.\n *\n * When this message will be sent:\n * This message is always sent by the client. It will immediately follow the\n * client certificate message, if it is sent. Otherwise it will be the first\n * message sent by the client after it receives the server hello done\n * message.\n *\n * Meaning of this message:\n * With this message, the premaster secret is set, either though direct\n * transmission of the RSA-encrypted secret, or by the transmission of\n * Diffie-Hellman parameters which will allow each side to agree upon the\n * same premaster secret. When the key exchange method is DH_RSA or DH_DSS,\n * client certification has been requested, and the client was able to\n * respond with a certificate which contained a Diffie-Hellman public key\n * whose parameters (group and generator) matched those specified by the\n * server in its certificate, this message will not contain any data.\n *\n * Meaning of this message:\n * If RSA is being used for key agreement and authentication, the client\n * generates a 48-byte premaster secret, encrypts it using the public key\n * from the server's certificate or the temporary RSA key provided in a\n * server key exchange message, and sends the result in an encrypted\n * premaster secret message. This structure is a variant of the client\n * key exchange message, not a message in itself.\n *\n * struct {\n * select(KeyExchangeAlgorithm) {\n * case rsa: EncryptedPreMasterSecret;\n * case diffie_hellman: ClientDiffieHellmanPublic;\n * } exchange_keys;\n * } ClientKeyExchange;\n *\n * struct {\n * ProtocolVersion client_version;\n * opaque random[46];\n * } PreMasterSecret;\n *\n * struct {\n * public-key-encrypted PreMasterSecret pre_master_secret;\n * } EncryptedPreMasterSecret;\n *\n * A public-key-encrypted element is encoded as a vector <0..2^16-1>.\n *\n * @param c the connection.\n *\n * @return the ClientKeyExchange byte buffer.\n */\ntls.createClientKeyExchange = function(c) {\n // create buffer to encrypt\n var b = forge.util.createBuffer();\n\n // add highest client-supported protocol to help server avoid version\n // rollback attacks\n b.putByte(c.session.clientHelloVersion.major);\n b.putByte(c.session.clientHelloVersion.minor);\n\n // generate and add 46 random bytes\n b.putBytes(forge.random.getBytes(46));\n\n // save pre-master secret\n var sp = c.session.sp;\n sp.pre_master_secret = b.getBytes();\n\n // RSA-encrypt the pre-master secret\n var key = c.session.serverCertificate.publicKey;\n b = key.encrypt(sp.pre_master_secret);\n\n /* Note: The encrypted pre-master secret will be stored in a\n public-key-encrypted opaque vector that has the length prefixed using\n 2 bytes, so include those 2 bytes in the handshake message length. This\n is done as a minor optimization instead of calling writeVector(). */\n\n // determine length of the handshake message\n var length = b.length + 2;\n\n // build record fragment\n var rval = forge.util.createBuffer();\n rval.putByte(tls.HandshakeType.client_key_exchange);\n rval.putInt24(length);\n // add vector length bytes\n rval.putInt16(b.length);\n rval.putBytes(b);\n return rval;\n};\n\n/**\n * Creates a ServerKeyExchange message.\n *\n * @param c the connection.\n *\n * @return the ServerKeyExchange byte buffer.\n */\ntls.createServerKeyExchange = function(c) {\n // this implementation only supports RSA, no Diffie-Hellman support,\n // so this record is empty\n\n // determine length of the handshake message\n var length = 0;\n\n // build record fragment\n var rval = forge.util.createBuffer();\n if(length > 0) {\n rval.putByte(tls.HandshakeType.server_key_exchange);\n rval.putInt24(length);\n }\n return rval;\n};\n\n/**\n * Gets the signed data used to verify a client-side certificate. See\n * tls.createCertificateVerify() for details.\n *\n * @param c the connection.\n * @param callback the callback to call once the signed data is ready.\n */\ntls.getClientSignature = function(c, callback) {\n // generate data to RSA encrypt\n var b = forge.util.createBuffer();\n b.putBuffer(c.session.md5.digest());\n b.putBuffer(c.session.sha1.digest());\n b = b.getBytes();\n\n // create default signing function as necessary\n c.getSignature = c.getSignature || function(c, b, callback) {\n // do rsa encryption, call callback\n var privateKey = null;\n if(c.getPrivateKey) {\n try {\n privateKey = c.getPrivateKey(c, c.session.clientCertificate);\n privateKey = forge.pki.privateKeyFromPem(privateKey);\n } catch(ex) {\n c.error(c, {\n message: 'Could not get private key.',\n cause: ex,\n send: true,\n alert: {\n level: tls.Alert.Level.fatal,\n description: tls.Alert.Description.internal_error\n }\n });\n }\n }\n if(privateKey === null) {\n c.error(c, {\n message: 'No private key set.',\n send: true,\n alert: {\n level: tls.Alert.Level.fatal,\n description: tls.Alert.Description.internal_error\n }\n });\n } else {\n b = privateKey.sign(b, null);\n }\n callback(c, b);\n };\n\n // get client signature\n c.getSignature(c, b, callback);\n};\n\n/**\n * Creates a CertificateVerify message.\n *\n * Meaning of this message:\n * This structure conveys the client's Diffie-Hellman public value\n * (Yc) if it was not already included in the client's certificate.\n * The encoding used for Yc is determined by the enumerated\n * PublicValueEncoding. This structure is a variant of the client\n * key exchange message, not a message in itself.\n *\n * When this message will be sent:\n * This message is used to provide explicit verification of a client\n * certificate. This message is only sent following a client\n * certificate that has signing capability (i.e. all certificates\n * except those containing fixed Diffie-Hellman parameters). When\n * sent, it will immediately follow the client key exchange message.\n *\n * struct {\n * Signature signature;\n * } CertificateVerify;\n *\n * CertificateVerify.signature.md5_hash\n * MD5(handshake_messages);\n *\n * Certificate.signature.sha_hash\n * SHA(handshake_messages);\n *\n * Here handshake_messages refers to all handshake messages sent or\n * received starting at client hello up to but not including this\n * message, including the type and length fields of the handshake\n * messages.\n *\n * select(SignatureAlgorithm) {\n * case anonymous: struct { };\n * case rsa:\n * digitally-signed struct {\n * opaque md5_hash[16];\n * opaque sha_hash[20];\n * };\n * case dsa:\n * digitally-signed struct {\n * opaque sha_hash[20];\n * };\n * } Signature;\n *\n * In digital signing, one-way hash functions are used as input for a\n * signing algorithm. A digitally-signed element is encoded as an opaque\n * vector <0..2^16-1>, where the length is specified by the signing\n * algorithm and key.\n *\n * In RSA signing, a 36-byte structure of two hashes (one SHA and one\n * MD5) is signed (encrypted with the private key). It is encoded with\n * PKCS #1 block type 0 or type 1 as described in [PKCS1].\n *\n * In DSS, the 20 bytes of the SHA hash are run directly through the\n * Digital Signing Algorithm with no additional hashing.\n *\n * @param c the connection.\n * @param signature the signature to include in the message.\n *\n * @return the CertificateVerify byte buffer.\n */\ntls.createCertificateVerify = function(c, signature) {\n /* Note: The signature will be stored in a \"digitally-signed\" opaque\n vector that has the length prefixed using 2 bytes, so include those\n 2 bytes in the handshake message length. This is done as a minor\n optimization instead of calling writeVector(). */\n\n // determine length of the handshake message\n var length = signature.length + 2;\n\n // build record fragment\n var rval = forge.util.createBuffer();\n rval.putByte(tls.HandshakeType.certificate_verify);\n rval.putInt24(length);\n // add vector length bytes\n rval.putInt16(signature.length);\n rval.putBytes(signature);\n return rval;\n};\n\n/**\n * Creates a CertificateRequest message.\n *\n * @param c the connection.\n *\n * @return the CertificateRequest byte buffer.\n */\ntls.createCertificateRequest = function(c) {\n // TODO: support other certificate types\n var certTypes = forge.util.createBuffer();\n\n // common RSA certificate type\n certTypes.putByte(0x01);\n\n // add distinguished names from CA store\n var cAs = forge.util.createBuffer();\n for(var key in c.caStore.certs) {\n var cert = c.caStore.certs[key];\n var dn = forge.pki.distinguishedNameToAsn1(cert.subject);\n var byteBuffer = forge.asn1.toDer(dn);\n cAs.putInt16(byteBuffer.length());\n cAs.putBuffer(byteBuffer);\n }\n\n // TODO: TLS 1.2+ has a different format\n\n // determine length of the handshake message\n var length =\n 1 + certTypes.length() +\n 2 + cAs.length();\n\n // build record fragment\n var rval = forge.util.createBuffer();\n rval.putByte(tls.HandshakeType.certificate_request);\n rval.putInt24(length);\n writeVector(rval, 1, certTypes);\n writeVector(rval, 2, cAs);\n return rval;\n};\n\n/**\n * Creates a ServerHelloDone message.\n *\n * @param c the connection.\n *\n * @return the ServerHelloDone byte buffer.\n */\ntls.createServerHelloDone = function(c) {\n // build record fragment\n var rval = forge.util.createBuffer();\n rval.putByte(tls.HandshakeType.server_hello_done);\n rval.putInt24(0);\n return rval;\n};\n\n/**\n * Creates a ChangeCipherSpec message.\n *\n * The change cipher spec protocol exists to signal transitions in\n * ciphering strategies. The protocol consists of a single message,\n * which is encrypted and compressed under the current (not the pending)\n * connection state. The message consists of a single byte of value 1.\n *\n * struct {\n * enum { change_cipher_spec(1), (255) } type;\n * } ChangeCipherSpec;\n *\n * @return the ChangeCipherSpec byte buffer.\n */\ntls.createChangeCipherSpec = function() {\n var rval = forge.util.createBuffer();\n rval.putByte(0x01);\n return rval;\n};\n\n/**\n * Creates a Finished message.\n *\n * struct {\n * opaque verify_data[12];\n * } Finished;\n *\n * verify_data\n * PRF(master_secret, finished_label, MD5(handshake_messages) +\n * SHA-1(handshake_messages)) [0..11];\n *\n * finished_label\n * For Finished messages sent by the client, the string \"client\n * finished\". For Finished messages sent by the server, the\n * string \"server finished\".\n *\n * handshake_messages\n * All of the data from all handshake messages up to but not\n * including this message. This is only data visible at the\n * handshake layer and does not include record layer headers.\n * This is the concatenation of all the Handshake structures as\n * defined in 7.4 exchanged thus far.\n *\n * @param c the connection.\n *\n * @return the Finished byte buffer.\n */\ntls.createFinished = function(c) {\n // generate verify_data\n var b = forge.util.createBuffer();\n b.putBuffer(c.session.md5.digest());\n b.putBuffer(c.session.sha1.digest());\n\n // TODO: determine prf function and verify length for TLS 1.2\n var client = (c.entity === tls.ConnectionEnd.client);\n var sp = c.session.sp;\n var vdl = 12;\n var prf = prf_TLS1;\n var label = client ? 'client finished' : 'server finished';\n b = prf(sp.master_secret, label, b.getBytes(), vdl);\n\n // build record fragment\n var rval = forge.util.createBuffer();\n rval.putByte(tls.HandshakeType.finished);\n rval.putInt24(b.length());\n rval.putBuffer(b);\n return rval;\n};\n\n/**\n * Creates a HeartbeatMessage (See RFC 6520).\n *\n * struct {\n * HeartbeatMessageType type;\n * uint16 payload_length;\n * opaque payload[HeartbeatMessage.payload_length];\n * opaque padding[padding_length];\n * } HeartbeatMessage;\n *\n * The total length of a HeartbeatMessage MUST NOT exceed 2^14 or\n * max_fragment_length when negotiated as defined in [RFC6066].\n *\n * type: The message type, either heartbeat_request or heartbeat_response.\n *\n * payload_length: The length of the payload.\n *\n * payload: The payload consists of arbitrary content.\n *\n * padding: The padding is random content that MUST be ignored by the\n * receiver. The length of a HeartbeatMessage is TLSPlaintext.length\n * for TLS and DTLSPlaintext.length for DTLS. Furthermore, the\n * length of the type field is 1 byte, and the length of the\n * payload_length is 2. Therefore, the padding_length is\n * TLSPlaintext.length - payload_length - 3 for TLS and\n * DTLSPlaintext.length - payload_length - 3 for DTLS. The\n * padding_length MUST be at least 16.\n *\n * The sender of a HeartbeatMessage MUST use a random padding of at\n * least 16 bytes. The padding of a received HeartbeatMessage message\n * MUST be ignored.\n *\n * If the payload_length of a received HeartbeatMessage is too large,\n * the received HeartbeatMessage MUST be discarded silently.\n *\n * @param c the connection.\n * @param type the tls.HeartbeatMessageType.\n * @param payload the heartbeat data to send as the payload.\n * @param [payloadLength] the payload length to use, defaults to the\n * actual payload length.\n *\n * @return the HeartbeatRequest byte buffer.\n */\ntls.createHeartbeat = function(type, payload, payloadLength) {\n if(typeof payloadLength === 'undefined') {\n payloadLength = payload.length;\n }\n // build record fragment\n var rval = forge.util.createBuffer();\n rval.putByte(type); // heartbeat message type\n rval.putInt16(payloadLength); // payload length\n rval.putBytes(payload); // payload\n // padding\n var plaintextLength = rval.length();\n var paddingLength = Math.max(16, plaintextLength - payloadLength - 3);\n rval.putBytes(forge.random.getBytes(paddingLength));\n return rval;\n};\n\n/**\n * Fragments, compresses, encrypts, and queues a record for delivery.\n *\n * @param c the connection.\n * @param record the record to queue.\n */\ntls.queue = function(c, record) {\n // error during record creation\n if(!record) {\n return;\n }\n\n if(record.fragment.length() === 0) {\n if(record.type === tls.ContentType.handshake ||\n record.type === tls.ContentType.alert ||\n record.type === tls.ContentType.change_cipher_spec) {\n // Empty handshake, alert of change cipher spec messages are not allowed per the TLS specification and should not be sent.\n return;\n }\n }\n\n // if the record is a handshake record, update handshake hashes\n if(record.type === tls.ContentType.handshake) {\n var bytes = record.fragment.bytes();\n c.session.md5.update(bytes);\n c.session.sha1.update(bytes);\n bytes = null;\n }\n\n // handle record fragmentation\n var records;\n if(record.fragment.length() <= tls.MaxFragment) {\n records = [record];\n } else {\n // fragment data as long as it is too long\n records = [];\n var data = record.fragment.bytes();\n while(data.length > tls.MaxFragment) {\n records.push(tls.createRecord(c, {\n type: record.type,\n data: forge.util.createBuffer(data.slice(0, tls.MaxFragment))\n }));\n data = data.slice(tls.MaxFragment);\n }\n // add last record\n if(data.length > 0) {\n records.push(tls.createRecord(c, {\n type: record.type,\n data: forge.util.createBuffer(data)\n }));\n }\n }\n\n // compress and encrypt all fragmented records\n for(var i = 0; i < records.length && !c.fail; ++i) {\n // update the record using current write state\n var rec = records[i];\n var s = c.state.current.write;\n if(s.update(c, rec)) {\n // store record\n c.records.push(rec);\n }\n }\n};\n\n/**\n * Flushes all queued records to the output buffer and calls the\n * tlsDataReady() handler on the given connection.\n *\n * @param c the connection.\n *\n * @return true on success, false on failure.\n */\ntls.flush = function(c) {\n for(var i = 0; i < c.records.length; ++i) {\n var record = c.records[i];\n\n // add record header and fragment\n c.tlsData.putByte(record.type);\n c.tlsData.putByte(record.version.major);\n c.tlsData.putByte(record.version.minor);\n c.tlsData.putInt16(record.fragment.length());\n c.tlsData.putBuffer(c.records[i].fragment);\n }\n c.records = [];\n return c.tlsDataReady(c);\n};\n\n/**\n * Maps a pki.certificateError to a tls.Alert.Description.\n *\n * @param error the error to map.\n *\n * @return the alert description.\n */\nvar _certErrorToAlertDesc = function(error) {\n switch(error) {\n case true:\n return true;\n case forge.pki.certificateError.bad_certificate:\n return tls.Alert.Description.bad_certificate;\n case forge.pki.certificateError.unsupported_certificate:\n return tls.Alert.Description.unsupported_certificate;\n case forge.pki.certificateError.certificate_revoked:\n return tls.Alert.Description.certificate_revoked;\n case forge.pki.certificateError.certificate_expired:\n return tls.Alert.Description.certificate_expired;\n case forge.pki.certificateError.certificate_unknown:\n return tls.Alert.Description.certificate_unknown;\n case forge.pki.certificateError.unknown_ca:\n return tls.Alert.Description.unknown_ca;\n default:\n return tls.Alert.Description.bad_certificate;\n }\n};\n\n/**\n * Maps a tls.Alert.Description to a pki.certificateError.\n *\n * @param desc the alert description.\n *\n * @return the certificate error.\n */\nvar _alertDescToCertError = function(desc) {\n switch(desc) {\n case true:\n return true;\n case tls.Alert.Description.bad_certificate:\n return forge.pki.certificateError.bad_certificate;\n case tls.Alert.Description.unsupported_certificate:\n return forge.pki.certificateError.unsupported_certificate;\n case tls.Alert.Description.certificate_revoked:\n return forge.pki.certificateError.certificate_revoked;\n case tls.Alert.Description.certificate_expired:\n return forge.pki.certificateError.certificate_expired;\n case tls.Alert.Description.certificate_unknown:\n return forge.pki.certificateError.certificate_unknown;\n case tls.Alert.Description.unknown_ca:\n return forge.pki.certificateError.unknown_ca;\n default:\n return forge.pki.certificateError.bad_certificate;\n }\n};\n\n/**\n * Verifies a certificate chain against the given connection's\n * Certificate Authority store.\n *\n * @param c the TLS connection.\n * @param chain the certificate chain to verify, with the root or highest\n * authority at the end.\n *\n * @return true if successful, false if not.\n */\ntls.verifyCertificateChain = function(c, chain) {\n try {\n // Make a copy of c.verifyOptions so that we can modify options.verify\n // without modifying c.verifyOptions.\n var options = {};\n for (var key in c.verifyOptions) {\n options[key] = c.verifyOptions[key];\n }\n\n options.verify = function(vfd, depth, chain) {\n // convert pki.certificateError to tls alert description\n var desc = _certErrorToAlertDesc(vfd);\n\n // call application callback\n var ret = c.verify(c, vfd, depth, chain);\n if(ret !== true) {\n if(typeof ret === 'object' && !forge.util.isArray(ret)) {\n // throw custom error\n var error = new Error('The application rejected the certificate.');\n error.send = true;\n error.alert = {\n level: tls.Alert.Level.fatal,\n description: tls.Alert.Description.bad_certificate\n };\n if(ret.message) {\n error.message = ret.message;\n }\n if(ret.alert) {\n error.alert.description = ret.alert;\n }\n throw error;\n }\n\n // convert tls alert description to pki.certificateError\n if(ret !== vfd) {\n ret = _alertDescToCertError(ret);\n }\n }\n\n return ret;\n };\n\n // verify chain\n forge.pki.verifyCertificateChain(c.caStore, chain, options);\n } catch(ex) {\n // build tls error if not already customized\n var err = ex;\n if(typeof err !== 'object' || forge.util.isArray(err)) {\n err = {\n send: true,\n alert: {\n level: tls.Alert.Level.fatal,\n description: _certErrorToAlertDesc(ex)\n }\n };\n }\n if(!('send' in err)) {\n err.send = true;\n }\n if(!('alert' in err)) {\n err.alert = {\n level: tls.Alert.Level.fatal,\n description: _certErrorToAlertDesc(err.error)\n };\n }\n\n // send error\n c.error(c, err);\n }\n\n return !c.fail;\n};\n\n/**\n * Creates a new TLS session cache.\n *\n * @param cache optional map of session ID to cached session.\n * @param capacity the maximum size for the cache (default: 100).\n *\n * @return the new TLS session cache.\n */\ntls.createSessionCache = function(cache, capacity) {\n var rval = null;\n\n // assume input is already a session cache object\n if(cache && cache.getSession && cache.setSession && cache.order) {\n rval = cache;\n } else {\n // create cache\n rval = {};\n rval.cache = cache || {};\n rval.capacity = Math.max(capacity || 100, 1);\n rval.order = [];\n\n // store order for sessions, delete session overflow\n for(var key in cache) {\n if(rval.order.length <= capacity) {\n rval.order.push(key);\n } else {\n delete cache[key];\n }\n }\n\n // get a session from a session ID (or get any session)\n rval.getSession = function(sessionId) {\n var session = null;\n var key = null;\n\n // if session ID provided, use it\n if(sessionId) {\n key = forge.util.bytesToHex(sessionId);\n } else if(rval.order.length > 0) {\n // get first session from cache\n key = rval.order[0];\n }\n\n if(key !== null && key in rval.cache) {\n // get cached session and remove from cache\n session = rval.cache[key];\n delete rval.cache[key];\n for(var i in rval.order) {\n if(rval.order[i] === key) {\n rval.order.splice(i, 1);\n break;\n }\n }\n }\n\n return session;\n };\n\n // set a session in the cache\n rval.setSession = function(sessionId, session) {\n // remove session from cache if at capacity\n if(rval.order.length === rval.capacity) {\n var key = rval.order.shift();\n delete rval.cache[key];\n }\n // add session to cache\n var key = forge.util.bytesToHex(sessionId);\n rval.order.push(key);\n rval.cache[key] = session;\n };\n }\n\n return rval;\n};\n\n/**\n * Creates a new TLS connection.\n *\n * See public createConnection() docs for more details.\n *\n * @param options the options for this connection.\n *\n * @return the new TLS connection.\n */\ntls.createConnection = function(options) {\n var caStore = null;\n if(options.caStore) {\n // if CA store is an array, convert it to a CA store object\n if(forge.util.isArray(options.caStore)) {\n caStore = forge.pki.createCaStore(options.caStore);\n } else {\n caStore = options.caStore;\n }\n } else {\n // create empty CA store\n caStore = forge.pki.createCaStore();\n }\n\n // setup default cipher suites\n var cipherSuites = options.cipherSuites || null;\n if(cipherSuites === null) {\n cipherSuites = [];\n for(var key in tls.CipherSuites) {\n cipherSuites.push(tls.CipherSuites[key]);\n }\n }\n\n // set default entity\n var entity = (options.server || false) ?\n tls.ConnectionEnd.server : tls.ConnectionEnd.client;\n\n // create session cache if requested\n var sessionCache = options.sessionCache ?\n tls.createSessionCache(options.sessionCache) : null;\n\n // create TLS connection\n var c = {\n version: {major: tls.Version.major, minor: tls.Version.minor},\n entity: entity,\n sessionId: options.sessionId,\n caStore: caStore,\n sessionCache: sessionCache,\n cipherSuites: cipherSuites,\n connected: options.connected,\n virtualHost: options.virtualHost || null,\n verifyClient: options.verifyClient || false,\n verify: options.verify || function(cn, vfd, dpth, cts) {return vfd;},\n verifyOptions: options.verifyOptions || {},\n getCertificate: options.getCertificate || null,\n getPrivateKey: options.getPrivateKey || null,\n getSignature: options.getSignature || null,\n input: forge.util.createBuffer(),\n tlsData: forge.util.createBuffer(),\n data: forge.util.createBuffer(),\n tlsDataReady: options.tlsDataReady,\n dataReady: options.dataReady,\n heartbeatReceived: options.heartbeatReceived,\n closed: options.closed,\n error: function(c, ex) {\n // set origin if not set\n ex.origin = ex.origin ||\n ((c.entity === tls.ConnectionEnd.client) ? 'client' : 'server');\n\n // send TLS alert\n if(ex.send) {\n tls.queue(c, tls.createAlert(c, ex.alert));\n tls.flush(c);\n }\n\n // error is fatal by default\n var fatal = (ex.fatal !== false);\n if(fatal) {\n // set fail flag\n c.fail = true;\n }\n\n // call error handler first\n options.error(c, ex);\n\n if(fatal) {\n // fatal error, close connection, do not clear fail\n c.close(false);\n }\n },\n deflate: options.deflate || null,\n inflate: options.inflate || null\n };\n\n /**\n * Resets a closed TLS connection for reuse. Called in c.close().\n *\n * @param clearFail true to clear the fail flag (default: true).\n */\n c.reset = function(clearFail) {\n c.version = {major: tls.Version.major, minor: tls.Version.minor};\n c.record = null;\n c.session = null;\n c.peerCertificate = null;\n c.state = {\n pending: null,\n current: null\n };\n c.expect = (c.entity === tls.ConnectionEnd.client) ? SHE : CHE;\n c.fragmented = null;\n c.records = [];\n c.open = false;\n c.handshakes = 0;\n c.handshaking = false;\n c.isConnected = false;\n c.fail = !(clearFail || typeof(clearFail) === 'undefined');\n c.input.clear();\n c.tlsData.clear();\n c.data.clear();\n c.state.current = tls.createConnectionState(c);\n };\n\n // do initial reset of connection\n c.reset();\n\n /**\n * Updates the current TLS engine state based on the given record.\n *\n * @param c the TLS connection.\n * @param record the TLS record to act on.\n */\n var _update = function(c, record) {\n // get record handler (align type in table by subtracting lowest)\n var aligned = record.type - tls.ContentType.change_cipher_spec;\n var handlers = ctTable[c.entity][c.expect];\n if(aligned in handlers) {\n handlers[aligned](c, record);\n } else {\n // unexpected record\n tls.handleUnexpected(c, record);\n }\n };\n\n /**\n * Reads the record header and initializes the next record on the given\n * connection.\n *\n * @param c the TLS connection with the next record.\n *\n * @return 0 if the input data could be processed, otherwise the\n * number of bytes required for data to be processed.\n */\n var _readRecordHeader = function(c) {\n var rval = 0;\n\n // get input buffer and its length\n var b = c.input;\n var len = b.length();\n\n // need at least 5 bytes to initialize a record\n if(len < 5) {\n rval = 5 - len;\n } else {\n // enough bytes for header\n // initialize record\n c.record = {\n type: b.getByte(),\n version: {\n major: b.getByte(),\n minor: b.getByte()\n },\n length: b.getInt16(),\n fragment: forge.util.createBuffer(),\n ready: false\n };\n\n // check record version\n var compatibleVersion = (c.record.version.major === c.version.major);\n if(compatibleVersion && c.session && c.session.version) {\n // session version already set, require same minor version\n compatibleVersion = (c.record.version.minor === c.version.minor);\n }\n if(!compatibleVersion) {\n c.error(c, {\n message: 'Incompatible TLS version.',\n send: true,\n alert: {\n level: tls.Alert.Level.fatal,\n description: tls.Alert.Description.protocol_version\n }\n });\n }\n }\n\n return rval;\n };\n\n /**\n * Reads the next record's contents and appends its message to any\n * previously fragmented message.\n *\n * @param c the TLS connection with the next record.\n *\n * @return 0 if the input data could be processed, otherwise the\n * number of bytes required for data to be processed.\n */\n var _readRecord = function(c) {\n var rval = 0;\n\n // ensure there is enough input data to get the entire record\n var b = c.input;\n var len = b.length();\n if(len < c.record.length) {\n // not enough data yet, return how much is required\n rval = c.record.length - len;\n } else {\n // there is enough data to parse the pending record\n // fill record fragment and compact input buffer\n c.record.fragment.putBytes(b.getBytes(c.record.length));\n b.compact();\n\n // update record using current read state\n var s = c.state.current.read;\n if(s.update(c, c.record)) {\n // see if there is a previously fragmented message that the\n // new record's message fragment should be appended to\n if(c.fragmented !== null) {\n // if the record type matches a previously fragmented\n // record, append the record fragment to it\n if(c.fragmented.type === c.record.type) {\n // concatenate record fragments\n c.fragmented.fragment.putBuffer(c.record.fragment);\n c.record = c.fragmented;\n } else {\n // error, invalid fragmented record\n c.error(c, {\n message: 'Invalid fragmented record.',\n send: true,\n alert: {\n level: tls.Alert.Level.fatal,\n description:\n tls.Alert.Description.unexpected_message\n }\n });\n }\n }\n\n // record is now ready\n c.record.ready = true;\n }\n }\n\n return rval;\n };\n\n /**\n * Performs a handshake using the TLS Handshake Protocol, as a client.\n *\n * This method should only be called if the connection is in client mode.\n *\n * @param sessionId the session ID to use, null to start a new one.\n */\n c.handshake = function(sessionId) {\n // error to call this in non-client mode\n if(c.entity !== tls.ConnectionEnd.client) {\n // not fatal error\n c.error(c, {\n message: 'Cannot initiate handshake as a server.',\n fatal: false\n });\n } else if(c.handshaking) {\n // handshake is already in progress, fail but not fatal error\n c.error(c, {\n message: 'Handshake already in progress.',\n fatal: false\n });\n } else {\n // clear fail flag on reuse\n if(c.fail && !c.open && c.handshakes === 0) {\n c.fail = false;\n }\n\n // now handshaking\n c.handshaking = true;\n\n // default to blank (new session)\n sessionId = sessionId || '';\n\n // if a session ID was specified, try to find it in the cache\n var session = null;\n if(sessionId.length > 0) {\n if(c.sessionCache) {\n session = c.sessionCache.getSession(sessionId);\n }\n\n // matching session not found in cache, clear session ID\n if(session === null) {\n sessionId = '';\n }\n }\n\n // no session given, grab a session from the cache, if available\n if(sessionId.length === 0 && c.sessionCache) {\n session = c.sessionCache.getSession();\n if(session !== null) {\n sessionId = session.id;\n }\n }\n\n // set up session\n c.session = {\n id: sessionId,\n version: null,\n cipherSuite: null,\n compressionMethod: null,\n serverCertificate: null,\n certificateRequest: null,\n clientCertificate: null,\n sp: {},\n md5: forge.md.md5.create(),\n sha1: forge.md.sha1.create()\n };\n\n // use existing session information\n if(session) {\n // only update version on connection, session version not yet set\n c.version = session.version;\n c.session.sp = session.sp;\n }\n\n // generate new client random\n c.session.sp.client_random = tls.createRandom().getBytes();\n\n // connection now open\n c.open = true;\n\n // send hello\n tls.queue(c, tls.createRecord(c, {\n type: tls.ContentType.handshake,\n data: tls.createClientHello(c)\n }));\n tls.flush(c);\n }\n };\n\n /**\n * Called when TLS protocol data has been received from somewhere and should\n * be processed by the TLS engine.\n *\n * @param data the TLS protocol data, as a string, to process.\n *\n * @return 0 if the data could be processed, otherwise the number of bytes\n * required for data to be processed.\n */\n c.process = function(data) {\n var rval = 0;\n\n // buffer input data\n if(data) {\n c.input.putBytes(data);\n }\n\n // process next record if no failure, process will be called after\n // each record is handled (since handling can be asynchronous)\n if(!c.fail) {\n // reset record if ready and now empty\n if(c.record !== null &&\n c.record.ready && c.record.fragment.isEmpty()) {\n c.record = null;\n }\n\n // if there is no pending record, try to read record header\n if(c.record === null) {\n rval = _readRecordHeader(c);\n }\n\n // read the next record (if record not yet ready)\n if(!c.fail && c.record !== null && !c.record.ready) {\n rval = _readRecord(c);\n }\n\n // record ready to be handled, update engine state\n if(!c.fail && c.record !== null && c.record.ready) {\n _update(c, c.record);\n }\n }\n\n return rval;\n };\n\n /**\n * Requests that application data be packaged into a TLS record. The\n * tlsDataReady handler will be called when the TLS record(s) have been\n * prepared.\n *\n * @param data the application data, as a raw 'binary' encoded string, to\n * be sent; to send utf-16/utf-8 string data, use the return value\n * of util.encodeUtf8(str).\n *\n * @return true on success, false on failure.\n */\n c.prepare = function(data) {\n tls.queue(c, tls.createRecord(c, {\n type: tls.ContentType.application_data,\n data: forge.util.createBuffer(data)\n }));\n return tls.flush(c);\n };\n\n /**\n * Requests that a heartbeat request be packaged into a TLS record for\n * transmission. The tlsDataReady handler will be called when TLS record(s)\n * have been prepared.\n *\n * When a heartbeat response has been received, the heartbeatReceived\n * handler will be called with the matching payload. This handler can\n * be used to clear a retransmission timer, etc.\n *\n * @param payload the heartbeat data to send as the payload in the message.\n * @param [payloadLength] the payload length to use, defaults to the\n * actual payload length.\n *\n * @return true on success, false on failure.\n */\n c.prepareHeartbeatRequest = function(payload, payloadLength) {\n if(payload instanceof forge.util.ByteBuffer) {\n payload = payload.bytes();\n }\n if(typeof payloadLength === 'undefined') {\n payloadLength = payload.length;\n }\n c.expectedHeartbeatPayload = payload;\n tls.queue(c, tls.createRecord(c, {\n type: tls.ContentType.heartbeat,\n data: tls.createHeartbeat(\n tls.HeartbeatMessageType.heartbeat_request, payload, payloadLength)\n }));\n return tls.flush(c);\n };\n\n /**\n * Closes the connection (sends a close_notify alert).\n *\n * @param clearFail true to clear the fail flag (default: true).\n */\n c.close = function(clearFail) {\n // save session if connection didn't fail\n if(!c.fail && c.sessionCache && c.session) {\n // only need to preserve session ID, version, and security params\n var session = {\n id: c.session.id,\n version: c.session.version,\n sp: c.session.sp\n };\n session.sp.keys = null;\n c.sessionCache.setSession(session.id, session);\n }\n\n if(c.open) {\n // connection no longer open, clear input\n c.open = false;\n c.input.clear();\n\n // if connected or handshaking, send an alert\n if(c.isConnected || c.handshaking) {\n c.isConnected = c.handshaking = false;\n\n // send close_notify alert\n tls.queue(c, tls.createAlert(c, {\n level: tls.Alert.Level.warning,\n description: tls.Alert.Description.close_notify\n }));\n tls.flush(c);\n }\n\n // call handler\n c.closed(c);\n }\n\n // reset TLS connection, do not clear fail flag\n c.reset(clearFail);\n };\n\n return c;\n};\n\n/* TLS API */\nmodule.exports = forge.tls = forge.tls || {};\n\n// expose non-functions\nfor(var key in tls) {\n if(typeof tls[key] !== 'function') {\n forge.tls[key] = tls[key];\n }\n}\n\n// expose prf_tls1 for testing\nforge.tls.prf_tls1 = prf_TLS1;\n\n// expose sha1 hmac method\nforge.tls.hmac_sha1 = hmac_sha1;\n\n// expose session cache creation\nforge.tls.createSessionCache = tls.createSessionCache;\n\n/**\n * Creates a new TLS connection. This does not make any assumptions about the\n * transport layer that TLS is working on top of, ie: it does not assume there\n * is a TCP/IP connection or establish one. A TLS connection is totally\n * abstracted away from the layer is runs on top of, it merely establishes a\n * secure channel between a client\" and a \"server\".\n *\n * A TLS connection contains 4 connection states: pending read and write, and\n * current read and write.\n *\n * At initialization, the current read and write states will be null. Only once\n * the security parameters have been set and the keys have been generated can\n * the pending states be converted into current states. Current states will be\n * updated for each record processed.\n *\n * A custom certificate verify callback may be provided to check information\n * like the common name on the server's certificate. It will be called for\n * every certificate in the chain. It has the following signature:\n *\n * variable func(c, certs, index, preVerify)\n * Where:\n * c The TLS connection\n * verified Set to true if certificate was verified, otherwise the alert\n * tls.Alert.Description for why the certificate failed.\n * depth The current index in the chain, where 0 is the server's cert.\n * certs The certificate chain, *NOTE* if the server was anonymous then\n * the chain will be empty.\n *\n * The function returns true on success and on failure either the appropriate\n * tls.Alert.Description or an object with 'alert' set to the appropriate\n * tls.Alert.Description and 'message' set to a custom error message. If true\n * is not returned then the connection will abort using, in order of\n * availability, first the returned alert description, second the preVerify\n * alert description, and lastly the default 'bad_certificate'.\n *\n * There are three callbacks that can be used to make use of client-side\n * certificates where each takes the TLS connection as the first parameter:\n *\n * getCertificate(conn, hint)\n * The second parameter is a hint as to which certificate should be\n * returned. If the connection entity is a client, then the hint will be\n * the CertificateRequest message from the server that is part of the\n * TLS protocol. If the connection entity is a server, then it will be\n * the servername list provided via an SNI extension the ClientHello, if\n * one was provided (empty array if not). The hint can be examined to\n * determine which certificate to use (advanced). Most implementations\n * will just return a certificate. The return value must be a\n * PEM-formatted certificate or an array of PEM-formatted certificates\n * that constitute a certificate chain, with the first in the array/chain\n * being the client's certificate.\n * getPrivateKey(conn, certificate)\n * The second parameter is an forge.pki X.509 certificate object that\n * is associated with the requested private key. The return value must\n * be a PEM-formatted private key.\n * getSignature(conn, bytes, callback)\n * This callback can be used instead of getPrivateKey if the private key\n * is not directly accessible in javascript or should not be. For\n * instance, a secure external web service could provide the signature\n * in exchange for appropriate credentials. The second parameter is a\n * string of bytes to be signed that are part of the TLS protocol. These\n * bytes are used to verify that the private key for the previously\n * provided client-side certificate is accessible to the client. The\n * callback is a function that takes 2 parameters, the TLS connection\n * and the RSA encrypted (signed) bytes as a string. This callback must\n * be called once the signature is ready.\n *\n * @param options the options for this connection:\n * server: true if the connection is server-side, false for client.\n * sessionId: a session ID to reuse, null for a new connection.\n * caStore: an array of certificates to trust.\n * sessionCache: a session cache to use.\n * cipherSuites: an optional array of cipher suites to use,\n * see tls.CipherSuites.\n * connected: function(conn) called when the first handshake completes.\n * virtualHost: the virtual server name to use in a TLS SNI extension.\n * verifyClient: true to require a client certificate in server mode,\n * 'optional' to request one, false not to (default: false).\n * verify: a handler used to custom verify certificates in the chain.\n * verifyOptions: an object with options for the certificate chain validation.\n * See documentation of pki.verifyCertificateChain for possible options.\n * verifyOptions.verify is ignored. If you wish to specify a verify handler\n * use the verify key.\n * getCertificate: an optional callback used to get a certificate or\n * a chain of certificates (as an array).\n * getPrivateKey: an optional callback used to get a private key.\n * getSignature: an optional callback used to get a signature.\n * tlsDataReady: function(conn) called when TLS protocol data has been\n * prepared and is ready to be used (typically sent over a socket\n * connection to its destination), read from conn.tlsData buffer.\n * dataReady: function(conn) called when application data has\n * been parsed from a TLS record and should be consumed by the\n * application, read from conn.data buffer.\n * closed: function(conn) called when the connection has been closed.\n * error: function(conn, error) called when there was an error.\n * deflate: function(inBytes) if provided, will deflate TLS records using\n * the deflate algorithm if the server supports it.\n * inflate: function(inBytes) if provided, will inflate TLS records using\n * the deflate algorithm if the server supports it.\n *\n * @return the new TLS connection.\n */\nforge.tls.createConnection = tls.createConnection;\n","/**\n * A Javascript implementation of AES Cipher Suites for TLS.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2009-2015 Digital Bazaar, Inc.\n *\n */\nvar forge = require('./forge');\nrequire('./aes');\nrequire('./tls');\n\nvar tls = module.exports = forge.tls;\n\n/**\n * Supported cipher suites.\n */\ntls.CipherSuites['TLS_RSA_WITH_AES_128_CBC_SHA'] = {\n id: [0x00, 0x2f],\n name: 'TLS_RSA_WITH_AES_128_CBC_SHA',\n initSecurityParameters: function(sp) {\n sp.bulk_cipher_algorithm = tls.BulkCipherAlgorithm.aes;\n sp.cipher_type = tls.CipherType.block;\n sp.enc_key_length = 16;\n sp.block_length = 16;\n sp.fixed_iv_length = 16;\n sp.record_iv_length = 16;\n sp.mac_algorithm = tls.MACAlgorithm.hmac_sha1;\n sp.mac_length = 20;\n sp.mac_key_length = 20;\n },\n initConnectionState: initConnectionState\n};\ntls.CipherSuites['TLS_RSA_WITH_AES_256_CBC_SHA'] = {\n id: [0x00, 0x35],\n name: 'TLS_RSA_WITH_AES_256_CBC_SHA',\n initSecurityParameters: function(sp) {\n sp.bulk_cipher_algorithm = tls.BulkCipherAlgorithm.aes;\n sp.cipher_type = tls.CipherType.block;\n sp.enc_key_length = 32;\n sp.block_length = 16;\n sp.fixed_iv_length = 16;\n sp.record_iv_length = 16;\n sp.mac_algorithm = tls.MACAlgorithm.hmac_sha1;\n sp.mac_length = 20;\n sp.mac_key_length = 20;\n },\n initConnectionState: initConnectionState\n};\n\nfunction initConnectionState(state, c, sp) {\n var client = (c.entity === forge.tls.ConnectionEnd.client);\n\n // cipher setup\n state.read.cipherState = {\n init: false,\n cipher: forge.cipher.createDecipher('AES-CBC', client ?\n sp.keys.server_write_key : sp.keys.client_write_key),\n iv: client ? sp.keys.server_write_IV : sp.keys.client_write_IV\n };\n state.write.cipherState = {\n init: false,\n cipher: forge.cipher.createCipher('AES-CBC', client ?\n sp.keys.client_write_key : sp.keys.server_write_key),\n iv: client ? sp.keys.client_write_IV : sp.keys.server_write_IV\n };\n state.read.cipherFunction = decrypt_aes_cbc_sha1;\n state.write.cipherFunction = encrypt_aes_cbc_sha1;\n\n // MAC setup\n state.read.macLength = state.write.macLength = sp.mac_length;\n state.read.macFunction = state.write.macFunction = tls.hmac_sha1;\n}\n\n/**\n * Encrypts the TLSCompressed record into a TLSCipherText record using AES\n * in CBC mode.\n *\n * @param record the TLSCompressed record to encrypt.\n * @param s the ConnectionState to use.\n *\n * @return true on success, false on failure.\n */\nfunction encrypt_aes_cbc_sha1(record, s) {\n var rval = false;\n\n // append MAC to fragment, update sequence number\n var mac = s.macFunction(s.macKey, s.sequenceNumber, record);\n record.fragment.putBytes(mac);\n s.updateSequenceNumber();\n\n // TLS 1.1+ use an explicit IV every time to protect against CBC attacks\n var iv;\n if(record.version.minor === tls.Versions.TLS_1_0.minor) {\n // use the pre-generated IV when initializing for TLS 1.0, otherwise use\n // the residue from the previous encryption\n iv = s.cipherState.init ? null : s.cipherState.iv;\n } else {\n iv = forge.random.getBytesSync(16);\n }\n\n s.cipherState.init = true;\n\n // start cipher\n var cipher = s.cipherState.cipher;\n cipher.start({iv: iv});\n\n // TLS 1.1+ write IV into output\n if(record.version.minor >= tls.Versions.TLS_1_1.minor) {\n cipher.output.putBytes(iv);\n }\n\n // do encryption (default padding is appropriate)\n cipher.update(record.fragment);\n if(cipher.finish(encrypt_aes_cbc_sha1_padding)) {\n // set record fragment to encrypted output\n record.fragment = cipher.output;\n record.length = record.fragment.length();\n rval = true;\n }\n\n return rval;\n}\n\n/**\n * Handles padding for aes_cbc_sha1 in encrypt mode.\n *\n * @param blockSize the block size.\n * @param input the input buffer.\n * @param decrypt true in decrypt mode, false in encrypt mode.\n *\n * @return true on success, false on failure.\n */\nfunction encrypt_aes_cbc_sha1_padding(blockSize, input, decrypt) {\n /* The encrypted data length (TLSCiphertext.length) is one more than the sum\n of SecurityParameters.block_length, TLSCompressed.length,\n SecurityParameters.mac_length, and padding_length.\n\n The padding may be any length up to 255 bytes long, as long as it results in\n the TLSCiphertext.length being an integral multiple of the block length.\n Lengths longer than necessary might be desirable to frustrate attacks on a\n protocol based on analysis of the lengths of exchanged messages. Each uint8\n in the padding data vector must be filled with the padding length value.\n\n The padding length should be such that the total size of the\n GenericBlockCipher structure is a multiple of the cipher's block length.\n Legal values range from zero to 255, inclusive. This length specifies the\n length of the padding field exclusive of the padding_length field itself.\n\n This is slightly different from PKCS#7 because the padding value is 1\n less than the actual number of padding bytes if you include the\n padding_length uint8 itself as a padding byte. */\n if(!decrypt) {\n // get the number of padding bytes required to reach the blockSize and\n // subtract 1 for the padding value (to make room for the padding_length\n // uint8)\n var padding = blockSize - (input.length() % blockSize);\n input.fillWithByte(padding - 1, padding);\n }\n return true;\n}\n\n/**\n * Handles padding for aes_cbc_sha1 in decrypt mode.\n *\n * @param blockSize the block size.\n * @param output the output buffer.\n * @param decrypt true in decrypt mode, false in encrypt mode.\n *\n * @return true on success, false on failure.\n */\nfunction decrypt_aes_cbc_sha1_padding(blockSize, output, decrypt) {\n var rval = true;\n if(decrypt) {\n /* The last byte in the output specifies the number of padding bytes not\n including itself. Each of the padding bytes has the same value as that\n last byte (known as the padding_length). Here we check all padding\n bytes to ensure they have the value of padding_length even if one of\n them is bad in order to ward-off timing attacks. */\n var len = output.length();\n var paddingLength = output.last();\n for(var i = len - 1 - paddingLength; i < len - 1; ++i) {\n rval = rval && (output.at(i) == paddingLength);\n }\n if(rval) {\n // trim off padding bytes and last padding length byte\n output.truncate(paddingLength + 1);\n }\n }\n return rval;\n}\n\n/**\n * Decrypts a TLSCipherText record into a TLSCompressed record using\n * AES in CBC mode.\n *\n * @param record the TLSCipherText record to decrypt.\n * @param s the ConnectionState to use.\n *\n * @return true on success, false on failure.\n */\nfunction decrypt_aes_cbc_sha1(record, s) {\n var rval = false;\n\n var iv;\n if(record.version.minor === tls.Versions.TLS_1_0.minor) {\n // use pre-generated IV when initializing for TLS 1.0, otherwise use the\n // residue from the previous decryption\n iv = s.cipherState.init ? null : s.cipherState.iv;\n } else {\n // TLS 1.1+ use an explicit IV every time to protect against CBC attacks\n // that is appended to the record fragment\n iv = record.fragment.getBytes(16);\n }\n\n s.cipherState.init = true;\n\n // start cipher\n var cipher = s.cipherState.cipher;\n cipher.start({iv: iv});\n\n // do decryption\n cipher.update(record.fragment);\n rval = cipher.finish(decrypt_aes_cbc_sha1_padding);\n\n // even if decryption fails, keep going to minimize timing attacks\n\n // decrypted data:\n // first (len - 20) bytes = application data\n // last 20 bytes = MAC\n var macLen = s.macLength;\n\n // create a random MAC to check against should the mac length check fail\n // Note: do this regardless of the failure to keep timing consistent\n var mac = forge.random.getBytesSync(macLen);\n\n // get fragment and mac\n var len = cipher.output.length();\n if(len >= macLen) {\n record.fragment = cipher.output.getBytes(len - macLen);\n mac = cipher.output.getBytes(macLen);\n } else {\n // bad data, but get bytes anyway to try to keep timing consistent\n record.fragment = cipher.output.getBytes();\n }\n record.fragment = forge.util.createBuffer(record.fragment);\n record.length = record.fragment.length();\n\n // see if data integrity checks out, update sequence number\n var mac2 = s.macFunction(s.macKey, s.sequenceNumber, record);\n s.updateSequenceNumber();\n rval = compareMacs(s.macKey, mac, mac2) && rval;\n return rval;\n}\n\n/**\n * Safely compare two MACs. This function will compare two MACs in a way\n * that protects against timing attacks.\n *\n * TODO: Expose elsewhere as a utility API.\n *\n * See: https://www.nccgroup.trust/us/about-us/newsroom-and-events/blog/2011/february/double-hmac-verification/\n *\n * @param key the MAC key to use.\n * @param mac1 as a binary-encoded string of bytes.\n * @param mac2 as a binary-encoded string of bytes.\n *\n * @return true if the MACs are the same, false if not.\n */\nfunction compareMacs(key, mac1, mac2) {\n var hmac = forge.hmac.create();\n\n hmac.start('SHA1', key);\n hmac.update(mac1);\n mac1 = hmac.digest().getBytes();\n\n hmac.start(null, null);\n hmac.update(mac2);\n mac2 = hmac.digest().getBytes();\n\n return mac1 === mac2;\n}\n","/**\n * Secure Hash Algorithm with a 1024-bit block size implementation.\n *\n * This includes: SHA-512, SHA-384, SHA-512/224, and SHA-512/256. For\n * SHA-256 (block size 512 bits), see sha256.js.\n *\n * See FIPS 180-4 for details.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2014-2015 Digital Bazaar, Inc.\n */\nvar forge = require('./forge');\nrequire('./md');\nrequire('./util');\n\nvar sha512 = module.exports = forge.sha512 = forge.sha512 || {};\n\n// SHA-512\nforge.md.sha512 = forge.md.algorithms.sha512 = sha512;\n\n// SHA-384\nvar sha384 = forge.sha384 = forge.sha512.sha384 = forge.sha512.sha384 || {};\nsha384.create = function() {\n return sha512.create('SHA-384');\n};\nforge.md.sha384 = forge.md.algorithms.sha384 = sha384;\n\n// SHA-512/256\nforge.sha512.sha256 = forge.sha512.sha256 || {\n create: function() {\n return sha512.create('SHA-512/256');\n }\n};\nforge.md['sha512/256'] = forge.md.algorithms['sha512/256'] =\n forge.sha512.sha256;\n\n// SHA-512/224\nforge.sha512.sha224 = forge.sha512.sha224 || {\n create: function() {\n return sha512.create('SHA-512/224');\n }\n};\nforge.md['sha512/224'] = forge.md.algorithms['sha512/224'] =\n forge.sha512.sha224;\n\n/**\n * Creates a SHA-2 message digest object.\n *\n * @param algorithm the algorithm to use (SHA-512, SHA-384, SHA-512/224,\n * SHA-512/256).\n *\n * @return a message digest object.\n */\nsha512.create = function(algorithm) {\n // do initialization as necessary\n if(!_initialized) {\n _init();\n }\n\n if(typeof algorithm === 'undefined') {\n algorithm = 'SHA-512';\n }\n\n if(!(algorithm in _states)) {\n throw new Error('Invalid SHA-512 algorithm: ' + algorithm);\n }\n\n // SHA-512 state contains eight 64-bit integers (each as two 32-bit ints)\n var _state = _states[algorithm];\n var _h = null;\n\n // input buffer\n var _input = forge.util.createBuffer();\n\n // used for 64-bit word storage\n var _w = new Array(80);\n for(var wi = 0; wi < 80; ++wi) {\n _w[wi] = new Array(2);\n }\n\n // determine digest length by algorithm name (default)\n var digestLength = 64;\n switch(algorithm) {\n case 'SHA-384':\n digestLength = 48;\n break;\n case 'SHA-512/256':\n digestLength = 32;\n break;\n case 'SHA-512/224':\n digestLength = 28;\n break;\n }\n\n // message digest object\n var md = {\n // SHA-512 => sha512\n algorithm: algorithm.replace('-', '').toLowerCase(),\n blockLength: 128,\n digestLength: digestLength,\n // 56-bit length of message so far (does not including padding)\n messageLength: 0,\n // true message length\n fullMessageLength: null,\n // size of message length in bytes\n messageLengthSize: 16\n };\n\n /**\n * Starts the digest.\n *\n * @return this digest object.\n */\n md.start = function() {\n // up to 56-bit message length for convenience\n md.messageLength = 0;\n\n // full message length (set md.messageLength128 for backwards-compatibility)\n md.fullMessageLength = md.messageLength128 = [];\n var int32s = md.messageLengthSize / 4;\n for(var i = 0; i < int32s; ++i) {\n md.fullMessageLength.push(0);\n }\n _input = forge.util.createBuffer();\n _h = new Array(_state.length);\n for(var i = 0; i < _state.length; ++i) {\n _h[i] = _state[i].slice(0);\n }\n return md;\n };\n // start digest automatically for first time\n md.start();\n\n /**\n * Updates the digest with the given message input. The given input can\n * treated as raw input (no encoding will be applied) or an encoding of\n * 'utf8' maybe given to encode the input using UTF-8.\n *\n * @param msg the message input to update with.\n * @param encoding the encoding to use (default: 'raw', other: 'utf8').\n *\n * @return this digest object.\n */\n md.update = function(msg, encoding) {\n if(encoding === 'utf8') {\n msg = forge.util.encodeUtf8(msg);\n }\n\n // update message length\n var len = msg.length;\n md.messageLength += len;\n len = [(len / 0x100000000) >>> 0, len >>> 0];\n for(var i = md.fullMessageLength.length - 1; i >= 0; --i) {\n md.fullMessageLength[i] += len[1];\n len[1] = len[0] + ((md.fullMessageLength[i] / 0x100000000) >>> 0);\n md.fullMessageLength[i] = md.fullMessageLength[i] >>> 0;\n len[0] = ((len[1] / 0x100000000) >>> 0);\n }\n\n // add bytes to input buffer\n _input.putBytes(msg);\n\n // process bytes\n _update(_h, _w, _input);\n\n // compact input buffer every 2K or if empty\n if(_input.read > 2048 || _input.length() === 0) {\n _input.compact();\n }\n\n return md;\n };\n\n /**\n * Produces the digest.\n *\n * @return a byte buffer containing the digest value.\n */\n md.digest = function() {\n /* Note: Here we copy the remaining bytes in the input buffer and\n add the appropriate SHA-512 padding. Then we do the final update\n on a copy of the state so that if the user wants to get\n intermediate digests they can do so. */\n\n /* Determine the number of bytes that must be added to the message\n to ensure its length is congruent to 896 mod 1024. In other words,\n the data to be digested must be a multiple of 1024 bits (or 128 bytes).\n This data includes the message, some padding, and the length of the\n message. Since the length of the message will be encoded as 16 bytes (128\n bits), that means that the last segment of the data must have 112 bytes\n (896 bits) of message and padding. Therefore, the length of the message\n plus the padding must be congruent to 896 mod 1024 because\n 1024 - 128 = 896.\n\n In order to fill up the message length it must be filled with\n padding that begins with 1 bit followed by all 0 bits. Padding\n must *always* be present, so if the message length is already\n congruent to 896 mod 1024, then 1024 padding bits must be added. */\n\n var finalBlock = forge.util.createBuffer();\n finalBlock.putBytes(_input.bytes());\n\n // compute remaining size to be digested (include message length size)\n var remaining = (\n md.fullMessageLength[md.fullMessageLength.length - 1] +\n md.messageLengthSize);\n\n // add padding for overflow blockSize - overflow\n // _padding starts with 1 byte with first bit is set (byte value 128), then\n // there may be up to (blockSize - 1) other pad bytes\n var overflow = remaining & (md.blockLength - 1);\n finalBlock.putBytes(_padding.substr(0, md.blockLength - overflow));\n\n // serialize message length in bits in big-endian order; since length\n // is stored in bytes we multiply by 8 and add carry from next int\n var next, carry;\n var bits = md.fullMessageLength[0] * 8;\n for(var i = 0; i < md.fullMessageLength.length - 1; ++i) {\n next = md.fullMessageLength[i + 1] * 8;\n carry = (next / 0x100000000) >>> 0;\n bits += carry;\n finalBlock.putInt32(bits >>> 0);\n bits = next >>> 0;\n }\n finalBlock.putInt32(bits);\n\n var h = new Array(_h.length);\n for(var i = 0; i < _h.length; ++i) {\n h[i] = _h[i].slice(0);\n }\n _update(h, _w, finalBlock);\n var rval = forge.util.createBuffer();\n var hlen;\n if(algorithm === 'SHA-512') {\n hlen = h.length;\n } else if(algorithm === 'SHA-384') {\n hlen = h.length - 2;\n } else {\n hlen = h.length - 4;\n }\n for(var i = 0; i < hlen; ++i) {\n rval.putInt32(h[i][0]);\n if(i !== hlen - 1 || algorithm !== 'SHA-512/224') {\n rval.putInt32(h[i][1]);\n }\n }\n return rval;\n };\n\n return md;\n};\n\n// sha-512 padding bytes not initialized yet\nvar _padding = null;\nvar _initialized = false;\n\n// table of constants\nvar _k = null;\n\n// initial hash states\nvar _states = null;\n\n/**\n * Initializes the constant tables.\n */\nfunction _init() {\n // create padding\n _padding = String.fromCharCode(128);\n _padding += forge.util.fillString(String.fromCharCode(0x00), 128);\n\n // create K table for SHA-512\n _k = [\n [0x428a2f98, 0xd728ae22], [0x71374491, 0x23ef65cd],\n [0xb5c0fbcf, 0xec4d3b2f], [0xe9b5dba5, 0x8189dbbc],\n [0x3956c25b, 0xf348b538], [0x59f111f1, 0xb605d019],\n [0x923f82a4, 0xaf194f9b], [0xab1c5ed5, 0xda6d8118],\n [0xd807aa98, 0xa3030242], [0x12835b01, 0x45706fbe],\n [0x243185be, 0x4ee4b28c], [0x550c7dc3, 0xd5ffb4e2],\n [0x72be5d74, 0xf27b896f], [0x80deb1fe, 0x3b1696b1],\n [0x9bdc06a7, 0x25c71235], [0xc19bf174, 0xcf692694],\n [0xe49b69c1, 0x9ef14ad2], [0xefbe4786, 0x384f25e3],\n [0x0fc19dc6, 0x8b8cd5b5], [0x240ca1cc, 0x77ac9c65],\n [0x2de92c6f, 0x592b0275], [0x4a7484aa, 0x6ea6e483],\n [0x5cb0a9dc, 0xbd41fbd4], [0x76f988da, 0x831153b5],\n [0x983e5152, 0xee66dfab], [0xa831c66d, 0x2db43210],\n [0xb00327c8, 0x98fb213f], [0xbf597fc7, 0xbeef0ee4],\n [0xc6e00bf3, 0x3da88fc2], [0xd5a79147, 0x930aa725],\n [0x06ca6351, 0xe003826f], [0x14292967, 0x0a0e6e70],\n [0x27b70a85, 0x46d22ffc], [0x2e1b2138, 0x5c26c926],\n [0x4d2c6dfc, 0x5ac42aed], [0x53380d13, 0x9d95b3df],\n [0x650a7354, 0x8baf63de], [0x766a0abb, 0x3c77b2a8],\n [0x81c2c92e, 0x47edaee6], [0x92722c85, 0x1482353b],\n [0xa2bfe8a1, 0x4cf10364], [0xa81a664b, 0xbc423001],\n [0xc24b8b70, 0xd0f89791], [0xc76c51a3, 0x0654be30],\n [0xd192e819, 0xd6ef5218], [0xd6990624, 0x5565a910],\n [0xf40e3585, 0x5771202a], [0x106aa070, 0x32bbd1b8],\n [0x19a4c116, 0xb8d2d0c8], [0x1e376c08, 0x5141ab53],\n [0x2748774c, 0xdf8eeb99], [0x34b0bcb5, 0xe19b48a8],\n [0x391c0cb3, 0xc5c95a63], [0x4ed8aa4a, 0xe3418acb],\n [0x5b9cca4f, 0x7763e373], [0x682e6ff3, 0xd6b2b8a3],\n [0x748f82ee, 0x5defb2fc], [0x78a5636f, 0x43172f60],\n [0x84c87814, 0xa1f0ab72], [0x8cc70208, 0x1a6439ec],\n [0x90befffa, 0x23631e28], [0xa4506ceb, 0xde82bde9],\n [0xbef9a3f7, 0xb2c67915], [0xc67178f2, 0xe372532b],\n [0xca273ece, 0xea26619c], [0xd186b8c7, 0x21c0c207],\n [0xeada7dd6, 0xcde0eb1e], [0xf57d4f7f, 0xee6ed178],\n [0x06f067aa, 0x72176fba], [0x0a637dc5, 0xa2c898a6],\n [0x113f9804, 0xbef90dae], [0x1b710b35, 0x131c471b],\n [0x28db77f5, 0x23047d84], [0x32caab7b, 0x40c72493],\n [0x3c9ebe0a, 0x15c9bebc], [0x431d67c4, 0x9c100d4c],\n [0x4cc5d4be, 0xcb3e42b6], [0x597f299c, 0xfc657e2a],\n [0x5fcb6fab, 0x3ad6faec], [0x6c44198c, 0x4a475817]\n ];\n\n // initial hash states\n _states = {};\n _states['SHA-512'] = [\n [0x6a09e667, 0xf3bcc908],\n [0xbb67ae85, 0x84caa73b],\n [0x3c6ef372, 0xfe94f82b],\n [0xa54ff53a, 0x5f1d36f1],\n [0x510e527f, 0xade682d1],\n [0x9b05688c, 0x2b3e6c1f],\n [0x1f83d9ab, 0xfb41bd6b],\n [0x5be0cd19, 0x137e2179]\n ];\n _states['SHA-384'] = [\n [0xcbbb9d5d, 0xc1059ed8],\n [0x629a292a, 0x367cd507],\n [0x9159015a, 0x3070dd17],\n [0x152fecd8, 0xf70e5939],\n [0x67332667, 0xffc00b31],\n [0x8eb44a87, 0x68581511],\n [0xdb0c2e0d, 0x64f98fa7],\n [0x47b5481d, 0xbefa4fa4]\n ];\n _states['SHA-512/256'] = [\n [0x22312194, 0xFC2BF72C],\n [0x9F555FA3, 0xC84C64C2],\n [0x2393B86B, 0x6F53B151],\n [0x96387719, 0x5940EABD],\n [0x96283EE2, 0xA88EFFE3],\n [0xBE5E1E25, 0x53863992],\n [0x2B0199FC, 0x2C85B8AA],\n [0x0EB72DDC, 0x81C52CA2]\n ];\n _states['SHA-512/224'] = [\n [0x8C3D37C8, 0x19544DA2],\n [0x73E19966, 0x89DCD4D6],\n [0x1DFAB7AE, 0x32FF9C82],\n [0x679DD514, 0x582F9FCF],\n [0x0F6D2B69, 0x7BD44DA8],\n [0x77E36F73, 0x04C48942],\n [0x3F9D85A8, 0x6A1D36C8],\n [0x1112E6AD, 0x91D692A1]\n ];\n\n // now initialized\n _initialized = true;\n}\n\n/**\n * Updates a SHA-512 state with the given byte buffer.\n *\n * @param s the SHA-512 state to update.\n * @param w the array to use to store words.\n * @param bytes the byte buffer to update with.\n */\nfunction _update(s, w, bytes) {\n // consume 512 bit (128 byte) chunks\n var t1_hi, t1_lo;\n var t2_hi, t2_lo;\n var s0_hi, s0_lo;\n var s1_hi, s1_lo;\n var ch_hi, ch_lo;\n var maj_hi, maj_lo;\n var a_hi, a_lo;\n var b_hi, b_lo;\n var c_hi, c_lo;\n var d_hi, d_lo;\n var e_hi, e_lo;\n var f_hi, f_lo;\n var g_hi, g_lo;\n var h_hi, h_lo;\n var i, hi, lo, w2, w7, w15, w16;\n var len = bytes.length();\n while(len >= 128) {\n // the w array will be populated with sixteen 64-bit big-endian words\n // and then extended into 64 64-bit words according to SHA-512\n for(i = 0; i < 16; ++i) {\n w[i][0] = bytes.getInt32() >>> 0;\n w[i][1] = bytes.getInt32() >>> 0;\n }\n for(; i < 80; ++i) {\n // for word 2 words ago: ROTR 19(x) ^ ROTR 61(x) ^ SHR 6(x)\n w2 = w[i - 2];\n hi = w2[0];\n lo = w2[1];\n\n // high bits\n t1_hi = (\n ((hi >>> 19) | (lo << 13)) ^ // ROTR 19\n ((lo >>> 29) | (hi << 3)) ^ // ROTR 61/(swap + ROTR 29)\n (hi >>> 6)) >>> 0; // SHR 6\n // low bits\n t1_lo = (\n ((hi << 13) | (lo >>> 19)) ^ // ROTR 19\n ((lo << 3) | (hi >>> 29)) ^ // ROTR 61/(swap + ROTR 29)\n ((hi << 26) | (lo >>> 6))) >>> 0; // SHR 6\n\n // for word 15 words ago: ROTR 1(x) ^ ROTR 8(x) ^ SHR 7(x)\n w15 = w[i - 15];\n hi = w15[0];\n lo = w15[1];\n\n // high bits\n t2_hi = (\n ((hi >>> 1) | (lo << 31)) ^ // ROTR 1\n ((hi >>> 8) | (lo << 24)) ^ // ROTR 8\n (hi >>> 7)) >>> 0; // SHR 7\n // low bits\n t2_lo = (\n ((hi << 31) | (lo >>> 1)) ^ // ROTR 1\n ((hi << 24) | (lo >>> 8)) ^ // ROTR 8\n ((hi << 25) | (lo >>> 7))) >>> 0; // SHR 7\n\n // sum(t1, word 7 ago, t2, word 16 ago) modulo 2^64 (carry lo overflow)\n w7 = w[i - 7];\n w16 = w[i - 16];\n lo = (t1_lo + w7[1] + t2_lo + w16[1]);\n w[i][0] = (t1_hi + w7[0] + t2_hi + w16[0] +\n ((lo / 0x100000000) >>> 0)) >>> 0;\n w[i][1] = lo >>> 0;\n }\n\n // initialize hash value for this chunk\n a_hi = s[0][0];\n a_lo = s[0][1];\n b_hi = s[1][0];\n b_lo = s[1][1];\n c_hi = s[2][0];\n c_lo = s[2][1];\n d_hi = s[3][0];\n d_lo = s[3][1];\n e_hi = s[4][0];\n e_lo = s[4][1];\n f_hi = s[5][0];\n f_lo = s[5][1];\n g_hi = s[6][0];\n g_lo = s[6][1];\n h_hi = s[7][0];\n h_lo = s[7][1];\n\n // round function\n for(i = 0; i < 80; ++i) {\n // Sum1(e) = ROTR 14(e) ^ ROTR 18(e) ^ ROTR 41(e)\n s1_hi = (\n ((e_hi >>> 14) | (e_lo << 18)) ^ // ROTR 14\n ((e_hi >>> 18) | (e_lo << 14)) ^ // ROTR 18\n ((e_lo >>> 9) | (e_hi << 23))) >>> 0; // ROTR 41/(swap + ROTR 9)\n s1_lo = (\n ((e_hi << 18) | (e_lo >>> 14)) ^ // ROTR 14\n ((e_hi << 14) | (e_lo >>> 18)) ^ // ROTR 18\n ((e_lo << 23) | (e_hi >>> 9))) >>> 0; // ROTR 41/(swap + ROTR 9)\n\n // Ch(e, f, g) (optimized the same way as SHA-1)\n ch_hi = (g_hi ^ (e_hi & (f_hi ^ g_hi))) >>> 0;\n ch_lo = (g_lo ^ (e_lo & (f_lo ^ g_lo))) >>> 0;\n\n // Sum0(a) = ROTR 28(a) ^ ROTR 34(a) ^ ROTR 39(a)\n s0_hi = (\n ((a_hi >>> 28) | (a_lo << 4)) ^ // ROTR 28\n ((a_lo >>> 2) | (a_hi << 30)) ^ // ROTR 34/(swap + ROTR 2)\n ((a_lo >>> 7) | (a_hi << 25))) >>> 0; // ROTR 39/(swap + ROTR 7)\n s0_lo = (\n ((a_hi << 4) | (a_lo >>> 28)) ^ // ROTR 28\n ((a_lo << 30) | (a_hi >>> 2)) ^ // ROTR 34/(swap + ROTR 2)\n ((a_lo << 25) | (a_hi >>> 7))) >>> 0; // ROTR 39/(swap + ROTR 7)\n\n // Maj(a, b, c) (optimized the same way as SHA-1)\n maj_hi = ((a_hi & b_hi) | (c_hi & (a_hi ^ b_hi))) >>> 0;\n maj_lo = ((a_lo & b_lo) | (c_lo & (a_lo ^ b_lo))) >>> 0;\n\n // main algorithm\n // t1 = (h + s1 + ch + _k[i] + _w[i]) modulo 2^64 (carry lo overflow)\n lo = (h_lo + s1_lo + ch_lo + _k[i][1] + w[i][1]);\n t1_hi = (h_hi + s1_hi + ch_hi + _k[i][0] + w[i][0] +\n ((lo / 0x100000000) >>> 0)) >>> 0;\n t1_lo = lo >>> 0;\n\n // t2 = s0 + maj modulo 2^64 (carry lo overflow)\n lo = s0_lo + maj_lo;\n t2_hi = (s0_hi + maj_hi + ((lo / 0x100000000) >>> 0)) >>> 0;\n t2_lo = lo >>> 0;\n\n h_hi = g_hi;\n h_lo = g_lo;\n\n g_hi = f_hi;\n g_lo = f_lo;\n\n f_hi = e_hi;\n f_lo = e_lo;\n\n // e = (d + t1) modulo 2^64 (carry lo overflow)\n lo = d_lo + t1_lo;\n e_hi = (d_hi + t1_hi + ((lo / 0x100000000) >>> 0)) >>> 0;\n e_lo = lo >>> 0;\n\n d_hi = c_hi;\n d_lo = c_lo;\n\n c_hi = b_hi;\n c_lo = b_lo;\n\n b_hi = a_hi;\n b_lo = a_lo;\n\n // a = (t1 + t2) modulo 2^64 (carry lo overflow)\n lo = t1_lo + t2_lo;\n a_hi = (t1_hi + t2_hi + ((lo / 0x100000000) >>> 0)) >>> 0;\n a_lo = lo >>> 0;\n }\n\n // update hash state (additional modulo 2^64)\n lo = s[0][1] + a_lo;\n s[0][0] = (s[0][0] + a_hi + ((lo / 0x100000000) >>> 0)) >>> 0;\n s[0][1] = lo >>> 0;\n\n lo = s[1][1] + b_lo;\n s[1][0] = (s[1][0] + b_hi + ((lo / 0x100000000) >>> 0)) >>> 0;\n s[1][1] = lo >>> 0;\n\n lo = s[2][1] + c_lo;\n s[2][0] = (s[2][0] + c_hi + ((lo / 0x100000000) >>> 0)) >>> 0;\n s[2][1] = lo >>> 0;\n\n lo = s[3][1] + d_lo;\n s[3][0] = (s[3][0] + d_hi + ((lo / 0x100000000) >>> 0)) >>> 0;\n s[3][1] = lo >>> 0;\n\n lo = s[4][1] + e_lo;\n s[4][0] = (s[4][0] + e_hi + ((lo / 0x100000000) >>> 0)) >>> 0;\n s[4][1] = lo >>> 0;\n\n lo = s[5][1] + f_lo;\n s[5][0] = (s[5][0] + f_hi + ((lo / 0x100000000) >>> 0)) >>> 0;\n s[5][1] = lo >>> 0;\n\n lo = s[6][1] + g_lo;\n s[6][0] = (s[6][0] + g_hi + ((lo / 0x100000000) >>> 0)) >>> 0;\n s[6][1] = lo >>> 0;\n\n lo = s[7][1] + h_lo;\n s[7][0] = (s[7][0] + h_hi + ((lo / 0x100000000) >>> 0)) >>> 0;\n s[7][1] = lo >>> 0;\n\n len -= 128;\n }\n}\n","/**\n * Copyright (c) 2019 Digital Bazaar, Inc.\n */\n\nvar forge = require('./forge');\nrequire('./asn1');\nvar asn1 = forge.asn1;\n\nexports.privateKeyValidator = {\n // PrivateKeyInfo\n name: 'PrivateKeyInfo',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n // Version (INTEGER)\n name: 'PrivateKeyInfo.version',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.INTEGER,\n constructed: false,\n capture: 'privateKeyVersion'\n }, {\n // privateKeyAlgorithm\n name: 'PrivateKeyInfo.privateKeyAlgorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'AlgorithmIdentifier.algorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OID,\n constructed: false,\n capture: 'privateKeyOid'\n }]\n }, {\n // PrivateKey\n name: 'PrivateKeyInfo',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OCTETSTRING,\n constructed: false,\n capture: 'privateKey'\n }]\n};\n\nexports.publicKeyValidator = {\n name: 'SubjectPublicKeyInfo',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n captureAsn1: 'subjectPublicKeyInfo',\n value: [{\n name: 'SubjectPublicKeyInfo.AlgorithmIdentifier',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'AlgorithmIdentifier.algorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OID,\n constructed: false,\n capture: 'publicKeyOid'\n }]\n },\n // capture group for ed25519PublicKey\n {\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.BITSTRING,\n constructed: false,\n composed: true,\n captureBitStringValue: 'ed25519PublicKey'\n }\n // FIXME: this is capture group for rsaPublicKey, use it in this API or\n // discard?\n /* {\n // subjectPublicKey\n name: 'SubjectPublicKeyInfo.subjectPublicKey',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.BITSTRING,\n constructed: false,\n value: [{\n // RSAPublicKey\n name: 'SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n optional: true,\n captureAsn1: 'rsaPublicKey'\n }]\n } */\n ]\n};\n","/**\n * JavaScript implementation of Ed25519.\n *\n * Copyright (c) 2017-2019 Digital Bazaar, Inc.\n *\n * This implementation is based on the most excellent TweetNaCl which is\n * in the public domain. Many thanks to its contributors:\n *\n * https://github.com/dchest/tweetnacl-js\n */\nvar forge = require('./forge');\nrequire('./jsbn');\nrequire('./random');\nrequire('./sha512');\nrequire('./util');\nvar asn1Validator = require('./asn1-validator');\nvar publicKeyValidator = asn1Validator.publicKeyValidator;\nvar privateKeyValidator = asn1Validator.privateKeyValidator;\n\nif(typeof BigInteger === 'undefined') {\n var BigInteger = forge.jsbn.BigInteger;\n}\n\nvar ByteBuffer = forge.util.ByteBuffer;\nvar NativeBuffer = typeof Buffer === 'undefined' ? Uint8Array : Buffer;\n\n/*\n * Ed25519 algorithms, see RFC 8032:\n * https://tools.ietf.org/html/rfc8032\n */\nforge.pki = forge.pki || {};\nmodule.exports = forge.pki.ed25519 = forge.ed25519 = forge.ed25519 || {};\nvar ed25519 = forge.ed25519;\n\ned25519.constants = {};\ned25519.constants.PUBLIC_KEY_BYTE_LENGTH = 32;\ned25519.constants.PRIVATE_KEY_BYTE_LENGTH = 64;\ned25519.constants.SEED_BYTE_LENGTH = 32;\ned25519.constants.SIGN_BYTE_LENGTH = 64;\ned25519.constants.HASH_BYTE_LENGTH = 64;\n\ned25519.generateKeyPair = function(options) {\n options = options || {};\n var seed = options.seed;\n if(seed === undefined) {\n // generate seed\n seed = forge.random.getBytesSync(ed25519.constants.SEED_BYTE_LENGTH);\n } else if(typeof seed === 'string') {\n if(seed.length !== ed25519.constants.SEED_BYTE_LENGTH) {\n throw new TypeError(\n '\"seed\" must be ' + ed25519.constants.SEED_BYTE_LENGTH +\n ' bytes in length.');\n }\n } else if(!(seed instanceof Uint8Array)) {\n throw new TypeError(\n '\"seed\" must be a node.js Buffer, Uint8Array, or a binary string.');\n }\n\n seed = messageToNativeBuffer({message: seed, encoding: 'binary'});\n\n var pk = new NativeBuffer(ed25519.constants.PUBLIC_KEY_BYTE_LENGTH);\n var sk = new NativeBuffer(ed25519.constants.PRIVATE_KEY_BYTE_LENGTH);\n for(var i = 0; i < 32; ++i) {\n sk[i] = seed[i];\n }\n crypto_sign_keypair(pk, sk);\n return {publicKey: pk, privateKey: sk};\n};\n\n/**\n * Converts a private key from a RFC8410 ASN.1 encoding.\n *\n * @param obj - The asn1 representation of a private key.\n *\n * @returns {Object} keyInfo - The key information.\n * @returns {Buffer|Uint8Array} keyInfo.privateKeyBytes - 32 private key bytes.\n */\ned25519.privateKeyFromAsn1 = function(obj) {\n var capture = {};\n var errors = [];\n var valid = forge.asn1.validate(obj, privateKeyValidator, capture, errors);\n if(!valid) {\n var error = new Error('Invalid Key.');\n error.errors = errors;\n throw error;\n }\n var oid = forge.asn1.derToOid(capture.privateKeyOid);\n var ed25519Oid = forge.oids.EdDSA25519;\n if(oid !== ed25519Oid) {\n throw new Error('Invalid OID \"' + oid + '\"; OID must be \"' +\n ed25519Oid + '\".');\n }\n var privateKey = capture.privateKey;\n // manually extract the private key bytes from nested octet string, see FIXME:\n // https://github.com/digitalbazaar/forge/blob/master/lib/asn1.js#L542\n var privateKeyBytes = messageToNativeBuffer({\n message: forge.asn1.fromDer(privateKey).value,\n encoding: 'binary'\n });\n // TODO: RFC8410 specifies a format for encoding the public key bytes along\n // with the private key bytes. `publicKeyBytes` can be returned in the\n // future. https://tools.ietf.org/html/rfc8410#section-10.3\n return {privateKeyBytes: privateKeyBytes};\n};\n\n/**\n * Converts a public key from a RFC8410 ASN.1 encoding.\n *\n * @param obj - The asn1 representation of a public key.\n *\n * @return {Buffer|Uint8Array} - 32 public key bytes.\n */\ned25519.publicKeyFromAsn1 = function(obj) {\n // get SubjectPublicKeyInfo\n var capture = {};\n var errors = [];\n var valid = forge.asn1.validate(obj, publicKeyValidator, capture, errors);\n if(!valid) {\n var error = new Error('Invalid Key.');\n error.errors = errors;\n throw error;\n }\n var oid = forge.asn1.derToOid(capture.publicKeyOid);\n var ed25519Oid = forge.oids.EdDSA25519;\n if(oid !== ed25519Oid) {\n throw new Error('Invalid OID \"' + oid + '\"; OID must be \"' +\n ed25519Oid + '\".');\n }\n var publicKeyBytes = capture.ed25519PublicKey;\n if(publicKeyBytes.length !== ed25519.constants.PUBLIC_KEY_BYTE_LENGTH) {\n throw new Error('Key length is invalid.');\n }\n return messageToNativeBuffer({\n message: publicKeyBytes,\n encoding: 'binary'\n });\n};\n\ned25519.publicKeyFromPrivateKey = function(options) {\n options = options || {};\n var privateKey = messageToNativeBuffer({\n message: options.privateKey, encoding: 'binary'\n });\n if(privateKey.length !== ed25519.constants.PRIVATE_KEY_BYTE_LENGTH) {\n throw new TypeError(\n '\"options.privateKey\" must have a byte length of ' +\n ed25519.constants.PRIVATE_KEY_BYTE_LENGTH);\n }\n\n var pk = new NativeBuffer(ed25519.constants.PUBLIC_KEY_BYTE_LENGTH);\n for(var i = 0; i < pk.length; ++i) {\n pk[i] = privateKey[32 + i];\n }\n return pk;\n};\n\ned25519.sign = function(options) {\n options = options || {};\n var msg = messageToNativeBuffer(options);\n var privateKey = messageToNativeBuffer({\n message: options.privateKey,\n encoding: 'binary'\n });\n if(privateKey.length === ed25519.constants.SEED_BYTE_LENGTH) {\n var keyPair = ed25519.generateKeyPair({seed: privateKey});\n privateKey = keyPair.privateKey;\n } else if(privateKey.length !== ed25519.constants.PRIVATE_KEY_BYTE_LENGTH) {\n throw new TypeError(\n '\"options.privateKey\" must have a byte length of ' +\n ed25519.constants.SEED_BYTE_LENGTH + ' or ' +\n ed25519.constants.PRIVATE_KEY_BYTE_LENGTH);\n }\n\n var signedMsg = new NativeBuffer(\n ed25519.constants.SIGN_BYTE_LENGTH + msg.length);\n crypto_sign(signedMsg, msg, msg.length, privateKey);\n\n var sig = new NativeBuffer(ed25519.constants.SIGN_BYTE_LENGTH);\n for(var i = 0; i < sig.length; ++i) {\n sig[i] = signedMsg[i];\n }\n return sig;\n};\n\ned25519.verify = function(options) {\n options = options || {};\n var msg = messageToNativeBuffer(options);\n if(options.signature === undefined) {\n throw new TypeError(\n '\"options.signature\" must be a node.js Buffer, a Uint8Array, a forge ' +\n 'ByteBuffer, or a binary string.');\n }\n var sig = messageToNativeBuffer({\n message: options.signature,\n encoding: 'binary'\n });\n if(sig.length !== ed25519.constants.SIGN_BYTE_LENGTH) {\n throw new TypeError(\n '\"options.signature\" must have a byte length of ' +\n ed25519.constants.SIGN_BYTE_LENGTH);\n }\n var publicKey = messageToNativeBuffer({\n message: options.publicKey,\n encoding: 'binary'\n });\n if(publicKey.length !== ed25519.constants.PUBLIC_KEY_BYTE_LENGTH) {\n throw new TypeError(\n '\"options.publicKey\" must have a byte length of ' +\n ed25519.constants.PUBLIC_KEY_BYTE_LENGTH);\n }\n\n var sm = new NativeBuffer(ed25519.constants.SIGN_BYTE_LENGTH + msg.length);\n var m = new NativeBuffer(ed25519.constants.SIGN_BYTE_LENGTH + msg.length);\n var i;\n for(i = 0; i < ed25519.constants.SIGN_BYTE_LENGTH; ++i) {\n sm[i] = sig[i];\n }\n for(i = 0; i < msg.length; ++i) {\n sm[i + ed25519.constants.SIGN_BYTE_LENGTH] = msg[i];\n }\n return (crypto_sign_open(m, sm, sm.length, publicKey) >= 0);\n};\n\nfunction messageToNativeBuffer(options) {\n var message = options.message;\n if(message instanceof Uint8Array || message instanceof NativeBuffer) {\n return message;\n }\n\n var encoding = options.encoding;\n if(message === undefined) {\n if(options.md) {\n // TODO: more rigorous validation that `md` is a MessageDigest\n message = options.md.digest().getBytes();\n encoding = 'binary';\n } else {\n throw new TypeError('\"options.message\" or \"options.md\" not specified.');\n }\n }\n\n if(typeof message === 'string' && !encoding) {\n throw new TypeError('\"options.encoding\" must be \"binary\" or \"utf8\".');\n }\n\n if(typeof message === 'string') {\n if(typeof Buffer !== 'undefined') {\n return Buffer.from(message, encoding);\n }\n message = new ByteBuffer(message, encoding);\n } else if(!(message instanceof ByteBuffer)) {\n throw new TypeError(\n '\"options.message\" must be a node.js Buffer, a Uint8Array, a forge ' +\n 'ByteBuffer, or a string with \"options.encoding\" specifying its ' +\n 'encoding.');\n }\n\n // convert to native buffer\n var buffer = new NativeBuffer(message.length());\n for(var i = 0; i < buffer.length; ++i) {\n buffer[i] = message.at(i);\n }\n return buffer;\n}\n\nvar gf0 = gf();\nvar gf1 = gf([1]);\nvar D = gf([\n 0x78a3, 0x1359, 0x4dca, 0x75eb, 0xd8ab, 0x4141, 0x0a4d, 0x0070,\n 0xe898, 0x7779, 0x4079, 0x8cc7, 0xfe73, 0x2b6f, 0x6cee, 0x5203]);\nvar D2 = gf([\n 0xf159, 0x26b2, 0x9b94, 0xebd6, 0xb156, 0x8283, 0x149a, 0x00e0,\n 0xd130, 0xeef3, 0x80f2, 0x198e, 0xfce7, 0x56df, 0xd9dc, 0x2406]);\nvar X = gf([\n 0xd51a, 0x8f25, 0x2d60, 0xc956, 0xa7b2, 0x9525, 0xc760, 0x692c,\n 0xdc5c, 0xfdd6, 0xe231, 0xc0a4, 0x53fe, 0xcd6e, 0x36d3, 0x2169]);\nvar Y = gf([\n 0x6658, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666,\n 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666]);\nvar L = new Float64Array([\n 0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58,\n 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10]);\nvar I = gf([\n 0xa0b0, 0x4a0e, 0x1b27, 0xc4ee, 0xe478, 0xad2f, 0x1806, 0x2f43,\n 0xd7a7, 0x3dfb, 0x0099, 0x2b4d, 0xdf0b, 0x4fc1, 0x2480, 0x2b83]);\n\n// TODO: update forge buffer implementation to use `Buffer` or `Uint8Array`,\n// whichever is available, to improve performance\nfunction sha512(msg, msgLen) {\n // Note: `out` and `msg` are NativeBuffer\n var md = forge.md.sha512.create();\n var buffer = new ByteBuffer(msg);\n md.update(buffer.getBytes(msgLen), 'binary');\n var hash = md.digest().getBytes();\n if(typeof Buffer !== 'undefined') {\n return Buffer.from(hash, 'binary');\n }\n var out = new NativeBuffer(ed25519.constants.HASH_BYTE_LENGTH);\n for(var i = 0; i < 64; ++i) {\n out[i] = hash.charCodeAt(i);\n }\n return out;\n}\n\nfunction crypto_sign_keypair(pk, sk) {\n var p = [gf(), gf(), gf(), gf()];\n var i;\n\n var d = sha512(sk, 32);\n d[0] &= 248;\n d[31] &= 127;\n d[31] |= 64;\n\n scalarbase(p, d);\n pack(pk, p);\n\n for(i = 0; i < 32; ++i) {\n sk[i + 32] = pk[i];\n }\n return 0;\n}\n\n// Note: difference from C - smlen returned, not passed as argument.\nfunction crypto_sign(sm, m, n, sk) {\n var i, j, x = new Float64Array(64);\n var p = [gf(), gf(), gf(), gf()];\n\n var d = sha512(sk, 32);\n d[0] &= 248;\n d[31] &= 127;\n d[31] |= 64;\n\n var smlen = n + 64;\n for(i = 0; i < n; ++i) {\n sm[64 + i] = m[i];\n }\n for(i = 0; i < 32; ++i) {\n sm[32 + i] = d[32 + i];\n }\n\n var r = sha512(sm.subarray(32), n + 32);\n reduce(r);\n scalarbase(p, r);\n pack(sm, p);\n\n for(i = 32; i < 64; ++i) {\n sm[i] = sk[i];\n }\n var h = sha512(sm, n + 64);\n reduce(h);\n\n for(i = 32; i < 64; ++i) {\n x[i] = 0;\n }\n for(i = 0; i < 32; ++i) {\n x[i] = r[i];\n }\n for(i = 0; i < 32; ++i) {\n for(j = 0; j < 32; j++) {\n x[i + j] += h[i] * d[j];\n }\n }\n\n modL(sm.subarray(32), x);\n return smlen;\n}\n\nfunction crypto_sign_open(m, sm, n, pk) {\n var i, mlen;\n var t = new NativeBuffer(32);\n var p = [gf(), gf(), gf(), gf()],\n q = [gf(), gf(), gf(), gf()];\n\n mlen = -1;\n if(n < 64) {\n return -1;\n }\n\n if(unpackneg(q, pk)) {\n return -1;\n }\n\n for(i = 0; i < n; ++i) {\n m[i] = sm[i];\n }\n for(i = 0; i < 32; ++i) {\n m[i + 32] = pk[i];\n }\n var h = sha512(m, n);\n reduce(h);\n scalarmult(p, q, h);\n\n scalarbase(q, sm.subarray(32));\n add(p, q);\n pack(t, p);\n\n n -= 64;\n if(crypto_verify_32(sm, 0, t, 0)) {\n for(i = 0; i < n; ++i) {\n m[i] = 0;\n }\n return -1;\n }\n\n for(i = 0; i < n; ++i) {\n m[i] = sm[i + 64];\n }\n mlen = n;\n return mlen;\n}\n\nfunction modL(r, x) {\n var carry, i, j, k;\n for(i = 63; i >= 32; --i) {\n carry = 0;\n for(j = i - 32, k = i - 12; j < k; ++j) {\n x[j] += carry - 16 * x[i] * L[j - (i - 32)];\n carry = (x[j] + 128) >> 8;\n x[j] -= carry * 256;\n }\n x[j] += carry;\n x[i] = 0;\n }\n carry = 0;\n for(j = 0; j < 32; ++j) {\n x[j] += carry - (x[31] >> 4) * L[j];\n carry = x[j] >> 8;\n x[j] &= 255;\n }\n for(j = 0; j < 32; ++j) {\n x[j] -= carry * L[j];\n }\n for(i = 0; i < 32; ++i) {\n x[i + 1] += x[i] >> 8;\n r[i] = x[i] & 255;\n }\n}\n\nfunction reduce(r) {\n var x = new Float64Array(64);\n for(var i = 0; i < 64; ++i) {\n x[i] = r[i];\n r[i] = 0;\n }\n modL(r, x);\n}\n\nfunction add(p, q) {\n var a = gf(), b = gf(), c = gf(),\n d = gf(), e = gf(), f = gf(),\n g = gf(), h = gf(), t = gf();\n\n Z(a, p[1], p[0]);\n Z(t, q[1], q[0]);\n M(a, a, t);\n A(b, p[0], p[1]);\n A(t, q[0], q[1]);\n M(b, b, t);\n M(c, p[3], q[3]);\n M(c, c, D2);\n M(d, p[2], q[2]);\n A(d, d, d);\n Z(e, b, a);\n Z(f, d, c);\n A(g, d, c);\n A(h, b, a);\n\n M(p[0], e, f);\n M(p[1], h, g);\n M(p[2], g, f);\n M(p[3], e, h);\n}\n\nfunction cswap(p, q, b) {\n for(var i = 0; i < 4; ++i) {\n sel25519(p[i], q[i], b);\n }\n}\n\nfunction pack(r, p) {\n var tx = gf(), ty = gf(), zi = gf();\n inv25519(zi, p[2]);\n M(tx, p[0], zi);\n M(ty, p[1], zi);\n pack25519(r, ty);\n r[31] ^= par25519(tx) << 7;\n}\n\nfunction pack25519(o, n) {\n var i, j, b;\n var m = gf(), t = gf();\n for(i = 0; i < 16; ++i) {\n t[i] = n[i];\n }\n car25519(t);\n car25519(t);\n car25519(t);\n for(j = 0; j < 2; ++j) {\n m[0] = t[0] - 0xffed;\n for(i = 1; i < 15; ++i) {\n m[i] = t[i] - 0xffff - ((m[i - 1] >> 16) & 1);\n m[i-1] &= 0xffff;\n }\n m[15] = t[15] - 0x7fff - ((m[14] >> 16) & 1);\n b = (m[15] >> 16) & 1;\n m[14] &= 0xffff;\n sel25519(t, m, 1 - b);\n }\n for (i = 0; i < 16; i++) {\n o[2 * i] = t[i] & 0xff;\n o[2 * i + 1] = t[i] >> 8;\n }\n}\n\nfunction unpackneg(r, p) {\n var t = gf(), chk = gf(), num = gf(),\n den = gf(), den2 = gf(), den4 = gf(),\n den6 = gf();\n\n set25519(r[2], gf1);\n unpack25519(r[1], p);\n S(num, r[1]);\n M(den, num, D);\n Z(num, num, r[2]);\n A(den, r[2], den);\n\n S(den2, den);\n S(den4, den2);\n M(den6, den4, den2);\n M(t, den6, num);\n M(t, t, den);\n\n pow2523(t, t);\n M(t, t, num);\n M(t, t, den);\n M(t, t, den);\n M(r[0], t, den);\n\n S(chk, r[0]);\n M(chk, chk, den);\n if(neq25519(chk, num)) {\n M(r[0], r[0], I);\n }\n\n S(chk, r[0]);\n M(chk, chk, den);\n if(neq25519(chk, num)) {\n return -1;\n }\n\n if(par25519(r[0]) === (p[31] >> 7)) {\n Z(r[0], gf0, r[0]);\n }\n\n M(r[3], r[0], r[1]);\n return 0;\n}\n\nfunction unpack25519(o, n) {\n var i;\n for(i = 0; i < 16; ++i) {\n o[i] = n[2 * i] + (n[2 * i + 1] << 8);\n }\n o[15] &= 0x7fff;\n}\n\nfunction pow2523(o, i) {\n var c = gf();\n var a;\n for(a = 0; a < 16; ++a) {\n c[a] = i[a];\n }\n for(a = 250; a >= 0; --a) {\n S(c, c);\n if(a !== 1) {\n M(c, c, i);\n }\n }\n for(a = 0; a < 16; ++a) {\n o[a] = c[a];\n }\n}\n\nfunction neq25519(a, b) {\n var c = new NativeBuffer(32);\n var d = new NativeBuffer(32);\n pack25519(c, a);\n pack25519(d, b);\n return crypto_verify_32(c, 0, d, 0);\n}\n\nfunction crypto_verify_32(x, xi, y, yi) {\n return vn(x, xi, y, yi, 32);\n}\n\nfunction vn(x, xi, y, yi, n) {\n var i, d = 0;\n for(i = 0; i < n; ++i) {\n d |= x[xi + i] ^ y[yi + i];\n }\n return (1 & ((d - 1) >>> 8)) - 1;\n}\n\nfunction par25519(a) {\n var d = new NativeBuffer(32);\n pack25519(d, a);\n return d[0] & 1;\n}\n\nfunction scalarmult(p, q, s) {\n var b, i;\n set25519(p[0], gf0);\n set25519(p[1], gf1);\n set25519(p[2], gf1);\n set25519(p[3], gf0);\n for(i = 255; i >= 0; --i) {\n b = (s[(i / 8)|0] >> (i & 7)) & 1;\n cswap(p, q, b);\n add(q, p);\n add(p, p);\n cswap(p, q, b);\n }\n}\n\nfunction scalarbase(p, s) {\n var q = [gf(), gf(), gf(), gf()];\n set25519(q[0], X);\n set25519(q[1], Y);\n set25519(q[2], gf1);\n M(q[3], X, Y);\n scalarmult(p, q, s);\n}\n\nfunction set25519(r, a) {\n var i;\n for(i = 0; i < 16; i++) {\n r[i] = a[i] | 0;\n }\n}\n\nfunction inv25519(o, i) {\n var c = gf();\n var a;\n for(a = 0; a < 16; ++a) {\n c[a] = i[a];\n }\n for(a = 253; a >= 0; --a) {\n S(c, c);\n if(a !== 2 && a !== 4) {\n M(c, c, i);\n }\n }\n for(a = 0; a < 16; ++a) {\n o[a] = c[a];\n }\n}\n\nfunction car25519(o) {\n var i, v, c = 1;\n for(i = 0; i < 16; ++i) {\n v = o[i] + c + 65535;\n c = Math.floor(v / 65536);\n o[i] = v - c * 65536;\n }\n o[0] += c - 1 + 37 * (c - 1);\n}\n\nfunction sel25519(p, q, b) {\n var t, c = ~(b - 1);\n for(var i = 0; i < 16; ++i) {\n t = c & (p[i] ^ q[i]);\n p[i] ^= t;\n q[i] ^= t;\n }\n}\n\nfunction gf(init) {\n var i, r = new Float64Array(16);\n if(init) {\n for(i = 0; i < init.length; ++i) {\n r[i] = init[i];\n }\n }\n return r;\n}\n\nfunction A(o, a, b) {\n for(var i = 0; i < 16; ++i) {\n o[i] = a[i] + b[i];\n }\n}\n\nfunction Z(o, a, b) {\n for(var i = 0; i < 16; ++i) {\n o[i] = a[i] - b[i];\n }\n}\n\nfunction S(o, a) {\n M(o, a, a);\n}\n\nfunction M(o, a, b) {\n var v, c,\n t0 = 0, t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0,\n t8 = 0, t9 = 0, t10 = 0, t11 = 0, t12 = 0, t13 = 0, t14 = 0, t15 = 0,\n t16 = 0, t17 = 0, t18 = 0, t19 = 0, t20 = 0, t21 = 0, t22 = 0, t23 = 0,\n t24 = 0, t25 = 0, t26 = 0, t27 = 0, t28 = 0, t29 = 0, t30 = 0,\n b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3],\n b4 = b[4],\n b5 = b[5],\n b6 = b[6],\n b7 = b[7],\n b8 = b[8],\n b9 = b[9],\n b10 = b[10],\n b11 = b[11],\n b12 = b[12],\n b13 = b[13],\n b14 = b[14],\n b15 = b[15];\n\n v = a[0];\n t0 += v * b0;\n t1 += v * b1;\n t2 += v * b2;\n t3 += v * b3;\n t4 += v * b4;\n t5 += v * b5;\n t6 += v * b6;\n t7 += v * b7;\n t8 += v * b8;\n t9 += v * b9;\n t10 += v * b10;\n t11 += v * b11;\n t12 += v * b12;\n t13 += v * b13;\n t14 += v * b14;\n t15 += v * b15;\n v = a[1];\n t1 += v * b0;\n t2 += v * b1;\n t3 += v * b2;\n t4 += v * b3;\n t5 += v * b4;\n t6 += v * b5;\n t7 += v * b6;\n t8 += v * b7;\n t9 += v * b8;\n t10 += v * b9;\n t11 += v * b10;\n t12 += v * b11;\n t13 += v * b12;\n t14 += v * b13;\n t15 += v * b14;\n t16 += v * b15;\n v = a[2];\n t2 += v * b0;\n t3 += v * b1;\n t4 += v * b2;\n t5 += v * b3;\n t6 += v * b4;\n t7 += v * b5;\n t8 += v * b6;\n t9 += v * b7;\n t10 += v * b8;\n t11 += v * b9;\n t12 += v * b10;\n t13 += v * b11;\n t14 += v * b12;\n t15 += v * b13;\n t16 += v * b14;\n t17 += v * b15;\n v = a[3];\n t3 += v * b0;\n t4 += v * b1;\n t5 += v * b2;\n t6 += v * b3;\n t7 += v * b4;\n t8 += v * b5;\n t9 += v * b6;\n t10 += v * b7;\n t11 += v * b8;\n t12 += v * b9;\n t13 += v * b10;\n t14 += v * b11;\n t15 += v * b12;\n t16 += v * b13;\n t17 += v * b14;\n t18 += v * b15;\n v = a[4];\n t4 += v * b0;\n t5 += v * b1;\n t6 += v * b2;\n t7 += v * b3;\n t8 += v * b4;\n t9 += v * b5;\n t10 += v * b6;\n t11 += v * b7;\n t12 += v * b8;\n t13 += v * b9;\n t14 += v * b10;\n t15 += v * b11;\n t16 += v * b12;\n t17 += v * b13;\n t18 += v * b14;\n t19 += v * b15;\n v = a[5];\n t5 += v * b0;\n t6 += v * b1;\n t7 += v * b2;\n t8 += v * b3;\n t9 += v * b4;\n t10 += v * b5;\n t11 += v * b6;\n t12 += v * b7;\n t13 += v * b8;\n t14 += v * b9;\n t15 += v * b10;\n t16 += v * b11;\n t17 += v * b12;\n t18 += v * b13;\n t19 += v * b14;\n t20 += v * b15;\n v = a[6];\n t6 += v * b0;\n t7 += v * b1;\n t8 += v * b2;\n t9 += v * b3;\n t10 += v * b4;\n t11 += v * b5;\n t12 += v * b6;\n t13 += v * b7;\n t14 += v * b8;\n t15 += v * b9;\n t16 += v * b10;\n t17 += v * b11;\n t18 += v * b12;\n t19 += v * b13;\n t20 += v * b14;\n t21 += v * b15;\n v = a[7];\n t7 += v * b0;\n t8 += v * b1;\n t9 += v * b2;\n t10 += v * b3;\n t11 += v * b4;\n t12 += v * b5;\n t13 += v * b6;\n t14 += v * b7;\n t15 += v * b8;\n t16 += v * b9;\n t17 += v * b10;\n t18 += v * b11;\n t19 += v * b12;\n t20 += v * b13;\n t21 += v * b14;\n t22 += v * b15;\n v = a[8];\n t8 += v * b0;\n t9 += v * b1;\n t10 += v * b2;\n t11 += v * b3;\n t12 += v * b4;\n t13 += v * b5;\n t14 += v * b6;\n t15 += v * b7;\n t16 += v * b8;\n t17 += v * b9;\n t18 += v * b10;\n t19 += v * b11;\n t20 += v * b12;\n t21 += v * b13;\n t22 += v * b14;\n t23 += v * b15;\n v = a[9];\n t9 += v * b0;\n t10 += v * b1;\n t11 += v * b2;\n t12 += v * b3;\n t13 += v * b4;\n t14 += v * b5;\n t15 += v * b6;\n t16 += v * b7;\n t17 += v * b8;\n t18 += v * b9;\n t19 += v * b10;\n t20 += v * b11;\n t21 += v * b12;\n t22 += v * b13;\n t23 += v * b14;\n t24 += v * b15;\n v = a[10];\n t10 += v * b0;\n t11 += v * b1;\n t12 += v * b2;\n t13 += v * b3;\n t14 += v * b4;\n t15 += v * b5;\n t16 += v * b6;\n t17 += v * b7;\n t18 += v * b8;\n t19 += v * b9;\n t20 += v * b10;\n t21 += v * b11;\n t22 += v * b12;\n t23 += v * b13;\n t24 += v * b14;\n t25 += v * b15;\n v = a[11];\n t11 += v * b0;\n t12 += v * b1;\n t13 += v * b2;\n t14 += v * b3;\n t15 += v * b4;\n t16 += v * b5;\n t17 += v * b6;\n t18 += v * b7;\n t19 += v * b8;\n t20 += v * b9;\n t21 += v * b10;\n t22 += v * b11;\n t23 += v * b12;\n t24 += v * b13;\n t25 += v * b14;\n t26 += v * b15;\n v = a[12];\n t12 += v * b0;\n t13 += v * b1;\n t14 += v * b2;\n t15 += v * b3;\n t16 += v * b4;\n t17 += v * b5;\n t18 += v * b6;\n t19 += v * b7;\n t20 += v * b8;\n t21 += v * b9;\n t22 += v * b10;\n t23 += v * b11;\n t24 += v * b12;\n t25 += v * b13;\n t26 += v * b14;\n t27 += v * b15;\n v = a[13];\n t13 += v * b0;\n t14 += v * b1;\n t15 += v * b2;\n t16 += v * b3;\n t17 += v * b4;\n t18 += v * b5;\n t19 += v * b6;\n t20 += v * b7;\n t21 += v * b8;\n t22 += v * b9;\n t23 += v * b10;\n t24 += v * b11;\n t25 += v * b12;\n t26 += v * b13;\n t27 += v * b14;\n t28 += v * b15;\n v = a[14];\n t14 += v * b0;\n t15 += v * b1;\n t16 += v * b2;\n t17 += v * b3;\n t18 += v * b4;\n t19 += v * b5;\n t20 += v * b6;\n t21 += v * b7;\n t22 += v * b8;\n t23 += v * b9;\n t24 += v * b10;\n t25 += v * b11;\n t26 += v * b12;\n t27 += v * b13;\n t28 += v * b14;\n t29 += v * b15;\n v = a[15];\n t15 += v * b0;\n t16 += v * b1;\n t17 += v * b2;\n t18 += v * b3;\n t19 += v * b4;\n t20 += v * b5;\n t21 += v * b6;\n t22 += v * b7;\n t23 += v * b8;\n t24 += v * b9;\n t25 += v * b10;\n t26 += v * b11;\n t27 += v * b12;\n t28 += v * b13;\n t29 += v * b14;\n t30 += v * b15;\n\n t0 += 38 * t16;\n t1 += 38 * t17;\n t2 += 38 * t18;\n t3 += 38 * t19;\n t4 += 38 * t20;\n t5 += 38 * t21;\n t6 += 38 * t22;\n t7 += 38 * t23;\n t8 += 38 * t24;\n t9 += 38 * t25;\n t10 += 38 * t26;\n t11 += 38 * t27;\n t12 += 38 * t28;\n t13 += 38 * t29;\n t14 += 38 * t30;\n // t15 left as is\n\n // first car\n c = 1;\n v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536;\n v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536;\n v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536;\n v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536;\n v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536;\n v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536;\n v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536;\n v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536;\n v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536;\n v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536;\n v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536;\n v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536;\n v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536;\n v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536;\n v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536;\n v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536;\n t0 += c-1 + 37 * (c-1);\n\n // second car\n c = 1;\n v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536;\n v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536;\n v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536;\n v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536;\n v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536;\n v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536;\n v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536;\n v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536;\n v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536;\n v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536;\n v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536;\n v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536;\n v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536;\n v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536;\n v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536;\n v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536;\n t0 += c-1 + 37 * (c-1);\n\n o[ 0] = t0;\n o[ 1] = t1;\n o[ 2] = t2;\n o[ 3] = t3;\n o[ 4] = t4;\n o[ 5] = t5;\n o[ 6] = t6;\n o[ 7] = t7;\n o[ 8] = t8;\n o[ 9] = t9;\n o[10] = t10;\n o[11] = t11;\n o[12] = t12;\n o[13] = t13;\n o[14] = t14;\n o[15] = t15;\n}\n","/**\n * Javascript implementation of RSA-KEM.\n *\n * @author Lautaro Cozzani Rodriguez\n * @author Dave Longley\n *\n * Copyright (c) 2014 Lautaro Cozzani \n * Copyright (c) 2014 Digital Bazaar, Inc.\n */\nvar forge = require('./forge');\nrequire('./util');\nrequire('./random');\nrequire('./jsbn');\n\nmodule.exports = forge.kem = forge.kem || {};\n\nvar BigInteger = forge.jsbn.BigInteger;\n\n/**\n * The API for the RSA Key Encapsulation Mechanism (RSA-KEM) from ISO 18033-2.\n */\nforge.kem.rsa = {};\n\n/**\n * Creates an RSA KEM API object for generating a secret asymmetric key.\n *\n * The symmetric key may be generated via a call to 'encrypt', which will\n * produce a ciphertext to be transmitted to the recipient and a key to be\n * kept secret. The ciphertext is a parameter to be passed to 'decrypt' which\n * will produce the same secret key for the recipient to use to decrypt a\n * message that was encrypted with the secret key.\n *\n * @param kdf the KDF API to use (eg: new forge.kem.kdf1()).\n * @param options the options to use.\n * [prng] a custom crypto-secure pseudo-random number generator to use,\n * that must define \"getBytesSync\".\n */\nforge.kem.rsa.create = function(kdf, options) {\n options = options || {};\n var prng = options.prng || forge.random;\n\n var kem = {};\n\n /**\n * Generates a secret key and its encapsulation.\n *\n * @param publicKey the RSA public key to encrypt with.\n * @param keyLength the length, in bytes, of the secret key to generate.\n *\n * @return an object with:\n * encapsulation: the ciphertext for generating the secret key, as a\n * binary-encoded string of bytes.\n * key: the secret key to use for encrypting a message.\n */\n kem.encrypt = function(publicKey, keyLength) {\n // generate a random r where 1 < r < n\n var byteLength = Math.ceil(publicKey.n.bitLength() / 8);\n var r;\n do {\n r = new BigInteger(\n forge.util.bytesToHex(prng.getBytesSync(byteLength)),\n 16).mod(publicKey.n);\n } while(r.compareTo(BigInteger.ONE) <= 0);\n\n // prepend r with zeros\n r = forge.util.hexToBytes(r.toString(16));\n var zeros = byteLength - r.length;\n if(zeros > 0) {\n r = forge.util.fillString(String.fromCharCode(0), zeros) + r;\n }\n\n // encrypt the random\n var encapsulation = publicKey.encrypt(r, 'NONE');\n\n // generate the secret key\n var key = kdf.generate(r, keyLength);\n\n return {encapsulation: encapsulation, key: key};\n };\n\n /**\n * Decrypts an encapsulated secret key.\n *\n * @param privateKey the RSA private key to decrypt with.\n * @param encapsulation the ciphertext for generating the secret key, as\n * a binary-encoded string of bytes.\n * @param keyLength the length, in bytes, of the secret key to generate.\n *\n * @return the secret key as a binary-encoded string of bytes.\n */\n kem.decrypt = function(privateKey, encapsulation, keyLength) {\n // decrypt the encapsulation and generate the secret key\n var r = privateKey.decrypt(encapsulation, 'NONE');\n return kdf.generate(r, keyLength);\n };\n\n return kem;\n};\n\n// TODO: add forge.kem.kdf.create('KDF1', {md: ..., ...}) API?\n\n/**\n * Creates a key derivation API object that implements KDF1 per ISO 18033-2.\n *\n * @param md the hash API to use.\n * @param [digestLength] an optional digest length that must be positive and\n * less than or equal to md.digestLength.\n *\n * @return a KDF1 API object.\n */\nforge.kem.kdf1 = function(md, digestLength) {\n _createKDF(this, md, 0, digestLength || md.digestLength);\n};\n\n/**\n * Creates a key derivation API object that implements KDF2 per ISO 18033-2.\n *\n * @param md the hash API to use.\n * @param [digestLength] an optional digest length that must be positive and\n * less than or equal to md.digestLength.\n *\n * @return a KDF2 API object.\n */\nforge.kem.kdf2 = function(md, digestLength) {\n _createKDF(this, md, 1, digestLength || md.digestLength);\n};\n\n/**\n * Creates a KDF1 or KDF2 API object.\n *\n * @param md the hash API to use.\n * @param counterStart the starting index for the counter.\n * @param digestLength the digest length to use.\n *\n * @return the KDF API object.\n */\nfunction _createKDF(kdf, md, counterStart, digestLength) {\n /**\n * Generate a key of the specified length.\n *\n * @param x the binary-encoded byte string to generate a key from.\n * @param length the number of bytes to generate (the size of the key).\n *\n * @return the key as a binary-encoded string.\n */\n kdf.generate = function(x, length) {\n var key = new forge.util.ByteBuffer();\n\n // run counter from counterStart to ceil(length / Hash.len)\n var k = Math.ceil(length / digestLength) + counterStart;\n\n var c = new forge.util.ByteBuffer();\n for(var i = counterStart; i < k; ++i) {\n // I2OSP(i, 4): convert counter to an octet string of 4 octets\n c.putInt32(i);\n\n // digest 'x' and the counter and add the result to the key\n md.start();\n md.update(x + c.getBytes());\n var hash = md.digest();\n key.putBytes(hash.getBytes(digestLength));\n }\n\n // truncate to the correct key length\n key.truncate(key.length() - length);\n return key.getBytes();\n };\n}\n","/**\n * Cross-browser support for logging in a web application.\n *\n * @author David I. Lehn \n *\n * Copyright (c) 2008-2013 Digital Bazaar, Inc.\n */\nvar forge = require('./forge');\nrequire('./util');\n\n/* LOG API */\nmodule.exports = forge.log = forge.log || {};\n\n/**\n * Application logging system.\n *\n * Each logger level available as it's own function of the form:\n * forge.log.level(category, args...)\n * The category is an arbitrary string, and the args are the same as\n * Firebug's console.log API. By default the call will be output as:\n * 'LEVEL [category] , args[1], ...'\n * This enables proper % formatting via the first argument.\n * Each category is enabled by default but can be enabled or disabled with\n * the setCategoryEnabled() function.\n */\n// list of known levels\nforge.log.levels = [\n 'none', 'error', 'warning', 'info', 'debug', 'verbose', 'max'];\n// info on the levels indexed by name:\n// index: level index\n// name: uppercased display name\nvar sLevelInfo = {};\n// list of loggers\nvar sLoggers = [];\n/**\n * Standard console logger. If no console support is enabled this will\n * remain null. Check before using.\n */\nvar sConsoleLogger = null;\n\n// logger flags\n/**\n * Lock the level at the current value. Used in cases where user config may\n * set the level such that only critical messages are seen but more verbose\n * messages are needed for debugging or other purposes.\n */\nforge.log.LEVEL_LOCKED = (1 << 1);\n/**\n * Always call log function. By default, the logging system will check the\n * message level against logger.level before calling the log function. This\n * flag allows the function to do its own check.\n */\nforge.log.NO_LEVEL_CHECK = (1 << 2);\n/**\n * Perform message interpolation with the passed arguments. \"%\" style\n * fields in log messages will be replaced by arguments as needed. Some\n * loggers, such as Firebug, may do this automatically. The original log\n * message will be available as 'message' and the interpolated version will\n * be available as 'fullMessage'.\n */\nforge.log.INTERPOLATE = (1 << 3);\n\n// setup each log level\nfor(var i = 0; i < forge.log.levels.length; ++i) {\n var level = forge.log.levels[i];\n sLevelInfo[level] = {\n index: i,\n name: level.toUpperCase()\n };\n}\n\n/**\n * Message logger. Will dispatch a message to registered loggers as needed.\n *\n * @param message message object\n */\nforge.log.logMessage = function(message) {\n var messageLevelIndex = sLevelInfo[message.level].index;\n for(var i = 0; i < sLoggers.length; ++i) {\n var logger = sLoggers[i];\n if(logger.flags & forge.log.NO_LEVEL_CHECK) {\n logger.f(message);\n } else {\n // get logger level\n var loggerLevelIndex = sLevelInfo[logger.level].index;\n // check level\n if(messageLevelIndex <= loggerLevelIndex) {\n // message critical enough, call logger\n logger.f(logger, message);\n }\n }\n }\n};\n\n/**\n * Sets the 'standard' key on a message object to:\n * \"LEVEL [category] \" + message\n *\n * @param message a message log object\n */\nforge.log.prepareStandard = function(message) {\n if(!('standard' in message)) {\n message.standard =\n sLevelInfo[message.level].name +\n //' ' + +message.timestamp +\n ' [' + message.category + '] ' +\n message.message;\n }\n};\n\n/**\n * Sets the 'full' key on a message object to the original message\n * interpolated via % formatting with the message arguments.\n *\n * @param message a message log object.\n */\nforge.log.prepareFull = function(message) {\n if(!('full' in message)) {\n // copy args and insert message at the front\n var args = [message.message];\n args = args.concat([] || message['arguments']);\n // format the message\n message.full = forge.util.format.apply(this, args);\n }\n};\n\n/**\n * Applies both preparseStandard() and prepareFull() to a message object and\n * store result in 'standardFull'.\n *\n * @param message a message log object.\n */\nforge.log.prepareStandardFull = function(message) {\n if(!('standardFull' in message)) {\n // FIXME implement 'standardFull' logging\n forge.log.prepareStandard(message);\n message.standardFull = message.standard;\n }\n};\n\n// create log level functions\nif(true) {\n // levels for which we want functions\n var levels = ['error', 'warning', 'info', 'debug', 'verbose'];\n for(var i = 0; i < levels.length; ++i) {\n // wrap in a function to ensure proper level var is passed\n (function(level) {\n // create function for this level\n forge.log[level] = function(category, message/*, args...*/) {\n // convert arguments to real array, remove category and message\n var args = Array.prototype.slice.call(arguments).slice(2);\n // create message object\n // Note: interpolation and standard formatting is done lazily\n var msg = {\n timestamp: new Date(),\n level: level,\n category: category,\n message: message,\n 'arguments': args\n /*standard*/\n /*full*/\n /*fullMessage*/\n };\n // process this message\n forge.log.logMessage(msg);\n };\n })(levels[i]);\n }\n}\n\n/**\n * Creates a new logger with specified custom logging function.\n *\n * The logging function has a signature of:\n * function(logger, message)\n * logger: current logger\n * message: object:\n * level: level id\n * category: category\n * message: string message\n * arguments: Array of extra arguments\n * fullMessage: interpolated message and arguments if INTERPOLATE flag set\n *\n * @param logFunction a logging function which takes a log message object\n * as a parameter.\n *\n * @return a logger object.\n */\nforge.log.makeLogger = function(logFunction) {\n var logger = {\n flags: 0,\n f: logFunction\n };\n forge.log.setLevel(logger, 'none');\n return logger;\n};\n\n/**\n * Sets the current log level on a logger.\n *\n * @param logger the target logger.\n * @param level the new maximum log level as a string.\n *\n * @return true if set, false if not.\n */\nforge.log.setLevel = function(logger, level) {\n var rval = false;\n if(logger && !(logger.flags & forge.log.LEVEL_LOCKED)) {\n for(var i = 0; i < forge.log.levels.length; ++i) {\n var aValidLevel = forge.log.levels[i];\n if(level == aValidLevel) {\n // set level\n logger.level = level;\n rval = true;\n break;\n }\n }\n }\n\n return rval;\n};\n\n/**\n * Locks the log level at its current value.\n *\n * @param logger the target logger.\n * @param lock boolean lock value, default to true.\n */\nforge.log.lock = function(logger, lock) {\n if(typeof lock === 'undefined' || lock) {\n logger.flags |= forge.log.LEVEL_LOCKED;\n } else {\n logger.flags &= ~forge.log.LEVEL_LOCKED;\n }\n};\n\n/**\n * Adds a logger.\n *\n * @param logger the logger object.\n */\nforge.log.addLogger = function(logger) {\n sLoggers.push(logger);\n};\n\n// setup the console logger if possible, else create fake console.log\nif(typeof(console) !== 'undefined' && 'log' in console) {\n var logger;\n if(console.error && console.warn && console.info && console.debug) {\n // looks like Firebug-style logging is available\n // level handlers map\n var levelHandlers = {\n error: console.error,\n warning: console.warn,\n info: console.info,\n debug: console.debug,\n verbose: console.debug\n };\n var f = function(logger, message) {\n forge.log.prepareStandard(message);\n var handler = levelHandlers[message.level];\n // prepend standard message and concat args\n var args = [message.standard];\n args = args.concat(message['arguments'].slice());\n // apply to low-level console function\n handler.apply(console, args);\n };\n logger = forge.log.makeLogger(f);\n } else {\n // only appear to have basic console.log\n var f = function(logger, message) {\n forge.log.prepareStandardFull(message);\n console.log(message.standardFull);\n };\n logger = forge.log.makeLogger(f);\n }\n forge.log.setLevel(logger, 'debug');\n forge.log.addLogger(logger);\n sConsoleLogger = logger;\n} else {\n // define fake console.log to avoid potential script errors on\n // browsers that do not have console logging\n console = {\n log: function() {}\n };\n}\n\n/*\n * Check for logging control query vars in current URL.\n *\n * console.level=\n * Set's the console log level by name. Useful to override defaults and\n * allow more verbose logging before a user config is loaded.\n *\n * console.lock=\n * Lock the console log level at whatever level it is set at. This is run\n * after console.level is processed. Useful to force a level of verbosity\n * that could otherwise be limited by a user config.\n */\nif(sConsoleLogger !== null &&\n typeof window !== 'undefined' && window.location\n) {\n var query = new URL(window.location.href).searchParams;\n if(query.has('console.level')) {\n // set with last value\n forge.log.setLevel(\n sConsoleLogger, query.get('console.level').slice(-1)[0]);\n }\n if(query.has('console.lock')) {\n // set with last value\n var lock = query.get('console.lock').slice(-1)[0];\n if(lock == 'true') {\n forge.log.lock(sConsoleLogger);\n }\n }\n}\n\n// provide public access to console logger\nforge.log.consoleLogger = sConsoleLogger;\n","/**\n * Javascript implementation of PKCS#7 v1.5.\n *\n * @author Stefan Siegl\n * @author Dave Longley\n *\n * Copyright (c) 2012 Stefan Siegl \n * Copyright (c) 2012-2015 Digital Bazaar, Inc.\n *\n * Currently this implementation only supports ContentType of EnvelopedData,\n * EncryptedData, or SignedData at the root level. The top level elements may\n * contain only a ContentInfo of ContentType Data, i.e. plain data. Further\n * nesting is not (yet) supported.\n *\n * The Forge validators for PKCS #7's ASN.1 structures are available from\n * a separate file pkcs7asn1.js, since those are referenced from other\n * PKCS standards like PKCS #12.\n */\nvar forge = require('./forge');\nrequire('./aes');\nrequire('./asn1');\nrequire('./des');\nrequire('./oids');\nrequire('./pem');\nrequire('./pkcs7asn1');\nrequire('./random');\nrequire('./util');\nrequire('./x509');\n\n// shortcut for ASN.1 API\nvar asn1 = forge.asn1;\n\n// shortcut for PKCS#7 API\nvar p7 = module.exports = forge.pkcs7 = forge.pkcs7 || {};\n\n/**\n * Converts a PKCS#7 message from PEM format.\n *\n * @param pem the PEM-formatted PKCS#7 message.\n *\n * @return the PKCS#7 message.\n */\np7.messageFromPem = function(pem) {\n var msg = forge.pem.decode(pem)[0];\n\n if(msg.type !== 'PKCS7') {\n var error = new Error('Could not convert PKCS#7 message from PEM; PEM ' +\n 'header type is not \"PKCS#7\".');\n error.headerType = msg.type;\n throw error;\n }\n if(msg.procType && msg.procType.type === 'ENCRYPTED') {\n throw new Error('Could not convert PKCS#7 message from PEM; PEM is encrypted.');\n }\n\n // convert DER to ASN.1 object\n var obj = asn1.fromDer(msg.body);\n\n return p7.messageFromAsn1(obj);\n};\n\n/**\n * Converts a PKCS#7 message to PEM format.\n *\n * @param msg The PKCS#7 message object\n * @param maxline The maximum characters per line, defaults to 64.\n *\n * @return The PEM-formatted PKCS#7 message.\n */\np7.messageToPem = function(msg, maxline) {\n // convert to ASN.1, then DER, then PEM-encode\n var pemObj = {\n type: 'PKCS7',\n body: asn1.toDer(msg.toAsn1()).getBytes()\n };\n return forge.pem.encode(pemObj, {maxline: maxline});\n};\n\n/**\n * Converts a PKCS#7 message from an ASN.1 object.\n *\n * @param obj the ASN.1 representation of a ContentInfo.\n *\n * @return the PKCS#7 message.\n */\np7.messageFromAsn1 = function(obj) {\n // validate root level ContentInfo and capture data\n var capture = {};\n var errors = [];\n if(!asn1.validate(obj, p7.asn1.contentInfoValidator, capture, errors)) {\n var error = new Error('Cannot read PKCS#7 message. ' +\n 'ASN.1 object is not an PKCS#7 ContentInfo.');\n error.errors = errors;\n throw error;\n }\n\n var contentType = asn1.derToOid(capture.contentType);\n var msg;\n\n switch(contentType) {\n case forge.pki.oids.envelopedData:\n msg = p7.createEnvelopedData();\n break;\n\n case forge.pki.oids.encryptedData:\n msg = p7.createEncryptedData();\n break;\n\n case forge.pki.oids.signedData:\n msg = p7.createSignedData();\n break;\n\n default:\n throw new Error('Cannot read PKCS#7 message. ContentType with OID ' +\n contentType + ' is not (yet) supported.');\n }\n\n msg.fromAsn1(capture.content.value[0]);\n return msg;\n};\n\np7.createSignedData = function() {\n var msg = null;\n msg = {\n type: forge.pki.oids.signedData,\n version: 1,\n certificates: [],\n crls: [],\n // TODO: add json-formatted signer stuff here?\n signers: [],\n // populated during sign()\n digestAlgorithmIdentifiers: [],\n contentInfo: null,\n signerInfos: [],\n\n fromAsn1: function(obj) {\n // validate SignedData content block and capture data.\n _fromAsn1(msg, obj, p7.asn1.signedDataValidator);\n msg.certificates = [];\n msg.crls = [];\n msg.digestAlgorithmIdentifiers = [];\n msg.contentInfo = null;\n msg.signerInfos = [];\n\n if(msg.rawCapture.certificates) {\n var certs = msg.rawCapture.certificates.value;\n for(var i = 0; i < certs.length; ++i) {\n msg.certificates.push(forge.pki.certificateFromAsn1(certs[i]));\n }\n }\n\n // TODO: parse crls\n },\n\n toAsn1: function() {\n // degenerate case with no content\n if(!msg.contentInfo) {\n msg.sign();\n }\n\n var certs = [];\n for(var i = 0; i < msg.certificates.length; ++i) {\n certs.push(forge.pki.certificateToAsn1(msg.certificates[i]));\n }\n\n var crls = [];\n // TODO: implement CRLs\n\n // [0] SignedData\n var signedData = asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // Version\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,\n asn1.integerToDer(msg.version).getBytes()),\n // DigestAlgorithmIdentifiers\n asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.SET, true,\n msg.digestAlgorithmIdentifiers),\n // ContentInfo\n msg.contentInfo\n ])\n ]);\n if(certs.length > 0) {\n // [0] IMPLICIT ExtendedCertificatesAndCertificates OPTIONAL\n signedData.value[0].value.push(\n asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, certs));\n }\n if(crls.length > 0) {\n // [1] IMPLICIT CertificateRevocationLists OPTIONAL\n signedData.value[0].value.push(\n asn1.create(asn1.Class.CONTEXT_SPECIFIC, 1, true, crls));\n }\n // SignerInfos\n signedData.value[0].value.push(\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SET, true,\n msg.signerInfos));\n\n // ContentInfo\n return asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // ContentType\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(msg.type).getBytes()),\n // [0] SignedData\n signedData\n ]);\n },\n\n /**\n * Add (another) entity to list of signers.\n *\n * Note: If authenticatedAttributes are provided, then, per RFC 2315,\n * they must include at least two attributes: content type and\n * message digest. The message digest attribute value will be\n * auto-calculated during signing and will be ignored if provided.\n *\n * Here's an example of providing these two attributes:\n *\n * forge.pkcs7.createSignedData();\n * p7.addSigner({\n * issuer: cert.issuer.attributes,\n * serialNumber: cert.serialNumber,\n * key: privateKey,\n * digestAlgorithm: forge.pki.oids.sha1,\n * authenticatedAttributes: [{\n * type: forge.pki.oids.contentType,\n * value: forge.pki.oids.data\n * }, {\n * type: forge.pki.oids.messageDigest\n * }]\n * });\n *\n * TODO: Support [subjectKeyIdentifier] as signer's ID.\n *\n * @param signer the signer information:\n * key the signer's private key.\n * [certificate] a certificate containing the public key\n * associated with the signer's private key; use this option as\n * an alternative to specifying signer.issuer and\n * signer.serialNumber.\n * [issuer] the issuer attributes (eg: cert.issuer.attributes).\n * [serialNumber] the signer's certificate's serial number in\n * hexadecimal (eg: cert.serialNumber).\n * [digestAlgorithm] the message digest OID, as a string, to use\n * (eg: forge.pki.oids.sha1).\n * [authenticatedAttributes] an optional array of attributes\n * to also sign along with the content.\n */\n addSigner: function(signer) {\n var issuer = signer.issuer;\n var serialNumber = signer.serialNumber;\n if(signer.certificate) {\n var cert = signer.certificate;\n if(typeof cert === 'string') {\n cert = forge.pki.certificateFromPem(cert);\n }\n issuer = cert.issuer.attributes;\n serialNumber = cert.serialNumber;\n }\n var key = signer.key;\n if(!key) {\n throw new Error(\n 'Could not add PKCS#7 signer; no private key specified.');\n }\n if(typeof key === 'string') {\n key = forge.pki.privateKeyFromPem(key);\n }\n\n // ensure OID known for digest algorithm\n var digestAlgorithm = signer.digestAlgorithm || forge.pki.oids.sha1;\n switch(digestAlgorithm) {\n case forge.pki.oids.sha1:\n case forge.pki.oids.sha256:\n case forge.pki.oids.sha384:\n case forge.pki.oids.sha512:\n case forge.pki.oids.md5:\n break;\n default:\n throw new Error(\n 'Could not add PKCS#7 signer; unknown message digest algorithm: ' +\n digestAlgorithm);\n }\n\n // if authenticatedAttributes is present, then the attributes\n // must contain at least PKCS #9 content-type and message-digest\n var authenticatedAttributes = signer.authenticatedAttributes || [];\n if(authenticatedAttributes.length > 0) {\n var contentType = false;\n var messageDigest = false;\n for(var i = 0; i < authenticatedAttributes.length; ++i) {\n var attr = authenticatedAttributes[i];\n if(!contentType && attr.type === forge.pki.oids.contentType) {\n contentType = true;\n if(messageDigest) {\n break;\n }\n continue;\n }\n if(!messageDigest && attr.type === forge.pki.oids.messageDigest) {\n messageDigest = true;\n if(contentType) {\n break;\n }\n continue;\n }\n }\n\n if(!contentType || !messageDigest) {\n throw new Error('Invalid signer.authenticatedAttributes. If ' +\n 'signer.authenticatedAttributes is specified, then it must ' +\n 'contain at least two attributes, PKCS #9 content-type and ' +\n 'PKCS #9 message-digest.');\n }\n }\n\n msg.signers.push({\n key: key,\n version: 1,\n issuer: issuer,\n serialNumber: serialNumber,\n digestAlgorithm: digestAlgorithm,\n signatureAlgorithm: forge.pki.oids.rsaEncryption,\n signature: null,\n authenticatedAttributes: authenticatedAttributes,\n unauthenticatedAttributes: []\n });\n },\n\n /**\n * Signs the content.\n * @param options Options to apply when signing:\n * [detached] boolean. If signing should be done in detached mode. Defaults to false.\n */\n sign: function(options) {\n options = options || {};\n // auto-generate content info\n if(typeof msg.content !== 'object' || msg.contentInfo === null) {\n // use Data ContentInfo\n msg.contentInfo = asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // ContentType\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(forge.pki.oids.data).getBytes())\n ]);\n\n // add actual content, if present\n if('content' in msg) {\n var content;\n if(msg.content instanceof forge.util.ByteBuffer) {\n content = msg.content.bytes();\n } else if(typeof msg.content === 'string') {\n content = forge.util.encodeUtf8(msg.content);\n }\n\n if (options.detached) {\n msg.detachedContent = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, content);\n } else {\n msg.contentInfo.value.push(\n // [0] EXPLICIT content\n asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false,\n content)\n ]));\n }\n }\n }\n\n // no signers, return early (degenerate case for certificate container)\n if(msg.signers.length === 0) {\n return;\n }\n\n // generate digest algorithm identifiers\n var mds = addDigestAlgorithmIds();\n\n // generate signerInfos\n addSignerInfos(mds);\n },\n\n verify: function() {\n throw new Error('PKCS#7 signature verification not yet implemented.');\n },\n\n /**\n * Add a certificate.\n *\n * @param cert the certificate to add.\n */\n addCertificate: function(cert) {\n // convert from PEM\n if(typeof cert === 'string') {\n cert = forge.pki.certificateFromPem(cert);\n }\n msg.certificates.push(cert);\n },\n\n /**\n * Add a certificate revokation list.\n *\n * @param crl the certificate revokation list to add.\n */\n addCertificateRevokationList: function(crl) {\n throw new Error('PKCS#7 CRL support not yet implemented.');\n }\n };\n return msg;\n\n function addDigestAlgorithmIds() {\n var mds = {};\n\n for(var i = 0; i < msg.signers.length; ++i) {\n var signer = msg.signers[i];\n var oid = signer.digestAlgorithm;\n if(!(oid in mds)) {\n // content digest\n mds[oid] = forge.md[forge.pki.oids[oid]].create();\n }\n if(signer.authenticatedAttributes.length === 0) {\n // no custom attributes to digest; use content message digest\n signer.md = mds[oid];\n } else {\n // custom attributes to be digested; use own message digest\n // TODO: optimize to just copy message digest state if that\n // feature is ever supported with message digests\n signer.md = forge.md[forge.pki.oids[oid]].create();\n }\n }\n\n // add unique digest algorithm identifiers\n msg.digestAlgorithmIdentifiers = [];\n for(var oid in mds) {\n msg.digestAlgorithmIdentifiers.push(\n // AlgorithmIdentifier\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // algorithm\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(oid).getBytes()),\n // parameters (null)\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, '')\n ]));\n }\n\n return mds;\n }\n\n function addSignerInfos(mds) {\n var content;\n\n if (msg.detachedContent) {\n // Signature has been made in detached mode.\n content = msg.detachedContent;\n } else {\n // Note: ContentInfo is a SEQUENCE with 2 values, second value is\n // the content field and is optional for a ContentInfo but required here\n // since signers are present\n // get ContentInfo content\n content = msg.contentInfo.value[1];\n // skip [0] EXPLICIT content wrapper\n content = content.value[0];\n }\n\n if(!content) {\n throw new Error(\n 'Could not sign PKCS#7 message; there is no content to sign.');\n }\n\n // get ContentInfo content type\n var contentType = asn1.derToOid(msg.contentInfo.value[0].value);\n\n // serialize content\n var bytes = asn1.toDer(content);\n\n // skip identifier and length per RFC 2315 9.3\n // skip identifier (1 byte)\n bytes.getByte();\n // read and discard length bytes\n asn1.getBerValueLength(bytes);\n bytes = bytes.getBytes();\n\n // digest content DER value bytes\n for(var oid in mds) {\n mds[oid].start().update(bytes);\n }\n\n // sign content\n var signingTime = new Date();\n for(var i = 0; i < msg.signers.length; ++i) {\n var signer = msg.signers[i];\n\n if(signer.authenticatedAttributes.length === 0) {\n // if ContentInfo content type is not \"Data\", then\n // authenticatedAttributes must be present per RFC 2315\n if(contentType !== forge.pki.oids.data) {\n throw new Error(\n 'Invalid signer; authenticatedAttributes must be present ' +\n 'when the ContentInfo content type is not PKCS#7 Data.');\n }\n } else {\n // process authenticated attributes\n // [0] IMPLICIT\n signer.authenticatedAttributesAsn1 = asn1.create(\n asn1.Class.CONTEXT_SPECIFIC, 0, true, []);\n\n // per RFC 2315, attributes are to be digested using a SET container\n // not the above [0] IMPLICIT container\n var attrsAsn1 = asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.SET, true, []);\n\n for(var ai = 0; ai < signer.authenticatedAttributes.length; ++ai) {\n var attr = signer.authenticatedAttributes[ai];\n if(attr.type === forge.pki.oids.messageDigest) {\n // use content message digest as value\n attr.value = mds[signer.digestAlgorithm].digest();\n } else if(attr.type === forge.pki.oids.signingTime) {\n // auto-populate signing time if not already set\n if(!attr.value) {\n attr.value = signingTime;\n }\n }\n\n // convert to ASN.1 and push onto Attributes SET (for signing) and\n // onto authenticatedAttributesAsn1 to complete SignedData ASN.1\n // TODO: optimize away duplication\n attrsAsn1.value.push(_attributeToAsn1(attr));\n signer.authenticatedAttributesAsn1.value.push(_attributeToAsn1(attr));\n }\n\n // DER-serialize and digest SET OF attributes only\n bytes = asn1.toDer(attrsAsn1).getBytes();\n signer.md.start().update(bytes);\n }\n\n // sign digest\n signer.signature = signer.key.sign(signer.md, 'RSASSA-PKCS1-V1_5');\n }\n\n // add signer info\n msg.signerInfos = _signersToAsn1(msg.signers);\n }\n};\n\n/**\n * Creates an empty PKCS#7 message of type EncryptedData.\n *\n * @return the message.\n */\np7.createEncryptedData = function() {\n var msg = null;\n msg = {\n type: forge.pki.oids.encryptedData,\n version: 0,\n encryptedContent: {\n algorithm: forge.pki.oids['aes256-CBC']\n },\n\n /**\n * Reads an EncryptedData content block (in ASN.1 format)\n *\n * @param obj The ASN.1 representation of the EncryptedData content block\n */\n fromAsn1: function(obj) {\n // Validate EncryptedData content block and capture data.\n _fromAsn1(msg, obj, p7.asn1.encryptedDataValidator);\n },\n\n /**\n * Decrypt encrypted content\n *\n * @param key The (symmetric) key as a byte buffer\n */\n decrypt: function(key) {\n if(key !== undefined) {\n msg.encryptedContent.key = key;\n }\n _decryptContent(msg);\n }\n };\n return msg;\n};\n\n/**\n * Creates an empty PKCS#7 message of type EnvelopedData.\n *\n * @return the message.\n */\np7.createEnvelopedData = function() {\n var msg = null;\n msg = {\n type: forge.pki.oids.envelopedData,\n version: 0,\n recipients: [],\n encryptedContent: {\n algorithm: forge.pki.oids['aes256-CBC']\n },\n\n /**\n * Reads an EnvelopedData content block (in ASN.1 format)\n *\n * @param obj the ASN.1 representation of the EnvelopedData content block.\n */\n fromAsn1: function(obj) {\n // validate EnvelopedData content block and capture data\n var capture = _fromAsn1(msg, obj, p7.asn1.envelopedDataValidator);\n msg.recipients = _recipientsFromAsn1(capture.recipientInfos.value);\n },\n\n toAsn1: function() {\n // ContentInfo\n return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // ContentType\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(msg.type).getBytes()),\n // [0] EnvelopedData\n asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // Version\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,\n asn1.integerToDer(msg.version).getBytes()),\n // RecipientInfos\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SET, true,\n _recipientsToAsn1(msg.recipients)),\n // EncryptedContentInfo\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true,\n _encryptedContentToAsn1(msg.encryptedContent))\n ])\n ])\n ]);\n },\n\n /**\n * Find recipient by X.509 certificate's issuer.\n *\n * @param cert the certificate with the issuer to look for.\n *\n * @return the recipient object.\n */\n findRecipient: function(cert) {\n var sAttr = cert.issuer.attributes;\n\n for(var i = 0; i < msg.recipients.length; ++i) {\n var r = msg.recipients[i];\n var rAttr = r.issuer;\n\n if(r.serialNumber !== cert.serialNumber) {\n continue;\n }\n\n if(rAttr.length !== sAttr.length) {\n continue;\n }\n\n var match = true;\n for(var j = 0; j < sAttr.length; ++j) {\n if(rAttr[j].type !== sAttr[j].type ||\n rAttr[j].value !== sAttr[j].value) {\n match = false;\n break;\n }\n }\n\n if(match) {\n return r;\n }\n }\n\n return null;\n },\n\n /**\n * Decrypt enveloped content\n *\n * @param recipient The recipient object related to the private key\n * @param privKey The (RSA) private key object\n */\n decrypt: function(recipient, privKey) {\n if(msg.encryptedContent.key === undefined && recipient !== undefined &&\n privKey !== undefined) {\n switch(recipient.encryptedContent.algorithm) {\n case forge.pki.oids.rsaEncryption:\n case forge.pki.oids.desCBC:\n var key = privKey.decrypt(recipient.encryptedContent.content);\n msg.encryptedContent.key = forge.util.createBuffer(key);\n break;\n\n default:\n throw new Error('Unsupported asymmetric cipher, ' +\n 'OID ' + recipient.encryptedContent.algorithm);\n }\n }\n\n _decryptContent(msg);\n },\n\n /**\n * Add (another) entity to list of recipients.\n *\n * @param cert The certificate of the entity to add.\n */\n addRecipient: function(cert) {\n msg.recipients.push({\n version: 0,\n issuer: cert.issuer.attributes,\n serialNumber: cert.serialNumber,\n encryptedContent: {\n // We simply assume rsaEncryption here, since forge.pki only\n // supports RSA so far. If the PKI module supports other\n // ciphers one day, we need to modify this one as well.\n algorithm: forge.pki.oids.rsaEncryption,\n key: cert.publicKey\n }\n });\n },\n\n /**\n * Encrypt enveloped content.\n *\n * This function supports two optional arguments, cipher and key, which\n * can be used to influence symmetric encryption. Unless cipher is\n * provided, the cipher specified in encryptedContent.algorithm is used\n * (defaults to AES-256-CBC). If no key is provided, encryptedContent.key\n * is (re-)used. If that one's not set, a random key will be generated\n * automatically.\n *\n * @param [key] The key to be used for symmetric encryption.\n * @param [cipher] The OID of the symmetric cipher to use.\n */\n encrypt: function(key, cipher) {\n // Part 1: Symmetric encryption\n if(msg.encryptedContent.content === undefined) {\n cipher = cipher || msg.encryptedContent.algorithm;\n key = key || msg.encryptedContent.key;\n\n var keyLen, ivLen, ciphFn;\n switch(cipher) {\n case forge.pki.oids['aes128-CBC']:\n keyLen = 16;\n ivLen = 16;\n ciphFn = forge.aes.createEncryptionCipher;\n break;\n\n case forge.pki.oids['aes192-CBC']:\n keyLen = 24;\n ivLen = 16;\n ciphFn = forge.aes.createEncryptionCipher;\n break;\n\n case forge.pki.oids['aes256-CBC']:\n keyLen = 32;\n ivLen = 16;\n ciphFn = forge.aes.createEncryptionCipher;\n break;\n\n case forge.pki.oids['des-EDE3-CBC']:\n keyLen = 24;\n ivLen = 8;\n ciphFn = forge.des.createEncryptionCipher;\n break;\n\n default:\n throw new Error('Unsupported symmetric cipher, OID ' + cipher);\n }\n\n if(key === undefined) {\n key = forge.util.createBuffer(forge.random.getBytes(keyLen));\n } else if(key.length() != keyLen) {\n throw new Error('Symmetric key has wrong length; ' +\n 'got ' + key.length() + ' bytes, expected ' + keyLen + '.');\n }\n\n // Keep a copy of the key & IV in the object, so the caller can\n // use it for whatever reason.\n msg.encryptedContent.algorithm = cipher;\n msg.encryptedContent.key = key;\n msg.encryptedContent.parameter = forge.util.createBuffer(\n forge.random.getBytes(ivLen));\n\n var ciph = ciphFn(key);\n ciph.start(msg.encryptedContent.parameter.copy());\n ciph.update(msg.content);\n\n // The finish function does PKCS#7 padding by default, therefore\n // no action required by us.\n if(!ciph.finish()) {\n throw new Error('Symmetric encryption failed.');\n }\n\n msg.encryptedContent.content = ciph.output;\n }\n\n // Part 2: asymmetric encryption for each recipient\n for(var i = 0; i < msg.recipients.length; ++i) {\n var recipient = msg.recipients[i];\n\n // Nothing to do, encryption already done.\n if(recipient.encryptedContent.content !== undefined) {\n continue;\n }\n\n switch(recipient.encryptedContent.algorithm) {\n case forge.pki.oids.rsaEncryption:\n recipient.encryptedContent.content =\n recipient.encryptedContent.key.encrypt(\n msg.encryptedContent.key.data);\n break;\n\n default:\n throw new Error('Unsupported asymmetric cipher, OID ' +\n recipient.encryptedContent.algorithm);\n }\n }\n }\n };\n return msg;\n};\n\n/**\n * Converts a single recipient from an ASN.1 object.\n *\n * @param obj the ASN.1 RecipientInfo.\n *\n * @return the recipient object.\n */\nfunction _recipientFromAsn1(obj) {\n // validate EnvelopedData content block and capture data\n var capture = {};\n var errors = [];\n if(!asn1.validate(obj, p7.asn1.recipientInfoValidator, capture, errors)) {\n var error = new Error('Cannot read PKCS#7 RecipientInfo. ' +\n 'ASN.1 object is not an PKCS#7 RecipientInfo.');\n error.errors = errors;\n throw error;\n }\n\n return {\n version: capture.version.charCodeAt(0),\n issuer: forge.pki.RDNAttributesAsArray(capture.issuer),\n serialNumber: forge.util.createBuffer(capture.serial).toHex(),\n encryptedContent: {\n algorithm: asn1.derToOid(capture.encAlgorithm),\n parameter: capture.encParameter ? capture.encParameter.value : undefined,\n content: capture.encKey\n }\n };\n}\n\n/**\n * Converts a single recipient object to an ASN.1 object.\n *\n * @param obj the recipient object.\n *\n * @return the ASN.1 RecipientInfo.\n */\nfunction _recipientToAsn1(obj) {\n return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // Version\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,\n asn1.integerToDer(obj.version).getBytes()),\n // IssuerAndSerialNumber\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // Name\n forge.pki.distinguishedNameToAsn1({attributes: obj.issuer}),\n // Serial\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,\n forge.util.hexToBytes(obj.serialNumber))\n ]),\n // KeyEncryptionAlgorithmIdentifier\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // Algorithm\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(obj.encryptedContent.algorithm).getBytes()),\n // Parameter, force NULL, only RSA supported for now.\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, '')\n ]),\n // EncryptedKey\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false,\n obj.encryptedContent.content)\n ]);\n}\n\n/**\n * Map a set of RecipientInfo ASN.1 objects to recipient objects.\n *\n * @param infos an array of ASN.1 representations RecipientInfo (i.e. SET OF).\n *\n * @return an array of recipient objects.\n */\nfunction _recipientsFromAsn1(infos) {\n var ret = [];\n for(var i = 0; i < infos.length; ++i) {\n ret.push(_recipientFromAsn1(infos[i]));\n }\n return ret;\n}\n\n/**\n * Map an array of recipient objects to ASN.1 RecipientInfo objects.\n *\n * @param recipients an array of recipientInfo objects.\n *\n * @return an array of ASN.1 RecipientInfos.\n */\nfunction _recipientsToAsn1(recipients) {\n var ret = [];\n for(var i = 0; i < recipients.length; ++i) {\n ret.push(_recipientToAsn1(recipients[i]));\n }\n return ret;\n}\n\n/**\n * Converts a single signer from an ASN.1 object.\n *\n * @param obj the ASN.1 representation of a SignerInfo.\n *\n * @return the signer object.\n */\nfunction _signerFromAsn1(obj) {\n // validate EnvelopedData content block and capture data\n var capture = {};\n var errors = [];\n if(!asn1.validate(obj, p7.asn1.signerInfoValidator, capture, errors)) {\n var error = new Error('Cannot read PKCS#7 SignerInfo. ' +\n 'ASN.1 object is not an PKCS#7 SignerInfo.');\n error.errors = errors;\n throw error;\n }\n\n var rval = {\n version: capture.version.charCodeAt(0),\n issuer: forge.pki.RDNAttributesAsArray(capture.issuer),\n serialNumber: forge.util.createBuffer(capture.serial).toHex(),\n digestAlgorithm: asn1.derToOid(capture.digestAlgorithm),\n signatureAlgorithm: asn1.derToOid(capture.signatureAlgorithm),\n signature: capture.signature,\n authenticatedAttributes: [],\n unauthenticatedAttributes: []\n };\n\n // TODO: convert attributes\n var authenticatedAttributes = capture.authenticatedAttributes || [];\n var unauthenticatedAttributes = capture.unauthenticatedAttributes || [];\n\n return rval;\n}\n\n/**\n * Converts a single signerInfo object to an ASN.1 object.\n *\n * @param obj the signerInfo object.\n *\n * @return the ASN.1 representation of a SignerInfo.\n */\nfunction _signerToAsn1(obj) {\n // SignerInfo\n var rval = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // version\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,\n asn1.integerToDer(obj.version).getBytes()),\n // issuerAndSerialNumber\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // name\n forge.pki.distinguishedNameToAsn1({attributes: obj.issuer}),\n // serial\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,\n forge.util.hexToBytes(obj.serialNumber))\n ]),\n // digestAlgorithm\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // algorithm\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(obj.digestAlgorithm).getBytes()),\n // parameters (null)\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, '')\n ])\n ]);\n\n // authenticatedAttributes (OPTIONAL)\n if(obj.authenticatedAttributesAsn1) {\n // add ASN.1 previously generated during signing\n rval.value.push(obj.authenticatedAttributesAsn1);\n }\n\n // digestEncryptionAlgorithm\n rval.value.push(asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // algorithm\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(obj.signatureAlgorithm).getBytes()),\n // parameters (null)\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, '')\n ]));\n\n // encryptedDigest\n rval.value.push(asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, obj.signature));\n\n // unauthenticatedAttributes (OPTIONAL)\n if(obj.unauthenticatedAttributes.length > 0) {\n // [1] IMPLICIT\n var attrsAsn1 = asn1.create(asn1.Class.CONTEXT_SPECIFIC, 1, true, []);\n for(var i = 0; i < obj.unauthenticatedAttributes.length; ++i) {\n var attr = obj.unauthenticatedAttributes[i];\n attrsAsn1.values.push(_attributeToAsn1(attr));\n }\n rval.value.push(attrsAsn1);\n }\n\n return rval;\n}\n\n/**\n * Map a set of SignerInfo ASN.1 objects to an array of signer objects.\n *\n * @param signerInfoAsn1s an array of ASN.1 SignerInfos (i.e. SET OF).\n *\n * @return an array of signers objects.\n */\nfunction _signersFromAsn1(signerInfoAsn1s) {\n var ret = [];\n for(var i = 0; i < signerInfoAsn1s.length; ++i) {\n ret.push(_signerFromAsn1(signerInfoAsn1s[i]));\n }\n return ret;\n}\n\n/**\n * Map an array of signer objects to ASN.1 objects.\n *\n * @param signers an array of signer objects.\n *\n * @return an array of ASN.1 SignerInfos.\n */\nfunction _signersToAsn1(signers) {\n var ret = [];\n for(var i = 0; i < signers.length; ++i) {\n ret.push(_signerToAsn1(signers[i]));\n }\n return ret;\n}\n\n/**\n * Convert an attribute object to an ASN.1 Attribute.\n *\n * @param attr the attribute object.\n *\n * @return the ASN.1 Attribute.\n */\nfunction _attributeToAsn1(attr) {\n var value;\n\n // TODO: generalize to support more attributes\n if(attr.type === forge.pki.oids.contentType) {\n value = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(attr.value).getBytes());\n } else if(attr.type === forge.pki.oids.messageDigest) {\n value = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false,\n attr.value.bytes());\n } else if(attr.type === forge.pki.oids.signingTime) {\n /* Note per RFC 2985: Dates between 1 January 1950 and 31 December 2049\n (inclusive) MUST be encoded as UTCTime. Any dates with year values\n before 1950 or after 2049 MUST be encoded as GeneralizedTime. [Further,]\n UTCTime values MUST be expressed in Greenwich Mean Time (Zulu) and MUST\n include seconds (i.e., times are YYMMDDHHMMSSZ), even where the\n number of seconds is zero. Midnight (GMT) must be represented as\n \"YYMMDD000000Z\". */\n // TODO: make these module-level constants\n var jan_1_1950 = new Date('1950-01-01T00:00:00Z');\n var jan_1_2050 = new Date('2050-01-01T00:00:00Z');\n var date = attr.value;\n if(typeof date === 'string') {\n // try to parse date\n var timestamp = Date.parse(date);\n if(!isNaN(timestamp)) {\n date = new Date(timestamp);\n } else if(date.length === 13) {\n // YYMMDDHHMMSSZ (13 chars for UTCTime)\n date = asn1.utcTimeToDate(date);\n } else {\n // assume generalized time\n date = asn1.generalizedTimeToDate(date);\n }\n }\n\n if(date >= jan_1_1950 && date < jan_1_2050) {\n value = asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.UTCTIME, false,\n asn1.dateToUtcTime(date));\n } else {\n value = asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.GENERALIZEDTIME, false,\n asn1.dateToGeneralizedTime(date));\n }\n }\n\n // TODO: expose as common API call\n // create a RelativeDistinguishedName set\n // each value in the set is an AttributeTypeAndValue first\n // containing the type (an OID) and second the value\n return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // AttributeType\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(attr.type).getBytes()),\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SET, true, [\n // AttributeValue\n value\n ])\n ]);\n}\n\n/**\n * Map messages encrypted content to ASN.1 objects.\n *\n * @param ec The encryptedContent object of the message.\n *\n * @return ASN.1 representation of the encryptedContent object (SEQUENCE).\n */\nfunction _encryptedContentToAsn1(ec) {\n return [\n // ContentType, always Data for the moment\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(forge.pki.oids.data).getBytes()),\n // ContentEncryptionAlgorithmIdentifier\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [\n // Algorithm\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,\n asn1.oidToDer(ec.algorithm).getBytes()),\n // Parameters (IV)\n !ec.parameter ?\n undefined :\n asn1.create(\n asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false,\n ec.parameter.getBytes())\n ]),\n // [0] EncryptedContent\n asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [\n asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false,\n ec.content.getBytes())\n ])\n ];\n}\n\n/**\n * Reads the \"common part\" of an PKCS#7 content block (in ASN.1 format)\n *\n * This function reads the \"common part\" of the PKCS#7 content blocks\n * EncryptedData and EnvelopedData, i.e. version number and symmetrically\n * encrypted content block.\n *\n * The result of the ASN.1 validate and capture process is returned\n * to allow the caller to extract further data, e.g. the list of recipients\n * in case of a EnvelopedData object.\n *\n * @param msg the PKCS#7 object to read the data to.\n * @param obj the ASN.1 representation of the content block.\n * @param validator the ASN.1 structure validator object to use.\n *\n * @return the value map captured by validator object.\n */\nfunction _fromAsn1(msg, obj, validator) {\n var capture = {};\n var errors = [];\n if(!asn1.validate(obj, validator, capture, errors)) {\n var error = new Error('Cannot read PKCS#7 message. ' +\n 'ASN.1 object is not a supported PKCS#7 message.');\n error.errors = error;\n throw error;\n }\n\n // Check contentType, so far we only support (raw) Data.\n var contentType = asn1.derToOid(capture.contentType);\n if(contentType !== forge.pki.oids.data) {\n throw new Error('Unsupported PKCS#7 message. ' +\n 'Only wrapped ContentType Data supported.');\n }\n\n if(capture.encryptedContent) {\n var content = '';\n if(forge.util.isArray(capture.encryptedContent)) {\n for(var i = 0; i < capture.encryptedContent.length; ++i) {\n if(capture.encryptedContent[i].type !== asn1.Type.OCTETSTRING) {\n throw new Error('Malformed PKCS#7 message, expecting encrypted ' +\n 'content constructed of only OCTET STRING objects.');\n }\n content += capture.encryptedContent[i].value;\n }\n } else {\n content = capture.encryptedContent;\n }\n msg.encryptedContent = {\n algorithm: asn1.derToOid(capture.encAlgorithm),\n parameter: forge.util.createBuffer(capture.encParameter.value),\n content: forge.util.createBuffer(content)\n };\n }\n\n if(capture.content) {\n var content = '';\n if(forge.util.isArray(capture.content)) {\n for(var i = 0; i < capture.content.length; ++i) {\n if(capture.content[i].type !== asn1.Type.OCTETSTRING) {\n throw new Error('Malformed PKCS#7 message, expecting ' +\n 'content constructed of only OCTET STRING objects.');\n }\n content += capture.content[i].value;\n }\n } else {\n content = capture.content;\n }\n msg.content = forge.util.createBuffer(content);\n }\n\n msg.version = capture.version.charCodeAt(0);\n msg.rawCapture = capture;\n\n return capture;\n}\n\n/**\n * Decrypt the symmetrically encrypted content block of the PKCS#7 message.\n *\n * Decryption is skipped in case the PKCS#7 message object already has a\n * (decrypted) content attribute. The algorithm, key and cipher parameters\n * (probably the iv) are taken from the encryptedContent attribute of the\n * message object.\n *\n * @param The PKCS#7 message object.\n */\nfunction _decryptContent(msg) {\n if(msg.encryptedContent.key === undefined) {\n throw new Error('Symmetric key not available.');\n }\n\n if(msg.content === undefined) {\n var ciph;\n\n switch(msg.encryptedContent.algorithm) {\n case forge.pki.oids['aes128-CBC']:\n case forge.pki.oids['aes192-CBC']:\n case forge.pki.oids['aes256-CBC']:\n ciph = forge.aes.createDecryptionCipher(msg.encryptedContent.key);\n break;\n\n case forge.pki.oids['desCBC']:\n case forge.pki.oids['des-EDE3-CBC']:\n ciph = forge.des.createDecryptionCipher(msg.encryptedContent.key);\n break;\n\n default:\n throw new Error('Unsupported symmetric cipher, OID ' +\n msg.encryptedContent.algorithm);\n }\n ciph.start(msg.encryptedContent.parameter);\n ciph.update(msg.encryptedContent.content);\n\n if(!ciph.finish()) {\n throw new Error('Symmetric decryption failed.');\n }\n\n msg.content = ciph.output;\n }\n}\n","/**\n * Functions to output keys in SSH-friendly formats.\n *\n * This is part of the Forge project which may be used under the terms of\n * either the BSD License or the GNU General Public License (GPL) Version 2.\n *\n * See: https://github.com/digitalbazaar/forge/blob/cbebca3780658703d925b61b2caffb1d263a6c1d/LICENSE\n *\n * @author https://github.com/shellac\n */\nvar forge = require('./forge');\nrequire('./aes');\nrequire('./hmac');\nrequire('./md5');\nrequire('./sha1');\nrequire('./util');\n\nvar ssh = module.exports = forge.ssh = forge.ssh || {};\n\n/**\n * Encodes (and optionally encrypts) a private RSA key as a Putty PPK file.\n *\n * @param privateKey the key.\n * @param passphrase a passphrase to protect the key (falsy for no encryption).\n * @param comment a comment to include in the key file.\n *\n * @return the PPK file as a string.\n */\nssh.privateKeyToPutty = function(privateKey, passphrase, comment) {\n comment = comment || '';\n passphrase = passphrase || '';\n var algorithm = 'ssh-rsa';\n var encryptionAlgorithm = (passphrase === '') ? 'none' : 'aes256-cbc';\n\n var ppk = 'PuTTY-User-Key-File-2: ' + algorithm + '\\r\\n';\n ppk += 'Encryption: ' + encryptionAlgorithm + '\\r\\n';\n ppk += 'Comment: ' + comment + '\\r\\n';\n\n // public key into buffer for ppk\n var pubbuffer = forge.util.createBuffer();\n _addStringToBuffer(pubbuffer, algorithm);\n _addBigIntegerToBuffer(pubbuffer, privateKey.e);\n _addBigIntegerToBuffer(pubbuffer, privateKey.n);\n\n // write public key\n var pub = forge.util.encode64(pubbuffer.bytes(), 64);\n var length = Math.floor(pub.length / 66) + 1; // 66 = 64 + \\r\\n\n ppk += 'Public-Lines: ' + length + '\\r\\n';\n ppk += pub;\n\n // private key into a buffer\n var privbuffer = forge.util.createBuffer();\n _addBigIntegerToBuffer(privbuffer, privateKey.d);\n _addBigIntegerToBuffer(privbuffer, privateKey.p);\n _addBigIntegerToBuffer(privbuffer, privateKey.q);\n _addBigIntegerToBuffer(privbuffer, privateKey.qInv);\n\n // optionally encrypt the private key\n var priv;\n if(!passphrase) {\n // use the unencrypted buffer\n priv = forge.util.encode64(privbuffer.bytes(), 64);\n } else {\n // encrypt RSA key using passphrase\n var encLen = privbuffer.length() + 16 - 1;\n encLen -= encLen % 16;\n\n // pad private key with sha1-d data -- needs to be a multiple of 16\n var padding = _sha1(privbuffer.bytes());\n\n padding.truncate(padding.length() - encLen + privbuffer.length());\n privbuffer.putBuffer(padding);\n\n var aeskey = forge.util.createBuffer();\n aeskey.putBuffer(_sha1('\\x00\\x00\\x00\\x00', passphrase));\n aeskey.putBuffer(_sha1('\\x00\\x00\\x00\\x01', passphrase));\n\n // encrypt some bytes using CBC mode\n // key is 40 bytes, so truncate *by* 8 bytes\n var cipher = forge.aes.createEncryptionCipher(aeskey.truncate(8), 'CBC');\n cipher.start(forge.util.createBuffer().fillWithByte(0, 16));\n cipher.update(privbuffer.copy());\n cipher.finish();\n var encrypted = cipher.output;\n\n // Note: this appears to differ from Putty -- is forge wrong, or putty?\n // due to padding we finish as an exact multiple of 16\n encrypted.truncate(16); // all padding\n\n priv = forge.util.encode64(encrypted.bytes(), 64);\n }\n\n // output private key\n length = Math.floor(priv.length / 66) + 1; // 64 + \\r\\n\n ppk += '\\r\\nPrivate-Lines: ' + length + '\\r\\n';\n ppk += priv;\n\n // MAC\n var mackey = _sha1('putty-private-key-file-mac-key', passphrase);\n\n var macbuffer = forge.util.createBuffer();\n _addStringToBuffer(macbuffer, algorithm);\n _addStringToBuffer(macbuffer, encryptionAlgorithm);\n _addStringToBuffer(macbuffer, comment);\n macbuffer.putInt32(pubbuffer.length());\n macbuffer.putBuffer(pubbuffer);\n macbuffer.putInt32(privbuffer.length());\n macbuffer.putBuffer(privbuffer);\n\n var hmac = forge.hmac.create();\n hmac.start('sha1', mackey);\n hmac.update(macbuffer.bytes());\n\n ppk += '\\r\\nPrivate-MAC: ' + hmac.digest().toHex() + '\\r\\n';\n\n return ppk;\n};\n\n/**\n * Encodes a public RSA key as an OpenSSH file.\n *\n * @param key the key.\n * @param comment a comment.\n *\n * @return the public key in OpenSSH format.\n */\nssh.publicKeyToOpenSSH = function(key, comment) {\n var type = 'ssh-rsa';\n comment = comment || '';\n\n var buffer = forge.util.createBuffer();\n _addStringToBuffer(buffer, type);\n _addBigIntegerToBuffer(buffer, key.e);\n _addBigIntegerToBuffer(buffer, key.n);\n\n return type + ' ' + forge.util.encode64(buffer.bytes()) + ' ' + comment;\n};\n\n/**\n * Encodes a private RSA key as an OpenSSH file.\n *\n * @param key the key.\n * @param passphrase a passphrase to protect the key (falsy for no encryption).\n *\n * @return the public key in OpenSSH format.\n */\nssh.privateKeyToOpenSSH = function(privateKey, passphrase) {\n if(!passphrase) {\n return forge.pki.privateKeyToPem(privateKey);\n }\n // OpenSSH private key is just a legacy format, it seems\n return forge.pki.encryptRsaPrivateKey(privateKey, passphrase,\n {legacy: true, algorithm: 'aes128'});\n};\n\n/**\n * Gets the SSH fingerprint for the given public key.\n *\n * @param options the options to use.\n * [md] the message digest object to use (defaults to forge.md.md5).\n * [encoding] an alternative output encoding, such as 'hex'\n * (defaults to none, outputs a byte buffer).\n * [delimiter] the delimiter to use between bytes for 'hex' encoded\n * output, eg: ':' (defaults to none).\n *\n * @return the fingerprint as a byte buffer or other encoding based on options.\n */\nssh.getPublicKeyFingerprint = function(key, options) {\n options = options || {};\n var md = options.md || forge.md.md5.create();\n\n var type = 'ssh-rsa';\n var buffer = forge.util.createBuffer();\n _addStringToBuffer(buffer, type);\n _addBigIntegerToBuffer(buffer, key.e);\n _addBigIntegerToBuffer(buffer, key.n);\n\n // hash public key bytes\n md.start();\n md.update(buffer.getBytes());\n var digest = md.digest();\n if(options.encoding === 'hex') {\n var hex = digest.toHex();\n if(options.delimiter) {\n return hex.match(/.{2}/g).join(options.delimiter);\n }\n return hex;\n } else if(options.encoding === 'binary') {\n return digest.getBytes();\n } else if(options.encoding) {\n throw new Error('Unknown encoding \"' + options.encoding + '\".');\n }\n return digest;\n};\n\n/**\n * Adds len(val) then val to a buffer.\n *\n * @param buffer the buffer to add to.\n * @param val a big integer.\n */\nfunction _addBigIntegerToBuffer(buffer, val) {\n var hexVal = val.toString(16);\n // ensure 2s complement +ve\n if(hexVal[0] >= '8') {\n hexVal = '00' + hexVal;\n }\n var bytes = forge.util.hexToBytes(hexVal);\n buffer.putInt32(bytes.length);\n buffer.putBytes(bytes);\n}\n\n/**\n * Adds len(val) then val to a buffer.\n *\n * @param buffer the buffer to add to.\n * @param val a string.\n */\nfunction _addStringToBuffer(buffer, val) {\n buffer.putInt32(val.length);\n buffer.putString(val);\n}\n\n/**\n * Hashes the arguments into one value using SHA-1.\n *\n * @return the sha1 hash of the provided arguments.\n */\nfunction _sha1() {\n var sha = forge.md.sha1.create();\n var num = arguments.length;\n for (var i = 0; i < num; ++i) {\n sha.update(arguments[i]);\n }\n return sha.digest();\n}\n","/**\n * Node.js module for Forge.\n *\n * @author Dave Longley\n *\n * Copyright 2011-2016 Digital Bazaar, Inc.\n */\nmodule.exports = require('./forge');\nrequire('./aes');\nrequire('./aesCipherSuites');\nrequire('./asn1');\nrequire('./cipher');\nrequire('./des');\nrequire('./ed25519');\nrequire('./hmac');\nrequire('./kem');\nrequire('./log');\nrequire('./md.all');\nrequire('./mgf1');\nrequire('./pbkdf2');\nrequire('./pem');\nrequire('./pkcs1');\nrequire('./pkcs12');\nrequire('./pkcs7');\nrequire('./pki');\nrequire('./prime');\nrequire('./prng');\nrequire('./pss');\nrequire('./random');\nrequire('./rc2');\nrequire('./ssh');\nrequire('./tls');\nrequire('./util');\n"],"names":["__viteBrowserExternal","root","factory","module","this","CryptoJS","Math","undefined","crypto","global","require","require$$0","cryptoSecureRandomInt","create","F","obj","subtype","C","C_lib","Base","overrides","instance","properties","propertyName","WordArray","words","sigBytes","encoder","Hex","wordArray","thisWords","thatWords","thisSigBytes","thatSigBytes","i","thatByte","j","clone","nBytes","C_enc","hexChars","bite","hexStr","hexStrLength","Latin1","latin1Chars","latin1Str","latin1StrLength","Utf8","utf8Str","BufferedBlockAlgorithm","data","doFlush","processedWords","dataWords","dataSigBytes","blockSize","blockSizeBytes","nBlocksReady","nWordsReady","nBytesReady","offset","cfg","messageUpdate","hash","hasher","message","key","C_algo","X32WordArray","C_x64","high","low","x64Words","x64WordsLength","x32Words","x64Word","wordsLength","superInit","subInit","typedArray","typedArrayByteLength","utf16Chars","codePoint","utf16Str","utf16StrLength","swapEndian","word","map","base64Chars","byte1","byte2","byte3","triplet","paddingChar","base64Str","base64StrLength","reverseMap","paddingIndex","parseLoop","bits1","bits2","bitsCombined","urlSafe","Hasher","T","MD5","M","offset_i","M_offset_i","H","M_offset_0","M_offset_1","M_offset_2","M_offset_3","M_offset_4","M_offset_5","M_offset_6","M_offset_7","M_offset_8","M_offset_9","M_offset_10","M_offset_11","M_offset_12","M_offset_13","M_offset_14","M_offset_15","a","b","c","d","FF","GG","HH","II","nBitsTotal","nBitsLeft","nBitsTotalH","nBitsTotalL","H_i","x","s","t","n","W","SHA1","e","K","isPrime","sqrtN","factor","getFractionalBits","nPrime","SHA256","f","g","h","gamma0x","gamma0","gamma1x","gamma1","ch","maj","sigma0","sigma1","t1","t2","undef","require$$1","SHA224","X64Word","X64WordArray","X64Word_create","SHA512","H0","H1","H2","H3","H4","H5","H6","H7","H0h","H0l","H1h","H1l","H2h","H2l","H3h","H3l","H4h","H4l","H5h","H5l","H6h","H6l","H7h","H7l","ah","al","bh","bl","cl","dh","dl","eh","el","fh","fl","gh","gl","hh","hl","Wil","Wih","Wi","gamma0xh","gamma0xl","gamma0h","gamma0l","gamma1xh","gamma1xl","gamma1h","gamma1l","Wi7","Wi7h","Wi7l","Wi16","Wi16h","Wi16l","chh","chl","majh","majl","sigma0h","sigma0l","sigma1h","sigma1l","Ki","Kih","Kil","t1l","t1h","t2l","t2h","require$$2","SHA384","RHO_OFFSETS","PI_INDEXES","ROUND_CONSTANTS","y","newX","newY","LFSR","roundConstantMsw","roundConstantLsw","bitPosition","SHA3","state","nBlockSizeLanes","M2i","M2i1","lane","round","tMsw","tLsw","Tx","Tx4","Tx1","Tx1Msw","Tx1Lsw","laneIndex","laneMsw","laneLsw","rhoOffset","TPiLane","T0","state0","TLane","Tx1Lane","Tx2Lane","roundConstant","blockSizeBits","outputLengthBytes","outputLengthLanes","hashWords","_zl","_zr","_sl","_sr","_hl","_hr","RIPEMD160","hr","zl","zr","sl","sr","ar","br","cr","dr","er","f1","f2","f3","f4","f5","rotl","z","hasherBlockSize","hasherBlockSizeBytes","oKey","iKey","oKeyWords","iKeyWords","innerHash","hmac","HMAC","PBKDF2","password","salt","derivedKey","blockIndex","derivedKeyWords","blockIndexWords","keySize","iterations","block","blockWords","blockWordsLength","intermediate","intermediateWords","EvpKDF","Base64","Cipher","xformMode","dataUpdate","finalProcessedData","selectCipherStrategy","PasswordBasedCipher","SerializableCipher","cipher","ciphertext","finalProcessedBlocks","C_mode","BlockCipherMode","iv","CBC","xorBlock","thisBlock","C_pad","Pkcs7","nPaddingBytes","paddingWord","paddingWords","padding","modeCreator","mode","CipherParams","cipherParams","formatter","C_format","OpenSSLFormatter","openSSLStr","ciphertextWords","encryptor","cipherCfg","plaintext","format","C_kdf","OpenSSLKdf","ivSize","derivedParams","CFB","generateKeystreamAndEncrypt","keystream","CTR","Encryptor","counter","CTRGladman","incWord","b1","b2","b3","incCounter","OFB","ECB","lastBytePos","input","require$$3","require$$4","BlockCipher","SBOX","INV_SBOX","SUB_MIX_0","SUB_MIX_1","SUB_MIX_2","SUB_MIX_3","INV_SUB_MIX_0","INV_SUB_MIX_1","INV_SUB_MIX_2","INV_SUB_MIX_3","xi","sx","x2","x4","x8","RCON","AES","keyWords","nRounds","ksRows","keySchedule","ksRow","invKeySchedule","invKsRow","s0","s1","s2","s3","t0","t3","PC1","PC2","BIT_SHIFTS","SBOX_P","SBOX_MASK","DES","keyBits","keyBitPos","subKeys","nSubKey","subKey","bitShift","invSubKeys","exchangeLR","exchangeRL","lBlock","rBlock","mask","TripleDES","key1","key2","key3","StreamCipher","RC4","keySigBytes","S","keyByteIndex","keyByte","generateKeystreamWord","keystreamWord","RC4Drop","C_","G","Rabbit","X","nextState","IV","IV_0","IV_1","i0","i2","i1","i3","gx","ga","gb","RabbitLegacy","N","ORIG_P","ORIG_S","BLOWFISH_CTX","ctx","BlowFish_Encrypt","left","right","Xl","Xr","temp","BlowFish_Decrypt","BlowFishInit","keysize","Row","Col","keyIndex","index","Data1","Data2","res","Blowfish","require$$5","require$$6","require$$7","require$$8","require$$9","require$$10","require$$11","require$$12","require$$13","require$$14","require$$15","require$$16","require$$17","require$$18","require$$19","require$$20","require$$21","require$$22","require$$23","require$$24","require$$25","require$$26","require$$27","require$$28","require$$29","require$$30","require$$31","require$$32","require$$33","require$$34","forge","api","baseN","_reverseAlphabets","alphabet","maxline","output","_encodeWithByteBuffer","base","first","digits","carry","regex","table","bytes","value","k","util","callback","handler","event","msg","copy","callbacks","now","attr","div","oldSetImmediate","_checkBitsParam","ByteStringBuffer","arr","_MAX_CONSTRUCTED_STRING_LENGTH","str","buffer","rval","max","count","len","DataBuffer","options","isArrayBuffer","isArrayBufferView","amount","growSize","src","dst","encoding","view","hex","_base64","_base64Idx","_base58","line","chr1","chr2","chr3","enc1","enc2","enc3","enc4","out","raw","start","flg","_setStorageObject","id","error","_getStorageObject","_setItem","_getItem","_removeItem","empty","prop","_clearItems","_callStorageFunction","func","args","location","type","done","exception","idx","ex","re","match","part","argi","parts","last","code","number","decimals","dec_point","thousands_sep","size","ip","num","blanks","zeros","zeroGroups","zeroMaxGroup","group","blobUrl","st","et","sample","samples","numWorkers","avg","err","results","reduce","workers","worker","overlaps","r1","overlap","r2","algorithm","name","opts","pad","modes","finish","transformIV","inputLength","partialBytes","inc32","additionalData","ivLength","from64To32","overflow","lengths","tag","z_i","v_i","x_i","lsb","bits","multiplier","perInt","m","tmp","shft","mid","half","m_i","m_j","ints","blocks","_createCipher","init","initialize","self","inBlock","outBlock","_updateBlock","encryptOp","_expandKey","decrypt","registerAlgorithm","Nb","sbox","isbox","rcon","mix","imix","xtime","ei","e2","e4","e8","sx2","me","ime","w","iNk","Nk","Nr1","end","m0","m1","m2","m3","wnew","wi","Nr","sub","a2","c2","oids","_IN","_I_","asn1","tagClass","constructed","obj1","obj2","equal","length","longForm","_checkBufferLength","remaining","_getValueLength","longFormBytes","byteCount","_fromDer","depth","bitStringContents","savedRead","savedRemaining","unused","subOptions","composed","used","tc","asn1Options","useBitStringContents","lenBytes","oid","values","valueBytes","utc","date","year","MM","DD","mm","ss","hhoffset","mmoffset","gentime","YYYY","fff","isUTC","v","capture","errors","_nonLatinRegex","level","indentation","indent","subvalues","_key","_md","_ipadding","_opadding","md","keylen","inner","md5","_initialized","_init","_state","_input","_w","int32s","_update","finalBlock","_padding","_g","_r","_k","r","pem","header","foldHeader","rMessage","rHeader","rCRLF","lines","li","nl","next","vi","ltrim","insertSpace","$1","candidate","insert","_createKeys","spfunction1","spfunction2","spfunction3","spfunction4","spfunction5","spfunction6","spfunction7","spfunction8","pc2bytes0","pc2bytes1","pc2bytes2","pc2bytes3","pc2bytes4","pc2bytes5","pc2bytes6","pc2bytes7","pc2bytes8","pc2bytes9","pc2bytes10","pc2bytes11","pc2bytes12","pc2bytes13","keys","shifts","lefttmp","righttmp","looping","endloop","loopinc","right1","right2","pkcs5","p","dkLen","hLen","prf","dk","xor","u_c","u_c1","outer","sha256","_crypto","prng","plugin","pools","increment","formatKey","formatSeed","generate","_reseed","_reseedSync","_seed","needed","_2powK","seedBytes","defaultSeedFile","getRandomValues","globalScope","entropy","hi","lo","seed","listener","jQuery","prng_aes","_prng_aes_output","_prng_aes_buffer","spawnPrng","_ctx","_navBytes","piTable","rol","ror","effKeyBits","L","T1","T8","TM","createCipher","encrypt","_finish","_output","_iv","mixRound","mashRound","R","runPlan","plan","val","ptr","ctr","dbits","BigInteger","nbi","am1","am2","xl","xh","am3","BI_FP","BI_RM","BI_RC","vv","int2char","intAt","bnpCopyTo","bnpFromInt","nbv","bnpFromString","mi","sh","bnpClamp","bnToString","km","bnNegate","bnAbs","bnCompareTo","nbits","bnBitLength","bnpDLShiftTo","bnpDRShiftTo","bnpLShiftTo","bs","cbs","bm","ds","bnpRShiftTo","bnpSubTo","bnpMultiplyTo","bnpSquareTo","bnpDivRemTo","q","pm","pt","ts","ms","nsh","ys","y0","yt","d1","d2","qd","bnMod","Classic","cConvert","cRevert","cReduce","cMulTo","cSqrTo","bnpInvDigit","Montgomery","montConvert","montRevert","montReduce","u0","montSqrTo","montMulTo","bnpIsEven","bnpExp","bnModPowInt","bnClone","bnIntValue","bnByteValue","bnShortValue","bnpChunkSize","bnSigNum","bnpToRadix","cs","bnpFromRadix","bnpFromNumber","op_or","bnToByteArray","bnEquals","bnMin","bnMax","bnpBitwiseTo","op","op_and","bnAnd","bnOr","op_xor","bnXor","op_andnot","bnAndNot","bnNot","bnShiftLeft","bnShiftRight","lbit","bnGetLowestSetBit","cbit","bnBitCount","bnTestBit","bnpChangeBit","bnSetBit","bnClearBit","bnFlipBit","bnpAddTo","bnAdd","bnSubtract","bnMultiply","bnDivide","bnRemainder","bnDivideAndRemainder","bnpDMultiply","bnpDAddOffset","NullExp","nNop","nMulTo","nSqrTo","bnPow","bnpMultiplyLowerTo","bnpMultiplyUpperTo","Barrett","barrettConvert","barrettRevert","barrettReduce","barrettSqrTo","barrettMulTo","bnModPow","k1","g2","is1","bnGCD","bnpModInt","bnModInverse","ac","u","lowprimes","lplim","bnIsProbablePrime","bnpMillerRabin","n1","bnGetPrng","sha1","pkcs1","label","mgf1Md","keyLength","maxLength","lHash","PS","PS_length","DB","dbMask","rsa_mgf1","maskedDB","seedMask","maskedSeed","em","db","lHashPrime","in_ps","is_0","error_mask","maskLength","prime","GCD_30_DELTA","THIRTY","rng","primeincFindPrime","primeincFindPrimeWithWorkers","primeincFindPrimeWithoutWorkers","generateRandom","deltaIdx","mrTests","getMillerRabinTests","maxBlockTime","_primeinc","workLoad","range","workerScript","cores","workerMessage","found","pki","privateKeyValidator","rsaPrivateKeyValidator","rsaPublicKeyValidator","publicKeyValidator","digestInfoValidator","emsaPkcs1v15encode","oidBytes","digestInfo","digestAlgorithm","digest","_modPow","pub","xp","xq","bt","eb","_encodePkcs1_v1_5","yhex","ed","ml","xhex","_decodePkcs1_v1_5","total","_getMillerRabinTests","_detectNodeCrypto","priv","_detectSubtleCrypto","_intToUint8Array","pair","pkcs8","privateKey","_detectSubtleMsCrypto","genOp","exportOp","keypair","_generateKeyPair","scheme","schemeOptions","signature","dP","dQ","qInv","rsaKey","_bnToBytes","padNum","padByte","numZeros","padBytes","zero","getPrime","fn","encryptedPrivateKeyValidator","PBES2AlgorithmsValidator","pkcs12PbeParamsValidator","countBytes","encryptionAlgorithm","encryptedData","ivLen","encOid","cipherFn","prfAlgorithm","prfAlgorithmToMessageDigest","params","createPbkdf2Params","saltBytes","encrypted","epki","iter","l","result","passBuf","D","Slen","Plen","P","I","buf","B","Inew","chunk","prfOidToMessageDigest","dIvLen","digests","prfOid","p7v","contentInfoValidator","encryptedContentInfoValidator","signerValidator","mgf1","mgf","maskLen","pss","salt_","sLen","pssobj","modBits","emBits","emLen","mHash","m_","ps","checkLen","h_","_shortNames","x509CertificateValidator","rsassaPssParameterValidator","certificationRequestInfoValidator","certificationRequestValidator","rdn","set","si","attributes","seq","_getAttribute","_readSignatureParameters","fillDefaults","_createSignatureDigest","_verifySignature","cert","computeHash","strict","csr","sn","_fillMissingFields","attrs","uniqueId","exts","_fillMissingExtensionFields","ext","algorithmOid","child","issuer","subject","tbsCertificate","parent","iattr","sattr","ski","serial","validity","imd","ibytes","smd","sbytes","extseq","ev","gn","altName","cri","_dnToAsn1","valueTagClass","keyIdentifier","authorityCertIssuer","serialNumber","subSeq","fullNameGeneralNames","_signatureParametersToAsn1","_CRIAttributesToAsn1","valueConstructed","jan_1_1950","jan_1_2050","_dateToAsn1","notBefore","notAfter","tbs","dn","certs","caStore","getBySubject","ensureSubjectHasHash","der1","der2","certList","chain","validityCheckDate","selfSigned","parents","verified","se","bcExt","keyUsageExt","pathLen","vfd","ret","p12","pfxValidator","safeBagValidator","attributeValidator","certBagValidator","_getBagsByAttribute","safeContents","attrName","attrValue","bagType","bag","pfx","filter","localKeyId","friendlyName","_decodePkcs7Data","macKeyBytes","macAlgorithm","macSalt","macIterations","macKey","mac","macValue","_decodeAuthenticatedSafe","authSafe","contentInfo","_decryptSafeContents","_decodeSafeContents","encryptedContentAsn1","safeBag","_decodeBagAttributes","validator","decoder","bagAsn1","certAsn1","decodedAttrs","bagAttrs","pairedCert","contents","certSafeBags","certBagAttrs","certSafeBag","certSafeContents","certCI","keyBag","pkAsn1","keySafeContents","keyCI","safe","macData","prf_TLS1","secret","slen","ai","md5itr","sha1itr","md5bytes","sha1bytes","hmac_sha1","seqNum","record","deflate","inflate","readVector","writeVector","tls","twoBytes","ignore","client","snl","snType","msgRandom","cRandom","sRandom","sessionId","SCC","SCE","session","version","CCC","CCE","CKE","SKE","SCR","sp","CCV","SHD","msgBytes","verify","SER","SFI","CFI","vd","vdl","SAD","CAD","alert","hsTable","payload","SHE","CHE","__","R0","R1","R2","R3","R4","ctTable","H8","H9","random","tls10","createMode","cipherSuites","cSuites","compressionMethods","cMethods","extensions","serverName","snList","extLength","hint","der","certBuffer","certTypes","cAs","byteBuffer","payloadLength","plaintextLength","paddingLength","records","rec","_certErrorToAlertDesc","_alertDescToCertError","desc","cache","capacity","entity","sessionCache","cn","dpth","cts","fatal","clearFail","aligned","handlers","_readRecordHeader","compatibleVersion","_readRecord","initConnectionState","decrypt_aes_cbc_sha1","encrypt_aes_cbc_sha1","encrypt_aes_cbc_sha1_padding","decrypt_aes_cbc_sha1_padding","macLen","mac2","compareMacs","mac1","sha512","sha384","_states","_h","digestLength","hlen","t1_hi","t1_lo","t2_hi","t2_lo","s0_hi","s0_lo","s1_hi","s1_lo","ch_hi","ch_lo","maj_hi","maj_lo","a_hi","a_lo","b_hi","b_lo","c_hi","c_lo","d_hi","d_lo","e_hi","e_lo","f_hi","f_lo","g_hi","g_lo","h_hi","h_lo","w2","w7","w15","w16","asn1Validator","ByteBuffer","NativeBuffer","ed25519","messageToNativeBuffer","pk","sk","crypto_sign_keypair","valid","ed25519Oid","privateKeyBytes","publicKeyBytes","keyPair","signedMsg","crypto_sign","sig","publicKey","sm","crypto_sign_open","gf0","gf","gf1","D2","Y","msgLen","scalarbase","pack","smlen","modL","mlen","unpackneg","scalarmult","add","crypto_verify_32","Z","A","cswap","sel25519","tx","ty","zi","inv25519","pack25519","par25519","o","car25519","chk","den","den2","den4","den6","set25519","unpack25519","pow2523","neq25519","yi","vn","t4","t5","t6","t7","t8","t9","t10","t11","t12","t13","t14","t15","t16","t17","t18","t19","t20","t21","t22","t23","t24","t25","t26","t27","t28","t29","t30","b0","b4","b5","b6","b7","b8","b9","b10","b11","b12","b13","b14","b15","kdf","kem","byteLength","encapsulation","_createKDF","counterStart","sLevelInfo","sLoggers","sConsoleLogger","messageLevelIndex","logger","loggerLevelIndex","levels","category","logFunction","aValidLevel","lock","levelHandlers","query","p7","pemObj","contentType","_fromAsn1","crls","signedData","signer","authenticatedAttributes","messageDigest","content","mds","addDigestAlgorithmIds","addSignerInfos","crl","signingTime","attrsAsn1","_attributeToAsn1","_signersToAsn1","_decryptContent","_recipientsFromAsn1","_recipientsToAsn1","_encryptedContentToAsn1","sAttr","rAttr","recipient","privKey","keyLen","ciphFn","ciph","_recipientFromAsn1","_recipientToAsn1","infos","recipients","_signerToAsn1","signers","timestamp","ec","ssh","passphrase","comment","ppk","pubbuffer","_addStringToBuffer","_addBigIntegerToB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D,EAAI,OAAO,UAAUzjD,CAAC,CAAC,EAEzB,OAAOyjD,EAAI,QACb,CCpOA,IAAAC,GAAiBjlD","x_google_ignoreList":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77]} \ No newline at end of file diff --git a/assets/aw-CLCX8uk5.svg b/assets/aw-CLCX8uk5.svg deleted file mode 100644 index 1f03d61..0000000 --- a/assets/aw-CLCX8uk5.svg +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/aw-W0PWLK5p.svg b/assets/aw-W0PWLK5p.svg deleted file mode 100644 index 413b7c4..0000000 --- a/assets/aw-W0PWLK5p.svg +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/bm-BoWRAtUx.svg b/assets/bm-BoWRAtUx.svg deleted file mode 100644 index bab3e0a..0000000 --- a/assets/bm-BoWRAtUx.svg +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/bm-CyW69jd8.svg b/assets/bm-CyW69jd8.svg deleted file mode 100644 index fde5080..0000000 --- a/assets/bm-CyW69jd8.svg +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/bn-BDKbSv-u.svg b/assets/bn-BDKbSv-u.svg deleted file mode 100644 index 4b416eb..0000000 --- a/assets/bn-BDKbSv-u.svg +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/bn-CEevvwJS.svg b/assets/bn-CEevvwJS.svg deleted file mode 100644 index 8a0fe13..0000000 --- a/assets/bn-CEevvwJS.svg +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/bo-BE5mqlGv.svg b/assets/bo-BE5mqlGv.svg deleted file mode 100644 index e2b25c5..0000000 --- a/assets/bo-BE5mqlGv.svg +++ /dev/null @@ -1,674 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/bo-Cvfzpazb.svg b/assets/bo-Cvfzpazb.svg deleted file mode 100644 index 422a1f2..0000000 --- a/assets/bo-Cvfzpazb.svg +++ /dev/null @@ -1,674 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/br-DFzUeaDV.svg b/assets/br-DFzUeaDV.svg deleted file mode 100644 index 6f0df70..0000000 --- a/assets/br-DFzUeaDV.svg +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/br-Dbh3w8z9.svg b/assets/br-Dbh3w8z9.svg deleted file mode 100644 index 81514ec..0000000 --- a/assets/br-Dbh3w8z9.svg +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/bt-Cm0R6rAQ.svg b/assets/bt-Cm0R6rAQ.svg deleted file mode 100644 index 81f6788..0000000 --- a/assets/bt-Cm0R6rAQ.svg +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/bt-Csq9bKsA.svg b/assets/bt-Csq9bKsA.svg deleted file mode 100644 index 798c79b..0000000 --- a/assets/bt-Csq9bKsA.svg +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/by-EkqhOCLw.svg b/assets/by-EkqhOCLw.svg deleted file mode 100644 index 16730e0..0000000 --- a/assets/by-EkqhOCLw.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/by-oPm0zKcB.svg b/assets/by-oPm0zKcB.svg deleted file mode 100644 index 8d25ee3..0000000 --- a/assets/by-oPm0zKcB.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/assets/bz-CqiVUvof.svg b/assets/bz-CqiVUvof.svg deleted file mode 100644 index e99106a..0000000 --- a/assets/bz-CqiVUvof.svg +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/bz-YpwBidLU.svg b/assets/bz-YpwBidLU.svg deleted file mode 100644 index 25386a5..0000000 --- a/assets/bz-YpwBidLU.svg +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/caption-parsing-BABN6jyO.js b/assets/caption-parsing-BABN6jyO.js deleted file mode 100644 index 489a533..0000000 --- a/assets/caption-parsing-BABN6jyO.js +++ /dev/null @@ -1,8485 +0,0 @@ -import { - i as Ga, - a as Wa, - b as Jt, - D as tu, - E as Va, - C as Qa, - d as su, - P as Xa, - T as Ka, - e as za, - f as ja -} from "./vendor-Dkz3gcSC.js"; -const Ie = new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e => e.charCodeAt(0))), - yu = new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e => e.charCodeAt(0))); -var Zt; -const Ja = new Map([ - [0, 65533], - [128, 8364], - [130, 8218], - [131, 402], - [132, 8222], - [133, 8230], - [134, 8224], - [135, 8225], - [136, 710], - [137, 8240], - [138, 352], - [139, 8249], - [140, 338], - [142, 381], - [145, 8216], - [146, 8217], - [147, 8220], - [148, 8221], - [149, 8226], - [150, 8211], - [151, 8212], - [152, 732], - [153, 8482], - [154, 353], - [155, 8250], - [156, 339], - [158, 382], - [159, 376] - ]), - cs = (Zt = String.fromCodePoint) !== null && Zt !== void 0 ? Zt : function (e) { - let t = ""; - return e > 65535 && (e -= 65536, t += String.fromCharCode(e >>> 10 & 1023 | 55296), e = 56320 | e & 1023), t += String.fromCharCode(e), t - }; - -function ku(e) { - var t; - return e >= 55296 && e <= 57343 || e > 1114111 ? 65533 : (t = Ja.get(e)) !== null && t !== void 0 ? t : e -} -var W; -(function (e) { - e[e.NUM = 35] = "NUM", e[e.SEMI = 59] = "SEMI", e[e.EQUALS = 61] = "EQUALS", e[e.ZERO = 48] = "ZERO", e[e.NINE = 57] = "NINE", e[e.LOWER_A = 97] = "LOWER_A", e[e.LOWER_F = 102] = "LOWER_F", e[e.LOWER_X = 120] = "LOWER_X", e[e.LOWER_Z = 122] = "LOWER_Z", e[e.UPPER_A = 65] = "UPPER_A", e[e.UPPER_F = 70] = "UPPER_F", e[e.UPPER_Z = 90] = "UPPER_Z" -})(W || (W = {})); -const Za = 32; -var re; -(function (e) { - e[e.VALUE_LENGTH = 49152] = "VALUE_LENGTH", e[e.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", e[e.JUMP_TABLE = 127] = "JUMP_TABLE" -})(re || (re = {})); - -function os(e) { - return e >= W.ZERO && e <= W.NINE -} - -function ei(e) { - return e >= W.UPPER_A && e <= W.UPPER_F || e >= W.LOWER_A && e <= W.LOWER_F -} - -function ti(e) { - return e >= W.UPPER_A && e <= W.UPPER_Z || e >= W.LOWER_A && e <= W.LOWER_Z || os(e) -} - -function si(e) { - return e === W.EQUALS || ti(e) -} -var G; -(function (e) { - e[e.EntityStart = 0] = "EntityStart", e[e.NumericStart = 1] = "NumericStart", e[e.NumericDecimal = 2] = "NumericDecimal", e[e.NumericHex = 3] = "NumericHex", e[e.NamedEntity = 4] = "NamedEntity" -})(G || (G = {})); -var Pe; -(function (e) { - e[e.Legacy = 0] = "Legacy", e[e.Strict = 1] = "Strict", e[e.Attribute = 2] = "Attribute" -})(Pe || (Pe = {})); -class ui { - constructor(t, s, a) { - this.decodeTree = t, this.emitCodePoint = s, this.errors = a, this.state = G.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = Pe.Strict - } - startEntity(t) { - this.decodeMode = t, this.state = G.EntityStart, this.result = 0, this.treeIndex = 0, this.excess = 1, this.consumed = 1 - } - write(t, s) { - switch (this.state) { - case G.EntityStart: - return t.charCodeAt(s) === W.NUM ? (this.state = G.NumericStart, this.consumed += 1, this.stateNumericStart(t, s + 1)) : (this.state = G.NamedEntity, this.stateNamedEntity(t, s)); - case G.NumericStart: - return this.stateNumericStart(t, s); - case G.NumericDecimal: - return this.stateNumericDecimal(t, s); - case G.NumericHex: - return this.stateNumericHex(t, s); - case G.NamedEntity: - return this.stateNamedEntity(t, s) - } - } - stateNumericStart(t, s) { - return s >= t.length ? -1 : (t.charCodeAt(s) | Za) === W.LOWER_X ? (this.state = G.NumericHex, this.consumed += 1, this.stateNumericHex(t, s + 1)) : (this.state = G.NumericDecimal, this.stateNumericDecimal(t, s)) - } - addToNumericResult(t, s, a, i) { - if (s !== a) { - const n = a - s; - this.result = this.result * Math.pow(i, n) + parseInt(t.substr(s, n), i), this.consumed += n - } - } - stateNumericHex(t, s) { - const a = s; - for (; s < t.length;) { - const i = t.charCodeAt(s); - if (os(i) || ei(i)) s += 1; - else return this.addToNumericResult(t, a, s, 16), this.emitNumericEntity(i, 3) - } - return this.addToNumericResult(t, a, s, 16), -1 - } - stateNumericDecimal(t, s) { - const a = s; - for (; s < t.length;) { - const i = t.charCodeAt(s); - if (os(i)) s += 1; - else return this.addToNumericResult(t, a, s, 10), this.emitNumericEntity(i, 2) - } - return this.addToNumericResult(t, a, s, 10), -1 - } - emitNumericEntity(t, s) { - var a; - if (this.consumed <= s) return (a = this.errors) === null || a === void 0 || a.absenceOfDigitsInNumericCharacterReference(this.consumed), 0; - if (t === W.SEMI) this.consumed += 1; - else if (this.decodeMode === Pe.Strict) return 0; - return this.emitCodePoint(ku(this.result), this.consumed), this.errors && (t !== W.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed - } - stateNamedEntity(t, s) { - const { - decodeTree: a - } = this; - let i = a[this.treeIndex], - n = (i & re.VALUE_LENGTH) >> 14; - for (; s < t.length; s++, this.excess++) { - const o = t.charCodeAt(s); - if (this.treeIndex = Ns(a, i, this.treeIndex + Math.max(1, n), o), this.treeIndex < 0) return this.result === 0 || this.decodeMode === Pe.Attribute && (n === 0 || si(o)) ? 0 : this.emitNotTerminatedNamedEntity(); - if (i = a[this.treeIndex], n = (i & re.VALUE_LENGTH) >> 14, n !== 0) { - if (o === W.SEMI) return this.emitNamedEntityData(this.treeIndex, n, this.consumed + this.excess); - this.decodeMode !== Pe.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0) - } - } - return -1 - } - emitNotTerminatedNamedEntity() { - var t; - const { - result: s, - decodeTree: a - } = this, i = (a[s] & re.VALUE_LENGTH) >> 14; - return this.emitNamedEntityData(s, i, this.consumed), (t = this.errors) === null || t === void 0 || t.missingSemicolonAfterCharacterReference(), this.consumed - } - emitNamedEntityData(t, s, a) { - const { - decodeTree: i - } = this; - return this.emitCodePoint(s === 1 ? i[t] & ~re.VALUE_LENGTH : i[t + 1], a), s === 3 && this.emitCodePoint(i[t + 2], a), a - } - end() { - var t; - switch (this.state) { - case G.NamedEntity: - return this.result !== 0 && (this.decodeMode !== Pe.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0; - case G.NumericDecimal: - return this.emitNumericEntity(0, 2); - case G.NumericHex: - return this.emitNumericEntity(0, 3); - case G.NumericStart: - return (t = this.errors) === null || t === void 0 || t.absenceOfDigitsInNumericCharacterReference(this.consumed), 0; - case G.EntityStart: - return 0 - } - } -} - -function Fu(e) { - let t = ""; - const s = new ui(e, a => t += cs(a)); - return function (i, n) { - let o = 0, - d = 0; - for (; - (d = i.indexOf("&", d)) >= 0;) { - t += i.slice(o, d), s.startEntity(n); - const E = s.write(i, d + 1); - if (E < 0) { - o = d + s.end(); - break - } - o = d + E, d = E === 0 ? o + 1 : o - } - const T = t + i.slice(o); - return t = "", T - } -} - -function Ns(e, t, s, a) { - const i = (t & re.BRANCH_LENGTH) >> 7, - n = t & re.JUMP_TABLE; - if (i === 0) return n !== 0 && a === n ? s : -1; - if (n) { - const T = a - n; - return T < 0 || T >= i ? -1 : e[s + T] - 1 - } - let o = s, - d = o + i - 1; - for (; o <= d;) { - const T = o + d >>> 1, - E = e[T]; - if (E < a) o = T + 1; - else if (E > a) d = T - 1; - else return e[T + i] - } - return -1 -} -Fu(Ie); -Fu(yu); -const uu = /["&'<>$\x80-\uFFFF]/g, - ai = new Map([ - [34, """], - [38, "&"], - [39, "'"], - [60, "<"], - [62, ">"] - ]), - ii = String.prototype.codePointAt != null ? (e, t) => e.codePointAt(t) : (e, t) => (e.charCodeAt(t) & 64512) === 55296 ? (e.charCodeAt(t) - 55296) * 1024 + e.charCodeAt(t + 1) - 56320 + 65536 : e.charCodeAt(t); - -function Wo(e) { - let t = "", - s = 0, - a; - for (; - (a = uu.exec(e)) !== null;) { - const i = a.index, - n = e.charCodeAt(i), - o = ai.get(n); - o !== void 0 ? (t += e.substring(s, i) + o, s = i + 1) : (t += `${e.substring(s,i)}&#x${ii(e,i).toString(16)};`, s = uu.lastIndex += +((n & 64512) === 55296)) - } - return t + e.substr(s) -} - -function Hu(e, t) { - return function (a) { - let i, n = 0, - o = ""; - for (; i = e.exec(a);) n !== i.index && (o += a.substring(n, i.index)), o += t.get(i[0].charCodeAt(0)), n = i.index + 1; - return o + a.substring(n) - } -} -const ni = Hu(/["&\u00A0]/g, new Map([ - [34, """], - [38, "&"], - [160, " "] - ])), - ri = Hu(/[&<>\u00A0]/g, new Map([ - [38, "&"], - [60, "<"], - [62, ">"], - [160, " "] - ])), - ci = new Set([65534, 65535, 131070, 131071, 196606, 196607, 262142, 262143, 327678, 327679, 393214, 393215, 458750, 458751, 524286, 524287, 589822, 589823, 655358, 655359, 720894, 720895, 786430, 786431, 851966, 851967, 917502, 917503, 983038, 983039, 1048574, 1048575, 1114110, 1114111]), - H = "�"; -var r; -(function (e) { - e[e.EOF = -1] = "EOF", e[e.NULL = 0] = "NULL", e[e.TABULATION = 9] = "TABULATION", e[e.CARRIAGE_RETURN = 13] = "CARRIAGE_RETURN", e[e.LINE_FEED = 10] = "LINE_FEED", e[e.FORM_FEED = 12] = "FORM_FEED", e[e.SPACE = 32] = "SPACE", e[e.EXCLAMATION_MARK = 33] = "EXCLAMATION_MARK", e[e.QUOTATION_MARK = 34] = "QUOTATION_MARK", e[e.NUMBER_SIGN = 35] = "NUMBER_SIGN", e[e.AMPERSAND = 38] = "AMPERSAND", e[e.APOSTROPHE = 39] = "APOSTROPHE", e[e.HYPHEN_MINUS = 45] = "HYPHEN_MINUS", e[e.SOLIDUS = 47] = "SOLIDUS", e[e.DIGIT_0 = 48] = "DIGIT_0", e[e.DIGIT_9 = 57] = "DIGIT_9", e[e.SEMICOLON = 59] = "SEMICOLON", e[e.LESS_THAN_SIGN = 60] = "LESS_THAN_SIGN", e[e.EQUALS_SIGN = 61] = "EQUALS_SIGN", e[e.GREATER_THAN_SIGN = 62] = "GREATER_THAN_SIGN", e[e.QUESTION_MARK = 63] = "QUESTION_MARK", e[e.LATIN_CAPITAL_A = 65] = "LATIN_CAPITAL_A", e[e.LATIN_CAPITAL_F = 70] = "LATIN_CAPITAL_F", e[e.LATIN_CAPITAL_X = 88] = "LATIN_CAPITAL_X", e[e.LATIN_CAPITAL_Z = 90] = "LATIN_CAPITAL_Z", e[e.RIGHT_SQUARE_BRACKET = 93] = "RIGHT_SQUARE_BRACKET", e[e.GRAVE_ACCENT = 96] = "GRAVE_ACCENT", e[e.LATIN_SMALL_A = 97] = "LATIN_SMALL_A", e[e.LATIN_SMALL_F = 102] = "LATIN_SMALL_F", e[e.LATIN_SMALL_X = 120] = "LATIN_SMALL_X", e[e.LATIN_SMALL_Z = 122] = "LATIN_SMALL_Z", e[e.REPLACEMENT_CHARACTER = 65533] = "REPLACEMENT_CHARACTER" -})(r = r || (r = {})); -const Z = { - DASH_DASH: "--", - CDATA_START: "[CDATA[", - DOCTYPE: "doctype", - SCRIPT: "script", - PUBLIC: "public", - SYSTEM: "system" -}; - -function Uu(e) { - return e >= 55296 && e <= 57343 -} - -function oi(e) { - return e >= 56320 && e <= 57343 -} - -function li(e, t) { - return (e - 55296) * 1024 + 9216 + t -} - -function wu(e) { - return e !== 32 && e !== 10 && e !== 13 && e !== 9 && e !== 12 && e >= 1 && e <= 31 || e >= 127 && e <= 159 -} - -function vu(e) { - return e >= 64976 && e <= 65007 || ci.has(e) -} -var m; -(function (e) { - e.controlCharacterInInputStream = "control-character-in-input-stream", e.noncharacterInInputStream = "noncharacter-in-input-stream", e.surrogateInInputStream = "surrogate-in-input-stream", e.nonVoidHtmlElementStartTagWithTrailingSolidus = "non-void-html-element-start-tag-with-trailing-solidus", e.endTagWithAttributes = "end-tag-with-attributes", e.endTagWithTrailingSolidus = "end-tag-with-trailing-solidus", e.unexpectedSolidusInTag = "unexpected-solidus-in-tag", e.unexpectedNullCharacter = "unexpected-null-character", e.unexpectedQuestionMarkInsteadOfTagName = "unexpected-question-mark-instead-of-tag-name", e.invalidFirstCharacterOfTagName = "invalid-first-character-of-tag-name", e.unexpectedEqualsSignBeforeAttributeName = "unexpected-equals-sign-before-attribute-name", e.missingEndTagName = "missing-end-tag-name", e.unexpectedCharacterInAttributeName = "unexpected-character-in-attribute-name", e.unknownNamedCharacterReference = "unknown-named-character-reference", e.missingSemicolonAfterCharacterReference = "missing-semicolon-after-character-reference", e.unexpectedCharacterAfterDoctypeSystemIdentifier = "unexpected-character-after-doctype-system-identifier", e.unexpectedCharacterInUnquotedAttributeValue = "unexpected-character-in-unquoted-attribute-value", e.eofBeforeTagName = "eof-before-tag-name", e.eofInTag = "eof-in-tag", e.missingAttributeValue = "missing-attribute-value", e.missingWhitespaceBetweenAttributes = "missing-whitespace-between-attributes", e.missingWhitespaceAfterDoctypePublicKeyword = "missing-whitespace-after-doctype-public-keyword", e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers = "missing-whitespace-between-doctype-public-and-system-identifiers", e.missingWhitespaceAfterDoctypeSystemKeyword = "missing-whitespace-after-doctype-system-keyword", e.missingQuoteBeforeDoctypePublicIdentifier = "missing-quote-before-doctype-public-identifier", e.missingQuoteBeforeDoctypeSystemIdentifier = "missing-quote-before-doctype-system-identifier", e.missingDoctypePublicIdentifier = "missing-doctype-public-identifier", e.missingDoctypeSystemIdentifier = "missing-doctype-system-identifier", e.abruptDoctypePublicIdentifier = "abrupt-doctype-public-identifier", e.abruptDoctypeSystemIdentifier = "abrupt-doctype-system-identifier", e.cdataInHtmlContent = "cdata-in-html-content", e.incorrectlyOpenedComment = "incorrectly-opened-comment", e.eofInScriptHtmlCommentLikeText = "eof-in-script-html-comment-like-text", e.eofInDoctype = "eof-in-doctype", e.nestedComment = "nested-comment", e.abruptClosingOfEmptyComment = "abrupt-closing-of-empty-comment", e.eofInComment = "eof-in-comment", e.incorrectlyClosedComment = "incorrectly-closed-comment", e.eofInCdata = "eof-in-cdata", e.absenceOfDigitsInNumericCharacterReference = "absence-of-digits-in-numeric-character-reference", e.nullCharacterReference = "null-character-reference", e.surrogateCharacterReference = "surrogate-character-reference", e.characterReferenceOutsideUnicodeRange = "character-reference-outside-unicode-range", e.controlCharacterReference = "control-character-reference", e.noncharacterCharacterReference = "noncharacter-character-reference", e.missingWhitespaceBeforeDoctypeName = "missing-whitespace-before-doctype-name", e.missingDoctypeName = "missing-doctype-name", e.invalidCharacterSequenceAfterDoctypeName = "invalid-character-sequence-after-doctype-name", e.duplicateAttribute = "duplicate-attribute", e.nonConformingDoctype = "non-conforming-doctype", e.missingDoctype = "missing-doctype", e.misplacedDoctype = "misplaced-doctype", e.endTagWithoutMatchingOpenElement = "end-tag-without-matching-open-element", e.closingOfElementWithOpenChildElements = "closing-of-element-with-open-child-elements", e.disallowedContentInNoscriptInHead = "disallowed-content-in-noscript-in-head", e.openElementsLeftAfterEof = "open-elements-left-after-eof", e.abandonedHeadElementChild = "abandoned-head-element-child", e.misplacedStartTagForHeadElement = "misplaced-start-tag-for-head-element", e.nestedNoscriptInHead = "nested-noscript-in-head", e.eofInElementThatCanContainOnlyText = "eof-in-element-that-can-contain-only-text" -})(m = m || (m = {})); -const di = 65536; -class hi { - constructor(t) { - this.handler = t, this.html = "", this.pos = -1, this.lastGapPos = -2, this.gapStack = [], this.skipNextNewLine = !1, this.lastChunkWritten = !1, this.endOfChunkHit = !1, this.bufferWaterline = di, this.isEol = !1, this.lineStartPos = 0, this.droppedBufferSize = 0, this.line = 1, this.lastErrOffset = -1 - } - get col() { - return this.pos - this.lineStartPos + +(this.lastGapPos !== this.pos) - } - get offset() { - return this.droppedBufferSize + this.pos - } - getError(t) { - const { - line: s, - col: a, - offset: i - } = this; - return { - code: t, - startLine: s, - endLine: s, - startCol: a, - endCol: a, - startOffset: i, - endOffset: i - } - } - _err(t) { - this.handler.onParseError && this.lastErrOffset !== this.offset && (this.lastErrOffset = this.offset, this.handler.onParseError(this.getError(t))) - } - _addGap() { - this.gapStack.push(this.lastGapPos), this.lastGapPos = this.pos - } - _processSurrogate(t) { - if (this.pos !== this.html.length - 1) { - const s = this.html.charCodeAt(this.pos + 1); - if (oi(s)) return this.pos++, this._addGap(), li(t, s) - } else if (!this.lastChunkWritten) return this.endOfChunkHit = !0, r.EOF; - return this._err(m.surrogateInInputStream), t - } - willDropParsedChunk() { - return this.pos > this.bufferWaterline - } - dropParsedChunk() { - this.willDropParsedChunk() && (this.html = this.html.substring(this.pos), this.lineStartPos -= this.pos, this.droppedBufferSize += this.pos, this.pos = 0, this.lastGapPos = -2, this.gapStack.length = 0) - } - write(t, s) { - this.html.length > 0 ? this.html += t : this.html = t, this.endOfChunkHit = !1, this.lastChunkWritten = s - } - insertHtmlAtCurrentPos(t) { - this.html = this.html.substring(0, this.pos + 1) + t + this.html.substring(this.pos + 1), this.endOfChunkHit = !1 - } - startsWith(t, s) { - if (this.pos + t.length > this.html.length) return this.endOfChunkHit = !this.lastChunkWritten, !1; - if (s) return this.html.startsWith(t, this.pos); - for (let a = 0; a < t.length; a++) - if ((this.html.charCodeAt(this.pos + a) | 32) !== t.charCodeAt(a)) return !1; - return !0 - } - peek(t) { - const s = this.pos + t; - if (s >= this.html.length) return this.endOfChunkHit = !this.lastChunkWritten, r.EOF; - const a = this.html.charCodeAt(s); - return a === r.CARRIAGE_RETURN ? r.LINE_FEED : a - } - advance() { - if (this.pos++, this.isEol && (this.isEol = !1, this.line++, this.lineStartPos = this.pos), this.pos >= this.html.length) return this.endOfChunkHit = !this.lastChunkWritten, r.EOF; - let t = this.html.charCodeAt(this.pos); - return t === r.CARRIAGE_RETURN ? (this.isEol = !0, this.skipNextNewLine = !0, r.LINE_FEED) : t === r.LINE_FEED && (this.isEol = !0, this.skipNextNewLine) ? (this.line--, this.skipNextNewLine = !1, this._addGap(), this.advance()) : (this.skipNextNewLine = !1, Uu(t) && (t = this._processSurrogate(t)), this.handler.onParseError === null || t > 31 && t < 127 || t === r.LINE_FEED || t === r.CARRIAGE_RETURN || t > 159 && t < 64976 || this._checkForProblematicCharacters(t), t) - } - _checkForProblematicCharacters(t) { - wu(t) ? this._err(m.controlCharacterInInputStream) : vu(t) && this._err(m.noncharacterInInputStream) - } - retreat(t) { - for (this.pos -= t; this.pos < this.lastGapPos;) this.lastGapPos = this.gapStack.pop(), this.pos--; - this.isEol = !1 - } -} -var M; -(function (e) { - e[e.CHARACTER = 0] = "CHARACTER", e[e.NULL_CHARACTER = 1] = "NULL_CHARACTER", e[e.WHITESPACE_CHARACTER = 2] = "WHITESPACE_CHARACTER", e[e.START_TAG = 3] = "START_TAG", e[e.END_TAG = 4] = "END_TAG", e[e.COMMENT = 5] = "COMMENT", e[e.DOCTYPE = 6] = "DOCTYPE", e[e.EOF = 7] = "EOF", e[e.HIBERNATION = 8] = "HIBERNATION" -})(M = M || (M = {})); - -function Yu(e, t) { - for (let s = e.attrs.length - 1; s >= 0; s--) - if (e.attrs[s].name === t) return e.attrs[s].value; - return null -} -var _; -(function (e) { - e.HTML = "http://www.w3.org/1999/xhtml", e.MATHML = "http://www.w3.org/1998/Math/MathML", e.SVG = "http://www.w3.org/2000/svg", e.XLINK = "http://www.w3.org/1999/xlink", e.XML = "http://www.w3.org/XML/1998/namespace", e.XMLNS = "http://www.w3.org/2000/xmlns/" -})(_ = _ || (_ = {})); -var Se; -(function (e) { - e.TYPE = "type", e.ACTION = "action", e.ENCODING = "encoding", e.PROMPT = "prompt", e.NAME = "name", e.COLOR = "color", e.FACE = "face", e.SIZE = "size" -})(Se = Se || (Se = {})); -var te; -(function (e) { - e.NO_QUIRKS = "no-quirks", e.QUIRKS = "quirks", e.LIMITED_QUIRKS = "limited-quirks" -})(te = te || (te = {})); -var f; -(function (e) { - e.A = "a", e.ADDRESS = "address", e.ANNOTATION_XML = "annotation-xml", e.APPLET = "applet", e.AREA = "area", e.ARTICLE = "article", e.ASIDE = "aside", e.B = "b", e.BASE = "base", e.BASEFONT = "basefont", e.BGSOUND = "bgsound", e.BIG = "big", e.BLOCKQUOTE = "blockquote", e.BODY = "body", e.BR = "br", e.BUTTON = "button", e.CAPTION = "caption", e.CENTER = "center", e.CODE = "code", e.COL = "col", e.COLGROUP = "colgroup", e.DD = "dd", e.DESC = "desc", e.DETAILS = "details", e.DIALOG = "dialog", e.DIR = "dir", e.DIV = "div", e.DL = "dl", e.DT = "dt", e.EM = "em", e.EMBED = "embed", e.FIELDSET = "fieldset", e.FIGCAPTION = "figcaption", e.FIGURE = "figure", e.FONT = "font", e.FOOTER = "footer", e.FOREIGN_OBJECT = "foreignObject", e.FORM = "form", e.FRAME = "frame", e.FRAMESET = "frameset", e.H1 = "h1", e.H2 = "h2", e.H3 = "h3", e.H4 = "h4", e.H5 = "h5", e.H6 = "h6", e.HEAD = "head", e.HEADER = "header", e.HGROUP = "hgroup", e.HR = "hr", e.HTML = "html", e.I = "i", e.IMG = "img", e.IMAGE = "image", e.INPUT = "input", e.IFRAME = "iframe", e.KEYGEN = "keygen", e.LABEL = "label", e.LI = "li", e.LINK = "link", e.LISTING = "listing", e.MAIN = "main", e.MALIGNMARK = "malignmark", e.MARQUEE = "marquee", e.MATH = "math", e.MENU = "menu", e.META = "meta", e.MGLYPH = "mglyph", e.MI = "mi", e.MO = "mo", e.MN = "mn", e.MS = "ms", e.MTEXT = "mtext", e.NAV = "nav", e.NOBR = "nobr", e.NOFRAMES = "noframes", e.NOEMBED = "noembed", e.NOSCRIPT = "noscript", e.OBJECT = "object", e.OL = "ol", e.OPTGROUP = "optgroup", e.OPTION = "option", e.P = "p", e.PARAM = "param", e.PLAINTEXT = "plaintext", e.PRE = "pre", e.RB = "rb", e.RP = "rp", e.RT = "rt", e.RTC = "rtc", e.RUBY = "ruby", e.S = "s", e.SCRIPT = "script", e.SECTION = "section", e.SELECT = "select", e.SOURCE = "source", e.SMALL = "small", e.SPAN = "span", e.STRIKE = "strike", e.STRONG = "strong", e.STYLE = "style", e.SUB = "sub", e.SUMMARY = "summary", e.SUP = "sup", e.TABLE = "table", e.TBODY = "tbody", e.TEMPLATE = "template", e.TEXTAREA = "textarea", e.TFOOT = "tfoot", e.TD = "td", e.TH = "th", e.THEAD = "thead", e.TITLE = "title", e.TR = "tr", e.TRACK = "track", e.TT = "tt", e.U = "u", e.UL = "ul", e.SVG = "svg", e.VAR = "var", e.WBR = "wbr", e.XMP = "xmp" -})(f = f || (f = {})); -var u; -(function (e) { - e[e.UNKNOWN = 0] = "UNKNOWN", e[e.A = 1] = "A", e[e.ADDRESS = 2] = "ADDRESS", e[e.ANNOTATION_XML = 3] = "ANNOTATION_XML", e[e.APPLET = 4] = "APPLET", e[e.AREA = 5] = "AREA", e[e.ARTICLE = 6] = "ARTICLE", e[e.ASIDE = 7] = "ASIDE", e[e.B = 8] = "B", e[e.BASE = 9] = "BASE", e[e.BASEFONT = 10] = "BASEFONT", e[e.BGSOUND = 11] = "BGSOUND", e[e.BIG = 12] = "BIG", e[e.BLOCKQUOTE = 13] = "BLOCKQUOTE", e[e.BODY = 14] = "BODY", e[e.BR = 15] = "BR", e[e.BUTTON = 16] = "BUTTON", e[e.CAPTION = 17] = "CAPTION", e[e.CENTER = 18] = "CENTER", e[e.CODE = 19] = "CODE", e[e.COL = 20] = "COL", e[e.COLGROUP = 21] = "COLGROUP", e[e.DD = 22] = "DD", e[e.DESC = 23] = "DESC", e[e.DETAILS = 24] = "DETAILS", e[e.DIALOG = 25] = "DIALOG", e[e.DIR = 26] = "DIR", e[e.DIV = 27] = "DIV", e[e.DL = 28] = "DL", e[e.DT = 29] = "DT", e[e.EM = 30] = "EM", e[e.EMBED = 31] = "EMBED", e[e.FIELDSET = 32] = "FIELDSET", e[e.FIGCAPTION = 33] = "FIGCAPTION", e[e.FIGURE = 34] = "FIGURE", e[e.FONT = 35] = "FONT", e[e.FOOTER = 36] = "FOOTER", e[e.FOREIGN_OBJECT = 37] = "FOREIGN_OBJECT", e[e.FORM = 38] = "FORM", e[e.FRAME = 39] = "FRAME", e[e.FRAMESET = 40] = "FRAMESET", e[e.H1 = 41] = "H1", e[e.H2 = 42] = "H2", e[e.H3 = 43] = "H3", e[e.H4 = 44] = "H4", e[e.H5 = 45] = "H5", e[e.H6 = 46] = "H6", e[e.HEAD = 47] = "HEAD", e[e.HEADER = 48] = "HEADER", e[e.HGROUP = 49] = "HGROUP", e[e.HR = 50] = "HR", e[e.HTML = 51] = "HTML", e[e.I = 52] = "I", e[e.IMG = 53] = "IMG", e[e.IMAGE = 54] = "IMAGE", e[e.INPUT = 55] = "INPUT", e[e.IFRAME = 56] = "IFRAME", e[e.KEYGEN = 57] = "KEYGEN", e[e.LABEL = 58] = "LABEL", e[e.LI = 59] = "LI", e[e.LINK = 60] = "LINK", e[e.LISTING = 61] = "LISTING", e[e.MAIN = 62] = "MAIN", e[e.MALIGNMARK = 63] = "MALIGNMARK", e[e.MARQUEE = 64] = "MARQUEE", e[e.MATH = 65] = "MATH", e[e.MENU = 66] = "MENU", e[e.META = 67] = "META", e[e.MGLYPH = 68] = "MGLYPH", e[e.MI = 69] = "MI", e[e.MO = 70] = "MO", e[e.MN = 71] = "MN", e[e.MS = 72] = "MS", e[e.MTEXT = 73] = "MTEXT", e[e.NAV = 74] = "NAV", e[e.NOBR = 75] = "NOBR", e[e.NOFRAMES = 76] = "NOFRAMES", e[e.NOEMBED = 77] = "NOEMBED", e[e.NOSCRIPT = 78] = "NOSCRIPT", e[e.OBJECT = 79] = "OBJECT", e[e.OL = 80] = "OL", e[e.OPTGROUP = 81] = "OPTGROUP", e[e.OPTION = 82] = "OPTION", e[e.P = 83] = "P", e[e.PARAM = 84] = "PARAM", e[e.PLAINTEXT = 85] = "PLAINTEXT", e[e.PRE = 86] = "PRE", e[e.RB = 87] = "RB", e[e.RP = 88] = "RP", e[e.RT = 89] = "RT", e[e.RTC = 90] = "RTC", e[e.RUBY = 91] = "RUBY", e[e.S = 92] = "S", e[e.SCRIPT = 93] = "SCRIPT", e[e.SECTION = 94] = "SECTION", e[e.SELECT = 95] = "SELECT", e[e.SOURCE = 96] = "SOURCE", e[e.SMALL = 97] = "SMALL", e[e.SPAN = 98] = "SPAN", e[e.STRIKE = 99] = "STRIKE", e[e.STRONG = 100] = "STRONG", e[e.STYLE = 101] = "STYLE", e[e.SUB = 102] = "SUB", e[e.SUMMARY = 103] = "SUMMARY", e[e.SUP = 104] = "SUP", e[e.TABLE = 105] = "TABLE", e[e.TBODY = 106] = "TBODY", e[e.TEMPLATE = 107] = "TEMPLATE", e[e.TEXTAREA = 108] = "TEXTAREA", e[e.TFOOT = 109] = "TFOOT", e[e.TD = 110] = "TD", e[e.TH = 111] = "TH", e[e.THEAD = 112] = "THEAD", e[e.TITLE = 113] = "TITLE", e[e.TR = 114] = "TR", e[e.TRACK = 115] = "TRACK", e[e.TT = 116] = "TT", e[e.U = 117] = "U", e[e.UL = 118] = "UL", e[e.SVG = 119] = "SVG", e[e.VAR = 120] = "VAR", e[e.WBR = 121] = "WBR", e[e.XMP = 122] = "XMP" -})(u = u || (u = {})); -const fi = new Map([ - [f.A, u.A], - [f.ADDRESS, u.ADDRESS], - [f.ANNOTATION_XML, u.ANNOTATION_XML], - [f.APPLET, u.APPLET], - [f.AREA, u.AREA], - [f.ARTICLE, u.ARTICLE], - [f.ASIDE, u.ASIDE], - [f.B, u.B], - [f.BASE, u.BASE], - [f.BASEFONT, u.BASEFONT], - [f.BGSOUND, u.BGSOUND], - [f.BIG, u.BIG], - [f.BLOCKQUOTE, u.BLOCKQUOTE], - [f.BODY, u.BODY], - [f.BR, u.BR], - [f.BUTTON, u.BUTTON], - [f.CAPTION, u.CAPTION], - [f.CENTER, u.CENTER], - [f.CODE, u.CODE], - [f.COL, u.COL], - [f.COLGROUP, u.COLGROUP], - [f.DD, u.DD], - [f.DESC, u.DESC], - [f.DETAILS, u.DETAILS], - [f.DIALOG, u.DIALOG], - [f.DIR, u.DIR], - [f.DIV, u.DIV], - [f.DL, u.DL], - [f.DT, u.DT], - [f.EM, u.EM], - [f.EMBED, u.EMBED], - [f.FIELDSET, u.FIELDSET], - [f.FIGCAPTION, u.FIGCAPTION], - [f.FIGURE, u.FIGURE], - [f.FONT, u.FONT], - [f.FOOTER, u.FOOTER], - [f.FOREIGN_OBJECT, u.FOREIGN_OBJECT], - [f.FORM, u.FORM], - [f.FRAME, u.FRAME], - [f.FRAMESET, u.FRAMESET], - [f.H1, u.H1], - [f.H2, u.H2], - [f.H3, u.H3], - [f.H4, u.H4], - [f.H5, u.H5], - [f.H6, u.H6], - [f.HEAD, u.HEAD], - [f.HEADER, u.HEADER], - [f.HGROUP, u.HGROUP], - [f.HR, u.HR], - [f.HTML, u.HTML], - [f.I, u.I], - [f.IMG, u.IMG], - [f.IMAGE, u.IMAGE], - [f.INPUT, u.INPUT], - [f.IFRAME, u.IFRAME], - [f.KEYGEN, u.KEYGEN], - [f.LABEL, u.LABEL], - [f.LI, u.LI], - [f.LINK, u.LINK], - [f.LISTING, u.LISTING], - [f.MAIN, u.MAIN], - [f.MALIGNMARK, u.MALIGNMARK], - [f.MARQUEE, u.MARQUEE], - [f.MATH, u.MATH], - [f.MENU, u.MENU], - [f.META, u.META], - [f.MGLYPH, u.MGLYPH], - [f.MI, u.MI], - [f.MO, u.MO], - [f.MN, u.MN], - [f.MS, u.MS], - [f.MTEXT, u.MTEXT], - [f.NAV, u.NAV], - [f.NOBR, u.NOBR], - [f.NOFRAMES, u.NOFRAMES], - [f.NOEMBED, u.NOEMBED], - [f.NOSCRIPT, u.NOSCRIPT], - [f.OBJECT, u.OBJECT], - [f.OL, u.OL], - [f.OPTGROUP, u.OPTGROUP], - [f.OPTION, u.OPTION], - [f.P, u.P], - [f.PARAM, u.PARAM], - [f.PLAINTEXT, u.PLAINTEXT], - [f.PRE, u.PRE], - [f.RB, u.RB], - [f.RP, u.RP], - [f.RT, u.RT], - [f.RTC, u.RTC], - [f.RUBY, u.RUBY], - [f.S, u.S], - [f.SCRIPT, u.SCRIPT], - [f.SECTION, u.SECTION], - [f.SELECT, u.SELECT], - [f.SOURCE, u.SOURCE], - [f.SMALL, u.SMALL], - [f.SPAN, u.SPAN], - [f.STRIKE, u.STRIKE], - [f.STRONG, u.STRONG], - [f.STYLE, u.STYLE], - [f.SUB, u.SUB], - [f.SUMMARY, u.SUMMARY], - [f.SUP, u.SUP], - [f.TABLE, u.TABLE], - [f.TBODY, u.TBODY], - [f.TEMPLATE, u.TEMPLATE], - [f.TEXTAREA, u.TEXTAREA], - [f.TFOOT, u.TFOOT], - [f.TD, u.TD], - [f.TH, u.TH], - [f.THEAD, u.THEAD], - [f.TITLE, u.TITLE], - [f.TR, u.TR], - [f.TRACK, u.TRACK], - [f.TT, u.TT], - [f.U, u.U], - [f.UL, u.UL], - [f.SVG, u.SVG], - [f.VAR, u.VAR], - [f.WBR, u.WBR], - [f.XMP, u.XMP] -]); - -function Ft(e) { - var t; - return (t = fi.get(e)) !== null && t !== void 0 ? t : u.UNKNOWN -} -const p = u, - Ei = { - [_.HTML]: new Set([p.ADDRESS, p.APPLET, p.AREA, p.ARTICLE, p.ASIDE, p.BASE, p.BASEFONT, p.BGSOUND, p.BLOCKQUOTE, p.BODY, p.BR, p.BUTTON, p.CAPTION, p.CENTER, p.COL, p.COLGROUP, p.DD, p.DETAILS, p.DIR, p.DIV, p.DL, p.DT, p.EMBED, p.FIELDSET, p.FIGCAPTION, p.FIGURE, p.FOOTER, p.FORM, p.FRAME, p.FRAMESET, p.H1, p.H2, p.H3, p.H4, p.H5, p.H6, p.HEAD, p.HEADER, p.HGROUP, p.HR, p.HTML, p.IFRAME, p.IMG, p.INPUT, p.LI, p.LINK, p.LISTING, p.MAIN, p.MARQUEE, p.MENU, p.META, p.NAV, p.NOEMBED, p.NOFRAMES, p.NOSCRIPT, p.OBJECT, p.OL, p.P, p.PARAM, p.PLAINTEXT, p.PRE, p.SCRIPT, p.SECTION, p.SELECT, p.SOURCE, p.STYLE, p.SUMMARY, p.TABLE, p.TBODY, p.TD, p.TEMPLATE, p.TEXTAREA, p.TFOOT, p.TH, p.THEAD, p.TITLE, p.TR, p.TRACK, p.UL, p.WBR, p.XMP]), - [_.MATHML]: new Set([p.MI, p.MO, p.MN, p.MS, p.MTEXT, p.ANNOTATION_XML]), - [_.SVG]: new Set([p.TITLE, p.FOREIGN_OBJECT, p.DESC]), - [_.XLINK]: new Set, - [_.XML]: new Set, - [_.XMLNS]: new Set - }; - -function $u(e) { - return e === p.H1 || e === p.H2 || e === p.H3 || e === p.H4 || e === p.H5 || e === p.H6 -} -const Ti = new Set([f.STYLE, f.SCRIPT, f.XMP, f.IFRAME, f.NOEMBED, f.NOFRAMES, f.PLAINTEXT]); - -function mi(e, t) { - return Ti.has(e) || t && e === f.NOSCRIPT -} -const _i = new Map([ - [128, 8364], - [130, 8218], - [131, 402], - [132, 8222], - [133, 8230], - [134, 8224], - [135, 8225], - [136, 710], - [137, 8240], - [138, 352], - [139, 8249], - [140, 338], - [142, 381], - [145, 8216], - [146, 8217], - [147, 8220], - [148, 8221], - [149, 8226], - [150, 8211], - [151, 8212], - [152, 732], - [153, 8482], - [154, 353], - [155, 8250], - [156, 339], - [158, 382], - [159, 376] -]); -var c; -(function (e) { - e[e.DATA = 0] = "DATA", e[e.RCDATA = 1] = "RCDATA", e[e.RAWTEXT = 2] = "RAWTEXT", e[e.SCRIPT_DATA = 3] = "SCRIPT_DATA", e[e.PLAINTEXT = 4] = "PLAINTEXT", e[e.TAG_OPEN = 5] = "TAG_OPEN", e[e.END_TAG_OPEN = 6] = "END_TAG_OPEN", e[e.TAG_NAME = 7] = "TAG_NAME", e[e.RCDATA_LESS_THAN_SIGN = 8] = "RCDATA_LESS_THAN_SIGN", e[e.RCDATA_END_TAG_OPEN = 9] = "RCDATA_END_TAG_OPEN", e[e.RCDATA_END_TAG_NAME = 10] = "RCDATA_END_TAG_NAME", e[e.RAWTEXT_LESS_THAN_SIGN = 11] = "RAWTEXT_LESS_THAN_SIGN", e[e.RAWTEXT_END_TAG_OPEN = 12] = "RAWTEXT_END_TAG_OPEN", e[e.RAWTEXT_END_TAG_NAME = 13] = "RAWTEXT_END_TAG_NAME", e[e.SCRIPT_DATA_LESS_THAN_SIGN = 14] = "SCRIPT_DATA_LESS_THAN_SIGN", e[e.SCRIPT_DATA_END_TAG_OPEN = 15] = "SCRIPT_DATA_END_TAG_OPEN", e[e.SCRIPT_DATA_END_TAG_NAME = 16] = "SCRIPT_DATA_END_TAG_NAME", e[e.SCRIPT_DATA_ESCAPE_START = 17] = "SCRIPT_DATA_ESCAPE_START", e[e.SCRIPT_DATA_ESCAPE_START_DASH = 18] = "SCRIPT_DATA_ESCAPE_START_DASH", e[e.SCRIPT_DATA_ESCAPED = 19] = "SCRIPT_DATA_ESCAPED", e[e.SCRIPT_DATA_ESCAPED_DASH = 20] = "SCRIPT_DATA_ESCAPED_DASH", e[e.SCRIPT_DATA_ESCAPED_DASH_DASH = 21] = "SCRIPT_DATA_ESCAPED_DASH_DASH", e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN = 22] = "SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN", e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN = 23] = "SCRIPT_DATA_ESCAPED_END_TAG_OPEN", e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME = 24] = "SCRIPT_DATA_ESCAPED_END_TAG_NAME", e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START = 25] = "SCRIPT_DATA_DOUBLE_ESCAPE_START", e[e.SCRIPT_DATA_DOUBLE_ESCAPED = 26] = "SCRIPT_DATA_DOUBLE_ESCAPED", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH = 27] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH = 28] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN = 29] = "SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN", e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END = 30] = "SCRIPT_DATA_DOUBLE_ESCAPE_END", e[e.BEFORE_ATTRIBUTE_NAME = 31] = "BEFORE_ATTRIBUTE_NAME", e[e.ATTRIBUTE_NAME = 32] = "ATTRIBUTE_NAME", e[e.AFTER_ATTRIBUTE_NAME = 33] = "AFTER_ATTRIBUTE_NAME", e[e.BEFORE_ATTRIBUTE_VALUE = 34] = "BEFORE_ATTRIBUTE_VALUE", e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED = 35] = "ATTRIBUTE_VALUE_DOUBLE_QUOTED", e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED = 36] = "ATTRIBUTE_VALUE_SINGLE_QUOTED", e[e.ATTRIBUTE_VALUE_UNQUOTED = 37] = "ATTRIBUTE_VALUE_UNQUOTED", e[e.AFTER_ATTRIBUTE_VALUE_QUOTED = 38] = "AFTER_ATTRIBUTE_VALUE_QUOTED", e[e.SELF_CLOSING_START_TAG = 39] = "SELF_CLOSING_START_TAG", e[e.BOGUS_COMMENT = 40] = "BOGUS_COMMENT", e[e.MARKUP_DECLARATION_OPEN = 41] = "MARKUP_DECLARATION_OPEN", e[e.COMMENT_START = 42] = "COMMENT_START", e[e.COMMENT_START_DASH = 43] = "COMMENT_START_DASH", e[e.COMMENT = 44] = "COMMENT", e[e.COMMENT_LESS_THAN_SIGN = 45] = "COMMENT_LESS_THAN_SIGN", e[e.COMMENT_LESS_THAN_SIGN_BANG = 46] = "COMMENT_LESS_THAN_SIGN_BANG", e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH = 47] = "COMMENT_LESS_THAN_SIGN_BANG_DASH", e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH = 48] = "COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH", e[e.COMMENT_END_DASH = 49] = "COMMENT_END_DASH", e[e.COMMENT_END = 50] = "COMMENT_END", e[e.COMMENT_END_BANG = 51] = "COMMENT_END_BANG", e[e.DOCTYPE = 52] = "DOCTYPE", e[e.BEFORE_DOCTYPE_NAME = 53] = "BEFORE_DOCTYPE_NAME", e[e.DOCTYPE_NAME = 54] = "DOCTYPE_NAME", e[e.AFTER_DOCTYPE_NAME = 55] = "AFTER_DOCTYPE_NAME", e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD = 56] = "AFTER_DOCTYPE_PUBLIC_KEYWORD", e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER = 57] = "BEFORE_DOCTYPE_PUBLIC_IDENTIFIER", e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED = 58] = "DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED", e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED = 59] = "DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED", e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER = 60] = "AFTER_DOCTYPE_PUBLIC_IDENTIFIER", e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS = 61] = "BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS", e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD = 62] = "AFTER_DOCTYPE_SYSTEM_KEYWORD", e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER = 63] = "BEFORE_DOCTYPE_SYSTEM_IDENTIFIER", e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED = 64] = "DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED", e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED = 65] = "DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED", e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER = 66] = "AFTER_DOCTYPE_SYSTEM_IDENTIFIER", e[e.BOGUS_DOCTYPE = 67] = "BOGUS_DOCTYPE", e[e.CDATA_SECTION = 68] = "CDATA_SECTION", e[e.CDATA_SECTION_BRACKET = 69] = "CDATA_SECTION_BRACKET", e[e.CDATA_SECTION_END = 70] = "CDATA_SECTION_END", e[e.CHARACTER_REFERENCE = 71] = "CHARACTER_REFERENCE", e[e.NAMED_CHARACTER_REFERENCE = 72] = "NAMED_CHARACTER_REFERENCE", e[e.AMBIGUOUS_AMPERSAND = 73] = "AMBIGUOUS_AMPERSAND", e[e.NUMERIC_CHARACTER_REFERENCE = 74] = "NUMERIC_CHARACTER_REFERENCE", e[e.HEXADEMICAL_CHARACTER_REFERENCE_START = 75] = "HEXADEMICAL_CHARACTER_REFERENCE_START", e[e.HEXADEMICAL_CHARACTER_REFERENCE = 76] = "HEXADEMICAL_CHARACTER_REFERENCE", e[e.DECIMAL_CHARACTER_REFERENCE = 77] = "DECIMAL_CHARACTER_REFERENCE", e[e.NUMERIC_CHARACTER_REFERENCE_END = 78] = "NUMERIC_CHARACTER_REFERENCE_END" -})(c || (c = {})); -const se = { - DATA: c.DATA, - RCDATA: c.RCDATA, - RAWTEXT: c.RAWTEXT, - SCRIPT_DATA: c.SCRIPT_DATA, - PLAINTEXT: c.PLAINTEXT, - CDATA_SECTION: c.CDATA_SECTION -}; - -function it(e) { - return e >= r.DIGIT_0 && e <= r.DIGIT_9 -} - -function at(e) { - return e >= r.LATIN_CAPITAL_A && e <= r.LATIN_CAPITAL_Z -} - -function bi(e) { - return e >= r.LATIN_SMALL_A && e <= r.LATIN_SMALL_Z -} - -function Ce(e) { - return bi(e) || at(e) -} - -function ls(e) { - return Ce(e) || it(e) -} - -function qu(e) { - return e >= r.LATIN_CAPITAL_A && e <= r.LATIN_CAPITAL_F -} - -function Gu(e) { - return e >= r.LATIN_SMALL_A && e <= r.LATIN_SMALL_F -} - -function Ai(e) { - return it(e) || qu(e) || Gu(e) -} - -function Ct(e) { - return e + 32 -} - -function Wu(e) { - return e === r.SPACE || e === r.LINE_FEED || e === r.TABULATION || e === r.FORM_FEED -} - -function pi(e) { - return e === r.EQUALS_SIGN || ls(e) -} - -function au(e) { - return Wu(e) || e === r.SOLIDUS || e === r.GREATER_THAN_SIGN -} -let Ii = class { - constructor(t, s) { - this.options = t, this.handler = s, this.paused = !1, this.inLoop = !1, this.inForeignNode = !1, this.lastStartTagName = "", this.active = !1, this.state = c.DATA, this.returnState = c.DATA, this.charRefCode = -1, this.consumedAfterSnapshot = -1, this.currentCharacterToken = null, this.currentToken = null, this.currentAttr = { - name: "", - value: "" - }, this.preprocessor = new hi(s), this.currentLocation = this.getCurrentLocation(-1) - } - _err(t) { - var s, a; - (a = (s = this.handler).onParseError) === null || a === void 0 || a.call(s, this.preprocessor.getError(t)) - } - getCurrentLocation(t) { - return this.options.sourceCodeLocationInfo ? { - startLine: this.preprocessor.line, - startCol: this.preprocessor.col - t, - startOffset: this.preprocessor.offset - t, - endLine: -1, - endCol: -1, - endOffset: -1 - } : null - } - _runParsingLoop() { - if (!this.inLoop) { - for (this.inLoop = !0; this.active && !this.paused;) { - this.consumedAfterSnapshot = 0; - const t = this._consume(); - this._ensureHibernation() || this._callState(t) - } - this.inLoop = !1 - } - } - pause() { - this.paused = !0 - } - resume(t) { - if (!this.paused) throw new Error("Parser was already resumed"); - this.paused = !1, !this.inLoop && (this._runParsingLoop(), this.paused || t == null || t()) - } - write(t, s, a) { - this.active = !0, this.preprocessor.write(t, s), this._runParsingLoop(), this.paused || a == null || a() - } - insertHtmlAtCurrentPos(t) { - this.active = !0, this.preprocessor.insertHtmlAtCurrentPos(t), this._runParsingLoop() - } - _ensureHibernation() { - return this.preprocessor.endOfChunkHit ? (this._unconsume(this.consumedAfterSnapshot), this.active = !1, !0) : !1 - } - _consume() { - return this.consumedAfterSnapshot++, this.preprocessor.advance() - } - _unconsume(t) { - this.consumedAfterSnapshot -= t, this.preprocessor.retreat(t) - } - _reconsumeInState(t, s) { - this.state = t, this._callState(s) - } - _advanceBy(t) { - this.consumedAfterSnapshot += t; - for (let s = 0; s < t; s++) this.preprocessor.advance() - } - _consumeSequenceIfMatch(t, s) { - return this.preprocessor.startsWith(t, s) ? (this._advanceBy(t.length - 1), !0) : !1 - } - _createStartTagToken() { - this.currentToken = { - type: M.START_TAG, - tagName: "", - tagID: u.UNKNOWN, - selfClosing: !1, - ackSelfClosing: !1, - attrs: [], - location: this.getCurrentLocation(1) - } - } - _createEndTagToken() { - this.currentToken = { - type: M.END_TAG, - tagName: "", - tagID: u.UNKNOWN, - selfClosing: !1, - ackSelfClosing: !1, - attrs: [], - location: this.getCurrentLocation(2) - } - } - _createCommentToken(t) { - this.currentToken = { - type: M.COMMENT, - data: "", - location: this.getCurrentLocation(t) - } - } - _createDoctypeToken(t) { - this.currentToken = { - type: M.DOCTYPE, - name: t, - forceQuirks: !1, - publicId: null, - systemId: null, - location: this.currentLocation - } - } - _createCharacterToken(t, s) { - this.currentCharacterToken = { - type: t, - chars: s, - location: this.currentLocation - } - } - _createAttr(t) { - this.currentAttr = { - name: t, - value: "" - }, this.currentLocation = this.getCurrentLocation(0) - } - _leaveAttrName() { - var t, s; - const a = this.currentToken; - if (Yu(a, this.currentAttr.name) === null) { - if (a.attrs.push(this.currentAttr), a.location && this.currentLocation) { - const i = (t = (s = a.location).attrs) !== null && t !== void 0 ? t : s.attrs = Object.create(null); - i[this.currentAttr.name] = this.currentLocation, this._leaveAttrValue() - } - } else this._err(m.duplicateAttribute) - } - _leaveAttrValue() { - this.currentLocation && (this.currentLocation.endLine = this.preprocessor.line, this.currentLocation.endCol = this.preprocessor.col, this.currentLocation.endOffset = this.preprocessor.offset) - } - prepareToken(t) { - this._emitCurrentCharacterToken(t.location), this.currentToken = null, t.location && (t.location.endLine = this.preprocessor.line, t.location.endCol = this.preprocessor.col + 1, t.location.endOffset = this.preprocessor.offset + 1), this.currentLocation = this.getCurrentLocation(-1) - } - emitCurrentTagToken() { - const t = this.currentToken; - this.prepareToken(t), t.tagID = Ft(t.tagName), t.type === M.START_TAG ? (this.lastStartTagName = t.tagName, this.handler.onStartTag(t)) : (t.attrs.length > 0 && this._err(m.endTagWithAttributes), t.selfClosing && this._err(m.endTagWithTrailingSolidus), this.handler.onEndTag(t)), this.preprocessor.dropParsedChunk() - } - emitCurrentComment(t) { - this.prepareToken(t), this.handler.onComment(t), this.preprocessor.dropParsedChunk() - } - emitCurrentDoctype(t) { - this.prepareToken(t), this.handler.onDoctype(t), this.preprocessor.dropParsedChunk() - } - _emitCurrentCharacterToken(t) { - if (this.currentCharacterToken) { - switch (t && this.currentCharacterToken.location && (this.currentCharacterToken.location.endLine = t.startLine, this.currentCharacterToken.location.endCol = t.startCol, this.currentCharacterToken.location.endOffset = t.startOffset), this.currentCharacterToken.type) { - case M.CHARACTER: { - this.handler.onCharacter(this.currentCharacterToken); - break - } - case M.NULL_CHARACTER: { - this.handler.onNullCharacter(this.currentCharacterToken); - break - } - case M.WHITESPACE_CHARACTER: { - this.handler.onWhitespaceCharacter(this.currentCharacterToken); - break - } - } - this.currentCharacterToken = null - } - } - _emitEOFToken() { - const t = this.getCurrentLocation(0); - t && (t.endLine = t.startLine, t.endCol = t.startCol, t.endOffset = t.startOffset), this._emitCurrentCharacterToken(t), this.handler.onEof({ - type: M.EOF, - location: t - }), this.active = !1 - } - _appendCharToCurrentCharacterToken(t, s) { - if (this.currentCharacterToken) - if (this.currentCharacterToken.type !== t) this.currentLocation = this.getCurrentLocation(0), this._emitCurrentCharacterToken(this.currentLocation), this.preprocessor.dropParsedChunk(); - else { - this.currentCharacterToken.chars += s; - return - } this._createCharacterToken(t, s) - } - _emitCodePoint(t) { - const s = Wu(t) ? M.WHITESPACE_CHARACTER : t === r.NULL ? M.NULL_CHARACTER : M.CHARACTER; - this._appendCharToCurrentCharacterToken(s, String.fromCodePoint(t)) - } - _emitChars(t) { - this._appendCharToCurrentCharacterToken(M.CHARACTER, t) - } - _matchNamedCharacterReference(t) { - let s = null, - a = 0, - i = !1; - for (let n = 0, o = Ie[0]; n >= 0 && (n = Ns(Ie, o, n + 1, t), !(n < 0)); t = this._consume()) { - a += 1, o = Ie[n]; - const d = o & re.VALUE_LENGTH; - if (d) { - const T = (d >> 14) - 1; - if (t !== r.SEMICOLON && this._isCharacterReferenceInAttribute() && pi(this.preprocessor.peek(1)) ? (s = [r.AMPERSAND], n += T) : (s = T === 0 ? [Ie[n] & ~re.VALUE_LENGTH] : T === 1 ? [Ie[++n]] : [Ie[++n], Ie[++n]], a = 0, i = t !== r.SEMICOLON), T === 0) { - this._consume(); - break - } - } - } - return this._unconsume(a), i && !this.preprocessor.endOfChunkHit && this._err(m.missingSemicolonAfterCharacterReference), this._unconsume(1), s - } - _isCharacterReferenceInAttribute() { - return this.returnState === c.ATTRIBUTE_VALUE_DOUBLE_QUOTED || this.returnState === c.ATTRIBUTE_VALUE_SINGLE_QUOTED || this.returnState === c.ATTRIBUTE_VALUE_UNQUOTED - } - _flushCodePointConsumedAsCharacterReference(t) { - this._isCharacterReferenceInAttribute() ? this.currentAttr.value += String.fromCodePoint(t) : this._emitCodePoint(t) - } - _callState(t) { - switch (this.state) { - case c.DATA: { - this._stateData(t); - break - } - case c.RCDATA: { - this._stateRcdata(t); - break - } - case c.RAWTEXT: { - this._stateRawtext(t); - break - } - case c.SCRIPT_DATA: { - this._stateScriptData(t); - break - } - case c.PLAINTEXT: { - this._statePlaintext(t); - break - } - case c.TAG_OPEN: { - this._stateTagOpen(t); - break - } - case c.END_TAG_OPEN: { - this._stateEndTagOpen(t); - break - } - case c.TAG_NAME: { - this._stateTagName(t); - break - } - case c.RCDATA_LESS_THAN_SIGN: { - this._stateRcdataLessThanSign(t); - break - } - case c.RCDATA_END_TAG_OPEN: { - this._stateRcdataEndTagOpen(t); - break - } - case c.RCDATA_END_TAG_NAME: { - this._stateRcdataEndTagName(t); - break - } - case c.RAWTEXT_LESS_THAN_SIGN: { - this._stateRawtextLessThanSign(t); - break - } - case c.RAWTEXT_END_TAG_OPEN: { - this._stateRawtextEndTagOpen(t); - break - } - case c.RAWTEXT_END_TAG_NAME: { - this._stateRawtextEndTagName(t); - break - } - case c.SCRIPT_DATA_LESS_THAN_SIGN: { - this._stateScriptDataLessThanSign(t); - break - } - case c.SCRIPT_DATA_END_TAG_OPEN: { - this._stateScriptDataEndTagOpen(t); - break - } - case c.SCRIPT_DATA_END_TAG_NAME: { - this._stateScriptDataEndTagName(t); - break - } - case c.SCRIPT_DATA_ESCAPE_START: { - this._stateScriptDataEscapeStart(t); - break - } - case c.SCRIPT_DATA_ESCAPE_START_DASH: { - this._stateScriptDataEscapeStartDash(t); - break - } - case c.SCRIPT_DATA_ESCAPED: { - this._stateScriptDataEscaped(t); - break - } - case c.SCRIPT_DATA_ESCAPED_DASH: { - this._stateScriptDataEscapedDash(t); - break - } - case c.SCRIPT_DATA_ESCAPED_DASH_DASH: { - this._stateScriptDataEscapedDashDash(t); - break - } - case c.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN: { - this._stateScriptDataEscapedLessThanSign(t); - break - } - case c.SCRIPT_DATA_ESCAPED_END_TAG_OPEN: { - this._stateScriptDataEscapedEndTagOpen(t); - break - } - case c.SCRIPT_DATA_ESCAPED_END_TAG_NAME: { - this._stateScriptDataEscapedEndTagName(t); - break - } - case c.SCRIPT_DATA_DOUBLE_ESCAPE_START: { - this._stateScriptDataDoubleEscapeStart(t); - break - } - case c.SCRIPT_DATA_DOUBLE_ESCAPED: { - this._stateScriptDataDoubleEscaped(t); - break - } - case c.SCRIPT_DATA_DOUBLE_ESCAPED_DASH: { - this._stateScriptDataDoubleEscapedDash(t); - break - } - case c.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH: { - this._stateScriptDataDoubleEscapedDashDash(t); - break - } - case c.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN: { - this._stateScriptDataDoubleEscapedLessThanSign(t); - break - } - case c.SCRIPT_DATA_DOUBLE_ESCAPE_END: { - this._stateScriptDataDoubleEscapeEnd(t); - break - } - case c.BEFORE_ATTRIBUTE_NAME: { - this._stateBeforeAttributeName(t); - break - } - case c.ATTRIBUTE_NAME: { - this._stateAttributeName(t); - break - } - case c.AFTER_ATTRIBUTE_NAME: { - this._stateAfterAttributeName(t); - break - } - case c.BEFORE_ATTRIBUTE_VALUE: { - this._stateBeforeAttributeValue(t); - break - } - case c.ATTRIBUTE_VALUE_DOUBLE_QUOTED: { - this._stateAttributeValueDoubleQuoted(t); - break - } - case c.ATTRIBUTE_VALUE_SINGLE_QUOTED: { - this._stateAttributeValueSingleQuoted(t); - break - } - case c.ATTRIBUTE_VALUE_UNQUOTED: { - this._stateAttributeValueUnquoted(t); - break - } - case c.AFTER_ATTRIBUTE_VALUE_QUOTED: { - this._stateAfterAttributeValueQuoted(t); - break - } - case c.SELF_CLOSING_START_TAG: { - this._stateSelfClosingStartTag(t); - break - } - case c.BOGUS_COMMENT: { - this._stateBogusComment(t); - break - } - case c.MARKUP_DECLARATION_OPEN: { - this._stateMarkupDeclarationOpen(t); - break - } - case c.COMMENT_START: { - this._stateCommentStart(t); - break - } - case c.COMMENT_START_DASH: { - this._stateCommentStartDash(t); - break - } - case c.COMMENT: { - this._stateComment(t); - break - } - case c.COMMENT_LESS_THAN_SIGN: { - this._stateCommentLessThanSign(t); - break - } - case c.COMMENT_LESS_THAN_SIGN_BANG: { - this._stateCommentLessThanSignBang(t); - break - } - case c.COMMENT_LESS_THAN_SIGN_BANG_DASH: { - this._stateCommentLessThanSignBangDash(t); - break - } - case c.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH: { - this._stateCommentLessThanSignBangDashDash(t); - break - } - case c.COMMENT_END_DASH: { - this._stateCommentEndDash(t); - break - } - case c.COMMENT_END: { - this._stateCommentEnd(t); - break - } - case c.COMMENT_END_BANG: { - this._stateCommentEndBang(t); - break - } - case c.DOCTYPE: { - this._stateDoctype(t); - break - } - case c.BEFORE_DOCTYPE_NAME: { - this._stateBeforeDoctypeName(t); - break - } - case c.DOCTYPE_NAME: { - this._stateDoctypeName(t); - break - } - case c.AFTER_DOCTYPE_NAME: { - this._stateAfterDoctypeName(t); - break - } - case c.AFTER_DOCTYPE_PUBLIC_KEYWORD: { - this._stateAfterDoctypePublicKeyword(t); - break - } - case c.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER: { - this._stateBeforeDoctypePublicIdentifier(t); - break - } - case c.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED: { - this._stateDoctypePublicIdentifierDoubleQuoted(t); - break - } - case c.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED: { - this._stateDoctypePublicIdentifierSingleQuoted(t); - break - } - case c.AFTER_DOCTYPE_PUBLIC_IDENTIFIER: { - this._stateAfterDoctypePublicIdentifier(t); - break - } - case c.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS: { - this._stateBetweenDoctypePublicAndSystemIdentifiers(t); - break - } - case c.AFTER_DOCTYPE_SYSTEM_KEYWORD: { - this._stateAfterDoctypeSystemKeyword(t); - break - } - case c.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER: { - this._stateBeforeDoctypeSystemIdentifier(t); - break - } - case c.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED: { - this._stateDoctypeSystemIdentifierDoubleQuoted(t); - break - } - case c.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED: { - this._stateDoctypeSystemIdentifierSingleQuoted(t); - break - } - case c.AFTER_DOCTYPE_SYSTEM_IDENTIFIER: { - this._stateAfterDoctypeSystemIdentifier(t); - break - } - case c.BOGUS_DOCTYPE: { - this._stateBogusDoctype(t); - break - } - case c.CDATA_SECTION: { - this._stateCdataSection(t); - break - } - case c.CDATA_SECTION_BRACKET: { - this._stateCdataSectionBracket(t); - break - } - case c.CDATA_SECTION_END: { - this._stateCdataSectionEnd(t); - break - } - case c.CHARACTER_REFERENCE: { - this._stateCharacterReference(t); - break - } - case c.NAMED_CHARACTER_REFERENCE: { - this._stateNamedCharacterReference(t); - break - } - case c.AMBIGUOUS_AMPERSAND: { - this._stateAmbiguousAmpersand(t); - break - } - case c.NUMERIC_CHARACTER_REFERENCE: { - this._stateNumericCharacterReference(t); - break - } - case c.HEXADEMICAL_CHARACTER_REFERENCE_START: { - this._stateHexademicalCharacterReferenceStart(t); - break - } - case c.HEXADEMICAL_CHARACTER_REFERENCE: { - this._stateHexademicalCharacterReference(t); - break - } - case c.DECIMAL_CHARACTER_REFERENCE: { - this._stateDecimalCharacterReference(t); - break - } - case c.NUMERIC_CHARACTER_REFERENCE_END: { - this._stateNumericCharacterReferenceEnd(t); - break - } - default: - throw new Error("Unknown state") - } - } - _stateData(t) { - switch (t) { - case r.LESS_THAN_SIGN: { - this.state = c.TAG_OPEN; - break - } - case r.AMPERSAND: { - this.returnState = c.DATA, this.state = c.CHARACTER_REFERENCE; - break - } - case r.NULL: { - this._err(m.unexpectedNullCharacter), this._emitCodePoint(t); - break - } - case r.EOF: { - this._emitEOFToken(); - break - } - default: - this._emitCodePoint(t) - } - } - _stateRcdata(t) { - switch (t) { - case r.AMPERSAND: { - this.returnState = c.RCDATA, this.state = c.CHARACTER_REFERENCE; - break - } - case r.LESS_THAN_SIGN: { - this.state = c.RCDATA_LESS_THAN_SIGN; - break - } - case r.NULL: { - this._err(m.unexpectedNullCharacter), this._emitChars(H); - break - } - case r.EOF: { - this._emitEOFToken(); - break - } - default: - this._emitCodePoint(t) - } - } - _stateRawtext(t) { - switch (t) { - case r.LESS_THAN_SIGN: { - this.state = c.RAWTEXT_LESS_THAN_SIGN; - break - } - case r.NULL: { - this._err(m.unexpectedNullCharacter), this._emitChars(H); - break - } - case r.EOF: { - this._emitEOFToken(); - break - } - default: - this._emitCodePoint(t) - } - } - _stateScriptData(t) { - switch (t) { - case r.LESS_THAN_SIGN: { - this.state = c.SCRIPT_DATA_LESS_THAN_SIGN; - break - } - case r.NULL: { - this._err(m.unexpectedNullCharacter), this._emitChars(H); - break - } - case r.EOF: { - this._emitEOFToken(); - break - } - default: - this._emitCodePoint(t) - } - } - _statePlaintext(t) { - switch (t) { - case r.NULL: { - this._err(m.unexpectedNullCharacter), this._emitChars(H); - break - } - case r.EOF: { - this._emitEOFToken(); - break - } - default: - this._emitCodePoint(t) - } - } - _stateTagOpen(t) { - if (Ce(t)) this._createStartTagToken(), this.state = c.TAG_NAME, this._stateTagName(t); - else switch (t) { - case r.EXCLAMATION_MARK: { - this.state = c.MARKUP_DECLARATION_OPEN; - break - } - case r.SOLIDUS: { - this.state = c.END_TAG_OPEN; - break - } - case r.QUESTION_MARK: { - this._err(m.unexpectedQuestionMarkInsteadOfTagName), this._createCommentToken(1), this.state = c.BOGUS_COMMENT, this._stateBogusComment(t); - break - } - case r.EOF: { - this._err(m.eofBeforeTagName), this._emitChars("<"), this._emitEOFToken(); - break - } - default: - this._err(m.invalidFirstCharacterOfTagName), this._emitChars("<"), this.state = c.DATA, this._stateData(t) - } - } - _stateEndTagOpen(t) { - if (Ce(t)) this._createEndTagToken(), this.state = c.TAG_NAME, this._stateTagName(t); - else switch (t) { - case r.GREATER_THAN_SIGN: { - this._err(m.missingEndTagName), this.state = c.DATA; - break - } - case r.EOF: { - this._err(m.eofBeforeTagName), this._emitChars(""); - break - } - case r.NULL: { - this._err(m.unexpectedNullCharacter), this.state = c.SCRIPT_DATA_ESCAPED, this._emitChars(H); - break - } - case r.EOF: { - this._err(m.eofInScriptHtmlCommentLikeText), this._emitEOFToken(); - break - } - default: - this.state = c.SCRIPT_DATA_ESCAPED, this._emitCodePoint(t) - } - } - _stateScriptDataEscapedLessThanSign(t) { - t === r.SOLIDUS ? this.state = c.SCRIPT_DATA_ESCAPED_END_TAG_OPEN : Ce(t) ? (this._emitChars("<"), this.state = c.SCRIPT_DATA_DOUBLE_ESCAPE_START, this._stateScriptDataDoubleEscapeStart(t)) : (this._emitChars("<"), this.state = c.SCRIPT_DATA_ESCAPED, this._stateScriptDataEscaped(t)) - } - _stateScriptDataEscapedEndTagOpen(t) { - Ce(t) ? (this.state = c.SCRIPT_DATA_ESCAPED_END_TAG_NAME, this._stateScriptDataEscapedEndTagName(t)) : (this._emitChars(""); - break - } - case r.NULL: { - this._err(m.unexpectedNullCharacter), this.state = c.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitChars(H); - break - } - case r.EOF: { - this._err(m.eofInScriptHtmlCommentLikeText), this._emitEOFToken(); - break - } - default: - this.state = c.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitCodePoint(t) - } - } - _stateScriptDataDoubleEscapedLessThanSign(t) { - t === r.SOLIDUS ? (this.state = c.SCRIPT_DATA_DOUBLE_ESCAPE_END, this._emitChars("/")) : (this.state = c.SCRIPT_DATA_DOUBLE_ESCAPED, this._stateScriptDataDoubleEscaped(t)) - } - _stateScriptDataDoubleEscapeEnd(t) { - if (this.preprocessor.startsWith(Z.SCRIPT, !1) && au(this.preprocessor.peek(Z.SCRIPT.length))) { - this._emitCodePoint(t); - for (let s = 0; s < Z.SCRIPT.length; s++) this._emitCodePoint(this._consume()); - this.state = c.SCRIPT_DATA_ESCAPED - } else this._ensureHibernation() || (this.state = c.SCRIPT_DATA_DOUBLE_ESCAPED, this._stateScriptDataDoubleEscaped(t)) - } - _stateBeforeAttributeName(t) { - switch (t) { - case r.SPACE: - case r.LINE_FEED: - case r.TABULATION: - case r.FORM_FEED: - break; - case r.SOLIDUS: - case r.GREATER_THAN_SIGN: - case r.EOF: { - this.state = c.AFTER_ATTRIBUTE_NAME, this._stateAfterAttributeName(t); - break - } - case r.EQUALS_SIGN: { - this._err(m.unexpectedEqualsSignBeforeAttributeName), this._createAttr("="), this.state = c.ATTRIBUTE_NAME; - break - } - default: - this._createAttr(""), this.state = c.ATTRIBUTE_NAME, this._stateAttributeName(t) - } - } - _stateAttributeName(t) { - switch (t) { - case r.SPACE: - case r.LINE_FEED: - case r.TABULATION: - case r.FORM_FEED: - case r.SOLIDUS: - case r.GREATER_THAN_SIGN: - case r.EOF: { - this._leaveAttrName(), this.state = c.AFTER_ATTRIBUTE_NAME, this._stateAfterAttributeName(t); - break - } - case r.EQUALS_SIGN: { - this._leaveAttrName(), this.state = c.BEFORE_ATTRIBUTE_VALUE; - break - } - case r.QUOTATION_MARK: - case r.APOSTROPHE: - case r.LESS_THAN_SIGN: { - this._err(m.unexpectedCharacterInAttributeName), this.currentAttr.name += String.fromCodePoint(t); - break - } - case r.NULL: { - this._err(m.unexpectedNullCharacter), this.currentAttr.name += H; - break - } - default: - this.currentAttr.name += String.fromCodePoint(at(t) ? Ct(t) : t) - } - } - _stateAfterAttributeName(t) { - switch (t) { - case r.SPACE: - case r.LINE_FEED: - case r.TABULATION: - case r.FORM_FEED: - break; - case r.SOLIDUS: { - this.state = c.SELF_CLOSING_START_TAG; - break - } - case r.EQUALS_SIGN: { - this.state = c.BEFORE_ATTRIBUTE_VALUE; - break - } - case r.GREATER_THAN_SIGN: { - this.state = c.DATA, this.emitCurrentTagToken(); - break - } - case r.EOF: { - this._err(m.eofInTag), this._emitEOFToken(); - break - } - default: - this._createAttr(""), this.state = c.ATTRIBUTE_NAME, this._stateAttributeName(t) - } - } - _stateBeforeAttributeValue(t) { - switch (t) { - case r.SPACE: - case r.LINE_FEED: - case r.TABULATION: - case r.FORM_FEED: - break; - case r.QUOTATION_MARK: { - this.state = c.ATTRIBUTE_VALUE_DOUBLE_QUOTED; - break - } - case r.APOSTROPHE: { - this.state = c.ATTRIBUTE_VALUE_SINGLE_QUOTED; - break - } - case r.GREATER_THAN_SIGN: { - this._err(m.missingAttributeValue), this.state = c.DATA, this.emitCurrentTagToken(); - break - } - default: - this.state = c.ATTRIBUTE_VALUE_UNQUOTED, this._stateAttributeValueUnquoted(t) - } - } - _stateAttributeValueDoubleQuoted(t) { - switch (t) { - case r.QUOTATION_MARK: { - this.state = c.AFTER_ATTRIBUTE_VALUE_QUOTED; - break - } - case r.AMPERSAND: { - this.returnState = c.ATTRIBUTE_VALUE_DOUBLE_QUOTED, this.state = c.CHARACTER_REFERENCE; - break - } - case r.NULL: { - this._err(m.unexpectedNullCharacter), this.currentAttr.value += H; - break - } - case r.EOF: { - this._err(m.eofInTag), this._emitEOFToken(); - break - } - default: - this.currentAttr.value += String.fromCodePoint(t) - } - } - _stateAttributeValueSingleQuoted(t) { - switch (t) { - case r.APOSTROPHE: { - this.state = c.AFTER_ATTRIBUTE_VALUE_QUOTED; - break - } - case r.AMPERSAND: { - this.returnState = c.ATTRIBUTE_VALUE_SINGLE_QUOTED, this.state = c.CHARACTER_REFERENCE; - break - } - case r.NULL: { - this._err(m.unexpectedNullCharacter), this.currentAttr.value += H; - break - } - case r.EOF: { - this._err(m.eofInTag), this._emitEOFToken(); - break - } - default: - this.currentAttr.value += String.fromCodePoint(t) - } - } - _stateAttributeValueUnquoted(t) { - switch (t) { - case r.SPACE: - case r.LINE_FEED: - case r.TABULATION: - case r.FORM_FEED: { - this._leaveAttrValue(), this.state = c.BEFORE_ATTRIBUTE_NAME; - break - } - case r.AMPERSAND: { - this.returnState = c.ATTRIBUTE_VALUE_UNQUOTED, this.state = c.CHARACTER_REFERENCE; - break - } - case r.GREATER_THAN_SIGN: { - this._leaveAttrValue(), this.state = c.DATA, this.emitCurrentTagToken(); - break - } - case r.NULL: { - this._err(m.unexpectedNullCharacter), this.currentAttr.value += H; - break - } - case r.QUOTATION_MARK: - case r.APOSTROPHE: - case r.LESS_THAN_SIGN: - case r.EQUALS_SIGN: - case r.GRAVE_ACCENT: { - this._err(m.unexpectedCharacterInUnquotedAttributeValue), this.currentAttr.value += String.fromCodePoint(t); - break - } - case r.EOF: { - this._err(m.eofInTag), this._emitEOFToken(); - break - } - default: - this.currentAttr.value += String.fromCodePoint(t) - } - } - _stateAfterAttributeValueQuoted(t) { - switch (t) { - case r.SPACE: - case r.LINE_FEED: - case r.TABULATION: - case r.FORM_FEED: { - this._leaveAttrValue(), this.state = c.BEFORE_ATTRIBUTE_NAME; - break - } - case r.SOLIDUS: { - this._leaveAttrValue(), this.state = c.SELF_CLOSING_START_TAG; - break - } - case r.GREATER_THAN_SIGN: { - this._leaveAttrValue(), this.state = c.DATA, this.emitCurrentTagToken(); - break - } - case r.EOF: { - this._err(m.eofInTag), this._emitEOFToken(); - break - } - default: - this._err(m.missingWhitespaceBetweenAttributes), this.state = c.BEFORE_ATTRIBUTE_NAME, this._stateBeforeAttributeName(t) - } - } - _stateSelfClosingStartTag(t) { - switch (t) { - case r.GREATER_THAN_SIGN: { - const s = this.currentToken; - s.selfClosing = !0, this.state = c.DATA, this.emitCurrentTagToken(); - break - } - case r.EOF: { - this._err(m.eofInTag), this._emitEOFToken(); - break - } - default: - this._err(m.unexpectedSolidusInTag), this.state = c.BEFORE_ATTRIBUTE_NAME, this._stateBeforeAttributeName(t) - } - } - _stateBogusComment(t) { - const s = this.currentToken; - switch (t) { - case r.GREATER_THAN_SIGN: { - this.state = c.DATA, this.emitCurrentComment(s); - break - } - case r.EOF: { - this.emitCurrentComment(s), this._emitEOFToken(); - break - } - case r.NULL: { - this._err(m.unexpectedNullCharacter), s.data += H; - break - } - default: - s.data += String.fromCodePoint(t) - } - } - _stateMarkupDeclarationOpen(t) { - this._consumeSequenceIfMatch(Z.DASH_DASH, !0) ? (this._createCommentToken(Z.DASH_DASH.length + 1), this.state = c.COMMENT_START) : this._consumeSequenceIfMatch(Z.DOCTYPE, !1) ? (this.currentLocation = this.getCurrentLocation(Z.DOCTYPE.length + 1), this.state = c.DOCTYPE) : this._consumeSequenceIfMatch(Z.CDATA_START, !0) ? this.inForeignNode ? this.state = c.CDATA_SECTION : (this._err(m.cdataInHtmlContent), this._createCommentToken(Z.CDATA_START.length + 1), this.currentToken.data = "[CDATA[", this.state = c.BOGUS_COMMENT) : this._ensureHibernation() || (this._err(m.incorrectlyOpenedComment), this._createCommentToken(2), this.state = c.BOGUS_COMMENT, this._stateBogusComment(t)) - } - _stateCommentStart(t) { - switch (t) { - case r.HYPHEN_MINUS: { - this.state = c.COMMENT_START_DASH; - break - } - case r.GREATER_THAN_SIGN: { - this._err(m.abruptClosingOfEmptyComment), this.state = c.DATA; - const s = this.currentToken; - this.emitCurrentComment(s); - break - } - default: - this.state = c.COMMENT, this._stateComment(t) - } - } - _stateCommentStartDash(t) { - const s = this.currentToken; - switch (t) { - case r.HYPHEN_MINUS: { - this.state = c.COMMENT_END; - break - } - case r.GREATER_THAN_SIGN: { - this._err(m.abruptClosingOfEmptyComment), this.state = c.DATA, this.emitCurrentComment(s); - break - } - case r.EOF: { - this._err(m.eofInComment), this.emitCurrentComment(s), this._emitEOFToken(); - break - } - default: - s.data += "-", this.state = c.COMMENT, this._stateComment(t) - } - } - _stateComment(t) { - const s = this.currentToken; - switch (t) { - case r.HYPHEN_MINUS: { - this.state = c.COMMENT_END_DASH; - break - } - case r.LESS_THAN_SIGN: { - s.data += "<", this.state = c.COMMENT_LESS_THAN_SIGN; - break - } - case r.NULL: { - this._err(m.unexpectedNullCharacter), s.data += H; - break - } - case r.EOF: { - this._err(m.eofInComment), this.emitCurrentComment(s), this._emitEOFToken(); - break - } - default: - s.data += String.fromCodePoint(t) - } - } - _stateCommentLessThanSign(t) { - const s = this.currentToken; - switch (t) { - case r.EXCLAMATION_MARK: { - s.data += "!", this.state = c.COMMENT_LESS_THAN_SIGN_BANG; - break - } - case r.LESS_THAN_SIGN: { - s.data += "<"; - break - } - default: - this.state = c.COMMENT, this._stateComment(t) - } - } - _stateCommentLessThanSignBang(t) { - t === r.HYPHEN_MINUS ? this.state = c.COMMENT_LESS_THAN_SIGN_BANG_DASH : (this.state = c.COMMENT, this._stateComment(t)) - } - _stateCommentLessThanSignBangDash(t) { - t === r.HYPHEN_MINUS ? this.state = c.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH : (this.state = c.COMMENT_END_DASH, this._stateCommentEndDash(t)) - } - _stateCommentLessThanSignBangDashDash(t) { - t !== r.GREATER_THAN_SIGN && t !== r.EOF && this._err(m.nestedComment), this.state = c.COMMENT_END, this._stateCommentEnd(t) - } - _stateCommentEndDash(t) { - const s = this.currentToken; - switch (t) { - case r.HYPHEN_MINUS: { - this.state = c.COMMENT_END; - break - } - case r.EOF: { - this._err(m.eofInComment), this.emitCurrentComment(s), this._emitEOFToken(); - break - } - default: - s.data += "-", this.state = c.COMMENT, this._stateComment(t) - } - } - _stateCommentEnd(t) { - const s = this.currentToken; - switch (t) { - case r.GREATER_THAN_SIGN: { - this.state = c.DATA, this.emitCurrentComment(s); - break - } - case r.EXCLAMATION_MARK: { - this.state = c.COMMENT_END_BANG; - break - } - case r.HYPHEN_MINUS: { - s.data += "-"; - break - } - case r.EOF: { - this._err(m.eofInComment), this.emitCurrentComment(s), this._emitEOFToken(); - break - } - default: - s.data += "--", this.state = c.COMMENT, this._stateComment(t) - } - } - _stateCommentEndBang(t) { - const s = this.currentToken; - switch (t) { - case r.HYPHEN_MINUS: { - s.data += "--!", this.state = c.COMMENT_END_DASH; - break - } - case r.GREATER_THAN_SIGN: { - this._err(m.incorrectlyClosedComment), this.state = c.DATA, this.emitCurrentComment(s); - break - } - case r.EOF: { - this._err(m.eofInComment), this.emitCurrentComment(s), this._emitEOFToken(); - break - } - default: - s.data += "--!", this.state = c.COMMENT, this._stateComment(t) - } - } - _stateDoctype(t) { - switch (t) { - case r.SPACE: - case r.LINE_FEED: - case r.TABULATION: - case r.FORM_FEED: { - this.state = c.BEFORE_DOCTYPE_NAME; - break - } - case r.GREATER_THAN_SIGN: { - this.state = c.BEFORE_DOCTYPE_NAME, this._stateBeforeDoctypeName(t); - break - } - case r.EOF: { - this._err(m.eofInDoctype), this._createDoctypeToken(null); - const s = this.currentToken; - s.forceQuirks = !0, this.emitCurrentDoctype(s), this._emitEOFToken(); - break - } - default: - this._err(m.missingWhitespaceBeforeDoctypeName), this.state = c.BEFORE_DOCTYPE_NAME, this._stateBeforeDoctypeName(t) - } - } - _stateBeforeDoctypeName(t) { - if (at(t)) this._createDoctypeToken(String.fromCharCode(Ct(t))), this.state = c.DOCTYPE_NAME; - else switch (t) { - case r.SPACE: - case r.LINE_FEED: - case r.TABULATION: - case r.FORM_FEED: - break; - case r.NULL: { - this._err(m.unexpectedNullCharacter), this._createDoctypeToken(H), this.state = c.DOCTYPE_NAME; - break - } - case r.GREATER_THAN_SIGN: { - this._err(m.missingDoctypeName), this._createDoctypeToken(null); - const s = this.currentToken; - s.forceQuirks = !0, this.emitCurrentDoctype(s), this.state = c.DATA; - break - } - case r.EOF: { - this._err(m.eofInDoctype), this._createDoctypeToken(null); - const s = this.currentToken; - s.forceQuirks = !0, this.emitCurrentDoctype(s), this._emitEOFToken(); - break - } - default: - this._createDoctypeToken(String.fromCodePoint(t)), this.state = c.DOCTYPE_NAME - } - } - _stateDoctypeName(t) { - const s = this.currentToken; - switch (t) { - case r.SPACE: - case r.LINE_FEED: - case r.TABULATION: - case r.FORM_FEED: { - this.state = c.AFTER_DOCTYPE_NAME; - break - } - case r.GREATER_THAN_SIGN: { - this.state = c.DATA, this.emitCurrentDoctype(s); - break - } - case r.NULL: { - this._err(m.unexpectedNullCharacter), s.name += H; - break - } - case r.EOF: { - this._err(m.eofInDoctype), s.forceQuirks = !0, this.emitCurrentDoctype(s), this._emitEOFToken(); - break - } - default: - s.name += String.fromCodePoint(at(t) ? Ct(t) : t) - } - } - _stateAfterDoctypeName(t) { - const s = this.currentToken; - switch (t) { - case r.SPACE: - case r.LINE_FEED: - case r.TABULATION: - case r.FORM_FEED: - break; - case r.GREATER_THAN_SIGN: { - this.state = c.DATA, this.emitCurrentDoctype(s); - break - } - case r.EOF: { - this._err(m.eofInDoctype), s.forceQuirks = !0, this.emitCurrentDoctype(s), this._emitEOFToken(); - break - } - default: - this._consumeSequenceIfMatch(Z.PUBLIC, !1) ? this.state = c.AFTER_DOCTYPE_PUBLIC_KEYWORD : this._consumeSequenceIfMatch(Z.SYSTEM, !1) ? this.state = c.AFTER_DOCTYPE_SYSTEM_KEYWORD : this._ensureHibernation() || (this._err(m.invalidCharacterSequenceAfterDoctypeName), s.forceQuirks = !0, this.state = c.BOGUS_DOCTYPE, this._stateBogusDoctype(t)) - } - } - _stateAfterDoctypePublicKeyword(t) { - const s = this.currentToken; - switch (t) { - case r.SPACE: - case r.LINE_FEED: - case r.TABULATION: - case r.FORM_FEED: { - this.state = c.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER; - break - } - case r.QUOTATION_MARK: { - this._err(m.missingWhitespaceAfterDoctypePublicKeyword), s.publicId = "", this.state = c.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED; - break - } - case r.APOSTROPHE: { - this._err(m.missingWhitespaceAfterDoctypePublicKeyword), s.publicId = "", this.state = c.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED; - break - } - case r.GREATER_THAN_SIGN: { - this._err(m.missingDoctypePublicIdentifier), s.forceQuirks = !0, this.state = c.DATA, this.emitCurrentDoctype(s); - break - } - case r.EOF: { - this._err(m.eofInDoctype), s.forceQuirks = !0, this.emitCurrentDoctype(s), this._emitEOFToken(); - break - } - default: - this._err(m.missingQuoteBeforeDoctypePublicIdentifier), s.forceQuirks = !0, this.state = c.BOGUS_DOCTYPE, this._stateBogusDoctype(t) - } - } - _stateBeforeDoctypePublicIdentifier(t) { - const s = this.currentToken; - switch (t) { - case r.SPACE: - case r.LINE_FEED: - case r.TABULATION: - case r.FORM_FEED: - break; - case r.QUOTATION_MARK: { - s.publicId = "", this.state = c.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED; - break - } - case r.APOSTROPHE: { - s.publicId = "", this.state = c.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED; - break - } - case r.GREATER_THAN_SIGN: { - this._err(m.missingDoctypePublicIdentifier), s.forceQuirks = !0, this.state = c.DATA, this.emitCurrentDoctype(s); - break - } - case r.EOF: { - this._err(m.eofInDoctype), s.forceQuirks = !0, this.emitCurrentDoctype(s), this._emitEOFToken(); - break - } - default: - this._err(m.missingQuoteBeforeDoctypePublicIdentifier), s.forceQuirks = !0, this.state = c.BOGUS_DOCTYPE, this._stateBogusDoctype(t) - } - } - _stateDoctypePublicIdentifierDoubleQuoted(t) { - const s = this.currentToken; - switch (t) { - case r.QUOTATION_MARK: { - this.state = c.AFTER_DOCTYPE_PUBLIC_IDENTIFIER; - break - } - case r.NULL: { - this._err(m.unexpectedNullCharacter), s.publicId += H; - break - } - case r.GREATER_THAN_SIGN: { - this._err(m.abruptDoctypePublicIdentifier), s.forceQuirks = !0, this.emitCurrentDoctype(s), this.state = c.DATA; - break - } - case r.EOF: { - this._err(m.eofInDoctype), s.forceQuirks = !0, this.emitCurrentDoctype(s), this._emitEOFToken(); - break - } - default: - s.publicId += String.fromCodePoint(t) - } - } - _stateDoctypePublicIdentifierSingleQuoted(t) { - const s = this.currentToken; - switch (t) { - case r.APOSTROPHE: { - this.state = c.AFTER_DOCTYPE_PUBLIC_IDENTIFIER; - break - } - case r.NULL: { - this._err(m.unexpectedNullCharacter), s.publicId += H; - break - } - case r.GREATER_THAN_SIGN: { - this._err(m.abruptDoctypePublicIdentifier), s.forceQuirks = !0, this.emitCurrentDoctype(s), this.state = c.DATA; - break - } - case r.EOF: { - this._err(m.eofInDoctype), s.forceQuirks = !0, this.emitCurrentDoctype(s), this._emitEOFToken(); - break - } - default: - s.publicId += String.fromCodePoint(t) - } - } - _stateAfterDoctypePublicIdentifier(t) { - const s = this.currentToken; - switch (t) { - case r.SPACE: - case r.LINE_FEED: - case r.TABULATION: - case r.FORM_FEED: { - this.state = c.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS; - break - } - case r.GREATER_THAN_SIGN: { - this.state = c.DATA, this.emitCurrentDoctype(s); - break - } - case r.QUOTATION_MARK: { - this._err(m.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers), s.systemId = "", this.state = c.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED; - break - } - case r.APOSTROPHE: { - this._err(m.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers), s.systemId = "", this.state = c.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED; - break - } - case r.EOF: { - this._err(m.eofInDoctype), s.forceQuirks = !0, this.emitCurrentDoctype(s), this._emitEOFToken(); - break - } - default: - this._err(m.missingQuoteBeforeDoctypeSystemIdentifier), s.forceQuirks = !0, this.state = c.BOGUS_DOCTYPE, this._stateBogusDoctype(t) - } - } - _stateBetweenDoctypePublicAndSystemIdentifiers(t) { - const s = this.currentToken; - switch (t) { - case r.SPACE: - case r.LINE_FEED: - case r.TABULATION: - case r.FORM_FEED: - break; - case r.GREATER_THAN_SIGN: { - this.emitCurrentDoctype(s), this.state = c.DATA; - break - } - case r.QUOTATION_MARK: { - s.systemId = "", this.state = c.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED; - break - } - case r.APOSTROPHE: { - s.systemId = "", this.state = c.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED; - break - } - case r.EOF: { - this._err(m.eofInDoctype), s.forceQuirks = !0, this.emitCurrentDoctype(s), this._emitEOFToken(); - break - } - default: - this._err(m.missingQuoteBeforeDoctypeSystemIdentifier), s.forceQuirks = !0, this.state = c.BOGUS_DOCTYPE, this._stateBogusDoctype(t) - } - } - _stateAfterDoctypeSystemKeyword(t) { - const s = this.currentToken; - switch (t) { - case r.SPACE: - case r.LINE_FEED: - case r.TABULATION: - case r.FORM_FEED: { - this.state = c.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER; - break - } - case r.QUOTATION_MARK: { - this._err(m.missingWhitespaceAfterDoctypeSystemKeyword), s.systemId = "", this.state = c.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED; - break - } - case r.APOSTROPHE: { - this._err(m.missingWhitespaceAfterDoctypeSystemKeyword), s.systemId = "", this.state = c.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED; - break - } - case r.GREATER_THAN_SIGN: { - this._err(m.missingDoctypeSystemIdentifier), s.forceQuirks = !0, this.state = c.DATA, this.emitCurrentDoctype(s); - break - } - case r.EOF: { - this._err(m.eofInDoctype), s.forceQuirks = !0, this.emitCurrentDoctype(s), this._emitEOFToken(); - break - } - default: - this._err(m.missingQuoteBeforeDoctypeSystemIdentifier), s.forceQuirks = !0, this.state = c.BOGUS_DOCTYPE, this._stateBogusDoctype(t) - } - } - _stateBeforeDoctypeSystemIdentifier(t) { - const s = this.currentToken; - switch (t) { - case r.SPACE: - case r.LINE_FEED: - case r.TABULATION: - case r.FORM_FEED: - break; - case r.QUOTATION_MARK: { - s.systemId = "", this.state = c.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED; - break - } - case r.APOSTROPHE: { - s.systemId = "", this.state = c.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED; - break - } - case r.GREATER_THAN_SIGN: { - this._err(m.missingDoctypeSystemIdentifier), s.forceQuirks = !0, this.state = c.DATA, this.emitCurrentDoctype(s); - break - } - case r.EOF: { - this._err(m.eofInDoctype), s.forceQuirks = !0, this.emitCurrentDoctype(s), this._emitEOFToken(); - break - } - default: - this._err(m.missingQuoteBeforeDoctypeSystemIdentifier), s.forceQuirks = !0, this.state = c.BOGUS_DOCTYPE, this._stateBogusDoctype(t) - } - } - _stateDoctypeSystemIdentifierDoubleQuoted(t) { - const s = this.currentToken; - switch (t) { - case r.QUOTATION_MARK: { - this.state = c.AFTER_DOCTYPE_SYSTEM_IDENTIFIER; - break - } - case r.NULL: { - this._err(m.unexpectedNullCharacter), s.systemId += H; - break - } - case r.GREATER_THAN_SIGN: { - this._err(m.abruptDoctypeSystemIdentifier), s.forceQuirks = !0, this.emitCurrentDoctype(s), this.state = c.DATA; - break - } - case r.EOF: { - this._err(m.eofInDoctype), s.forceQuirks = !0, this.emitCurrentDoctype(s), this._emitEOFToken(); - break - } - default: - s.systemId += String.fromCodePoint(t) - } - } - _stateDoctypeSystemIdentifierSingleQuoted(t) { - const s = this.currentToken; - switch (t) { - case r.APOSTROPHE: { - this.state = c.AFTER_DOCTYPE_SYSTEM_IDENTIFIER; - break - } - case r.NULL: { - this._err(m.unexpectedNullCharacter), s.systemId += H; - break - } - case r.GREATER_THAN_SIGN: { - this._err(m.abruptDoctypeSystemIdentifier), s.forceQuirks = !0, this.emitCurrentDoctype(s), this.state = c.DATA; - break - } - case r.EOF: { - this._err(m.eofInDoctype), s.forceQuirks = !0, this.emitCurrentDoctype(s), this._emitEOFToken(); - break - } - default: - s.systemId += String.fromCodePoint(t) - } - } - _stateAfterDoctypeSystemIdentifier(t) { - const s = this.currentToken; - switch (t) { - case r.SPACE: - case r.LINE_FEED: - case r.TABULATION: - case r.FORM_FEED: - break; - case r.GREATER_THAN_SIGN: { - this.emitCurrentDoctype(s), this.state = c.DATA; - break - } - case r.EOF: { - this._err(m.eofInDoctype), s.forceQuirks = !0, this.emitCurrentDoctype(s), this._emitEOFToken(); - break - } - default: - this._err(m.unexpectedCharacterAfterDoctypeSystemIdentifier), this.state = c.BOGUS_DOCTYPE, this._stateBogusDoctype(t) - } - } - _stateBogusDoctype(t) { - const s = this.currentToken; - switch (t) { - case r.GREATER_THAN_SIGN: { - this.emitCurrentDoctype(s), this.state = c.DATA; - break - } - case r.NULL: { - this._err(m.unexpectedNullCharacter); - break - } - case r.EOF: { - this.emitCurrentDoctype(s), this._emitEOFToken(); - break - } - } - } - _stateCdataSection(t) { - switch (t) { - case r.RIGHT_SQUARE_BRACKET: { - this.state = c.CDATA_SECTION_BRACKET; - break - } - case r.EOF: { - this._err(m.eofInCdata), this._emitEOFToken(); - break - } - default: - this._emitCodePoint(t) - } - } - _stateCdataSectionBracket(t) { - t === r.RIGHT_SQUARE_BRACKET ? this.state = c.CDATA_SECTION_END : (this._emitChars("]"), this.state = c.CDATA_SECTION, this._stateCdataSection(t)) - } - _stateCdataSectionEnd(t) { - switch (t) { - case r.GREATER_THAN_SIGN: { - this.state = c.DATA; - break - } - case r.RIGHT_SQUARE_BRACKET: { - this._emitChars("]"); - break - } - default: - this._emitChars("]]"), this.state = c.CDATA_SECTION, this._stateCdataSection(t) - } - } - _stateCharacterReference(t) { - t === r.NUMBER_SIGN ? this.state = c.NUMERIC_CHARACTER_REFERENCE : ls(t) ? (this.state = c.NAMED_CHARACTER_REFERENCE, this._stateNamedCharacterReference(t)) : (this._flushCodePointConsumedAsCharacterReference(r.AMPERSAND), this._reconsumeInState(this.returnState, t)) - } - _stateNamedCharacterReference(t) { - const s = this._matchNamedCharacterReference(t); - if (!this._ensureHibernation()) - if (s) { - for (let a = 0; a < s.length; a++) this._flushCodePointConsumedAsCharacterReference(s[a]); - this.state = this.returnState - } else this._flushCodePointConsumedAsCharacterReference(r.AMPERSAND), this.state = c.AMBIGUOUS_AMPERSAND - } - _stateAmbiguousAmpersand(t) { - ls(t) ? this._flushCodePointConsumedAsCharacterReference(t) : (t === r.SEMICOLON && this._err(m.unknownNamedCharacterReference), this._reconsumeInState(this.returnState, t)) - } - _stateNumericCharacterReference(t) { - this.charRefCode = 0, t === r.LATIN_SMALL_X || t === r.LATIN_CAPITAL_X ? this.state = c.HEXADEMICAL_CHARACTER_REFERENCE_START : it(t) ? (this.state = c.DECIMAL_CHARACTER_REFERENCE, this._stateDecimalCharacterReference(t)) : (this._err(m.absenceOfDigitsInNumericCharacterReference), this._flushCodePointConsumedAsCharacterReference(r.AMPERSAND), this._flushCodePointConsumedAsCharacterReference(r.NUMBER_SIGN), this._reconsumeInState(this.returnState, t)) - } - _stateHexademicalCharacterReferenceStart(t) { - Ai(t) ? (this.state = c.HEXADEMICAL_CHARACTER_REFERENCE, this._stateHexademicalCharacterReference(t)) : (this._err(m.absenceOfDigitsInNumericCharacterReference), this._flushCodePointConsumedAsCharacterReference(r.AMPERSAND), this._flushCodePointConsumedAsCharacterReference(r.NUMBER_SIGN), this._unconsume(2), this.state = this.returnState) - } - _stateHexademicalCharacterReference(t) { - qu(t) ? this.charRefCode = this.charRefCode * 16 + t - 55 : Gu(t) ? this.charRefCode = this.charRefCode * 16 + t - 87 : it(t) ? this.charRefCode = this.charRefCode * 16 + t - 48 : t === r.SEMICOLON ? this.state = c.NUMERIC_CHARACTER_REFERENCE_END : (this._err(m.missingSemicolonAfterCharacterReference), this.state = c.NUMERIC_CHARACTER_REFERENCE_END, this._stateNumericCharacterReferenceEnd(t)) - } - _stateDecimalCharacterReference(t) { - it(t) ? this.charRefCode = this.charRefCode * 10 + t - 48 : t === r.SEMICOLON ? this.state = c.NUMERIC_CHARACTER_REFERENCE_END : (this._err(m.missingSemicolonAfterCharacterReference), this.state = c.NUMERIC_CHARACTER_REFERENCE_END, this._stateNumericCharacterReferenceEnd(t)) - } - _stateNumericCharacterReferenceEnd(t) { - if (this.charRefCode === r.NULL) this._err(m.nullCharacterReference), this.charRefCode = r.REPLACEMENT_CHARACTER; - else if (this.charRefCode > 1114111) this._err(m.characterReferenceOutsideUnicodeRange), this.charRefCode = r.REPLACEMENT_CHARACTER; - else if (Uu(this.charRefCode)) this._err(m.surrogateCharacterReference), this.charRefCode = r.REPLACEMENT_CHARACTER; - else if (vu(this.charRefCode)) this._err(m.noncharacterCharacterReference); - else if (wu(this.charRefCode) || this.charRefCode === r.CARRIAGE_RETURN) { - this._err(m.controlCharacterReference); - const s = _i.get(this.charRefCode); - s !== void 0 && (this.charRefCode = s) - } - this._flushCodePointConsumedAsCharacterReference(this.charRefCode), this._reconsumeInState(this.returnState, t) - } -}; -const Vu = new Set([u.DD, u.DT, u.LI, u.OPTGROUP, u.OPTION, u.P, u.RB, u.RP, u.RT, u.RTC]), - iu = new Set([...Vu, u.CAPTION, u.COLGROUP, u.TBODY, u.TD, u.TFOOT, u.TH, u.THEAD, u.TR]), - St = new Map([ - [u.APPLET, _.HTML], - [u.CAPTION, _.HTML], - [u.HTML, _.HTML], - [u.MARQUEE, _.HTML], - [u.OBJECT, _.HTML], - [u.TABLE, _.HTML], - [u.TD, _.HTML], - [u.TEMPLATE, _.HTML], - [u.TH, _.HTML], - [u.ANNOTATION_XML, _.MATHML], - [u.MI, _.MATHML], - [u.MN, _.MATHML], - [u.MO, _.MATHML], - [u.MS, _.MATHML], - [u.MTEXT, _.MATHML], - [u.DESC, _.SVG], - [u.FOREIGN_OBJECT, _.SVG], - [u.TITLE, _.SVG] - ]), - Ni = [u.H1, u.H2, u.H3, u.H4, u.H5, u.H6], - gi = [u.TR, u.TEMPLATE, u.HTML], - Ci = [u.TBODY, u.TFOOT, u.THEAD, u.TEMPLATE, u.HTML], - Si = [u.TABLE, u.TEMPLATE, u.HTML], - Ri = [u.TD, u.TH]; -class Li { - get currentTmplContentOrNode() { - return this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : this.current - } - constructor(t, s, a) { - this.treeAdapter = s, this.handler = a, this.items = [], this.tagIDs = [], this.stackTop = -1, this.tmplCount = 0, this.currentTagId = u.UNKNOWN, this.current = t - } - _indexOf(t) { - return this.items.lastIndexOf(t, this.stackTop) - } - _isInTemplate() { - return this.currentTagId === u.TEMPLATE && this.treeAdapter.getNamespaceURI(this.current) === _.HTML - } - _updateCurrentElement() { - this.current = this.items[this.stackTop], this.currentTagId = this.tagIDs[this.stackTop] - } - push(t, s) { - this.stackTop++, this.items[this.stackTop] = t, this.current = t, this.tagIDs[this.stackTop] = s, this.currentTagId = s, this._isInTemplate() && this.tmplCount++, this.handler.onItemPush(t, s, !0) - } - pop() { - const t = this.current; - this.tmplCount > 0 && this._isInTemplate() && this.tmplCount--, this.stackTop--, this._updateCurrentElement(), this.handler.onItemPop(t, !0) - } - replace(t, s) { - const a = this._indexOf(t); - this.items[a] = s, a === this.stackTop && (this.current = s) - } - insertAfter(t, s, a) { - const i = this._indexOf(t) + 1; - this.items.splice(i, 0, s), this.tagIDs.splice(i, 0, a), this.stackTop++, i === this.stackTop && this._updateCurrentElement(), this.handler.onItemPush(this.current, this.currentTagId, i === this.stackTop) - } - popUntilTagNamePopped(t) { - let s = this.stackTop + 1; - do s = this.tagIDs.lastIndexOf(t, s - 1); while (s > 0 && this.treeAdapter.getNamespaceURI(this.items[s]) !== _.HTML); - this.shortenToLength(s < 0 ? 0 : s) - } - shortenToLength(t) { - for (; this.stackTop >= t;) { - const s = this.current; - this.tmplCount > 0 && this._isInTemplate() && (this.tmplCount -= 1), this.stackTop--, this._updateCurrentElement(), this.handler.onItemPop(s, this.stackTop < t) - } - } - popUntilElementPopped(t) { - const s = this._indexOf(t); - this.shortenToLength(s < 0 ? 0 : s) - } - popUntilPopped(t, s) { - const a = this._indexOfTagNames(t, s); - this.shortenToLength(a < 0 ? 0 : a) - } - popUntilNumberedHeaderPopped() { - this.popUntilPopped(Ni, _.HTML) - } - popUntilTableCellPopped() { - this.popUntilPopped(Ri, _.HTML) - } - popAllUpToHtmlElement() { - this.tmplCount = 0, this.shortenToLength(1) - } - _indexOfTagNames(t, s) { - for (let a = this.stackTop; a >= 0; a--) - if (t.includes(this.tagIDs[a]) && this.treeAdapter.getNamespaceURI(this.items[a]) === s) return a; - return -1 - } - clearBackTo(t, s) { - const a = this._indexOfTagNames(t, s); - this.shortenToLength(a + 1) - } - clearBackToTableContext() { - this.clearBackTo(Si, _.HTML) - } - clearBackToTableBodyContext() { - this.clearBackTo(Ci, _.HTML) - } - clearBackToTableRowContext() { - this.clearBackTo(gi, _.HTML) - } - remove(t) { - const s = this._indexOf(t); - s >= 0 && (s === this.stackTop ? this.pop() : (this.items.splice(s, 1), this.tagIDs.splice(s, 1), this.stackTop--, this._updateCurrentElement(), this.handler.onItemPop(t, !1))) - } - tryPeekProperlyNestedBodyElement() { - return this.stackTop >= 1 && this.tagIDs[1] === u.BODY ? this.items[1] : null - } - contains(t) { - return this._indexOf(t) > -1 - } - getCommonAncestor(t) { - const s = this._indexOf(t) - 1; - return s >= 0 ? this.items[s] : null - } - isRootHtmlElementCurrent() { - return this.stackTop === 0 && this.tagIDs[0] === u.HTML - } - hasInScope(t) { - for (let s = this.stackTop; s >= 0; s--) { - const a = this.tagIDs[s], - i = this.treeAdapter.getNamespaceURI(this.items[s]); - if (a === t && i === _.HTML) return !0; - if (St.get(a) === i) return !1 - } - return !0 - } - hasNumberedHeaderInScope() { - for (let t = this.stackTop; t >= 0; t--) { - const s = this.tagIDs[t], - a = this.treeAdapter.getNamespaceURI(this.items[t]); - if ($u(s) && a === _.HTML) return !0; - if (St.get(s) === a) return !1 - } - return !0 - } - hasInListItemScope(t) { - for (let s = this.stackTop; s >= 0; s--) { - const a = this.tagIDs[s], - i = this.treeAdapter.getNamespaceURI(this.items[s]); - if (a === t && i === _.HTML) return !0; - if ((a === u.UL || a === u.OL) && i === _.HTML || St.get(a) === i) return !1 - } - return !0 - } - hasInButtonScope(t) { - for (let s = this.stackTop; s >= 0; s--) { - const a = this.tagIDs[s], - i = this.treeAdapter.getNamespaceURI(this.items[s]); - if (a === t && i === _.HTML) return !0; - if (a === u.BUTTON && i === _.HTML || St.get(a) === i) return !1 - } - return !0 - } - hasInTableScope(t) { - for (let s = this.stackTop; s >= 0; s--) { - const a = this.tagIDs[s]; - if (this.treeAdapter.getNamespaceURI(this.items[s]) === _.HTML) { - if (a === t) return !0; - if (a === u.TABLE || a === u.TEMPLATE || a === u.HTML) return !1 - } - } - return !0 - } - hasTableBodyContextInTableScope() { - for (let t = this.stackTop; t >= 0; t--) { - const s = this.tagIDs[t]; - if (this.treeAdapter.getNamespaceURI(this.items[t]) === _.HTML) { - if (s === u.TBODY || s === u.THEAD || s === u.TFOOT) return !0; - if (s === u.TABLE || s === u.HTML) return !1 - } - } - return !0 - } - hasInSelectScope(t) { - for (let s = this.stackTop; s >= 0; s--) { - const a = this.tagIDs[s]; - if (this.treeAdapter.getNamespaceURI(this.items[s]) === _.HTML) { - if (a === t) return !0; - if (a !== u.OPTION && a !== u.OPTGROUP) return !1 - } - } - return !0 - } - generateImpliedEndTags() { - for (; Vu.has(this.currentTagId);) this.pop() - } - generateImpliedEndTagsThoroughly() { - for (; iu.has(this.currentTagId);) this.pop() - } - generateImpliedEndTagsWithExclusion(t) { - for (; this.currentTagId !== t && iu.has(this.currentTagId);) this.pop() - } -} -const es = 3; -var oe; -(function (e) { - e[e.Marker = 0] = "Marker", e[e.Element = 1] = "Element" -})(oe = oe || (oe = {})); -const nu = { - type: oe.Marker -}; -class Oi { - constructor(t) { - this.treeAdapter = t, this.entries = [], this.bookmark = null - } - _getNoahArkConditionCandidates(t, s) { - const a = [], - i = s.length, - n = this.treeAdapter.getTagName(t), - o = this.treeAdapter.getNamespaceURI(t); - for (let d = 0; d < this.entries.length; d++) { - const T = this.entries[d]; - if (T.type === oe.Marker) break; - const { - element: E - } = T; - if (this.treeAdapter.getTagName(E) === n && this.treeAdapter.getNamespaceURI(E) === o) { - const b = this.treeAdapter.getAttrList(E); - b.length === i && a.push({ - idx: d, - attrs: b - }) - } - } - return a - } - _ensureNoahArkCondition(t) { - if (this.entries.length < es) return; - const s = this.treeAdapter.getAttrList(t), - a = this._getNoahArkConditionCandidates(t, s); - if (a.length < es) return; - const i = new Map(s.map(o => [o.name, o.value])); - let n = 0; - for (let o = 0; o < a.length; o++) { - const d = a[o]; - d.attrs.every(T => i.get(T.name) === T.value) && (n += 1, n >= es && this.entries.splice(d.idx, 1)) - } - } - insertMarker() { - this.entries.unshift(nu) - } - pushElement(t, s) { - this._ensureNoahArkCondition(t), this.entries.unshift({ - type: oe.Element, - element: t, - token: s - }) - } - insertElementAfterBookmark(t, s) { - const a = this.entries.indexOf(this.bookmark); - this.entries.splice(a, 0, { - type: oe.Element, - element: t, - token: s - }) - } - removeEntry(t) { - const s = this.entries.indexOf(t); - s >= 0 && this.entries.splice(s, 1) - } - clearToLastMarker() { - const t = this.entries.indexOf(nu); - t >= 0 ? this.entries.splice(0, t + 1) : this.entries.length = 0 - } - getElementEntryInScopeWithTagName(t) { - const s = this.entries.find(a => a.type === oe.Marker || this.treeAdapter.getTagName(a.element) === t); - return s && s.type === oe.Element ? s : null - } - getElementEntry(t) { - return this.entries.find(s => s.type === oe.Element && s.element === t) - } -} - -function ru(e) { - return { - nodeName: "#text", - value: e, - parentNode: null - } -} -const Be = { - createDocument() { - return { - nodeName: "#document", - mode: te.NO_QUIRKS, - childNodes: [] - } - }, - createDocumentFragment() { - return { - nodeName: "#document-fragment", - childNodes: [] - } - }, - createElement(e, t, s) { - return { - nodeName: e, - tagName: e, - attrs: s, - namespaceURI: t, - childNodes: [], - parentNode: null - } - }, - createCommentNode(e) { - return { - nodeName: "#comment", - data: e, - parentNode: null - } - }, - appendChild(e, t) { - e.childNodes.push(t), t.parentNode = e - }, - insertBefore(e, t, s) { - const a = e.childNodes.indexOf(s); - e.childNodes.splice(a, 0, t), t.parentNode = e - }, - setTemplateContent(e, t) { - e.content = t - }, - getTemplateContent(e) { - return e.content - }, - setDocumentType(e, t, s, a) { - const i = e.childNodes.find(n => n.nodeName === "#documentType"); - if (i) i.name = t, i.publicId = s, i.systemId = a; - else { - const n = { - nodeName: "#documentType", - name: t, - publicId: s, - systemId: a, - parentNode: null - }; - Be.appendChild(e, n) - } - }, - setDocumentMode(e, t) { - e.mode = t - }, - getDocumentMode(e) { - return e.mode - }, - detachNode(e) { - if (e.parentNode) { - const t = e.parentNode.childNodes.indexOf(e); - e.parentNode.childNodes.splice(t, 1), e.parentNode = null - } - }, - insertText(e, t) { - if (e.childNodes.length > 0) { - const s = e.childNodes[e.childNodes.length - 1]; - if (Be.isTextNode(s)) { - s.value += t; - return - } - } - Be.appendChild(e, ru(t)) - }, - insertTextBefore(e, t, s) { - const a = e.childNodes[e.childNodes.indexOf(s) - 1]; - a && Be.isTextNode(a) ? a.value += t : Be.insertBefore(e, ru(t), s) - }, - adoptAttributes(e, t) { - const s = new Set(e.attrs.map(a => a.name)); - for (let a = 0; a < t.length; a++) s.has(t[a].name) || e.attrs.push(t[a]) - }, - getFirstChild(e) { - return e.childNodes[0] - }, - getChildNodes(e) { - return e.childNodes - }, - getParentNode(e) { - return e.parentNode - }, - getAttrList(e) { - return e.attrs - }, - getTagName(e) { - return e.tagName - }, - getNamespaceURI(e) { - return e.namespaceURI - }, - getTextNodeContent(e) { - return e.value - }, - getCommentNodeContent(e) { - return e.data - }, - getDocumentTypeNodeName(e) { - return e.name - }, - getDocumentTypeNodePublicId(e) { - return e.publicId - }, - getDocumentTypeNodeSystemId(e) { - return e.systemId - }, - isTextNode(e) { - return e.nodeName === "#text" - }, - isCommentNode(e) { - return e.nodeName === "#comment" - }, - isDocumentTypeNode(e) { - return e.nodeName === "#documentType" - }, - isElementNode(e) { - return Object.prototype.hasOwnProperty.call(e, "tagName") - }, - setNodeSourceCodeLocation(e, t) { - e.sourceCodeLocation = t - }, - getNodeSourceCodeLocation(e) { - return e.sourceCodeLocation - }, - updateNodeSourceCodeLocation(e, t) { - e.sourceCodeLocation = { - ...e.sourceCodeLocation, - ...t - } - } - }, - Qu = "html", - Di = "about:legacy-compat", - xi = "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd", - Xu = ["+//silmaril//dtd html pro v0r11 19970101//", "-//as//dtd html 3.0 aswedit + extensions//", "-//advasoft ltd//dtd html 3.0 aswedit + extensions//", "-//ietf//dtd html 2.0 level 1//", "-//ietf//dtd html 2.0 level 2//", "-//ietf//dtd html 2.0 strict level 1//", "-//ietf//dtd html 2.0 strict level 2//", "-//ietf//dtd html 2.0 strict//", "-//ietf//dtd html 2.0//", "-//ietf//dtd html 2.1e//", "-//ietf//dtd html 3.0//", "-//ietf//dtd html 3.2 final//", "-//ietf//dtd html 3.2//", "-//ietf//dtd html 3//", "-//ietf//dtd html level 0//", "-//ietf//dtd html level 1//", "-//ietf//dtd html level 2//", "-//ietf//dtd html level 3//", "-//ietf//dtd html strict level 0//", "-//ietf//dtd html strict level 1//", "-//ietf//dtd html strict level 2//", "-//ietf//dtd html strict level 3//", "-//ietf//dtd html strict//", "-//ietf//dtd html//", "-//metrius//dtd metrius presentational//", "-//microsoft//dtd internet explorer 2.0 html strict//", "-//microsoft//dtd internet explorer 2.0 html//", "-//microsoft//dtd internet explorer 2.0 tables//", "-//microsoft//dtd internet explorer 3.0 html strict//", "-//microsoft//dtd internet explorer 3.0 html//", "-//microsoft//dtd internet explorer 3.0 tables//", "-//netscape comm. corp.//dtd html//", "-//netscape comm. corp.//dtd strict html//", "-//o'reilly and associates//dtd html 2.0//", "-//o'reilly and associates//dtd html extended 1.0//", "-//o'reilly and associates//dtd html extended relaxed 1.0//", "-//sq//dtd html 2.0 hotmetal + extensions//", "-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//", "-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//", "-//spyglass//dtd html 2.0 extended//", "-//sun microsystems corp.//dtd hotjava html//", "-//sun microsystems corp.//dtd hotjava strict html//", "-//w3c//dtd html 3 1995-03-24//", "-//w3c//dtd html 3.2 draft//", "-//w3c//dtd html 3.2 final//", "-//w3c//dtd html 3.2//", "-//w3c//dtd html 3.2s draft//", "-//w3c//dtd html 4.0 frameset//", "-//w3c//dtd html 4.0 transitional//", "-//w3c//dtd html experimental 19960712//", "-//w3c//dtd html experimental 970421//", "-//w3c//dtd w3 html//", "-//w3o//dtd w3 html 3.0//", "-//webtechs//dtd mozilla html 2.0//", "-//webtechs//dtd mozilla html//"], - Mi = [...Xu, "-//w3c//dtd html 4.01 frameset//", "-//w3c//dtd html 4.01 transitional//"], - Pi = new Set(["-//w3o//dtd w3 html strict 3.0//en//", "-/w3c/dtd html 4.0 transitional/en", "html"]), - Ku = ["-//w3c//dtd xhtml 1.0 frameset//", "-//w3c//dtd xhtml 1.0 transitional//"], - Bi = [...Ku, "-//w3c//dtd html 4.01 frameset//", "-//w3c//dtd html 4.01 transitional//"]; - -function cu(e, t) { - return t.some(s => e.startsWith(s)) -} - -function yi(e) { - return e.name === Qu && e.publicId === null && (e.systemId === null || e.systemId === Di) -} - -function ki(e) { - if (e.name !== Qu) return te.QUIRKS; - const { - systemId: t - } = e; - if (t && t.toLowerCase() === xi) return te.QUIRKS; - let { - publicId: s - } = e; - if (s !== null) { - if (s = s.toLowerCase(), Pi.has(s)) return te.QUIRKS; - let a = t === null ? Mi : Xu; - if (cu(s, a)) return te.QUIRKS; - if (a = t === null ? Ku : Bi, cu(s, a)) return te.LIMITED_QUIRKS - } - return te.NO_QUIRKS -} -const ou = { - TEXT_HTML: "text/html", - APPLICATION_XML: "application/xhtml+xml" - }, - Fi = "definitionurl", - Hi = "definitionURL", - Ui = new Map(["attributeName", "attributeType", "baseFrequency", "baseProfile", "calcMode", "clipPathUnits", "diffuseConstant", "edgeMode", "filterUnits", "glyphRef", "gradientTransform", "gradientUnits", "kernelMatrix", "kernelUnitLength", "keyPoints", "keySplines", "keyTimes", "lengthAdjust", "limitingConeAngle", "markerHeight", "markerUnits", "markerWidth", "maskContentUnits", "maskUnits", "numOctaves", "pathLength", "patternContentUnits", "patternTransform", "patternUnits", "pointsAtX", "pointsAtY", "pointsAtZ", "preserveAlpha", "preserveAspectRatio", "primitiveUnits", "refX", "refY", "repeatCount", "repeatDur", "requiredExtensions", "requiredFeatures", "specularConstant", "specularExponent", "spreadMethod", "startOffset", "stdDeviation", "stitchTiles", "surfaceScale", "systemLanguage", "tableValues", "targetX", "targetY", "textLength", "viewBox", "viewTarget", "xChannelSelector", "yChannelSelector", "zoomAndPan"].map(e => [e.toLowerCase(), e])), - wi = new Map([ - ["xlink:actuate", { - prefix: "xlink", - name: "actuate", - namespace: _.XLINK - }], - ["xlink:arcrole", { - prefix: "xlink", - name: "arcrole", - namespace: _.XLINK - }], - ["xlink:href", { - prefix: "xlink", - name: "href", - namespace: _.XLINK - }], - ["xlink:role", { - prefix: "xlink", - name: "role", - namespace: _.XLINK - }], - ["xlink:show", { - prefix: "xlink", - name: "show", - namespace: _.XLINK - }], - ["xlink:title", { - prefix: "xlink", - name: "title", - namespace: _.XLINK - }], - ["xlink:type", { - prefix: "xlink", - name: "type", - namespace: _.XLINK - }], - ["xml:base", { - prefix: "xml", - name: "base", - namespace: _.XML - }], - ["xml:lang", { - prefix: "xml", - name: "lang", - namespace: _.XML - }], - ["xml:space", { - prefix: "xml", - name: "space", - namespace: _.XML - }], - ["xmlns", { - prefix: "", - name: "xmlns", - namespace: _.XMLNS - }], - ["xmlns:xlink", { - prefix: "xmlns", - name: "xlink", - namespace: _.XMLNS - }] - ]), - vi = new Map(["altGlyph", "altGlyphDef", "altGlyphItem", "animateColor", "animateMotion", "animateTransform", "clipPath", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "foreignObject", "glyphRef", "linearGradient", "radialGradient", "textPath"].map(e => [e.toLowerCase(), e])), - Yi = new Set([u.B, u.BIG, u.BLOCKQUOTE, u.BODY, u.BR, u.CENTER, u.CODE, u.DD, u.DIV, u.DL, u.DT, u.EM, u.EMBED, u.H1, u.H2, u.H3, u.H4, u.H5, u.H6, u.HEAD, u.HR, u.I, u.IMG, u.LI, u.LISTING, u.MENU, u.META, u.NOBR, u.OL, u.P, u.PRE, u.RUBY, u.S, u.SMALL, u.SPAN, u.STRONG, u.STRIKE, u.SUB, u.SUP, u.TABLE, u.TT, u.U, u.UL, u.VAR]); - -function $i(e) { - const t = e.tagID; - return t === u.FONT && e.attrs.some(({ - name: a - }) => a === Se.COLOR || a === Se.SIZE || a === Se.FACE) || Yi.has(t) -} - -function zu(e) { - for (let t = 0; t < e.attrs.length; t++) - if (e.attrs[t].name === Fi) { - e.attrs[t].name = Hi; - break - } -} - -function ju(e) { - for (let t = 0; t < e.attrs.length; t++) { - const s = Ui.get(e.attrs[t].name); - s != null && (e.attrs[t].name = s) - } -} - -function gs(e) { - for (let t = 0; t < e.attrs.length; t++) { - const s = wi.get(e.attrs[t].name); - s && (e.attrs[t].prefix = s.prefix, e.attrs[t].name = s.name, e.attrs[t].namespace = s.namespace) - } -} - -function qi(e) { - const t = vi.get(e.tagName); - t != null && (e.tagName = t, e.tagID = Ft(e.tagName)) -} - -function Gi(e, t) { - return t === _.MATHML && (e === u.MI || e === u.MO || e === u.MN || e === u.MS || e === u.MTEXT) -} - -function Wi(e, t, s) { - if (t === _.MATHML && e === u.ANNOTATION_XML) { - for (let a = 0; a < s.length; a++) - if (s[a].name === Se.ENCODING) { - const i = s[a].value.toLowerCase(); - return i === ou.TEXT_HTML || i === ou.APPLICATION_XML - } - } - return t === _.SVG && (e === u.FOREIGN_OBJECT || e === u.DESC || e === u.TITLE) -} - -function Vi(e, t, s, a) { - return (!a || a === _.HTML) && Wi(e, t, s) || (!a || a === _.MATHML) && Gi(e, t) -} -const Qi = "hidden", - Xi = 8, - Ki = 3; -var l; -(function (e) { - e[e.INITIAL = 0] = "INITIAL", e[e.BEFORE_HTML = 1] = "BEFORE_HTML", e[e.BEFORE_HEAD = 2] = "BEFORE_HEAD", e[e.IN_HEAD = 3] = "IN_HEAD", e[e.IN_HEAD_NO_SCRIPT = 4] = "IN_HEAD_NO_SCRIPT", e[e.AFTER_HEAD = 5] = "AFTER_HEAD", e[e.IN_BODY = 6] = "IN_BODY", e[e.TEXT = 7] = "TEXT", e[e.IN_TABLE = 8] = "IN_TABLE", e[e.IN_TABLE_TEXT = 9] = "IN_TABLE_TEXT", e[e.IN_CAPTION = 10] = "IN_CAPTION", e[e.IN_COLUMN_GROUP = 11] = "IN_COLUMN_GROUP", e[e.IN_TABLE_BODY = 12] = "IN_TABLE_BODY", e[e.IN_ROW = 13] = "IN_ROW", e[e.IN_CELL = 14] = "IN_CELL", e[e.IN_SELECT = 15] = "IN_SELECT", e[e.IN_SELECT_IN_TABLE = 16] = "IN_SELECT_IN_TABLE", e[e.IN_TEMPLATE = 17] = "IN_TEMPLATE", e[e.AFTER_BODY = 18] = "AFTER_BODY", e[e.IN_FRAMESET = 19] = "IN_FRAMESET", e[e.AFTER_FRAMESET = 20] = "AFTER_FRAMESET", e[e.AFTER_AFTER_BODY = 21] = "AFTER_AFTER_BODY", e[e.AFTER_AFTER_FRAMESET = 22] = "AFTER_AFTER_FRAMESET" -})(l || (l = {})); -const zi = { - startLine: -1, - startCol: -1, - startOffset: -1, - endLine: -1, - endCol: -1, - endOffset: -1 - }, - Ju = new Set([u.TABLE, u.TBODY, u.TFOOT, u.THEAD, u.TR]), - lu = { - scriptingEnabled: !0, - sourceCodeLocationInfo: !1, - treeAdapter: Be, - onParseError: null - }; -let Zu = class { - constructor(t, s, a = null, i = null) { - this.fragmentContext = a, this.scriptHandler = i, this.currentToken = null, this.stopped = !1, this.insertionMode = l.INITIAL, this.originalInsertionMode = l.INITIAL, this.headElement = null, this.formElement = null, this.currentNotInHTML = !1, this.tmplInsertionModeStack = [], this.pendingCharacterTokens = [], this.hasNonWhitespacePendingCharacterToken = !1, this.framesetOk = !0, this.skipNextNewLine = !1, this.fosterParentingEnabled = !1, this.options = { - ...lu, - ...t - }, this.treeAdapter = this.options.treeAdapter, this.onParseError = this.options.onParseError, this.onParseError && (this.options.sourceCodeLocationInfo = !0), this.document = s ?? this.treeAdapter.createDocument(), this.tokenizer = new Ii(this.options, this), this.activeFormattingElements = new Oi(this.treeAdapter), this.fragmentContextID = a ? Ft(this.treeAdapter.getTagName(a)) : u.UNKNOWN, this._setContextModes(a ?? this.document, this.fragmentContextID), this.openElements = new Li(this.document, this.treeAdapter, this) - } - static parse(t, s) { - const a = new this(s); - return a.tokenizer.write(t, !0), a.document - } - static getFragmentParser(t, s) { - const a = { - ...lu, - ...s - }; - t ?? (t = a.treeAdapter.createElement(f.TEMPLATE, _.HTML, [])); - const i = a.treeAdapter.createElement("documentmock", _.HTML, []), - n = new this(a, i, t); - return n.fragmentContextID === u.TEMPLATE && n.tmplInsertionModeStack.unshift(l.IN_TEMPLATE), n._initTokenizerForFragmentParsing(), n._insertFakeRootElement(), n._resetInsertionMode(), n._findFormInFragmentContext(), n - } - getFragment() { - const t = this.treeAdapter.getFirstChild(this.document), - s = this.treeAdapter.createDocumentFragment(); - return this._adoptNodes(t, s), s - } - _err(t, s, a) { - var i; - if (!this.onParseError) return; - const n = (i = t.location) !== null && i !== void 0 ? i : zi, - o = { - code: s, - startLine: n.startLine, - startCol: n.startCol, - startOffset: n.startOffset, - endLine: a ? n.startLine : n.endLine, - endCol: a ? n.startCol : n.endCol, - endOffset: a ? n.startOffset : n.endOffset - }; - this.onParseError(o) - } - onItemPush(t, s, a) { - var i, n; - (n = (i = this.treeAdapter).onItemPush) === null || n === void 0 || n.call(i, t), a && this.openElements.stackTop > 0 && this._setContextModes(t, s) - } - onItemPop(t, s) { - var a, i; - if (this.options.sourceCodeLocationInfo && this._setEndLocation(t, this.currentToken), (i = (a = this.treeAdapter).onItemPop) === null || i === void 0 || i.call(a, t, this.openElements.current), s) { - let n, o; - this.openElements.stackTop === 0 && this.fragmentContext ? (n = this.fragmentContext, o = this.fragmentContextID) : { - current: n, - currentTagId: o - } = this.openElements, this._setContextModes(n, o) - } - } - _setContextModes(t, s) { - const a = t === this.document || this.treeAdapter.getNamespaceURI(t) === _.HTML; - this.currentNotInHTML = !a, this.tokenizer.inForeignNode = !a && !this._isIntegrationPoint(s, t) - } - _switchToTextParsing(t, s) { - this._insertElement(t, _.HTML), this.tokenizer.state = s, this.originalInsertionMode = this.insertionMode, this.insertionMode = l.TEXT - } - switchToPlaintextParsing() { - this.insertionMode = l.TEXT, this.originalInsertionMode = l.IN_BODY, this.tokenizer.state = se.PLAINTEXT - } - _getAdjustedCurrentElement() { - return this.openElements.stackTop === 0 && this.fragmentContext ? this.fragmentContext : this.openElements.current - } - _findFormInFragmentContext() { - let t = this.fragmentContext; - for (; t;) { - if (this.treeAdapter.getTagName(t) === f.FORM) { - this.formElement = t; - break - } - t = this.treeAdapter.getParentNode(t) - } - } - _initTokenizerForFragmentParsing() { - if (!(!this.fragmentContext || this.treeAdapter.getNamespaceURI(this.fragmentContext) !== _.HTML)) switch (this.fragmentContextID) { - case u.TITLE: - case u.TEXTAREA: { - this.tokenizer.state = se.RCDATA; - break - } - case u.STYLE: - case u.XMP: - case u.IFRAME: - case u.NOEMBED: - case u.NOFRAMES: - case u.NOSCRIPT: { - this.tokenizer.state = se.RAWTEXT; - break - } - case u.SCRIPT: { - this.tokenizer.state = se.SCRIPT_DATA; - break - } - case u.PLAINTEXT: { - this.tokenizer.state = se.PLAINTEXT; - break - } - } - } - _setDocumentType(t) { - const s = t.name || "", - a = t.publicId || "", - i = t.systemId || ""; - if (this.treeAdapter.setDocumentType(this.document, s, a, i), t.location) { - const o = this.treeAdapter.getChildNodes(this.document).find(d => this.treeAdapter.isDocumentTypeNode(d)); - o && this.treeAdapter.setNodeSourceCodeLocation(o, t.location) - } - } - _attachElementToTree(t, s) { - if (this.options.sourceCodeLocationInfo) { - const a = s && { - ...s, - startTag: s - }; - this.treeAdapter.setNodeSourceCodeLocation(t, a) - } - if (this._shouldFosterParentOnInsertion()) this._fosterParentElement(t); - else { - const a = this.openElements.currentTmplContentOrNode; - this.treeAdapter.appendChild(a, t) - } - } - _appendElement(t, s) { - const a = this.treeAdapter.createElement(t.tagName, s, t.attrs); - this._attachElementToTree(a, t.location) - } - _insertElement(t, s) { - const a = this.treeAdapter.createElement(t.tagName, s, t.attrs); - this._attachElementToTree(a, t.location), this.openElements.push(a, t.tagID) - } - _insertFakeElement(t, s) { - const a = this.treeAdapter.createElement(t, _.HTML, []); - this._attachElementToTree(a, null), this.openElements.push(a, s) - } - _insertTemplate(t) { - const s = this.treeAdapter.createElement(t.tagName, _.HTML, t.attrs), - a = this.treeAdapter.createDocumentFragment(); - this.treeAdapter.setTemplateContent(s, a), this._attachElementToTree(s, t.location), this.openElements.push(s, t.tagID), this.options.sourceCodeLocationInfo && this.treeAdapter.setNodeSourceCodeLocation(a, null) - } - _insertFakeRootElement() { - const t = this.treeAdapter.createElement(f.HTML, _.HTML, []); - this.options.sourceCodeLocationInfo && this.treeAdapter.setNodeSourceCodeLocation(t, null), this.treeAdapter.appendChild(this.openElements.current, t), this.openElements.push(t, u.HTML) - } - _appendCommentNode(t, s) { - const a = this.treeAdapter.createCommentNode(t.data); - this.treeAdapter.appendChild(s, a), this.options.sourceCodeLocationInfo && this.treeAdapter.setNodeSourceCodeLocation(a, t.location) - } - _insertCharacters(t) { - let s, a; - if (this._shouldFosterParentOnInsertion() ? ({ - parent: s, - beforeElement: a - } = this._findFosterParentingLocation(), a ? this.treeAdapter.insertTextBefore(s, t.chars, a) : this.treeAdapter.insertText(s, t.chars)) : (s = this.openElements.currentTmplContentOrNode, this.treeAdapter.insertText(s, t.chars)), !t.location) return; - const i = this.treeAdapter.getChildNodes(s), - n = a ? i.lastIndexOf(a) : i.length, - o = i[n - 1]; - if (this.treeAdapter.getNodeSourceCodeLocation(o)) { - const { - endLine: T, - endCol: E, - endOffset: b - } = t.location; - this.treeAdapter.updateNodeSourceCodeLocation(o, { - endLine: T, - endCol: E, - endOffset: b - }) - } else this.options.sourceCodeLocationInfo && this.treeAdapter.setNodeSourceCodeLocation(o, t.location) - } - _adoptNodes(t, s) { - for (let a = this.treeAdapter.getFirstChild(t); a; a = this.treeAdapter.getFirstChild(t)) this.treeAdapter.detachNode(a), this.treeAdapter.appendChild(s, a) - } - _setEndLocation(t, s) { - if (this.treeAdapter.getNodeSourceCodeLocation(t) && s.location) { - const a = s.location, - i = this.treeAdapter.getTagName(t), - n = s.type === M.END_TAG && i === s.tagName ? { - endTag: { - ...a - }, - endLine: a.endLine, - endCol: a.endCol, - endOffset: a.endOffset - } : { - endLine: a.startLine, - endCol: a.startCol, - endOffset: a.startOffset - }; - this.treeAdapter.updateNodeSourceCodeLocation(t, n) - } - } - shouldProcessStartTagTokenInForeignContent(t) { - if (!this.currentNotInHTML) return !1; - let s, a; - return this.openElements.stackTop === 0 && this.fragmentContext ? (s = this.fragmentContext, a = this.fragmentContextID) : { - current: s, - currentTagId: a - } = this.openElements, t.tagID === u.SVG && this.treeAdapter.getTagName(s) === f.ANNOTATION_XML && this.treeAdapter.getNamespaceURI(s) === _.MATHML ? !1 : this.tokenizer.inForeignNode || (t.tagID === u.MGLYPH || t.tagID === u.MALIGNMARK) && !this._isIntegrationPoint(a, s, _.HTML) - } - _processToken(t) { - switch (t.type) { - case M.CHARACTER: { - this.onCharacter(t); - break - } - case M.NULL_CHARACTER: { - this.onNullCharacter(t); - break - } - case M.COMMENT: { - this.onComment(t); - break - } - case M.DOCTYPE: { - this.onDoctype(t); - break - } - case M.START_TAG: { - this._processStartTag(t); - break - } - case M.END_TAG: { - this.onEndTag(t); - break - } - case M.EOF: { - this.onEof(t); - break - } - case M.WHITESPACE_CHARACTER: { - this.onWhitespaceCharacter(t); - break - } - } - } - _isIntegrationPoint(t, s, a) { - const i = this.treeAdapter.getNamespaceURI(s), - n = this.treeAdapter.getAttrList(s); - return Vi(t, i, n, a) - } - _reconstructActiveFormattingElements() { - const t = this.activeFormattingElements.entries.length; - if (t) { - const s = this.activeFormattingElements.entries.findIndex(i => i.type === oe.Marker || this.openElements.contains(i.element)), - a = s < 0 ? t - 1 : s - 1; - for (let i = a; i >= 0; i--) { - const n = this.activeFormattingElements.entries[i]; - this._insertElement(n.token, this.treeAdapter.getNamespaceURI(n.element)), n.element = this.openElements.current - } - } - } - _closeTableCell() { - this.openElements.generateImpliedEndTags(), this.openElements.popUntilTableCellPopped(), this.activeFormattingElements.clearToLastMarker(), this.insertionMode = l.IN_ROW - } - _closePElement() { - this.openElements.generateImpliedEndTagsWithExclusion(u.P), this.openElements.popUntilTagNamePopped(u.P) - } - _resetInsertionMode() { - for (let t = this.openElements.stackTop; t >= 0; t--) switch (t === 0 && this.fragmentContext ? this.fragmentContextID : this.openElements.tagIDs[t]) { - case u.TR: { - this.insertionMode = l.IN_ROW; - return - } - case u.TBODY: - case u.THEAD: - case u.TFOOT: { - this.insertionMode = l.IN_TABLE_BODY; - return - } - case u.CAPTION: { - this.insertionMode = l.IN_CAPTION; - return - } - case u.COLGROUP: { - this.insertionMode = l.IN_COLUMN_GROUP; - return - } - case u.TABLE: { - this.insertionMode = l.IN_TABLE; - return - } - case u.BODY: { - this.insertionMode = l.IN_BODY; - return - } - case u.FRAMESET: { - this.insertionMode = l.IN_FRAMESET; - return - } - case u.SELECT: { - this._resetInsertionModeForSelect(t); - return - } - case u.TEMPLATE: { - this.insertionMode = this.tmplInsertionModeStack[0]; - return - } - case u.HTML: { - this.insertionMode = this.headElement ? l.AFTER_HEAD : l.BEFORE_HEAD; - return - } - case u.TD: - case u.TH: { - if (t > 0) { - this.insertionMode = l.IN_CELL; - return - } - break - } - case u.HEAD: { - if (t > 0) { - this.insertionMode = l.IN_HEAD; - return - } - break - } - } - this.insertionMode = l.IN_BODY - } - _resetInsertionModeForSelect(t) { - if (t > 0) - for (let s = t - 1; s > 0; s--) { - const a = this.openElements.tagIDs[s]; - if (a === u.TEMPLATE) break; - if (a === u.TABLE) { - this.insertionMode = l.IN_SELECT_IN_TABLE; - return - } - } - this.insertionMode = l.IN_SELECT - } - _isElementCausesFosterParenting(t) { - return Ju.has(t) - } - _shouldFosterParentOnInsertion() { - return this.fosterParentingEnabled && this._isElementCausesFosterParenting(this.openElements.currentTagId) - } - _findFosterParentingLocation() { - for (let t = this.openElements.stackTop; t >= 0; t--) { - const s = this.openElements.items[t]; - switch (this.openElements.tagIDs[t]) { - case u.TEMPLATE: { - if (this.treeAdapter.getNamespaceURI(s) === _.HTML) return { - parent: this.treeAdapter.getTemplateContent(s), - beforeElement: null - }; - break - } - case u.TABLE: { - const a = this.treeAdapter.getParentNode(s); - return a ? { - parent: a, - beforeElement: s - } : { - parent: this.openElements.items[t - 1], - beforeElement: null - } - } - } - } - return { - parent: this.openElements.items[0], - beforeElement: null - } - } - _fosterParentElement(t) { - const s = this._findFosterParentingLocation(); - s.beforeElement ? this.treeAdapter.insertBefore(s.parent, t, s.beforeElement) : this.treeAdapter.appendChild(s.parent, t) - } - _isSpecialElement(t, s) { - const a = this.treeAdapter.getNamespaceURI(t); - return Ei[a].has(s) - } - onCharacter(t) { - if (this.skipNextNewLine = !1, this.tokenizer.inForeignNode) { - Lr(this, t); - return - } - switch (this.insertionMode) { - case l.INITIAL: { - Ze(this, t); - break - } - case l.BEFORE_HTML: { - nt(this, t); - break - } - case l.BEFORE_HEAD: { - rt(this, t); - break - } - case l.IN_HEAD: { - ct(this, t); - break - } - case l.IN_HEAD_NO_SCRIPT: { - ot(this, t); - break - } - case l.AFTER_HEAD: { - lt(this, t); - break - } - case l.IN_BODY: - case l.IN_CAPTION: - case l.IN_CELL: - case l.IN_TEMPLATE: { - ta(this, t); - break - } - case l.TEXT: - case l.IN_SELECT: - case l.IN_SELECT_IN_TABLE: { - this._insertCharacters(t); - break - } - case l.IN_TABLE: - case l.IN_TABLE_BODY: - case l.IN_ROW: { - ts(this, t); - break - } - case l.IN_TABLE_TEXT: { - ra(this, t); - break - } - case l.IN_COLUMN_GROUP: { - Bt(this, t); - break - } - case l.AFTER_BODY: { - yt(this, t); - break - } - case l.AFTER_AFTER_BODY: { - Mt(this, t); - break - } - } - } - onNullCharacter(t) { - if (this.skipNextNewLine = !1, this.tokenizer.inForeignNode) { - Rr(this, t); - return - } - switch (this.insertionMode) { - case l.INITIAL: { - Ze(this, t); - break - } - case l.BEFORE_HTML: { - nt(this, t); - break - } - case l.BEFORE_HEAD: { - rt(this, t); - break - } - case l.IN_HEAD: { - ct(this, t); - break - } - case l.IN_HEAD_NO_SCRIPT: { - ot(this, t); - break - } - case l.AFTER_HEAD: { - lt(this, t); - break - } - case l.TEXT: { - this._insertCharacters(t); - break - } - case l.IN_TABLE: - case l.IN_TABLE_BODY: - case l.IN_ROW: { - ts(this, t); - break - } - case l.IN_COLUMN_GROUP: { - Bt(this, t); - break - } - case l.AFTER_BODY: { - yt(this, t); - break - } - case l.AFTER_AFTER_BODY: { - Mt(this, t); - break - } - } - } - onComment(t) { - if (this.skipNextNewLine = !1, this.currentNotInHTML) { - ds(this, t); - return - } - switch (this.insertionMode) { - case l.INITIAL: - case l.BEFORE_HTML: - case l.BEFORE_HEAD: - case l.IN_HEAD: - case l.IN_HEAD_NO_SCRIPT: - case l.AFTER_HEAD: - case l.IN_BODY: - case l.IN_TABLE: - case l.IN_CAPTION: - case l.IN_COLUMN_GROUP: - case l.IN_TABLE_BODY: - case l.IN_ROW: - case l.IN_CELL: - case l.IN_SELECT: - case l.IN_SELECT_IN_TABLE: - case l.IN_TEMPLATE: - case l.IN_FRAMESET: - case l.AFTER_FRAMESET: { - ds(this, t); - break - } - case l.IN_TABLE_TEXT: { - et(this, t); - break - } - case l.AFTER_BODY: { - un(this, t); - break - } - case l.AFTER_AFTER_BODY: - case l.AFTER_AFTER_FRAMESET: { - an(this, t); - break - } - } - } - onDoctype(t) { - switch (this.skipNextNewLine = !1, this.insertionMode) { - case l.INITIAL: { - nn(this, t); - break - } - case l.BEFORE_HEAD: - case l.IN_HEAD: - case l.IN_HEAD_NO_SCRIPT: - case l.AFTER_HEAD: { - this._err(t, m.misplacedDoctype); - break - } - case l.IN_TABLE_TEXT: { - et(this, t); - break - } - } - } - onStartTag(t) { - this.skipNextNewLine = !1, this.currentToken = t, this._processStartTag(t), t.selfClosing && !t.ackSelfClosing && this._err(t, m.nonVoidHtmlElementStartTagWithTrailingSolidus) - } - _processStartTag(t) { - this.shouldProcessStartTagTokenInForeignContent(t) ? Or(this, t) : this._startTagOutsideForeignContent(t) - } - _startTagOutsideForeignContent(t) { - switch (this.insertionMode) { - case l.INITIAL: { - Ze(this, t); - break - } - case l.BEFORE_HTML: { - rn(this, t); - break - } - case l.BEFORE_HEAD: { - on(this, t); - break - } - case l.IN_HEAD: { - de(this, t); - break - } - case l.IN_HEAD_NO_SCRIPT: { - hn(this, t); - break - } - case l.AFTER_HEAD: { - En(this, t); - break - } - case l.IN_BODY: { - X(this, t); - break - } - case l.IN_TABLE: { - Ve(this, t); - break - } - case l.IN_TABLE_TEXT: { - et(this, t); - break - } - case l.IN_CAPTION: { - lr(this, t); - break - } - case l.IN_COLUMN_GROUP: { - Rs(this, t); - break - } - case l.IN_TABLE_BODY: { - wt(this, t); - break - } - case l.IN_ROW: { - vt(this, t); - break - } - case l.IN_CELL: { - fr(this, t); - break - } - case l.IN_SELECT: { - la(this, t); - break - } - case l.IN_SELECT_IN_TABLE: { - Tr(this, t); - break - } - case l.IN_TEMPLATE: { - _r(this, t); - break - } - case l.AFTER_BODY: { - Ar(this, t); - break - } - case l.IN_FRAMESET: { - pr(this, t); - break - } - case l.AFTER_FRAMESET: { - Nr(this, t); - break - } - case l.AFTER_AFTER_BODY: { - Cr(this, t); - break - } - case l.AFTER_AFTER_FRAMESET: { - Sr(this, t); - break - } - } - } - onEndTag(t) { - this.skipNextNewLine = !1, this.currentToken = t, this.currentNotInHTML ? Dr(this, t) : this._endTagOutsideForeignContent(t) - } - _endTagOutsideForeignContent(t) { - switch (this.insertionMode) { - case l.INITIAL: { - Ze(this, t); - break - } - case l.BEFORE_HTML: { - cn(this, t); - break - } - case l.BEFORE_HEAD: { - ln(this, t); - break - } - case l.IN_HEAD: { - dn(this, t); - break - } - case l.IN_HEAD_NO_SCRIPT: { - fn(this, t); - break - } - case l.AFTER_HEAD: { - Tn(this, t); - break - } - case l.IN_BODY: { - Ut(this, t); - break - } - case l.TEXT: { - er(this, t); - break - } - case l.IN_TABLE: { - dt(this, t); - break - } - case l.IN_TABLE_TEXT: { - et(this, t); - break - } - case l.IN_CAPTION: { - dr(this, t); - break - } - case l.IN_COLUMN_GROUP: { - hr(this, t); - break - } - case l.IN_TABLE_BODY: { - hs(this, t); - break - } - case l.IN_ROW: { - oa(this, t); - break - } - case l.IN_CELL: { - Er(this, t); - break - } - case l.IN_SELECT: { - da(this, t); - break - } - case l.IN_SELECT_IN_TABLE: { - mr(this, t); - break - } - case l.IN_TEMPLATE: { - br(this, t); - break - } - case l.AFTER_BODY: { - fa(this, t); - break - } - case l.IN_FRAMESET: { - Ir(this, t); - break - } - case l.AFTER_FRAMESET: { - gr(this, t); - break - } - case l.AFTER_AFTER_BODY: { - Mt(this, t); - break - } - } - } - onEof(t) { - switch (this.insertionMode) { - case l.INITIAL: { - Ze(this, t); - break - } - case l.BEFORE_HTML: { - nt(this, t); - break - } - case l.BEFORE_HEAD: { - rt(this, t); - break - } - case l.IN_HEAD: { - ct(this, t); - break - } - case l.IN_HEAD_NO_SCRIPT: { - ot(this, t); - break - } - case l.AFTER_HEAD: { - lt(this, t); - break - } - case l.IN_BODY: - case l.IN_TABLE: - case l.IN_CAPTION: - case l.IN_COLUMN_GROUP: - case l.IN_TABLE_BODY: - case l.IN_ROW: - case l.IN_CELL: - case l.IN_SELECT: - case l.IN_SELECT_IN_TABLE: { - ia(this, t); - break - } - case l.TEXT: { - tr(this, t); - break - } - case l.IN_TABLE_TEXT: { - et(this, t); - break - } - case l.IN_TEMPLATE: { - ha(this, t); - break - } - case l.AFTER_BODY: - case l.IN_FRAMESET: - case l.AFTER_FRAMESET: - case l.AFTER_AFTER_BODY: - case l.AFTER_AFTER_FRAMESET: { - Ss(this, t); - break - } - } - } - onWhitespaceCharacter(t) { - if (this.skipNextNewLine && (this.skipNextNewLine = !1, t.chars.charCodeAt(0) === r.LINE_FEED)) { - if (t.chars.length === 1) return; - t.chars = t.chars.substr(1) - } - if (this.tokenizer.inForeignNode) { - this._insertCharacters(t); - return - } - switch (this.insertionMode) { - case l.IN_HEAD: - case l.IN_HEAD_NO_SCRIPT: - case l.AFTER_HEAD: - case l.TEXT: - case l.IN_COLUMN_GROUP: - case l.IN_SELECT: - case l.IN_SELECT_IN_TABLE: - case l.IN_FRAMESET: - case l.AFTER_FRAMESET: { - this._insertCharacters(t); - break - } - case l.IN_BODY: - case l.IN_CAPTION: - case l.IN_CELL: - case l.IN_TEMPLATE: - case l.AFTER_BODY: - case l.AFTER_AFTER_BODY: - case l.AFTER_AFTER_FRAMESET: { - ea(this, t); - break - } - case l.IN_TABLE: - case l.IN_TABLE_BODY: - case l.IN_ROW: { - ts(this, t); - break - } - case l.IN_TABLE_TEXT: { - na(this, t); - break - } - } - } -}; - -function ji(e, t) { - let s = e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName); - return s ? e.openElements.contains(s.element) ? e.openElements.hasInScope(t.tagID) || (s = null) : (e.activeFormattingElements.removeEntry(s), s = null) : aa(e, t), s -} - -function Ji(e, t) { - let s = null, - a = e.openElements.stackTop; - for (; a >= 0; a--) { - const i = e.openElements.items[a]; - if (i === t.element) break; - e._isSpecialElement(i, e.openElements.tagIDs[a]) && (s = i) - } - return s || (e.openElements.shortenToLength(a < 0 ? 0 : a), e.activeFormattingElements.removeEntry(t)), s -} - -function Zi(e, t, s) { - let a = t, - i = e.openElements.getCommonAncestor(t); - for (let n = 0, o = i; o !== s; n++, o = i) { - i = e.openElements.getCommonAncestor(o); - const d = e.activeFormattingElements.getElementEntry(o), - T = d && n >= Ki; - !d || T ? (T && e.activeFormattingElements.removeEntry(d), e.openElements.remove(o)) : (o = en(e, d), a === t && (e.activeFormattingElements.bookmark = d), e.treeAdapter.detachNode(a), e.treeAdapter.appendChild(o, a), a = o) - } - return a -} - -function en(e, t) { - const s = e.treeAdapter.getNamespaceURI(t.element), - a = e.treeAdapter.createElement(t.token.tagName, s, t.token.attrs); - return e.openElements.replace(t.element, a), t.element = a, a -} - -function tn(e, t, s) { - const a = e.treeAdapter.getTagName(t), - i = Ft(a); - if (e._isElementCausesFosterParenting(i)) e._fosterParentElement(s); - else { - const n = e.treeAdapter.getNamespaceURI(t); - i === u.TEMPLATE && n === _.HTML && (t = e.treeAdapter.getTemplateContent(t)), e.treeAdapter.appendChild(t, s) - } -} - -function sn(e, t, s) { - const a = e.treeAdapter.getNamespaceURI(s.element), - { - token: i - } = s, - n = e.treeAdapter.createElement(i.tagName, a, i.attrs); - e._adoptNodes(t, n), e.treeAdapter.appendChild(t, n), e.activeFormattingElements.insertElementAfterBookmark(n, i), e.activeFormattingElements.removeEntry(s), e.openElements.remove(s.element), e.openElements.insertAfter(t, n, i.tagID) -} - -function Cs(e, t) { - for (let s = 0; s < Xi; s++) { - const a = ji(e, t); - if (!a) break; - const i = Ji(e, a); - if (!i) break; - e.activeFormattingElements.bookmark = a; - const n = Zi(e, i, a.element), - o = e.openElements.getCommonAncestor(a.element); - e.treeAdapter.detachNode(n), o && tn(e, o, n), sn(e, i, a) - } -} - -function ds(e, t) { - e._appendCommentNode(t, e.openElements.currentTmplContentOrNode) -} - -function un(e, t) { - e._appendCommentNode(t, e.openElements.items[0]) -} - -function an(e, t) { - e._appendCommentNode(t, e.document) -} - -function Ss(e, t) { - if (e.stopped = !0, t.location) { - const s = e.fragmentContext ? 0 : 2; - for (let a = e.openElements.stackTop; a >= s; a--) e._setEndLocation(e.openElements.items[a], t); - if (!e.fragmentContext && e.openElements.stackTop >= 0) { - const a = e.openElements.items[0], - i = e.treeAdapter.getNodeSourceCodeLocation(a); - if (i && !i.endTag && (e._setEndLocation(a, t), e.openElements.stackTop >= 1)) { - const n = e.openElements.items[1], - o = e.treeAdapter.getNodeSourceCodeLocation(n); - o && !o.endTag && e._setEndLocation(n, t) - } - } - } -} - -function nn(e, t) { - e._setDocumentType(t); - const s = t.forceQuirks ? te.QUIRKS : ki(t); - yi(t) || e._err(t, m.nonConformingDoctype), e.treeAdapter.setDocumentMode(e.document, s), e.insertionMode = l.BEFORE_HTML -} - -function Ze(e, t) { - e._err(t, m.missingDoctype, !0), e.treeAdapter.setDocumentMode(e.document, te.QUIRKS), e.insertionMode = l.BEFORE_HTML, e._processToken(t) -} - -function rn(e, t) { - t.tagID === u.HTML ? (e._insertElement(t, _.HTML), e.insertionMode = l.BEFORE_HEAD) : nt(e, t) -} - -function cn(e, t) { - const s = t.tagID; - (s === u.HTML || s === u.HEAD || s === u.BODY || s === u.BR) && nt(e, t) -} - -function nt(e, t) { - e._insertFakeRootElement(), e.insertionMode = l.BEFORE_HEAD, e._processToken(t) -} - -function on(e, t) { - switch (t.tagID) { - case u.HTML: { - X(e, t); - break - } - case u.HEAD: { - e._insertElement(t, _.HTML), e.headElement = e.openElements.current, e.insertionMode = l.IN_HEAD; - break - } - default: - rt(e, t) - } -} - -function ln(e, t) { - const s = t.tagID; - s === u.HEAD || s === u.BODY || s === u.HTML || s === u.BR ? rt(e, t) : e._err(t, m.endTagWithoutMatchingOpenElement) -} - -function rt(e, t) { - e._insertFakeElement(f.HEAD, u.HEAD), e.headElement = e.openElements.current, e.insertionMode = l.IN_HEAD, e._processToken(t) -} - -function de(e, t) { - switch (t.tagID) { - case u.HTML: { - X(e, t); - break - } - case u.BASE: - case u.BASEFONT: - case u.BGSOUND: - case u.LINK: - case u.META: { - e._appendElement(t, _.HTML), t.ackSelfClosing = !0; - break - } - case u.TITLE: { - e._switchToTextParsing(t, se.RCDATA); - break - } - case u.NOSCRIPT: { - e.options.scriptingEnabled ? e._switchToTextParsing(t, se.RAWTEXT) : (e._insertElement(t, _.HTML), e.insertionMode = l.IN_HEAD_NO_SCRIPT); - break - } - case u.NOFRAMES: - case u.STYLE: { - e._switchToTextParsing(t, se.RAWTEXT); - break - } - case u.SCRIPT: { - e._switchToTextParsing(t, se.SCRIPT_DATA); - break - } - case u.TEMPLATE: { - e._insertTemplate(t), e.activeFormattingElements.insertMarker(), e.framesetOk = !1, e.insertionMode = l.IN_TEMPLATE, e.tmplInsertionModeStack.unshift(l.IN_TEMPLATE); - break - } - case u.HEAD: { - e._err(t, m.misplacedStartTagForHeadElement); - break - } - default: - ct(e, t) - } -} - -function dn(e, t) { - switch (t.tagID) { - case u.HEAD: { - e.openElements.pop(), e.insertionMode = l.AFTER_HEAD; - break - } - case u.BODY: - case u.BR: - case u.HTML: { - ct(e, t); - break - } - case u.TEMPLATE: { - ke(e, t); - break - } - default: - e._err(t, m.endTagWithoutMatchingOpenElement) - } -} - -function ke(e, t) { - e.openElements.tmplCount > 0 ? (e.openElements.generateImpliedEndTagsThoroughly(), e.openElements.currentTagId !== u.TEMPLATE && e._err(t, m.closingOfElementWithOpenChildElements), e.openElements.popUntilTagNamePopped(u.TEMPLATE), e.activeFormattingElements.clearToLastMarker(), e.tmplInsertionModeStack.shift(), e._resetInsertionMode()) : e._err(t, m.endTagWithoutMatchingOpenElement) -} - -function ct(e, t) { - e.openElements.pop(), e.insertionMode = l.AFTER_HEAD, e._processToken(t) -} - -function hn(e, t) { - switch (t.tagID) { - case u.HTML: { - X(e, t); - break - } - case u.BASEFONT: - case u.BGSOUND: - case u.HEAD: - case u.LINK: - case u.META: - case u.NOFRAMES: - case u.STYLE: { - de(e, t); - break - } - case u.NOSCRIPT: { - e._err(t, m.nestedNoscriptInHead); - break - } - default: - ot(e, t) - } -} - -function fn(e, t) { - switch (t.tagID) { - case u.NOSCRIPT: { - e.openElements.pop(), e.insertionMode = l.IN_HEAD; - break - } - case u.BR: { - ot(e, t); - break - } - default: - e._err(t, m.endTagWithoutMatchingOpenElement) - } -} - -function ot(e, t) { - const s = t.type === M.EOF ? m.openElementsLeftAfterEof : m.disallowedContentInNoscriptInHead; - e._err(t, s), e.openElements.pop(), e.insertionMode = l.IN_HEAD, e._processToken(t) -} - -function En(e, t) { - switch (t.tagID) { - case u.HTML: { - X(e, t); - break - } - case u.BODY: { - e._insertElement(t, _.HTML), e.framesetOk = !1, e.insertionMode = l.IN_BODY; - break - } - case u.FRAMESET: { - e._insertElement(t, _.HTML), e.insertionMode = l.IN_FRAMESET; - break - } - case u.BASE: - case u.BASEFONT: - case u.BGSOUND: - case u.LINK: - case u.META: - case u.NOFRAMES: - case u.SCRIPT: - case u.STYLE: - case u.TEMPLATE: - case u.TITLE: { - e._err(t, m.abandonedHeadElementChild), e.openElements.push(e.headElement, u.HEAD), de(e, t), e.openElements.remove(e.headElement); - break - } - case u.HEAD: { - e._err(t, m.misplacedStartTagForHeadElement); - break - } - default: - lt(e, t) - } -} - -function Tn(e, t) { - switch (t.tagID) { - case u.BODY: - case u.HTML: - case u.BR: { - lt(e, t); - break - } - case u.TEMPLATE: { - ke(e, t); - break - } - default: - e._err(t, m.endTagWithoutMatchingOpenElement) - } -} - -function lt(e, t) { - e._insertFakeElement(f.BODY, u.BODY), e.insertionMode = l.IN_BODY, Ht(e, t) -} - -function Ht(e, t) { - switch (t.type) { - case M.CHARACTER: { - ta(e, t); - break - } - case M.WHITESPACE_CHARACTER: { - ea(e, t); - break - } - case M.COMMENT: { - ds(e, t); - break - } - case M.START_TAG: { - X(e, t); - break - } - case M.END_TAG: { - Ut(e, t); - break - } - case M.EOF: { - ia(e, t); - break - } - } -} - -function ea(e, t) { - e._reconstructActiveFormattingElements(), e._insertCharacters(t) -} - -function ta(e, t) { - e._reconstructActiveFormattingElements(), e._insertCharacters(t), e.framesetOk = !1 -} - -function mn(e, t) { - e.openElements.tmplCount === 0 && e.treeAdapter.adoptAttributes(e.openElements.items[0], t.attrs) -} - -function _n(e, t) { - const s = e.openElements.tryPeekProperlyNestedBodyElement(); - s && e.openElements.tmplCount === 0 && (e.framesetOk = !1, e.treeAdapter.adoptAttributes(s, t.attrs)) -} - -function bn(e, t) { - const s = e.openElements.tryPeekProperlyNestedBodyElement(); - e.framesetOk && s && (e.treeAdapter.detachNode(s), e.openElements.popAllUpToHtmlElement(), e._insertElement(t, _.HTML), e.insertionMode = l.IN_FRAMESET) -} - -function An(e, t) { - e.openElements.hasInButtonScope(u.P) && e._closePElement(), e._insertElement(t, _.HTML) -} - -function pn(e, t) { - e.openElements.hasInButtonScope(u.P) && e._closePElement(), $u(e.openElements.currentTagId) && e.openElements.pop(), e._insertElement(t, _.HTML) -} - -function In(e, t) { - e.openElements.hasInButtonScope(u.P) && e._closePElement(), e._insertElement(t, _.HTML), e.skipNextNewLine = !0, e.framesetOk = !1 -} - -function Nn(e, t) { - const s = e.openElements.tmplCount > 0; - (!e.formElement || s) && (e.openElements.hasInButtonScope(u.P) && e._closePElement(), e._insertElement(t, _.HTML), s || (e.formElement = e.openElements.current)) -} - -function gn(e, t) { - e.framesetOk = !1; - const s = t.tagID; - for (let a = e.openElements.stackTop; a >= 0; a--) { - const i = e.openElements.tagIDs[a]; - if (s === u.LI && i === u.LI || (s === u.DD || s === u.DT) && (i === u.DD || i === u.DT)) { - e.openElements.generateImpliedEndTagsWithExclusion(i), e.openElements.popUntilTagNamePopped(i); - break - } - if (i !== u.ADDRESS && i !== u.DIV && i !== u.P && e._isSpecialElement(e.openElements.items[a], i)) break - } - e.openElements.hasInButtonScope(u.P) && e._closePElement(), e._insertElement(t, _.HTML) -} - -function Cn(e, t) { - e.openElements.hasInButtonScope(u.P) && e._closePElement(), e._insertElement(t, _.HTML), e.tokenizer.state = se.PLAINTEXT -} - -function Sn(e, t) { - e.openElements.hasInScope(u.BUTTON) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(u.BUTTON)), e._reconstructActiveFormattingElements(), e._insertElement(t, _.HTML), e.framesetOk = !1 -} - -function Rn(e, t) { - const s = e.activeFormattingElements.getElementEntryInScopeWithTagName(f.A); - s && (Cs(e, t), e.openElements.remove(s.element), e.activeFormattingElements.removeEntry(s)), e._reconstructActiveFormattingElements(), e._insertElement(t, _.HTML), e.activeFormattingElements.pushElement(e.openElements.current, t) -} - -function Ln(e, t) { - e._reconstructActiveFormattingElements(), e._insertElement(t, _.HTML), e.activeFormattingElements.pushElement(e.openElements.current, t) -} - -function On(e, t) { - e._reconstructActiveFormattingElements(), e.openElements.hasInScope(u.NOBR) && (Cs(e, t), e._reconstructActiveFormattingElements()), e._insertElement(t, _.HTML), e.activeFormattingElements.pushElement(e.openElements.current, t) -} - -function Dn(e, t) { - e._reconstructActiveFormattingElements(), e._insertElement(t, _.HTML), e.activeFormattingElements.insertMarker(), e.framesetOk = !1 -} - -function xn(e, t) { - e.treeAdapter.getDocumentMode(e.document) !== te.QUIRKS && e.openElements.hasInButtonScope(u.P) && e._closePElement(), e._insertElement(t, _.HTML), e.framesetOk = !1, e.insertionMode = l.IN_TABLE -} - -function sa(e, t) { - e._reconstructActiveFormattingElements(), e._appendElement(t, _.HTML), e.framesetOk = !1, t.ackSelfClosing = !0 -} - -function ua(e) { - const t = Yu(e, Se.TYPE); - return t != null && t.toLowerCase() === Qi -} - -function Mn(e, t) { - e._reconstructActiveFormattingElements(), e._appendElement(t, _.HTML), ua(t) || (e.framesetOk = !1), t.ackSelfClosing = !0 -} - -function Pn(e, t) { - e._appendElement(t, _.HTML), t.ackSelfClosing = !0 -} - -function Bn(e, t) { - e.openElements.hasInButtonScope(u.P) && e._closePElement(), e._appendElement(t, _.HTML), e.framesetOk = !1, t.ackSelfClosing = !0 -} - -function yn(e, t) { - t.tagName = f.IMG, t.tagID = u.IMG, sa(e, t) -} - -function kn(e, t) { - e._insertElement(t, _.HTML), e.skipNextNewLine = !0, e.tokenizer.state = se.RCDATA, e.originalInsertionMode = e.insertionMode, e.framesetOk = !1, e.insertionMode = l.TEXT -} - -function Fn(e, t) { - e.openElements.hasInButtonScope(u.P) && e._closePElement(), e._reconstructActiveFormattingElements(), e.framesetOk = !1, e._switchToTextParsing(t, se.RAWTEXT) -} - -function Hn(e, t) { - e.framesetOk = !1, e._switchToTextParsing(t, se.RAWTEXT) -} - -function du(e, t) { - e._switchToTextParsing(t, se.RAWTEXT) -} - -function Un(e, t) { - e._reconstructActiveFormattingElements(), e._insertElement(t, _.HTML), e.framesetOk = !1, e.insertionMode = e.insertionMode === l.IN_TABLE || e.insertionMode === l.IN_CAPTION || e.insertionMode === l.IN_TABLE_BODY || e.insertionMode === l.IN_ROW || e.insertionMode === l.IN_CELL ? l.IN_SELECT_IN_TABLE : l.IN_SELECT -} - -function wn(e, t) { - e.openElements.currentTagId === u.OPTION && e.openElements.pop(), e._reconstructActiveFormattingElements(), e._insertElement(t, _.HTML) -} - -function vn(e, t) { - e.openElements.hasInScope(u.RUBY) && e.openElements.generateImpliedEndTags(), e._insertElement(t, _.HTML) -} - -function Yn(e, t) { - e.openElements.hasInScope(u.RUBY) && e.openElements.generateImpliedEndTagsWithExclusion(u.RTC), e._insertElement(t, _.HTML) -} - -function $n(e, t) { - e._reconstructActiveFormattingElements(), zu(t), gs(t), t.selfClosing ? e._appendElement(t, _.MATHML) : e._insertElement(t, _.MATHML), t.ackSelfClosing = !0 -} - -function qn(e, t) { - e._reconstructActiveFormattingElements(), ju(t), gs(t), t.selfClosing ? e._appendElement(t, _.SVG) : e._insertElement(t, _.SVG), t.ackSelfClosing = !0 -} - -function hu(e, t) { - e._reconstructActiveFormattingElements(), e._insertElement(t, _.HTML) -} - -function X(e, t) { - switch (t.tagID) { - case u.I: - case u.S: - case u.B: - case u.U: - case u.EM: - case u.TT: - case u.BIG: - case u.CODE: - case u.FONT: - case u.SMALL: - case u.STRIKE: - case u.STRONG: { - Ln(e, t); - break - } - case u.A: { - Rn(e, t); - break - } - case u.H1: - case u.H2: - case u.H3: - case u.H4: - case u.H5: - case u.H6: { - pn(e, t); - break - } - case u.P: - case u.DL: - case u.OL: - case u.UL: - case u.DIV: - case u.DIR: - case u.NAV: - case u.MAIN: - case u.MENU: - case u.ASIDE: - case u.CENTER: - case u.FIGURE: - case u.FOOTER: - case u.HEADER: - case u.HGROUP: - case u.DIALOG: - case u.DETAILS: - case u.ADDRESS: - case u.ARTICLE: - case u.SECTION: - case u.SUMMARY: - case u.FIELDSET: - case u.BLOCKQUOTE: - case u.FIGCAPTION: { - An(e, t); - break - } - case u.LI: - case u.DD: - case u.DT: { - gn(e, t); - break - } - case u.BR: - case u.IMG: - case u.WBR: - case u.AREA: - case u.EMBED: - case u.KEYGEN: { - sa(e, t); - break - } - case u.HR: { - Bn(e, t); - break - } - case u.RB: - case u.RTC: { - vn(e, t); - break - } - case u.RT: - case u.RP: { - Yn(e, t); - break - } - case u.PRE: - case u.LISTING: { - In(e, t); - break - } - case u.XMP: { - Fn(e, t); - break - } - case u.SVG: { - qn(e, t); - break - } - case u.HTML: { - mn(e, t); - break - } - case u.BASE: - case u.LINK: - case u.META: - case u.STYLE: - case u.TITLE: - case u.SCRIPT: - case u.BGSOUND: - case u.BASEFONT: - case u.TEMPLATE: { - de(e, t); - break - } - case u.BODY: { - _n(e, t); - break - } - case u.FORM: { - Nn(e, t); - break - } - case u.NOBR: { - On(e, t); - break - } - case u.MATH: { - $n(e, t); - break - } - case u.TABLE: { - xn(e, t); - break - } - case u.INPUT: { - Mn(e, t); - break - } - case u.PARAM: - case u.TRACK: - case u.SOURCE: { - Pn(e, t); - break - } - case u.IMAGE: { - yn(e, t); - break - } - case u.BUTTON: { - Sn(e, t); - break - } - case u.APPLET: - case u.OBJECT: - case u.MARQUEE: { - Dn(e, t); - break - } - case u.IFRAME: { - Hn(e, t); - break - } - case u.SELECT: { - Un(e, t); - break - } - case u.OPTION: - case u.OPTGROUP: { - wn(e, t); - break - } - case u.NOEMBED: { - du(e, t); - break - } - case u.FRAMESET: { - bn(e, t); - break - } - case u.TEXTAREA: { - kn(e, t); - break - } - case u.NOSCRIPT: { - e.options.scriptingEnabled ? du(e, t) : hu(e, t); - break - } - case u.PLAINTEXT: { - Cn(e, t); - break - } - case u.COL: - case u.TH: - case u.TD: - case u.TR: - case u.HEAD: - case u.FRAME: - case u.TBODY: - case u.TFOOT: - case u.THEAD: - case u.CAPTION: - case u.COLGROUP: - break; - default: - hu(e, t) - } -} - -function Gn(e, t) { - if (e.openElements.hasInScope(u.BODY) && (e.insertionMode = l.AFTER_BODY, e.options.sourceCodeLocationInfo)) { - const s = e.openElements.tryPeekProperlyNestedBodyElement(); - s && e._setEndLocation(s, t) - } -} - -function Wn(e, t) { - e.openElements.hasInScope(u.BODY) && (e.insertionMode = l.AFTER_BODY, fa(e, t)) -} - -function Vn(e, t) { - const s = t.tagID; - e.openElements.hasInScope(s) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(s)) -} - -function Qn(e) { - const t = e.openElements.tmplCount > 0, - { - formElement: s - } = e; - t || (e.formElement = null), (s || t) && e.openElements.hasInScope(u.FORM) && (e.openElements.generateImpliedEndTags(), t ? e.openElements.popUntilTagNamePopped(u.FORM) : s && e.openElements.remove(s)) -} - -function Xn(e) { - e.openElements.hasInButtonScope(u.P) || e._insertFakeElement(f.P, u.P), e._closePElement() -} - -function Kn(e) { - e.openElements.hasInListItemScope(u.LI) && (e.openElements.generateImpliedEndTagsWithExclusion(u.LI), e.openElements.popUntilTagNamePopped(u.LI)) -} - -function zn(e, t) { - const s = t.tagID; - e.openElements.hasInScope(s) && (e.openElements.generateImpliedEndTagsWithExclusion(s), e.openElements.popUntilTagNamePopped(s)) -} - -function jn(e) { - e.openElements.hasNumberedHeaderInScope() && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilNumberedHeaderPopped()) -} - -function Jn(e, t) { - const s = t.tagID; - e.openElements.hasInScope(s) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(s), e.activeFormattingElements.clearToLastMarker()) -} - -function Zn(e) { - e._reconstructActiveFormattingElements(), e._insertFakeElement(f.BR, u.BR), e.openElements.pop(), e.framesetOk = !1 -} - -function aa(e, t) { - const s = t.tagName, - a = t.tagID; - for (let i = e.openElements.stackTop; i > 0; i--) { - const n = e.openElements.items[i], - o = e.openElements.tagIDs[i]; - if (a === o && (a !== u.UNKNOWN || e.treeAdapter.getTagName(n) === s)) { - e.openElements.generateImpliedEndTagsWithExclusion(a), e.openElements.stackTop >= i && e.openElements.shortenToLength(i); - break - } - if (e._isSpecialElement(n, o)) break - } -} - -function Ut(e, t) { - switch (t.tagID) { - case u.A: - case u.B: - case u.I: - case u.S: - case u.U: - case u.EM: - case u.TT: - case u.BIG: - case u.CODE: - case u.FONT: - case u.NOBR: - case u.SMALL: - case u.STRIKE: - case u.STRONG: { - Cs(e, t); - break - } - case u.P: { - Xn(e); - break - } - case u.DL: - case u.UL: - case u.OL: - case u.DIR: - case u.DIV: - case u.NAV: - case u.PRE: - case u.MAIN: - case u.MENU: - case u.ASIDE: - case u.BUTTON: - case u.CENTER: - case u.FIGURE: - case u.FOOTER: - case u.HEADER: - case u.HGROUP: - case u.DIALOG: - case u.ADDRESS: - case u.ARTICLE: - case u.DETAILS: - case u.SECTION: - case u.SUMMARY: - case u.LISTING: - case u.FIELDSET: - case u.BLOCKQUOTE: - case u.FIGCAPTION: { - Vn(e, t); - break - } - case u.LI: { - Kn(e); - break - } - case u.DD: - case u.DT: { - zn(e, t); - break - } - case u.H1: - case u.H2: - case u.H3: - case u.H4: - case u.H5: - case u.H6: { - jn(e); - break - } - case u.BR: { - Zn(e); - break - } - case u.BODY: { - Gn(e, t); - break - } - case u.HTML: { - Wn(e, t); - break - } - case u.FORM: { - Qn(e); - break - } - case u.APPLET: - case u.OBJECT: - case u.MARQUEE: { - Jn(e, t); - break - } - case u.TEMPLATE: { - ke(e, t); - break - } - default: - aa(e, t) - } -} - -function ia(e, t) { - e.tmplInsertionModeStack.length > 0 ? ha(e, t) : Ss(e, t) -} - -function er(e, t) { - var s; - t.tagID === u.SCRIPT && ((s = e.scriptHandler) === null || s === void 0 || s.call(e, e.openElements.current)), e.openElements.pop(), e.insertionMode = e.originalInsertionMode -} - -function tr(e, t) { - e._err(t, m.eofInElementThatCanContainOnlyText), e.openElements.pop(), e.insertionMode = e.originalInsertionMode, e.onEof(t) -} - -function ts(e, t) { - if (Ju.has(e.openElements.currentTagId)) switch (e.pendingCharacterTokens.length = 0, e.hasNonWhitespacePendingCharacterToken = !1, e.originalInsertionMode = e.insertionMode, e.insertionMode = l.IN_TABLE_TEXT, t.type) { - case M.CHARACTER: { - ra(e, t); - break - } - case M.WHITESPACE_CHARACTER: { - na(e, t); - break - } - } else Tt(e, t) -} - -function sr(e, t) { - e.openElements.clearBackToTableContext(), e.activeFormattingElements.insertMarker(), e._insertElement(t, _.HTML), e.insertionMode = l.IN_CAPTION -} - -function ur(e, t) { - e.openElements.clearBackToTableContext(), e._insertElement(t, _.HTML), e.insertionMode = l.IN_COLUMN_GROUP -} - -function ar(e, t) { - e.openElements.clearBackToTableContext(), e._insertFakeElement(f.COLGROUP, u.COLGROUP), e.insertionMode = l.IN_COLUMN_GROUP, Rs(e, t) -} - -function ir(e, t) { - e.openElements.clearBackToTableContext(), e._insertElement(t, _.HTML), e.insertionMode = l.IN_TABLE_BODY -} - -function nr(e, t) { - e.openElements.clearBackToTableContext(), e._insertFakeElement(f.TBODY, u.TBODY), e.insertionMode = l.IN_TABLE_BODY, wt(e, t) -} - -function rr(e, t) { - e.openElements.hasInTableScope(u.TABLE) && (e.openElements.popUntilTagNamePopped(u.TABLE), e._resetInsertionMode(), e._processStartTag(t)) -} - -function cr(e, t) { - ua(t) ? e._appendElement(t, _.HTML) : Tt(e, t), t.ackSelfClosing = !0 -} - -function or(e, t) { - !e.formElement && e.openElements.tmplCount === 0 && (e._insertElement(t, _.HTML), e.formElement = e.openElements.current, e.openElements.pop()) -} - -function Ve(e, t) { - switch (t.tagID) { - case u.TD: - case u.TH: - case u.TR: { - nr(e, t); - break - } - case u.STYLE: - case u.SCRIPT: - case u.TEMPLATE: { - de(e, t); - break - } - case u.COL: { - ar(e, t); - break - } - case u.FORM: { - or(e, t); - break - } - case u.TABLE: { - rr(e, t); - break - } - case u.TBODY: - case u.TFOOT: - case u.THEAD: { - ir(e, t); - break - } - case u.INPUT: { - cr(e, t); - break - } - case u.CAPTION: { - sr(e, t); - break - } - case u.COLGROUP: { - ur(e, t); - break - } - default: - Tt(e, t) - } -} - -function dt(e, t) { - switch (t.tagID) { - case u.TABLE: { - e.openElements.hasInTableScope(u.TABLE) && (e.openElements.popUntilTagNamePopped(u.TABLE), e._resetInsertionMode()); - break - } - case u.TEMPLATE: { - ke(e, t); - break - } - case u.BODY: - case u.CAPTION: - case u.COL: - case u.COLGROUP: - case u.HTML: - case u.TBODY: - case u.TD: - case u.TFOOT: - case u.TH: - case u.THEAD: - case u.TR: - break; - default: - Tt(e, t) - } -} - -function Tt(e, t) { - const s = e.fosterParentingEnabled; - e.fosterParentingEnabled = !0, Ht(e, t), e.fosterParentingEnabled = s -} - -function na(e, t) { - e.pendingCharacterTokens.push(t) -} - -function ra(e, t) { - e.pendingCharacterTokens.push(t), e.hasNonWhitespacePendingCharacterToken = !0 -} - -function et(e, t) { - let s = 0; - if (e.hasNonWhitespacePendingCharacterToken) - for (; s < e.pendingCharacterTokens.length; s++) Tt(e, e.pendingCharacterTokens[s]); - else - for (; s < e.pendingCharacterTokens.length; s++) e._insertCharacters(e.pendingCharacterTokens[s]); - e.insertionMode = e.originalInsertionMode, e._processToken(t) -} -const ca = new Set([u.CAPTION, u.COL, u.COLGROUP, u.TBODY, u.TD, u.TFOOT, u.TH, u.THEAD, u.TR]); - -function lr(e, t) { - const s = t.tagID; - ca.has(s) ? e.openElements.hasInTableScope(u.CAPTION) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(u.CAPTION), e.activeFormattingElements.clearToLastMarker(), e.insertionMode = l.IN_TABLE, Ve(e, t)) : X(e, t) -} - -function dr(e, t) { - const s = t.tagID; - switch (s) { - case u.CAPTION: - case u.TABLE: { - e.openElements.hasInTableScope(u.CAPTION) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(u.CAPTION), e.activeFormattingElements.clearToLastMarker(), e.insertionMode = l.IN_TABLE, s === u.TABLE && dt(e, t)); - break - } - case u.BODY: - case u.COL: - case u.COLGROUP: - case u.HTML: - case u.TBODY: - case u.TD: - case u.TFOOT: - case u.TH: - case u.THEAD: - case u.TR: - break; - default: - Ut(e, t) - } -} - -function Rs(e, t) { - switch (t.tagID) { - case u.HTML: { - X(e, t); - break - } - case u.COL: { - e._appendElement(t, _.HTML), t.ackSelfClosing = !0; - break - } - case u.TEMPLATE: { - de(e, t); - break - } - default: - Bt(e, t) - } -} - -function hr(e, t) { - switch (t.tagID) { - case u.COLGROUP: { - e.openElements.currentTagId === u.COLGROUP && (e.openElements.pop(), e.insertionMode = l.IN_TABLE); - break - } - case u.TEMPLATE: { - ke(e, t); - break - } - case u.COL: - break; - default: - Bt(e, t) - } -} - -function Bt(e, t) { - e.openElements.currentTagId === u.COLGROUP && (e.openElements.pop(), e.insertionMode = l.IN_TABLE, e._processToken(t)) -} - -function wt(e, t) { - switch (t.tagID) { - case u.TR: { - e.openElements.clearBackToTableBodyContext(), e._insertElement(t, _.HTML), e.insertionMode = l.IN_ROW; - break - } - case u.TH: - case u.TD: { - e.openElements.clearBackToTableBodyContext(), e._insertFakeElement(f.TR, u.TR), e.insertionMode = l.IN_ROW, vt(e, t); - break - } - case u.CAPTION: - case u.COL: - case u.COLGROUP: - case u.TBODY: - case u.TFOOT: - case u.THEAD: { - e.openElements.hasTableBodyContextInTableScope() && (e.openElements.clearBackToTableBodyContext(), e.openElements.pop(), e.insertionMode = l.IN_TABLE, Ve(e, t)); - break - } - default: - Ve(e, t) - } -} - -function hs(e, t) { - const s = t.tagID; - switch (t.tagID) { - case u.TBODY: - case u.TFOOT: - case u.THEAD: { - e.openElements.hasInTableScope(s) && (e.openElements.clearBackToTableBodyContext(), e.openElements.pop(), e.insertionMode = l.IN_TABLE); - break - } - case u.TABLE: { - e.openElements.hasTableBodyContextInTableScope() && (e.openElements.clearBackToTableBodyContext(), e.openElements.pop(), e.insertionMode = l.IN_TABLE, dt(e, t)); - break - } - case u.BODY: - case u.CAPTION: - case u.COL: - case u.COLGROUP: - case u.HTML: - case u.TD: - case u.TH: - case u.TR: - break; - default: - dt(e, t) - } -} - -function vt(e, t) { - switch (t.tagID) { - case u.TH: - case u.TD: { - e.openElements.clearBackToTableRowContext(), e._insertElement(t, _.HTML), e.insertionMode = l.IN_CELL, e.activeFormattingElements.insertMarker(); - break - } - case u.CAPTION: - case u.COL: - case u.COLGROUP: - case u.TBODY: - case u.TFOOT: - case u.THEAD: - case u.TR: { - e.openElements.hasInTableScope(u.TR) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = l.IN_TABLE_BODY, wt(e, t)); - break - } - default: - Ve(e, t) - } -} - -function oa(e, t) { - switch (t.tagID) { - case u.TR: { - e.openElements.hasInTableScope(u.TR) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = l.IN_TABLE_BODY); - break - } - case u.TABLE: { - e.openElements.hasInTableScope(u.TR) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = l.IN_TABLE_BODY, hs(e, t)); - break - } - case u.TBODY: - case u.TFOOT: - case u.THEAD: { - (e.openElements.hasInTableScope(t.tagID) || e.openElements.hasInTableScope(u.TR)) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = l.IN_TABLE_BODY, hs(e, t)); - break - } - case u.BODY: - case u.CAPTION: - case u.COL: - case u.COLGROUP: - case u.HTML: - case u.TD: - case u.TH: - break; - default: - dt(e, t) - } -} - -function fr(e, t) { - const s = t.tagID; - ca.has(s) ? (e.openElements.hasInTableScope(u.TD) || e.openElements.hasInTableScope(u.TH)) && (e._closeTableCell(), vt(e, t)) : X(e, t) -} - -function Er(e, t) { - const s = t.tagID; - switch (s) { - case u.TD: - case u.TH: { - e.openElements.hasInTableScope(s) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(s), e.activeFormattingElements.clearToLastMarker(), e.insertionMode = l.IN_ROW); - break - } - case u.TABLE: - case u.TBODY: - case u.TFOOT: - case u.THEAD: - case u.TR: { - e.openElements.hasInTableScope(s) && (e._closeTableCell(), oa(e, t)); - break - } - case u.BODY: - case u.CAPTION: - case u.COL: - case u.COLGROUP: - case u.HTML: - break; - default: - Ut(e, t) - } -} - -function la(e, t) { - switch (t.tagID) { - case u.HTML: { - X(e, t); - break - } - case u.OPTION: { - e.openElements.currentTagId === u.OPTION && e.openElements.pop(), e._insertElement(t, _.HTML); - break - } - case u.OPTGROUP: { - e.openElements.currentTagId === u.OPTION && e.openElements.pop(), e.openElements.currentTagId === u.OPTGROUP && e.openElements.pop(), e._insertElement(t, _.HTML); - break - } - case u.INPUT: - case u.KEYGEN: - case u.TEXTAREA: - case u.SELECT: { - e.openElements.hasInSelectScope(u.SELECT) && (e.openElements.popUntilTagNamePopped(u.SELECT), e._resetInsertionMode(), t.tagID !== u.SELECT && e._processStartTag(t)); - break - } - case u.SCRIPT: - case u.TEMPLATE: { - de(e, t); - break - } - } -} - -function da(e, t) { - switch (t.tagID) { - case u.OPTGROUP: { - e.openElements.stackTop > 0 && e.openElements.currentTagId === u.OPTION && e.openElements.tagIDs[e.openElements.stackTop - 1] === u.OPTGROUP && e.openElements.pop(), e.openElements.currentTagId === u.OPTGROUP && e.openElements.pop(); - break - } - case u.OPTION: { - e.openElements.currentTagId === u.OPTION && e.openElements.pop(); - break - } - case u.SELECT: { - e.openElements.hasInSelectScope(u.SELECT) && (e.openElements.popUntilTagNamePopped(u.SELECT), e._resetInsertionMode()); - break - } - case u.TEMPLATE: { - ke(e, t); - break - } - } -} - -function Tr(e, t) { - const s = t.tagID; - s === u.CAPTION || s === u.TABLE || s === u.TBODY || s === u.TFOOT || s === u.THEAD || s === u.TR || s === u.TD || s === u.TH ? (e.openElements.popUntilTagNamePopped(u.SELECT), e._resetInsertionMode(), e._processStartTag(t)) : la(e, t) -} - -function mr(e, t) { - const s = t.tagID; - s === u.CAPTION || s === u.TABLE || s === u.TBODY || s === u.TFOOT || s === u.THEAD || s === u.TR || s === u.TD || s === u.TH ? e.openElements.hasInTableScope(s) && (e.openElements.popUntilTagNamePopped(u.SELECT), e._resetInsertionMode(), e.onEndTag(t)) : da(e, t) -} - -function _r(e, t) { - switch (t.tagID) { - case u.BASE: - case u.BASEFONT: - case u.BGSOUND: - case u.LINK: - case u.META: - case u.NOFRAMES: - case u.SCRIPT: - case u.STYLE: - case u.TEMPLATE: - case u.TITLE: { - de(e, t); - break - } - case u.CAPTION: - case u.COLGROUP: - case u.TBODY: - case u.TFOOT: - case u.THEAD: { - e.tmplInsertionModeStack[0] = l.IN_TABLE, e.insertionMode = l.IN_TABLE, Ve(e, t); - break - } - case u.COL: { - e.tmplInsertionModeStack[0] = l.IN_COLUMN_GROUP, e.insertionMode = l.IN_COLUMN_GROUP, Rs(e, t); - break - } - case u.TR: { - e.tmplInsertionModeStack[0] = l.IN_TABLE_BODY, e.insertionMode = l.IN_TABLE_BODY, wt(e, t); - break - } - case u.TD: - case u.TH: { - e.tmplInsertionModeStack[0] = l.IN_ROW, e.insertionMode = l.IN_ROW, vt(e, t); - break - } - default: - e.tmplInsertionModeStack[0] = l.IN_BODY, e.insertionMode = l.IN_BODY, X(e, t) - } -} - -function br(e, t) { - t.tagID === u.TEMPLATE && ke(e, t) -} - -function ha(e, t) { - e.openElements.tmplCount > 0 ? (e.openElements.popUntilTagNamePopped(u.TEMPLATE), e.activeFormattingElements.clearToLastMarker(), e.tmplInsertionModeStack.shift(), e._resetInsertionMode(), e.onEof(t)) : Ss(e, t) -} - -function Ar(e, t) { - t.tagID === u.HTML ? X(e, t) : yt(e, t) -} - -function fa(e, t) { - var s; - if (t.tagID === u.HTML) { - if (e.fragmentContext || (e.insertionMode = l.AFTER_AFTER_BODY), e.options.sourceCodeLocationInfo && e.openElements.tagIDs[0] === u.HTML) { - e._setEndLocation(e.openElements.items[0], t); - const a = e.openElements.items[1]; - a && !(!((s = e.treeAdapter.getNodeSourceCodeLocation(a)) === null || s === void 0) && s.endTag) && e._setEndLocation(a, t) - } - } else yt(e, t) -} - -function yt(e, t) { - e.insertionMode = l.IN_BODY, Ht(e, t) -} - -function pr(e, t) { - switch (t.tagID) { - case u.HTML: { - X(e, t); - break - } - case u.FRAMESET: { - e._insertElement(t, _.HTML); - break - } - case u.FRAME: { - e._appendElement(t, _.HTML), t.ackSelfClosing = !0; - break - } - case u.NOFRAMES: { - de(e, t); - break - } - } -} - -function Ir(e, t) { - t.tagID === u.FRAMESET && !e.openElements.isRootHtmlElementCurrent() && (e.openElements.pop(), !e.fragmentContext && e.openElements.currentTagId !== u.FRAMESET && (e.insertionMode = l.AFTER_FRAMESET)) -} - -function Nr(e, t) { - switch (t.tagID) { - case u.HTML: { - X(e, t); - break - } - case u.NOFRAMES: { - de(e, t); - break - } - } -} - -function gr(e, t) { - t.tagID === u.HTML && (e.insertionMode = l.AFTER_AFTER_FRAMESET) -} - -function Cr(e, t) { - t.tagID === u.HTML ? X(e, t) : Mt(e, t) -} - -function Mt(e, t) { - e.insertionMode = l.IN_BODY, Ht(e, t) -} - -function Sr(e, t) { - switch (t.tagID) { - case u.HTML: { - X(e, t); - break - } - case u.NOFRAMES: { - de(e, t); - break - } - } -} - -function Rr(e, t) { - t.chars = H, e._insertCharacters(t) -} - -function Lr(e, t) { - e._insertCharacters(t), e.framesetOk = !1 -} - -function Ea(e) { - for (; e.treeAdapter.getNamespaceURI(e.openElements.current) !== _.HTML && !e._isIntegrationPoint(e.openElements.currentTagId, e.openElements.current);) e.openElements.pop() -} - -function Or(e, t) { - if ($i(t)) Ea(e), e._startTagOutsideForeignContent(t); - else { - const s = e._getAdjustedCurrentElement(), - a = e.treeAdapter.getNamespaceURI(s); - a === _.MATHML ? zu(t) : a === _.SVG && (qi(t), ju(t)), gs(t), t.selfClosing ? e._appendElement(t, a) : e._insertElement(t, a), t.ackSelfClosing = !0 - } -} - -function Dr(e, t) { - if (t.tagID === u.P || t.tagID === u.BR) { - Ea(e), e._endTagOutsideForeignContent(t); - return - } - for (let s = e.openElements.stackTop; s > 0; s--) { - const a = e.openElements.items[s]; - if (e.treeAdapter.getNamespaceURI(a) === _.HTML) { - e._endTagOutsideForeignContent(t); - break - } - const i = e.treeAdapter.getTagName(a); - if (i.toLowerCase() === t.tagName) { - t.tagName = i, e.openElements.shortenToLength(s); - break - } - } -} -const xr = new Set([f.AREA, f.BASE, f.BASEFONT, f.BGSOUND, f.BR, f.COL, f.EMBED, f.FRAME, f.HR, f.IMG, f.INPUT, f.KEYGEN, f.LINK, f.META, f.PARAM, f.SOURCE, f.TRACK, f.WBR]); - -function Mr(e, t) { - return t.treeAdapter.isElementNode(e) && t.treeAdapter.getNamespaceURI(e) === _.HTML && xr.has(t.treeAdapter.getTagName(e)) -} -const Pr = { - treeAdapter: Be, - scriptingEnabled: !0 -}; - -function Br(e, t) { - const s = { - ...Pr, - ...t - }; - return Ta(e, s) -} - -function yr(e, t) { - let s = ""; - const a = t.treeAdapter.isElementNode(e) && t.treeAdapter.getTagName(e) === f.TEMPLATE && t.treeAdapter.getNamespaceURI(e) === _.HTML ? t.treeAdapter.getTemplateContent(e) : e, - i = t.treeAdapter.getChildNodes(a); - if (i) - for (const n of i) s += Ta(n, t); - return s -} - -function Ta(e, t) { - return t.treeAdapter.isElementNode(e) ? kr(e, t) : t.treeAdapter.isTextNode(e) ? Hr(e, t) : t.treeAdapter.isCommentNode(e) ? Ur(e, t) : t.treeAdapter.isDocumentTypeNode(e) ? wr(e, t) : "" -} - -function kr(e, t) { - const s = t.treeAdapter.getTagName(e); - return `<${s}${Fr(e,t)}>${Mr(e,t)?"":`${yr(e,t)}`}` -} - -function Fr(e, { - treeAdapter: t -}) { - let s = ""; - for (const a of t.getAttrList(e)) { - if (s += " ", !a.namespace) s += a.name; - else switch (a.namespace) { - case _.XML: { - s += `xml:${a.name}`; - break - } - case _.XMLNS: { - a.name !== "xmlns" && (s += "xmlns:"), s += a.name; - break - } - case _.XLINK: { - s += `xlink:${a.name}`; - break - } - default: - s += `${a.prefix}:${a.name}` - } - s += `="${ni(a.value)}"` - } - return s -} - -function Hr(e, t) { - const { - treeAdapter: s - } = t, a = s.getTextNodeContent(e), i = s.getParentNode(e), n = i && s.isElementNode(i) && s.getTagName(i); - return n && s.getNamespaceURI(i) === _.HTML && mi(n, t.scriptingEnabled) ? a : ri(a) -} - -function Ur(e, { - treeAdapter: t -}) { - return `` -} - -function wr(e, { - treeAdapter: t -}) { - return `` -} - -function vr(e, t) { - return Zu.parse(e, t) -} - -function Yr(e, t, s) { - typeof e == "string" && (s = t, t = e, e = null); - const a = Zu.getFragmentParser(e, s); - return a.tokenizer.write(t, !0), a.getFragment() -} - -function fu(e) { - return new Ka(e) -} - -function Eu(e) { - const t = e.includes('"') ? "'" : '"'; - return t + e + t -} - -function $r(e, t, s) { - let a = "!DOCTYPE "; - return e && (a += e), t ? a += ` PUBLIC ${Eu(t)}` : s && (a += " SYSTEM"), s && (a += ` ${Eu(s)}`), a -} -const We = { - isCommentNode: Ga, - isElementNode: Wa, - isTextNode: Jt, - createDocument() { - const e = new tu([]); - return e["x-mode"] = te.NO_QUIRKS, e - }, - createDocumentFragment() { - return new tu([]) - }, - createElement(e, t, s) { - const a = Object.create(null), - i = Object.create(null), - n = Object.create(null); - for (let d = 0; d < s.length; d++) { - const T = s[d].name; - a[T] = s[d].value, i[T] = s[d].namespace, n[T] = s[d].prefix - } - const o = new Va(e, a, []); - return o.namespace = t, o["x-attribsNamespace"] = i, o["x-attribsPrefix"] = n, o - }, - createCommentNode(e) { - return new Qa(e) - }, - appendChild(e, t) { - const s = e.children[e.children.length - 1]; - s && (s.next = t, t.prev = s), e.children.push(t), t.parent = e - }, - insertBefore(e, t, s) { - const a = e.children.indexOf(s), - { - prev: i - } = s; - i && (i.next = t, t.prev = i), s.prev = t, t.next = s, e.children.splice(a, 0, t), t.parent = e - }, - setTemplateContent(e, t) { - We.appendChild(e, t) - }, - getTemplateContent(e) { - return e.children[0] - }, - setDocumentType(e, t, s, a) { - const i = $r(t, s, a); - let n = e.children.find(o => su(o) && o.name === "!doctype"); - n ? n.data = i ?? null : (n = new Xa("!doctype", i), We.appendChild(e, n)), n["x-name"] = t ?? void 0, n["x-publicId"] = s ?? void 0, n["x-systemId"] = a ?? void 0 - }, - setDocumentMode(e, t) { - e["x-mode"] = t - }, - getDocumentMode(e) { - return e["x-mode"] - }, - detachNode(e) { - if (e.parent) { - const t = e.parent.children.indexOf(e), - { - prev: s, - next: a - } = e; - e.prev = null, e.next = null, s && (s.next = a), a && (a.prev = s), e.parent.children.splice(t, 1), e.parent = null - } - }, - insertText(e, t) { - const s = e.children[e.children.length - 1]; - s && Jt(s) ? s.data += t : We.appendChild(e, fu(t)) - }, - insertTextBefore(e, t, s) { - const a = e.children[e.children.indexOf(s) - 1]; - a && Jt(a) ? a.data += t : We.insertBefore(e, fu(t), s) - }, - adoptAttributes(e, t) { - for (let s = 0; s < t.length; s++) { - const a = t[s].name; - typeof e.attribs[a] > "u" && (e.attribs[a] = t[s].value, e["x-attribsNamespace"][a] = t[s].namespace, e["x-attribsPrefix"][a] = t[s].prefix) - } - }, - getFirstChild(e) { - return e.children[0] - }, - getChildNodes(e) { - return e.children - }, - getParentNode(e) { - return e.parent - }, - getAttrList(e) { - return e.attributes - }, - getTagName(e) { - return e.name - }, - getNamespaceURI(e) { - return e.namespace - }, - getTextNodeContent(e) { - return e.data - }, - getCommentNodeContent(e) { - return e.data - }, - getDocumentTypeNodeName(e) { - var t; - return (t = e["x-name"]) !== null && t !== void 0 ? t : "" - }, - getDocumentTypeNodePublicId(e) { - var t; - return (t = e["x-publicId"]) !== null && t !== void 0 ? t : "" - }, - getDocumentTypeNodeSystemId(e) { - var t; - return (t = e["x-systemId"]) !== null && t !== void 0 ? t : "" - }, - isDocumentTypeNode(e) { - return su(e) && e.name === "!doctype" - }, - setNodeSourceCodeLocation(e, t) { - t && (e.startIndex = t.startOffset, e.endIndex = t.endOffset), e.sourceCodeLocation = t - }, - getNodeSourceCodeLocation(e) { - return e.sourceCodeLocation - }, - updateNodeSourceCodeLocation(e, t) { - t.endOffset != null && (e.endIndex = t.endOffset), e.sourceCodeLocation = { - ...e.sourceCodeLocation, - ...t - } - } -}; - -function Xo(e, t, s, a) { - const i = { - scriptingEnabled: typeof t.scriptingEnabled == "boolean" ? t.scriptingEnabled : !0, - treeAdapter: We, - sourceCodeLocationInfo: t.sourceCodeLocationInfo - }; - return s ? vr(e, i) : Yr(a, e, i) -} -const qr = { - treeAdapter: We -}; - -function Ko(e) { - const t = "length" in e ? e : [e]; - for (let a = 0; a < t.length; a += 1) { - const i = t[a]; - za(i) && Array.prototype.splice.call(t, a, 1, ...i.children) - } - let s = ""; - for (let a = 0; a < t.length; a += 1) { - const i = t[a]; - s += Br(i, qr) - } - return s -} -var g; -(function (e) { - e[e.Tab = 9] = "Tab", e[e.NewLine = 10] = "NewLine", e[e.FormFeed = 12] = "FormFeed", e[e.CarriageReturn = 13] = "CarriageReturn", e[e.Space = 32] = "Space", e[e.ExclamationMark = 33] = "ExclamationMark", e[e.Number = 35] = "Number", e[e.Amp = 38] = "Amp", e[e.SingleQuote = 39] = "SingleQuote", e[e.DoubleQuote = 34] = "DoubleQuote", e[e.Dash = 45] = "Dash", e[e.Slash = 47] = "Slash", e[e.Zero = 48] = "Zero", e[e.Nine = 57] = "Nine", e[e.Semi = 59] = "Semi", e[e.Lt = 60] = "Lt", e[e.Eq = 61] = "Eq", e[e.Gt = 62] = "Gt", e[e.Questionmark = 63] = "Questionmark", e[e.UpperA = 65] = "UpperA", e[e.LowerA = 97] = "LowerA", e[e.UpperF = 70] = "UpperF", e[e.LowerF = 102] = "LowerF", e[e.UpperZ = 90] = "UpperZ", e[e.LowerZ = 122] = "LowerZ", e[e.LowerX = 120] = "LowerX", e[e.OpeningSquareBracket = 91] = "OpeningSquareBracket" -})(g || (g = {})); -var A; -(function (e) { - e[e.Text = 1] = "Text", e[e.BeforeTagName = 2] = "BeforeTagName", e[e.InTagName = 3] = "InTagName", e[e.InSelfClosingTag = 4] = "InSelfClosingTag", e[e.BeforeClosingTagName = 5] = "BeforeClosingTagName", e[e.InClosingTagName = 6] = "InClosingTagName", e[e.AfterClosingTagName = 7] = "AfterClosingTagName", e[e.BeforeAttributeName = 8] = "BeforeAttributeName", e[e.InAttributeName = 9] = "InAttributeName", e[e.AfterAttributeName = 10] = "AfterAttributeName", e[e.BeforeAttributeValue = 11] = "BeforeAttributeValue", e[e.InAttributeValueDq = 12] = "InAttributeValueDq", e[e.InAttributeValueSq = 13] = "InAttributeValueSq", e[e.InAttributeValueNq = 14] = "InAttributeValueNq", e[e.BeforeDeclaration = 15] = "BeforeDeclaration", e[e.InDeclaration = 16] = "InDeclaration", e[e.InProcessingInstruction = 17] = "InProcessingInstruction", e[e.BeforeComment = 18] = "BeforeComment", e[e.CDATASequence = 19] = "CDATASequence", e[e.InSpecialComment = 20] = "InSpecialComment", e[e.InCommentLike = 21] = "InCommentLike", e[e.BeforeSpecialS = 22] = "BeforeSpecialS", e[e.SpecialStartSequence = 23] = "SpecialStartSequence", e[e.InSpecialTag = 24] = "InSpecialTag", e[e.BeforeEntity = 25] = "BeforeEntity", e[e.BeforeNumericEntity = 26] = "BeforeNumericEntity", e[e.InNamedEntity = 27] = "InNamedEntity", e[e.InNumericEntity = 28] = "InNumericEntity", e[e.InHexEntity = 29] = "InHexEntity" -})(A || (A = {})); - -function pe(e) { - return e === g.Space || e === g.NewLine || e === g.Tab || e === g.FormFeed || e === g.CarriageReturn -} - -function Rt(e) { - return e === g.Slash || e === g.Gt || pe(e) -} - -function Tu(e) { - return e >= g.Zero && e <= g.Nine -} - -function Gr(e) { - return e >= g.LowerA && e <= g.LowerZ || e >= g.UpperA && e <= g.UpperZ -} - -function Wr(e) { - return e >= g.UpperA && e <= g.UpperF || e >= g.LowerA && e <= g.LowerF -} -var me; -(function (e) { - e[e.NoValue = 0] = "NoValue", e[e.Unquoted = 1] = "Unquoted", e[e.Single = 2] = "Single", e[e.Double = 3] = "Double" -})(me || (me = {})); -const ee = { - Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]), - CdataEnd: new Uint8Array([93, 93, 62]), - CommentEnd: new Uint8Array([45, 45, 62]), - ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]), - StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]), - TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101]) -}; -class Vr { - constructor({ - xmlMode: t = !1, - decodeEntities: s = !0 - }, a) { - this.cbs = a, this.state = A.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.baseState = A.Text, this.isSpecial = !1, this.running = !0, this.offset = 0, this.currentSequence = void 0, this.sequenceIndex = 0, this.trieIndex = 0, this.trieCurrent = 0, this.entityResult = 0, this.entityExcess = 0, this.xmlMode = t, this.decodeEntities = s, this.entityTrie = t ? yu : Ie - } - reset() { - this.state = A.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.baseState = A.Text, this.currentSequence = void 0, this.running = !0, this.offset = 0 - } - write(t) { - this.offset += this.buffer.length, this.buffer = t, this.parse() - } - end() { - this.running && this.finish() - } - pause() { - this.running = !1 - } - resume() { - this.running = !0, this.index < this.buffer.length + this.offset && this.parse() - } - getIndex() { - return this.index - } - getSectionStart() { - return this.sectionStart - } - stateText(t) { - t === g.Lt || !this.decodeEntities && this.fastForwardTo(g.Lt) ? (this.index > this.sectionStart && this.cbs.ontext(this.sectionStart, this.index), this.state = A.BeforeTagName, this.sectionStart = this.index) : this.decodeEntities && t === g.Amp && (this.state = A.BeforeEntity) - } - stateSpecialStartSequence(t) { - const s = this.sequenceIndex === this.currentSequence.length; - if (!(s ? Rt(t) : (t | 32) === this.currentSequence[this.sequenceIndex])) this.isSpecial = !1; - else if (!s) { - this.sequenceIndex++; - return - } - this.sequenceIndex = 0, this.state = A.InTagName, this.stateInTagName(t) - } - stateInSpecialTag(t) { - if (this.sequenceIndex === this.currentSequence.length) { - if (t === g.Gt || pe(t)) { - const s = this.index - this.currentSequence.length; - if (this.sectionStart < s) { - const a = this.index; - this.index = s, this.cbs.ontext(this.sectionStart, s), this.index = a - } - this.isSpecial = !1, this.sectionStart = s + 2, this.stateInClosingTagName(t); - return - } - this.sequenceIndex = 0 - }(t | 32) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : this.sequenceIndex === 0 ? this.currentSequence === ee.TitleEnd ? this.decodeEntities && t === g.Amp && (this.state = A.BeforeEntity) : this.fastForwardTo(g.Lt) && (this.sequenceIndex = 1) : this.sequenceIndex = +(t === g.Lt) - } - stateCDATASequence(t) { - t === ee.Cdata[this.sequenceIndex] ? ++this.sequenceIndex === ee.Cdata.length && (this.state = A.InCommentLike, this.currentSequence = ee.CdataEnd, this.sequenceIndex = 0, this.sectionStart = this.index + 1) : (this.sequenceIndex = 0, this.state = A.InDeclaration, this.stateInDeclaration(t)) - } - fastForwardTo(t) { - for (; ++this.index < this.buffer.length + this.offset;) - if (this.buffer.charCodeAt(this.index - this.offset) === t) return !0; - return this.index = this.buffer.length + this.offset - 1, !1 - } - stateInCommentLike(t) { - t === this.currentSequence[this.sequenceIndex] ? ++this.sequenceIndex === this.currentSequence.length && (this.currentSequence === ee.CdataEnd ? this.cbs.oncdata(this.sectionStart, this.index, 2) : this.cbs.oncomment(this.sectionStart, this.index, 2), this.sequenceIndex = 0, this.sectionStart = this.index + 1, this.state = A.Text) : this.sequenceIndex === 0 ? this.fastForwardTo(this.currentSequence[0]) && (this.sequenceIndex = 1) : t !== this.currentSequence[this.sequenceIndex - 1] && (this.sequenceIndex = 0) - } - isTagStartChar(t) { - return this.xmlMode ? !Rt(t) : Gr(t) - } - startSpecial(t, s) { - this.isSpecial = !0, this.currentSequence = t, this.sequenceIndex = s, this.state = A.SpecialStartSequence - } - stateBeforeTagName(t) { - if (t === g.ExclamationMark) this.state = A.BeforeDeclaration, this.sectionStart = this.index + 1; - else if (t === g.Questionmark) this.state = A.InProcessingInstruction, this.sectionStart = this.index + 1; - else if (this.isTagStartChar(t)) { - const s = t | 32; - this.sectionStart = this.index, !this.xmlMode && s === ee.TitleEnd[2] ? this.startSpecial(ee.TitleEnd, 3) : this.state = !this.xmlMode && s === ee.ScriptEnd[2] ? A.BeforeSpecialS : A.InTagName - } else t === g.Slash ? this.state = A.BeforeClosingTagName : (this.state = A.Text, this.stateText(t)) - } - stateInTagName(t) { - Rt(t) && (this.cbs.onopentagname(this.sectionStart, this.index), this.sectionStart = -1, this.state = A.BeforeAttributeName, this.stateBeforeAttributeName(t)) - } - stateBeforeClosingTagName(t) { - pe(t) || (t === g.Gt ? this.state = A.Text : (this.state = this.isTagStartChar(t) ? A.InClosingTagName : A.InSpecialComment, this.sectionStart = this.index)) - } - stateInClosingTagName(t) { - (t === g.Gt || pe(t)) && (this.cbs.onclosetag(this.sectionStart, this.index), this.sectionStart = -1, this.state = A.AfterClosingTagName, this.stateAfterClosingTagName(t)) - } - stateAfterClosingTagName(t) { - (t === g.Gt || this.fastForwardTo(g.Gt)) && (this.state = A.Text, this.baseState = A.Text, this.sectionStart = this.index + 1) - } - stateBeforeAttributeName(t) { - t === g.Gt ? (this.cbs.onopentagend(this.index), this.isSpecial ? (this.state = A.InSpecialTag, this.sequenceIndex = 0) : this.state = A.Text, this.baseState = this.state, this.sectionStart = this.index + 1) : t === g.Slash ? this.state = A.InSelfClosingTag : pe(t) || (this.state = A.InAttributeName, this.sectionStart = this.index) - } - stateInSelfClosingTag(t) { - t === g.Gt ? (this.cbs.onselfclosingtag(this.index), this.state = A.Text, this.baseState = A.Text, this.sectionStart = this.index + 1, this.isSpecial = !1) : pe(t) || (this.state = A.BeforeAttributeName, this.stateBeforeAttributeName(t)) - } - stateInAttributeName(t) { - (t === g.Eq || Rt(t)) && (this.cbs.onattribname(this.sectionStart, this.index), this.sectionStart = -1, this.state = A.AfterAttributeName, this.stateAfterAttributeName(t)) - } - stateAfterAttributeName(t) { - t === g.Eq ? this.state = A.BeforeAttributeValue : t === g.Slash || t === g.Gt ? (this.cbs.onattribend(me.NoValue, this.index), this.state = A.BeforeAttributeName, this.stateBeforeAttributeName(t)) : pe(t) || (this.cbs.onattribend(me.NoValue, this.index), this.state = A.InAttributeName, this.sectionStart = this.index) - } - stateBeforeAttributeValue(t) { - t === g.DoubleQuote ? (this.state = A.InAttributeValueDq, this.sectionStart = this.index + 1) : t === g.SingleQuote ? (this.state = A.InAttributeValueSq, this.sectionStart = this.index + 1) : pe(t) || (this.sectionStart = this.index, this.state = A.InAttributeValueNq, this.stateInAttributeValueNoQuotes(t)) - } - handleInAttributeValue(t, s) { - t === s || !this.decodeEntities && this.fastForwardTo(s) ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(s === g.DoubleQuote ? me.Double : me.Single, this.index), this.state = A.BeforeAttributeName) : this.decodeEntities && t === g.Amp && (this.baseState = this.state, this.state = A.BeforeEntity) - } - stateInAttributeValueDoubleQuotes(t) { - this.handleInAttributeValue(t, g.DoubleQuote) - } - stateInAttributeValueSingleQuotes(t) { - this.handleInAttributeValue(t, g.SingleQuote) - } - stateInAttributeValueNoQuotes(t) { - pe(t) || t === g.Gt ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(me.Unquoted, this.index), this.state = A.BeforeAttributeName, this.stateBeforeAttributeName(t)) : this.decodeEntities && t === g.Amp && (this.baseState = this.state, this.state = A.BeforeEntity) - } - stateBeforeDeclaration(t) { - t === g.OpeningSquareBracket ? (this.state = A.CDATASequence, this.sequenceIndex = 0) : this.state = t === g.Dash ? A.BeforeComment : A.InDeclaration - } - stateInDeclaration(t) { - (t === g.Gt || this.fastForwardTo(g.Gt)) && (this.cbs.ondeclaration(this.sectionStart, this.index), this.state = A.Text, this.sectionStart = this.index + 1) - } - stateInProcessingInstruction(t) { - (t === g.Gt || this.fastForwardTo(g.Gt)) && (this.cbs.onprocessinginstruction(this.sectionStart, this.index), this.state = A.Text, this.sectionStart = this.index + 1) - } - stateBeforeComment(t) { - t === g.Dash ? (this.state = A.InCommentLike, this.currentSequence = ee.CommentEnd, this.sequenceIndex = 2, this.sectionStart = this.index + 1) : this.state = A.InDeclaration - } - stateInSpecialComment(t) { - (t === g.Gt || this.fastForwardTo(g.Gt)) && (this.cbs.oncomment(this.sectionStart, this.index, 0), this.state = A.Text, this.sectionStart = this.index + 1) - } - stateBeforeSpecialS(t) { - const s = t | 32; - s === ee.ScriptEnd[3] ? this.startSpecial(ee.ScriptEnd, 4) : s === ee.StyleEnd[3] ? this.startSpecial(ee.StyleEnd, 4) : (this.state = A.InTagName, this.stateInTagName(t)) - } - stateBeforeEntity(t) { - this.entityExcess = 1, this.entityResult = 0, t === g.Number ? this.state = A.BeforeNumericEntity : t === g.Amp || (this.trieIndex = 0, this.trieCurrent = this.entityTrie[0], this.state = A.InNamedEntity, this.stateInNamedEntity(t)) - } - stateInNamedEntity(t) { - if (this.entityExcess += 1, this.trieIndex = Ns(this.entityTrie, this.trieCurrent, this.trieIndex + 1, t), this.trieIndex < 0) { - this.emitNamedEntity(), this.index--; - return - } - this.trieCurrent = this.entityTrie[this.trieIndex]; - const s = this.trieCurrent & re.VALUE_LENGTH; - if (s) { - const a = (s >> 14) - 1; - if (!this.allowLegacyEntity() && t !== g.Semi) this.trieIndex += a; - else { - const i = this.index - this.entityExcess + 1; - i > this.sectionStart && this.emitPartial(this.sectionStart, i), this.entityResult = this.trieIndex, this.trieIndex += a, this.entityExcess = 0, this.sectionStart = this.index + 1, a === 0 && this.emitNamedEntity() - } - } - } - emitNamedEntity() { - if (this.state = this.baseState, this.entityResult === 0) return; - switch ((this.entityTrie[this.entityResult] & re.VALUE_LENGTH) >> 14) { - case 1: { - this.emitCodePoint(this.entityTrie[this.entityResult] & ~re.VALUE_LENGTH); - break - } - case 2: { - this.emitCodePoint(this.entityTrie[this.entityResult + 1]); - break - } - case 3: - this.emitCodePoint(this.entityTrie[this.entityResult + 1]), this.emitCodePoint(this.entityTrie[this.entityResult + 2]) - } - } - stateBeforeNumericEntity(t) { - (t | 32) === g.LowerX ? (this.entityExcess++, this.state = A.InHexEntity) : (this.state = A.InNumericEntity, this.stateInNumericEntity(t)) - } - emitNumericEntity(t) { - const s = this.index - this.entityExcess - 1; - s + 2 + +(this.state === A.InHexEntity) !== this.index && (s > this.sectionStart && this.emitPartial(this.sectionStart, s), this.sectionStart = this.index + Number(t), this.emitCodePoint(ku(this.entityResult))), this.state = this.baseState - } - stateInNumericEntity(t) { - t === g.Semi ? this.emitNumericEntity(!0) : Tu(t) ? (this.entityResult = this.entityResult * 10 + (t - g.Zero), this.entityExcess++) : (this.allowLegacyEntity() ? this.emitNumericEntity(!1) : this.state = this.baseState, this.index--) - } - stateInHexEntity(t) { - t === g.Semi ? this.emitNumericEntity(!0) : Tu(t) ? (this.entityResult = this.entityResult * 16 + (t - g.Zero), this.entityExcess++) : Wr(t) ? (this.entityResult = this.entityResult * 16 + ((t | 32) - g.LowerA + 10), this.entityExcess++) : (this.allowLegacyEntity() ? this.emitNumericEntity(!1) : this.state = this.baseState, this.index--) - } - allowLegacyEntity() { - return !this.xmlMode && (this.baseState === A.Text || this.baseState === A.InSpecialTag) - } - cleanup() { - this.running && this.sectionStart !== this.index && (this.state === A.Text || this.state === A.InSpecialTag && this.sequenceIndex === 0 ? (this.cbs.ontext(this.sectionStart, this.index), this.sectionStart = this.index) : (this.state === A.InAttributeValueDq || this.state === A.InAttributeValueSq || this.state === A.InAttributeValueNq) && (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = this.index)) - } - shouldContinue() { - return this.index < this.buffer.length + this.offset && this.running - } - parse() { - for (; this.shouldContinue();) { - const t = this.buffer.charCodeAt(this.index - this.offset); - switch (this.state) { - case A.Text: { - this.stateText(t); - break - } - case A.SpecialStartSequence: { - this.stateSpecialStartSequence(t); - break - } - case A.InSpecialTag: { - this.stateInSpecialTag(t); - break - } - case A.CDATASequence: { - this.stateCDATASequence(t); - break - } - case A.InAttributeValueDq: { - this.stateInAttributeValueDoubleQuotes(t); - break - } - case A.InAttributeName: { - this.stateInAttributeName(t); - break - } - case A.InCommentLike: { - this.stateInCommentLike(t); - break - } - case A.InSpecialComment: { - this.stateInSpecialComment(t); - break - } - case A.BeforeAttributeName: { - this.stateBeforeAttributeName(t); - break - } - case A.InTagName: { - this.stateInTagName(t); - break - } - case A.InClosingTagName: { - this.stateInClosingTagName(t); - break - } - case A.BeforeTagName: { - this.stateBeforeTagName(t); - break - } - case A.AfterAttributeName: { - this.stateAfterAttributeName(t); - break - } - case A.InAttributeValueSq: { - this.stateInAttributeValueSingleQuotes(t); - break - } - case A.BeforeAttributeValue: { - this.stateBeforeAttributeValue(t); - break - } - case A.BeforeClosingTagName: { - this.stateBeforeClosingTagName(t); - break - } - case A.AfterClosingTagName: { - this.stateAfterClosingTagName(t); - break - } - case A.BeforeSpecialS: { - this.stateBeforeSpecialS(t); - break - } - case A.InAttributeValueNq: { - this.stateInAttributeValueNoQuotes(t); - break - } - case A.InSelfClosingTag: { - this.stateInSelfClosingTag(t); - break - } - case A.InDeclaration: { - this.stateInDeclaration(t); - break - } - case A.BeforeDeclaration: { - this.stateBeforeDeclaration(t); - break - } - case A.BeforeComment: { - this.stateBeforeComment(t); - break - } - case A.InProcessingInstruction: { - this.stateInProcessingInstruction(t); - break - } - case A.InNamedEntity: { - this.stateInNamedEntity(t); - break - } - case A.BeforeEntity: { - this.stateBeforeEntity(t); - break - } - case A.InHexEntity: { - this.stateInHexEntity(t); - break - } - case A.InNumericEntity: { - this.stateInNumericEntity(t); - break - } - default: - this.stateBeforeNumericEntity(t) - } - this.index++ - } - this.cleanup() - } - finish() { - this.state === A.InNamedEntity && this.emitNamedEntity(), this.sectionStart < this.index && this.handleTrailingData(), this.cbs.onend() - } - handleTrailingData() { - const t = this.buffer.length + this.offset; - this.state === A.InCommentLike ? this.currentSequence === ee.CdataEnd ? this.cbs.oncdata(this.sectionStart, t, 0) : this.cbs.oncomment(this.sectionStart, t, 0) : this.state === A.InNumericEntity && this.allowLegacyEntity() ? this.emitNumericEntity(!1) : this.state === A.InHexEntity && this.allowLegacyEntity() ? this.emitNumericEntity(!1) : this.state === A.InTagName || this.state === A.BeforeAttributeName || this.state === A.BeforeAttributeValue || this.state === A.AfterAttributeName || this.state === A.InAttributeName || this.state === A.InAttributeValueSq || this.state === A.InAttributeValueDq || this.state === A.InAttributeValueNq || this.state === A.InClosingTagName || this.cbs.ontext(this.sectionStart, t) - } - emitPartial(t, s) { - this.baseState !== A.Text && this.baseState !== A.InSpecialTag ? this.cbs.onattribdata(t, s) : this.cbs.ontext(t, s) - } - emitCodePoint(t) { - this.baseState !== A.Text && this.baseState !== A.InSpecialTag ? this.cbs.onattribentity(t) : this.cbs.ontextentity(t) - } -} -const qe = new Set(["input", "option", "optgroup", "select", "button", "datalist", "textarea"]), - B = new Set(["p"]), - mu = new Set(["thead", "tbody"]), - _u = new Set(["dd", "dt"]), - bu = new Set(["rt", "rp"]), - Qr = new Map([ - ["tr", new Set(["tr", "th", "td"])], - ["th", new Set(["th"])], - ["td", new Set(["thead", "th", "td"])], - ["body", new Set(["head", "link", "script"])], - ["li", new Set(["li"])], - ["p", B], - ["h1", B], - ["h2", B], - ["h3", B], - ["h4", B], - ["h5", B], - ["h6", B], - ["select", qe], - ["input", qe], - ["output", qe], - ["button", qe], - ["datalist", qe], - ["textarea", qe], - ["option", new Set(["option"])], - ["optgroup", new Set(["optgroup", "option"])], - ["dd", _u], - ["dt", _u], - ["address", B], - ["article", B], - ["aside", B], - ["blockquote", B], - ["details", B], - ["div", B], - ["dl", B], - ["fieldset", B], - ["figcaption", B], - ["figure", B], - ["footer", B], - ["form", B], - ["header", B], - ["hr", B], - ["main", B], - ["nav", B], - ["ol", B], - ["pre", B], - ["section", B], - ["table", B], - ["ul", B], - ["rt", bu], - ["rp", bu], - ["tbody", mu], - ["tfoot", mu] - ]), - Xr = new Set(["area", "base", "basefont", "br", "col", "command", "embed", "frame", "hr", "img", "input", "isindex", "keygen", "link", "meta", "param", "source", "track", "wbr"]), - Au = new Set(["math", "svg"]), - pu = new Set(["mi", "mo", "mn", "ms", "mtext", "annotation-xml", "foreignobject", "desc", "title"]), - Kr = /\s|\//; -class zr { - constructor(t, s = {}) { - var a, i, n, o, d; - this.options = s, this.startIndex = 0, this.endIndex = 0, this.openTagStart = 0, this.tagname = "", this.attribname = "", this.attribvalue = "", this.attribs = null, this.stack = [], this.foreignContext = [], this.buffers = [], this.bufferOffset = 0, this.writeIndex = 0, this.ended = !1, this.cbs = t ?? {}, this.lowerCaseTagNames = (a = s.lowerCaseTags) !== null && a !== void 0 ? a : !s.xmlMode, this.lowerCaseAttributeNames = (i = s.lowerCaseAttributeNames) !== null && i !== void 0 ? i : !s.xmlMode, this.tokenizer = new((n = s.Tokenizer) !== null && n !== void 0 ? n : Vr)(this.options, this), (d = (o = this.cbs).onparserinit) === null || d === void 0 || d.call(o, this) - } - ontext(t, s) { - var a, i; - const n = this.getSlice(t, s); - this.endIndex = s - 1, (i = (a = this.cbs).ontext) === null || i === void 0 || i.call(a, n), this.startIndex = s - } - ontextentity(t) { - var s, a; - const i = this.tokenizer.getSectionStart(); - this.endIndex = i - 1, (a = (s = this.cbs).ontext) === null || a === void 0 || a.call(s, cs(t)), this.startIndex = i - } - isVoidElement(t) { - return !this.options.xmlMode && Xr.has(t) - } - onopentagname(t, s) { - this.endIndex = s; - let a = this.getSlice(t, s); - this.lowerCaseTagNames && (a = a.toLowerCase()), this.emitOpenTag(a) - } - emitOpenTag(t) { - var s, a, i, n; - this.openTagStart = this.startIndex, this.tagname = t; - const o = !this.options.xmlMode && Qr.get(t); - if (o) - for (; this.stack.length > 0 && o.has(this.stack[this.stack.length - 1]);) { - const d = this.stack.pop(); - (a = (s = this.cbs).onclosetag) === null || a === void 0 || a.call(s, d, !0) - } - this.isVoidElement(t) || (this.stack.push(t), Au.has(t) ? this.foreignContext.push(!0) : pu.has(t) && this.foreignContext.push(!1)), (n = (i = this.cbs).onopentagname) === null || n === void 0 || n.call(i, t), this.cbs.onopentag && (this.attribs = {}) - } - endOpenTag(t) { - var s, a; - this.startIndex = this.openTagStart, this.attribs && ((a = (s = this.cbs).onopentag) === null || a === void 0 || a.call(s, this.tagname, this.attribs, t), this.attribs = null), this.cbs.onclosetag && this.isVoidElement(this.tagname) && this.cbs.onclosetag(this.tagname, !0), this.tagname = "" - } - onopentagend(t) { - this.endIndex = t, this.endOpenTag(!1), this.startIndex = t + 1 - } - onclosetag(t, s) { - var a, i, n, o, d, T; - this.endIndex = s; - let E = this.getSlice(t, s); - if (this.lowerCaseTagNames && (E = E.toLowerCase()), (Au.has(E) || pu.has(E)) && this.foreignContext.pop(), this.isVoidElement(E)) !this.options.xmlMode && E === "br" && ((i = (a = this.cbs).onopentagname) === null || i === void 0 || i.call(a, "br"), (o = (n = this.cbs).onopentag) === null || o === void 0 || o.call(n, "br", {}, !0), (T = (d = this.cbs).onclosetag) === null || T === void 0 || T.call(d, "br", !1)); - else { - const b = this.stack.lastIndexOf(E); - if (b !== -1) - if (this.cbs.onclosetag) { - let N = this.stack.length - b; - for (; N--;) this.cbs.onclosetag(this.stack.pop(), N !== 0) - } else this.stack.length = b; - else !this.options.xmlMode && E === "p" && (this.emitOpenTag("p"), this.closeCurrentTag(!0)) - } - this.startIndex = s + 1 - } - onselfclosingtag(t) { - this.endIndex = t, this.options.xmlMode || this.options.recognizeSelfClosing || this.foreignContext[this.foreignContext.length - 1] ? (this.closeCurrentTag(!1), this.startIndex = t + 1) : this.onopentagend(t) - } - closeCurrentTag(t) { - var s, a; - const i = this.tagname; - this.endOpenTag(t), this.stack[this.stack.length - 1] === i && ((a = (s = this.cbs).onclosetag) === null || a === void 0 || a.call(s, i, !t), this.stack.pop()) - } - onattribname(t, s) { - this.startIndex = t; - const a = this.getSlice(t, s); - this.attribname = this.lowerCaseAttributeNames ? a.toLowerCase() : a - } - onattribdata(t, s) { - this.attribvalue += this.getSlice(t, s) - } - onattribentity(t) { - this.attribvalue += cs(t) - } - onattribend(t, s) { - var a, i; - this.endIndex = s, (i = (a = this.cbs).onattribute) === null || i === void 0 || i.call(a, this.attribname, this.attribvalue, t === me.Double ? '"' : t === me.Single ? "'" : t === me.NoValue ? void 0 : null), this.attribs && !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname) && (this.attribs[this.attribname] = this.attribvalue), this.attribvalue = "" - } - getInstructionName(t) { - const s = t.search(Kr); - let a = s < 0 ? t : t.substr(0, s); - return this.lowerCaseTagNames && (a = a.toLowerCase()), a - } - ondeclaration(t, s) { - this.endIndex = s; - const a = this.getSlice(t, s); - if (this.cbs.onprocessinginstruction) { - const i = this.getInstructionName(a); - this.cbs.onprocessinginstruction(`!${i}`, `!${a}`) - } - this.startIndex = s + 1 - } - onprocessinginstruction(t, s) { - this.endIndex = s; - const a = this.getSlice(t, s); - if (this.cbs.onprocessinginstruction) { - const i = this.getInstructionName(a); - this.cbs.onprocessinginstruction(`?${i}`, `?${a}`) - } - this.startIndex = s + 1 - } - oncomment(t, s, a) { - var i, n, o, d; - this.endIndex = s, (n = (i = this.cbs).oncomment) === null || n === void 0 || n.call(i, this.getSlice(t, s - a)), (d = (o = this.cbs).oncommentend) === null || d === void 0 || d.call(o), this.startIndex = s + 1 - } - oncdata(t, s, a) { - var i, n, o, d, T, E, b, N, O, R; - this.endIndex = s; - const C = this.getSlice(t, s - a); - this.options.xmlMode || this.options.recognizeCDATA ? ((n = (i = this.cbs).oncdatastart) === null || n === void 0 || n.call(i), (d = (o = this.cbs).ontext) === null || d === void 0 || d.call(o, C), (E = (T = this.cbs).oncdataend) === null || E === void 0 || E.call(T)) : ((N = (b = this.cbs).oncomment) === null || N === void 0 || N.call(b, `[CDATA[${C}]]`), (R = (O = this.cbs).oncommentend) === null || R === void 0 || R.call(O)), this.startIndex = s + 1 - } - onend() { - var t, s; - if (this.cbs.onclosetag) { - this.endIndex = this.startIndex; - for (let a = this.stack.length; a > 0; this.cbs.onclosetag(this.stack[--a], !0)); - }(s = (t = this.cbs).onend) === null || s === void 0 || s.call(t) - } - reset() { - var t, s, a, i; - (s = (t = this.cbs).onreset) === null || s === void 0 || s.call(t), this.tokenizer.reset(), this.tagname = "", this.attribname = "", this.attribs = null, this.stack.length = 0, this.startIndex = 0, this.endIndex = 0, (i = (a = this.cbs).onparserinit) === null || i === void 0 || i.call(a, this), this.buffers.length = 0, this.bufferOffset = 0, this.writeIndex = 0, this.ended = !1 - } - parseComplete(t) { - this.reset(), this.end(t) - } - getSlice(t, s) { - for (; t - this.bufferOffset >= this.buffers[0].length;) this.shiftBuffer(); - let a = this.buffers[0].slice(t - this.bufferOffset, s - this.bufferOffset); - for (; s - this.bufferOffset > this.buffers[0].length;) this.shiftBuffer(), a += this.buffers[0].slice(0, s - this.bufferOffset); - return a - } - shiftBuffer() { - this.bufferOffset += this.buffers[0].length, this.writeIndex--, this.buffers.shift() - } - write(t) { - var s, a; - if (this.ended) { - (a = (s = this.cbs).onerror) === null || a === void 0 || a.call(s, new Error(".write() after done!")); - return - } - this.buffers.push(t), this.tokenizer.running && (this.tokenizer.write(t), this.writeIndex++) - } - end(t) { - var s, a; - if (this.ended) { - (a = (s = this.cbs).onerror) === null || a === void 0 || a.call(s, new Error(".end() after done!")); - return - } - t && this.write(t), this.ended = !0, this.tokenizer.end() - } - pause() { - this.tokenizer.pause() - } - resume() { - for (this.tokenizer.resume(); this.tokenizer.running && this.writeIndex < this.buffers.length;) this.tokenizer.write(this.buffers[this.writeIndex++]); - this.ended && this.tokenizer.end() - } - parseChunk(t) { - this.write(t) - } - done(t) { - this.end(t) - } -} - -function zo(e, t) { - const s = new ja(void 0, t); - return new zr(s, t).end(e), s.root -} -class jr { - constructor({ - name: t, - build: s, - detect: a, - helper: i, - parse: n - }) { - this.name = t, this.helper = i, this.build = s, this.detect = o => { - if (typeof o != "string") throw new TypeError(`Expected string, got ${typeof o}!`); - return a(o) - }, this.parse = (o, d) => { - if (typeof o != "string") throw new TypeError(`Expected string, got ${typeof o}!`); - return n(o, d) - } - } -} -const ge = e => new jr(e), - Jr = "ssa", - Qe = { - toMilliseconds: e => { - const t = /^\s*(\d+:)?(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(e); - if (!t) throw new TypeError(`Invalid time format: ${e}`); - const s = t[1] ? parseInt(t[1].replace(":", "")) : 0, - a = parseInt(t[2], 10), - i = parseInt(t[3], 10), - n = t[4] ? parseInt(t[4], 10) : 0; - return s * 3600 * 1e3 + a * 60 * 1e3 + i * 1e3 + n * 10 - }, - toTimeString: e => { - const t = Math.floor(e / 1e3 / 3600), - s = Math.floor(e / 1e3 / 60 % 60), - a = Math.floor(e / 1e3 % 60), - i = Math.floor(e % 1e3 / 10); - return `${t}:${s<10?"0":""}${s}:${a<10?"0":""}${a}.${i<10?"0":""}${i}` - } - }, - Iu = (e, t) => { - const s = {}; - for (let a = 0; a < e.length && a < t.length; a++) s[e[a]] = t[a]; - return s - }, - ma = (e, t) => { - var s; - let a, i = null; - const n = [], - o = (s = t.eol) !== null && s !== void 0 ? s : `\r -`, - d = e.split(/\r?\n\s*\n/); - for (const T of d) { - const b = /^\s*\[([^\]]+)\]\r?\n([\s\S]*)$/.exec(T); - if (b) { - const N = b[1], - O = b[2].split(/\r?\n/); - for (const R of O) { - if (/^\s*;/.test(R)) continue; - const C = /^\s*([^\s:]+):\s*(.*)$/.exec(R); - if (C) { - if (N === "Script Info") - if (a || (a = {}, a.type = "meta", a.data = {}, n.push(a)), typeof a.data == "object") { - const k = C[1].trim(), - U = C[2].trim(); - a.data[k] = U - } else throw new TypeError(`Invalid meta data: ${R}`); - else if (N === "V4 Styles" || N === "V4+ Styles") { - const k = C[1].trim(), - U = C[2].trim(); - if (k === "Format") i = U.split(/\s*,\s*/); - else if (k === "Style" && i) { - const w = U.split(/\s*,\s*/), - P = {}; - P.type = "style", P.data = Iu(i, w), n.push(P) - } - } else if (N === "Events") { - const k = C[1].trim(), - U = C[2].trim(); - if (k === "Format") i = U.split(/\s*,\s*/); - else if (k === "Dialogue" && i) { - const w = U.split(/\s*,\s*/), - P = {}; - P.type = "caption", P.data = Iu(i, w), P.start = Qe.toMilliseconds(P.data.Start), P.end = Qe.toMilliseconds(P.data.End), P.duration = P.end - P.start, P.content = P.data.Text; - const F = U.split(",", i.length - 1).join(",").length + 1 + 1; - P.content = U.substring(F), P.data.Text = P.content, P.text = P.content.replace(/\\N/g, o).replace(/\{[^}]+\}/g, ""), n.push(P) - } - } - } - } - } - t.verbose && console.warn("Unknown part", T) - } - return n - }, - _a = (e, t) => { - var s; - const a = (s = t.eol) !== null && s !== void 0 ? s : `\r -`, - i = t.format === "ass"; - let n = ""; - n += `[Script Info]${a}`, n += `; Script generated by subsrt ${a}`, n += `ScriptType: v4.00${i?"+":""}${a}`, n += `Collisions: Normal${a}`, n += a, i ? (n += `[V4+ Styles]${a}`, n += `Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding${a}`, n += `Style: DefaultVCD, Arial,28,&H00B4FCFC,&H00B4FCFC,&H00000008,&H80000008,-1,0,0,0,100,100,0.00,0.00,1,1.00,2.00,2,30,30,30,0${a}`) : (n += `[V4 Styles]${a}`, n += `Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding${a}`, n += `Style: DefaultVCD, Arial,28,11861244,11861244,11861244,-2147483640,-1,0,1,1,2,2,30,30,30,0,0${a}`), n += a, n += `[Events]${a}`, n += `Format: ${i?"Layer":"Marked"}, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text${a}`; - for (const o of e) - if (o.type !== "meta") { - if (!o.type || o.type === "caption") { - n += `Dialogue: ${i?"0":"Marked=0"},${Qe.toTimeString(o.start)},${Qe.toTimeString(o.end)},DefaultVCD, NTP,0000,0000,0000,,${o.text.replace(/\r?\n/g,"\\N")}${a}`; - continue - } - t.verbose && console.log("SKIP:", o) - } return n - }, - ba = e => /^\s*\[Script Info\]\r?\n/.test(e) && /\s*\[Events\]\r?\n/.test(e) ? e.indexOf("[V4+ Styles]") > 0 ? "ass" : "ssa" : !1, - Zr = ge({ - name: Jr, - build: _a, - detect: ba, - helper: Qe, - parse: ma - }), - ec = "ass", - tc = ge({ - name: ec, - build: _a, - detect: ba, - helper: Qe, - parse: ma - }), - sc = "json", - uc = (e, t) => JSON.parse(e), - ac = (e, t) => JSON.stringify(e, void 0, 2), - ic = e => { - try { - const t = JSON.parse(e); - return Array.isArray(t) && t.length > 0 && typeof t[0] == "object" - } catch { - return !1 - } - }, - nc = ge({ - name: sc, - build: ac, - detect: ic, - parse: uc - }), - rc = "lrc", - Ls = { - toMilliseconds: e => { - const t = /^\s*(\d+):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(e); - if (!t) throw new TypeError(`Invalid time format: ${e}`); - const s = parseInt(t[1], 10), - a = parseInt(t[2], 10), - i = t[3] ? parseInt(t[3], 10) : 0; - return s * 60 * 1e3 + a * 1e3 + i * 10 - }, - toTimeString: e => { - const t = Math.floor(e / 1e3 / 60), - s = Math.floor(e / 1e3 % 60), - a = Math.floor(e % 1e3); - return `${(t<10?"0":"")+t}:${s<10?"0":""}${s}.${a<100?"0":""}${a<10?"0":Math.floor(a/10)}` - } - }, - cc = (e, t) => { - let s = null; - const a = [], - i = e.split(/\r?\n/); - for (const n of i) { - if (!n || n.trim().length === 0) continue; - const d = /^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)(?:\r?\n)*$/.exec(n); - if (d) { - const E = {}; - E.type = "caption", E.start = Ls.toMilliseconds(d[1]), E.end = E.start + 2e3, E.duration = E.end - E.start, E.content = d[2], E.text = E.content, a.push(E), s && (s.end = E.start, s.duration = s.end - s.start), s = E; - continue - } - const T = /^\[(\w+):([^\]]*)\](?:\r?\n)*$/.exec(n); - if (T) { - const E = {}; - E.type = "meta", E.tag = T[1], T[2] && (E.data = T[2]), a.push(E); - continue - } - t.verbose && console.warn("Unknown part", n) - } - return a - }, - oc = (e, t) => { - var s; - let a = "", - i = !1; - const n = (s = t.eol) !== null && s !== void 0 ? s : `\r -`; - for (const o of e) { - if (o.type === "meta") { - o.tag && o.data && typeof o.data == "string" && (a += `[${o.tag}:${o.data.replace(/[\r\n]+/g," ")}]${n}`); - continue - } - if (!o.type || o.type === "caption") { - i || (a += n, i = !0), a += `[${Ls.toTimeString(o.start)}]${o.text}${n}`; - continue - } - t.verbose && console.log("SKIP:", o) - } - return a - }, - lc = e => /\r?\n\[\d+:\d{1,2}(?:[.,]\d{1,3})?\].*\r?\n/.test(e), - dc = ge({ - name: rc, - build: oc, - detect: lc, - helper: Ls, - parse: cc - }), - hc = "sbv", - ht = { - toMilliseconds: e => { - const t = /^\s*(\d{1,2}):(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(e); - if (!t) throw new TypeError(`Invalid time format: ${e}`); - const s = parseInt(t[1], 10), - a = parseInt(t[2], 10), - i = parseInt(t[3], 10), - n = t[4] ? parseInt(t[4], 10) : 0; - return s * 3600 * 1e3 + a * 60 * 1e3 + i * 1e3 + n - }, - toTimeString: e => { - const t = Math.floor(e / 1e3 / 3600), - s = Math.floor(e / 1e3 / 60 % 60), - a = Math.floor(e / 1e3 % 60), - i = Math.floor(e % 1e3); - return `${(t<10?"0":"")+t}:${s<10?"0":""}${s}:${a<10?"0":""}${a}.${i<100?"0":""}${i<10?"0":""}${i}` - } - }, - fc = (e, t) => { - var s; - const a = [], - i = (s = t.eol) !== null && s !== void 0 ? s : `\r -`, - n = e.split(/\r?\n\s*\n/); - for (const o of n) { - const T = /^(\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\s*[,;]\s*(\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\r?\n([\s\S]*)$/.exec(o); - if (T) { - const E = {}; - E.type = "caption", E.start = ht.toMilliseconds(T[1]), E.end = ht.toMilliseconds(T[2]), E.duration = E.end - E.start; - const b = T[3].split(/\[br\]|\r?\n/i); - E.content = b.join(i), E.text = E.content.replace(/>>[^:]+:\s*/g, ""), a.push(E); - continue - } - t.verbose && console.warn("Unknown part", o) - } - return a - }, - Ec = (e, t) => { - var s; - let a = ""; - const i = (s = t.eol) !== null && s !== void 0 ? s : `\r -`; - for (const n of e) { - if (!n.type || n.type === "caption") { - a += `${ht.toTimeString(n.start)},${ht.toTimeString(n.end)}${i}`, a += n.text + i, a += i; - continue - } - t.verbose && console.log("SKIP:", n) - } - return a - }, - Tc = e => /\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?\s*[,;]\s*\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?/.test(e), - mc = ge({ - name: hc, - build: Ec, - detect: Tc, - helper: ht, - parse: fc - }), - Aa = "smi", - Os = { - htmlEncode: e => e.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(//g, ">").replace(/\r?\n/g, "
"), - htmlDecode: (e, t) => e.replace(//gi, t || `\r -`).replace(/ /g, " ").replace(/"/g, '"').replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&") - }, - _c = (e, t) => { - var s, a; - if (t.format && t.format !== Aa) throw new TypeError(`Invalid format: ${t.format}`); - const i = [], - n = (s = t.eol) !== null && s !== void 0 ? s : `\r -`, - o = /]*>([\s\S]*)<\/TITLE>/i.exec(e); - if (o) { - const N = {}; - N.type = "meta", N.name = "title", N.data = o[1].replace(/^\s*/g, "").replace(/\s*$/g, ""), i.push(N) - } - const d = /]*>([\s\S]*)<\/STYLE>/i.exec(e); - if (d) { - const N = {}; - N.type = "meta", N.name = "style", N.data = d[1], i.push(N) - } - const T = e.replace(/^[\s\S]*]*>/gi, "").replace(/<\/BODY[^>]*>[\s\S]*$/gi, ""); - let E = null; - const b = T.split(/]+Start\s*=\s*["']?(\d+)[^\d>]*>([\s\S]*)/i.exec(O); - if (R) { - const C = {}; - C.type = "caption", C.start = parseInt(R[1], 10), C.end = C.start + 2e3, C.duration = C.end - C.start, C.content = R[2].replace(/^<\/SYNC[^>]*>/gi, ""); - let k = !0; - const U = (a = /^([\s\S]*)/i.exec(C.content)) !== null && a !== void 0 ? a : /^]*)>([\s\S]*)/i.exec(C.content); - if (U) { - let w = U[2].replace(/\s+/gi, n).replace(//gi, n).replace(/<[^>]+>/g, ""), w = w.replace(/^\s+/g, "").replace(/\s+$/g, ""), k = w.replace(/ /gi, " ").replace(/\s+/g, "").length === 0, C.text = Os.htmlDecode(w, n) - }!t.preserveSpaces && k ? t.verbose && console.log(`INFO: Skipping white space caption at ${C.start}`) : i.push(C), E && (E.end = C.start, E.duration = E.end - E.start), E = C; - continue - } - t.verbose && console.warn("Unknown part", N) - } - return i - }, - bc = (e, t) => { - var s, a, i, n; - const o = (s = t.eol) !== null && s !== void 0 ? s : `\r -`; - let d = ""; - d += `${o}`, d += `${o}`, d += `${(a=t.title)!==null&&a!==void 0?a:""}${o}`, d += `${o}`, d += `${o}`, d += `${o}`; - for (const T of e) - if (T.type !== "meta") { - if (!T.type || T.type === "caption") { - d += `${o}`, d += `

${Os.htmlEncode(T.text||"")}${t.closeTags?"

":""}${o}`, t.closeTags && (d += `
${o}`), d += `${o}`, d += `

 ${t.closeTags?"

":""}${o}`, t.closeTags && (d += `
${o}`); - continue - } - t.verbose && console.log("SKIP:", T) - } return d += `${o}`, d += `
${o}`, d - }, - Ac = e => /]*>[\s\S]*]*>/.test(e), - pc = ge({ - name: Aa, - build: bc, - detect: Ac, - helper: Os, - parse: _c - }), - Ic = "srt", - ft = { - toMilliseconds: e => { - const t = /^\s*(\d{1,2}):(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(e); - if (!t) throw new TypeError(`Invalid time format: ${e}`); - const s = parseInt(t[1], 10), - a = parseInt(t[2], 10), - i = parseInt(t[3], 10), - n = t[4] ? parseInt(t[4], 10) : 0; - return s * 3600 * 1e3 + a * 60 * 1e3 + i * 1e3 + n - }, - toTimeString: e => { - const t = Math.floor(e / 1e3 / 3600), - s = Math.floor(e / 1e3 / 60 % 60), - a = Math.floor(e / 1e3 % 60), - i = Math.floor(e % 1e3); - return `${(t<10?"0":"")+t}:${s<10?"0":""}${s}:${a<10?"0":""}${a},${i<100?"0":""}${i<10?"0":""}${i}` - } - }, - Nc = (e, t) => { - var s; - const a = [], - i = (s = t.eol) !== null && s !== void 0 ? s : `\r -`, - n = e.split(/\r?\n\s*\n/); - for (const o of n) { - const T = /^(\d+)\r?\n(\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\s*-->\s*(\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\r?\n([\s\S]*)$/.exec(o); - if (T) { - const E = {}; - E.type = "caption", E.index = parseInt(T[1], 10), E.start = ft.toMilliseconds(T[2]), E.end = ft.toMilliseconds(T[3]), E.duration = E.end - E.start; - const b = T[4].split(/\r?\n/); - E.content = b.join(i), E.text = E.content.replace(/<[^>]+>/g, "").replace(/\{[^}]+\}/g, "").replace(/>>[^:]*:\s*/g, ""), a.push(E); - continue - } - t.verbose && console.warn("Unknown part", o) - } - return a - }, - gc = (e, t) => { - var s; - let a = ""; - const i = (s = t.eol) !== null && s !== void 0 ? s : `\r -`; - for (let n = 0; n < e.length; n++) { - const o = e[n]; - if (!o.type || o.type === "caption") { - a += (n + 1).toString() + i, a += `${ft.toTimeString(o.start)} --> ${ft.toTimeString(o.end)}${i}`, a += o.text + i, a += i; - continue - } - t.verbose && console.log("SKIP:", o) - } - return a - }, - Cc = e => /\d+\r?\n\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?\s*-->\s*\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?/.test(e), - Sc = ge({ - name: Ic, - build: gc, - detect: Cc, - helper: ft, - parse: Nc - }), - Rc = "sub", - fs = 25, - Lc = (e, t) => { - var s; - t.fps || (t.fps = fs); - const a = t.fps > 0 ? t.fps : fs, - i = [], - n = (s = t.eol) !== null && s !== void 0 ? s : `\r -`, - o = e.split(/\r?\n/); - for (let d = 0; d < o.length; d++) { - const E = /^\{(\d+)\}\{(\d+)\}(.*)$/.exec(o[d]); - if (E) { - const b = {}; - b.type = "caption", b.index = d + 1, b.frame = { - start: parseInt(E[1], 10), - end: parseInt(E[2], 10), - count: parseInt(E[2]) - parseInt(E[1], 10) - }, b.start = Math.round(b.frame.start / a), b.end = Math.round(b.frame.end / a), b.duration = b.end - b.start; - const N = E[3].split(/\|/); - b.content = N.join(n), b.text = b.content.replace(/\{[^}]+\}/g, ""), i.push(b); - continue - } - t.verbose && console.warn("Unknown part", o[d]) - } - return i - }, - Oc = (e, t) => { - var s, a; - const i = ((s = t.fps) !== null && s !== void 0 ? s : 0) > 0 ? t.fps : fs; - let n = ""; - const o = (a = t.eol) !== null && a !== void 0 ? a : `\r -`; - for (const d of e) { - if (!d.type || d.type === "caption") { - const T = typeof d.frame == "object" && d.frame.start >= 0 ? d.frame.start : d.start * i, - E = typeof d.frame == "object" && d.frame.end >= 0 ? d.frame.end : d.end * i, - b = d.text.replace(/\r?\n/, "|"); - n += `{${T}}{${E}}${b}${o}`; - continue - } - t.verbose && console.log("SKIP:", d) - } - return n - }, - Dc = e => /^\{\d+\}\{\d+\}.*/.test(e), - xc = ge({ - name: Rc, - build: Oc, - detect: Dc, - parse: Lc - }), - Mc = "vtt", - Et = { - toMilliseconds: e => { - const t = /^\s*(\d{1,2}:)?(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(e); - if (!t) throw new TypeError(`Invalid time format: ${e}`); - const s = t[1] ? parseInt(t[1].replace(":", "")) : 0, - a = parseInt(t[2], 10), - i = parseInt(t[3], 10), - n = t[4] ? parseInt(t[4], 10) : 0; - return s * 3600 * 1e3 + a * 60 * 1e3 + i * 1e3 + n - }, - toTimeString: e => { - const t = Math.floor(e / 1e3 / 3600), - s = Math.floor(e / 1e3 / 60 % 60), - a = Math.floor(e / 1e3 % 60), - i = Math.floor(e % 1e3); - return `${(t<10?"0":"")+t}:${s<10?"0":""}${s}:${a<10?"0":""}${a}.${i<100?"0":""}${i<10?"0":""}${i}` - } - }, - Pc = (e, t) => { - var s; - let a = 1; - const i = [], - n = e.split(/\r?\n\s*\n/); - for (const o of n) { - const T = /^([^\r\n]+\r?\n)?((?:\d{1,2}:)?\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\s*-->\s*((?:\d{1,2}:)?\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)[^\S\r\n]?.*\r?\n([\s\S]*)$/.exec(o); - if (T) { - const b = {}; - b.type = "caption", b.index = a++, T[1] && (b.cue = T[1].replace(/[\r\n]*/g, "")), b.start = Et.toMilliseconds(T[2]), b.end = Et.toMilliseconds(T[3]), b.duration = b.end - b.start, b.content = T[4], b.text = b.content.replace(/<[^>]+>/g, "").replace(/\{[^}]+\}/g, ""), i.push(b); - continue - } - const E = (s = /^([A-Z]+)(\r?\n([\s\S]*))?$/.exec(o)) !== null && s !== void 0 ? s : /^([A-Z]+)\s+([^\r\n]*)$/.exec(o); - if (E) { - const b = {}; - b.type = "meta", b.name = E[1], E[3] && (b.data = E[3]), i.push(b); - continue - } - t.verbose && console.warn("Unknown part", o) - } - return i - }, - Bc = (e, t) => { - var s; - const a = (s = t.eol) !== null && s !== void 0 ? s : `\r -`; - let i = `WEBVTT${a}${a}`; - for (let n = 0; n < e.length; n++) { - const o = e[n]; - if (o.type === "meta") { - if (o.name === "WEBVTT") continue; - i += o.name + a, i += typeof o.data == "string" ? o.data + a : "", i += a; - continue - } - if (!o.type || o.type === "caption") { - i += (n + 1).toString() + a, i += `${Et.toTimeString(o.start)} --> ${Et.toTimeString(o.end)}${a}`, i += o.text + a, i += a; - continue - } - t.verbose && console.log("SKIP:", o) - } - return i - }, - yc = e => /^\s*WEBVTT\r?\n/.test(e), - kc = ge({ - name: Mc, - build: Bc, - detect: yc, - helper: Et, - parse: Pc - }), - Fc = { - vtt: kc, - lrc: dc, - smi: pc, - ssa: Zr, - ass: tc, - sub: xc, - srt: Sc, - sbv: mc, - json: nc - }, - Hc = e => JSON.parse(JSON.stringify(e)); -class Uc { - constructor() { - this.format = Fc, this.list = () => Object.keys(this.format), this.detect = t => { - const s = this.list(); - for (const a of s) { - const i = this.format[a]; - if (typeof i > "u" || typeof i.detect != "function") continue; - const n = i.detect(t); - if (n === !0 || n === a) return a - } - return "" - }, this.parse = (t, s = {}) => { - var a; - const i = (a = s.format) !== null && a !== void 0 ? a : this.detect(t); - if (!i || i.trim().length === 0) throw new TypeError("Cannot determine subtitle format"); - const n = this.format[i]; - if (typeof n > "u") throw new TypeError(`Unsupported subtitle format: ${i}`); - const o = n.parse; - if (typeof o != "function") throw new TypeError(`Subtitle format does not support 'parse' op: ${i}`); - return o(t, s) - }, this.build = (t, s = {}) => { - const a = s.format || "srt"; - if (!a || a.trim().length === 0) throw new TypeError("Cannot determine subtitle format"); - const i = this.format[a]; - if (typeof i > "u") throw new TypeError(`Unsupported subtitle format: ${a}`); - const n = i.build; - if (typeof n != "function") throw new TypeError(`Subtitle format does not support 'build' op: ${a}`); - return n(t, s) - }, this.convert = (t, s = {}) => { - var a; - let i = {}; - typeof s == "string" ? i.to = s : i = s; - const n = { - format: (a = i.from) !== null && a !== void 0 ? a : void 0, - verbose: i.verbose, - eol: i.eol - }; - let o = this.parse(t, n); - i.resync && (o = this.resync(o, i.resync)); - const d = { - format: i.to || i.format, - verbose: i.verbose, - eol: i.eol - }; - return this.build(o, d) - }, this.resync = (t, s = {}) => { - var a, i, n, o; - let d, T, E = !1, - b; - if (typeof s == "function") d = s; - else if (typeof s == "number") b = s, d = O => [O[0] + b, O[1] + b]; - else if (typeof s == "object") b = ((a = s.offset) !== null && a !== void 0 ? a : 0) * (s.frame ? (i = s.fps) !== null && i !== void 0 ? i : 25 : 1), T = (n = s.ratio) !== null && n !== void 0 ? n : 1, E = (o = s.frame) !== null && o !== void 0 ? o : !1, d = O => [Math.round(O[0] * T + b), Math.round(O[1] * T + b)]; - else throw new TypeError("Argument 'options' not defined"); - const N = []; - for (const O of t) { - const R = Hc(O); - if (!R.type || R.type === "caption") - if (E && R.frame) { - const C = d([R.frame.start, R.frame.end]); - C && C.length === 2 && (R.frame.start = C[0], R.frame.end = C[1], R.frame.count = R.frame.end - R.frame.start) - } else { - const C = d([R.start, R.end]); - C && C.length === 2 && (R.start = C[0], R.end = C[1], R.duration = R.end - R.start) - } N.push(R) - } - return N - } - } -} -const wc = new Uc, - { - format: jo, - list: Jo, - detect: Zo, - parse: e0, - build: t0, - convert: s0, - resync: u0 - } = wc; /*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */ -const { - entries: pa, - setPrototypeOf: Nu, - isFrozen: vc, - getPrototypeOf: Yc, - getOwnPropertyDescriptor: Ia -} = Object; -let { - freeze: K, - seal: le, - create: Na -} = Object, { - apply: Es, - construct: Ts -} = typeof Reflect < "u" && Reflect; -K || (K = function (t) { - return t -}); -le || (le = function (t) { - return t -}); -Es || (Es = function (t, s, a) { - return t.apply(s, a) -}); -Ts || (Ts = function (t, s) { - return new t(...s) -}); -const Lt = ce(Array.prototype.forEach), - gu = ce(Array.prototype.pop), - tt = ce(Array.prototype.push), - Pt = ce(String.prototype.toLowerCase), - ss = ce(String.prototype.toString), - $c = ce(String.prototype.match), - st = ce(String.prototype.replace), - qc = ce(String.prototype.indexOf), - Gc = ce(String.prototype.trim), - ie = ce(RegExp.prototype.test), - ut = Wc(TypeError); - -function ce(e) { - return function (t) { - for (var s = arguments.length, a = new Array(s > 1 ? s - 1 : 0), i = 1; i < s; i++) a[i - 1] = arguments[i]; - return Es(e, t, a) - } -} - -function Wc(e) { - return function () { - for (var t = arguments.length, s = new Array(t), a = 0; a < t; a++) s[a] = arguments[a]; - return Ts(e, s) - } -} - -function x(e, t) { - let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Pt; - Nu && Nu(e, null); - let a = t.length; - for (; a--;) { - let i = t[a]; - if (typeof i == "string") { - const n = s(i); - n !== i && (vc(t) || (t[a] = n), i = n) - } - e[i] = !0 - } - return e -} - -function Ge(e) { - const t = Na(null); - for (const [s, a] of pa(e)) Ia(e, s) !== void 0 && (t[s] = a); - return t -} - -function Ot(e, t) { - for (; e !== null;) { - const a = Ia(e, t); - if (a) { - if (a.get) return ce(a.get); - if (typeof a.value == "function") return ce(a.value) - } - e = Yc(e) - } - - function s(a) { - return console.warn("fallback value for", a), null - } - return s -} -const Cu = K(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), - us = K(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), - as = K(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), - Vc = K(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), - is = K(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), - Qc = K(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), - Su = K(["#text"]), - Ru = K(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "xmlns", "slot"]), - ns = K(["accent-height", "accumulate", "additive", "alignment-baseline", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), - Lu = K(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), - Dt = K(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), - Xc = le(/\{\{[\w\W]*|[\w\W]*\}\}/gm), - Kc = le(/<%[\w\W]*|[\w\W]*%>/gm), - zc = le(/\${[\w\W]*}/gm), - jc = le(/^data-[\-\w.\u00B7-\uFFFF]/), - Jc = le(/^aria-[\-\w]+$/), - ga = le(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), - Zc = le(/^(?:\w+script|data):/i), - eo = le(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), - Ca = le(/^html$/i); -var Ou = Object.freeze({ - __proto__: null, - MUSTACHE_EXPR: Xc, - ERB_EXPR: Kc, - TMPLIT_EXPR: zc, - DATA_ATTR: jc, - ARIA_ATTR: Jc, - IS_ALLOWED_URI: ga, - IS_SCRIPT_OR_DATA: Zc, - ATTR_WHITESPACE: eo, - DOCTYPE_NAME: Ca -}); -const to = function () { - return typeof window > "u" ? null : window - }, - so = function (t, s) { - if (typeof t != "object" || typeof t.createPolicy != "function") return null; - let a = null; - const i = "data-tt-policy-suffix"; - s && s.hasAttribute(i) && (a = s.getAttribute(i)); - const n = "dompurify" + (a ? "#" + a : ""); - try { - return t.createPolicy(n, { - createHTML(o) { - return o - }, - createScriptURL(o) { - return o - } - }) - } catch { - return console.warn("TrustedTypes policy " + n + " could not be created."), null - } - }; - -function Sa() { - let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : to(); - const t = L => Sa(L); - if (t.version = "3.0.6", t.removed = [], !e || !e.document || e.document.nodeType !== 9) return t.isSupported = !1, t; - let { - document: s - } = e; - const a = s, - i = a.currentScript, - { - DocumentFragment: n, - HTMLTemplateElement: o, - Node: d, - Element: T, - NodeFilter: E, - NamedNodeMap: b = e.NamedNodeMap || e.MozNamedAttrMap, - HTMLFormElement: N, - DOMParser: O, - trustedTypes: R - } = e, - C = T.prototype, - k = Ot(C, "cloneNode"), - U = Ot(C, "nextSibling"), - w = Ot(C, "childNodes"), - P = Ot(C, "parentNode"); - if (typeof o == "function") { - const L = s.createElement("template"); - L.content && L.content.ownerDocument && (s = L.content.ownerDocument) - } - let F, he = ""; - const { - implementation: Xe, - createNodeIterator: Ke, - createDocumentFragment: z, - getElementsByTagName: fe - } = s, { - importNode: Ee - } = a; - let ue = {}; - t.isSupported = typeof pa == "function" && typeof P == "function" && Xe && Xe.createHTMLDocument !== void 0; - const { - MUSTACHE_EXPR: Le, - ERB_EXPR: Te, - TMPLIT_EXPR: _t, - DATA_ATTR: ae, - ARIA_ATTR: Fe, - IS_SCRIPT_OR_DATA: bt, - ATTR_WHITESPACE: xs - } = Ou; - let { - IS_ALLOWED_URI: Ms - } = Ou, Y = null; - const Ps = x({}, [...Cu, ...us, ...as, ...is, ...Su]); - let $ = null; - const Bs = x({}, [...Ru, ...ns, ...Lu, ...Dt]); - let v = Object.seal(Na(null, { - tagNameCheck: { - writable: !0, - configurable: !1, - enumerable: !0, - value: null - }, - attributeNameCheck: { - writable: !0, - configurable: !1, - enumerable: !0, - value: null - }, - allowCustomizedBuiltInElements: { - writable: !0, - configurable: !1, - enumerable: !0, - value: !1 - } - })), - ze = null, - Yt = null, - ys = !0, - $t = !0, - ks = !1, - Fs = !0, - He = !1, - Oe = !1, - qt = !1, - Gt = !1, - Ue = !1, - At = !1, - pt = !1, - Hs = !0, - Us = !1; - const ka = "user-content-"; - let Wt = !0, - je = !1, - we = {}, - ve = null; - const ws = x({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]); - let vs = null; - const Ys = x({}, ["audio", "video", "img", "source", "image", "track"]); - let Vt = null; - const $s = x({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), - It = "http://www.w3.org/1998/Math/MathML", - Nt = "http://www.w3.org/2000/svg", - be = "http://www.w3.org/1999/xhtml"; - let Ye = be, - Qt = !1, - Xt = null; - const Fa = x({}, [It, Nt, be], ss); - let De = null; - const Ha = ["application/xhtml+xml", "text/html"], - Ua = "text/html"; - let q = null, - $e = null; - const wa = s.createElement("form"), - qs = function (h) { - return h instanceof RegExp || h instanceof Function - }, - Kt = function () { - let h = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; - if (!($e && $e === h)) { - if ((!h || typeof h != "object") && (h = {}), h = Ge(h), De = Ha.indexOf(h.PARSER_MEDIA_TYPE) === -1 ? De = Ua : De = h.PARSER_MEDIA_TYPE, q = De === "application/xhtml+xml" ? ss : Pt, Y = "ALLOWED_TAGS" in h ? x({}, h.ALLOWED_TAGS, q) : Ps, $ = "ALLOWED_ATTR" in h ? x({}, h.ALLOWED_ATTR, q) : Bs, Xt = "ALLOWED_NAMESPACES" in h ? x({}, h.ALLOWED_NAMESPACES, ss) : Fa, Vt = "ADD_URI_SAFE_ATTR" in h ? x(Ge($s), h.ADD_URI_SAFE_ATTR, q) : $s, vs = "ADD_DATA_URI_TAGS" in h ? x(Ge(Ys), h.ADD_DATA_URI_TAGS, q) : Ys, ve = "FORBID_CONTENTS" in h ? x({}, h.FORBID_CONTENTS, q) : ws, ze = "FORBID_TAGS" in h ? x({}, h.FORBID_TAGS, q) : {}, Yt = "FORBID_ATTR" in h ? x({}, h.FORBID_ATTR, q) : {}, we = "USE_PROFILES" in h ? h.USE_PROFILES : !1, ys = h.ALLOW_ARIA_ATTR !== !1, $t = h.ALLOW_DATA_ATTR !== !1, ks = h.ALLOW_UNKNOWN_PROTOCOLS || !1, Fs = h.ALLOW_SELF_CLOSE_IN_ATTR !== !1, He = h.SAFE_FOR_TEMPLATES || !1, Oe = h.WHOLE_DOCUMENT || !1, Ue = h.RETURN_DOM || !1, At = h.RETURN_DOM_FRAGMENT || !1, pt = h.RETURN_TRUSTED_TYPE || !1, Gt = h.FORCE_BODY || !1, Hs = h.SANITIZE_DOM !== !1, Us = h.SANITIZE_NAMED_PROPS || !1, Wt = h.KEEP_CONTENT !== !1, je = h.IN_PLACE || !1, Ms = h.ALLOWED_URI_REGEXP || ga, Ye = h.NAMESPACE || be, v = h.CUSTOM_ELEMENT_HANDLING || {}, h.CUSTOM_ELEMENT_HANDLING && qs(h.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (v.tagNameCheck = h.CUSTOM_ELEMENT_HANDLING.tagNameCheck), h.CUSTOM_ELEMENT_HANDLING && qs(h.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (v.attributeNameCheck = h.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), h.CUSTOM_ELEMENT_HANDLING && typeof h.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (v.allowCustomizedBuiltInElements = h.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), He && ($t = !1), At && (Ue = !0), we && (Y = x({}, [...Su]), $ = [], we.html === !0 && (x(Y, Cu), x($, Ru)), we.svg === !0 && (x(Y, us), x($, ns), x($, Dt)), we.svgFilters === !0 && (x(Y, as), x($, ns), x($, Dt)), we.mathMl === !0 && (x(Y, is), x($, Lu), x($, Dt))), h.ADD_TAGS && (Y === Ps && (Y = Ge(Y)), x(Y, h.ADD_TAGS, q)), h.ADD_ATTR && ($ === Bs && ($ = Ge($)), x($, h.ADD_ATTR, q)), h.ADD_URI_SAFE_ATTR && x(Vt, h.ADD_URI_SAFE_ATTR, q), h.FORBID_CONTENTS && (ve === ws && (ve = Ge(ve)), x(ve, h.FORBID_CONTENTS, q)), Wt && (Y["#text"] = !0), Oe && x(Y, ["html", "head", "body"]), Y.table && (x(Y, ["tbody"]), delete ze.tbody), h.TRUSTED_TYPES_POLICY) { - if (typeof h.TRUSTED_TYPES_POLICY.createHTML != "function") throw ut('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.'); - if (typeof h.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw ut('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.'); - F = h.TRUSTED_TYPES_POLICY, he = F.createHTML("") - } else F === void 0 && (F = so(R, i)), F !== null && typeof he == "string" && (he = F.createHTML("")); - K && K(h), $e = h - } - }, - Gs = x({}, ["mi", "mo", "mn", "ms", "mtext"]), - Ws = x({}, ["foreignobject", "desc", "title", "annotation-xml"]), - va = x({}, ["title", "style", "font", "a", "script"]), - gt = x({}, us); - x(gt, as), x(gt, Vc); - const zt = x({}, is); - x(zt, Qc); - const Ya = function (h) { - let I = P(h); - (!I || !I.tagName) && (I = { - namespaceURI: Ye, - tagName: "template" - }); - const S = Pt(h.tagName), - y = Pt(I.tagName); - return Xt[h.namespaceURI] ? h.namespaceURI === Nt ? I.namespaceURI === be ? S === "svg" : I.namespaceURI === It ? S === "svg" && (y === "annotation-xml" || Gs[y]) : !!gt[S] : h.namespaceURI === It ? I.namespaceURI === be ? S === "math" : I.namespaceURI === Nt ? S === "math" && Ws[y] : !!zt[S] : h.namespaceURI === be ? I.namespaceURI === Nt && !Ws[y] || I.namespaceURI === It && !Gs[y] ? !1 : !zt[S] && (va[S] || !gt[S]) : !!(De === "application/xhtml+xml" && Xt[h.namespaceURI]) : !1 - }, - xe = function (h) { - tt(t.removed, { - element: h - }); - try { - h.parentNode.removeChild(h) - } catch { - h.remove() - } - }, - jt = function (h, I) { - try { - tt(t.removed, { - attribute: I.getAttributeNode(h), - from: I - }) - } catch { - tt(t.removed, { - attribute: null, - from: I - }) - } - if (I.removeAttribute(h), h === "is" && !$[h]) - if (Ue || At) try { - xe(I) - } catch {} else try { - I.setAttribute(h, "") - } catch {} - }, - Vs = function (h) { - let I = null, - S = null; - if (Gt) h = "" + h; - else { - const Q = $c(h, /^[\r\n\t ]+/); - S = Q && Q[0] - } - De === "application/xhtml+xml" && Ye === be && (h = '' + h + ""); - const y = F ? F.createHTML(h) : h; - if (Ye === be) try { - I = new O().parseFromString(y, De) - } catch {} - if (!I || !I.documentElement) { - I = Xe.createDocument(Ye, "template", null); - try { - I.documentElement.innerHTML = Qt ? he : y - } catch {} - } - const V = I.body || I.documentElement; - return h && S && V.insertBefore(s.createTextNode(S), V.childNodes[0] || null), Ye === be ? fe.call(I, Oe ? "html" : "body")[0] : Oe ? I.documentElement : V - }, - Qs = function (h) { - return Ke.call(h.ownerDocument || h, h, E.SHOW_ELEMENT | E.SHOW_COMMENT | E.SHOW_TEXT, null) - }, - $a = function (h) { - return h instanceof N && (typeof h.nodeName != "string" || typeof h.textContent != "string" || typeof h.removeChild != "function" || !(h.attributes instanceof b) || typeof h.removeAttribute != "function" || typeof h.setAttribute != "function" || typeof h.namespaceURI != "string" || typeof h.insertBefore != "function" || typeof h.hasChildNodes != "function") - }, - Xs = function (h) { - return typeof d == "function" && h instanceof d - }, - Ae = function (h, I, S) { - ue[h] && Lt(ue[h], y => { - y.call(t, I, S, $e) - }) - }, - Ks = function (h) { - let I = null; - if (Ae("beforeSanitizeElements", h, null), $a(h)) return xe(h), !0; - const S = q(h.nodeName); - if (Ae("uponSanitizeElement", h, { - tagName: S, - allowedTags: Y - }), h.hasChildNodes() && !Xs(h.firstElementChild) && ie(/<[/\w]/g, h.innerHTML) && ie(/<[/\w]/g, h.textContent)) return xe(h), !0; - if (!Y[S] || ze[S]) { - if (!ze[S] && js(S) && (v.tagNameCheck instanceof RegExp && ie(v.tagNameCheck, S) || v.tagNameCheck instanceof Function && v.tagNameCheck(S))) return !1; - if (Wt && !ve[S]) { - const y = P(h) || h.parentNode, - V = w(h) || h.childNodes; - if (V && y) { - const Q = V.length; - for (let j = Q - 1; j >= 0; --j) y.insertBefore(k(V[j], !0), U(h)) - } - } - return xe(h), !0 - } - return h instanceof T && !Ya(h) || (S === "noscript" || S === "noembed" || S === "noframes") && ie(/<\/no(script|embed|frames)/i, h.innerHTML) ? (xe(h), !0) : (He && h.nodeType === 3 && (I = h.textContent, Lt([Le, Te, _t], y => { - I = st(I, y, " ") - }), h.textContent !== I && (tt(t.removed, { - element: h.cloneNode() - }), h.textContent = I)), Ae("afterSanitizeElements", h, null), !1) - }, - zs = function (h, I, S) { - if (Hs && (I === "id" || I === "name") && (S in s || S in wa)) return !1; - if (!($t && !Yt[I] && ie(ae, I))) { - if (!(ys && ie(Fe, I))) { - if (!$[I] || Yt[I]) { - if (!(js(h) && (v.tagNameCheck instanceof RegExp && ie(v.tagNameCheck, h) || v.tagNameCheck instanceof Function && v.tagNameCheck(h)) && (v.attributeNameCheck instanceof RegExp && ie(v.attributeNameCheck, I) || v.attributeNameCheck instanceof Function && v.attributeNameCheck(I)) || I === "is" && v.allowCustomizedBuiltInElements && (v.tagNameCheck instanceof RegExp && ie(v.tagNameCheck, S) || v.tagNameCheck instanceof Function && v.tagNameCheck(S)))) return !1 - } else if (!Vt[I]) { - if (!ie(Ms, st(S, xs, ""))) { - if (!((I === "src" || I === "xlink:href" || I === "href") && h !== "script" && qc(S, "data:") === 0 && vs[h])) { - if (!(ks && !ie(bt, st(S, xs, "")))) { - if (S) return !1 - } - } - } - } - } - } - return !0 - }, - js = function (h) { - return h.indexOf("-") > 0 - }, - Js = function (h) { - Ae("beforeSanitizeAttributes", h, null); - const { - attributes: I - } = h; - if (!I) return; - const S = { - attrName: "", - attrValue: "", - keepAttr: !0, - allowedAttributes: $ - }; - let y = I.length; - for (; y--;) { - const V = I[y], - { - name: Q, - namespaceURI: j, - value: Me - } = V, - Je = q(Q); - let J = Q === "value" ? Me : Gc(Me); - if (S.attrName = Je, S.attrValue = J, S.keepAttr = !0, S.forceKeepAttr = void 0, Ae("uponSanitizeAttribute", h, S), J = S.attrValue, S.forceKeepAttr || (jt(Q, h), !S.keepAttr)) continue; - if (!Fs && ie(/\/>/i, J)) { - jt(Q, h); - continue - } - He && Lt([Le, Te, _t], eu => { - J = st(J, eu, " ") - }); - const Zs = q(h.nodeName); - if (zs(Zs, Je, J)) { - if (Us && (Je === "id" || Je === "name") && (jt(Q, h), J = ka + J), F && typeof R == "object" && typeof R.getAttributeType == "function" && !j) switch (R.getAttributeType(Zs, Je)) { - case "TrustedHTML": { - J = F.createHTML(J); - break - } - case "TrustedScriptURL": { - J = F.createScriptURL(J); - break - } - } - try { - j ? h.setAttributeNS(j, Q, J) : h.setAttribute(Q, J), gu(t.removed) - } catch {} - } - } - Ae("afterSanitizeAttributes", h, null) - }, - qa = function L(h) { - let I = null; - const S = Qs(h); - for (Ae("beforeSanitizeShadowDOM", h, null); I = S.nextNode();) Ae("uponSanitizeShadowNode", I, null), !Ks(I) && (I.content instanceof n && L(I.content), Js(I)); - Ae("afterSanitizeShadowDOM", h, null) - }; - return t.sanitize = function (L) { - let h = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, - I = null, - S = null, - y = null, - V = null; - if (Qt = !L, Qt && (L = ""), typeof L != "string" && !Xs(L)) - if (typeof L.toString == "function") { - if (L = L.toString(), typeof L != "string") throw ut("dirty is not a string, aborting") - } else throw ut("toString is not a function"); - if (!t.isSupported) return L; - if (qt || Kt(h), t.removed = [], typeof L == "string" && (je = !1), je) { - if (L.nodeName) { - const Me = q(L.nodeName); - if (!Y[Me] || ze[Me]) throw ut("root node is forbidden and cannot be sanitized in-place") - } - } else if (L instanceof d) I = Vs(""), S = I.ownerDocument.importNode(L, !0), S.nodeType === 1 && S.nodeName === "BODY" || S.nodeName === "HTML" ? I = S : I.appendChild(S); - else { - if (!Ue && !He && !Oe && L.indexOf("<") === -1) return F && pt ? F.createHTML(L) : L; - if (I = Vs(L), !I) return Ue ? null : pt ? he : "" - } - I && Gt && xe(I.firstChild); - const Q = Qs(je ? L : I); - for (; y = Q.nextNode();) Ks(y) || (y.content instanceof n && qa(y.content), Js(y)); - if (je) return L; - if (Ue) { - if (At) - for (V = z.call(I.ownerDocument); I.firstChild;) V.appendChild(I.firstChild); - else V = I; - return ($.shadowroot || $.shadowrootmode) && (V = Ee.call(a, V, !0)), V - } - let j = Oe ? I.outerHTML : I.innerHTML; - return Oe && Y["!doctype"] && I.ownerDocument && I.ownerDocument.doctype && I.ownerDocument.doctype.name && ie(Ca, I.ownerDocument.doctype.name) && (j = " -` + j), He && Lt([Le, Te, _t], Me => { - j = st(j, Me, " ") - }), F && pt ? F.createHTML(j) : j - }, t.setConfig = function () { - let L = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; - Kt(L), qt = !0 - }, t.clearConfig = function () { - $e = null, qt = !1 - }, t.isValidAttribute = function (L, h, I) { - $e || Kt({}); - const S = q(L), - y = q(h); - return zs(S, y, I) - }, t.addHook = function (L, h) { - typeof h == "function" && (ue[L] = ue[L] || [], tt(ue[L], h)) - }, t.removeHook = function (L) { - if (ue[L]) return gu(ue[L]) - }, t.removeHooks = function (L) { - ue[L] && (ue[L] = []) - }, t.removeAllHooks = function () { - ue = {} - }, t -} -var a0 = Sa(); - -function Ne(e) { - return Array.isArray ? Array.isArray(e) : Oa(e) === "[object Array]" -} -const uo = 1 / 0; - -function ao(e) { - if (typeof e == "string") return e; - let t = e + ""; - return t == "0" && 1 / e == -uo ? "-0" : t -} - -function io(e) { - return e == null ? "" : ao(e) -} - -function _e(e) { - return typeof e == "string" -} - -function Ra(e) { - return typeof e == "number" -} - -function no(e) { - return e === !0 || e === !1 || ro(e) && Oa(e) == "[object Boolean]" -} - -function La(e) { - return typeof e == "object" -} - -function ro(e) { - return La(e) && e !== null -} - -function ne(e) { - return e != null -} - -function rs(e) { - return !e.trim().length -} - -function Oa(e) { - return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e) -} -const co = "Incorrect 'index' type", - oo = e => `Invalid value for key ${e}`, - lo = e => `Pattern length exceeds max of ${e}.`, - ho = e => `Missing ${e} property in key`, - fo = e => `Property 'weight' in key '${e}' must be a positive integer`, - Du = Object.prototype.hasOwnProperty; -class Eo { - constructor(t) { - this._keys = [], this._keyMap = {}; - let s = 0; - t.forEach(a => { - let i = Da(a); - this._keys.push(i), this._keyMap[i.id] = i, s += i.weight - }), this._keys.forEach(a => { - a.weight /= s - }) - } - get(t) { - return this._keyMap[t] - } - keys() { - return this._keys - } - toJSON() { - return JSON.stringify(this._keys) - } -} - -function Da(e) { - let t = null, - s = null, - a = null, - i = 1, - n = null; - if (_e(e) || Ne(e)) a = e, t = xu(e), s = ms(e); - else { - if (!Du.call(e, "name")) throw new Error(ho("name")); - const o = e.name; - if (a = o, Du.call(e, "weight") && (i = e.weight, i <= 0)) throw new Error(fo(o)); - t = xu(o), s = ms(o), n = e.getFn - } - return { - path: t, - id: s, - weight: i, - src: a, - getFn: n - } -} - -function xu(e) { - return Ne(e) ? e : e.split(".") -} - -function ms(e) { - return Ne(e) ? e.join(".") : e -} - -function To(e, t) { - let s = [], - a = !1; - const i = (n, o, d) => { - if (ne(n)) - if (!o[d]) s.push(n); - else { - let T = o[d]; - const E = n[T]; - if (!ne(E)) return; - if (d === o.length - 1 && (_e(E) || Ra(E) || no(E))) s.push(io(E)); - else if (Ne(E)) { - a = !0; - for (let b = 0, N = E.length; b < N; b += 1) i(E[b], o, d + 1) - } else o.length && i(E, o, d + 1) - } - }; - return i(e, _e(t) ? t.split(".") : t, 0), a ? s : s[0] -} -const mo = { - includeMatches: !1, - findAllMatches: !1, - minMatchCharLength: 1 - }, - _o = { - isCaseSensitive: !1, - includeScore: !1, - keys: [], - shouldSort: !0, - sortFn: (e, t) => e.score === t.score ? e.idx < t.idx ? -1 : 1 : e.score < t.score ? -1 : 1 - }, - bo = { - location: 0, - threshold: .6, - distance: 100 - }, - Ao = { - useExtendedSearch: !1, - getFn: To, - ignoreLocation: !1, - ignoreFieldNorm: !1, - fieldNormWeight: 1 - }; -var D = { - ..._o, - ...mo, - ...bo, - ...Ao -}; -const po = /[^ ]+/g; - -function Io(e = 1, t = 3) { - const s = new Map, - a = Math.pow(10, t); - return { - get(i) { - const n = i.match(po).length; - if (s.has(n)) return s.get(n); - const o = 1 / Math.pow(n, .5 * e), - d = parseFloat(Math.round(o * a) / a); - return s.set(n, d), d - }, - clear() { - s.clear() - } - } -} -class Ds { - constructor({ - getFn: t = D.getFn, - fieldNormWeight: s = D.fieldNormWeight - } = {}) { - this.norm = Io(s, 3), this.getFn = t, this.isCreated = !1, this.setIndexRecords() - } - setSources(t = []) { - this.docs = t - } - setIndexRecords(t = []) { - this.records = t - } - setKeys(t = []) { - this.keys = t, this._keysMap = {}, t.forEach((s, a) => { - this._keysMap[s.id] = a - }) - } - create() { - this.isCreated || !this.docs.length || (this.isCreated = !0, _e(this.docs[0]) ? this.docs.forEach((t, s) => { - this._addString(t, s) - }) : this.docs.forEach((t, s) => { - this._addObject(t, s) - }), this.norm.clear()) - } - add(t) { - const s = this.size(); - _e(t) ? this._addString(t, s) : this._addObject(t, s) - } - removeAt(t) { - this.records.splice(t, 1); - for (let s = t, a = this.size(); s < a; s += 1) this.records[s].i -= 1 - } - getValueForItemAtKeyId(t, s) { - return t[this._keysMap[s]] - } - size() { - return this.records.length - } - _addString(t, s) { - if (!ne(t) || rs(t)) return; - let a = { - v: t, - i: s, - n: this.norm.get(t) - }; - this.records.push(a) - } - _addObject(t, s) { - let a = { - i: s, - $: {} - }; - this.keys.forEach((i, n) => { - let o = i.getFn ? i.getFn(t) : this.getFn(t, i.path); - if (ne(o)) { - if (Ne(o)) { - let d = []; - const T = [{ - nestedArrIndex: -1, - value: o - }]; - for (; T.length;) { - const { - nestedArrIndex: E, - value: b - } = T.pop(); - if (ne(b)) - if (_e(b) && !rs(b)) { - let N = { - v: b, - i: E, - n: this.norm.get(b) - }; - d.push(N) - } else Ne(b) && b.forEach((N, O) => { - T.push({ - nestedArrIndex: O, - value: N - }) - }) - } - a.$[n] = d - } else if (_e(o) && !rs(o)) { - let d = { - v: o, - n: this.norm.get(o) - }; - a.$[n] = d - } - } - }), this.records.push(a) - } - toJSON() { - return { - keys: this.keys, - records: this.records - } - } -} - -function xa(e, t, { - getFn: s = D.getFn, - fieldNormWeight: a = D.fieldNormWeight -} = {}) { - const i = new Ds({ - getFn: s, - fieldNormWeight: a - }); - return i.setKeys(e.map(Da)), i.setSources(t), i.create(), i -} - -function No(e, { - getFn: t = D.getFn, - fieldNormWeight: s = D.fieldNormWeight -} = {}) { - const { - keys: a, - records: i - } = e, n = new Ds({ - getFn: t, - fieldNormWeight: s - }); - return n.setKeys(a), n.setIndexRecords(i), n -} - -function xt(e, { - errors: t = 0, - currentLocation: s = 0, - expectedLocation: a = 0, - distance: i = D.distance, - ignoreLocation: n = D.ignoreLocation -} = {}) { - const o = t / e.length; - if (n) return o; - const d = Math.abs(a - s); - return i ? o + d / i : d ? 1 : o -} - -function go(e = [], t = D.minMatchCharLength) { - let s = [], - a = -1, - i = -1, - n = 0; - for (let o = e.length; n < o; n += 1) { - let d = e[n]; - d && a === -1 ? a = n : !d && a !== -1 && (i = n - 1, i - a + 1 >= t && s.push([a, i]), a = -1) - } - return e[n - 1] && n - a >= t && s.push([a, n - 1]), s -} -const ye = 32; - -function Co(e, t, s, { - location: a = D.location, - distance: i = D.distance, - threshold: n = D.threshold, - findAllMatches: o = D.findAllMatches, - minMatchCharLength: d = D.minMatchCharLength, - includeMatches: T = D.includeMatches, - ignoreLocation: E = D.ignoreLocation -} = {}) { - if (t.length > ye) throw new Error(lo(ye)); - const b = t.length, - N = e.length, - O = Math.max(0, Math.min(a, N)); - let R = n, - C = O; - const k = d > 1 || T, - U = k ? Array(N) : []; - let w; - for (; - (w = e.indexOf(t, C)) > -1;) { - let z = xt(t, { - currentLocation: w, - expectedLocation: O, - distance: i, - ignoreLocation: E - }); - if (R = Math.min(z, R), C = w + b, k) { - let fe = 0; - for (; fe < b;) U[w + fe] = 1, fe += 1 - } - } - C = -1; - let P = [], - F = 1, - he = b + N; - const Xe = 1 << b - 1; - for (let z = 0; z < b; z += 1) { - let fe = 0, - Ee = he; - for (; fe < Ee;) xt(t, { - errors: z, - currentLocation: O + Ee, - expectedLocation: O, - distance: i, - ignoreLocation: E - }) <= R ? fe = Ee : he = Ee, Ee = Math.floor((he - fe) / 2 + fe); - he = Ee; - let ue = Math.max(1, O - Ee + 1), - Le = o ? N : Math.min(O + Ee, N) + b, - Te = Array(Le + 2); - Te[Le + 1] = (1 << z) - 1; - for (let ae = Le; ae >= ue; ae -= 1) { - let Fe = ae - 1, - bt = s[e.charAt(Fe)]; - if (k && (U[Fe] = +!!bt), Te[ae] = (Te[ae + 1] << 1 | 1) & bt, z && (Te[ae] |= (P[ae + 1] | P[ae]) << 1 | 1 | P[ae + 1]), Te[ae] & Xe && (F = xt(t, { - errors: z, - currentLocation: Fe, - expectedLocation: O, - distance: i, - ignoreLocation: E - }), F <= R)) { - if (R = F, C = Fe, C <= O) break; - ue = Math.max(1, 2 * O - C) - } - } - if (xt(t, { - errors: z + 1, - currentLocation: O, - expectedLocation: O, - distance: i, - ignoreLocation: E - }) > R) break; - P = Te - } - const Ke = { - isMatch: C >= 0, - score: Math.max(.001, F) - }; - if (k) { - const z = go(U, d); - z.length ? T && (Ke.indices = z) : Ke.isMatch = !1 - } - return Ke -} - -function So(e) { - let t = {}; - for (let s = 0, a = e.length; s < a; s += 1) { - const i = e.charAt(s); - t[i] = (t[i] || 0) | 1 << a - s - 1 - } - return t -} -class Ma { - constructor(t, { - location: s = D.location, - threshold: a = D.threshold, - distance: i = D.distance, - includeMatches: n = D.includeMatches, - findAllMatches: o = D.findAllMatches, - minMatchCharLength: d = D.minMatchCharLength, - isCaseSensitive: T = D.isCaseSensitive, - ignoreLocation: E = D.ignoreLocation - } = {}) { - if (this.options = { - location: s, - threshold: a, - distance: i, - includeMatches: n, - findAllMatches: o, - minMatchCharLength: d, - isCaseSensitive: T, - ignoreLocation: E - }, this.pattern = T ? t : t.toLowerCase(), this.chunks = [], !this.pattern.length) return; - const b = (O, R) => { - this.chunks.push({ - pattern: O, - alphabet: So(O), - startIndex: R - }) - }, - N = this.pattern.length; - if (N > ye) { - let O = 0; - const R = N % ye, - C = N - R; - for (; O < C;) b(this.pattern.substr(O, ye), O), O += ye; - if (R) { - const k = N - ye; - b(this.pattern.substr(k), k) - } - } else b(this.pattern, 0) - } - searchIn(t) { - const { - isCaseSensitive: s, - includeMatches: a - } = this.options; - if (s || (t = t.toLowerCase()), this.pattern === t) { - let C = { - isMatch: !0, - score: 0 - }; - return a && (C.indices = [ - [0, t.length - 1] - ]), C - } - const { - location: i, - distance: n, - threshold: o, - findAllMatches: d, - minMatchCharLength: T, - ignoreLocation: E - } = this.options; - let b = [], - N = 0, - O = !1; - this.chunks.forEach(({ - pattern: C, - alphabet: k, - startIndex: U - }) => { - const { - isMatch: w, - score: P, - indices: F - } = Co(t, C, k, { - location: i + U, - distance: n, - threshold: o, - findAllMatches: d, - minMatchCharLength: T, - includeMatches: a, - ignoreLocation: E - }); - w && (O = !0), N += P, w && F && (b = [...b, ...F]) - }); - let R = { - isMatch: O, - score: O ? N / this.chunks.length : 1 - }; - return O && a && (R.indices = b), R - } -} -class Re { - constructor(t) { - this.pattern = t - } - static isMultiMatch(t) { - return Mu(t, this.multiRegex) - } - static isSingleMatch(t) { - return Mu(t, this.singleRegex) - } - search() {} -} - -function Mu(e, t) { - const s = e.match(t); - return s ? s[1] : null -} -class Ro extends Re { - constructor(t) { - super(t) - } - static get type() { - return "exact" - } - static get multiRegex() { - return /^="(.*)"$/ - } - static get singleRegex() { - return /^=(.*)$/ - } - search(t) { - const s = t === this.pattern; - return { - isMatch: s, - score: s ? 0 : 1, - indices: [0, this.pattern.length - 1] - } - } -} -class Lo extends Re { - constructor(t) { - super(t) - } - static get type() { - return "inverse-exact" - } - static get multiRegex() { - return /^!"(.*)"$/ - } - static get singleRegex() { - return /^!(.*)$/ - } - search(t) { - const a = t.indexOf(this.pattern) === -1; - return { - isMatch: a, - score: a ? 0 : 1, - indices: [0, t.length - 1] - } - } -} -class Oo extends Re { - constructor(t) { - super(t) - } - static get type() { - return "prefix-exact" - } - static get multiRegex() { - return /^\^"(.*)"$/ - } - static get singleRegex() { - return /^\^(.*)$/ - } - search(t) { - const s = t.startsWith(this.pattern); - return { - isMatch: s, - score: s ? 0 : 1, - indices: [0, this.pattern.length - 1] - } - } -} -class Do extends Re { - constructor(t) { - super(t) - } - static get type() { - return "inverse-prefix-exact" - } - static get multiRegex() { - return /^!\^"(.*)"$/ - } - static get singleRegex() { - return /^!\^(.*)$/ - } - search(t) { - const s = !t.startsWith(this.pattern); - return { - isMatch: s, - score: s ? 0 : 1, - indices: [0, t.length - 1] - } - } -} -class xo extends Re { - constructor(t) { - super(t) - } - static get type() { - return "suffix-exact" - } - static get multiRegex() { - return /^"(.*)"\$$/ - } - static get singleRegex() { - return /^(.*)\$$/ - } - search(t) { - const s = t.endsWith(this.pattern); - return { - isMatch: s, - score: s ? 0 : 1, - indices: [t.length - this.pattern.length, t.length - 1] - } - } -} -class Mo extends Re { - constructor(t) { - super(t) - } - static get type() { - return "inverse-suffix-exact" - } - static get multiRegex() { - return /^!"(.*)"\$$/ - } - static get singleRegex() { - return /^!(.*)\$$/ - } - search(t) { - const s = !t.endsWith(this.pattern); - return { - isMatch: s, - score: s ? 0 : 1, - indices: [0, t.length - 1] - } - } -} -class Pa extends Re { - constructor(t, { - location: s = D.location, - threshold: a = D.threshold, - distance: i = D.distance, - includeMatches: n = D.includeMatches, - findAllMatches: o = D.findAllMatches, - minMatchCharLength: d = D.minMatchCharLength, - isCaseSensitive: T = D.isCaseSensitive, - ignoreLocation: E = D.ignoreLocation - } = {}) { - super(t), this._bitapSearch = new Ma(t, { - location: s, - threshold: a, - distance: i, - includeMatches: n, - findAllMatches: o, - minMatchCharLength: d, - isCaseSensitive: T, - ignoreLocation: E - }) - } - static get type() { - return "fuzzy" - } - static get multiRegex() { - return /^"(.*)"$/ - } - static get singleRegex() { - return /^(.*)$/ - } - search(t) { - return this._bitapSearch.searchIn(t) - } -} -class Ba extends Re { - constructor(t) { - super(t) - } - static get type() { - return "include" - } - static get multiRegex() { - return /^'"(.*)"$/ - } - static get singleRegex() { - return /^'(.*)$/ - } - search(t) { - let s = 0, - a; - const i = [], - n = this.pattern.length; - for (; - (a = t.indexOf(this.pattern, s)) > -1;) s = a + n, i.push([a, s - 1]); - const o = !!i.length; - return { - isMatch: o, - score: o ? 0 : 1, - indices: i - } - } -} -const _s = [Ro, Ba, Oo, Do, Mo, xo, Lo, Pa], - Pu = _s.length, - Po = / +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/, - Bo = "|"; - -function yo(e, t = {}) { - return e.split(Bo).map(s => { - let a = s.trim().split(Po).filter(n => n && !!n.trim()), - i = []; - for (let n = 0, o = a.length; n < o; n += 1) { - const d = a[n]; - let T = !1, - E = -1; - for (; !T && ++E < Pu;) { - const b = _s[E]; - let N = b.isMultiMatch(d); - N && (i.push(new b(N, t)), T = !0) - } - if (!T) - for (E = -1; ++E < Pu;) { - const b = _s[E]; - let N = b.isSingleMatch(d); - if (N) { - i.push(new b(N, t)); - break - } - } - } - return i - }) -} -const ko = new Set([Pa.type, Ba.type]); -class Fo { - constructor(t, { - isCaseSensitive: s = D.isCaseSensitive, - includeMatches: a = D.includeMatches, - minMatchCharLength: i = D.minMatchCharLength, - ignoreLocation: n = D.ignoreLocation, - findAllMatches: o = D.findAllMatches, - location: d = D.location, - threshold: T = D.threshold, - distance: E = D.distance - } = {}) { - this.query = null, this.options = { - isCaseSensitive: s, - includeMatches: a, - minMatchCharLength: i, - findAllMatches: o, - ignoreLocation: n, - location: d, - threshold: T, - distance: E - }, this.pattern = s ? t : t.toLowerCase(), this.query = yo(this.pattern, this.options) - } - static condition(t, s) { - return s.useExtendedSearch - } - searchIn(t) { - const s = this.query; - if (!s) return { - isMatch: !1, - score: 1 - }; - const { - includeMatches: a, - isCaseSensitive: i - } = this.options; - t = i ? t : t.toLowerCase(); - let n = 0, - o = [], - d = 0; - for (let T = 0, E = s.length; T < E; T += 1) { - const b = s[T]; - o.length = 0, n = 0; - for (let N = 0, O = b.length; N < O; N += 1) { - const R = b[N], - { - isMatch: C, - indices: k, - score: U - } = R.search(t); - if (C) { - if (n += 1, d += U, a) { - const w = R.constructor.type; - ko.has(w) ? o = [...o, ...k] : o.push(k) - } - } else { - d = 0, n = 0, o.length = 0; - break - } - } - if (n) { - let N = { - isMatch: !0, - score: d / n - }; - return a && (N.indices = o), N - } - } - return { - isMatch: !1, - score: 1 - } - } -} -const bs = []; - -function Ho(...e) { - bs.push(...e) -} - -function As(e, t) { - for (let s = 0, a = bs.length; s < a; s += 1) { - let i = bs[s]; - if (i.condition(e, t)) return new i(e, t) - } - return new Ma(e, t) -} -const kt = { - AND: "$and", - OR: "$or" - }, - ps = { - PATH: "$path", - PATTERN: "$val" - }, - Is = e => !!(e[kt.AND] || e[kt.OR]), - Uo = e => !!e[ps.PATH], - wo = e => !Ne(e) && La(e) && !Is(e), - Bu = e => ({ - [kt.AND]: Object.keys(e).map(t => ({ - [t]: e[t] - })) - }); - -function ya(e, t, { - auto: s = !0 -} = {}) { - const a = i => { - let n = Object.keys(i); - const o = Uo(i); - if (!o && n.length > 1 && !Is(i)) return a(Bu(i)); - if (wo(i)) { - const T = o ? i[ps.PATH] : n[0], - E = o ? i[ps.PATTERN] : i[T]; - if (!_e(E)) throw new Error(oo(T)); - const b = { - keyId: ms(T), - pattern: E - }; - return s && (b.searcher = As(E, t)), b - } - let d = { - children: [], - operator: n[0] - }; - return n.forEach(T => { - const E = i[T]; - Ne(E) && E.forEach(b => { - d.children.push(a(b)) - }) - }), d - }; - return Is(e) || (e = Bu(e)), a(e) -} - -function vo(e, { - ignoreFieldNorm: t = D.ignoreFieldNorm -}) { - e.forEach(s => { - let a = 1; - s.matches.forEach(({ - key: i, - norm: n, - score: o - }) => { - const d = i ? i.weight : null; - a *= Math.pow(o === 0 && d ? Number.EPSILON : o, (d || 1) * (t ? 1 : n)) - }), s.score = a - }) -} - -function Yo(e, t) { - const s = e.matches; - t.matches = [], ne(s) && s.forEach(a => { - if (!ne(a.indices) || !a.indices.length) return; - const { - indices: i, - value: n - } = a; - let o = { - indices: i, - value: n - }; - a.key && (o.key = a.key.src), a.idx > -1 && (o.refIndex = a.idx), t.matches.push(o) - }) -} - -function $o(e, t) { - t.score = e.score -} - -function qo(e, t, { - includeMatches: s = D.includeMatches, - includeScore: a = D.includeScore -} = {}) { - const i = []; - return s && i.push(Yo), a && i.push($o), e.map(n => { - const { - idx: o - } = n, d = { - item: t[o], - refIndex: o - }; - return i.length && i.forEach(T => { - T(n, d) - }), d - }) -} -class mt { - constructor(t, s = {}, a) { - this.options = { - ...D, - ...s - }, this.options.useExtendedSearch, this._keyStore = new Eo(this.options.keys), this.setCollection(t, a) - } - setCollection(t, s) { - if (this._docs = t, s && !(s instanceof Ds)) throw new Error(co); - this._myIndex = s || xa(this.options.keys, this._docs, { - getFn: this.options.getFn, - fieldNormWeight: this.options.fieldNormWeight - }) - } - add(t) { - ne(t) && (this._docs.push(t), this._myIndex.add(t)) - } - remove(t = () => !1) { - const s = []; - for (let a = 0, i = this._docs.length; a < i; a += 1) { - const n = this._docs[a]; - t(n, a) && (this.removeAt(a), a -= 1, i -= 1, s.push(n)) - } - return s - } - removeAt(t) { - this._docs.splice(t, 1), this._myIndex.removeAt(t) - } - getIndex() { - return this._myIndex - } - search(t, { - limit: s = -1 - } = {}) { - const { - includeMatches: a, - includeScore: i, - shouldSort: n, - sortFn: o, - ignoreFieldNorm: d - } = this.options; - let T = _e(t) ? _e(this._docs[0]) ? this._searchStringList(t) : this._searchObjectList(t) : this._searchLogical(t); - return vo(T, { - ignoreFieldNorm: d - }), n && T.sort(o), Ra(s) && s > -1 && (T = T.slice(0, s)), qo(T, this._docs, { - includeMatches: a, - includeScore: i - }) - } - _searchStringList(t) { - const s = As(t, this.options), - { - records: a - } = this._myIndex, - i = []; - return a.forEach(({ - v: n, - i: o, - n: d - }) => { - if (!ne(n)) return; - const { - isMatch: T, - score: E, - indices: b - } = s.searchIn(n); - T && i.push({ - item: n, - idx: o, - matches: [{ - score: E, - value: n, - norm: d, - indices: b - }] - }) - }), i - } - _searchLogical(t) { - const s = ya(t, this.options), - a = (d, T, E) => { - if (!d.children) { - const { - keyId: N, - searcher: O - } = d, R = this._findMatches({ - key: this._keyStore.get(N), - value: this._myIndex.getValueForItemAtKeyId(T, N), - searcher: O - }); - return R && R.length ? [{ - idx: E, - item: T, - matches: R - }] : [] - } - const b = []; - for (let N = 0, O = d.children.length; N < O; N += 1) { - const R = d.children[N], - C = a(R, T, E); - if (C.length) b.push(...C); - else if (d.operator === kt.AND) return [] - } - return b - }, - i = this._myIndex.records, - n = {}, - o = []; - return i.forEach(({ - $: d, - i: T - }) => { - if (ne(d)) { - let E = a(s, d, T); - E.length && (n[T] || (n[T] = { - idx: T, - item: d, - matches: [] - }, o.push(n[T])), E.forEach(({ - matches: b - }) => { - n[T].matches.push(...b) - })) - } - }), o - } - _searchObjectList(t) { - const s = As(t, this.options), - { - keys: a, - records: i - } = this._myIndex, - n = []; - return i.forEach(({ - $: o, - i: d - }) => { - if (!ne(o)) return; - let T = []; - a.forEach((E, b) => { - T.push(...this._findMatches({ - key: E, - value: o[b], - searcher: s - })) - }), T.length && n.push({ - idx: d, - item: o, - matches: T - }) - }), n - } - _findMatches({ - key: t, - value: s, - searcher: a - }) { - if (!ne(s)) return []; - let i = []; - if (Ne(s)) s.forEach(({ - v: n, - i: o, - n: d - }) => { - if (!ne(n)) return; - const { - isMatch: T, - score: E, - indices: b - } = a.searchIn(n); - T && i.push({ - score: E, - key: t, - value: n, - idx: o, - norm: d, - indices: b - }) - }); - else { - const { - v: n, - n: o - } = s, { - isMatch: d, - score: T, - indices: E - } = a.searchIn(n); - d && i.push({ - score: T, - key: t, - value: n, - norm: o, - indices: E - }) - } - return i - } -} -mt.version = "7.0.0"; -mt.createIndex = xa; -mt.parseIndex = No; -mt.config = D; -mt.parseQuery = ya; -Ho(Fo); -export { - mt as F, ri as a, ni as b, Xo as c, a0 as d, Wo as e, s0 as f, Zo as g, e0 as h, Jo as l, zo as p, Ko as r, wc as s -}; -//# sourceMappingURL=caption-parsing-BABN6jyO.js.map \ No newline at end of file diff --git a/assets/caption-parsing-BABN6jyO.js.map b/assets/caption-parsing-BABN6jyO.js.map deleted file mode 100644 index 1bded9c..0000000 --- a/assets/caption-parsing-BABN6jyO.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"caption-parsing-BABN6jyO.js","sources":["../../node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-html.js","../../node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-xml.js","../../node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode_codepoint.js","../../node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode.js","../../node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/escape.js","../../node_modules/.pnpm/parse5@7.1.2/node_modules/parse5/dist/common/unicode.js","../../node_modules/.pnpm/parse5@7.1.2/node_modules/parse5/dist/common/error-codes.js","../../node_modules/.pnpm/parse5@7.1.2/node_modules/parse5/dist/tokenizer/preprocessor.js","../../node_modules/.pnpm/parse5@7.1.2/node_modules/parse5/dist/common/token.js","../../node_modules/.pnpm/parse5@7.1.2/node_modules/parse5/dist/common/html.js","../../node_modules/.pnpm/parse5@7.1.2/node_modules/parse5/dist/tokenizer/index.js","../../node_modules/.pnpm/parse5@7.1.2/node_modules/parse5/dist/parser/open-element-stack.js","../../node_modules/.pnpm/parse5@7.1.2/node_modules/parse5/dist/parser/formatting-element-list.js","../../node_modules/.pnpm/parse5@7.1.2/node_modules/parse5/dist/tree-adapters/default.js","../../node_modules/.pnpm/parse5@7.1.2/node_modules/parse5/dist/common/doctype.js","../../node_modules/.pnpm/parse5@7.1.2/node_modules/parse5/dist/common/foreign-content.js","../../node_modules/.pnpm/parse5@7.1.2/node_modules/parse5/dist/parser/index.js","../../node_modules/.pnpm/parse5@7.1.2/node_modules/parse5/dist/serializer/index.js","../../node_modules/.pnpm/parse5@7.1.2/node_modules/parse5/dist/index.js","../../node_modules/.pnpm/parse5-htmlparser2-tree-adapter@7.0.0/node_modules/parse5-htmlparser2-tree-adapter/dist/index.js","../../node_modules/.pnpm/cheerio@1.0.0-rc.12/node_modules/cheerio/lib/esm/parsers/parse5-adapter.js","../../node_modules/.pnpm/htmlparser2@8.0.2/node_modules/htmlparser2/lib/esm/Tokenizer.js","../../node_modules/.pnpm/htmlparser2@8.0.2/node_modules/htmlparser2/lib/esm/Parser.js","../../node_modules/.pnpm/htmlparser2@8.0.2/node_modules/htmlparser2/lib/esm/index.js","../../node_modules/.pnpm/subsrt-ts@2.1.2/node_modules/subsrt-ts/dist/handler.js","../../node_modules/.pnpm/subsrt-ts@2.1.2/node_modules/subsrt-ts/dist/format/ssa.js","../../node_modules/.pnpm/subsrt-ts@2.1.2/node_modules/subsrt-ts/dist/format/ass.js","../../node_modules/.pnpm/subsrt-ts@2.1.2/node_modules/subsrt-ts/dist/format/json.js","../../node_modules/.pnpm/subsrt-ts@2.1.2/node_modules/subsrt-ts/dist/format/lrc.js","../../node_modules/.pnpm/subsrt-ts@2.1.2/node_modules/subsrt-ts/dist/format/sbv.js","../../node_modules/.pnpm/subsrt-ts@2.1.2/node_modules/subsrt-ts/dist/format/smi.js","../../node_modules/.pnpm/subsrt-ts@2.1.2/node_modules/subsrt-ts/dist/format/srt.js","../../node_modules/.pnpm/subsrt-ts@2.1.2/node_modules/subsrt-ts/dist/format/sub.js","../../node_modules/.pnpm/subsrt-ts@2.1.2/node_modules/subsrt-ts/dist/format/vtt.js","../../node_modules/.pnpm/subsrt-ts@2.1.2/node_modules/subsrt-ts/dist/format/index.js","../../node_modules/.pnpm/subsrt-ts@2.1.2/node_modules/subsrt-ts/dist/subsrt.js","../../node_modules/.pnpm/dompurify@3.0.6/node_modules/dompurify/dist/purify.es.js","../../node_modules/.pnpm/fuse.js@7.0.0/node_modules/fuse.js/dist/fuse.mjs"],"sourcesContent":["// Generated using scripts/write-decode-map.ts\nexport default new Uint16Array(\n// prettier-ignore\n\"\\u1d41<\\xd5\\u0131\\u028a\\u049d\\u057b\\u05d0\\u0675\\u06de\\u07a2\\u07d6\\u080f\\u0a4a\\u0a91\\u0da1\\u0e6d\\u0f09\\u0f26\\u10ca\\u1228\\u12e1\\u1415\\u149d\\u14c3\\u14df\\u1525\\0\\0\\0\\0\\0\\0\\u156b\\u16cd\\u198d\\u1c12\\u1ddd\\u1f7e\\u2060\\u21b0\\u228d\\u23c0\\u23fb\\u2442\\u2824\\u2912\\u2d08\\u2e48\\u2fce\\u3016\\u32ba\\u3639\\u37ac\\u38fe\\u3a28\\u3a71\\u3ae0\\u3b2e\\u0800EMabcfglmnoprstu\\\\bfms\\x7f\\x84\\x8b\\x90\\x95\\x98\\xa6\\xb3\\xb9\\xc8\\xcflig\\u803b\\xc6\\u40c6P\\u803b&\\u4026cute\\u803b\\xc1\\u40c1reve;\\u4102\\u0100iyx}rc\\u803b\\xc2\\u40c2;\\u4410r;\\uc000\\ud835\\udd04rave\\u803b\\xc0\\u40c0pha;\\u4391acr;\\u4100d;\\u6a53\\u0100gp\\x9d\\xa1on;\\u4104f;\\uc000\\ud835\\udd38plyFunction;\\u6061ing\\u803b\\xc5\\u40c5\\u0100cs\\xbe\\xc3r;\\uc000\\ud835\\udc9cign;\\u6254ilde\\u803b\\xc3\\u40c3ml\\u803b\\xc4\\u40c4\\u0400aceforsu\\xe5\\xfb\\xfe\\u0117\\u011c\\u0122\\u0127\\u012a\\u0100cr\\xea\\xf2kslash;\\u6216\\u0176\\xf6\\xf8;\\u6ae7ed;\\u6306y;\\u4411\\u0180crt\\u0105\\u010b\\u0114ause;\\u6235noullis;\\u612ca;\\u4392r;\\uc000\\ud835\\udd05pf;\\uc000\\ud835\\udd39eve;\\u42d8c\\xf2\\u0113mpeq;\\u624e\\u0700HOacdefhilorsu\\u014d\\u0151\\u0156\\u0180\\u019e\\u01a2\\u01b5\\u01b7\\u01ba\\u01dc\\u0215\\u0273\\u0278\\u027ecy;\\u4427PY\\u803b\\xa9\\u40a9\\u0180cpy\\u015d\\u0162\\u017aute;\\u4106\\u0100;i\\u0167\\u0168\\u62d2talDifferentialD;\\u6145leys;\\u612d\\u0200aeio\\u0189\\u018e\\u0194\\u0198ron;\\u410cdil\\u803b\\xc7\\u40c7rc;\\u4108nint;\\u6230ot;\\u410a\\u0100dn\\u01a7\\u01adilla;\\u40b8terDot;\\u40b7\\xf2\\u017fi;\\u43a7rcle\\u0200DMPT\\u01c7\\u01cb\\u01d1\\u01d6ot;\\u6299inus;\\u6296lus;\\u6295imes;\\u6297o\\u0100cs\\u01e2\\u01f8kwiseContourIntegral;\\u6232eCurly\\u0100DQ\\u0203\\u020foubleQuote;\\u601duote;\\u6019\\u0200lnpu\\u021e\\u0228\\u0247\\u0255on\\u0100;e\\u0225\\u0226\\u6237;\\u6a74\\u0180git\\u022f\\u0236\\u023aruent;\\u6261nt;\\u622fourIntegral;\\u622e\\u0100fr\\u024c\\u024e;\\u6102oduct;\\u6210nterClockwiseContourIntegral;\\u6233oss;\\u6a2fcr;\\uc000\\ud835\\udc9ep\\u0100;C\\u0284\\u0285\\u62d3ap;\\u624d\\u0580DJSZacefios\\u02a0\\u02ac\\u02b0\\u02b4\\u02b8\\u02cb\\u02d7\\u02e1\\u02e6\\u0333\\u048d\\u0100;o\\u0179\\u02a5trahd;\\u6911cy;\\u4402cy;\\u4405cy;\\u440f\\u0180grs\\u02bf\\u02c4\\u02c7ger;\\u6021r;\\u61a1hv;\\u6ae4\\u0100ay\\u02d0\\u02d5ron;\\u410e;\\u4414l\\u0100;t\\u02dd\\u02de\\u6207a;\\u4394r;\\uc000\\ud835\\udd07\\u0100af\\u02eb\\u0327\\u0100cm\\u02f0\\u0322ritical\\u0200ADGT\\u0300\\u0306\\u0316\\u031ccute;\\u40b4o\\u0174\\u030b\\u030d;\\u42d9bleAcute;\\u42ddrave;\\u4060ilde;\\u42dcond;\\u62c4ferentialD;\\u6146\\u0470\\u033d\\0\\0\\0\\u0342\\u0354\\0\\u0405f;\\uc000\\ud835\\udd3b\\u0180;DE\\u0348\\u0349\\u034d\\u40a8ot;\\u60dcqual;\\u6250ble\\u0300CDLRUV\\u0363\\u0372\\u0382\\u03cf\\u03e2\\u03f8ontourIntegra\\xec\\u0239o\\u0274\\u0379\\0\\0\\u037b\\xbb\\u0349nArrow;\\u61d3\\u0100eo\\u0387\\u03a4ft\\u0180ART\\u0390\\u0396\\u03a1rrow;\\u61d0ightArrow;\\u61d4e\\xe5\\u02cang\\u0100LR\\u03ab\\u03c4eft\\u0100AR\\u03b3\\u03b9rrow;\\u67f8ightArrow;\\u67faightArrow;\\u67f9ight\\u0100AT\\u03d8\\u03derrow;\\u61d2ee;\\u62a8p\\u0241\\u03e9\\0\\0\\u03efrrow;\\u61d1ownArrow;\\u61d5erticalBar;\\u6225n\\u0300ABLRTa\\u0412\\u042a\\u0430\\u045e\\u047f\\u037crrow\\u0180;BU\\u041d\\u041e\\u0422\\u6193ar;\\u6913pArrow;\\u61f5reve;\\u4311eft\\u02d2\\u043a\\0\\u0446\\0\\u0450ightVector;\\u6950eeVector;\\u695eector\\u0100;B\\u0459\\u045a\\u61bdar;\\u6956ight\\u01d4\\u0467\\0\\u0471eeVector;\\u695fector\\u0100;B\\u047a\\u047b\\u61c1ar;\\u6957ee\\u0100;A\\u0486\\u0487\\u62a4rrow;\\u61a7\\u0100ct\\u0492\\u0497r;\\uc000\\ud835\\udc9frok;\\u4110\\u0800NTacdfglmopqstux\\u04bd\\u04c0\\u04c4\\u04cb\\u04de\\u04e2\\u04e7\\u04ee\\u04f5\\u0521\\u052f\\u0536\\u0552\\u055d\\u0560\\u0565G;\\u414aH\\u803b\\xd0\\u40d0cute\\u803b\\xc9\\u40c9\\u0180aiy\\u04d2\\u04d7\\u04dcron;\\u411arc\\u803b\\xca\\u40ca;\\u442dot;\\u4116r;\\uc000\\ud835\\udd08rave\\u803b\\xc8\\u40c8ement;\\u6208\\u0100ap\\u04fa\\u04fecr;\\u4112ty\\u0253\\u0506\\0\\0\\u0512mallSquare;\\u65fberySmallSquare;\\u65ab\\u0100gp\\u0526\\u052aon;\\u4118f;\\uc000\\ud835\\udd3csilon;\\u4395u\\u0100ai\\u053c\\u0549l\\u0100;T\\u0542\\u0543\\u6a75ilde;\\u6242librium;\\u61cc\\u0100ci\\u0557\\u055ar;\\u6130m;\\u6a73a;\\u4397ml\\u803b\\xcb\\u40cb\\u0100ip\\u056a\\u056fsts;\\u6203onentialE;\\u6147\\u0280cfios\\u0585\\u0588\\u058d\\u05b2\\u05ccy;\\u4424r;\\uc000\\ud835\\udd09lled\\u0253\\u0597\\0\\0\\u05a3mallSquare;\\u65fcerySmallSquare;\\u65aa\\u0370\\u05ba\\0\\u05bf\\0\\0\\u05c4f;\\uc000\\ud835\\udd3dAll;\\u6200riertrf;\\u6131c\\xf2\\u05cb\\u0600JTabcdfgorst\\u05e8\\u05ec\\u05ef\\u05fa\\u0600\\u0612\\u0616\\u061b\\u061d\\u0623\\u066c\\u0672cy;\\u4403\\u803b>\\u403emma\\u0100;d\\u05f7\\u05f8\\u4393;\\u43dcreve;\\u411e\\u0180eiy\\u0607\\u060c\\u0610dil;\\u4122rc;\\u411c;\\u4413ot;\\u4120r;\\uc000\\ud835\\udd0a;\\u62d9pf;\\uc000\\ud835\\udd3eeater\\u0300EFGLST\\u0635\\u0644\\u064e\\u0656\\u065b\\u0666qual\\u0100;L\\u063e\\u063f\\u6265ess;\\u62dbullEqual;\\u6267reater;\\u6aa2ess;\\u6277lantEqual;\\u6a7eilde;\\u6273cr;\\uc000\\ud835\\udca2;\\u626b\\u0400Aacfiosu\\u0685\\u068b\\u0696\\u069b\\u069e\\u06aa\\u06be\\u06caRDcy;\\u442a\\u0100ct\\u0690\\u0694ek;\\u42c7;\\u405eirc;\\u4124r;\\u610clbertSpace;\\u610b\\u01f0\\u06af\\0\\u06b2f;\\u610dizontalLine;\\u6500\\u0100ct\\u06c3\\u06c5\\xf2\\u06a9rok;\\u4126mp\\u0144\\u06d0\\u06d8ownHum\\xf0\\u012fqual;\\u624f\\u0700EJOacdfgmnostu\\u06fa\\u06fe\\u0703\\u0707\\u070e\\u071a\\u071e\\u0721\\u0728\\u0744\\u0778\\u078b\\u078f\\u0795cy;\\u4415lig;\\u4132cy;\\u4401cute\\u803b\\xcd\\u40cd\\u0100iy\\u0713\\u0718rc\\u803b\\xce\\u40ce;\\u4418ot;\\u4130r;\\u6111rave\\u803b\\xcc\\u40cc\\u0180;ap\\u0720\\u072f\\u073f\\u0100cg\\u0734\\u0737r;\\u412ainaryI;\\u6148lie\\xf3\\u03dd\\u01f4\\u0749\\0\\u0762\\u0100;e\\u074d\\u074e\\u622c\\u0100gr\\u0753\\u0758ral;\\u622bsection;\\u62c2isible\\u0100CT\\u076c\\u0772omma;\\u6063imes;\\u6062\\u0180gpt\\u077f\\u0783\\u0788on;\\u412ef;\\uc000\\ud835\\udd40a;\\u4399cr;\\u6110ilde;\\u4128\\u01eb\\u079a\\0\\u079ecy;\\u4406l\\u803b\\xcf\\u40cf\\u0280cfosu\\u07ac\\u07b7\\u07bc\\u07c2\\u07d0\\u0100iy\\u07b1\\u07b5rc;\\u4134;\\u4419r;\\uc000\\ud835\\udd0dpf;\\uc000\\ud835\\udd41\\u01e3\\u07c7\\0\\u07ccr;\\uc000\\ud835\\udca5rcy;\\u4408kcy;\\u4404\\u0380HJacfos\\u07e4\\u07e8\\u07ec\\u07f1\\u07fd\\u0802\\u0808cy;\\u4425cy;\\u440cppa;\\u439a\\u0100ey\\u07f6\\u07fbdil;\\u4136;\\u441ar;\\uc000\\ud835\\udd0epf;\\uc000\\ud835\\udd42cr;\\uc000\\ud835\\udca6\\u0580JTaceflmost\\u0825\\u0829\\u082c\\u0850\\u0863\\u09b3\\u09b8\\u09c7\\u09cd\\u0a37\\u0a47cy;\\u4409\\u803b<\\u403c\\u0280cmnpr\\u0837\\u083c\\u0841\\u0844\\u084dute;\\u4139bda;\\u439bg;\\u67ealacetrf;\\u6112r;\\u619e\\u0180aey\\u0857\\u085c\\u0861ron;\\u413ddil;\\u413b;\\u441b\\u0100fs\\u0868\\u0970t\\u0500ACDFRTUVar\\u087e\\u08a9\\u08b1\\u08e0\\u08e6\\u08fc\\u092f\\u095b\\u0390\\u096a\\u0100nr\\u0883\\u088fgleBracket;\\u67e8row\\u0180;BR\\u0899\\u089a\\u089e\\u6190ar;\\u61e4ightArrow;\\u61c6eiling;\\u6308o\\u01f5\\u08b7\\0\\u08c3bleBracket;\\u67e6n\\u01d4\\u08c8\\0\\u08d2eeVector;\\u6961ector\\u0100;B\\u08db\\u08dc\\u61c3ar;\\u6959loor;\\u630aight\\u0100AV\\u08ef\\u08f5rrow;\\u6194ector;\\u694e\\u0100er\\u0901\\u0917e\\u0180;AV\\u0909\\u090a\\u0910\\u62a3rrow;\\u61a4ector;\\u695aiangle\\u0180;BE\\u0924\\u0925\\u0929\\u62b2ar;\\u69cfqual;\\u62b4p\\u0180DTV\\u0937\\u0942\\u094cownVector;\\u6951eeVector;\\u6960ector\\u0100;B\\u0956\\u0957\\u61bfar;\\u6958ector\\u0100;B\\u0965\\u0966\\u61bcar;\\u6952ight\\xe1\\u039cs\\u0300EFGLST\\u097e\\u098b\\u0995\\u099d\\u09a2\\u09adqualGreater;\\u62daullEqual;\\u6266reater;\\u6276ess;\\u6aa1lantEqual;\\u6a7dilde;\\u6272r;\\uc000\\ud835\\udd0f\\u0100;e\\u09bd\\u09be\\u62d8ftarrow;\\u61daidot;\\u413f\\u0180npw\\u09d4\\u0a16\\u0a1bg\\u0200LRlr\\u09de\\u09f7\\u0a02\\u0a10eft\\u0100AR\\u09e6\\u09ecrrow;\\u67f5ightArrow;\\u67f7ightArrow;\\u67f6eft\\u0100ar\\u03b3\\u0a0aight\\xe1\\u03bfight\\xe1\\u03caf;\\uc000\\ud835\\udd43er\\u0100LR\\u0a22\\u0a2ceftArrow;\\u6199ightArrow;\\u6198\\u0180cht\\u0a3e\\u0a40\\u0a42\\xf2\\u084c;\\u61b0rok;\\u4141;\\u626a\\u0400acefiosu\\u0a5a\\u0a5d\\u0a60\\u0a77\\u0a7c\\u0a85\\u0a8b\\u0a8ep;\\u6905y;\\u441c\\u0100dl\\u0a65\\u0a6fiumSpace;\\u605flintrf;\\u6133r;\\uc000\\ud835\\udd10nusPlus;\\u6213pf;\\uc000\\ud835\\udd44c\\xf2\\u0a76;\\u439c\\u0480Jacefostu\\u0aa3\\u0aa7\\u0aad\\u0ac0\\u0b14\\u0b19\\u0d91\\u0d97\\u0d9ecy;\\u440acute;\\u4143\\u0180aey\\u0ab4\\u0ab9\\u0aberon;\\u4147dil;\\u4145;\\u441d\\u0180gsw\\u0ac7\\u0af0\\u0b0eative\\u0180MTV\\u0ad3\\u0adf\\u0ae8ediumSpace;\\u600bhi\\u0100cn\\u0ae6\\u0ad8\\xeb\\u0ad9eryThi\\xee\\u0ad9ted\\u0100GL\\u0af8\\u0b06reaterGreate\\xf2\\u0673essLes\\xf3\\u0a48Line;\\u400ar;\\uc000\\ud835\\udd11\\u0200Bnpt\\u0b22\\u0b28\\u0b37\\u0b3areak;\\u6060BreakingSpace;\\u40a0f;\\u6115\\u0680;CDEGHLNPRSTV\\u0b55\\u0b56\\u0b6a\\u0b7c\\u0ba1\\u0beb\\u0c04\\u0c5e\\u0c84\\u0ca6\\u0cd8\\u0d61\\u0d85\\u6aec\\u0100ou\\u0b5b\\u0b64ngruent;\\u6262pCap;\\u626doubleVerticalBar;\\u6226\\u0180lqx\\u0b83\\u0b8a\\u0b9bement;\\u6209ual\\u0100;T\\u0b92\\u0b93\\u6260ilde;\\uc000\\u2242\\u0338ists;\\u6204reater\\u0380;EFGLST\\u0bb6\\u0bb7\\u0bbd\\u0bc9\\u0bd3\\u0bd8\\u0be5\\u626fqual;\\u6271ullEqual;\\uc000\\u2267\\u0338reater;\\uc000\\u226b\\u0338ess;\\u6279lantEqual;\\uc000\\u2a7e\\u0338ilde;\\u6275ump\\u0144\\u0bf2\\u0bfdownHump;\\uc000\\u224e\\u0338qual;\\uc000\\u224f\\u0338e\\u0100fs\\u0c0a\\u0c27tTriangle\\u0180;BE\\u0c1a\\u0c1b\\u0c21\\u62eaar;\\uc000\\u29cf\\u0338qual;\\u62ecs\\u0300;EGLST\\u0c35\\u0c36\\u0c3c\\u0c44\\u0c4b\\u0c58\\u626equal;\\u6270reater;\\u6278ess;\\uc000\\u226a\\u0338lantEqual;\\uc000\\u2a7d\\u0338ilde;\\u6274ested\\u0100GL\\u0c68\\u0c79reaterGreater;\\uc000\\u2aa2\\u0338essLess;\\uc000\\u2aa1\\u0338recedes\\u0180;ES\\u0c92\\u0c93\\u0c9b\\u6280qual;\\uc000\\u2aaf\\u0338lantEqual;\\u62e0\\u0100ei\\u0cab\\u0cb9verseElement;\\u620cghtTriangle\\u0180;BE\\u0ccb\\u0ccc\\u0cd2\\u62ebar;\\uc000\\u29d0\\u0338qual;\\u62ed\\u0100qu\\u0cdd\\u0d0cuareSu\\u0100bp\\u0ce8\\u0cf9set\\u0100;E\\u0cf0\\u0cf3\\uc000\\u228f\\u0338qual;\\u62e2erset\\u0100;E\\u0d03\\u0d06\\uc000\\u2290\\u0338qual;\\u62e3\\u0180bcp\\u0d13\\u0d24\\u0d4eset\\u0100;E\\u0d1b\\u0d1e\\uc000\\u2282\\u20d2qual;\\u6288ceeds\\u0200;EST\\u0d32\\u0d33\\u0d3b\\u0d46\\u6281qual;\\uc000\\u2ab0\\u0338lantEqual;\\u62e1ilde;\\uc000\\u227f\\u0338erset\\u0100;E\\u0d58\\u0d5b\\uc000\\u2283\\u20d2qual;\\u6289ilde\\u0200;EFT\\u0d6e\\u0d6f\\u0d75\\u0d7f\\u6241qual;\\u6244ullEqual;\\u6247ilde;\\u6249erticalBar;\\u6224cr;\\uc000\\ud835\\udca9ilde\\u803b\\xd1\\u40d1;\\u439d\\u0700Eacdfgmoprstuv\\u0dbd\\u0dc2\\u0dc9\\u0dd5\\u0ddb\\u0de0\\u0de7\\u0dfc\\u0e02\\u0e20\\u0e22\\u0e32\\u0e3f\\u0e44lig;\\u4152cute\\u803b\\xd3\\u40d3\\u0100iy\\u0dce\\u0dd3rc\\u803b\\xd4\\u40d4;\\u441eblac;\\u4150r;\\uc000\\ud835\\udd12rave\\u803b\\xd2\\u40d2\\u0180aei\\u0dee\\u0df2\\u0df6cr;\\u414cga;\\u43a9cron;\\u439fpf;\\uc000\\ud835\\udd46enCurly\\u0100DQ\\u0e0e\\u0e1aoubleQuote;\\u601cuote;\\u6018;\\u6a54\\u0100cl\\u0e27\\u0e2cr;\\uc000\\ud835\\udcaaash\\u803b\\xd8\\u40d8i\\u016c\\u0e37\\u0e3cde\\u803b\\xd5\\u40d5es;\\u6a37ml\\u803b\\xd6\\u40d6er\\u0100BP\\u0e4b\\u0e60\\u0100ar\\u0e50\\u0e53r;\\u603eac\\u0100ek\\u0e5a\\u0e5c;\\u63deet;\\u63b4arenthesis;\\u63dc\\u0480acfhilors\\u0e7f\\u0e87\\u0e8a\\u0e8f\\u0e92\\u0e94\\u0e9d\\u0eb0\\u0efcrtialD;\\u6202y;\\u441fr;\\uc000\\ud835\\udd13i;\\u43a6;\\u43a0usMinus;\\u40b1\\u0100ip\\u0ea2\\u0eadncareplan\\xe5\\u069df;\\u6119\\u0200;eio\\u0eb9\\u0eba\\u0ee0\\u0ee4\\u6abbcedes\\u0200;EST\\u0ec8\\u0ec9\\u0ecf\\u0eda\\u627aqual;\\u6aaflantEqual;\\u627cilde;\\u627eme;\\u6033\\u0100dp\\u0ee9\\u0eeeuct;\\u620fortion\\u0100;a\\u0225\\u0ef9l;\\u621d\\u0100ci\\u0f01\\u0f06r;\\uc000\\ud835\\udcab;\\u43a8\\u0200Ufos\\u0f11\\u0f16\\u0f1b\\u0f1fOT\\u803b\\\"\\u4022r;\\uc000\\ud835\\udd14pf;\\u611acr;\\uc000\\ud835\\udcac\\u0600BEacefhiorsu\\u0f3e\\u0f43\\u0f47\\u0f60\\u0f73\\u0fa7\\u0faa\\u0fad\\u1096\\u10a9\\u10b4\\u10bearr;\\u6910G\\u803b\\xae\\u40ae\\u0180cnr\\u0f4e\\u0f53\\u0f56ute;\\u4154g;\\u67ebr\\u0100;t\\u0f5c\\u0f5d\\u61a0l;\\u6916\\u0180aey\\u0f67\\u0f6c\\u0f71ron;\\u4158dil;\\u4156;\\u4420\\u0100;v\\u0f78\\u0f79\\u611cerse\\u0100EU\\u0f82\\u0f99\\u0100lq\\u0f87\\u0f8eement;\\u620builibrium;\\u61cbpEquilibrium;\\u696fr\\xbb\\u0f79o;\\u43a1ght\\u0400ACDFTUVa\\u0fc1\\u0feb\\u0ff3\\u1022\\u1028\\u105b\\u1087\\u03d8\\u0100nr\\u0fc6\\u0fd2gleBracket;\\u67e9row\\u0180;BL\\u0fdc\\u0fdd\\u0fe1\\u6192ar;\\u61e5eftArrow;\\u61c4eiling;\\u6309o\\u01f5\\u0ff9\\0\\u1005bleBracket;\\u67e7n\\u01d4\\u100a\\0\\u1014eeVector;\\u695dector\\u0100;B\\u101d\\u101e\\u61c2ar;\\u6955loor;\\u630b\\u0100er\\u102d\\u1043e\\u0180;AV\\u1035\\u1036\\u103c\\u62a2rrow;\\u61a6ector;\\u695biangle\\u0180;BE\\u1050\\u1051\\u1055\\u62b3ar;\\u69d0qual;\\u62b5p\\u0180DTV\\u1063\\u106e\\u1078ownVector;\\u694feeVector;\\u695cector\\u0100;B\\u1082\\u1083\\u61bear;\\u6954ector\\u0100;B\\u1091\\u1092\\u61c0ar;\\u6953\\u0100pu\\u109b\\u109ef;\\u611dndImplies;\\u6970ightarrow;\\u61db\\u0100ch\\u10b9\\u10bcr;\\u611b;\\u61b1leDelayed;\\u69f4\\u0680HOacfhimoqstu\\u10e4\\u10f1\\u10f7\\u10fd\\u1119\\u111e\\u1151\\u1156\\u1161\\u1167\\u11b5\\u11bb\\u11bf\\u0100Cc\\u10e9\\u10eeHcy;\\u4429y;\\u4428FTcy;\\u442ccute;\\u415a\\u0280;aeiy\\u1108\\u1109\\u110e\\u1113\\u1117\\u6abcron;\\u4160dil;\\u415erc;\\u415c;\\u4421r;\\uc000\\ud835\\udd16ort\\u0200DLRU\\u112a\\u1134\\u113e\\u1149ownArrow\\xbb\\u041eeftArrow\\xbb\\u089aightArrow\\xbb\\u0fddpArrow;\\u6191gma;\\u43a3allCircle;\\u6218pf;\\uc000\\ud835\\udd4a\\u0272\\u116d\\0\\0\\u1170t;\\u621aare\\u0200;ISU\\u117b\\u117c\\u1189\\u11af\\u65a1ntersection;\\u6293u\\u0100bp\\u118f\\u119eset\\u0100;E\\u1197\\u1198\\u628fqual;\\u6291erset\\u0100;E\\u11a8\\u11a9\\u6290qual;\\u6292nion;\\u6294cr;\\uc000\\ud835\\udcaear;\\u62c6\\u0200bcmp\\u11c8\\u11db\\u1209\\u120b\\u0100;s\\u11cd\\u11ce\\u62d0et\\u0100;E\\u11cd\\u11d5qual;\\u6286\\u0100ch\\u11e0\\u1205eeds\\u0200;EST\\u11ed\\u11ee\\u11f4\\u11ff\\u627bqual;\\u6ab0lantEqual;\\u627dilde;\\u627fTh\\xe1\\u0f8c;\\u6211\\u0180;es\\u1212\\u1213\\u1223\\u62d1rset\\u0100;E\\u121c\\u121d\\u6283qual;\\u6287et\\xbb\\u1213\\u0580HRSacfhiors\\u123e\\u1244\\u1249\\u1255\\u125e\\u1271\\u1276\\u129f\\u12c2\\u12c8\\u12d1ORN\\u803b\\xde\\u40deADE;\\u6122\\u0100Hc\\u124e\\u1252cy;\\u440by;\\u4426\\u0100bu\\u125a\\u125c;\\u4009;\\u43a4\\u0180aey\\u1265\\u126a\\u126fron;\\u4164dil;\\u4162;\\u4422r;\\uc000\\ud835\\udd17\\u0100ei\\u127b\\u1289\\u01f2\\u1280\\0\\u1287efore;\\u6234a;\\u4398\\u0100cn\\u128e\\u1298kSpace;\\uc000\\u205f\\u200aSpace;\\u6009lde\\u0200;EFT\\u12ab\\u12ac\\u12b2\\u12bc\\u623cqual;\\u6243ullEqual;\\u6245ilde;\\u6248pf;\\uc000\\ud835\\udd4bipleDot;\\u60db\\u0100ct\\u12d6\\u12dbr;\\uc000\\ud835\\udcafrok;\\u4166\\u0ae1\\u12f7\\u130e\\u131a\\u1326\\0\\u132c\\u1331\\0\\0\\0\\0\\0\\u1338\\u133d\\u1377\\u1385\\0\\u13ff\\u1404\\u140a\\u1410\\u0100cr\\u12fb\\u1301ute\\u803b\\xda\\u40dar\\u0100;o\\u1307\\u1308\\u619fcir;\\u6949r\\u01e3\\u1313\\0\\u1316y;\\u440eve;\\u416c\\u0100iy\\u131e\\u1323rc\\u803b\\xdb\\u40db;\\u4423blac;\\u4170r;\\uc000\\ud835\\udd18rave\\u803b\\xd9\\u40d9acr;\\u416a\\u0100di\\u1341\\u1369er\\u0100BP\\u1348\\u135d\\u0100ar\\u134d\\u1350r;\\u405fac\\u0100ek\\u1357\\u1359;\\u63dfet;\\u63b5arenthesis;\\u63ddon\\u0100;P\\u1370\\u1371\\u62c3lus;\\u628e\\u0100gp\\u137b\\u137fon;\\u4172f;\\uc000\\ud835\\udd4c\\u0400ADETadps\\u1395\\u13ae\\u13b8\\u13c4\\u03e8\\u13d2\\u13d7\\u13f3rrow\\u0180;BD\\u1150\\u13a0\\u13a4ar;\\u6912ownArrow;\\u61c5ownArrow;\\u6195quilibrium;\\u696eee\\u0100;A\\u13cb\\u13cc\\u62a5rrow;\\u61a5own\\xe1\\u03f3er\\u0100LR\\u13de\\u13e8eftArrow;\\u6196ightArrow;\\u6197i\\u0100;l\\u13f9\\u13fa\\u43d2on;\\u43a5ing;\\u416ecr;\\uc000\\ud835\\udcb0ilde;\\u4168ml\\u803b\\xdc\\u40dc\\u0480Dbcdefosv\\u1427\\u142c\\u1430\\u1433\\u143e\\u1485\\u148a\\u1490\\u1496ash;\\u62abar;\\u6aeby;\\u4412ash\\u0100;l\\u143b\\u143c\\u62a9;\\u6ae6\\u0100er\\u1443\\u1445;\\u62c1\\u0180bty\\u144c\\u1450\\u147aar;\\u6016\\u0100;i\\u144f\\u1455cal\\u0200BLST\\u1461\\u1465\\u146a\\u1474ar;\\u6223ine;\\u407ceparator;\\u6758ilde;\\u6240ThinSpace;\\u600ar;\\uc000\\ud835\\udd19pf;\\uc000\\ud835\\udd4dcr;\\uc000\\ud835\\udcb1dash;\\u62aa\\u0280cefos\\u14a7\\u14ac\\u14b1\\u14b6\\u14bcirc;\\u4174dge;\\u62c0r;\\uc000\\ud835\\udd1apf;\\uc000\\ud835\\udd4ecr;\\uc000\\ud835\\udcb2\\u0200fios\\u14cb\\u14d0\\u14d2\\u14d8r;\\uc000\\ud835\\udd1b;\\u439epf;\\uc000\\ud835\\udd4fcr;\\uc000\\ud835\\udcb3\\u0480AIUacfosu\\u14f1\\u14f5\\u14f9\\u14fd\\u1504\\u150f\\u1514\\u151a\\u1520cy;\\u442fcy;\\u4407cy;\\u442ecute\\u803b\\xdd\\u40dd\\u0100iy\\u1509\\u150drc;\\u4176;\\u442br;\\uc000\\ud835\\udd1cpf;\\uc000\\ud835\\udd50cr;\\uc000\\ud835\\udcb4ml;\\u4178\\u0400Hacdefos\\u1535\\u1539\\u153f\\u154b\\u154f\\u155d\\u1560\\u1564cy;\\u4416cute;\\u4179\\u0100ay\\u1544\\u1549ron;\\u417d;\\u4417ot;\\u417b\\u01f2\\u1554\\0\\u155boWidt\\xe8\\u0ad9a;\\u4396r;\\u6128pf;\\u6124cr;\\uc000\\ud835\\udcb5\\u0be1\\u1583\\u158a\\u1590\\0\\u15b0\\u15b6\\u15bf\\0\\0\\0\\0\\u15c6\\u15db\\u15eb\\u165f\\u166d\\0\\u1695\\u169b\\u16b2\\u16b9\\0\\u16becute\\u803b\\xe1\\u40e1reve;\\u4103\\u0300;Ediuy\\u159c\\u159d\\u15a1\\u15a3\\u15a8\\u15ad\\u623e;\\uc000\\u223e\\u0333;\\u623frc\\u803b\\xe2\\u40e2te\\u80bb\\xb4\\u0306;\\u4430lig\\u803b\\xe6\\u40e6\\u0100;r\\xb2\\u15ba;\\uc000\\ud835\\udd1erave\\u803b\\xe0\\u40e0\\u0100ep\\u15ca\\u15d6\\u0100fp\\u15cf\\u15d4sym;\\u6135\\xe8\\u15d3ha;\\u43b1\\u0100ap\\u15dfc\\u0100cl\\u15e4\\u15e7r;\\u4101g;\\u6a3f\\u0264\\u15f0\\0\\0\\u160a\\u0280;adsv\\u15fa\\u15fb\\u15ff\\u1601\\u1607\\u6227nd;\\u6a55;\\u6a5clope;\\u6a58;\\u6a5a\\u0380;elmrsz\\u1618\\u1619\\u161b\\u161e\\u163f\\u164f\\u1659\\u6220;\\u69a4e\\xbb\\u1619sd\\u0100;a\\u1625\\u1626\\u6221\\u0461\\u1630\\u1632\\u1634\\u1636\\u1638\\u163a\\u163c\\u163e;\\u69a8;\\u69a9;\\u69aa;\\u69ab;\\u69ac;\\u69ad;\\u69ae;\\u69aft\\u0100;v\\u1645\\u1646\\u621fb\\u0100;d\\u164c\\u164d\\u62be;\\u699d\\u0100pt\\u1654\\u1657h;\\u6222\\xbb\\xb9arr;\\u637c\\u0100gp\\u1663\\u1667on;\\u4105f;\\uc000\\ud835\\udd52\\u0380;Eaeiop\\u12c1\\u167b\\u167d\\u1682\\u1684\\u1687\\u168a;\\u6a70cir;\\u6a6f;\\u624ad;\\u624bs;\\u4027rox\\u0100;e\\u12c1\\u1692\\xf1\\u1683ing\\u803b\\xe5\\u40e5\\u0180cty\\u16a1\\u16a6\\u16a8r;\\uc000\\ud835\\udcb6;\\u402amp\\u0100;e\\u12c1\\u16af\\xf1\\u0288ilde\\u803b\\xe3\\u40e3ml\\u803b\\xe4\\u40e4\\u0100ci\\u16c2\\u16c8onin\\xf4\\u0272nt;\\u6a11\\u0800Nabcdefiklnoprsu\\u16ed\\u16f1\\u1730\\u173c\\u1743\\u1748\\u1778\\u177d\\u17e0\\u17e6\\u1839\\u1850\\u170d\\u193d\\u1948\\u1970ot;\\u6aed\\u0100cr\\u16f6\\u171ek\\u0200ceps\\u1700\\u1705\\u170d\\u1713ong;\\u624cpsilon;\\u43f6rime;\\u6035im\\u0100;e\\u171a\\u171b\\u623dq;\\u62cd\\u0176\\u1722\\u1726ee;\\u62bded\\u0100;g\\u172c\\u172d\\u6305e\\xbb\\u172drk\\u0100;t\\u135c\\u1737brk;\\u63b6\\u0100oy\\u1701\\u1741;\\u4431quo;\\u601e\\u0280cmprt\\u1753\\u175b\\u1761\\u1764\\u1768aus\\u0100;e\\u010a\\u0109ptyv;\\u69b0s\\xe9\\u170cno\\xf5\\u0113\\u0180ahw\\u176f\\u1771\\u1773;\\u43b2;\\u6136een;\\u626cr;\\uc000\\ud835\\udd1fg\\u0380costuvw\\u178d\\u179d\\u17b3\\u17c1\\u17d5\\u17db\\u17de\\u0180aiu\\u1794\\u1796\\u179a\\xf0\\u0760rc;\\u65efp\\xbb\\u1371\\u0180dpt\\u17a4\\u17a8\\u17adot;\\u6a00lus;\\u6a01imes;\\u6a02\\u0271\\u17b9\\0\\0\\u17becup;\\u6a06ar;\\u6605riangle\\u0100du\\u17cd\\u17d2own;\\u65bdp;\\u65b3plus;\\u6a04e\\xe5\\u1444\\xe5\\u14adarow;\\u690d\\u0180ako\\u17ed\\u1826\\u1835\\u0100cn\\u17f2\\u1823k\\u0180lst\\u17fa\\u05ab\\u1802ozenge;\\u69ebriangle\\u0200;dlr\\u1812\\u1813\\u1818\\u181d\\u65b4own;\\u65beeft;\\u65c2ight;\\u65b8k;\\u6423\\u01b1\\u182b\\0\\u1833\\u01b2\\u182f\\0\\u1831;\\u6592;\\u65914;\\u6593ck;\\u6588\\u0100eo\\u183e\\u184d\\u0100;q\\u1843\\u1846\\uc000=\\u20e5uiv;\\uc000\\u2261\\u20e5t;\\u6310\\u0200ptwx\\u1859\\u185e\\u1867\\u186cf;\\uc000\\ud835\\udd53\\u0100;t\\u13cb\\u1863om\\xbb\\u13cctie;\\u62c8\\u0600DHUVbdhmptuv\\u1885\\u1896\\u18aa\\u18bb\\u18d7\\u18db\\u18ec\\u18ff\\u1905\\u190a\\u1910\\u1921\\u0200LRlr\\u188e\\u1890\\u1892\\u1894;\\u6557;\\u6554;\\u6556;\\u6553\\u0280;DUdu\\u18a1\\u18a2\\u18a4\\u18a6\\u18a8\\u6550;\\u6566;\\u6569;\\u6564;\\u6567\\u0200LRlr\\u18b3\\u18b5\\u18b7\\u18b9;\\u655d;\\u655a;\\u655c;\\u6559\\u0380;HLRhlr\\u18ca\\u18cb\\u18cd\\u18cf\\u18d1\\u18d3\\u18d5\\u6551;\\u656c;\\u6563;\\u6560;\\u656b;\\u6562;\\u655fox;\\u69c9\\u0200LRlr\\u18e4\\u18e6\\u18e8\\u18ea;\\u6555;\\u6552;\\u6510;\\u650c\\u0280;DUdu\\u06bd\\u18f7\\u18f9\\u18fb\\u18fd;\\u6565;\\u6568;\\u652c;\\u6534inus;\\u629flus;\\u629eimes;\\u62a0\\u0200LRlr\\u1919\\u191b\\u191d\\u191f;\\u655b;\\u6558;\\u6518;\\u6514\\u0380;HLRhlr\\u1930\\u1931\\u1933\\u1935\\u1937\\u1939\\u193b\\u6502;\\u656a;\\u6561;\\u655e;\\u653c;\\u6524;\\u651c\\u0100ev\\u0123\\u1942bar\\u803b\\xa6\\u40a6\\u0200ceio\\u1951\\u1956\\u195a\\u1960r;\\uc000\\ud835\\udcb7mi;\\u604fm\\u0100;e\\u171a\\u171cl\\u0180;bh\\u1968\\u1969\\u196b\\u405c;\\u69c5sub;\\u67c8\\u016c\\u1974\\u197el\\u0100;e\\u1979\\u197a\\u6022t\\xbb\\u197ap\\u0180;Ee\\u012f\\u1985\\u1987;\\u6aae\\u0100;q\\u06dc\\u06db\\u0ce1\\u19a7\\0\\u19e8\\u1a11\\u1a15\\u1a32\\0\\u1a37\\u1a50\\0\\0\\u1ab4\\0\\0\\u1ac1\\0\\0\\u1b21\\u1b2e\\u1b4d\\u1b52\\0\\u1bfd\\0\\u1c0c\\u0180cpr\\u19ad\\u19b2\\u19ddute;\\u4107\\u0300;abcds\\u19bf\\u19c0\\u19c4\\u19ca\\u19d5\\u19d9\\u6229nd;\\u6a44rcup;\\u6a49\\u0100au\\u19cf\\u19d2p;\\u6a4bp;\\u6a47ot;\\u6a40;\\uc000\\u2229\\ufe00\\u0100eo\\u19e2\\u19e5t;\\u6041\\xee\\u0693\\u0200aeiu\\u19f0\\u19fb\\u1a01\\u1a05\\u01f0\\u19f5\\0\\u19f8s;\\u6a4don;\\u410ddil\\u803b\\xe7\\u40e7rc;\\u4109ps\\u0100;s\\u1a0c\\u1a0d\\u6a4cm;\\u6a50ot;\\u410b\\u0180dmn\\u1a1b\\u1a20\\u1a26il\\u80bb\\xb8\\u01adptyv;\\u69b2t\\u8100\\xa2;e\\u1a2d\\u1a2e\\u40a2r\\xe4\\u01b2r;\\uc000\\ud835\\udd20\\u0180cei\\u1a3d\\u1a40\\u1a4dy;\\u4447ck\\u0100;m\\u1a47\\u1a48\\u6713ark\\xbb\\u1a48;\\u43c7r\\u0380;Ecefms\\u1a5f\\u1a60\\u1a62\\u1a6b\\u1aa4\\u1aaa\\u1aae\\u65cb;\\u69c3\\u0180;el\\u1a69\\u1a6a\\u1a6d\\u42c6q;\\u6257e\\u0261\\u1a74\\0\\0\\u1a88rrow\\u0100lr\\u1a7c\\u1a81eft;\\u61baight;\\u61bb\\u0280RSacd\\u1a92\\u1a94\\u1a96\\u1a9a\\u1a9f\\xbb\\u0f47;\\u64c8st;\\u629birc;\\u629aash;\\u629dnint;\\u6a10id;\\u6aefcir;\\u69c2ubs\\u0100;u\\u1abb\\u1abc\\u6663it\\xbb\\u1abc\\u02ec\\u1ac7\\u1ad4\\u1afa\\0\\u1b0aon\\u0100;e\\u1acd\\u1ace\\u403a\\u0100;q\\xc7\\xc6\\u026d\\u1ad9\\0\\0\\u1ae2a\\u0100;t\\u1ade\\u1adf\\u402c;\\u4040\\u0180;fl\\u1ae8\\u1ae9\\u1aeb\\u6201\\xee\\u1160e\\u0100mx\\u1af1\\u1af6ent\\xbb\\u1ae9e\\xf3\\u024d\\u01e7\\u1afe\\0\\u1b07\\u0100;d\\u12bb\\u1b02ot;\\u6a6dn\\xf4\\u0246\\u0180fry\\u1b10\\u1b14\\u1b17;\\uc000\\ud835\\udd54o\\xe4\\u0254\\u8100\\xa9;s\\u0155\\u1b1dr;\\u6117\\u0100ao\\u1b25\\u1b29rr;\\u61b5ss;\\u6717\\u0100cu\\u1b32\\u1b37r;\\uc000\\ud835\\udcb8\\u0100bp\\u1b3c\\u1b44\\u0100;e\\u1b41\\u1b42\\u6acf;\\u6ad1\\u0100;e\\u1b49\\u1b4a\\u6ad0;\\u6ad2dot;\\u62ef\\u0380delprvw\\u1b60\\u1b6c\\u1b77\\u1b82\\u1bac\\u1bd4\\u1bf9arr\\u0100lr\\u1b68\\u1b6a;\\u6938;\\u6935\\u0270\\u1b72\\0\\0\\u1b75r;\\u62dec;\\u62dfarr\\u0100;p\\u1b7f\\u1b80\\u61b6;\\u693d\\u0300;bcdos\\u1b8f\\u1b90\\u1b96\\u1ba1\\u1ba5\\u1ba8\\u622arcap;\\u6a48\\u0100au\\u1b9b\\u1b9ep;\\u6a46p;\\u6a4aot;\\u628dr;\\u6a45;\\uc000\\u222a\\ufe00\\u0200alrv\\u1bb5\\u1bbf\\u1bde\\u1be3rr\\u0100;m\\u1bbc\\u1bbd\\u61b7;\\u693cy\\u0180evw\\u1bc7\\u1bd4\\u1bd8q\\u0270\\u1bce\\0\\0\\u1bd2re\\xe3\\u1b73u\\xe3\\u1b75ee;\\u62ceedge;\\u62cfen\\u803b\\xa4\\u40a4earrow\\u0100lr\\u1bee\\u1bf3eft\\xbb\\u1b80ight\\xbb\\u1bbde\\xe4\\u1bdd\\u0100ci\\u1c01\\u1c07onin\\xf4\\u01f7nt;\\u6231lcty;\\u632d\\u0980AHabcdefhijlorstuwz\\u1c38\\u1c3b\\u1c3f\\u1c5d\\u1c69\\u1c75\\u1c8a\\u1c9e\\u1cac\\u1cb7\\u1cfb\\u1cff\\u1d0d\\u1d7b\\u1d91\\u1dab\\u1dbb\\u1dc6\\u1dcdr\\xf2\\u0381ar;\\u6965\\u0200glrs\\u1c48\\u1c4d\\u1c52\\u1c54ger;\\u6020eth;\\u6138\\xf2\\u1133h\\u0100;v\\u1c5a\\u1c5b\\u6010\\xbb\\u090a\\u016b\\u1c61\\u1c67arow;\\u690fa\\xe3\\u0315\\u0100ay\\u1c6e\\u1c73ron;\\u410f;\\u4434\\u0180;ao\\u0332\\u1c7c\\u1c84\\u0100gr\\u02bf\\u1c81r;\\u61catseq;\\u6a77\\u0180glm\\u1c91\\u1c94\\u1c98\\u803b\\xb0\\u40b0ta;\\u43b4ptyv;\\u69b1\\u0100ir\\u1ca3\\u1ca8sht;\\u697f;\\uc000\\ud835\\udd21ar\\u0100lr\\u1cb3\\u1cb5\\xbb\\u08dc\\xbb\\u101e\\u0280aegsv\\u1cc2\\u0378\\u1cd6\\u1cdc\\u1ce0m\\u0180;os\\u0326\\u1cca\\u1cd4nd\\u0100;s\\u0326\\u1cd1uit;\\u6666amma;\\u43ddin;\\u62f2\\u0180;io\\u1ce7\\u1ce8\\u1cf8\\u40f7de\\u8100\\xf7;o\\u1ce7\\u1cf0ntimes;\\u62c7n\\xf8\\u1cf7cy;\\u4452c\\u026f\\u1d06\\0\\0\\u1d0arn;\\u631eop;\\u630d\\u0280lptuw\\u1d18\\u1d1d\\u1d22\\u1d49\\u1d55lar;\\u4024f;\\uc000\\ud835\\udd55\\u0280;emps\\u030b\\u1d2d\\u1d37\\u1d3d\\u1d42q\\u0100;d\\u0352\\u1d33ot;\\u6251inus;\\u6238lus;\\u6214quare;\\u62a1blebarwedg\\xe5\\xfan\\u0180adh\\u112e\\u1d5d\\u1d67ownarrow\\xf3\\u1c83arpoon\\u0100lr\\u1d72\\u1d76ef\\xf4\\u1cb4igh\\xf4\\u1cb6\\u0162\\u1d7f\\u1d85karo\\xf7\\u0f42\\u026f\\u1d8a\\0\\0\\u1d8ern;\\u631fop;\\u630c\\u0180cot\\u1d98\\u1da3\\u1da6\\u0100ry\\u1d9d\\u1da1;\\uc000\\ud835\\udcb9;\\u4455l;\\u69f6rok;\\u4111\\u0100dr\\u1db0\\u1db4ot;\\u62f1i\\u0100;f\\u1dba\\u1816\\u65bf\\u0100ah\\u1dc0\\u1dc3r\\xf2\\u0429a\\xf2\\u0fa6angle;\\u69a6\\u0100ci\\u1dd2\\u1dd5y;\\u445fgrarr;\\u67ff\\u0900Dacdefglmnopqrstux\\u1e01\\u1e09\\u1e19\\u1e38\\u0578\\u1e3c\\u1e49\\u1e61\\u1e7e\\u1ea5\\u1eaf\\u1ebd\\u1ee1\\u1f2a\\u1f37\\u1f44\\u1f4e\\u1f5a\\u0100Do\\u1e06\\u1d34o\\xf4\\u1c89\\u0100cs\\u1e0e\\u1e14ute\\u803b\\xe9\\u40e9ter;\\u6a6e\\u0200aioy\\u1e22\\u1e27\\u1e31\\u1e36ron;\\u411br\\u0100;c\\u1e2d\\u1e2e\\u6256\\u803b\\xea\\u40ealon;\\u6255;\\u444dot;\\u4117\\u0100Dr\\u1e41\\u1e45ot;\\u6252;\\uc000\\ud835\\udd22\\u0180;rs\\u1e50\\u1e51\\u1e57\\u6a9aave\\u803b\\xe8\\u40e8\\u0100;d\\u1e5c\\u1e5d\\u6a96ot;\\u6a98\\u0200;ils\\u1e6a\\u1e6b\\u1e72\\u1e74\\u6a99nters;\\u63e7;\\u6113\\u0100;d\\u1e79\\u1e7a\\u6a95ot;\\u6a97\\u0180aps\\u1e85\\u1e89\\u1e97cr;\\u4113ty\\u0180;sv\\u1e92\\u1e93\\u1e95\\u6205et\\xbb\\u1e93p\\u01001;\\u1e9d\\u1ea4\\u0133\\u1ea1\\u1ea3;\\u6004;\\u6005\\u6003\\u0100gs\\u1eaa\\u1eac;\\u414bp;\\u6002\\u0100gp\\u1eb4\\u1eb8on;\\u4119f;\\uc000\\ud835\\udd56\\u0180als\\u1ec4\\u1ece\\u1ed2r\\u0100;s\\u1eca\\u1ecb\\u62d5l;\\u69e3us;\\u6a71i\\u0180;lv\\u1eda\\u1edb\\u1edf\\u43b5on\\xbb\\u1edb;\\u43f5\\u0200csuv\\u1eea\\u1ef3\\u1f0b\\u1f23\\u0100io\\u1eef\\u1e31rc\\xbb\\u1e2e\\u0269\\u1ef9\\0\\0\\u1efb\\xed\\u0548ant\\u0100gl\\u1f02\\u1f06tr\\xbb\\u1e5dess\\xbb\\u1e7a\\u0180aei\\u1f12\\u1f16\\u1f1als;\\u403dst;\\u625fv\\u0100;D\\u0235\\u1f20D;\\u6a78parsl;\\u69e5\\u0100Da\\u1f2f\\u1f33ot;\\u6253rr;\\u6971\\u0180cdi\\u1f3e\\u1f41\\u1ef8r;\\u612fo\\xf4\\u0352\\u0100ah\\u1f49\\u1f4b;\\u43b7\\u803b\\xf0\\u40f0\\u0100mr\\u1f53\\u1f57l\\u803b\\xeb\\u40ebo;\\u60ac\\u0180cip\\u1f61\\u1f64\\u1f67l;\\u4021s\\xf4\\u056e\\u0100eo\\u1f6c\\u1f74ctatio\\xee\\u0559nential\\xe5\\u0579\\u09e1\\u1f92\\0\\u1f9e\\0\\u1fa1\\u1fa7\\0\\0\\u1fc6\\u1fcc\\0\\u1fd3\\0\\u1fe6\\u1fea\\u2000\\0\\u2008\\u205allingdotse\\xf1\\u1e44y;\\u4444male;\\u6640\\u0180ilr\\u1fad\\u1fb3\\u1fc1lig;\\u8000\\ufb03\\u0269\\u1fb9\\0\\0\\u1fbdg;\\u8000\\ufb00ig;\\u8000\\ufb04;\\uc000\\ud835\\udd23lig;\\u8000\\ufb01lig;\\uc000fj\\u0180alt\\u1fd9\\u1fdc\\u1fe1t;\\u666dig;\\u8000\\ufb02ns;\\u65b1of;\\u4192\\u01f0\\u1fee\\0\\u1ff3f;\\uc000\\ud835\\udd57\\u0100ak\\u05bf\\u1ff7\\u0100;v\\u1ffc\\u1ffd\\u62d4;\\u6ad9artint;\\u6a0d\\u0100ao\\u200c\\u2055\\u0100cs\\u2011\\u2052\\u03b1\\u201a\\u2030\\u2038\\u2045\\u2048\\0\\u2050\\u03b2\\u2022\\u2025\\u2027\\u202a\\u202c\\0\\u202e\\u803b\\xbd\\u40bd;\\u6153\\u803b\\xbc\\u40bc;\\u6155;\\u6159;\\u615b\\u01b3\\u2034\\0\\u2036;\\u6154;\\u6156\\u02b4\\u203e\\u2041\\0\\0\\u2043\\u803b\\xbe\\u40be;\\u6157;\\u615c5;\\u6158\\u01b6\\u204c\\0\\u204e;\\u615a;\\u615d8;\\u615el;\\u6044wn;\\u6322cr;\\uc000\\ud835\\udcbb\\u0880Eabcdefgijlnorstv\\u2082\\u2089\\u209f\\u20a5\\u20b0\\u20b4\\u20f0\\u20f5\\u20fa\\u20ff\\u2103\\u2112\\u2138\\u0317\\u213e\\u2152\\u219e\\u0100;l\\u064d\\u2087;\\u6a8c\\u0180cmp\\u2090\\u2095\\u209dute;\\u41f5ma\\u0100;d\\u209c\\u1cda\\u43b3;\\u6a86reve;\\u411f\\u0100iy\\u20aa\\u20aerc;\\u411d;\\u4433ot;\\u4121\\u0200;lqs\\u063e\\u0642\\u20bd\\u20c9\\u0180;qs\\u063e\\u064c\\u20c4lan\\xf4\\u0665\\u0200;cdl\\u0665\\u20d2\\u20d5\\u20e5c;\\u6aa9ot\\u0100;o\\u20dc\\u20dd\\u6a80\\u0100;l\\u20e2\\u20e3\\u6a82;\\u6a84\\u0100;e\\u20ea\\u20ed\\uc000\\u22db\\ufe00s;\\u6a94r;\\uc000\\ud835\\udd24\\u0100;g\\u0673\\u061bmel;\\u6137cy;\\u4453\\u0200;Eaj\\u065a\\u210c\\u210e\\u2110;\\u6a92;\\u6aa5;\\u6aa4\\u0200Eaes\\u211b\\u211d\\u2129\\u2134;\\u6269p\\u0100;p\\u2123\\u2124\\u6a8arox\\xbb\\u2124\\u0100;q\\u212e\\u212f\\u6a88\\u0100;q\\u212e\\u211bim;\\u62e7pf;\\uc000\\ud835\\udd58\\u0100ci\\u2143\\u2146r;\\u610am\\u0180;el\\u066b\\u214e\\u2150;\\u6a8e;\\u6a90\\u8300>;cdlqr\\u05ee\\u2160\\u216a\\u216e\\u2173\\u2179\\u0100ci\\u2165\\u2167;\\u6aa7r;\\u6a7aot;\\u62d7Par;\\u6995uest;\\u6a7c\\u0280adels\\u2184\\u216a\\u2190\\u0656\\u219b\\u01f0\\u2189\\0\\u218epro\\xf8\\u209er;\\u6978q\\u0100lq\\u063f\\u2196les\\xf3\\u2088i\\xed\\u066b\\u0100en\\u21a3\\u21adrtneqq;\\uc000\\u2269\\ufe00\\xc5\\u21aa\\u0500Aabcefkosy\\u21c4\\u21c7\\u21f1\\u21f5\\u21fa\\u2218\\u221d\\u222f\\u2268\\u227dr\\xf2\\u03a0\\u0200ilmr\\u21d0\\u21d4\\u21d7\\u21dbrs\\xf0\\u1484f\\xbb\\u2024il\\xf4\\u06a9\\u0100dr\\u21e0\\u21e4cy;\\u444a\\u0180;cw\\u08f4\\u21eb\\u21efir;\\u6948;\\u61adar;\\u610firc;\\u4125\\u0180alr\\u2201\\u220e\\u2213rts\\u0100;u\\u2209\\u220a\\u6665it\\xbb\\u220alip;\\u6026con;\\u62b9r;\\uc000\\ud835\\udd25s\\u0100ew\\u2223\\u2229arow;\\u6925arow;\\u6926\\u0280amopr\\u223a\\u223e\\u2243\\u225e\\u2263rr;\\u61fftht;\\u623bk\\u0100lr\\u2249\\u2253eftarrow;\\u61a9ightarrow;\\u61aaf;\\uc000\\ud835\\udd59bar;\\u6015\\u0180clt\\u226f\\u2274\\u2278r;\\uc000\\ud835\\udcbdas\\xe8\\u21f4rok;\\u4127\\u0100bp\\u2282\\u2287ull;\\u6043hen\\xbb\\u1c5b\\u0ae1\\u22a3\\0\\u22aa\\0\\u22b8\\u22c5\\u22ce\\0\\u22d5\\u22f3\\0\\0\\u22f8\\u2322\\u2367\\u2362\\u237f\\0\\u2386\\u23aa\\u23b4cute\\u803b\\xed\\u40ed\\u0180;iy\\u0771\\u22b0\\u22b5rc\\u803b\\xee\\u40ee;\\u4438\\u0100cx\\u22bc\\u22bfy;\\u4435cl\\u803b\\xa1\\u40a1\\u0100fr\\u039f\\u22c9;\\uc000\\ud835\\udd26rave\\u803b\\xec\\u40ec\\u0200;ino\\u073e\\u22dd\\u22e9\\u22ee\\u0100in\\u22e2\\u22e6nt;\\u6a0ct;\\u622dfin;\\u69dcta;\\u6129lig;\\u4133\\u0180aop\\u22fe\\u231a\\u231d\\u0180cgt\\u2305\\u2308\\u2317r;\\u412b\\u0180elp\\u071f\\u230f\\u2313in\\xe5\\u078ear\\xf4\\u0720h;\\u4131f;\\u62b7ed;\\u41b5\\u0280;cfot\\u04f4\\u232c\\u2331\\u233d\\u2341are;\\u6105in\\u0100;t\\u2338\\u2339\\u621eie;\\u69dddo\\xf4\\u2319\\u0280;celp\\u0757\\u234c\\u2350\\u235b\\u2361al;\\u62ba\\u0100gr\\u2355\\u2359er\\xf3\\u1563\\xe3\\u234darhk;\\u6a17rod;\\u6a3c\\u0200cgpt\\u236f\\u2372\\u2376\\u237by;\\u4451on;\\u412ff;\\uc000\\ud835\\udd5aa;\\u43b9uest\\u803b\\xbf\\u40bf\\u0100ci\\u238a\\u238fr;\\uc000\\ud835\\udcben\\u0280;Edsv\\u04f4\\u239b\\u239d\\u23a1\\u04f3;\\u62f9ot;\\u62f5\\u0100;v\\u23a6\\u23a7\\u62f4;\\u62f3\\u0100;i\\u0777\\u23aelde;\\u4129\\u01eb\\u23b8\\0\\u23bccy;\\u4456l\\u803b\\xef\\u40ef\\u0300cfmosu\\u23cc\\u23d7\\u23dc\\u23e1\\u23e7\\u23f5\\u0100iy\\u23d1\\u23d5rc;\\u4135;\\u4439r;\\uc000\\ud835\\udd27ath;\\u4237pf;\\uc000\\ud835\\udd5b\\u01e3\\u23ec\\0\\u23f1r;\\uc000\\ud835\\udcbfrcy;\\u4458kcy;\\u4454\\u0400acfghjos\\u240b\\u2416\\u2422\\u2427\\u242d\\u2431\\u2435\\u243bppa\\u0100;v\\u2413\\u2414\\u43ba;\\u43f0\\u0100ey\\u241b\\u2420dil;\\u4137;\\u443ar;\\uc000\\ud835\\udd28reen;\\u4138cy;\\u4445cy;\\u445cpf;\\uc000\\ud835\\udd5ccr;\\uc000\\ud835\\udcc0\\u0b80ABEHabcdefghjlmnoprstuv\\u2470\\u2481\\u2486\\u248d\\u2491\\u250e\\u253d\\u255a\\u2580\\u264e\\u265e\\u2665\\u2679\\u267d\\u269a\\u26b2\\u26d8\\u275d\\u2768\\u278b\\u27c0\\u2801\\u2812\\u0180art\\u2477\\u247a\\u247cr\\xf2\\u09c6\\xf2\\u0395ail;\\u691barr;\\u690e\\u0100;g\\u0994\\u248b;\\u6a8bar;\\u6962\\u0963\\u24a5\\0\\u24aa\\0\\u24b1\\0\\0\\0\\0\\0\\u24b5\\u24ba\\0\\u24c6\\u24c8\\u24cd\\0\\u24f9ute;\\u413amptyv;\\u69b4ra\\xee\\u084cbda;\\u43bbg\\u0180;dl\\u088e\\u24c1\\u24c3;\\u6991\\xe5\\u088e;\\u6a85uo\\u803b\\xab\\u40abr\\u0400;bfhlpst\\u0899\\u24de\\u24e6\\u24e9\\u24eb\\u24ee\\u24f1\\u24f5\\u0100;f\\u089d\\u24e3s;\\u691fs;\\u691d\\xeb\\u2252p;\\u61abl;\\u6939im;\\u6973l;\\u61a2\\u0180;ae\\u24ff\\u2500\\u2504\\u6aabil;\\u6919\\u0100;s\\u2509\\u250a\\u6aad;\\uc000\\u2aad\\ufe00\\u0180abr\\u2515\\u2519\\u251drr;\\u690crk;\\u6772\\u0100ak\\u2522\\u252cc\\u0100ek\\u2528\\u252a;\\u407b;\\u405b\\u0100es\\u2531\\u2533;\\u698bl\\u0100du\\u2539\\u253b;\\u698f;\\u698d\\u0200aeuy\\u2546\\u254b\\u2556\\u2558ron;\\u413e\\u0100di\\u2550\\u2554il;\\u413c\\xec\\u08b0\\xe2\\u2529;\\u443b\\u0200cqrs\\u2563\\u2566\\u256d\\u257da;\\u6936uo\\u0100;r\\u0e19\\u1746\\u0100du\\u2572\\u2577har;\\u6967shar;\\u694bh;\\u61b2\\u0280;fgqs\\u258b\\u258c\\u0989\\u25f3\\u25ff\\u6264t\\u0280ahlrt\\u2598\\u25a4\\u25b7\\u25c2\\u25e8rrow\\u0100;t\\u0899\\u25a1a\\xe9\\u24f6arpoon\\u0100du\\u25af\\u25b4own\\xbb\\u045ap\\xbb\\u0966eftarrows;\\u61c7ight\\u0180ahs\\u25cd\\u25d6\\u25derrow\\u0100;s\\u08f4\\u08a7arpoon\\xf3\\u0f98quigarro\\xf7\\u21f0hreetimes;\\u62cb\\u0180;qs\\u258b\\u0993\\u25falan\\xf4\\u09ac\\u0280;cdgs\\u09ac\\u260a\\u260d\\u261d\\u2628c;\\u6aa8ot\\u0100;o\\u2614\\u2615\\u6a7f\\u0100;r\\u261a\\u261b\\u6a81;\\u6a83\\u0100;e\\u2622\\u2625\\uc000\\u22da\\ufe00s;\\u6a93\\u0280adegs\\u2633\\u2639\\u263d\\u2649\\u264bppro\\xf8\\u24c6ot;\\u62d6q\\u0100gq\\u2643\\u2645\\xf4\\u0989gt\\xf2\\u248c\\xf4\\u099bi\\xed\\u09b2\\u0180ilr\\u2655\\u08e1\\u265asht;\\u697c;\\uc000\\ud835\\udd29\\u0100;E\\u099c\\u2663;\\u6a91\\u0161\\u2669\\u2676r\\u0100du\\u25b2\\u266e\\u0100;l\\u0965\\u2673;\\u696alk;\\u6584cy;\\u4459\\u0280;acht\\u0a48\\u2688\\u268b\\u2691\\u2696r\\xf2\\u25c1orne\\xf2\\u1d08ard;\\u696bri;\\u65fa\\u0100io\\u269f\\u26a4dot;\\u4140ust\\u0100;a\\u26ac\\u26ad\\u63b0che\\xbb\\u26ad\\u0200Eaes\\u26bb\\u26bd\\u26c9\\u26d4;\\u6268p\\u0100;p\\u26c3\\u26c4\\u6a89rox\\xbb\\u26c4\\u0100;q\\u26ce\\u26cf\\u6a87\\u0100;q\\u26ce\\u26bbim;\\u62e6\\u0400abnoptwz\\u26e9\\u26f4\\u26f7\\u271a\\u272f\\u2741\\u2747\\u2750\\u0100nr\\u26ee\\u26f1g;\\u67ecr;\\u61fdr\\xeb\\u08c1g\\u0180lmr\\u26ff\\u270d\\u2714eft\\u0100ar\\u09e6\\u2707ight\\xe1\\u09f2apsto;\\u67fcight\\xe1\\u09fdparrow\\u0100lr\\u2725\\u2729ef\\xf4\\u24edight;\\u61ac\\u0180afl\\u2736\\u2739\\u273dr;\\u6985;\\uc000\\ud835\\udd5dus;\\u6a2dimes;\\u6a34\\u0161\\u274b\\u274fst;\\u6217\\xe1\\u134e\\u0180;ef\\u2757\\u2758\\u1800\\u65cange\\xbb\\u2758ar\\u0100;l\\u2764\\u2765\\u4028t;\\u6993\\u0280achmt\\u2773\\u2776\\u277c\\u2785\\u2787r\\xf2\\u08a8orne\\xf2\\u1d8car\\u0100;d\\u0f98\\u2783;\\u696d;\\u600eri;\\u62bf\\u0300achiqt\\u2798\\u279d\\u0a40\\u27a2\\u27ae\\u27bbquo;\\u6039r;\\uc000\\ud835\\udcc1m\\u0180;eg\\u09b2\\u27aa\\u27ac;\\u6a8d;\\u6a8f\\u0100bu\\u252a\\u27b3o\\u0100;r\\u0e1f\\u27b9;\\u601arok;\\u4142\\u8400<;cdhilqr\\u082b\\u27d2\\u2639\\u27dc\\u27e0\\u27e5\\u27ea\\u27f0\\u0100ci\\u27d7\\u27d9;\\u6aa6r;\\u6a79re\\xe5\\u25f2mes;\\u62c9arr;\\u6976uest;\\u6a7b\\u0100Pi\\u27f5\\u27f9ar;\\u6996\\u0180;ef\\u2800\\u092d\\u181b\\u65c3r\\u0100du\\u2807\\u280dshar;\\u694ahar;\\u6966\\u0100en\\u2817\\u2821rtneqq;\\uc000\\u2268\\ufe00\\xc5\\u281e\\u0700Dacdefhilnopsu\\u2840\\u2845\\u2882\\u288e\\u2893\\u28a0\\u28a5\\u28a8\\u28da\\u28e2\\u28e4\\u0a83\\u28f3\\u2902Dot;\\u623a\\u0200clpr\\u284e\\u2852\\u2863\\u287dr\\u803b\\xaf\\u40af\\u0100et\\u2857\\u2859;\\u6642\\u0100;e\\u285e\\u285f\\u6720se\\xbb\\u285f\\u0100;s\\u103b\\u2868to\\u0200;dlu\\u103b\\u2873\\u2877\\u287bow\\xee\\u048cef\\xf4\\u090f\\xf0\\u13d1ker;\\u65ae\\u0100oy\\u2887\\u288cmma;\\u6a29;\\u443cash;\\u6014asuredangle\\xbb\\u1626r;\\uc000\\ud835\\udd2ao;\\u6127\\u0180cdn\\u28af\\u28b4\\u28c9ro\\u803b\\xb5\\u40b5\\u0200;acd\\u1464\\u28bd\\u28c0\\u28c4s\\xf4\\u16a7ir;\\u6af0ot\\u80bb\\xb7\\u01b5us\\u0180;bd\\u28d2\\u1903\\u28d3\\u6212\\u0100;u\\u1d3c\\u28d8;\\u6a2a\\u0163\\u28de\\u28e1p;\\u6adb\\xf2\\u2212\\xf0\\u0a81\\u0100dp\\u28e9\\u28eeels;\\u62a7f;\\uc000\\ud835\\udd5e\\u0100ct\\u28f8\\u28fdr;\\uc000\\ud835\\udcc2pos\\xbb\\u159d\\u0180;lm\\u2909\\u290a\\u290d\\u43bctimap;\\u62b8\\u0c00GLRVabcdefghijlmoprstuvw\\u2942\\u2953\\u297e\\u2989\\u2998\\u29da\\u29e9\\u2a15\\u2a1a\\u2a58\\u2a5d\\u2a83\\u2a95\\u2aa4\\u2aa8\\u2b04\\u2b07\\u2b44\\u2b7f\\u2bae\\u2c34\\u2c67\\u2c7c\\u2ce9\\u0100gt\\u2947\\u294b;\\uc000\\u22d9\\u0338\\u0100;v\\u2950\\u0bcf\\uc000\\u226b\\u20d2\\u0180elt\\u295a\\u2972\\u2976ft\\u0100ar\\u2961\\u2967rrow;\\u61cdightarrow;\\u61ce;\\uc000\\u22d8\\u0338\\u0100;v\\u297b\\u0c47\\uc000\\u226a\\u20d2ightarrow;\\u61cf\\u0100Dd\\u298e\\u2993ash;\\u62afash;\\u62ae\\u0280bcnpt\\u29a3\\u29a7\\u29ac\\u29b1\\u29ccla\\xbb\\u02deute;\\u4144g;\\uc000\\u2220\\u20d2\\u0280;Eiop\\u0d84\\u29bc\\u29c0\\u29c5\\u29c8;\\uc000\\u2a70\\u0338d;\\uc000\\u224b\\u0338s;\\u4149ro\\xf8\\u0d84ur\\u0100;a\\u29d3\\u29d4\\u666el\\u0100;s\\u29d3\\u0b38\\u01f3\\u29df\\0\\u29e3p\\u80bb\\xa0\\u0b37mp\\u0100;e\\u0bf9\\u0c00\\u0280aeouy\\u29f4\\u29fe\\u2a03\\u2a10\\u2a13\\u01f0\\u29f9\\0\\u29fb;\\u6a43on;\\u4148dil;\\u4146ng\\u0100;d\\u0d7e\\u2a0aot;\\uc000\\u2a6d\\u0338p;\\u6a42;\\u443dash;\\u6013\\u0380;Aadqsx\\u0b92\\u2a29\\u2a2d\\u2a3b\\u2a41\\u2a45\\u2a50rr;\\u61d7r\\u0100hr\\u2a33\\u2a36k;\\u6924\\u0100;o\\u13f2\\u13f0ot;\\uc000\\u2250\\u0338ui\\xf6\\u0b63\\u0100ei\\u2a4a\\u2a4ear;\\u6928\\xed\\u0b98ist\\u0100;s\\u0ba0\\u0b9fr;\\uc000\\ud835\\udd2b\\u0200Eest\\u0bc5\\u2a66\\u2a79\\u2a7c\\u0180;qs\\u0bbc\\u2a6d\\u0be1\\u0180;qs\\u0bbc\\u0bc5\\u2a74lan\\xf4\\u0be2i\\xed\\u0bea\\u0100;r\\u0bb6\\u2a81\\xbb\\u0bb7\\u0180Aap\\u2a8a\\u2a8d\\u2a91r\\xf2\\u2971rr;\\u61aear;\\u6af2\\u0180;sv\\u0f8d\\u2a9c\\u0f8c\\u0100;d\\u2aa1\\u2aa2\\u62fc;\\u62facy;\\u445a\\u0380AEadest\\u2ab7\\u2aba\\u2abe\\u2ac2\\u2ac5\\u2af6\\u2af9r\\xf2\\u2966;\\uc000\\u2266\\u0338rr;\\u619ar;\\u6025\\u0200;fqs\\u0c3b\\u2ace\\u2ae3\\u2aeft\\u0100ar\\u2ad4\\u2ad9rro\\xf7\\u2ac1ightarro\\xf7\\u2a90\\u0180;qs\\u0c3b\\u2aba\\u2aealan\\xf4\\u0c55\\u0100;s\\u0c55\\u2af4\\xbb\\u0c36i\\xed\\u0c5d\\u0100;r\\u0c35\\u2afei\\u0100;e\\u0c1a\\u0c25i\\xe4\\u0d90\\u0100pt\\u2b0c\\u2b11f;\\uc000\\ud835\\udd5f\\u8180\\xac;in\\u2b19\\u2b1a\\u2b36\\u40acn\\u0200;Edv\\u0b89\\u2b24\\u2b28\\u2b2e;\\uc000\\u22f9\\u0338ot;\\uc000\\u22f5\\u0338\\u01e1\\u0b89\\u2b33\\u2b35;\\u62f7;\\u62f6i\\u0100;v\\u0cb8\\u2b3c\\u01e1\\u0cb8\\u2b41\\u2b43;\\u62fe;\\u62fd\\u0180aor\\u2b4b\\u2b63\\u2b69r\\u0200;ast\\u0b7b\\u2b55\\u2b5a\\u2b5flle\\xec\\u0b7bl;\\uc000\\u2afd\\u20e5;\\uc000\\u2202\\u0338lint;\\u6a14\\u0180;ce\\u0c92\\u2b70\\u2b73u\\xe5\\u0ca5\\u0100;c\\u0c98\\u2b78\\u0100;e\\u0c92\\u2b7d\\xf1\\u0c98\\u0200Aait\\u2b88\\u2b8b\\u2b9d\\u2ba7r\\xf2\\u2988rr\\u0180;cw\\u2b94\\u2b95\\u2b99\\u619b;\\uc000\\u2933\\u0338;\\uc000\\u219d\\u0338ghtarrow\\xbb\\u2b95ri\\u0100;e\\u0ccb\\u0cd6\\u0380chimpqu\\u2bbd\\u2bcd\\u2bd9\\u2b04\\u0b78\\u2be4\\u2bef\\u0200;cer\\u0d32\\u2bc6\\u0d37\\u2bc9u\\xe5\\u0d45;\\uc000\\ud835\\udcc3ort\\u026d\\u2b05\\0\\0\\u2bd6ar\\xe1\\u2b56m\\u0100;e\\u0d6e\\u2bdf\\u0100;q\\u0d74\\u0d73su\\u0100bp\\u2beb\\u2bed\\xe5\\u0cf8\\xe5\\u0d0b\\u0180bcp\\u2bf6\\u2c11\\u2c19\\u0200;Ees\\u2bff\\u2c00\\u0d22\\u2c04\\u6284;\\uc000\\u2ac5\\u0338et\\u0100;e\\u0d1b\\u2c0bq\\u0100;q\\u0d23\\u2c00c\\u0100;e\\u0d32\\u2c17\\xf1\\u0d38\\u0200;Ees\\u2c22\\u2c23\\u0d5f\\u2c27\\u6285;\\uc000\\u2ac6\\u0338et\\u0100;e\\u0d58\\u2c2eq\\u0100;q\\u0d60\\u2c23\\u0200gilr\\u2c3d\\u2c3f\\u2c45\\u2c47\\xec\\u0bd7lde\\u803b\\xf1\\u40f1\\xe7\\u0c43iangle\\u0100lr\\u2c52\\u2c5ceft\\u0100;e\\u0c1a\\u2c5a\\xf1\\u0c26ight\\u0100;e\\u0ccb\\u2c65\\xf1\\u0cd7\\u0100;m\\u2c6c\\u2c6d\\u43bd\\u0180;es\\u2c74\\u2c75\\u2c79\\u4023ro;\\u6116p;\\u6007\\u0480DHadgilrs\\u2c8f\\u2c94\\u2c99\\u2c9e\\u2ca3\\u2cb0\\u2cb6\\u2cd3\\u2ce3ash;\\u62adarr;\\u6904p;\\uc000\\u224d\\u20d2ash;\\u62ac\\u0100et\\u2ca8\\u2cac;\\uc000\\u2265\\u20d2;\\uc000>\\u20d2nfin;\\u69de\\u0180Aet\\u2cbd\\u2cc1\\u2cc5rr;\\u6902;\\uc000\\u2264\\u20d2\\u0100;r\\u2cca\\u2ccd\\uc000<\\u20d2ie;\\uc000\\u22b4\\u20d2\\u0100At\\u2cd8\\u2cdcrr;\\u6903rie;\\uc000\\u22b5\\u20d2im;\\uc000\\u223c\\u20d2\\u0180Aan\\u2cf0\\u2cf4\\u2d02rr;\\u61d6r\\u0100hr\\u2cfa\\u2cfdk;\\u6923\\u0100;o\\u13e7\\u13e5ear;\\u6927\\u1253\\u1a95\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\u2d2d\\0\\u2d38\\u2d48\\u2d60\\u2d65\\u2d72\\u2d84\\u1b07\\0\\0\\u2d8d\\u2dab\\0\\u2dc8\\u2dce\\0\\u2ddc\\u2e19\\u2e2b\\u2e3e\\u2e43\\u0100cs\\u2d31\\u1a97ute\\u803b\\xf3\\u40f3\\u0100iy\\u2d3c\\u2d45r\\u0100;c\\u1a9e\\u2d42\\u803b\\xf4\\u40f4;\\u443e\\u0280abios\\u1aa0\\u2d52\\u2d57\\u01c8\\u2d5alac;\\u4151v;\\u6a38old;\\u69bclig;\\u4153\\u0100cr\\u2d69\\u2d6dir;\\u69bf;\\uc000\\ud835\\udd2c\\u036f\\u2d79\\0\\0\\u2d7c\\0\\u2d82n;\\u42dbave\\u803b\\xf2\\u40f2;\\u69c1\\u0100bm\\u2d88\\u0df4ar;\\u69b5\\u0200acit\\u2d95\\u2d98\\u2da5\\u2da8r\\xf2\\u1a80\\u0100ir\\u2d9d\\u2da0r;\\u69beoss;\\u69bbn\\xe5\\u0e52;\\u69c0\\u0180aei\\u2db1\\u2db5\\u2db9cr;\\u414dga;\\u43c9\\u0180cdn\\u2dc0\\u2dc5\\u01cdron;\\u43bf;\\u69b6pf;\\uc000\\ud835\\udd60\\u0180ael\\u2dd4\\u2dd7\\u01d2r;\\u69b7rp;\\u69b9\\u0380;adiosv\\u2dea\\u2deb\\u2dee\\u2e08\\u2e0d\\u2e10\\u2e16\\u6228r\\xf2\\u1a86\\u0200;efm\\u2df7\\u2df8\\u2e02\\u2e05\\u6a5dr\\u0100;o\\u2dfe\\u2dff\\u6134f\\xbb\\u2dff\\u803b\\xaa\\u40aa\\u803b\\xba\\u40bagof;\\u62b6r;\\u6a56lope;\\u6a57;\\u6a5b\\u0180clo\\u2e1f\\u2e21\\u2e27\\xf2\\u2e01ash\\u803b\\xf8\\u40f8l;\\u6298i\\u016c\\u2e2f\\u2e34de\\u803b\\xf5\\u40f5es\\u0100;a\\u01db\\u2e3as;\\u6a36ml\\u803b\\xf6\\u40f6bar;\\u633d\\u0ae1\\u2e5e\\0\\u2e7d\\0\\u2e80\\u2e9d\\0\\u2ea2\\u2eb9\\0\\0\\u2ecb\\u0e9c\\0\\u2f13\\0\\0\\u2f2b\\u2fbc\\0\\u2fc8r\\u0200;ast\\u0403\\u2e67\\u2e72\\u0e85\\u8100\\xb6;l\\u2e6d\\u2e6e\\u40b6le\\xec\\u0403\\u0269\\u2e78\\0\\0\\u2e7bm;\\u6af3;\\u6afdy;\\u443fr\\u0280cimpt\\u2e8b\\u2e8f\\u2e93\\u1865\\u2e97nt;\\u4025od;\\u402eil;\\u6030enk;\\u6031r;\\uc000\\ud835\\udd2d\\u0180imo\\u2ea8\\u2eb0\\u2eb4\\u0100;v\\u2ead\\u2eae\\u43c6;\\u43d5ma\\xf4\\u0a76ne;\\u660e\\u0180;tv\\u2ebf\\u2ec0\\u2ec8\\u43c0chfork\\xbb\\u1ffd;\\u43d6\\u0100au\\u2ecf\\u2edfn\\u0100ck\\u2ed5\\u2eddk\\u0100;h\\u21f4\\u2edb;\\u610e\\xf6\\u21f4s\\u0480;abcdemst\\u2ef3\\u2ef4\\u1908\\u2ef9\\u2efd\\u2f04\\u2f06\\u2f0a\\u2f0e\\u402bcir;\\u6a23ir;\\u6a22\\u0100ou\\u1d40\\u2f02;\\u6a25;\\u6a72n\\u80bb\\xb1\\u0e9dim;\\u6a26wo;\\u6a27\\u0180ipu\\u2f19\\u2f20\\u2f25ntint;\\u6a15f;\\uc000\\ud835\\udd61nd\\u803b\\xa3\\u40a3\\u0500;Eaceinosu\\u0ec8\\u2f3f\\u2f41\\u2f44\\u2f47\\u2f81\\u2f89\\u2f92\\u2f7e\\u2fb6;\\u6ab3p;\\u6ab7u\\xe5\\u0ed9\\u0100;c\\u0ece\\u2f4c\\u0300;acens\\u0ec8\\u2f59\\u2f5f\\u2f66\\u2f68\\u2f7eppro\\xf8\\u2f43urlye\\xf1\\u0ed9\\xf1\\u0ece\\u0180aes\\u2f6f\\u2f76\\u2f7approx;\\u6ab9qq;\\u6ab5im;\\u62e8i\\xed\\u0edfme\\u0100;s\\u2f88\\u0eae\\u6032\\u0180Eas\\u2f78\\u2f90\\u2f7a\\xf0\\u2f75\\u0180dfp\\u0eec\\u2f99\\u2faf\\u0180als\\u2fa0\\u2fa5\\u2faalar;\\u632eine;\\u6312urf;\\u6313\\u0100;t\\u0efb\\u2fb4\\xef\\u0efbrel;\\u62b0\\u0100ci\\u2fc0\\u2fc5r;\\uc000\\ud835\\udcc5;\\u43c8ncsp;\\u6008\\u0300fiopsu\\u2fda\\u22e2\\u2fdf\\u2fe5\\u2feb\\u2ff1r;\\uc000\\ud835\\udd2epf;\\uc000\\ud835\\udd62rime;\\u6057cr;\\uc000\\ud835\\udcc6\\u0180aeo\\u2ff8\\u3009\\u3013t\\u0100ei\\u2ffe\\u3005rnion\\xf3\\u06b0nt;\\u6a16st\\u0100;e\\u3010\\u3011\\u403f\\xf1\\u1f19\\xf4\\u0f14\\u0a80ABHabcdefhilmnoprstux\\u3040\\u3051\\u3055\\u3059\\u30e0\\u310e\\u312b\\u3147\\u3162\\u3172\\u318e\\u3206\\u3215\\u3224\\u3229\\u3258\\u326e\\u3272\\u3290\\u32b0\\u32b7\\u0180art\\u3047\\u304a\\u304cr\\xf2\\u10b3\\xf2\\u03ddail;\\u691car\\xf2\\u1c65ar;\\u6964\\u0380cdenqrt\\u3068\\u3075\\u3078\\u307f\\u308f\\u3094\\u30cc\\u0100eu\\u306d\\u3071;\\uc000\\u223d\\u0331te;\\u4155i\\xe3\\u116emptyv;\\u69b3g\\u0200;del\\u0fd1\\u3089\\u308b\\u308d;\\u6992;\\u69a5\\xe5\\u0fd1uo\\u803b\\xbb\\u40bbr\\u0580;abcfhlpstw\\u0fdc\\u30ac\\u30af\\u30b7\\u30b9\\u30bc\\u30be\\u30c0\\u30c3\\u30c7\\u30cap;\\u6975\\u0100;f\\u0fe0\\u30b4s;\\u6920;\\u6933s;\\u691e\\xeb\\u225d\\xf0\\u272el;\\u6945im;\\u6974l;\\u61a3;\\u619d\\u0100ai\\u30d1\\u30d5il;\\u691ao\\u0100;n\\u30db\\u30dc\\u6236al\\xf3\\u0f1e\\u0180abr\\u30e7\\u30ea\\u30eer\\xf2\\u17e5rk;\\u6773\\u0100ak\\u30f3\\u30fdc\\u0100ek\\u30f9\\u30fb;\\u407d;\\u405d\\u0100es\\u3102\\u3104;\\u698cl\\u0100du\\u310a\\u310c;\\u698e;\\u6990\\u0200aeuy\\u3117\\u311c\\u3127\\u3129ron;\\u4159\\u0100di\\u3121\\u3125il;\\u4157\\xec\\u0ff2\\xe2\\u30fa;\\u4440\\u0200clqs\\u3134\\u3137\\u313d\\u3144a;\\u6937dhar;\\u6969uo\\u0100;r\\u020e\\u020dh;\\u61b3\\u0180acg\\u314e\\u315f\\u0f44l\\u0200;ips\\u0f78\\u3158\\u315b\\u109cn\\xe5\\u10bbar\\xf4\\u0fa9t;\\u65ad\\u0180ilr\\u3169\\u1023\\u316esht;\\u697d;\\uc000\\ud835\\udd2f\\u0100ao\\u3177\\u3186r\\u0100du\\u317d\\u317f\\xbb\\u047b\\u0100;l\\u1091\\u3184;\\u696c\\u0100;v\\u318b\\u318c\\u43c1;\\u43f1\\u0180gns\\u3195\\u31f9\\u31fcht\\u0300ahlrst\\u31a4\\u31b0\\u31c2\\u31d8\\u31e4\\u31eerrow\\u0100;t\\u0fdc\\u31ada\\xe9\\u30c8arpoon\\u0100du\\u31bb\\u31bfow\\xee\\u317ep\\xbb\\u1092eft\\u0100ah\\u31ca\\u31d0rrow\\xf3\\u0feaarpoon\\xf3\\u0551ightarrows;\\u61c9quigarro\\xf7\\u30cbhreetimes;\\u62ccg;\\u42daingdotse\\xf1\\u1f32\\u0180ahm\\u320d\\u3210\\u3213r\\xf2\\u0feaa\\xf2\\u0551;\\u600foust\\u0100;a\\u321e\\u321f\\u63b1che\\xbb\\u321fmid;\\u6aee\\u0200abpt\\u3232\\u323d\\u3240\\u3252\\u0100nr\\u3237\\u323ag;\\u67edr;\\u61fer\\xeb\\u1003\\u0180afl\\u3247\\u324a\\u324er;\\u6986;\\uc000\\ud835\\udd63us;\\u6a2eimes;\\u6a35\\u0100ap\\u325d\\u3267r\\u0100;g\\u3263\\u3264\\u4029t;\\u6994olint;\\u6a12ar\\xf2\\u31e3\\u0200achq\\u327b\\u3280\\u10bc\\u3285quo;\\u603ar;\\uc000\\ud835\\udcc7\\u0100bu\\u30fb\\u328ao\\u0100;r\\u0214\\u0213\\u0180hir\\u3297\\u329b\\u32a0re\\xe5\\u31f8mes;\\u62cai\\u0200;efl\\u32aa\\u1059\\u1821\\u32ab\\u65b9tri;\\u69celuhar;\\u6968;\\u611e\\u0d61\\u32d5\\u32db\\u32df\\u332c\\u3338\\u3371\\0\\u337a\\u33a4\\0\\0\\u33ec\\u33f0\\0\\u3428\\u3448\\u345a\\u34ad\\u34b1\\u34ca\\u34f1\\0\\u3616\\0\\0\\u3633cute;\\u415bqu\\xef\\u27ba\\u0500;Eaceinpsy\\u11ed\\u32f3\\u32f5\\u32ff\\u3302\\u330b\\u330f\\u331f\\u3326\\u3329;\\u6ab4\\u01f0\\u32fa\\0\\u32fc;\\u6ab8on;\\u4161u\\xe5\\u11fe\\u0100;d\\u11f3\\u3307il;\\u415frc;\\u415d\\u0180Eas\\u3316\\u3318\\u331b;\\u6ab6p;\\u6abaim;\\u62e9olint;\\u6a13i\\xed\\u1204;\\u4441ot\\u0180;be\\u3334\\u1d47\\u3335\\u62c5;\\u6a66\\u0380Aacmstx\\u3346\\u334a\\u3357\\u335b\\u335e\\u3363\\u336drr;\\u61d8r\\u0100hr\\u3350\\u3352\\xeb\\u2228\\u0100;o\\u0a36\\u0a34t\\u803b\\xa7\\u40a7i;\\u403bwar;\\u6929m\\u0100in\\u3369\\xf0nu\\xf3\\xf1t;\\u6736r\\u0100;o\\u3376\\u2055\\uc000\\ud835\\udd30\\u0200acoy\\u3382\\u3386\\u3391\\u33a0rp;\\u666f\\u0100hy\\u338b\\u338fcy;\\u4449;\\u4448rt\\u026d\\u3399\\0\\0\\u339ci\\xe4\\u1464ara\\xec\\u2e6f\\u803b\\xad\\u40ad\\u0100gm\\u33a8\\u33b4ma\\u0180;fv\\u33b1\\u33b2\\u33b2\\u43c3;\\u43c2\\u0400;deglnpr\\u12ab\\u33c5\\u33c9\\u33ce\\u33d6\\u33de\\u33e1\\u33e6ot;\\u6a6a\\u0100;q\\u12b1\\u12b0\\u0100;E\\u33d3\\u33d4\\u6a9e;\\u6aa0\\u0100;E\\u33db\\u33dc\\u6a9d;\\u6a9fe;\\u6246lus;\\u6a24arr;\\u6972ar\\xf2\\u113d\\u0200aeit\\u33f8\\u3408\\u340f\\u3417\\u0100ls\\u33fd\\u3404lsetm\\xe9\\u336ahp;\\u6a33parsl;\\u69e4\\u0100dl\\u1463\\u3414e;\\u6323\\u0100;e\\u341c\\u341d\\u6aaa\\u0100;s\\u3422\\u3423\\u6aac;\\uc000\\u2aac\\ufe00\\u0180flp\\u342e\\u3433\\u3442tcy;\\u444c\\u0100;b\\u3438\\u3439\\u402f\\u0100;a\\u343e\\u343f\\u69c4r;\\u633ff;\\uc000\\ud835\\udd64a\\u0100dr\\u344d\\u0402es\\u0100;u\\u3454\\u3455\\u6660it\\xbb\\u3455\\u0180csu\\u3460\\u3479\\u349f\\u0100au\\u3465\\u346fp\\u0100;s\\u1188\\u346b;\\uc000\\u2293\\ufe00p\\u0100;s\\u11b4\\u3475;\\uc000\\u2294\\ufe00u\\u0100bp\\u347f\\u348f\\u0180;es\\u1197\\u119c\\u3486et\\u0100;e\\u1197\\u348d\\xf1\\u119d\\u0180;es\\u11a8\\u11ad\\u3496et\\u0100;e\\u11a8\\u349d\\xf1\\u11ae\\u0180;af\\u117b\\u34a6\\u05b0r\\u0165\\u34ab\\u05b1\\xbb\\u117car\\xf2\\u1148\\u0200cemt\\u34b9\\u34be\\u34c2\\u34c5r;\\uc000\\ud835\\udcc8tm\\xee\\xf1i\\xec\\u3415ar\\xe6\\u11be\\u0100ar\\u34ce\\u34d5r\\u0100;f\\u34d4\\u17bf\\u6606\\u0100an\\u34da\\u34edight\\u0100ep\\u34e3\\u34eapsilo\\xee\\u1ee0h\\xe9\\u2eafs\\xbb\\u2852\\u0280bcmnp\\u34fb\\u355e\\u1209\\u358b\\u358e\\u0480;Edemnprs\\u350e\\u350f\\u3511\\u3515\\u351e\\u3523\\u352c\\u3531\\u3536\\u6282;\\u6ac5ot;\\u6abd\\u0100;d\\u11da\\u351aot;\\u6ac3ult;\\u6ac1\\u0100Ee\\u3528\\u352a;\\u6acb;\\u628alus;\\u6abfarr;\\u6979\\u0180eiu\\u353d\\u3552\\u3555t\\u0180;en\\u350e\\u3545\\u354bq\\u0100;q\\u11da\\u350feq\\u0100;q\\u352b\\u3528m;\\u6ac7\\u0100bp\\u355a\\u355c;\\u6ad5;\\u6ad3c\\u0300;acens\\u11ed\\u356c\\u3572\\u3579\\u357b\\u3326ppro\\xf8\\u32faurlye\\xf1\\u11fe\\xf1\\u11f3\\u0180aes\\u3582\\u3588\\u331bppro\\xf8\\u331aq\\xf1\\u3317g;\\u666a\\u0680123;Edehlmnps\\u35a9\\u35ac\\u35af\\u121c\\u35b2\\u35b4\\u35c0\\u35c9\\u35d5\\u35da\\u35df\\u35e8\\u35ed\\u803b\\xb9\\u40b9\\u803b\\xb2\\u40b2\\u803b\\xb3\\u40b3;\\u6ac6\\u0100os\\u35b9\\u35bct;\\u6abeub;\\u6ad8\\u0100;d\\u1222\\u35c5ot;\\u6ac4s\\u0100ou\\u35cf\\u35d2l;\\u67c9b;\\u6ad7arr;\\u697bult;\\u6ac2\\u0100Ee\\u35e4\\u35e6;\\u6acc;\\u628blus;\\u6ac0\\u0180eiu\\u35f4\\u3609\\u360ct\\u0180;en\\u121c\\u35fc\\u3602q\\u0100;q\\u1222\\u35b2eq\\u0100;q\\u35e7\\u35e4m;\\u6ac8\\u0100bp\\u3611\\u3613;\\u6ad4;\\u6ad6\\u0180Aan\\u361c\\u3620\\u362drr;\\u61d9r\\u0100hr\\u3626\\u3628\\xeb\\u222e\\u0100;o\\u0a2b\\u0a29war;\\u692alig\\u803b\\xdf\\u40df\\u0be1\\u3651\\u365d\\u3660\\u12ce\\u3673\\u3679\\0\\u367e\\u36c2\\0\\0\\0\\0\\0\\u36db\\u3703\\0\\u3709\\u376c\\0\\0\\0\\u3787\\u0272\\u3656\\0\\0\\u365bget;\\u6316;\\u43c4r\\xeb\\u0e5f\\u0180aey\\u3666\\u366b\\u3670ron;\\u4165dil;\\u4163;\\u4442lrec;\\u6315r;\\uc000\\ud835\\udd31\\u0200eiko\\u3686\\u369d\\u36b5\\u36bc\\u01f2\\u368b\\0\\u3691e\\u01004f\\u1284\\u1281a\\u0180;sv\\u3698\\u3699\\u369b\\u43b8ym;\\u43d1\\u0100cn\\u36a2\\u36b2k\\u0100as\\u36a8\\u36aeppro\\xf8\\u12c1im\\xbb\\u12acs\\xf0\\u129e\\u0100as\\u36ba\\u36ae\\xf0\\u12c1rn\\u803b\\xfe\\u40fe\\u01ec\\u031f\\u36c6\\u22e7es\\u8180\\xd7;bd\\u36cf\\u36d0\\u36d8\\u40d7\\u0100;a\\u190f\\u36d5r;\\u6a31;\\u6a30\\u0180eps\\u36e1\\u36e3\\u3700\\xe1\\u2a4d\\u0200;bcf\\u0486\\u36ec\\u36f0\\u36f4ot;\\u6336ir;\\u6af1\\u0100;o\\u36f9\\u36fc\\uc000\\ud835\\udd65rk;\\u6ada\\xe1\\u3362rime;\\u6034\\u0180aip\\u370f\\u3712\\u3764d\\xe5\\u1248\\u0380adempst\\u3721\\u374d\\u3740\\u3751\\u3757\\u375c\\u375fngle\\u0280;dlqr\\u3730\\u3731\\u3736\\u3740\\u3742\\u65b5own\\xbb\\u1dbbeft\\u0100;e\\u2800\\u373e\\xf1\\u092e;\\u625cight\\u0100;e\\u32aa\\u374b\\xf1\\u105aot;\\u65ecinus;\\u6a3alus;\\u6a39b;\\u69cdime;\\u6a3bezium;\\u63e2\\u0180cht\\u3772\\u377d\\u3781\\u0100ry\\u3777\\u377b;\\uc000\\ud835\\udcc9;\\u4446cy;\\u445brok;\\u4167\\u0100io\\u378b\\u378ex\\xf4\\u1777head\\u0100lr\\u3797\\u37a0eftarro\\xf7\\u084fightarrow\\xbb\\u0f5d\\u0900AHabcdfghlmoprstuw\\u37d0\\u37d3\\u37d7\\u37e4\\u37f0\\u37fc\\u380e\\u381c\\u3823\\u3834\\u3851\\u385d\\u386b\\u38a9\\u38cc\\u38d2\\u38ea\\u38f6r\\xf2\\u03edar;\\u6963\\u0100cr\\u37dc\\u37e2ute\\u803b\\xfa\\u40fa\\xf2\\u1150r\\u01e3\\u37ea\\0\\u37edy;\\u445eve;\\u416d\\u0100iy\\u37f5\\u37farc\\u803b\\xfb\\u40fb;\\u4443\\u0180abh\\u3803\\u3806\\u380br\\xf2\\u13adlac;\\u4171a\\xf2\\u13c3\\u0100ir\\u3813\\u3818sht;\\u697e;\\uc000\\ud835\\udd32rave\\u803b\\xf9\\u40f9\\u0161\\u3827\\u3831r\\u0100lr\\u382c\\u382e\\xbb\\u0957\\xbb\\u1083lk;\\u6580\\u0100ct\\u3839\\u384d\\u026f\\u383f\\0\\0\\u384arn\\u0100;e\\u3845\\u3846\\u631cr\\xbb\\u3846op;\\u630fri;\\u65f8\\u0100al\\u3856\\u385acr;\\u416b\\u80bb\\xa8\\u0349\\u0100gp\\u3862\\u3866on;\\u4173f;\\uc000\\ud835\\udd66\\u0300adhlsu\\u114b\\u3878\\u387d\\u1372\\u3891\\u38a0own\\xe1\\u13b3arpoon\\u0100lr\\u3888\\u388cef\\xf4\\u382digh\\xf4\\u382fi\\u0180;hl\\u3899\\u389a\\u389c\\u43c5\\xbb\\u13faon\\xbb\\u389aparrows;\\u61c8\\u0180cit\\u38b0\\u38c4\\u38c8\\u026f\\u38b6\\0\\0\\u38c1rn\\u0100;e\\u38bc\\u38bd\\u631dr\\xbb\\u38bdop;\\u630eng;\\u416fri;\\u65f9cr;\\uc000\\ud835\\udcca\\u0180dir\\u38d9\\u38dd\\u38e2ot;\\u62f0lde;\\u4169i\\u0100;f\\u3730\\u38e8\\xbb\\u1813\\u0100am\\u38ef\\u38f2r\\xf2\\u38a8l\\u803b\\xfc\\u40fcangle;\\u69a7\\u0780ABDacdeflnoprsz\\u391c\\u391f\\u3929\\u392d\\u39b5\\u39b8\\u39bd\\u39df\\u39e4\\u39e8\\u39f3\\u39f9\\u39fd\\u3a01\\u3a20r\\xf2\\u03f7ar\\u0100;v\\u3926\\u3927\\u6ae8;\\u6ae9as\\xe8\\u03e1\\u0100nr\\u3932\\u3937grt;\\u699c\\u0380eknprst\\u34e3\\u3946\\u394b\\u3952\\u395d\\u3964\\u3996app\\xe1\\u2415othin\\xe7\\u1e96\\u0180hir\\u34eb\\u2ec8\\u3959op\\xf4\\u2fb5\\u0100;h\\u13b7\\u3962\\xef\\u318d\\u0100iu\\u3969\\u396dgm\\xe1\\u33b3\\u0100bp\\u3972\\u3984setneq\\u0100;q\\u397d\\u3980\\uc000\\u228a\\ufe00;\\uc000\\u2acb\\ufe00setneq\\u0100;q\\u398f\\u3992\\uc000\\u228b\\ufe00;\\uc000\\u2acc\\ufe00\\u0100hr\\u399b\\u399fet\\xe1\\u369ciangle\\u0100lr\\u39aa\\u39afeft\\xbb\\u0925ight\\xbb\\u1051y;\\u4432ash\\xbb\\u1036\\u0180elr\\u39c4\\u39d2\\u39d7\\u0180;be\\u2dea\\u39cb\\u39cfar;\\u62bbq;\\u625alip;\\u62ee\\u0100bt\\u39dc\\u1468a\\xf2\\u1469r;\\uc000\\ud835\\udd33tr\\xe9\\u39aesu\\u0100bp\\u39ef\\u39f1\\xbb\\u0d1c\\xbb\\u0d59pf;\\uc000\\ud835\\udd67ro\\xf0\\u0efbtr\\xe9\\u39b4\\u0100cu\\u3a06\\u3a0br;\\uc000\\ud835\\udccb\\u0100bp\\u3a10\\u3a18n\\u0100Ee\\u3980\\u3a16\\xbb\\u397en\\u0100Ee\\u3992\\u3a1e\\xbb\\u3990igzag;\\u699a\\u0380cefoprs\\u3a36\\u3a3b\\u3a56\\u3a5b\\u3a54\\u3a61\\u3a6airc;\\u4175\\u0100di\\u3a40\\u3a51\\u0100bg\\u3a45\\u3a49ar;\\u6a5fe\\u0100;q\\u15fa\\u3a4f;\\u6259erp;\\u6118r;\\uc000\\ud835\\udd34pf;\\uc000\\ud835\\udd68\\u0100;e\\u1479\\u3a66at\\xe8\\u1479cr;\\uc000\\ud835\\udccc\\u0ae3\\u178e\\u3a87\\0\\u3a8b\\0\\u3a90\\u3a9b\\0\\0\\u3a9d\\u3aa8\\u3aab\\u3aaf\\0\\0\\u3ac3\\u3ace\\0\\u3ad8\\u17dc\\u17dftr\\xe9\\u17d1r;\\uc000\\ud835\\udd35\\u0100Aa\\u3a94\\u3a97r\\xf2\\u03c3r\\xf2\\u09f6;\\u43be\\u0100Aa\\u3aa1\\u3aa4r\\xf2\\u03b8r\\xf2\\u09eba\\xf0\\u2713is;\\u62fb\\u0180dpt\\u17a4\\u3ab5\\u3abe\\u0100fl\\u3aba\\u17a9;\\uc000\\ud835\\udd69im\\xe5\\u17b2\\u0100Aa\\u3ac7\\u3acar\\xf2\\u03cer\\xf2\\u0a01\\u0100cq\\u3ad2\\u17b8r;\\uc000\\ud835\\udccd\\u0100pt\\u17d6\\u3adcr\\xe9\\u17d4\\u0400acefiosu\\u3af0\\u3afd\\u3b08\\u3b0c\\u3b11\\u3b15\\u3b1b\\u3b21c\\u0100uy\\u3af6\\u3afbte\\u803b\\xfd\\u40fd;\\u444f\\u0100iy\\u3b02\\u3b06rc;\\u4177;\\u444bn\\u803b\\xa5\\u40a5r;\\uc000\\ud835\\udd36cy;\\u4457pf;\\uc000\\ud835\\udd6acr;\\uc000\\ud835\\udcce\\u0100cm\\u3b26\\u3b29y;\\u444el\\u803b\\xff\\u40ff\\u0500acdefhiosw\\u3b42\\u3b48\\u3b54\\u3b58\\u3b64\\u3b69\\u3b6d\\u3b74\\u3b7a\\u3b80cute;\\u417a\\u0100ay\\u3b4d\\u3b52ron;\\u417e;\\u4437ot;\\u417c\\u0100et\\u3b5d\\u3b61tr\\xe6\\u155fa;\\u43b6r;\\uc000\\ud835\\udd37cy;\\u4436grarr;\\u61ddpf;\\uc000\\ud835\\udd6bcr;\\uc000\\ud835\\udccf\\u0100jn\\u3b85\\u3b87;\\u600dj;\\u600c\"\n .split(\"\")\n .map((c) => c.charCodeAt(0)));\n//# sourceMappingURL=decode-data-html.js.map","// Generated using scripts/write-decode-map.ts\nexport default new Uint16Array(\n// prettier-ignore\n\"\\u0200aglq\\t\\x15\\x18\\x1b\\u026d\\x0f\\0\\0\\x12p;\\u4026os;\\u4027t;\\u403et;\\u403cuot;\\u4022\"\n .split(\"\")\n .map((c) => c.charCodeAt(0)));\n//# sourceMappingURL=decode-data-xml.js.map","// Adapted from https://github.com/mathiasbynens/he/blob/36afe179392226cf1b6ccdb16ebbb7a5a844d93a/src/he.js#L106-L134\nvar _a;\nconst decodeMap = new Map([\n [0, 65533],\n // C1 Unicode control character reference replacements\n [128, 8364],\n [130, 8218],\n [131, 402],\n [132, 8222],\n [133, 8230],\n [134, 8224],\n [135, 8225],\n [136, 710],\n [137, 8240],\n [138, 352],\n [139, 8249],\n [140, 338],\n [142, 381],\n [145, 8216],\n [146, 8217],\n [147, 8220],\n [148, 8221],\n [149, 8226],\n [150, 8211],\n [151, 8212],\n [152, 732],\n [153, 8482],\n [154, 353],\n [155, 8250],\n [156, 339],\n [158, 382],\n [159, 376],\n]);\n/**\n * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point.\n */\nexport const fromCodePoint = \n// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins\n(_a = String.fromCodePoint) !== null && _a !== void 0 ? _a : function (codePoint) {\n let output = \"\";\n if (codePoint > 0xffff) {\n codePoint -= 0x10000;\n output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800);\n codePoint = 0xdc00 | (codePoint & 0x3ff);\n }\n output += String.fromCharCode(codePoint);\n return output;\n};\n/**\n * Replace the given code point with a replacement character if it is a\n * surrogate or is outside the valid range. Otherwise return the code\n * point unchanged.\n */\nexport function replaceCodePoint(codePoint) {\n var _a;\n if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) {\n return 0xfffd;\n }\n return (_a = decodeMap.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint;\n}\n/**\n * Replace the code point if relevant, then convert it to a string.\n *\n * @deprecated Use `fromCodePoint(replaceCodePoint(codePoint))` instead.\n * @param codePoint The code point to decode.\n * @returns The decoded code point.\n */\nexport default function decodeCodePoint(codePoint) {\n return fromCodePoint(replaceCodePoint(codePoint));\n}\n//# sourceMappingURL=decode_codepoint.js.map","import htmlDecodeTree from \"./generated/decode-data-html.js\";\nimport xmlDecodeTree from \"./generated/decode-data-xml.js\";\nimport decodeCodePoint, { replaceCodePoint, fromCodePoint, } from \"./decode_codepoint.js\";\n// Re-export for use by eg. htmlparser2\nexport { htmlDecodeTree, xmlDecodeTree, decodeCodePoint };\nexport { replaceCodePoint, fromCodePoint } from \"./decode_codepoint.js\";\nvar CharCodes;\n(function (CharCodes) {\n CharCodes[CharCodes[\"NUM\"] = 35] = \"NUM\";\n CharCodes[CharCodes[\"SEMI\"] = 59] = \"SEMI\";\n CharCodes[CharCodes[\"EQUALS\"] = 61] = \"EQUALS\";\n CharCodes[CharCodes[\"ZERO\"] = 48] = \"ZERO\";\n CharCodes[CharCodes[\"NINE\"] = 57] = \"NINE\";\n CharCodes[CharCodes[\"LOWER_A\"] = 97] = \"LOWER_A\";\n CharCodes[CharCodes[\"LOWER_F\"] = 102] = \"LOWER_F\";\n CharCodes[CharCodes[\"LOWER_X\"] = 120] = \"LOWER_X\";\n CharCodes[CharCodes[\"LOWER_Z\"] = 122] = \"LOWER_Z\";\n CharCodes[CharCodes[\"UPPER_A\"] = 65] = \"UPPER_A\";\n CharCodes[CharCodes[\"UPPER_F\"] = 70] = \"UPPER_F\";\n CharCodes[CharCodes[\"UPPER_Z\"] = 90] = \"UPPER_Z\";\n})(CharCodes || (CharCodes = {}));\n/** Bit that needs to be set to convert an upper case ASCII character to lower case */\nconst TO_LOWER_BIT = 0b100000;\nexport var BinTrieFlags;\n(function (BinTrieFlags) {\n BinTrieFlags[BinTrieFlags[\"VALUE_LENGTH\"] = 49152] = \"VALUE_LENGTH\";\n BinTrieFlags[BinTrieFlags[\"BRANCH_LENGTH\"] = 16256] = \"BRANCH_LENGTH\";\n BinTrieFlags[BinTrieFlags[\"JUMP_TABLE\"] = 127] = \"JUMP_TABLE\";\n})(BinTrieFlags || (BinTrieFlags = {}));\nfunction isNumber(code) {\n return code >= CharCodes.ZERO && code <= CharCodes.NINE;\n}\nfunction isHexadecimalCharacter(code) {\n return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F) ||\n (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F));\n}\nfunction isAsciiAlphaNumeric(code) {\n return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z) ||\n (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z) ||\n isNumber(code));\n}\n/**\n * Checks if the given character is a valid end character for an entity in an attribute.\n *\n * Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error.\n * See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state\n */\nfunction isEntityInAttributeInvalidEnd(code) {\n return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code);\n}\nvar EntityDecoderState;\n(function (EntityDecoderState) {\n EntityDecoderState[EntityDecoderState[\"EntityStart\"] = 0] = \"EntityStart\";\n EntityDecoderState[EntityDecoderState[\"NumericStart\"] = 1] = \"NumericStart\";\n EntityDecoderState[EntityDecoderState[\"NumericDecimal\"] = 2] = \"NumericDecimal\";\n EntityDecoderState[EntityDecoderState[\"NumericHex\"] = 3] = \"NumericHex\";\n EntityDecoderState[EntityDecoderState[\"NamedEntity\"] = 4] = \"NamedEntity\";\n})(EntityDecoderState || (EntityDecoderState = {}));\nexport var DecodingMode;\n(function (DecodingMode) {\n /** Entities in text nodes that can end with any character. */\n DecodingMode[DecodingMode[\"Legacy\"] = 0] = \"Legacy\";\n /** Only allow entities terminated with a semicolon. */\n DecodingMode[DecodingMode[\"Strict\"] = 1] = \"Strict\";\n /** Entities in attributes have limitations on ending characters. */\n DecodingMode[DecodingMode[\"Attribute\"] = 2] = \"Attribute\";\n})(DecodingMode || (DecodingMode = {}));\n/**\n * Token decoder with support of writing partial entities.\n */\nexport class EntityDecoder {\n constructor(\n /** The tree used to decode entities. */\n decodeTree, \n /**\n * The function that is called when a codepoint is decoded.\n *\n * For multi-byte named entities, this will be called multiple times,\n * with the second codepoint, and the same `consumed` value.\n *\n * @param codepoint The decoded codepoint.\n * @param consumed The number of bytes consumed by the decoder.\n */\n emitCodePoint, \n /** An object that is used to produce errors. */\n errors) {\n this.decodeTree = decodeTree;\n this.emitCodePoint = emitCodePoint;\n this.errors = errors;\n /** The current state of the decoder. */\n this.state = EntityDecoderState.EntityStart;\n /** Characters that were consumed while parsing an entity. */\n this.consumed = 1;\n /**\n * The result of the entity.\n *\n * Either the result index of a numeric entity, or the codepoint of a\n * numeric entity.\n */\n this.result = 0;\n /** The current index in the decode tree. */\n this.treeIndex = 0;\n /** The number of characters that were consumed in excess. */\n this.excess = 1;\n /** The mode in which the decoder is operating. */\n this.decodeMode = DecodingMode.Strict;\n }\n /** Resets the instance to make it reusable. */\n startEntity(decodeMode) {\n this.decodeMode = decodeMode;\n this.state = EntityDecoderState.EntityStart;\n this.result = 0;\n this.treeIndex = 0;\n this.excess = 1;\n this.consumed = 1;\n }\n /**\n * Write an entity to the decoder. This can be called multiple times with partial entities.\n * If the entity is incomplete, the decoder will return -1.\n *\n * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the\n * entity is incomplete, and resume when the next string is written.\n *\n * @param string The string containing the entity (or a continuation of the entity).\n * @param offset The offset at which the entity begins. Should be 0 if this is not the first call.\n * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n */\n write(str, offset) {\n switch (this.state) {\n case EntityDecoderState.EntityStart: {\n if (str.charCodeAt(offset) === CharCodes.NUM) {\n this.state = EntityDecoderState.NumericStart;\n this.consumed += 1;\n return this.stateNumericStart(str, offset + 1);\n }\n this.state = EntityDecoderState.NamedEntity;\n return this.stateNamedEntity(str, offset);\n }\n case EntityDecoderState.NumericStart: {\n return this.stateNumericStart(str, offset);\n }\n case EntityDecoderState.NumericDecimal: {\n return this.stateNumericDecimal(str, offset);\n }\n case EntityDecoderState.NumericHex: {\n return this.stateNumericHex(str, offset);\n }\n case EntityDecoderState.NamedEntity: {\n return this.stateNamedEntity(str, offset);\n }\n }\n }\n /**\n * Switches between the numeric decimal and hexadecimal states.\n *\n * Equivalent to the `Numeric character reference state` in the HTML spec.\n *\n * @param str The string containing the entity (or a continuation of the entity).\n * @param offset The current offset.\n * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n */\n stateNumericStart(str, offset) {\n if (offset >= str.length) {\n return -1;\n }\n if ((str.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) {\n this.state = EntityDecoderState.NumericHex;\n this.consumed += 1;\n return this.stateNumericHex(str, offset + 1);\n }\n this.state = EntityDecoderState.NumericDecimal;\n return this.stateNumericDecimal(str, offset);\n }\n addToNumericResult(str, start, end, base) {\n if (start !== end) {\n const digitCount = end - start;\n this.result =\n this.result * Math.pow(base, digitCount) +\n parseInt(str.substr(start, digitCount), base);\n this.consumed += digitCount;\n }\n }\n /**\n * Parses a hexadecimal numeric entity.\n *\n * Equivalent to the `Hexademical character reference state` in the HTML spec.\n *\n * @param str The string containing the entity (or a continuation of the entity).\n * @param offset The current offset.\n * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n */\n stateNumericHex(str, offset) {\n const startIdx = offset;\n while (offset < str.length) {\n const char = str.charCodeAt(offset);\n if (isNumber(char) || isHexadecimalCharacter(char)) {\n offset += 1;\n }\n else {\n this.addToNumericResult(str, startIdx, offset, 16);\n return this.emitNumericEntity(char, 3);\n }\n }\n this.addToNumericResult(str, startIdx, offset, 16);\n return -1;\n }\n /**\n * Parses a decimal numeric entity.\n *\n * Equivalent to the `Decimal character reference state` in the HTML spec.\n *\n * @param str The string containing the entity (or a continuation of the entity).\n * @param offset The current offset.\n * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n */\n stateNumericDecimal(str, offset) {\n const startIdx = offset;\n while (offset < str.length) {\n const char = str.charCodeAt(offset);\n if (isNumber(char)) {\n offset += 1;\n }\n else {\n this.addToNumericResult(str, startIdx, offset, 10);\n return this.emitNumericEntity(char, 2);\n }\n }\n this.addToNumericResult(str, startIdx, offset, 10);\n return -1;\n }\n /**\n * Validate and emit a numeric entity.\n *\n * Implements the logic from the `Hexademical character reference start\n * state` and `Numeric character reference end state` in the HTML spec.\n *\n * @param lastCp The last code point of the entity. Used to see if the\n * entity was terminated with a semicolon.\n * @param expectedLength The minimum number of characters that should be\n * consumed. Used to validate that at least one digit\n * was consumed.\n * @returns The number of characters that were consumed.\n */\n emitNumericEntity(lastCp, expectedLength) {\n var _a;\n // Ensure we consumed at least one digit.\n if (this.consumed <= expectedLength) {\n (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);\n return 0;\n }\n // Figure out if this is a legit end of the entity\n if (lastCp === CharCodes.SEMI) {\n this.consumed += 1;\n }\n else if (this.decodeMode === DecodingMode.Strict) {\n return 0;\n }\n this.emitCodePoint(replaceCodePoint(this.result), this.consumed);\n if (this.errors) {\n if (lastCp !== CharCodes.SEMI) {\n this.errors.missingSemicolonAfterCharacterReference();\n }\n this.errors.validateNumericCharacterReference(this.result);\n }\n return this.consumed;\n }\n /**\n * Parses a named entity.\n *\n * Equivalent to the `Named character reference state` in the HTML spec.\n *\n * @param str The string containing the entity (or a continuation of the entity).\n * @param offset The current offset.\n * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n */\n stateNamedEntity(str, offset) {\n const { decodeTree } = this;\n let current = decodeTree[this.treeIndex];\n // The mask is the number of bytes of the value, including the current byte.\n let valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;\n for (; offset < str.length; offset++, this.excess++) {\n const char = str.charCodeAt(offset);\n this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char);\n if (this.treeIndex < 0) {\n return this.result === 0 ||\n // If we are parsing an attribute\n (this.decodeMode === DecodingMode.Attribute &&\n // We shouldn't have consumed any characters after the entity,\n (valueLength === 0 ||\n // And there should be no invalid characters.\n isEntityInAttributeInvalidEnd(char)))\n ? 0\n : this.emitNotTerminatedNamedEntity();\n }\n current = decodeTree[this.treeIndex];\n valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;\n // If the branch is a value, store it and continue\n if (valueLength !== 0) {\n // If the entity is terminated by a semicolon, we are done.\n if (char === CharCodes.SEMI) {\n return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess);\n }\n // If we encounter a non-terminated (legacy) entity while parsing strictly, then ignore it.\n if (this.decodeMode !== DecodingMode.Strict) {\n this.result = this.treeIndex;\n this.consumed += this.excess;\n this.excess = 0;\n }\n }\n }\n return -1;\n }\n /**\n * Emit a named entity that was not terminated with a semicolon.\n *\n * @returns The number of characters consumed.\n */\n emitNotTerminatedNamedEntity() {\n var _a;\n const { result, decodeTree } = this;\n const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14;\n this.emitNamedEntityData(result, valueLength, this.consumed);\n (_a = this.errors) === null || _a === void 0 ? void 0 : _a.missingSemicolonAfterCharacterReference();\n return this.consumed;\n }\n /**\n * Emit a named entity.\n *\n * @param result The index of the entity in the decode tree.\n * @param valueLength The number of bytes in the entity.\n * @param consumed The number of characters consumed.\n *\n * @returns The number of characters consumed.\n */\n emitNamedEntityData(result, valueLength, consumed) {\n const { decodeTree } = this;\n this.emitCodePoint(valueLength === 1\n ? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH\n : decodeTree[result + 1], consumed);\n if (valueLength === 3) {\n // For multi-byte values, we need to emit the second byte.\n this.emitCodePoint(decodeTree[result + 2], consumed);\n }\n return consumed;\n }\n /**\n * Signal to the parser that the end of the input was reached.\n *\n * Remaining data will be emitted and relevant errors will be produced.\n *\n * @returns The number of characters consumed.\n */\n end() {\n var _a;\n switch (this.state) {\n case EntityDecoderState.NamedEntity: {\n // Emit a named entity if we have one.\n return this.result !== 0 &&\n (this.decodeMode !== DecodingMode.Attribute ||\n this.result === this.treeIndex)\n ? this.emitNotTerminatedNamedEntity()\n : 0;\n }\n // Otherwise, emit a numeric entity if we have one.\n case EntityDecoderState.NumericDecimal: {\n return this.emitNumericEntity(0, 2);\n }\n case EntityDecoderState.NumericHex: {\n return this.emitNumericEntity(0, 3);\n }\n case EntityDecoderState.NumericStart: {\n (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);\n return 0;\n }\n case EntityDecoderState.EntityStart: {\n // Return 0 if we have no entity.\n return 0;\n }\n }\n }\n}\n/**\n * Creates a function that decodes entities in a string.\n *\n * @param decodeTree The decode tree.\n * @returns A function that decodes entities in a string.\n */\nfunction getDecoder(decodeTree) {\n let ret = \"\";\n const decoder = new EntityDecoder(decodeTree, (str) => (ret += fromCodePoint(str)));\n return function decodeWithTrie(str, decodeMode) {\n let lastIndex = 0;\n let offset = 0;\n while ((offset = str.indexOf(\"&\", offset)) >= 0) {\n ret += str.slice(lastIndex, offset);\n decoder.startEntity(decodeMode);\n const len = decoder.write(str, \n // Skip the \"&\"\n offset + 1);\n if (len < 0) {\n lastIndex = offset + decoder.end();\n break;\n }\n lastIndex = offset + len;\n // If `len` is 0, skip the current `&` and continue.\n offset = len === 0 ? lastIndex + 1 : lastIndex;\n }\n const result = ret + str.slice(lastIndex);\n // Make sure we don't keep a reference to the final string.\n ret = \"\";\n return result;\n };\n}\n/**\n * Determines the branch of the current node that is taken given the current\n * character. This function is used to traverse the trie.\n *\n * @param decodeTree The trie.\n * @param current The current node.\n * @param nodeIdx The index right after the current node and its value.\n * @param char The current character.\n * @returns The index of the next node, or -1 if no branch is taken.\n */\nexport function determineBranch(decodeTree, current, nodeIdx, char) {\n const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;\n const jumpOffset = current & BinTrieFlags.JUMP_TABLE;\n // Case 1: Single branch encoded in jump offset\n if (branchCount === 0) {\n return jumpOffset !== 0 && char === jumpOffset ? nodeIdx : -1;\n }\n // Case 2: Multiple branches encoded in jump table\n if (jumpOffset) {\n const value = char - jumpOffset;\n return value < 0 || value >= branchCount\n ? -1\n : decodeTree[nodeIdx + value] - 1;\n }\n // Case 3: Multiple branches encoded in dictionary\n // Binary search for the character.\n let lo = nodeIdx;\n let hi = lo + branchCount - 1;\n while (lo <= hi) {\n const mid = (lo + hi) >>> 1;\n const midVal = decodeTree[mid];\n if (midVal < char) {\n lo = mid + 1;\n }\n else if (midVal > char) {\n hi = mid - 1;\n }\n else {\n return decodeTree[mid + branchCount];\n }\n }\n return -1;\n}\nconst htmlDecoder = getDecoder(htmlDecodeTree);\nconst xmlDecoder = getDecoder(xmlDecodeTree);\n/**\n * Decodes an HTML string.\n *\n * @param str The string to decode.\n * @param mode The decoding mode.\n * @returns The decoded string.\n */\nexport function decodeHTML(str, mode = DecodingMode.Legacy) {\n return htmlDecoder(str, mode);\n}\n/**\n * Decodes an HTML string in an attribute.\n *\n * @param str The string to decode.\n * @returns The decoded string.\n */\nexport function decodeHTMLAttribute(str) {\n return htmlDecoder(str, DecodingMode.Attribute);\n}\n/**\n * Decodes an HTML string, requiring all entities to be terminated by a semicolon.\n *\n * @param str The string to decode.\n * @returns The decoded string.\n */\nexport function decodeHTMLStrict(str) {\n return htmlDecoder(str, DecodingMode.Strict);\n}\n/**\n * Decodes an XML string, requiring all entities to be terminated by a semicolon.\n *\n * @param str The string to decode.\n * @returns The decoded string.\n */\nexport function decodeXML(str) {\n return xmlDecoder(str, DecodingMode.Strict);\n}\n//# sourceMappingURL=decode.js.map","export const xmlReplacer = /[\"&'<>$\\x80-\\uFFFF]/g;\nconst xmlCodeMap = new Map([\n [34, \""\"],\n [38, \"&\"],\n [39, \"'\"],\n [60, \"<\"],\n [62, \">\"],\n]);\n// For compatibility with node < 4, we wrap `codePointAt`\nexport const getCodePoint = \n// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\nString.prototype.codePointAt != null\n ? (str, index) => str.codePointAt(index)\n : // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n (c, index) => (c.charCodeAt(index) & 0xfc00) === 0xd800\n ? (c.charCodeAt(index) - 0xd800) * 0x400 +\n c.charCodeAt(index + 1) -\n 0xdc00 +\n 0x10000\n : c.charCodeAt(index);\n/**\n * Encodes all non-ASCII characters, as well as characters not valid in XML\n * documents using XML entities.\n *\n * If a character has no equivalent entity, a\n * numeric hexadecimal reference (eg. `ü`) will be used.\n */\nexport function encodeXML(str) {\n let ret = \"\";\n let lastIdx = 0;\n let match;\n while ((match = xmlReplacer.exec(str)) !== null) {\n const i = match.index;\n const char = str.charCodeAt(i);\n const next = xmlCodeMap.get(char);\n if (next !== undefined) {\n ret += str.substring(lastIdx, i) + next;\n lastIdx = i + 1;\n }\n else {\n ret += `${str.substring(lastIdx, i)}&#x${getCodePoint(str, i).toString(16)};`;\n // Increase by 1 if we have a surrogate pair\n lastIdx = xmlReplacer.lastIndex += Number((char & 0xfc00) === 0xd800);\n }\n }\n return ret + str.substr(lastIdx);\n}\n/**\n * Encodes all non-ASCII characters, as well as characters not valid in XML\n * documents using numeric hexadecimal reference (eg. `ü`).\n *\n * Have a look at `escapeUTF8` if you want a more concise output at the expense\n * of reduced transportability.\n *\n * @param data String to escape.\n */\nexport const escape = encodeXML;\n/**\n * Creates a function that escapes all characters matched by the given regular\n * expression using the given map of characters to escape to their entities.\n *\n * @param regex Regular expression to match characters to escape.\n * @param map Map of characters to escape to their entities.\n *\n * @returns Function that escapes all characters matched by the given regular\n * expression using the given map of characters to escape to their entities.\n */\nfunction getEscaper(regex, map) {\n return function escape(data) {\n let match;\n let lastIdx = 0;\n let result = \"\";\n while ((match = regex.exec(data))) {\n if (lastIdx !== match.index) {\n result += data.substring(lastIdx, match.index);\n }\n // We know that this character will be in the map.\n result += map.get(match[0].charCodeAt(0));\n // Every match will be of length 1\n lastIdx = match.index + 1;\n }\n return result + data.substring(lastIdx);\n };\n}\n/**\n * Encodes all characters not valid in XML documents using XML entities.\n *\n * Note that the output will be character-set dependent.\n *\n * @param data String to escape.\n */\nexport const escapeUTF8 = getEscaper(/[&<>'\"]/g, xmlCodeMap);\n/**\n * Encodes all characters that have to be escaped in HTML attributes,\n * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.\n *\n * @param data String to escape.\n */\nexport const escapeAttribute = getEscaper(/[\"&\\u00A0]/g, new Map([\n [34, \""\"],\n [38, \"&\"],\n [160, \" \"],\n]));\n/**\n * Encodes all characters that have to be escaped in HTML text,\n * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.\n *\n * @param data String to escape.\n */\nexport const escapeText = getEscaper(/[&<>\\u00A0]/g, new Map([\n [38, \"&\"],\n [60, \"<\"],\n [62, \">\"],\n [160, \" \"],\n]));\n//# sourceMappingURL=escape.js.map","const UNDEFINED_CODE_POINTS = new Set([\n 65534, 65535, 131070, 131071, 196606, 196607, 262142, 262143, 327678, 327679, 393214,\n 393215, 458750, 458751, 524286, 524287, 589822, 589823, 655358, 655359, 720894,\n 720895, 786430, 786431, 851966, 851967, 917502, 917503, 983038, 983039, 1048574,\n 1048575, 1114110, 1114111,\n]);\nexport const REPLACEMENT_CHARACTER = '\\uFFFD';\nexport var CODE_POINTS;\n(function (CODE_POINTS) {\n CODE_POINTS[CODE_POINTS[\"EOF\"] = -1] = \"EOF\";\n CODE_POINTS[CODE_POINTS[\"NULL\"] = 0] = \"NULL\";\n CODE_POINTS[CODE_POINTS[\"TABULATION\"] = 9] = \"TABULATION\";\n CODE_POINTS[CODE_POINTS[\"CARRIAGE_RETURN\"] = 13] = \"CARRIAGE_RETURN\";\n CODE_POINTS[CODE_POINTS[\"LINE_FEED\"] = 10] = \"LINE_FEED\";\n CODE_POINTS[CODE_POINTS[\"FORM_FEED\"] = 12] = \"FORM_FEED\";\n CODE_POINTS[CODE_POINTS[\"SPACE\"] = 32] = \"SPACE\";\n CODE_POINTS[CODE_POINTS[\"EXCLAMATION_MARK\"] = 33] = \"EXCLAMATION_MARK\";\n CODE_POINTS[CODE_POINTS[\"QUOTATION_MARK\"] = 34] = \"QUOTATION_MARK\";\n CODE_POINTS[CODE_POINTS[\"NUMBER_SIGN\"] = 35] = \"NUMBER_SIGN\";\n CODE_POINTS[CODE_POINTS[\"AMPERSAND\"] = 38] = \"AMPERSAND\";\n CODE_POINTS[CODE_POINTS[\"APOSTROPHE\"] = 39] = \"APOSTROPHE\";\n CODE_POINTS[CODE_POINTS[\"HYPHEN_MINUS\"] = 45] = \"HYPHEN_MINUS\";\n CODE_POINTS[CODE_POINTS[\"SOLIDUS\"] = 47] = \"SOLIDUS\";\n CODE_POINTS[CODE_POINTS[\"DIGIT_0\"] = 48] = \"DIGIT_0\";\n CODE_POINTS[CODE_POINTS[\"DIGIT_9\"] = 57] = \"DIGIT_9\";\n CODE_POINTS[CODE_POINTS[\"SEMICOLON\"] = 59] = \"SEMICOLON\";\n CODE_POINTS[CODE_POINTS[\"LESS_THAN_SIGN\"] = 60] = \"LESS_THAN_SIGN\";\n CODE_POINTS[CODE_POINTS[\"EQUALS_SIGN\"] = 61] = \"EQUALS_SIGN\";\n CODE_POINTS[CODE_POINTS[\"GREATER_THAN_SIGN\"] = 62] = \"GREATER_THAN_SIGN\";\n CODE_POINTS[CODE_POINTS[\"QUESTION_MARK\"] = 63] = \"QUESTION_MARK\";\n CODE_POINTS[CODE_POINTS[\"LATIN_CAPITAL_A\"] = 65] = \"LATIN_CAPITAL_A\";\n CODE_POINTS[CODE_POINTS[\"LATIN_CAPITAL_F\"] = 70] = \"LATIN_CAPITAL_F\";\n CODE_POINTS[CODE_POINTS[\"LATIN_CAPITAL_X\"] = 88] = \"LATIN_CAPITAL_X\";\n CODE_POINTS[CODE_POINTS[\"LATIN_CAPITAL_Z\"] = 90] = \"LATIN_CAPITAL_Z\";\n CODE_POINTS[CODE_POINTS[\"RIGHT_SQUARE_BRACKET\"] = 93] = \"RIGHT_SQUARE_BRACKET\";\n CODE_POINTS[CODE_POINTS[\"GRAVE_ACCENT\"] = 96] = \"GRAVE_ACCENT\";\n CODE_POINTS[CODE_POINTS[\"LATIN_SMALL_A\"] = 97] = \"LATIN_SMALL_A\";\n CODE_POINTS[CODE_POINTS[\"LATIN_SMALL_F\"] = 102] = \"LATIN_SMALL_F\";\n CODE_POINTS[CODE_POINTS[\"LATIN_SMALL_X\"] = 120] = \"LATIN_SMALL_X\";\n CODE_POINTS[CODE_POINTS[\"LATIN_SMALL_Z\"] = 122] = \"LATIN_SMALL_Z\";\n CODE_POINTS[CODE_POINTS[\"REPLACEMENT_CHARACTER\"] = 65533] = \"REPLACEMENT_CHARACTER\";\n})(CODE_POINTS = CODE_POINTS || (CODE_POINTS = {}));\nexport const SEQUENCES = {\n DASH_DASH: '--',\n CDATA_START: '[CDATA[',\n DOCTYPE: 'doctype',\n SCRIPT: 'script',\n PUBLIC: 'public',\n SYSTEM: 'system',\n};\n//Surrogates\nexport function isSurrogate(cp) {\n return cp >= 55296 && cp <= 57343;\n}\nexport function isSurrogatePair(cp) {\n return cp >= 56320 && cp <= 57343;\n}\nexport function getSurrogatePairCodePoint(cp1, cp2) {\n return (cp1 - 55296) * 1024 + 9216 + cp2;\n}\n//NOTE: excluding NULL and ASCII whitespace\nexport function isControlCodePoint(cp) {\n return ((cp !== 0x20 && cp !== 0x0a && cp !== 0x0d && cp !== 0x09 && cp !== 0x0c && cp >= 0x01 && cp <= 0x1f) ||\n (cp >= 0x7f && cp <= 0x9f));\n}\nexport function isUndefinedCodePoint(cp) {\n return (cp >= 64976 && cp <= 65007) || UNDEFINED_CODE_POINTS.has(cp);\n}\n//# sourceMappingURL=unicode.js.map","export var ERR;\n(function (ERR) {\n ERR[\"controlCharacterInInputStream\"] = \"control-character-in-input-stream\";\n ERR[\"noncharacterInInputStream\"] = \"noncharacter-in-input-stream\";\n ERR[\"surrogateInInputStream\"] = \"surrogate-in-input-stream\";\n ERR[\"nonVoidHtmlElementStartTagWithTrailingSolidus\"] = \"non-void-html-element-start-tag-with-trailing-solidus\";\n ERR[\"endTagWithAttributes\"] = \"end-tag-with-attributes\";\n ERR[\"endTagWithTrailingSolidus\"] = \"end-tag-with-trailing-solidus\";\n ERR[\"unexpectedSolidusInTag\"] = \"unexpected-solidus-in-tag\";\n ERR[\"unexpectedNullCharacter\"] = \"unexpected-null-character\";\n ERR[\"unexpectedQuestionMarkInsteadOfTagName\"] = \"unexpected-question-mark-instead-of-tag-name\";\n ERR[\"invalidFirstCharacterOfTagName\"] = \"invalid-first-character-of-tag-name\";\n ERR[\"unexpectedEqualsSignBeforeAttributeName\"] = \"unexpected-equals-sign-before-attribute-name\";\n ERR[\"missingEndTagName\"] = \"missing-end-tag-name\";\n ERR[\"unexpectedCharacterInAttributeName\"] = \"unexpected-character-in-attribute-name\";\n ERR[\"unknownNamedCharacterReference\"] = \"unknown-named-character-reference\";\n ERR[\"missingSemicolonAfterCharacterReference\"] = \"missing-semicolon-after-character-reference\";\n ERR[\"unexpectedCharacterAfterDoctypeSystemIdentifier\"] = \"unexpected-character-after-doctype-system-identifier\";\n ERR[\"unexpectedCharacterInUnquotedAttributeValue\"] = \"unexpected-character-in-unquoted-attribute-value\";\n ERR[\"eofBeforeTagName\"] = \"eof-before-tag-name\";\n ERR[\"eofInTag\"] = \"eof-in-tag\";\n ERR[\"missingAttributeValue\"] = \"missing-attribute-value\";\n ERR[\"missingWhitespaceBetweenAttributes\"] = \"missing-whitespace-between-attributes\";\n ERR[\"missingWhitespaceAfterDoctypePublicKeyword\"] = \"missing-whitespace-after-doctype-public-keyword\";\n ERR[\"missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers\"] = \"missing-whitespace-between-doctype-public-and-system-identifiers\";\n ERR[\"missingWhitespaceAfterDoctypeSystemKeyword\"] = \"missing-whitespace-after-doctype-system-keyword\";\n ERR[\"missingQuoteBeforeDoctypePublicIdentifier\"] = \"missing-quote-before-doctype-public-identifier\";\n ERR[\"missingQuoteBeforeDoctypeSystemIdentifier\"] = \"missing-quote-before-doctype-system-identifier\";\n ERR[\"missingDoctypePublicIdentifier\"] = \"missing-doctype-public-identifier\";\n ERR[\"missingDoctypeSystemIdentifier\"] = \"missing-doctype-system-identifier\";\n ERR[\"abruptDoctypePublicIdentifier\"] = \"abrupt-doctype-public-identifier\";\n ERR[\"abruptDoctypeSystemIdentifier\"] = \"abrupt-doctype-system-identifier\";\n ERR[\"cdataInHtmlContent\"] = \"cdata-in-html-content\";\n ERR[\"incorrectlyOpenedComment\"] = \"incorrectly-opened-comment\";\n ERR[\"eofInScriptHtmlCommentLikeText\"] = \"eof-in-script-html-comment-like-text\";\n ERR[\"eofInDoctype\"] = \"eof-in-doctype\";\n ERR[\"nestedComment\"] = \"nested-comment\";\n ERR[\"abruptClosingOfEmptyComment\"] = \"abrupt-closing-of-empty-comment\";\n ERR[\"eofInComment\"] = \"eof-in-comment\";\n ERR[\"incorrectlyClosedComment\"] = \"incorrectly-closed-comment\";\n ERR[\"eofInCdata\"] = \"eof-in-cdata\";\n ERR[\"absenceOfDigitsInNumericCharacterReference\"] = \"absence-of-digits-in-numeric-character-reference\";\n ERR[\"nullCharacterReference\"] = \"null-character-reference\";\n ERR[\"surrogateCharacterReference\"] = \"surrogate-character-reference\";\n ERR[\"characterReferenceOutsideUnicodeRange\"] = \"character-reference-outside-unicode-range\";\n ERR[\"controlCharacterReference\"] = \"control-character-reference\";\n ERR[\"noncharacterCharacterReference\"] = \"noncharacter-character-reference\";\n ERR[\"missingWhitespaceBeforeDoctypeName\"] = \"missing-whitespace-before-doctype-name\";\n ERR[\"missingDoctypeName\"] = \"missing-doctype-name\";\n ERR[\"invalidCharacterSequenceAfterDoctypeName\"] = \"invalid-character-sequence-after-doctype-name\";\n ERR[\"duplicateAttribute\"] = \"duplicate-attribute\";\n ERR[\"nonConformingDoctype\"] = \"non-conforming-doctype\";\n ERR[\"missingDoctype\"] = \"missing-doctype\";\n ERR[\"misplacedDoctype\"] = \"misplaced-doctype\";\n ERR[\"endTagWithoutMatchingOpenElement\"] = \"end-tag-without-matching-open-element\";\n ERR[\"closingOfElementWithOpenChildElements\"] = \"closing-of-element-with-open-child-elements\";\n ERR[\"disallowedContentInNoscriptInHead\"] = \"disallowed-content-in-noscript-in-head\";\n ERR[\"openElementsLeftAfterEof\"] = \"open-elements-left-after-eof\";\n ERR[\"abandonedHeadElementChild\"] = \"abandoned-head-element-child\";\n ERR[\"misplacedStartTagForHeadElement\"] = \"misplaced-start-tag-for-head-element\";\n ERR[\"nestedNoscriptInHead\"] = \"nested-noscript-in-head\";\n ERR[\"eofInElementThatCanContainOnlyText\"] = \"eof-in-element-that-can-contain-only-text\";\n})(ERR = ERR || (ERR = {}));\n//# sourceMappingURL=error-codes.js.map","import { CODE_POINTS as $, getSurrogatePairCodePoint, isControlCodePoint, isSurrogate, isSurrogatePair, isUndefinedCodePoint, } from '../common/unicode.js';\nimport { ERR } from '../common/error-codes.js';\n//Const\nconst DEFAULT_BUFFER_WATERLINE = 1 << 16;\n//Preprocessor\n//NOTE: HTML input preprocessing\n//(see: http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#preprocessing-the-input-stream)\nexport class Preprocessor {\n constructor(handler) {\n this.handler = handler;\n this.html = '';\n this.pos = -1;\n // NOTE: Initial `lastGapPos` is -2, to ensure `col` on initialisation is 0\n this.lastGapPos = -2;\n this.gapStack = [];\n this.skipNextNewLine = false;\n this.lastChunkWritten = false;\n this.endOfChunkHit = false;\n this.bufferWaterline = DEFAULT_BUFFER_WATERLINE;\n this.isEol = false;\n this.lineStartPos = 0;\n this.droppedBufferSize = 0;\n this.line = 1;\n //NOTE: avoid reporting errors twice on advance/retreat\n this.lastErrOffset = -1;\n }\n /** The column on the current line. If we just saw a gap (eg. a surrogate pair), return the index before. */\n get col() {\n return this.pos - this.lineStartPos + Number(this.lastGapPos !== this.pos);\n }\n get offset() {\n return this.droppedBufferSize + this.pos;\n }\n getError(code) {\n const { line, col, offset } = this;\n return {\n code,\n startLine: line,\n endLine: line,\n startCol: col,\n endCol: col,\n startOffset: offset,\n endOffset: offset,\n };\n }\n _err(code) {\n if (this.handler.onParseError && this.lastErrOffset !== this.offset) {\n this.lastErrOffset = this.offset;\n this.handler.onParseError(this.getError(code));\n }\n }\n _addGap() {\n this.gapStack.push(this.lastGapPos);\n this.lastGapPos = this.pos;\n }\n _processSurrogate(cp) {\n //NOTE: try to peek a surrogate pair\n if (this.pos !== this.html.length - 1) {\n const nextCp = this.html.charCodeAt(this.pos + 1);\n if (isSurrogatePair(nextCp)) {\n //NOTE: we have a surrogate pair. Peek pair character and recalculate code point.\n this.pos++;\n //NOTE: add a gap that should be avoided during retreat\n this._addGap();\n return getSurrogatePairCodePoint(cp, nextCp);\n }\n }\n //NOTE: we are at the end of a chunk, therefore we can't infer the surrogate pair yet.\n else if (!this.lastChunkWritten) {\n this.endOfChunkHit = true;\n return $.EOF;\n }\n //NOTE: isolated surrogate\n this._err(ERR.surrogateInInputStream);\n return cp;\n }\n willDropParsedChunk() {\n return this.pos > this.bufferWaterline;\n }\n dropParsedChunk() {\n if (this.willDropParsedChunk()) {\n this.html = this.html.substring(this.pos);\n this.lineStartPos -= this.pos;\n this.droppedBufferSize += this.pos;\n this.pos = 0;\n this.lastGapPos = -2;\n this.gapStack.length = 0;\n }\n }\n write(chunk, isLastChunk) {\n if (this.html.length > 0) {\n this.html += chunk;\n }\n else {\n this.html = chunk;\n }\n this.endOfChunkHit = false;\n this.lastChunkWritten = isLastChunk;\n }\n insertHtmlAtCurrentPos(chunk) {\n this.html = this.html.substring(0, this.pos + 1) + chunk + this.html.substring(this.pos + 1);\n this.endOfChunkHit = false;\n }\n startsWith(pattern, caseSensitive) {\n // Check if our buffer has enough characters\n if (this.pos + pattern.length > this.html.length) {\n this.endOfChunkHit = !this.lastChunkWritten;\n return false;\n }\n if (caseSensitive) {\n return this.html.startsWith(pattern, this.pos);\n }\n for (let i = 0; i < pattern.length; i++) {\n const cp = this.html.charCodeAt(this.pos + i) | 0x20;\n if (cp !== pattern.charCodeAt(i)) {\n return false;\n }\n }\n return true;\n }\n peek(offset) {\n const pos = this.pos + offset;\n if (pos >= this.html.length) {\n this.endOfChunkHit = !this.lastChunkWritten;\n return $.EOF;\n }\n const code = this.html.charCodeAt(pos);\n return code === $.CARRIAGE_RETURN ? $.LINE_FEED : code;\n }\n advance() {\n this.pos++;\n //NOTE: LF should be in the last column of the line\n if (this.isEol) {\n this.isEol = false;\n this.line++;\n this.lineStartPos = this.pos;\n }\n if (this.pos >= this.html.length) {\n this.endOfChunkHit = !this.lastChunkWritten;\n return $.EOF;\n }\n let cp = this.html.charCodeAt(this.pos);\n //NOTE: all U+000D CARRIAGE RETURN (CR) characters must be converted to U+000A LINE FEED (LF) characters\n if (cp === $.CARRIAGE_RETURN) {\n this.isEol = true;\n this.skipNextNewLine = true;\n return $.LINE_FEED;\n }\n //NOTE: any U+000A LINE FEED (LF) characters that immediately follow a U+000D CARRIAGE RETURN (CR) character\n //must be ignored.\n if (cp === $.LINE_FEED) {\n this.isEol = true;\n if (this.skipNextNewLine) {\n // `line` will be bumped again in the recursive call.\n this.line--;\n this.skipNextNewLine = false;\n this._addGap();\n return this.advance();\n }\n }\n this.skipNextNewLine = false;\n if (isSurrogate(cp)) {\n cp = this._processSurrogate(cp);\n }\n //OPTIMIZATION: first check if code point is in the common allowed\n //range (ASCII alphanumeric, whitespaces, big chunk of BMP)\n //before going into detailed performance cost validation.\n const isCommonValidRange = this.handler.onParseError === null ||\n (cp > 0x1f && cp < 0x7f) ||\n cp === $.LINE_FEED ||\n cp === $.CARRIAGE_RETURN ||\n (cp > 0x9f && cp < 64976);\n if (!isCommonValidRange) {\n this._checkForProblematicCharacters(cp);\n }\n return cp;\n }\n _checkForProblematicCharacters(cp) {\n if (isControlCodePoint(cp)) {\n this._err(ERR.controlCharacterInInputStream);\n }\n else if (isUndefinedCodePoint(cp)) {\n this._err(ERR.noncharacterInInputStream);\n }\n }\n retreat(count) {\n this.pos -= count;\n while (this.pos < this.lastGapPos) {\n this.lastGapPos = this.gapStack.pop();\n this.pos--;\n }\n this.isEol = false;\n }\n}\n//# sourceMappingURL=preprocessor.js.map","export var TokenType;\n(function (TokenType) {\n TokenType[TokenType[\"CHARACTER\"] = 0] = \"CHARACTER\";\n TokenType[TokenType[\"NULL_CHARACTER\"] = 1] = \"NULL_CHARACTER\";\n TokenType[TokenType[\"WHITESPACE_CHARACTER\"] = 2] = \"WHITESPACE_CHARACTER\";\n TokenType[TokenType[\"START_TAG\"] = 3] = \"START_TAG\";\n TokenType[TokenType[\"END_TAG\"] = 4] = \"END_TAG\";\n TokenType[TokenType[\"COMMENT\"] = 5] = \"COMMENT\";\n TokenType[TokenType[\"DOCTYPE\"] = 6] = \"DOCTYPE\";\n TokenType[TokenType[\"EOF\"] = 7] = \"EOF\";\n TokenType[TokenType[\"HIBERNATION\"] = 8] = \"HIBERNATION\";\n})(TokenType = TokenType || (TokenType = {}));\nexport function getTokenAttr(token, attrName) {\n for (let i = token.attrs.length - 1; i >= 0; i--) {\n if (token.attrs[i].name === attrName) {\n return token.attrs[i].value;\n }\n }\n return null;\n}\n//# sourceMappingURL=token.js.map","/** All valid namespaces in HTML. */\nexport var NS;\n(function (NS) {\n NS[\"HTML\"] = \"http://www.w3.org/1999/xhtml\";\n NS[\"MATHML\"] = \"http://www.w3.org/1998/Math/MathML\";\n NS[\"SVG\"] = \"http://www.w3.org/2000/svg\";\n NS[\"XLINK\"] = \"http://www.w3.org/1999/xlink\";\n NS[\"XML\"] = \"http://www.w3.org/XML/1998/namespace\";\n NS[\"XMLNS\"] = \"http://www.w3.org/2000/xmlns/\";\n})(NS = NS || (NS = {}));\nexport var ATTRS;\n(function (ATTRS) {\n ATTRS[\"TYPE\"] = \"type\";\n ATTRS[\"ACTION\"] = \"action\";\n ATTRS[\"ENCODING\"] = \"encoding\";\n ATTRS[\"PROMPT\"] = \"prompt\";\n ATTRS[\"NAME\"] = \"name\";\n ATTRS[\"COLOR\"] = \"color\";\n ATTRS[\"FACE\"] = \"face\";\n ATTRS[\"SIZE\"] = \"size\";\n})(ATTRS = ATTRS || (ATTRS = {}));\n/**\n * The mode of the document.\n *\n * @see {@link https://dom.spec.whatwg.org/#concept-document-limited-quirks}\n */\nexport var DOCUMENT_MODE;\n(function (DOCUMENT_MODE) {\n DOCUMENT_MODE[\"NO_QUIRKS\"] = \"no-quirks\";\n DOCUMENT_MODE[\"QUIRKS\"] = \"quirks\";\n DOCUMENT_MODE[\"LIMITED_QUIRKS\"] = \"limited-quirks\";\n})(DOCUMENT_MODE = DOCUMENT_MODE || (DOCUMENT_MODE = {}));\nexport var TAG_NAMES;\n(function (TAG_NAMES) {\n TAG_NAMES[\"A\"] = \"a\";\n TAG_NAMES[\"ADDRESS\"] = \"address\";\n TAG_NAMES[\"ANNOTATION_XML\"] = \"annotation-xml\";\n TAG_NAMES[\"APPLET\"] = \"applet\";\n TAG_NAMES[\"AREA\"] = \"area\";\n TAG_NAMES[\"ARTICLE\"] = \"article\";\n TAG_NAMES[\"ASIDE\"] = \"aside\";\n TAG_NAMES[\"B\"] = \"b\";\n TAG_NAMES[\"BASE\"] = \"base\";\n TAG_NAMES[\"BASEFONT\"] = \"basefont\";\n TAG_NAMES[\"BGSOUND\"] = \"bgsound\";\n TAG_NAMES[\"BIG\"] = \"big\";\n TAG_NAMES[\"BLOCKQUOTE\"] = \"blockquote\";\n TAG_NAMES[\"BODY\"] = \"body\";\n TAG_NAMES[\"BR\"] = \"br\";\n TAG_NAMES[\"BUTTON\"] = \"button\";\n TAG_NAMES[\"CAPTION\"] = \"caption\";\n TAG_NAMES[\"CENTER\"] = \"center\";\n TAG_NAMES[\"CODE\"] = \"code\";\n TAG_NAMES[\"COL\"] = \"col\";\n TAG_NAMES[\"COLGROUP\"] = \"colgroup\";\n TAG_NAMES[\"DD\"] = \"dd\";\n TAG_NAMES[\"DESC\"] = \"desc\";\n TAG_NAMES[\"DETAILS\"] = \"details\";\n TAG_NAMES[\"DIALOG\"] = \"dialog\";\n TAG_NAMES[\"DIR\"] = \"dir\";\n TAG_NAMES[\"DIV\"] = \"div\";\n TAG_NAMES[\"DL\"] = \"dl\";\n TAG_NAMES[\"DT\"] = \"dt\";\n TAG_NAMES[\"EM\"] = \"em\";\n TAG_NAMES[\"EMBED\"] = \"embed\";\n TAG_NAMES[\"FIELDSET\"] = \"fieldset\";\n TAG_NAMES[\"FIGCAPTION\"] = \"figcaption\";\n TAG_NAMES[\"FIGURE\"] = \"figure\";\n TAG_NAMES[\"FONT\"] = \"font\";\n TAG_NAMES[\"FOOTER\"] = \"footer\";\n TAG_NAMES[\"FOREIGN_OBJECT\"] = \"foreignObject\";\n TAG_NAMES[\"FORM\"] = \"form\";\n TAG_NAMES[\"FRAME\"] = \"frame\";\n TAG_NAMES[\"FRAMESET\"] = \"frameset\";\n TAG_NAMES[\"H1\"] = \"h1\";\n TAG_NAMES[\"H2\"] = \"h2\";\n TAG_NAMES[\"H3\"] = \"h3\";\n TAG_NAMES[\"H4\"] = \"h4\";\n TAG_NAMES[\"H5\"] = \"h5\";\n TAG_NAMES[\"H6\"] = \"h6\";\n TAG_NAMES[\"HEAD\"] = \"head\";\n TAG_NAMES[\"HEADER\"] = \"header\";\n TAG_NAMES[\"HGROUP\"] = \"hgroup\";\n TAG_NAMES[\"HR\"] = \"hr\";\n TAG_NAMES[\"HTML\"] = \"html\";\n TAG_NAMES[\"I\"] = \"i\";\n TAG_NAMES[\"IMG\"] = \"img\";\n TAG_NAMES[\"IMAGE\"] = \"image\";\n TAG_NAMES[\"INPUT\"] = \"input\";\n TAG_NAMES[\"IFRAME\"] = \"iframe\";\n TAG_NAMES[\"KEYGEN\"] = \"keygen\";\n TAG_NAMES[\"LABEL\"] = \"label\";\n TAG_NAMES[\"LI\"] = \"li\";\n TAG_NAMES[\"LINK\"] = \"link\";\n TAG_NAMES[\"LISTING\"] = \"listing\";\n TAG_NAMES[\"MAIN\"] = \"main\";\n TAG_NAMES[\"MALIGNMARK\"] = \"malignmark\";\n TAG_NAMES[\"MARQUEE\"] = \"marquee\";\n TAG_NAMES[\"MATH\"] = \"math\";\n TAG_NAMES[\"MENU\"] = \"menu\";\n TAG_NAMES[\"META\"] = \"meta\";\n TAG_NAMES[\"MGLYPH\"] = \"mglyph\";\n TAG_NAMES[\"MI\"] = \"mi\";\n TAG_NAMES[\"MO\"] = \"mo\";\n TAG_NAMES[\"MN\"] = \"mn\";\n TAG_NAMES[\"MS\"] = \"ms\";\n TAG_NAMES[\"MTEXT\"] = \"mtext\";\n TAG_NAMES[\"NAV\"] = \"nav\";\n TAG_NAMES[\"NOBR\"] = \"nobr\";\n TAG_NAMES[\"NOFRAMES\"] = \"noframes\";\n TAG_NAMES[\"NOEMBED\"] = \"noembed\";\n TAG_NAMES[\"NOSCRIPT\"] = \"noscript\";\n TAG_NAMES[\"OBJECT\"] = \"object\";\n TAG_NAMES[\"OL\"] = \"ol\";\n TAG_NAMES[\"OPTGROUP\"] = \"optgroup\";\n TAG_NAMES[\"OPTION\"] = \"option\";\n TAG_NAMES[\"P\"] = \"p\";\n TAG_NAMES[\"PARAM\"] = \"param\";\n TAG_NAMES[\"PLAINTEXT\"] = \"plaintext\";\n TAG_NAMES[\"PRE\"] = \"pre\";\n TAG_NAMES[\"RB\"] = \"rb\";\n TAG_NAMES[\"RP\"] = \"rp\";\n TAG_NAMES[\"RT\"] = \"rt\";\n TAG_NAMES[\"RTC\"] = \"rtc\";\n TAG_NAMES[\"RUBY\"] = \"ruby\";\n TAG_NAMES[\"S\"] = \"s\";\n TAG_NAMES[\"SCRIPT\"] = \"script\";\n TAG_NAMES[\"SECTION\"] = \"section\";\n TAG_NAMES[\"SELECT\"] = \"select\";\n TAG_NAMES[\"SOURCE\"] = \"source\";\n TAG_NAMES[\"SMALL\"] = \"small\";\n TAG_NAMES[\"SPAN\"] = \"span\";\n TAG_NAMES[\"STRIKE\"] = \"strike\";\n TAG_NAMES[\"STRONG\"] = \"strong\";\n TAG_NAMES[\"STYLE\"] = \"style\";\n TAG_NAMES[\"SUB\"] = \"sub\";\n TAG_NAMES[\"SUMMARY\"] = \"summary\";\n TAG_NAMES[\"SUP\"] = \"sup\";\n TAG_NAMES[\"TABLE\"] = \"table\";\n TAG_NAMES[\"TBODY\"] = \"tbody\";\n TAG_NAMES[\"TEMPLATE\"] = \"template\";\n TAG_NAMES[\"TEXTAREA\"] = \"textarea\";\n TAG_NAMES[\"TFOOT\"] = \"tfoot\";\n TAG_NAMES[\"TD\"] = \"td\";\n TAG_NAMES[\"TH\"] = \"th\";\n TAG_NAMES[\"THEAD\"] = \"thead\";\n TAG_NAMES[\"TITLE\"] = \"title\";\n TAG_NAMES[\"TR\"] = \"tr\";\n TAG_NAMES[\"TRACK\"] = \"track\";\n TAG_NAMES[\"TT\"] = \"tt\";\n TAG_NAMES[\"U\"] = \"u\";\n TAG_NAMES[\"UL\"] = \"ul\";\n TAG_NAMES[\"SVG\"] = \"svg\";\n TAG_NAMES[\"VAR\"] = \"var\";\n TAG_NAMES[\"WBR\"] = \"wbr\";\n TAG_NAMES[\"XMP\"] = \"xmp\";\n})(TAG_NAMES = TAG_NAMES || (TAG_NAMES = {}));\n/**\n * Tag IDs are numeric IDs for known tag names.\n *\n * We use tag IDs to improve the performance of tag name comparisons.\n */\nexport var TAG_ID;\n(function (TAG_ID) {\n TAG_ID[TAG_ID[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n TAG_ID[TAG_ID[\"A\"] = 1] = \"A\";\n TAG_ID[TAG_ID[\"ADDRESS\"] = 2] = \"ADDRESS\";\n TAG_ID[TAG_ID[\"ANNOTATION_XML\"] = 3] = \"ANNOTATION_XML\";\n TAG_ID[TAG_ID[\"APPLET\"] = 4] = \"APPLET\";\n TAG_ID[TAG_ID[\"AREA\"] = 5] = \"AREA\";\n TAG_ID[TAG_ID[\"ARTICLE\"] = 6] = \"ARTICLE\";\n TAG_ID[TAG_ID[\"ASIDE\"] = 7] = \"ASIDE\";\n TAG_ID[TAG_ID[\"B\"] = 8] = \"B\";\n TAG_ID[TAG_ID[\"BASE\"] = 9] = \"BASE\";\n TAG_ID[TAG_ID[\"BASEFONT\"] = 10] = \"BASEFONT\";\n TAG_ID[TAG_ID[\"BGSOUND\"] = 11] = \"BGSOUND\";\n TAG_ID[TAG_ID[\"BIG\"] = 12] = \"BIG\";\n TAG_ID[TAG_ID[\"BLOCKQUOTE\"] = 13] = \"BLOCKQUOTE\";\n TAG_ID[TAG_ID[\"BODY\"] = 14] = \"BODY\";\n TAG_ID[TAG_ID[\"BR\"] = 15] = \"BR\";\n TAG_ID[TAG_ID[\"BUTTON\"] = 16] = \"BUTTON\";\n TAG_ID[TAG_ID[\"CAPTION\"] = 17] = \"CAPTION\";\n TAG_ID[TAG_ID[\"CENTER\"] = 18] = \"CENTER\";\n TAG_ID[TAG_ID[\"CODE\"] = 19] = \"CODE\";\n TAG_ID[TAG_ID[\"COL\"] = 20] = \"COL\";\n TAG_ID[TAG_ID[\"COLGROUP\"] = 21] = \"COLGROUP\";\n TAG_ID[TAG_ID[\"DD\"] = 22] = \"DD\";\n TAG_ID[TAG_ID[\"DESC\"] = 23] = \"DESC\";\n TAG_ID[TAG_ID[\"DETAILS\"] = 24] = \"DETAILS\";\n TAG_ID[TAG_ID[\"DIALOG\"] = 25] = \"DIALOG\";\n TAG_ID[TAG_ID[\"DIR\"] = 26] = \"DIR\";\n TAG_ID[TAG_ID[\"DIV\"] = 27] = \"DIV\";\n TAG_ID[TAG_ID[\"DL\"] = 28] = \"DL\";\n TAG_ID[TAG_ID[\"DT\"] = 29] = \"DT\";\n TAG_ID[TAG_ID[\"EM\"] = 30] = \"EM\";\n TAG_ID[TAG_ID[\"EMBED\"] = 31] = \"EMBED\";\n TAG_ID[TAG_ID[\"FIELDSET\"] = 32] = \"FIELDSET\";\n TAG_ID[TAG_ID[\"FIGCAPTION\"] = 33] = \"FIGCAPTION\";\n TAG_ID[TAG_ID[\"FIGURE\"] = 34] = \"FIGURE\";\n TAG_ID[TAG_ID[\"FONT\"] = 35] = \"FONT\";\n TAG_ID[TAG_ID[\"FOOTER\"] = 36] = \"FOOTER\";\n TAG_ID[TAG_ID[\"FOREIGN_OBJECT\"] = 37] = \"FOREIGN_OBJECT\";\n TAG_ID[TAG_ID[\"FORM\"] = 38] = \"FORM\";\n TAG_ID[TAG_ID[\"FRAME\"] = 39] = \"FRAME\";\n TAG_ID[TAG_ID[\"FRAMESET\"] = 40] = \"FRAMESET\";\n TAG_ID[TAG_ID[\"H1\"] = 41] = \"H1\";\n TAG_ID[TAG_ID[\"H2\"] = 42] = \"H2\";\n TAG_ID[TAG_ID[\"H3\"] = 43] = \"H3\";\n TAG_ID[TAG_ID[\"H4\"] = 44] = \"H4\";\n TAG_ID[TAG_ID[\"H5\"] = 45] = \"H5\";\n TAG_ID[TAG_ID[\"H6\"] = 46] = \"H6\";\n TAG_ID[TAG_ID[\"HEAD\"] = 47] = \"HEAD\";\n TAG_ID[TAG_ID[\"HEADER\"] = 48] = \"HEADER\";\n TAG_ID[TAG_ID[\"HGROUP\"] = 49] = \"HGROUP\";\n TAG_ID[TAG_ID[\"HR\"] = 50] = \"HR\";\n TAG_ID[TAG_ID[\"HTML\"] = 51] = \"HTML\";\n TAG_ID[TAG_ID[\"I\"] = 52] = \"I\";\n TAG_ID[TAG_ID[\"IMG\"] = 53] = \"IMG\";\n TAG_ID[TAG_ID[\"IMAGE\"] = 54] = \"IMAGE\";\n TAG_ID[TAG_ID[\"INPUT\"] = 55] = \"INPUT\";\n TAG_ID[TAG_ID[\"IFRAME\"] = 56] = \"IFRAME\";\n TAG_ID[TAG_ID[\"KEYGEN\"] = 57] = \"KEYGEN\";\n TAG_ID[TAG_ID[\"LABEL\"] = 58] = \"LABEL\";\n TAG_ID[TAG_ID[\"LI\"] = 59] = \"LI\";\n TAG_ID[TAG_ID[\"LINK\"] = 60] = \"LINK\";\n TAG_ID[TAG_ID[\"LISTING\"] = 61] = \"LISTING\";\n TAG_ID[TAG_ID[\"MAIN\"] = 62] = \"MAIN\";\n TAG_ID[TAG_ID[\"MALIGNMARK\"] = 63] = \"MALIGNMARK\";\n TAG_ID[TAG_ID[\"MARQUEE\"] = 64] = \"MARQUEE\";\n TAG_ID[TAG_ID[\"MATH\"] = 65] = \"MATH\";\n TAG_ID[TAG_ID[\"MENU\"] = 66] = \"MENU\";\n TAG_ID[TAG_ID[\"META\"] = 67] = \"META\";\n TAG_ID[TAG_ID[\"MGLYPH\"] = 68] = \"MGLYPH\";\n TAG_ID[TAG_ID[\"MI\"] = 69] = \"MI\";\n TAG_ID[TAG_ID[\"MO\"] = 70] = \"MO\";\n TAG_ID[TAG_ID[\"MN\"] = 71] = \"MN\";\n TAG_ID[TAG_ID[\"MS\"] = 72] = \"MS\";\n TAG_ID[TAG_ID[\"MTEXT\"] = 73] = \"MTEXT\";\n TAG_ID[TAG_ID[\"NAV\"] = 74] = \"NAV\";\n TAG_ID[TAG_ID[\"NOBR\"] = 75] = \"NOBR\";\n TAG_ID[TAG_ID[\"NOFRAMES\"] = 76] = \"NOFRAMES\";\n TAG_ID[TAG_ID[\"NOEMBED\"] = 77] = \"NOEMBED\";\n TAG_ID[TAG_ID[\"NOSCRIPT\"] = 78] = \"NOSCRIPT\";\n TAG_ID[TAG_ID[\"OBJECT\"] = 79] = \"OBJECT\";\n TAG_ID[TAG_ID[\"OL\"] = 80] = \"OL\";\n TAG_ID[TAG_ID[\"OPTGROUP\"] = 81] = \"OPTGROUP\";\n TAG_ID[TAG_ID[\"OPTION\"] = 82] = \"OPTION\";\n TAG_ID[TAG_ID[\"P\"] = 83] = \"P\";\n TAG_ID[TAG_ID[\"PARAM\"] = 84] = \"PARAM\";\n TAG_ID[TAG_ID[\"PLAINTEXT\"] = 85] = \"PLAINTEXT\";\n TAG_ID[TAG_ID[\"PRE\"] = 86] = \"PRE\";\n TAG_ID[TAG_ID[\"RB\"] = 87] = \"RB\";\n TAG_ID[TAG_ID[\"RP\"] = 88] = \"RP\";\n TAG_ID[TAG_ID[\"RT\"] = 89] = \"RT\";\n TAG_ID[TAG_ID[\"RTC\"] = 90] = \"RTC\";\n TAG_ID[TAG_ID[\"RUBY\"] = 91] = \"RUBY\";\n TAG_ID[TAG_ID[\"S\"] = 92] = \"S\";\n TAG_ID[TAG_ID[\"SCRIPT\"] = 93] = \"SCRIPT\";\n TAG_ID[TAG_ID[\"SECTION\"] = 94] = \"SECTION\";\n TAG_ID[TAG_ID[\"SELECT\"] = 95] = \"SELECT\";\n TAG_ID[TAG_ID[\"SOURCE\"] = 96] = \"SOURCE\";\n TAG_ID[TAG_ID[\"SMALL\"] = 97] = \"SMALL\";\n TAG_ID[TAG_ID[\"SPAN\"] = 98] = \"SPAN\";\n TAG_ID[TAG_ID[\"STRIKE\"] = 99] = \"STRIKE\";\n TAG_ID[TAG_ID[\"STRONG\"] = 100] = \"STRONG\";\n TAG_ID[TAG_ID[\"STYLE\"] = 101] = \"STYLE\";\n TAG_ID[TAG_ID[\"SUB\"] = 102] = \"SUB\";\n TAG_ID[TAG_ID[\"SUMMARY\"] = 103] = \"SUMMARY\";\n TAG_ID[TAG_ID[\"SUP\"] = 104] = \"SUP\";\n TAG_ID[TAG_ID[\"TABLE\"] = 105] = \"TABLE\";\n TAG_ID[TAG_ID[\"TBODY\"] = 106] = \"TBODY\";\n TAG_ID[TAG_ID[\"TEMPLATE\"] = 107] = \"TEMPLATE\";\n TAG_ID[TAG_ID[\"TEXTAREA\"] = 108] = \"TEXTAREA\";\n TAG_ID[TAG_ID[\"TFOOT\"] = 109] = \"TFOOT\";\n TAG_ID[TAG_ID[\"TD\"] = 110] = \"TD\";\n TAG_ID[TAG_ID[\"TH\"] = 111] = \"TH\";\n TAG_ID[TAG_ID[\"THEAD\"] = 112] = \"THEAD\";\n TAG_ID[TAG_ID[\"TITLE\"] = 113] = \"TITLE\";\n TAG_ID[TAG_ID[\"TR\"] = 114] = \"TR\";\n TAG_ID[TAG_ID[\"TRACK\"] = 115] = \"TRACK\";\n TAG_ID[TAG_ID[\"TT\"] = 116] = \"TT\";\n TAG_ID[TAG_ID[\"U\"] = 117] = \"U\";\n TAG_ID[TAG_ID[\"UL\"] = 118] = \"UL\";\n TAG_ID[TAG_ID[\"SVG\"] = 119] = \"SVG\";\n TAG_ID[TAG_ID[\"VAR\"] = 120] = \"VAR\";\n TAG_ID[TAG_ID[\"WBR\"] = 121] = \"WBR\";\n TAG_ID[TAG_ID[\"XMP\"] = 122] = \"XMP\";\n})(TAG_ID = TAG_ID || (TAG_ID = {}));\nconst TAG_NAME_TO_ID = new Map([\n [TAG_NAMES.A, TAG_ID.A],\n [TAG_NAMES.ADDRESS, TAG_ID.ADDRESS],\n [TAG_NAMES.ANNOTATION_XML, TAG_ID.ANNOTATION_XML],\n [TAG_NAMES.APPLET, TAG_ID.APPLET],\n [TAG_NAMES.AREA, TAG_ID.AREA],\n [TAG_NAMES.ARTICLE, TAG_ID.ARTICLE],\n [TAG_NAMES.ASIDE, TAG_ID.ASIDE],\n [TAG_NAMES.B, TAG_ID.B],\n [TAG_NAMES.BASE, TAG_ID.BASE],\n [TAG_NAMES.BASEFONT, TAG_ID.BASEFONT],\n [TAG_NAMES.BGSOUND, TAG_ID.BGSOUND],\n [TAG_NAMES.BIG, TAG_ID.BIG],\n [TAG_NAMES.BLOCKQUOTE, TAG_ID.BLOCKQUOTE],\n [TAG_NAMES.BODY, TAG_ID.BODY],\n [TAG_NAMES.BR, TAG_ID.BR],\n [TAG_NAMES.BUTTON, TAG_ID.BUTTON],\n [TAG_NAMES.CAPTION, TAG_ID.CAPTION],\n [TAG_NAMES.CENTER, TAG_ID.CENTER],\n [TAG_NAMES.CODE, TAG_ID.CODE],\n [TAG_NAMES.COL, TAG_ID.COL],\n [TAG_NAMES.COLGROUP, TAG_ID.COLGROUP],\n [TAG_NAMES.DD, TAG_ID.DD],\n [TAG_NAMES.DESC, TAG_ID.DESC],\n [TAG_NAMES.DETAILS, TAG_ID.DETAILS],\n [TAG_NAMES.DIALOG, TAG_ID.DIALOG],\n [TAG_NAMES.DIR, TAG_ID.DIR],\n [TAG_NAMES.DIV, TAG_ID.DIV],\n [TAG_NAMES.DL, TAG_ID.DL],\n [TAG_NAMES.DT, TAG_ID.DT],\n [TAG_NAMES.EM, TAG_ID.EM],\n [TAG_NAMES.EMBED, TAG_ID.EMBED],\n [TAG_NAMES.FIELDSET, TAG_ID.FIELDSET],\n [TAG_NAMES.FIGCAPTION, TAG_ID.FIGCAPTION],\n [TAG_NAMES.FIGURE, TAG_ID.FIGURE],\n [TAG_NAMES.FONT, TAG_ID.FONT],\n [TAG_NAMES.FOOTER, TAG_ID.FOOTER],\n [TAG_NAMES.FOREIGN_OBJECT, TAG_ID.FOREIGN_OBJECT],\n [TAG_NAMES.FORM, TAG_ID.FORM],\n [TAG_NAMES.FRAME, TAG_ID.FRAME],\n [TAG_NAMES.FRAMESET, TAG_ID.FRAMESET],\n [TAG_NAMES.H1, TAG_ID.H1],\n [TAG_NAMES.H2, TAG_ID.H2],\n [TAG_NAMES.H3, TAG_ID.H3],\n [TAG_NAMES.H4, TAG_ID.H4],\n [TAG_NAMES.H5, TAG_ID.H5],\n [TAG_NAMES.H6, TAG_ID.H6],\n [TAG_NAMES.HEAD, TAG_ID.HEAD],\n [TAG_NAMES.HEADER, TAG_ID.HEADER],\n [TAG_NAMES.HGROUP, TAG_ID.HGROUP],\n [TAG_NAMES.HR, TAG_ID.HR],\n [TAG_NAMES.HTML, TAG_ID.HTML],\n [TAG_NAMES.I, TAG_ID.I],\n [TAG_NAMES.IMG, TAG_ID.IMG],\n [TAG_NAMES.IMAGE, TAG_ID.IMAGE],\n [TAG_NAMES.INPUT, TAG_ID.INPUT],\n [TAG_NAMES.IFRAME, TAG_ID.IFRAME],\n [TAG_NAMES.KEYGEN, TAG_ID.KEYGEN],\n [TAG_NAMES.LABEL, TAG_ID.LABEL],\n [TAG_NAMES.LI, TAG_ID.LI],\n [TAG_NAMES.LINK, TAG_ID.LINK],\n [TAG_NAMES.LISTING, TAG_ID.LISTING],\n [TAG_NAMES.MAIN, TAG_ID.MAIN],\n [TAG_NAMES.MALIGNMARK, TAG_ID.MALIGNMARK],\n [TAG_NAMES.MARQUEE, TAG_ID.MARQUEE],\n [TAG_NAMES.MATH, TAG_ID.MATH],\n [TAG_NAMES.MENU, TAG_ID.MENU],\n [TAG_NAMES.META, TAG_ID.META],\n [TAG_NAMES.MGLYPH, TAG_ID.MGLYPH],\n [TAG_NAMES.MI, TAG_ID.MI],\n [TAG_NAMES.MO, TAG_ID.MO],\n [TAG_NAMES.MN, TAG_ID.MN],\n [TAG_NAMES.MS, TAG_ID.MS],\n [TAG_NAMES.MTEXT, TAG_ID.MTEXT],\n [TAG_NAMES.NAV, TAG_ID.NAV],\n [TAG_NAMES.NOBR, TAG_ID.NOBR],\n [TAG_NAMES.NOFRAMES, TAG_ID.NOFRAMES],\n [TAG_NAMES.NOEMBED, TAG_ID.NOEMBED],\n [TAG_NAMES.NOSCRIPT, TAG_ID.NOSCRIPT],\n [TAG_NAMES.OBJECT, TAG_ID.OBJECT],\n [TAG_NAMES.OL, TAG_ID.OL],\n [TAG_NAMES.OPTGROUP, TAG_ID.OPTGROUP],\n [TAG_NAMES.OPTION, TAG_ID.OPTION],\n [TAG_NAMES.P, TAG_ID.P],\n [TAG_NAMES.PARAM, TAG_ID.PARAM],\n [TAG_NAMES.PLAINTEXT, TAG_ID.PLAINTEXT],\n [TAG_NAMES.PRE, TAG_ID.PRE],\n [TAG_NAMES.RB, TAG_ID.RB],\n [TAG_NAMES.RP, TAG_ID.RP],\n [TAG_NAMES.RT, TAG_ID.RT],\n [TAG_NAMES.RTC, TAG_ID.RTC],\n [TAG_NAMES.RUBY, TAG_ID.RUBY],\n [TAG_NAMES.S, TAG_ID.S],\n [TAG_NAMES.SCRIPT, TAG_ID.SCRIPT],\n [TAG_NAMES.SECTION, TAG_ID.SECTION],\n [TAG_NAMES.SELECT, TAG_ID.SELECT],\n [TAG_NAMES.SOURCE, TAG_ID.SOURCE],\n [TAG_NAMES.SMALL, TAG_ID.SMALL],\n [TAG_NAMES.SPAN, TAG_ID.SPAN],\n [TAG_NAMES.STRIKE, TAG_ID.STRIKE],\n [TAG_NAMES.STRONG, TAG_ID.STRONG],\n [TAG_NAMES.STYLE, TAG_ID.STYLE],\n [TAG_NAMES.SUB, TAG_ID.SUB],\n [TAG_NAMES.SUMMARY, TAG_ID.SUMMARY],\n [TAG_NAMES.SUP, TAG_ID.SUP],\n [TAG_NAMES.TABLE, TAG_ID.TABLE],\n [TAG_NAMES.TBODY, TAG_ID.TBODY],\n [TAG_NAMES.TEMPLATE, TAG_ID.TEMPLATE],\n [TAG_NAMES.TEXTAREA, TAG_ID.TEXTAREA],\n [TAG_NAMES.TFOOT, TAG_ID.TFOOT],\n [TAG_NAMES.TD, TAG_ID.TD],\n [TAG_NAMES.TH, TAG_ID.TH],\n [TAG_NAMES.THEAD, TAG_ID.THEAD],\n [TAG_NAMES.TITLE, TAG_ID.TITLE],\n [TAG_NAMES.TR, TAG_ID.TR],\n [TAG_NAMES.TRACK, TAG_ID.TRACK],\n [TAG_NAMES.TT, TAG_ID.TT],\n [TAG_NAMES.U, TAG_ID.U],\n [TAG_NAMES.UL, TAG_ID.UL],\n [TAG_NAMES.SVG, TAG_ID.SVG],\n [TAG_NAMES.VAR, TAG_ID.VAR],\n [TAG_NAMES.WBR, TAG_ID.WBR],\n [TAG_NAMES.XMP, TAG_ID.XMP],\n]);\nexport function getTagID(tagName) {\n var _a;\n return (_a = TAG_NAME_TO_ID.get(tagName)) !== null && _a !== void 0 ? _a : TAG_ID.UNKNOWN;\n}\nconst $ = TAG_ID;\nexport const SPECIAL_ELEMENTS = {\n [NS.HTML]: new Set([\n $.ADDRESS,\n $.APPLET,\n $.AREA,\n $.ARTICLE,\n $.ASIDE,\n $.BASE,\n $.BASEFONT,\n $.BGSOUND,\n $.BLOCKQUOTE,\n $.BODY,\n $.BR,\n $.BUTTON,\n $.CAPTION,\n $.CENTER,\n $.COL,\n $.COLGROUP,\n $.DD,\n $.DETAILS,\n $.DIR,\n $.DIV,\n $.DL,\n $.DT,\n $.EMBED,\n $.FIELDSET,\n $.FIGCAPTION,\n $.FIGURE,\n $.FOOTER,\n $.FORM,\n $.FRAME,\n $.FRAMESET,\n $.H1,\n $.H2,\n $.H3,\n $.H4,\n $.H5,\n $.H6,\n $.HEAD,\n $.HEADER,\n $.HGROUP,\n $.HR,\n $.HTML,\n $.IFRAME,\n $.IMG,\n $.INPUT,\n $.LI,\n $.LINK,\n $.LISTING,\n $.MAIN,\n $.MARQUEE,\n $.MENU,\n $.META,\n $.NAV,\n $.NOEMBED,\n $.NOFRAMES,\n $.NOSCRIPT,\n $.OBJECT,\n $.OL,\n $.P,\n $.PARAM,\n $.PLAINTEXT,\n $.PRE,\n $.SCRIPT,\n $.SECTION,\n $.SELECT,\n $.SOURCE,\n $.STYLE,\n $.SUMMARY,\n $.TABLE,\n $.TBODY,\n $.TD,\n $.TEMPLATE,\n $.TEXTAREA,\n $.TFOOT,\n $.TH,\n $.THEAD,\n $.TITLE,\n $.TR,\n $.TRACK,\n $.UL,\n $.WBR,\n $.XMP,\n ]),\n [NS.MATHML]: new Set([$.MI, $.MO, $.MN, $.MS, $.MTEXT, $.ANNOTATION_XML]),\n [NS.SVG]: new Set([$.TITLE, $.FOREIGN_OBJECT, $.DESC]),\n [NS.XLINK]: new Set(),\n [NS.XML]: new Set(),\n [NS.XMLNS]: new Set(),\n};\nexport function isNumberedHeader(tn) {\n return tn === $.H1 || tn === $.H2 || tn === $.H3 || tn === $.H4 || tn === $.H5 || tn === $.H6;\n}\nconst UNESCAPED_TEXT = new Set([\n TAG_NAMES.STYLE,\n TAG_NAMES.SCRIPT,\n TAG_NAMES.XMP,\n TAG_NAMES.IFRAME,\n TAG_NAMES.NOEMBED,\n TAG_NAMES.NOFRAMES,\n TAG_NAMES.PLAINTEXT,\n]);\nexport function hasUnescapedText(tn, scriptingEnabled) {\n return UNESCAPED_TEXT.has(tn) || (scriptingEnabled && tn === TAG_NAMES.NOSCRIPT);\n}\n//# sourceMappingURL=html.js.map","import { Preprocessor } from './preprocessor.js';\nimport { CODE_POINTS as $, SEQUENCES as $$, REPLACEMENT_CHARACTER, isSurrogate, isUndefinedCodePoint, isControlCodePoint, } from '../common/unicode.js';\nimport { TokenType, getTokenAttr, } from '../common/token.js';\nimport { htmlDecodeTree, BinTrieFlags, determineBranch } from 'entities/lib/decode.js';\nimport { ERR } from '../common/error-codes.js';\nimport { TAG_ID, getTagID } from '../common/html.js';\n//C1 Unicode control character reference replacements\nconst C1_CONTROLS_REFERENCE_REPLACEMENTS = new Map([\n [0x80, 8364],\n [0x82, 8218],\n [0x83, 402],\n [0x84, 8222],\n [0x85, 8230],\n [0x86, 8224],\n [0x87, 8225],\n [0x88, 710],\n [0x89, 8240],\n [0x8a, 352],\n [0x8b, 8249],\n [0x8c, 338],\n [0x8e, 381],\n [0x91, 8216],\n [0x92, 8217],\n [0x93, 8220],\n [0x94, 8221],\n [0x95, 8226],\n [0x96, 8211],\n [0x97, 8212],\n [0x98, 732],\n [0x99, 8482],\n [0x9a, 353],\n [0x9b, 8250],\n [0x9c, 339],\n [0x9e, 382],\n [0x9f, 376],\n]);\n//States\nvar State;\n(function (State) {\n State[State[\"DATA\"] = 0] = \"DATA\";\n State[State[\"RCDATA\"] = 1] = \"RCDATA\";\n State[State[\"RAWTEXT\"] = 2] = \"RAWTEXT\";\n State[State[\"SCRIPT_DATA\"] = 3] = \"SCRIPT_DATA\";\n State[State[\"PLAINTEXT\"] = 4] = \"PLAINTEXT\";\n State[State[\"TAG_OPEN\"] = 5] = \"TAG_OPEN\";\n State[State[\"END_TAG_OPEN\"] = 6] = \"END_TAG_OPEN\";\n State[State[\"TAG_NAME\"] = 7] = \"TAG_NAME\";\n State[State[\"RCDATA_LESS_THAN_SIGN\"] = 8] = \"RCDATA_LESS_THAN_SIGN\";\n State[State[\"RCDATA_END_TAG_OPEN\"] = 9] = \"RCDATA_END_TAG_OPEN\";\n State[State[\"RCDATA_END_TAG_NAME\"] = 10] = \"RCDATA_END_TAG_NAME\";\n State[State[\"RAWTEXT_LESS_THAN_SIGN\"] = 11] = \"RAWTEXT_LESS_THAN_SIGN\";\n State[State[\"RAWTEXT_END_TAG_OPEN\"] = 12] = \"RAWTEXT_END_TAG_OPEN\";\n State[State[\"RAWTEXT_END_TAG_NAME\"] = 13] = \"RAWTEXT_END_TAG_NAME\";\n State[State[\"SCRIPT_DATA_LESS_THAN_SIGN\"] = 14] = \"SCRIPT_DATA_LESS_THAN_SIGN\";\n State[State[\"SCRIPT_DATA_END_TAG_OPEN\"] = 15] = \"SCRIPT_DATA_END_TAG_OPEN\";\n State[State[\"SCRIPT_DATA_END_TAG_NAME\"] = 16] = \"SCRIPT_DATA_END_TAG_NAME\";\n State[State[\"SCRIPT_DATA_ESCAPE_START\"] = 17] = \"SCRIPT_DATA_ESCAPE_START\";\n State[State[\"SCRIPT_DATA_ESCAPE_START_DASH\"] = 18] = \"SCRIPT_DATA_ESCAPE_START_DASH\";\n State[State[\"SCRIPT_DATA_ESCAPED\"] = 19] = \"SCRIPT_DATA_ESCAPED\";\n State[State[\"SCRIPT_DATA_ESCAPED_DASH\"] = 20] = \"SCRIPT_DATA_ESCAPED_DASH\";\n State[State[\"SCRIPT_DATA_ESCAPED_DASH_DASH\"] = 21] = \"SCRIPT_DATA_ESCAPED_DASH_DASH\";\n State[State[\"SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN\"] = 22] = \"SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN\";\n State[State[\"SCRIPT_DATA_ESCAPED_END_TAG_OPEN\"] = 23] = \"SCRIPT_DATA_ESCAPED_END_TAG_OPEN\";\n State[State[\"SCRIPT_DATA_ESCAPED_END_TAG_NAME\"] = 24] = \"SCRIPT_DATA_ESCAPED_END_TAG_NAME\";\n State[State[\"SCRIPT_DATA_DOUBLE_ESCAPE_START\"] = 25] = \"SCRIPT_DATA_DOUBLE_ESCAPE_START\";\n State[State[\"SCRIPT_DATA_DOUBLE_ESCAPED\"] = 26] = \"SCRIPT_DATA_DOUBLE_ESCAPED\";\n State[State[\"SCRIPT_DATA_DOUBLE_ESCAPED_DASH\"] = 27] = \"SCRIPT_DATA_DOUBLE_ESCAPED_DASH\";\n State[State[\"SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH\"] = 28] = \"SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH\";\n State[State[\"SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN\"] = 29] = \"SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN\";\n State[State[\"SCRIPT_DATA_DOUBLE_ESCAPE_END\"] = 30] = \"SCRIPT_DATA_DOUBLE_ESCAPE_END\";\n State[State[\"BEFORE_ATTRIBUTE_NAME\"] = 31] = \"BEFORE_ATTRIBUTE_NAME\";\n State[State[\"ATTRIBUTE_NAME\"] = 32] = \"ATTRIBUTE_NAME\";\n State[State[\"AFTER_ATTRIBUTE_NAME\"] = 33] = \"AFTER_ATTRIBUTE_NAME\";\n State[State[\"BEFORE_ATTRIBUTE_VALUE\"] = 34] = \"BEFORE_ATTRIBUTE_VALUE\";\n State[State[\"ATTRIBUTE_VALUE_DOUBLE_QUOTED\"] = 35] = \"ATTRIBUTE_VALUE_DOUBLE_QUOTED\";\n State[State[\"ATTRIBUTE_VALUE_SINGLE_QUOTED\"] = 36] = \"ATTRIBUTE_VALUE_SINGLE_QUOTED\";\n State[State[\"ATTRIBUTE_VALUE_UNQUOTED\"] = 37] = \"ATTRIBUTE_VALUE_UNQUOTED\";\n State[State[\"AFTER_ATTRIBUTE_VALUE_QUOTED\"] = 38] = \"AFTER_ATTRIBUTE_VALUE_QUOTED\";\n State[State[\"SELF_CLOSING_START_TAG\"] = 39] = \"SELF_CLOSING_START_TAG\";\n State[State[\"BOGUS_COMMENT\"] = 40] = \"BOGUS_COMMENT\";\n State[State[\"MARKUP_DECLARATION_OPEN\"] = 41] = \"MARKUP_DECLARATION_OPEN\";\n State[State[\"COMMENT_START\"] = 42] = \"COMMENT_START\";\n State[State[\"COMMENT_START_DASH\"] = 43] = \"COMMENT_START_DASH\";\n State[State[\"COMMENT\"] = 44] = \"COMMENT\";\n State[State[\"COMMENT_LESS_THAN_SIGN\"] = 45] = \"COMMENT_LESS_THAN_SIGN\";\n State[State[\"COMMENT_LESS_THAN_SIGN_BANG\"] = 46] = \"COMMENT_LESS_THAN_SIGN_BANG\";\n State[State[\"COMMENT_LESS_THAN_SIGN_BANG_DASH\"] = 47] = \"COMMENT_LESS_THAN_SIGN_BANG_DASH\";\n State[State[\"COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH\"] = 48] = \"COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH\";\n State[State[\"COMMENT_END_DASH\"] = 49] = \"COMMENT_END_DASH\";\n State[State[\"COMMENT_END\"] = 50] = \"COMMENT_END\";\n State[State[\"COMMENT_END_BANG\"] = 51] = \"COMMENT_END_BANG\";\n State[State[\"DOCTYPE\"] = 52] = \"DOCTYPE\";\n State[State[\"BEFORE_DOCTYPE_NAME\"] = 53] = \"BEFORE_DOCTYPE_NAME\";\n State[State[\"DOCTYPE_NAME\"] = 54] = \"DOCTYPE_NAME\";\n State[State[\"AFTER_DOCTYPE_NAME\"] = 55] = \"AFTER_DOCTYPE_NAME\";\n State[State[\"AFTER_DOCTYPE_PUBLIC_KEYWORD\"] = 56] = \"AFTER_DOCTYPE_PUBLIC_KEYWORD\";\n State[State[\"BEFORE_DOCTYPE_PUBLIC_IDENTIFIER\"] = 57] = \"BEFORE_DOCTYPE_PUBLIC_IDENTIFIER\";\n State[State[\"DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED\"] = 58] = \"DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED\";\n State[State[\"DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED\"] = 59] = \"DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED\";\n State[State[\"AFTER_DOCTYPE_PUBLIC_IDENTIFIER\"] = 60] = \"AFTER_DOCTYPE_PUBLIC_IDENTIFIER\";\n State[State[\"BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS\"] = 61] = \"BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS\";\n State[State[\"AFTER_DOCTYPE_SYSTEM_KEYWORD\"] = 62] = \"AFTER_DOCTYPE_SYSTEM_KEYWORD\";\n State[State[\"BEFORE_DOCTYPE_SYSTEM_IDENTIFIER\"] = 63] = \"BEFORE_DOCTYPE_SYSTEM_IDENTIFIER\";\n State[State[\"DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED\"] = 64] = \"DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED\";\n State[State[\"DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED\"] = 65] = \"DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED\";\n State[State[\"AFTER_DOCTYPE_SYSTEM_IDENTIFIER\"] = 66] = \"AFTER_DOCTYPE_SYSTEM_IDENTIFIER\";\n State[State[\"BOGUS_DOCTYPE\"] = 67] = \"BOGUS_DOCTYPE\";\n State[State[\"CDATA_SECTION\"] = 68] = \"CDATA_SECTION\";\n State[State[\"CDATA_SECTION_BRACKET\"] = 69] = \"CDATA_SECTION_BRACKET\";\n State[State[\"CDATA_SECTION_END\"] = 70] = \"CDATA_SECTION_END\";\n State[State[\"CHARACTER_REFERENCE\"] = 71] = \"CHARACTER_REFERENCE\";\n State[State[\"NAMED_CHARACTER_REFERENCE\"] = 72] = \"NAMED_CHARACTER_REFERENCE\";\n State[State[\"AMBIGUOUS_AMPERSAND\"] = 73] = \"AMBIGUOUS_AMPERSAND\";\n State[State[\"NUMERIC_CHARACTER_REFERENCE\"] = 74] = \"NUMERIC_CHARACTER_REFERENCE\";\n State[State[\"HEXADEMICAL_CHARACTER_REFERENCE_START\"] = 75] = \"HEXADEMICAL_CHARACTER_REFERENCE_START\";\n State[State[\"HEXADEMICAL_CHARACTER_REFERENCE\"] = 76] = \"HEXADEMICAL_CHARACTER_REFERENCE\";\n State[State[\"DECIMAL_CHARACTER_REFERENCE\"] = 77] = \"DECIMAL_CHARACTER_REFERENCE\";\n State[State[\"NUMERIC_CHARACTER_REFERENCE_END\"] = 78] = \"NUMERIC_CHARACTER_REFERENCE_END\";\n})(State || (State = {}));\n//Tokenizer initial states for different modes\nexport const TokenizerMode = {\n DATA: State.DATA,\n RCDATA: State.RCDATA,\n RAWTEXT: State.RAWTEXT,\n SCRIPT_DATA: State.SCRIPT_DATA,\n PLAINTEXT: State.PLAINTEXT,\n CDATA_SECTION: State.CDATA_SECTION,\n};\n//Utils\n//OPTIMIZATION: these utility functions should not be moved out of this module. V8 Crankshaft will not inline\n//this functions if they will be situated in another module due to context switch.\n//Always perform inlining check before modifying this functions ('node --trace-inlining').\nfunction isAsciiDigit(cp) {\n return cp >= $.DIGIT_0 && cp <= $.DIGIT_9;\n}\nfunction isAsciiUpper(cp) {\n return cp >= $.LATIN_CAPITAL_A && cp <= $.LATIN_CAPITAL_Z;\n}\nfunction isAsciiLower(cp) {\n return cp >= $.LATIN_SMALL_A && cp <= $.LATIN_SMALL_Z;\n}\nfunction isAsciiLetter(cp) {\n return isAsciiLower(cp) || isAsciiUpper(cp);\n}\nfunction isAsciiAlphaNumeric(cp) {\n return isAsciiLetter(cp) || isAsciiDigit(cp);\n}\nfunction isAsciiUpperHexDigit(cp) {\n return cp >= $.LATIN_CAPITAL_A && cp <= $.LATIN_CAPITAL_F;\n}\nfunction isAsciiLowerHexDigit(cp) {\n return cp >= $.LATIN_SMALL_A && cp <= $.LATIN_SMALL_F;\n}\nfunction isAsciiHexDigit(cp) {\n return isAsciiDigit(cp) || isAsciiUpperHexDigit(cp) || isAsciiLowerHexDigit(cp);\n}\nfunction toAsciiLower(cp) {\n return cp + 32;\n}\nfunction isWhitespace(cp) {\n return cp === $.SPACE || cp === $.LINE_FEED || cp === $.TABULATION || cp === $.FORM_FEED;\n}\nfunction isEntityInAttributeInvalidEnd(nextCp) {\n return nextCp === $.EQUALS_SIGN || isAsciiAlphaNumeric(nextCp);\n}\nfunction isScriptDataDoubleEscapeSequenceEnd(cp) {\n return isWhitespace(cp) || cp === $.SOLIDUS || cp === $.GREATER_THAN_SIGN;\n}\n//Tokenizer\nexport class Tokenizer {\n constructor(options, handler) {\n this.options = options;\n this.handler = handler;\n this.paused = false;\n /** Ensures that the parsing loop isn't run multiple times at once. */\n this.inLoop = false;\n /**\n * Indicates that the current adjusted node exists, is not an element in the HTML namespace,\n * and that it is not an integration point for either MathML or HTML.\n *\n * @see {@link https://html.spec.whatwg.org/multipage/parsing.html#tree-construction}\n */\n this.inForeignNode = false;\n this.lastStartTagName = '';\n this.active = false;\n this.state = State.DATA;\n this.returnState = State.DATA;\n this.charRefCode = -1;\n this.consumedAfterSnapshot = -1;\n this.currentCharacterToken = null;\n this.currentToken = null;\n this.currentAttr = { name: '', value: '' };\n this.preprocessor = new Preprocessor(handler);\n this.currentLocation = this.getCurrentLocation(-1);\n }\n //Errors\n _err(code) {\n var _a, _b;\n (_b = (_a = this.handler).onParseError) === null || _b === void 0 ? void 0 : _b.call(_a, this.preprocessor.getError(code));\n }\n // NOTE: `offset` may never run across line boundaries.\n getCurrentLocation(offset) {\n if (!this.options.sourceCodeLocationInfo) {\n return null;\n }\n return {\n startLine: this.preprocessor.line,\n startCol: this.preprocessor.col - offset,\n startOffset: this.preprocessor.offset - offset,\n endLine: -1,\n endCol: -1,\n endOffset: -1,\n };\n }\n _runParsingLoop() {\n if (this.inLoop)\n return;\n this.inLoop = true;\n while (this.active && !this.paused) {\n this.consumedAfterSnapshot = 0;\n const cp = this._consume();\n if (!this._ensureHibernation()) {\n this._callState(cp);\n }\n }\n this.inLoop = false;\n }\n //API\n pause() {\n this.paused = true;\n }\n resume(writeCallback) {\n if (!this.paused) {\n throw new Error('Parser was already resumed');\n }\n this.paused = false;\n // Necessary for synchronous resume.\n if (this.inLoop)\n return;\n this._runParsingLoop();\n if (!this.paused) {\n writeCallback === null || writeCallback === void 0 ? void 0 : writeCallback();\n }\n }\n write(chunk, isLastChunk, writeCallback) {\n this.active = true;\n this.preprocessor.write(chunk, isLastChunk);\n this._runParsingLoop();\n if (!this.paused) {\n writeCallback === null || writeCallback === void 0 ? void 0 : writeCallback();\n }\n }\n insertHtmlAtCurrentPos(chunk) {\n this.active = true;\n this.preprocessor.insertHtmlAtCurrentPos(chunk);\n this._runParsingLoop();\n }\n //Hibernation\n _ensureHibernation() {\n if (this.preprocessor.endOfChunkHit) {\n this._unconsume(this.consumedAfterSnapshot);\n this.active = false;\n return true;\n }\n return false;\n }\n //Consumption\n _consume() {\n this.consumedAfterSnapshot++;\n return this.preprocessor.advance();\n }\n _unconsume(count) {\n this.consumedAfterSnapshot -= count;\n this.preprocessor.retreat(count);\n }\n _reconsumeInState(state, cp) {\n this.state = state;\n this._callState(cp);\n }\n _advanceBy(count) {\n this.consumedAfterSnapshot += count;\n for (let i = 0; i < count; i++) {\n this.preprocessor.advance();\n }\n }\n _consumeSequenceIfMatch(pattern, caseSensitive) {\n if (this.preprocessor.startsWith(pattern, caseSensitive)) {\n // We will already have consumed one character before calling this method.\n this._advanceBy(pattern.length - 1);\n return true;\n }\n return false;\n }\n //Token creation\n _createStartTagToken() {\n this.currentToken = {\n type: TokenType.START_TAG,\n tagName: '',\n tagID: TAG_ID.UNKNOWN,\n selfClosing: false,\n ackSelfClosing: false,\n attrs: [],\n location: this.getCurrentLocation(1),\n };\n }\n _createEndTagToken() {\n this.currentToken = {\n type: TokenType.END_TAG,\n tagName: '',\n tagID: TAG_ID.UNKNOWN,\n selfClosing: false,\n ackSelfClosing: false,\n attrs: [],\n location: this.getCurrentLocation(2),\n };\n }\n _createCommentToken(offset) {\n this.currentToken = {\n type: TokenType.COMMENT,\n data: '',\n location: this.getCurrentLocation(offset),\n };\n }\n _createDoctypeToken(initialName) {\n this.currentToken = {\n type: TokenType.DOCTYPE,\n name: initialName,\n forceQuirks: false,\n publicId: null,\n systemId: null,\n location: this.currentLocation,\n };\n }\n _createCharacterToken(type, chars) {\n this.currentCharacterToken = {\n type,\n chars,\n location: this.currentLocation,\n };\n }\n //Tag attributes\n _createAttr(attrNameFirstCh) {\n this.currentAttr = {\n name: attrNameFirstCh,\n value: '',\n };\n this.currentLocation = this.getCurrentLocation(0);\n }\n _leaveAttrName() {\n var _a;\n var _b;\n const token = this.currentToken;\n if (getTokenAttr(token, this.currentAttr.name) === null) {\n token.attrs.push(this.currentAttr);\n if (token.location && this.currentLocation) {\n const attrLocations = ((_a = (_b = token.location).attrs) !== null && _a !== void 0 ? _a : (_b.attrs = Object.create(null)));\n attrLocations[this.currentAttr.name] = this.currentLocation;\n // Set end location\n this._leaveAttrValue();\n }\n }\n else {\n this._err(ERR.duplicateAttribute);\n }\n }\n _leaveAttrValue() {\n if (this.currentLocation) {\n this.currentLocation.endLine = this.preprocessor.line;\n this.currentLocation.endCol = this.preprocessor.col;\n this.currentLocation.endOffset = this.preprocessor.offset;\n }\n }\n //Token emission\n prepareToken(ct) {\n this._emitCurrentCharacterToken(ct.location);\n this.currentToken = null;\n if (ct.location) {\n ct.location.endLine = this.preprocessor.line;\n ct.location.endCol = this.preprocessor.col + 1;\n ct.location.endOffset = this.preprocessor.offset + 1;\n }\n this.currentLocation = this.getCurrentLocation(-1);\n }\n emitCurrentTagToken() {\n const ct = this.currentToken;\n this.prepareToken(ct);\n ct.tagID = getTagID(ct.tagName);\n if (ct.type === TokenType.START_TAG) {\n this.lastStartTagName = ct.tagName;\n this.handler.onStartTag(ct);\n }\n else {\n if (ct.attrs.length > 0) {\n this._err(ERR.endTagWithAttributes);\n }\n if (ct.selfClosing) {\n this._err(ERR.endTagWithTrailingSolidus);\n }\n this.handler.onEndTag(ct);\n }\n this.preprocessor.dropParsedChunk();\n }\n emitCurrentComment(ct) {\n this.prepareToken(ct);\n this.handler.onComment(ct);\n this.preprocessor.dropParsedChunk();\n }\n emitCurrentDoctype(ct) {\n this.prepareToken(ct);\n this.handler.onDoctype(ct);\n this.preprocessor.dropParsedChunk();\n }\n _emitCurrentCharacterToken(nextLocation) {\n if (this.currentCharacterToken) {\n //NOTE: if we have a pending character token, make it's end location equal to the\n //current token's start location.\n if (nextLocation && this.currentCharacterToken.location) {\n this.currentCharacterToken.location.endLine = nextLocation.startLine;\n this.currentCharacterToken.location.endCol = nextLocation.startCol;\n this.currentCharacterToken.location.endOffset = nextLocation.startOffset;\n }\n switch (this.currentCharacterToken.type) {\n case TokenType.CHARACTER: {\n this.handler.onCharacter(this.currentCharacterToken);\n break;\n }\n case TokenType.NULL_CHARACTER: {\n this.handler.onNullCharacter(this.currentCharacterToken);\n break;\n }\n case TokenType.WHITESPACE_CHARACTER: {\n this.handler.onWhitespaceCharacter(this.currentCharacterToken);\n break;\n }\n }\n this.currentCharacterToken = null;\n }\n }\n _emitEOFToken() {\n const location = this.getCurrentLocation(0);\n if (location) {\n location.endLine = location.startLine;\n location.endCol = location.startCol;\n location.endOffset = location.startOffset;\n }\n this._emitCurrentCharacterToken(location);\n this.handler.onEof({ type: TokenType.EOF, location });\n this.active = false;\n }\n //Characters emission\n //OPTIMIZATION: specification uses only one type of character tokens (one token per character).\n //This causes a huge memory overhead and a lot of unnecessary parser loops. parse5 uses 3 groups of characters.\n //If we have a sequence of characters that belong to the same group, the parser can process it\n //as a single solid character token.\n //So, there are 3 types of character tokens in parse5:\n //1)TokenType.NULL_CHARACTER - \\u0000-character sequences (e.g. '\\u0000\\u0000\\u0000')\n //2)TokenType.WHITESPACE_CHARACTER - any whitespace/new-line character sequences (e.g. '\\n \\r\\t \\f')\n //3)TokenType.CHARACTER - any character sequence which don't belong to groups 1 and 2 (e.g. 'abcdef1234@@#$%^')\n _appendCharToCurrentCharacterToken(type, ch) {\n if (this.currentCharacterToken) {\n if (this.currentCharacterToken.type !== type) {\n this.currentLocation = this.getCurrentLocation(0);\n this._emitCurrentCharacterToken(this.currentLocation);\n this.preprocessor.dropParsedChunk();\n }\n else {\n this.currentCharacterToken.chars += ch;\n return;\n }\n }\n this._createCharacterToken(type, ch);\n }\n _emitCodePoint(cp) {\n const type = isWhitespace(cp)\n ? TokenType.WHITESPACE_CHARACTER\n : cp === $.NULL\n ? TokenType.NULL_CHARACTER\n : TokenType.CHARACTER;\n this._appendCharToCurrentCharacterToken(type, String.fromCodePoint(cp));\n }\n //NOTE: used when we emit characters explicitly.\n //This is always for non-whitespace and non-null characters, which allows us to avoid additional checks.\n _emitChars(ch) {\n this._appendCharToCurrentCharacterToken(TokenType.CHARACTER, ch);\n }\n // Character reference helpers\n _matchNamedCharacterReference(cp) {\n let result = null;\n let excess = 0;\n let withoutSemicolon = false;\n for (let i = 0, current = htmlDecodeTree[0]; i >= 0; cp = this._consume()) {\n i = determineBranch(htmlDecodeTree, current, i + 1, cp);\n if (i < 0)\n break;\n excess += 1;\n current = htmlDecodeTree[i];\n const masked = current & BinTrieFlags.VALUE_LENGTH;\n // If the branch is a value, store it and continue\n if (masked) {\n // The mask is the number of bytes of the value, including the current byte.\n const valueLength = (masked >> 14) - 1;\n // Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error.\n // See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state\n if (cp !== $.SEMICOLON &&\n this._isCharacterReferenceInAttribute() &&\n isEntityInAttributeInvalidEnd(this.preprocessor.peek(1))) {\n //NOTE: we don't flush all consumed code points here, and instead switch back to the original state after\n //emitting an ampersand. This is fine, as alphanumeric characters won't be parsed differently in attributes.\n result = [$.AMPERSAND];\n // Skip over the value.\n i += valueLength;\n }\n else {\n // If this is a surrogate pair, consume the next two bytes.\n result =\n valueLength === 0\n ? [htmlDecodeTree[i] & ~BinTrieFlags.VALUE_LENGTH]\n : valueLength === 1\n ? [htmlDecodeTree[++i]]\n : [htmlDecodeTree[++i], htmlDecodeTree[++i]];\n excess = 0;\n withoutSemicolon = cp !== $.SEMICOLON;\n }\n if (valueLength === 0) {\n // If the value is zero-length, we're done.\n this._consume();\n break;\n }\n }\n }\n this._unconsume(excess);\n if (withoutSemicolon && !this.preprocessor.endOfChunkHit) {\n this._err(ERR.missingSemicolonAfterCharacterReference);\n }\n // We want to emit the error above on the code point after the entity.\n // We always consume one code point too many in the loop, and we wait to\n // unconsume it until after the error is emitted.\n this._unconsume(1);\n return result;\n }\n _isCharacterReferenceInAttribute() {\n return (this.returnState === State.ATTRIBUTE_VALUE_DOUBLE_QUOTED ||\n this.returnState === State.ATTRIBUTE_VALUE_SINGLE_QUOTED ||\n this.returnState === State.ATTRIBUTE_VALUE_UNQUOTED);\n }\n _flushCodePointConsumedAsCharacterReference(cp) {\n if (this._isCharacterReferenceInAttribute()) {\n this.currentAttr.value += String.fromCodePoint(cp);\n }\n else {\n this._emitCodePoint(cp);\n }\n }\n // Calling states this way turns out to be much faster than any other approach.\n _callState(cp) {\n switch (this.state) {\n case State.DATA: {\n this._stateData(cp);\n break;\n }\n case State.RCDATA: {\n this._stateRcdata(cp);\n break;\n }\n case State.RAWTEXT: {\n this._stateRawtext(cp);\n break;\n }\n case State.SCRIPT_DATA: {\n this._stateScriptData(cp);\n break;\n }\n case State.PLAINTEXT: {\n this._statePlaintext(cp);\n break;\n }\n case State.TAG_OPEN: {\n this._stateTagOpen(cp);\n break;\n }\n case State.END_TAG_OPEN: {\n this._stateEndTagOpen(cp);\n break;\n }\n case State.TAG_NAME: {\n this._stateTagName(cp);\n break;\n }\n case State.RCDATA_LESS_THAN_SIGN: {\n this._stateRcdataLessThanSign(cp);\n break;\n }\n case State.RCDATA_END_TAG_OPEN: {\n this._stateRcdataEndTagOpen(cp);\n break;\n }\n case State.RCDATA_END_TAG_NAME: {\n this._stateRcdataEndTagName(cp);\n break;\n }\n case State.RAWTEXT_LESS_THAN_SIGN: {\n this._stateRawtextLessThanSign(cp);\n break;\n }\n case State.RAWTEXT_END_TAG_OPEN: {\n this._stateRawtextEndTagOpen(cp);\n break;\n }\n case State.RAWTEXT_END_TAG_NAME: {\n this._stateRawtextEndTagName(cp);\n break;\n }\n case State.SCRIPT_DATA_LESS_THAN_SIGN: {\n this._stateScriptDataLessThanSign(cp);\n break;\n }\n case State.SCRIPT_DATA_END_TAG_OPEN: {\n this._stateScriptDataEndTagOpen(cp);\n break;\n }\n case State.SCRIPT_DATA_END_TAG_NAME: {\n this._stateScriptDataEndTagName(cp);\n break;\n }\n case State.SCRIPT_DATA_ESCAPE_START: {\n this._stateScriptDataEscapeStart(cp);\n break;\n }\n case State.SCRIPT_DATA_ESCAPE_START_DASH: {\n this._stateScriptDataEscapeStartDash(cp);\n break;\n }\n case State.SCRIPT_DATA_ESCAPED: {\n this._stateScriptDataEscaped(cp);\n break;\n }\n case State.SCRIPT_DATA_ESCAPED_DASH: {\n this._stateScriptDataEscapedDash(cp);\n break;\n }\n case State.SCRIPT_DATA_ESCAPED_DASH_DASH: {\n this._stateScriptDataEscapedDashDash(cp);\n break;\n }\n case State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN: {\n this._stateScriptDataEscapedLessThanSign(cp);\n break;\n }\n case State.SCRIPT_DATA_ESCAPED_END_TAG_OPEN: {\n this._stateScriptDataEscapedEndTagOpen(cp);\n break;\n }\n case State.SCRIPT_DATA_ESCAPED_END_TAG_NAME: {\n this._stateScriptDataEscapedEndTagName(cp);\n break;\n }\n case State.SCRIPT_DATA_DOUBLE_ESCAPE_START: {\n this._stateScriptDataDoubleEscapeStart(cp);\n break;\n }\n case State.SCRIPT_DATA_DOUBLE_ESCAPED: {\n this._stateScriptDataDoubleEscaped(cp);\n break;\n }\n case State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH: {\n this._stateScriptDataDoubleEscapedDash(cp);\n break;\n }\n case State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH: {\n this._stateScriptDataDoubleEscapedDashDash(cp);\n break;\n }\n case State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN: {\n this._stateScriptDataDoubleEscapedLessThanSign(cp);\n break;\n }\n case State.SCRIPT_DATA_DOUBLE_ESCAPE_END: {\n this._stateScriptDataDoubleEscapeEnd(cp);\n break;\n }\n case State.BEFORE_ATTRIBUTE_NAME: {\n this._stateBeforeAttributeName(cp);\n break;\n }\n case State.ATTRIBUTE_NAME: {\n this._stateAttributeName(cp);\n break;\n }\n case State.AFTER_ATTRIBUTE_NAME: {\n this._stateAfterAttributeName(cp);\n break;\n }\n case State.BEFORE_ATTRIBUTE_VALUE: {\n this._stateBeforeAttributeValue(cp);\n break;\n }\n case State.ATTRIBUTE_VALUE_DOUBLE_QUOTED: {\n this._stateAttributeValueDoubleQuoted(cp);\n break;\n }\n case State.ATTRIBUTE_VALUE_SINGLE_QUOTED: {\n this._stateAttributeValueSingleQuoted(cp);\n break;\n }\n case State.ATTRIBUTE_VALUE_UNQUOTED: {\n this._stateAttributeValueUnquoted(cp);\n break;\n }\n case State.AFTER_ATTRIBUTE_VALUE_QUOTED: {\n this._stateAfterAttributeValueQuoted(cp);\n break;\n }\n case State.SELF_CLOSING_START_TAG: {\n this._stateSelfClosingStartTag(cp);\n break;\n }\n case State.BOGUS_COMMENT: {\n this._stateBogusComment(cp);\n break;\n }\n case State.MARKUP_DECLARATION_OPEN: {\n this._stateMarkupDeclarationOpen(cp);\n break;\n }\n case State.COMMENT_START: {\n this._stateCommentStart(cp);\n break;\n }\n case State.COMMENT_START_DASH: {\n this._stateCommentStartDash(cp);\n break;\n }\n case State.COMMENT: {\n this._stateComment(cp);\n break;\n }\n case State.COMMENT_LESS_THAN_SIGN: {\n this._stateCommentLessThanSign(cp);\n break;\n }\n case State.COMMENT_LESS_THAN_SIGN_BANG: {\n this._stateCommentLessThanSignBang(cp);\n break;\n }\n case State.COMMENT_LESS_THAN_SIGN_BANG_DASH: {\n this._stateCommentLessThanSignBangDash(cp);\n break;\n }\n case State.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH: {\n this._stateCommentLessThanSignBangDashDash(cp);\n break;\n }\n case State.COMMENT_END_DASH: {\n this._stateCommentEndDash(cp);\n break;\n }\n case State.COMMENT_END: {\n this._stateCommentEnd(cp);\n break;\n }\n case State.COMMENT_END_BANG: {\n this._stateCommentEndBang(cp);\n break;\n }\n case State.DOCTYPE: {\n this._stateDoctype(cp);\n break;\n }\n case State.BEFORE_DOCTYPE_NAME: {\n this._stateBeforeDoctypeName(cp);\n break;\n }\n case State.DOCTYPE_NAME: {\n this._stateDoctypeName(cp);\n break;\n }\n case State.AFTER_DOCTYPE_NAME: {\n this._stateAfterDoctypeName(cp);\n break;\n }\n case State.AFTER_DOCTYPE_PUBLIC_KEYWORD: {\n this._stateAfterDoctypePublicKeyword(cp);\n break;\n }\n case State.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER: {\n this._stateBeforeDoctypePublicIdentifier(cp);\n break;\n }\n case State.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED: {\n this._stateDoctypePublicIdentifierDoubleQuoted(cp);\n break;\n }\n case State.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED: {\n this._stateDoctypePublicIdentifierSingleQuoted(cp);\n break;\n }\n case State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER: {\n this._stateAfterDoctypePublicIdentifier(cp);\n break;\n }\n case State.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS: {\n this._stateBetweenDoctypePublicAndSystemIdentifiers(cp);\n break;\n }\n case State.AFTER_DOCTYPE_SYSTEM_KEYWORD: {\n this._stateAfterDoctypeSystemKeyword(cp);\n break;\n }\n case State.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER: {\n this._stateBeforeDoctypeSystemIdentifier(cp);\n break;\n }\n case State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED: {\n this._stateDoctypeSystemIdentifierDoubleQuoted(cp);\n break;\n }\n case State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED: {\n this._stateDoctypeSystemIdentifierSingleQuoted(cp);\n break;\n }\n case State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER: {\n this._stateAfterDoctypeSystemIdentifier(cp);\n break;\n }\n case State.BOGUS_DOCTYPE: {\n this._stateBogusDoctype(cp);\n break;\n }\n case State.CDATA_SECTION: {\n this._stateCdataSection(cp);\n break;\n }\n case State.CDATA_SECTION_BRACKET: {\n this._stateCdataSectionBracket(cp);\n break;\n }\n case State.CDATA_SECTION_END: {\n this._stateCdataSectionEnd(cp);\n break;\n }\n case State.CHARACTER_REFERENCE: {\n this._stateCharacterReference(cp);\n break;\n }\n case State.NAMED_CHARACTER_REFERENCE: {\n this._stateNamedCharacterReference(cp);\n break;\n }\n case State.AMBIGUOUS_AMPERSAND: {\n this._stateAmbiguousAmpersand(cp);\n break;\n }\n case State.NUMERIC_CHARACTER_REFERENCE: {\n this._stateNumericCharacterReference(cp);\n break;\n }\n case State.HEXADEMICAL_CHARACTER_REFERENCE_START: {\n this._stateHexademicalCharacterReferenceStart(cp);\n break;\n }\n case State.HEXADEMICAL_CHARACTER_REFERENCE: {\n this._stateHexademicalCharacterReference(cp);\n break;\n }\n case State.DECIMAL_CHARACTER_REFERENCE: {\n this._stateDecimalCharacterReference(cp);\n break;\n }\n case State.NUMERIC_CHARACTER_REFERENCE_END: {\n this._stateNumericCharacterReferenceEnd(cp);\n break;\n }\n default: {\n throw new Error('Unknown state');\n }\n }\n }\n // State machine\n // Data state\n //------------------------------------------------------------------\n _stateData(cp) {\n switch (cp) {\n case $.LESS_THAN_SIGN: {\n this.state = State.TAG_OPEN;\n break;\n }\n case $.AMPERSAND: {\n this.returnState = State.DATA;\n this.state = State.CHARACTER_REFERENCE;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this._emitCodePoint(cp);\n break;\n }\n case $.EOF: {\n this._emitEOFToken();\n break;\n }\n default: {\n this._emitCodePoint(cp);\n }\n }\n }\n // RCDATA state\n //------------------------------------------------------------------\n _stateRcdata(cp) {\n switch (cp) {\n case $.AMPERSAND: {\n this.returnState = State.RCDATA;\n this.state = State.CHARACTER_REFERENCE;\n break;\n }\n case $.LESS_THAN_SIGN: {\n this.state = State.RCDATA_LESS_THAN_SIGN;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n }\n case $.EOF: {\n this._emitEOFToken();\n break;\n }\n default: {\n this._emitCodePoint(cp);\n }\n }\n }\n // RAWTEXT state\n //------------------------------------------------------------------\n _stateRawtext(cp) {\n switch (cp) {\n case $.LESS_THAN_SIGN: {\n this.state = State.RAWTEXT_LESS_THAN_SIGN;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n }\n case $.EOF: {\n this._emitEOFToken();\n break;\n }\n default: {\n this._emitCodePoint(cp);\n }\n }\n }\n // Script data state\n //------------------------------------------------------------------\n _stateScriptData(cp) {\n switch (cp) {\n case $.LESS_THAN_SIGN: {\n this.state = State.SCRIPT_DATA_LESS_THAN_SIGN;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n }\n case $.EOF: {\n this._emitEOFToken();\n break;\n }\n default: {\n this._emitCodePoint(cp);\n }\n }\n }\n // PLAINTEXT state\n //------------------------------------------------------------------\n _statePlaintext(cp) {\n switch (cp) {\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n }\n case $.EOF: {\n this._emitEOFToken();\n break;\n }\n default: {\n this._emitCodePoint(cp);\n }\n }\n }\n // Tag open state\n //------------------------------------------------------------------\n _stateTagOpen(cp) {\n if (isAsciiLetter(cp)) {\n this._createStartTagToken();\n this.state = State.TAG_NAME;\n this._stateTagName(cp);\n }\n else\n switch (cp) {\n case $.EXCLAMATION_MARK: {\n this.state = State.MARKUP_DECLARATION_OPEN;\n break;\n }\n case $.SOLIDUS: {\n this.state = State.END_TAG_OPEN;\n break;\n }\n case $.QUESTION_MARK: {\n this._err(ERR.unexpectedQuestionMarkInsteadOfTagName);\n this._createCommentToken(1);\n this.state = State.BOGUS_COMMENT;\n this._stateBogusComment(cp);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofBeforeTagName);\n this._emitChars('<');\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.invalidFirstCharacterOfTagName);\n this._emitChars('<');\n this.state = State.DATA;\n this._stateData(cp);\n }\n }\n }\n // End tag open state\n //------------------------------------------------------------------\n _stateEndTagOpen(cp) {\n if (isAsciiLetter(cp)) {\n this._createEndTagToken();\n this.state = State.TAG_NAME;\n this._stateTagName(cp);\n }\n else\n switch (cp) {\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.missingEndTagName);\n this.state = State.DATA;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofBeforeTagName);\n this._emitChars('');\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this.state = State.SCRIPT_DATA_ESCAPED;\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInScriptHtmlCommentLikeText);\n this._emitEOFToken();\n break;\n }\n default: {\n this.state = State.SCRIPT_DATA_ESCAPED;\n this._emitCodePoint(cp);\n }\n }\n }\n // Script data escaped less-than sign state\n //------------------------------------------------------------------\n _stateScriptDataEscapedLessThanSign(cp) {\n if (cp === $.SOLIDUS) {\n this.state = State.SCRIPT_DATA_ESCAPED_END_TAG_OPEN;\n }\n else if (isAsciiLetter(cp)) {\n this._emitChars('<');\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPE_START;\n this._stateScriptDataDoubleEscapeStart(cp);\n }\n else {\n this._emitChars('<');\n this.state = State.SCRIPT_DATA_ESCAPED;\n this._stateScriptDataEscaped(cp);\n }\n }\n // Script data escaped end tag open state\n //------------------------------------------------------------------\n _stateScriptDataEscapedEndTagOpen(cp) {\n if (isAsciiLetter(cp)) {\n this.state = State.SCRIPT_DATA_ESCAPED_END_TAG_NAME;\n this._stateScriptDataEscapedEndTagName(cp);\n }\n else {\n this._emitChars('');\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInScriptHtmlCommentLikeText);\n this._emitEOFToken();\n break;\n }\n default: {\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;\n this._emitCodePoint(cp);\n }\n }\n }\n // Script data double escaped less-than sign state\n //------------------------------------------------------------------\n _stateScriptDataDoubleEscapedLessThanSign(cp) {\n if (cp === $.SOLIDUS) {\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPE_END;\n this._emitChars('/');\n }\n else {\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;\n this._stateScriptDataDoubleEscaped(cp);\n }\n }\n // Script data double escape end state\n //------------------------------------------------------------------\n _stateScriptDataDoubleEscapeEnd(cp) {\n if (this.preprocessor.startsWith($$.SCRIPT, false) &&\n isScriptDataDoubleEscapeSequenceEnd(this.preprocessor.peek($$.SCRIPT.length))) {\n this._emitCodePoint(cp);\n for (let i = 0; i < $$.SCRIPT.length; i++) {\n this._emitCodePoint(this._consume());\n }\n this.state = State.SCRIPT_DATA_ESCAPED;\n }\n else if (!this._ensureHibernation()) {\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;\n this._stateScriptDataDoubleEscaped(cp);\n }\n }\n // Before attribute name state\n //------------------------------------------------------------------\n _stateBeforeAttributeName(cp) {\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n // Ignore whitespace\n break;\n }\n case $.SOLIDUS:\n case $.GREATER_THAN_SIGN:\n case $.EOF: {\n this.state = State.AFTER_ATTRIBUTE_NAME;\n this._stateAfterAttributeName(cp);\n break;\n }\n case $.EQUALS_SIGN: {\n this._err(ERR.unexpectedEqualsSignBeforeAttributeName);\n this._createAttr('=');\n this.state = State.ATTRIBUTE_NAME;\n break;\n }\n default: {\n this._createAttr('');\n this.state = State.ATTRIBUTE_NAME;\n this._stateAttributeName(cp);\n }\n }\n }\n // Attribute name state\n //------------------------------------------------------------------\n _stateAttributeName(cp) {\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED:\n case $.SOLIDUS:\n case $.GREATER_THAN_SIGN:\n case $.EOF: {\n this._leaveAttrName();\n this.state = State.AFTER_ATTRIBUTE_NAME;\n this._stateAfterAttributeName(cp);\n break;\n }\n case $.EQUALS_SIGN: {\n this._leaveAttrName();\n this.state = State.BEFORE_ATTRIBUTE_VALUE;\n break;\n }\n case $.QUOTATION_MARK:\n case $.APOSTROPHE:\n case $.LESS_THAN_SIGN: {\n this._err(ERR.unexpectedCharacterInAttributeName);\n this.currentAttr.name += String.fromCodePoint(cp);\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.name += REPLACEMENT_CHARACTER;\n break;\n }\n default: {\n this.currentAttr.name += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp);\n }\n }\n }\n // After attribute name state\n //------------------------------------------------------------------\n _stateAfterAttributeName(cp) {\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n // Ignore whitespace\n break;\n }\n case $.SOLIDUS: {\n this.state = State.SELF_CLOSING_START_TAG;\n break;\n }\n case $.EQUALS_SIGN: {\n this.state = State.BEFORE_ATTRIBUTE_VALUE;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this.state = State.DATA;\n this.emitCurrentTagToken();\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n break;\n }\n default: {\n this._createAttr('');\n this.state = State.ATTRIBUTE_NAME;\n this._stateAttributeName(cp);\n }\n }\n }\n // Before attribute value state\n //------------------------------------------------------------------\n _stateBeforeAttributeValue(cp) {\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n // Ignore whitespace\n break;\n }\n case $.QUOTATION_MARK: {\n this.state = State.ATTRIBUTE_VALUE_DOUBLE_QUOTED;\n break;\n }\n case $.APOSTROPHE: {\n this.state = State.ATTRIBUTE_VALUE_SINGLE_QUOTED;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.missingAttributeValue);\n this.state = State.DATA;\n this.emitCurrentTagToken();\n break;\n }\n default: {\n this.state = State.ATTRIBUTE_VALUE_UNQUOTED;\n this._stateAttributeValueUnquoted(cp);\n }\n }\n }\n // Attribute value (double-quoted) state\n //------------------------------------------------------------------\n _stateAttributeValueDoubleQuoted(cp) {\n switch (cp) {\n case $.QUOTATION_MARK: {\n this.state = State.AFTER_ATTRIBUTE_VALUE_QUOTED;\n break;\n }\n case $.AMPERSAND: {\n this.returnState = State.ATTRIBUTE_VALUE_DOUBLE_QUOTED;\n this.state = State.CHARACTER_REFERENCE;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.value += REPLACEMENT_CHARACTER;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n break;\n }\n default: {\n this.currentAttr.value += String.fromCodePoint(cp);\n }\n }\n }\n // Attribute value (single-quoted) state\n //------------------------------------------------------------------\n _stateAttributeValueSingleQuoted(cp) {\n switch (cp) {\n case $.APOSTROPHE: {\n this.state = State.AFTER_ATTRIBUTE_VALUE_QUOTED;\n break;\n }\n case $.AMPERSAND: {\n this.returnState = State.ATTRIBUTE_VALUE_SINGLE_QUOTED;\n this.state = State.CHARACTER_REFERENCE;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.value += REPLACEMENT_CHARACTER;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n break;\n }\n default: {\n this.currentAttr.value += String.fromCodePoint(cp);\n }\n }\n }\n // Attribute value (unquoted) state\n //------------------------------------------------------------------\n _stateAttributeValueUnquoted(cp) {\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n this._leaveAttrValue();\n this.state = State.BEFORE_ATTRIBUTE_NAME;\n break;\n }\n case $.AMPERSAND: {\n this.returnState = State.ATTRIBUTE_VALUE_UNQUOTED;\n this.state = State.CHARACTER_REFERENCE;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._leaveAttrValue();\n this.state = State.DATA;\n this.emitCurrentTagToken();\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.value += REPLACEMENT_CHARACTER;\n break;\n }\n case $.QUOTATION_MARK:\n case $.APOSTROPHE:\n case $.LESS_THAN_SIGN:\n case $.EQUALS_SIGN:\n case $.GRAVE_ACCENT: {\n this._err(ERR.unexpectedCharacterInUnquotedAttributeValue);\n this.currentAttr.value += String.fromCodePoint(cp);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n break;\n }\n default: {\n this.currentAttr.value += String.fromCodePoint(cp);\n }\n }\n }\n // After attribute value (quoted) state\n //------------------------------------------------------------------\n _stateAfterAttributeValueQuoted(cp) {\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n this._leaveAttrValue();\n this.state = State.BEFORE_ATTRIBUTE_NAME;\n break;\n }\n case $.SOLIDUS: {\n this._leaveAttrValue();\n this.state = State.SELF_CLOSING_START_TAG;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._leaveAttrValue();\n this.state = State.DATA;\n this.emitCurrentTagToken();\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.missingWhitespaceBetweenAttributes);\n this.state = State.BEFORE_ATTRIBUTE_NAME;\n this._stateBeforeAttributeName(cp);\n }\n }\n }\n // Self-closing start tag state\n //------------------------------------------------------------------\n _stateSelfClosingStartTag(cp) {\n switch (cp) {\n case $.GREATER_THAN_SIGN: {\n const token = this.currentToken;\n token.selfClosing = true;\n this.state = State.DATA;\n this.emitCurrentTagToken();\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.unexpectedSolidusInTag);\n this.state = State.BEFORE_ATTRIBUTE_NAME;\n this._stateBeforeAttributeName(cp);\n }\n }\n }\n // Bogus comment state\n //------------------------------------------------------------------\n _stateBogusComment(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.GREATER_THAN_SIGN: {\n this.state = State.DATA;\n this.emitCurrentComment(token);\n break;\n }\n case $.EOF: {\n this.emitCurrentComment(token);\n this._emitEOFToken();\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n token.data += REPLACEMENT_CHARACTER;\n break;\n }\n default: {\n token.data += String.fromCodePoint(cp);\n }\n }\n }\n // Markup declaration open state\n //------------------------------------------------------------------\n _stateMarkupDeclarationOpen(cp) {\n if (this._consumeSequenceIfMatch($$.DASH_DASH, true)) {\n this._createCommentToken($$.DASH_DASH.length + 1);\n this.state = State.COMMENT_START;\n }\n else if (this._consumeSequenceIfMatch($$.DOCTYPE, false)) {\n // NOTE: Doctypes tokens are created without fixed offsets. We keep track of the moment a doctype *might* start here.\n this.currentLocation = this.getCurrentLocation($$.DOCTYPE.length + 1);\n this.state = State.DOCTYPE;\n }\n else if (this._consumeSequenceIfMatch($$.CDATA_START, true)) {\n if (this.inForeignNode) {\n this.state = State.CDATA_SECTION;\n }\n else {\n this._err(ERR.cdataInHtmlContent);\n this._createCommentToken($$.CDATA_START.length + 1);\n this.currentToken.data = '[CDATA[';\n this.state = State.BOGUS_COMMENT;\n }\n }\n //NOTE: Sequence lookups can be abrupted by hibernation. In that case, lookup\n //results are no longer valid and we will need to start over.\n else if (!this._ensureHibernation()) {\n this._err(ERR.incorrectlyOpenedComment);\n this._createCommentToken(2);\n this.state = State.BOGUS_COMMENT;\n this._stateBogusComment(cp);\n }\n }\n // Comment start state\n //------------------------------------------------------------------\n _stateCommentStart(cp) {\n switch (cp) {\n case $.HYPHEN_MINUS: {\n this.state = State.COMMENT_START_DASH;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.abruptClosingOfEmptyComment);\n this.state = State.DATA;\n const token = this.currentToken;\n this.emitCurrentComment(token);\n break;\n }\n default: {\n this.state = State.COMMENT;\n this._stateComment(cp);\n }\n }\n }\n // Comment start dash state\n //------------------------------------------------------------------\n _stateCommentStartDash(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.HYPHEN_MINUS: {\n this.state = State.COMMENT_END;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.abruptClosingOfEmptyComment);\n this.state = State.DATA;\n this.emitCurrentComment(token);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInComment);\n this.emitCurrentComment(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.data += '-';\n this.state = State.COMMENT;\n this._stateComment(cp);\n }\n }\n }\n // Comment state\n //------------------------------------------------------------------\n _stateComment(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.HYPHEN_MINUS: {\n this.state = State.COMMENT_END_DASH;\n break;\n }\n case $.LESS_THAN_SIGN: {\n token.data += '<';\n this.state = State.COMMENT_LESS_THAN_SIGN;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n token.data += REPLACEMENT_CHARACTER;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInComment);\n this.emitCurrentComment(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.data += String.fromCodePoint(cp);\n }\n }\n }\n // Comment less-than sign state\n //------------------------------------------------------------------\n _stateCommentLessThanSign(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.EXCLAMATION_MARK: {\n token.data += '!';\n this.state = State.COMMENT_LESS_THAN_SIGN_BANG;\n break;\n }\n case $.LESS_THAN_SIGN: {\n token.data += '<';\n break;\n }\n default: {\n this.state = State.COMMENT;\n this._stateComment(cp);\n }\n }\n }\n // Comment less-than sign bang state\n //------------------------------------------------------------------\n _stateCommentLessThanSignBang(cp) {\n if (cp === $.HYPHEN_MINUS) {\n this.state = State.COMMENT_LESS_THAN_SIGN_BANG_DASH;\n }\n else {\n this.state = State.COMMENT;\n this._stateComment(cp);\n }\n }\n // Comment less-than sign bang dash state\n //------------------------------------------------------------------\n _stateCommentLessThanSignBangDash(cp) {\n if (cp === $.HYPHEN_MINUS) {\n this.state = State.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH;\n }\n else {\n this.state = State.COMMENT_END_DASH;\n this._stateCommentEndDash(cp);\n }\n }\n // Comment less-than sign bang dash dash state\n //------------------------------------------------------------------\n _stateCommentLessThanSignBangDashDash(cp) {\n if (cp !== $.GREATER_THAN_SIGN && cp !== $.EOF) {\n this._err(ERR.nestedComment);\n }\n this.state = State.COMMENT_END;\n this._stateCommentEnd(cp);\n }\n // Comment end dash state\n //------------------------------------------------------------------\n _stateCommentEndDash(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.HYPHEN_MINUS: {\n this.state = State.COMMENT_END;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInComment);\n this.emitCurrentComment(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.data += '-';\n this.state = State.COMMENT;\n this._stateComment(cp);\n }\n }\n }\n // Comment end state\n //------------------------------------------------------------------\n _stateCommentEnd(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.GREATER_THAN_SIGN: {\n this.state = State.DATA;\n this.emitCurrentComment(token);\n break;\n }\n case $.EXCLAMATION_MARK: {\n this.state = State.COMMENT_END_BANG;\n break;\n }\n case $.HYPHEN_MINUS: {\n token.data += '-';\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInComment);\n this.emitCurrentComment(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.data += '--';\n this.state = State.COMMENT;\n this._stateComment(cp);\n }\n }\n }\n // Comment end bang state\n //------------------------------------------------------------------\n _stateCommentEndBang(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.HYPHEN_MINUS: {\n token.data += '--!';\n this.state = State.COMMENT_END_DASH;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.incorrectlyClosedComment);\n this.state = State.DATA;\n this.emitCurrentComment(token);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInComment);\n this.emitCurrentComment(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.data += '--!';\n this.state = State.COMMENT;\n this._stateComment(cp);\n }\n }\n }\n // DOCTYPE state\n //------------------------------------------------------------------\n _stateDoctype(cp) {\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n this.state = State.BEFORE_DOCTYPE_NAME;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this.state = State.BEFORE_DOCTYPE_NAME;\n this._stateBeforeDoctypeName(cp);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n this._createDoctypeToken(null);\n const token = this.currentToken;\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.missingWhitespaceBeforeDoctypeName);\n this.state = State.BEFORE_DOCTYPE_NAME;\n this._stateBeforeDoctypeName(cp);\n }\n }\n }\n // Before DOCTYPE name state\n //------------------------------------------------------------------\n _stateBeforeDoctypeName(cp) {\n if (isAsciiUpper(cp)) {\n this._createDoctypeToken(String.fromCharCode(toAsciiLower(cp)));\n this.state = State.DOCTYPE_NAME;\n }\n else\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n // Ignore whitespace\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this._createDoctypeToken(REPLACEMENT_CHARACTER);\n this.state = State.DOCTYPE_NAME;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.missingDoctypeName);\n this._createDoctypeToken(null);\n const token = this.currentToken;\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n this._createDoctypeToken(null);\n const token = this.currentToken;\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n this._createDoctypeToken(String.fromCodePoint(cp));\n this.state = State.DOCTYPE_NAME;\n }\n }\n }\n // DOCTYPE name state\n //------------------------------------------------------------------\n _stateDoctypeName(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n this.state = State.AFTER_DOCTYPE_NAME;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this.state = State.DATA;\n this.emitCurrentDoctype(token);\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n token.name += REPLACEMENT_CHARACTER;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.name += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp);\n }\n }\n }\n // After DOCTYPE name state\n //------------------------------------------------------------------\n _stateAfterDoctypeName(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n // Ignore whitespace\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this.state = State.DATA;\n this.emitCurrentDoctype(token);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n if (this._consumeSequenceIfMatch($$.PUBLIC, false)) {\n this.state = State.AFTER_DOCTYPE_PUBLIC_KEYWORD;\n }\n else if (this._consumeSequenceIfMatch($$.SYSTEM, false)) {\n this.state = State.AFTER_DOCTYPE_SYSTEM_KEYWORD;\n }\n //NOTE: sequence lookup can be abrupted by hibernation. In that case lookup\n //results are no longer valid and we will need to start over.\n else if (!this._ensureHibernation()) {\n this._err(ERR.invalidCharacterSequenceAfterDoctypeName);\n token.forceQuirks = true;\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n }\n }\n // After DOCTYPE public keyword state\n //------------------------------------------------------------------\n _stateAfterDoctypePublicKeyword(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n this.state = State.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;\n break;\n }\n case $.QUOTATION_MARK: {\n this._err(ERR.missingWhitespaceAfterDoctypePublicKeyword);\n token.publicId = '';\n this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;\n break;\n }\n case $.APOSTROPHE: {\n this._err(ERR.missingWhitespaceAfterDoctypePublicKeyword);\n token.publicId = '';\n this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.missingDoctypePublicIdentifier);\n token.forceQuirks = true;\n this.state = State.DATA;\n this.emitCurrentDoctype(token);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier);\n token.forceQuirks = true;\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n }\n // Before DOCTYPE public identifier state\n //------------------------------------------------------------------\n _stateBeforeDoctypePublicIdentifier(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n // Ignore whitespace\n break;\n }\n case $.QUOTATION_MARK: {\n token.publicId = '';\n this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;\n break;\n }\n case $.APOSTROPHE: {\n token.publicId = '';\n this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.missingDoctypePublicIdentifier);\n token.forceQuirks = true;\n this.state = State.DATA;\n this.emitCurrentDoctype(token);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier);\n token.forceQuirks = true;\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n }\n // DOCTYPE public identifier (double-quoted) state\n //------------------------------------------------------------------\n _stateDoctypePublicIdentifierDoubleQuoted(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.QUOTATION_MARK: {\n this.state = State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n token.publicId += REPLACEMENT_CHARACTER;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.abruptDoctypePublicIdentifier);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.publicId += String.fromCodePoint(cp);\n }\n }\n }\n // DOCTYPE public identifier (single-quoted) state\n //------------------------------------------------------------------\n _stateDoctypePublicIdentifierSingleQuoted(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.APOSTROPHE: {\n this.state = State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n token.publicId += REPLACEMENT_CHARACTER;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.abruptDoctypePublicIdentifier);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.publicId += String.fromCodePoint(cp);\n }\n }\n }\n // After DOCTYPE public identifier state\n //------------------------------------------------------------------\n _stateAfterDoctypePublicIdentifier(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n this.state = State.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this.state = State.DATA;\n this.emitCurrentDoctype(token);\n break;\n }\n case $.QUOTATION_MARK: {\n this._err(ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers);\n token.systemId = '';\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;\n break;\n }\n case $.APOSTROPHE: {\n this._err(ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers);\n token.systemId = '';\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n }\n // Between DOCTYPE public and system identifiers state\n //------------------------------------------------------------------\n _stateBetweenDoctypePublicAndSystemIdentifiers(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n // Ignore whitespace\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n }\n case $.QUOTATION_MARK: {\n token.systemId = '';\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;\n break;\n }\n case $.APOSTROPHE: {\n token.systemId = '';\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n }\n // After DOCTYPE system keyword state\n //------------------------------------------------------------------\n _stateAfterDoctypeSystemKeyword(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n this.state = State.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;\n break;\n }\n case $.QUOTATION_MARK: {\n this._err(ERR.missingWhitespaceAfterDoctypeSystemKeyword);\n token.systemId = '';\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;\n break;\n }\n case $.APOSTROPHE: {\n this._err(ERR.missingWhitespaceAfterDoctypeSystemKeyword);\n token.systemId = '';\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.missingDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.state = State.DATA;\n this.emitCurrentDoctype(token);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n }\n // Before DOCTYPE system identifier state\n //------------------------------------------------------------------\n _stateBeforeDoctypeSystemIdentifier(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n // Ignore whitespace\n break;\n }\n case $.QUOTATION_MARK: {\n token.systemId = '';\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;\n break;\n }\n case $.APOSTROPHE: {\n token.systemId = '';\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.missingDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.state = State.DATA;\n this.emitCurrentDoctype(token);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n }\n // DOCTYPE system identifier (double-quoted) state\n //------------------------------------------------------------------\n _stateDoctypeSystemIdentifierDoubleQuoted(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.QUOTATION_MARK: {\n this.state = State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n token.systemId += REPLACEMENT_CHARACTER;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.abruptDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.systemId += String.fromCodePoint(cp);\n }\n }\n }\n // DOCTYPE system identifier (single-quoted) state\n //------------------------------------------------------------------\n _stateDoctypeSystemIdentifierSingleQuoted(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.APOSTROPHE: {\n this.state = State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n token.systemId += REPLACEMENT_CHARACTER;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.abruptDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.systemId += String.fromCodePoint(cp);\n }\n }\n }\n // After DOCTYPE system identifier state\n //------------------------------------------------------------------\n _stateAfterDoctypeSystemIdentifier(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n // Ignore whitespace\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.unexpectedCharacterAfterDoctypeSystemIdentifier);\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n }\n // Bogus DOCTYPE state\n //------------------------------------------------------------------\n _stateBogusDoctype(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.GREATER_THAN_SIGN: {\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n break;\n }\n case $.EOF: {\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default:\n // Do nothing\n }\n }\n // CDATA section state\n //------------------------------------------------------------------\n _stateCdataSection(cp) {\n switch (cp) {\n case $.RIGHT_SQUARE_BRACKET: {\n this.state = State.CDATA_SECTION_BRACKET;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInCdata);\n this._emitEOFToken();\n break;\n }\n default: {\n this._emitCodePoint(cp);\n }\n }\n }\n // CDATA section bracket state\n //------------------------------------------------------------------\n _stateCdataSectionBracket(cp) {\n if (cp === $.RIGHT_SQUARE_BRACKET) {\n this.state = State.CDATA_SECTION_END;\n }\n else {\n this._emitChars(']');\n this.state = State.CDATA_SECTION;\n this._stateCdataSection(cp);\n }\n }\n // CDATA section end state\n //------------------------------------------------------------------\n _stateCdataSectionEnd(cp) {\n switch (cp) {\n case $.GREATER_THAN_SIGN: {\n this.state = State.DATA;\n break;\n }\n case $.RIGHT_SQUARE_BRACKET: {\n this._emitChars(']');\n break;\n }\n default: {\n this._emitChars(']]');\n this.state = State.CDATA_SECTION;\n this._stateCdataSection(cp);\n }\n }\n }\n // Character reference state\n //------------------------------------------------------------------\n _stateCharacterReference(cp) {\n if (cp === $.NUMBER_SIGN) {\n this.state = State.NUMERIC_CHARACTER_REFERENCE;\n }\n else if (isAsciiAlphaNumeric(cp)) {\n this.state = State.NAMED_CHARACTER_REFERENCE;\n this._stateNamedCharacterReference(cp);\n }\n else {\n this._flushCodePointConsumedAsCharacterReference($.AMPERSAND);\n this._reconsumeInState(this.returnState, cp);\n }\n }\n // Named character reference state\n //------------------------------------------------------------------\n _stateNamedCharacterReference(cp) {\n const matchResult = this._matchNamedCharacterReference(cp);\n //NOTE: Matching can be abrupted by hibernation. In that case, match\n //results are no longer valid and we will need to start over.\n if (this._ensureHibernation()) {\n // Stay in the state, try again.\n }\n else if (matchResult) {\n for (let i = 0; i < matchResult.length; i++) {\n this._flushCodePointConsumedAsCharacterReference(matchResult[i]);\n }\n this.state = this.returnState;\n }\n else {\n this._flushCodePointConsumedAsCharacterReference($.AMPERSAND);\n this.state = State.AMBIGUOUS_AMPERSAND;\n }\n }\n // Ambiguos ampersand state\n //------------------------------------------------------------------\n _stateAmbiguousAmpersand(cp) {\n if (isAsciiAlphaNumeric(cp)) {\n this._flushCodePointConsumedAsCharacterReference(cp);\n }\n else {\n if (cp === $.SEMICOLON) {\n this._err(ERR.unknownNamedCharacterReference);\n }\n this._reconsumeInState(this.returnState, cp);\n }\n }\n // Numeric character reference state\n //------------------------------------------------------------------\n _stateNumericCharacterReference(cp) {\n this.charRefCode = 0;\n if (cp === $.LATIN_SMALL_X || cp === $.LATIN_CAPITAL_X) {\n this.state = State.HEXADEMICAL_CHARACTER_REFERENCE_START;\n }\n // Inlined decimal character reference start state\n else if (isAsciiDigit(cp)) {\n this.state = State.DECIMAL_CHARACTER_REFERENCE;\n this._stateDecimalCharacterReference(cp);\n }\n else {\n this._err(ERR.absenceOfDigitsInNumericCharacterReference);\n this._flushCodePointConsumedAsCharacterReference($.AMPERSAND);\n this._flushCodePointConsumedAsCharacterReference($.NUMBER_SIGN);\n this._reconsumeInState(this.returnState, cp);\n }\n }\n // Hexademical character reference start state\n //------------------------------------------------------------------\n _stateHexademicalCharacterReferenceStart(cp) {\n if (isAsciiHexDigit(cp)) {\n this.state = State.HEXADEMICAL_CHARACTER_REFERENCE;\n this._stateHexademicalCharacterReference(cp);\n }\n else {\n this._err(ERR.absenceOfDigitsInNumericCharacterReference);\n this._flushCodePointConsumedAsCharacterReference($.AMPERSAND);\n this._flushCodePointConsumedAsCharacterReference($.NUMBER_SIGN);\n this._unconsume(2);\n this.state = this.returnState;\n }\n }\n // Hexademical character reference state\n //------------------------------------------------------------------\n _stateHexademicalCharacterReference(cp) {\n if (isAsciiUpperHexDigit(cp)) {\n this.charRefCode = this.charRefCode * 16 + cp - 0x37;\n }\n else if (isAsciiLowerHexDigit(cp)) {\n this.charRefCode = this.charRefCode * 16 + cp - 0x57;\n }\n else if (isAsciiDigit(cp)) {\n this.charRefCode = this.charRefCode * 16 + cp - 0x30;\n }\n else if (cp === $.SEMICOLON) {\n this.state = State.NUMERIC_CHARACTER_REFERENCE_END;\n }\n else {\n this._err(ERR.missingSemicolonAfterCharacterReference);\n this.state = State.NUMERIC_CHARACTER_REFERENCE_END;\n this._stateNumericCharacterReferenceEnd(cp);\n }\n }\n // Decimal character reference state\n //------------------------------------------------------------------\n _stateDecimalCharacterReference(cp) {\n if (isAsciiDigit(cp)) {\n this.charRefCode = this.charRefCode * 10 + cp - 0x30;\n }\n else if (cp === $.SEMICOLON) {\n this.state = State.NUMERIC_CHARACTER_REFERENCE_END;\n }\n else {\n this._err(ERR.missingSemicolonAfterCharacterReference);\n this.state = State.NUMERIC_CHARACTER_REFERENCE_END;\n this._stateNumericCharacterReferenceEnd(cp);\n }\n }\n // Numeric character reference end state\n //------------------------------------------------------------------\n _stateNumericCharacterReferenceEnd(cp) {\n if (this.charRefCode === $.NULL) {\n this._err(ERR.nullCharacterReference);\n this.charRefCode = $.REPLACEMENT_CHARACTER;\n }\n else if (this.charRefCode > 1114111) {\n this._err(ERR.characterReferenceOutsideUnicodeRange);\n this.charRefCode = $.REPLACEMENT_CHARACTER;\n }\n else if (isSurrogate(this.charRefCode)) {\n this._err(ERR.surrogateCharacterReference);\n this.charRefCode = $.REPLACEMENT_CHARACTER;\n }\n else if (isUndefinedCodePoint(this.charRefCode)) {\n this._err(ERR.noncharacterCharacterReference);\n }\n else if (isControlCodePoint(this.charRefCode) || this.charRefCode === $.CARRIAGE_RETURN) {\n this._err(ERR.controlCharacterReference);\n const replacement = C1_CONTROLS_REFERENCE_REPLACEMENTS.get(this.charRefCode);\n if (replacement !== undefined) {\n this.charRefCode = replacement;\n }\n }\n this._flushCodePointConsumedAsCharacterReference(this.charRefCode);\n this._reconsumeInState(this.returnState, cp);\n }\n}\n//# sourceMappingURL=index.js.map","import { TAG_ID as $, NS, isNumberedHeader } from '../common/html.js';\n//Element utils\nconst IMPLICIT_END_TAG_REQUIRED = new Set([$.DD, $.DT, $.LI, $.OPTGROUP, $.OPTION, $.P, $.RB, $.RP, $.RT, $.RTC]);\nconst IMPLICIT_END_TAG_REQUIRED_THOROUGHLY = new Set([\n ...IMPLICIT_END_TAG_REQUIRED,\n $.CAPTION,\n $.COLGROUP,\n $.TBODY,\n $.TD,\n $.TFOOT,\n $.TH,\n $.THEAD,\n $.TR,\n]);\nconst SCOPING_ELEMENT_NS = new Map([\n [$.APPLET, NS.HTML],\n [$.CAPTION, NS.HTML],\n [$.HTML, NS.HTML],\n [$.MARQUEE, NS.HTML],\n [$.OBJECT, NS.HTML],\n [$.TABLE, NS.HTML],\n [$.TD, NS.HTML],\n [$.TEMPLATE, NS.HTML],\n [$.TH, NS.HTML],\n [$.ANNOTATION_XML, NS.MATHML],\n [$.MI, NS.MATHML],\n [$.MN, NS.MATHML],\n [$.MO, NS.MATHML],\n [$.MS, NS.MATHML],\n [$.MTEXT, NS.MATHML],\n [$.DESC, NS.SVG],\n [$.FOREIGN_OBJECT, NS.SVG],\n [$.TITLE, NS.SVG],\n]);\nconst NAMED_HEADERS = [$.H1, $.H2, $.H3, $.H4, $.H5, $.H6];\nconst TABLE_ROW_CONTEXT = [$.TR, $.TEMPLATE, $.HTML];\nconst TABLE_BODY_CONTEXT = [$.TBODY, $.TFOOT, $.THEAD, $.TEMPLATE, $.HTML];\nconst TABLE_CONTEXT = [$.TABLE, $.TEMPLATE, $.HTML];\nconst TABLE_CELLS = [$.TD, $.TH];\n//Stack of open elements\nexport class OpenElementStack {\n get currentTmplContentOrNode() {\n return this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : this.current;\n }\n constructor(document, treeAdapter, handler) {\n this.treeAdapter = treeAdapter;\n this.handler = handler;\n this.items = [];\n this.tagIDs = [];\n this.stackTop = -1;\n this.tmplCount = 0;\n this.currentTagId = $.UNKNOWN;\n this.current = document;\n }\n //Index of element\n _indexOf(element) {\n return this.items.lastIndexOf(element, this.stackTop);\n }\n //Update current element\n _isInTemplate() {\n return this.currentTagId === $.TEMPLATE && this.treeAdapter.getNamespaceURI(this.current) === NS.HTML;\n }\n _updateCurrentElement() {\n this.current = this.items[this.stackTop];\n this.currentTagId = this.tagIDs[this.stackTop];\n }\n //Mutations\n push(element, tagID) {\n this.stackTop++;\n this.items[this.stackTop] = element;\n this.current = element;\n this.tagIDs[this.stackTop] = tagID;\n this.currentTagId = tagID;\n if (this._isInTemplate()) {\n this.tmplCount++;\n }\n this.handler.onItemPush(element, tagID, true);\n }\n pop() {\n const popped = this.current;\n if (this.tmplCount > 0 && this._isInTemplate()) {\n this.tmplCount--;\n }\n this.stackTop--;\n this._updateCurrentElement();\n this.handler.onItemPop(popped, true);\n }\n replace(oldElement, newElement) {\n const idx = this._indexOf(oldElement);\n this.items[idx] = newElement;\n if (idx === this.stackTop) {\n this.current = newElement;\n }\n }\n insertAfter(referenceElement, newElement, newElementID) {\n const insertionIdx = this._indexOf(referenceElement) + 1;\n this.items.splice(insertionIdx, 0, newElement);\n this.tagIDs.splice(insertionIdx, 0, newElementID);\n this.stackTop++;\n if (insertionIdx === this.stackTop) {\n this._updateCurrentElement();\n }\n this.handler.onItemPush(this.current, this.currentTagId, insertionIdx === this.stackTop);\n }\n popUntilTagNamePopped(tagName) {\n let targetIdx = this.stackTop + 1;\n do {\n targetIdx = this.tagIDs.lastIndexOf(tagName, targetIdx - 1);\n } while (targetIdx > 0 && this.treeAdapter.getNamespaceURI(this.items[targetIdx]) !== NS.HTML);\n this.shortenToLength(targetIdx < 0 ? 0 : targetIdx);\n }\n shortenToLength(idx) {\n while (this.stackTop >= idx) {\n const popped = this.current;\n if (this.tmplCount > 0 && this._isInTemplate()) {\n this.tmplCount -= 1;\n }\n this.stackTop--;\n this._updateCurrentElement();\n this.handler.onItemPop(popped, this.stackTop < idx);\n }\n }\n popUntilElementPopped(element) {\n const idx = this._indexOf(element);\n this.shortenToLength(idx < 0 ? 0 : idx);\n }\n popUntilPopped(tagNames, targetNS) {\n const idx = this._indexOfTagNames(tagNames, targetNS);\n this.shortenToLength(idx < 0 ? 0 : idx);\n }\n popUntilNumberedHeaderPopped() {\n this.popUntilPopped(NAMED_HEADERS, NS.HTML);\n }\n popUntilTableCellPopped() {\n this.popUntilPopped(TABLE_CELLS, NS.HTML);\n }\n popAllUpToHtmlElement() {\n //NOTE: here we assume that the root element is always first in the open element stack, so\n //we perform this fast stack clean up.\n this.tmplCount = 0;\n this.shortenToLength(1);\n }\n _indexOfTagNames(tagNames, namespace) {\n for (let i = this.stackTop; i >= 0; i--) {\n if (tagNames.includes(this.tagIDs[i]) && this.treeAdapter.getNamespaceURI(this.items[i]) === namespace) {\n return i;\n }\n }\n return -1;\n }\n clearBackTo(tagNames, targetNS) {\n const idx = this._indexOfTagNames(tagNames, targetNS);\n this.shortenToLength(idx + 1);\n }\n clearBackToTableContext() {\n this.clearBackTo(TABLE_CONTEXT, NS.HTML);\n }\n clearBackToTableBodyContext() {\n this.clearBackTo(TABLE_BODY_CONTEXT, NS.HTML);\n }\n clearBackToTableRowContext() {\n this.clearBackTo(TABLE_ROW_CONTEXT, NS.HTML);\n }\n remove(element) {\n const idx = this._indexOf(element);\n if (idx >= 0) {\n if (idx === this.stackTop) {\n this.pop();\n }\n else {\n this.items.splice(idx, 1);\n this.tagIDs.splice(idx, 1);\n this.stackTop--;\n this._updateCurrentElement();\n this.handler.onItemPop(element, false);\n }\n }\n }\n //Search\n tryPeekProperlyNestedBodyElement() {\n //Properly nested element (should be second element in stack).\n return this.stackTop >= 1 && this.tagIDs[1] === $.BODY ? this.items[1] : null;\n }\n contains(element) {\n return this._indexOf(element) > -1;\n }\n getCommonAncestor(element) {\n const elementIdx = this._indexOf(element) - 1;\n return elementIdx >= 0 ? this.items[elementIdx] : null;\n }\n isRootHtmlElementCurrent() {\n return this.stackTop === 0 && this.tagIDs[0] === $.HTML;\n }\n //Element in scope\n hasInScope(tagName) {\n for (let i = this.stackTop; i >= 0; i--) {\n const tn = this.tagIDs[i];\n const ns = this.treeAdapter.getNamespaceURI(this.items[i]);\n if (tn === tagName && ns === NS.HTML) {\n return true;\n }\n if (SCOPING_ELEMENT_NS.get(tn) === ns) {\n return false;\n }\n }\n return true;\n }\n hasNumberedHeaderInScope() {\n for (let i = this.stackTop; i >= 0; i--) {\n const tn = this.tagIDs[i];\n const ns = this.treeAdapter.getNamespaceURI(this.items[i]);\n if (isNumberedHeader(tn) && ns === NS.HTML) {\n return true;\n }\n if (SCOPING_ELEMENT_NS.get(tn) === ns) {\n return false;\n }\n }\n return true;\n }\n hasInListItemScope(tagName) {\n for (let i = this.stackTop; i >= 0; i--) {\n const tn = this.tagIDs[i];\n const ns = this.treeAdapter.getNamespaceURI(this.items[i]);\n if (tn === tagName && ns === NS.HTML) {\n return true;\n }\n if (((tn === $.UL || tn === $.OL) && ns === NS.HTML) || SCOPING_ELEMENT_NS.get(tn) === ns) {\n return false;\n }\n }\n return true;\n }\n hasInButtonScope(tagName) {\n for (let i = this.stackTop; i >= 0; i--) {\n const tn = this.tagIDs[i];\n const ns = this.treeAdapter.getNamespaceURI(this.items[i]);\n if (tn === tagName && ns === NS.HTML) {\n return true;\n }\n if ((tn === $.BUTTON && ns === NS.HTML) || SCOPING_ELEMENT_NS.get(tn) === ns) {\n return false;\n }\n }\n return true;\n }\n hasInTableScope(tagName) {\n for (let i = this.stackTop; i >= 0; i--) {\n const tn = this.tagIDs[i];\n const ns = this.treeAdapter.getNamespaceURI(this.items[i]);\n if (ns !== NS.HTML) {\n continue;\n }\n if (tn === tagName) {\n return true;\n }\n if (tn === $.TABLE || tn === $.TEMPLATE || tn === $.HTML) {\n return false;\n }\n }\n return true;\n }\n hasTableBodyContextInTableScope() {\n for (let i = this.stackTop; i >= 0; i--) {\n const tn = this.tagIDs[i];\n const ns = this.treeAdapter.getNamespaceURI(this.items[i]);\n if (ns !== NS.HTML) {\n continue;\n }\n if (tn === $.TBODY || tn === $.THEAD || tn === $.TFOOT) {\n return true;\n }\n if (tn === $.TABLE || tn === $.HTML) {\n return false;\n }\n }\n return true;\n }\n hasInSelectScope(tagName) {\n for (let i = this.stackTop; i >= 0; i--) {\n const tn = this.tagIDs[i];\n const ns = this.treeAdapter.getNamespaceURI(this.items[i]);\n if (ns !== NS.HTML) {\n continue;\n }\n if (tn === tagName) {\n return true;\n }\n if (tn !== $.OPTION && tn !== $.OPTGROUP) {\n return false;\n }\n }\n return true;\n }\n //Implied end tags\n generateImpliedEndTags() {\n while (IMPLICIT_END_TAG_REQUIRED.has(this.currentTagId)) {\n this.pop();\n }\n }\n generateImpliedEndTagsThoroughly() {\n while (IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId)) {\n this.pop();\n }\n }\n generateImpliedEndTagsWithExclusion(exclusionId) {\n while (this.currentTagId !== exclusionId && IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId)) {\n this.pop();\n }\n }\n}\n//# sourceMappingURL=open-element-stack.js.map","//Const\nconst NOAH_ARK_CAPACITY = 3;\nexport var EntryType;\n(function (EntryType) {\n EntryType[EntryType[\"Marker\"] = 0] = \"Marker\";\n EntryType[EntryType[\"Element\"] = 1] = \"Element\";\n})(EntryType = EntryType || (EntryType = {}));\nconst MARKER = { type: EntryType.Marker };\n//List of formatting elements\nexport class FormattingElementList {\n constructor(treeAdapter) {\n this.treeAdapter = treeAdapter;\n this.entries = [];\n this.bookmark = null;\n }\n //Noah Ark's condition\n //OPTIMIZATION: at first we try to find possible candidates for exclusion using\n //lightweight heuristics without thorough attributes check.\n _getNoahArkConditionCandidates(newElement, neAttrs) {\n const candidates = [];\n const neAttrsLength = neAttrs.length;\n const neTagName = this.treeAdapter.getTagName(newElement);\n const neNamespaceURI = this.treeAdapter.getNamespaceURI(newElement);\n for (let i = 0; i < this.entries.length; i++) {\n const entry = this.entries[i];\n if (entry.type === EntryType.Marker) {\n break;\n }\n const { element } = entry;\n if (this.treeAdapter.getTagName(element) === neTagName &&\n this.treeAdapter.getNamespaceURI(element) === neNamespaceURI) {\n const elementAttrs = this.treeAdapter.getAttrList(element);\n if (elementAttrs.length === neAttrsLength) {\n candidates.push({ idx: i, attrs: elementAttrs });\n }\n }\n }\n return candidates;\n }\n _ensureNoahArkCondition(newElement) {\n if (this.entries.length < NOAH_ARK_CAPACITY)\n return;\n const neAttrs = this.treeAdapter.getAttrList(newElement);\n const candidates = this._getNoahArkConditionCandidates(newElement, neAttrs);\n if (candidates.length < NOAH_ARK_CAPACITY)\n return;\n //NOTE: build attrs map for the new element, so we can perform fast lookups\n const neAttrsMap = new Map(neAttrs.map((neAttr) => [neAttr.name, neAttr.value]));\n let validCandidates = 0;\n //NOTE: remove bottommost candidates, until Noah's Ark condition will not be met\n for (let i = 0; i < candidates.length; i++) {\n const candidate = candidates[i];\n // We know that `candidate.attrs.length === neAttrs.length`\n if (candidate.attrs.every((cAttr) => neAttrsMap.get(cAttr.name) === cAttr.value)) {\n validCandidates += 1;\n if (validCandidates >= NOAH_ARK_CAPACITY) {\n this.entries.splice(candidate.idx, 1);\n }\n }\n }\n }\n //Mutations\n insertMarker() {\n this.entries.unshift(MARKER);\n }\n pushElement(element, token) {\n this._ensureNoahArkCondition(element);\n this.entries.unshift({\n type: EntryType.Element,\n element,\n token,\n });\n }\n insertElementAfterBookmark(element, token) {\n const bookmarkIdx = this.entries.indexOf(this.bookmark);\n this.entries.splice(bookmarkIdx, 0, {\n type: EntryType.Element,\n element,\n token,\n });\n }\n removeEntry(entry) {\n const entryIndex = this.entries.indexOf(entry);\n if (entryIndex >= 0) {\n this.entries.splice(entryIndex, 1);\n }\n }\n /**\n * Clears the list of formatting elements up to the last marker.\n *\n * @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-list-of-active-formatting-elements-up-to-the-last-marker\n */\n clearToLastMarker() {\n const markerIdx = this.entries.indexOf(MARKER);\n if (markerIdx >= 0) {\n this.entries.splice(0, markerIdx + 1);\n }\n else {\n this.entries.length = 0;\n }\n }\n //Search\n getElementEntryInScopeWithTagName(tagName) {\n const entry = this.entries.find((entry) => entry.type === EntryType.Marker || this.treeAdapter.getTagName(entry.element) === tagName);\n return entry && entry.type === EntryType.Element ? entry : null;\n }\n getElementEntry(element) {\n return this.entries.find((entry) => entry.type === EntryType.Element && entry.element === element);\n }\n}\n//# sourceMappingURL=formatting-element-list.js.map","import { DOCUMENT_MODE } from '../common/html.js';\nfunction createTextNode(value) {\n return {\n nodeName: '#text',\n value,\n parentNode: null,\n };\n}\nexport const defaultTreeAdapter = {\n //Node construction\n createDocument() {\n return {\n nodeName: '#document',\n mode: DOCUMENT_MODE.NO_QUIRKS,\n childNodes: [],\n };\n },\n createDocumentFragment() {\n return {\n nodeName: '#document-fragment',\n childNodes: [],\n };\n },\n createElement(tagName, namespaceURI, attrs) {\n return {\n nodeName: tagName,\n tagName,\n attrs,\n namespaceURI,\n childNodes: [],\n parentNode: null,\n };\n },\n createCommentNode(data) {\n return {\n nodeName: '#comment',\n data,\n parentNode: null,\n };\n },\n //Tree mutation\n appendChild(parentNode, newNode) {\n parentNode.childNodes.push(newNode);\n newNode.parentNode = parentNode;\n },\n insertBefore(parentNode, newNode, referenceNode) {\n const insertionIdx = parentNode.childNodes.indexOf(referenceNode);\n parentNode.childNodes.splice(insertionIdx, 0, newNode);\n newNode.parentNode = parentNode;\n },\n setTemplateContent(templateElement, contentElement) {\n templateElement.content = contentElement;\n },\n getTemplateContent(templateElement) {\n return templateElement.content;\n },\n setDocumentType(document, name, publicId, systemId) {\n const doctypeNode = document.childNodes.find((node) => node.nodeName === '#documentType');\n if (doctypeNode) {\n doctypeNode.name = name;\n doctypeNode.publicId = publicId;\n doctypeNode.systemId = systemId;\n }\n else {\n const node = {\n nodeName: '#documentType',\n name,\n publicId,\n systemId,\n parentNode: null,\n };\n defaultTreeAdapter.appendChild(document, node);\n }\n },\n setDocumentMode(document, mode) {\n document.mode = mode;\n },\n getDocumentMode(document) {\n return document.mode;\n },\n detachNode(node) {\n if (node.parentNode) {\n const idx = node.parentNode.childNodes.indexOf(node);\n node.parentNode.childNodes.splice(idx, 1);\n node.parentNode = null;\n }\n },\n insertText(parentNode, text) {\n if (parentNode.childNodes.length > 0) {\n const prevNode = parentNode.childNodes[parentNode.childNodes.length - 1];\n if (defaultTreeAdapter.isTextNode(prevNode)) {\n prevNode.value += text;\n return;\n }\n }\n defaultTreeAdapter.appendChild(parentNode, createTextNode(text));\n },\n insertTextBefore(parentNode, text, referenceNode) {\n const prevNode = parentNode.childNodes[parentNode.childNodes.indexOf(referenceNode) - 1];\n if (prevNode && defaultTreeAdapter.isTextNode(prevNode)) {\n prevNode.value += text;\n }\n else {\n defaultTreeAdapter.insertBefore(parentNode, createTextNode(text), referenceNode);\n }\n },\n adoptAttributes(recipient, attrs) {\n const recipientAttrsMap = new Set(recipient.attrs.map((attr) => attr.name));\n for (let j = 0; j < attrs.length; j++) {\n if (!recipientAttrsMap.has(attrs[j].name)) {\n recipient.attrs.push(attrs[j]);\n }\n }\n },\n //Tree traversing\n getFirstChild(node) {\n return node.childNodes[0];\n },\n getChildNodes(node) {\n return node.childNodes;\n },\n getParentNode(node) {\n return node.parentNode;\n },\n getAttrList(element) {\n return element.attrs;\n },\n //Node data\n getTagName(element) {\n return element.tagName;\n },\n getNamespaceURI(element) {\n return element.namespaceURI;\n },\n getTextNodeContent(textNode) {\n return textNode.value;\n },\n getCommentNodeContent(commentNode) {\n return commentNode.data;\n },\n getDocumentTypeNodeName(doctypeNode) {\n return doctypeNode.name;\n },\n getDocumentTypeNodePublicId(doctypeNode) {\n return doctypeNode.publicId;\n },\n getDocumentTypeNodeSystemId(doctypeNode) {\n return doctypeNode.systemId;\n },\n //Node types\n isTextNode(node) {\n return node.nodeName === '#text';\n },\n isCommentNode(node) {\n return node.nodeName === '#comment';\n },\n isDocumentTypeNode(node) {\n return node.nodeName === '#documentType';\n },\n isElementNode(node) {\n return Object.prototype.hasOwnProperty.call(node, 'tagName');\n },\n // Source code location\n setNodeSourceCodeLocation(node, location) {\n node.sourceCodeLocation = location;\n },\n getNodeSourceCodeLocation(node) {\n return node.sourceCodeLocation;\n },\n updateNodeSourceCodeLocation(node, endLocation) {\n node.sourceCodeLocation = { ...node.sourceCodeLocation, ...endLocation };\n },\n};\n//# sourceMappingURL=default.js.map","import { DOCUMENT_MODE } from './html.js';\n//Const\nconst VALID_DOCTYPE_NAME = 'html';\nconst VALID_SYSTEM_ID = 'about:legacy-compat';\nconst QUIRKS_MODE_SYSTEM_ID = 'http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd';\nconst QUIRKS_MODE_PUBLIC_ID_PREFIXES = [\n '+//silmaril//dtd html pro v0r11 19970101//',\n '-//as//dtd html 3.0 aswedit + extensions//',\n '-//advasoft ltd//dtd html 3.0 aswedit + extensions//',\n '-//ietf//dtd html 2.0 level 1//',\n '-//ietf//dtd html 2.0 level 2//',\n '-//ietf//dtd html 2.0 strict level 1//',\n '-//ietf//dtd html 2.0 strict level 2//',\n '-//ietf//dtd html 2.0 strict//',\n '-//ietf//dtd html 2.0//',\n '-//ietf//dtd html 2.1e//',\n '-//ietf//dtd html 3.0//',\n '-//ietf//dtd html 3.2 final//',\n '-//ietf//dtd html 3.2//',\n '-//ietf//dtd html 3//',\n '-//ietf//dtd html level 0//',\n '-//ietf//dtd html level 1//',\n '-//ietf//dtd html level 2//',\n '-//ietf//dtd html level 3//',\n '-//ietf//dtd html strict level 0//',\n '-//ietf//dtd html strict level 1//',\n '-//ietf//dtd html strict level 2//',\n '-//ietf//dtd html strict level 3//',\n '-//ietf//dtd html strict//',\n '-//ietf//dtd html//',\n '-//metrius//dtd metrius presentational//',\n '-//microsoft//dtd internet explorer 2.0 html strict//',\n '-//microsoft//dtd internet explorer 2.0 html//',\n '-//microsoft//dtd internet explorer 2.0 tables//',\n '-//microsoft//dtd internet explorer 3.0 html strict//',\n '-//microsoft//dtd internet explorer 3.0 html//',\n '-//microsoft//dtd internet explorer 3.0 tables//',\n '-//netscape comm. corp.//dtd html//',\n '-//netscape comm. corp.//dtd strict html//',\n \"-//o'reilly and associates//dtd html 2.0//\",\n \"-//o'reilly and associates//dtd html extended 1.0//\",\n \"-//o'reilly and associates//dtd html extended relaxed 1.0//\",\n '-//sq//dtd html 2.0 hotmetal + extensions//',\n '-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//',\n '-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//',\n '-//spyglass//dtd html 2.0 extended//',\n '-//sun microsystems corp.//dtd hotjava html//',\n '-//sun microsystems corp.//dtd hotjava strict html//',\n '-//w3c//dtd html 3 1995-03-24//',\n '-//w3c//dtd html 3.2 draft//',\n '-//w3c//dtd html 3.2 final//',\n '-//w3c//dtd html 3.2//',\n '-//w3c//dtd html 3.2s draft//',\n '-//w3c//dtd html 4.0 frameset//',\n '-//w3c//dtd html 4.0 transitional//',\n '-//w3c//dtd html experimental 19960712//',\n '-//w3c//dtd html experimental 970421//',\n '-//w3c//dtd w3 html//',\n '-//w3o//dtd w3 html 3.0//',\n '-//webtechs//dtd mozilla html 2.0//',\n '-//webtechs//dtd mozilla html//',\n];\nconst QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES = [\n ...QUIRKS_MODE_PUBLIC_ID_PREFIXES,\n '-//w3c//dtd html 4.01 frameset//',\n '-//w3c//dtd html 4.01 transitional//',\n];\nconst QUIRKS_MODE_PUBLIC_IDS = new Set([\n '-//w3o//dtd w3 html strict 3.0//en//',\n '-/w3c/dtd html 4.0 transitional/en',\n 'html',\n]);\nconst LIMITED_QUIRKS_PUBLIC_ID_PREFIXES = ['-//w3c//dtd xhtml 1.0 frameset//', '-//w3c//dtd xhtml 1.0 transitional//'];\nconst LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES = [\n ...LIMITED_QUIRKS_PUBLIC_ID_PREFIXES,\n '-//w3c//dtd html 4.01 frameset//',\n '-//w3c//dtd html 4.01 transitional//',\n];\n//Utils\nfunction hasPrefix(publicId, prefixes) {\n return prefixes.some((prefix) => publicId.startsWith(prefix));\n}\n//API\nexport function isConforming(token) {\n return (token.name === VALID_DOCTYPE_NAME &&\n token.publicId === null &&\n (token.systemId === null || token.systemId === VALID_SYSTEM_ID));\n}\nexport function getDocumentMode(token) {\n if (token.name !== VALID_DOCTYPE_NAME) {\n return DOCUMENT_MODE.QUIRKS;\n }\n const { systemId } = token;\n if (systemId && systemId.toLowerCase() === QUIRKS_MODE_SYSTEM_ID) {\n return DOCUMENT_MODE.QUIRKS;\n }\n let { publicId } = token;\n if (publicId !== null) {\n publicId = publicId.toLowerCase();\n if (QUIRKS_MODE_PUBLIC_IDS.has(publicId)) {\n return DOCUMENT_MODE.QUIRKS;\n }\n let prefixes = systemId === null ? QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES : QUIRKS_MODE_PUBLIC_ID_PREFIXES;\n if (hasPrefix(publicId, prefixes)) {\n return DOCUMENT_MODE.QUIRKS;\n }\n prefixes =\n systemId === null ? LIMITED_QUIRKS_PUBLIC_ID_PREFIXES : LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES;\n if (hasPrefix(publicId, prefixes)) {\n return DOCUMENT_MODE.LIMITED_QUIRKS;\n }\n }\n return DOCUMENT_MODE.NO_QUIRKS;\n}\n//# sourceMappingURL=doctype.js.map","import { TAG_ID as $, NS, ATTRS, getTagID } from './html.js';\n//MIME types\nconst MIME_TYPES = {\n TEXT_HTML: 'text/html',\n APPLICATION_XML: 'application/xhtml+xml',\n};\n//Attributes\nconst DEFINITION_URL_ATTR = 'definitionurl';\nconst ADJUSTED_DEFINITION_URL_ATTR = 'definitionURL';\nconst SVG_ATTRS_ADJUSTMENT_MAP = new Map([\n 'attributeName',\n 'attributeType',\n 'baseFrequency',\n 'baseProfile',\n 'calcMode',\n 'clipPathUnits',\n 'diffuseConstant',\n 'edgeMode',\n 'filterUnits',\n 'glyphRef',\n 'gradientTransform',\n 'gradientUnits',\n 'kernelMatrix',\n 'kernelUnitLength',\n 'keyPoints',\n 'keySplines',\n 'keyTimes',\n 'lengthAdjust',\n 'limitingConeAngle',\n 'markerHeight',\n 'markerUnits',\n 'markerWidth',\n 'maskContentUnits',\n 'maskUnits',\n 'numOctaves',\n 'pathLength',\n 'patternContentUnits',\n 'patternTransform',\n 'patternUnits',\n 'pointsAtX',\n 'pointsAtY',\n 'pointsAtZ',\n 'preserveAlpha',\n 'preserveAspectRatio',\n 'primitiveUnits',\n 'refX',\n 'refY',\n 'repeatCount',\n 'repeatDur',\n 'requiredExtensions',\n 'requiredFeatures',\n 'specularConstant',\n 'specularExponent',\n 'spreadMethod',\n 'startOffset',\n 'stdDeviation',\n 'stitchTiles',\n 'surfaceScale',\n 'systemLanguage',\n 'tableValues',\n 'targetX',\n 'targetY',\n 'textLength',\n 'viewBox',\n 'viewTarget',\n 'xChannelSelector',\n 'yChannelSelector',\n 'zoomAndPan',\n].map((attr) => [attr.toLowerCase(), attr]));\nconst XML_ATTRS_ADJUSTMENT_MAP = new Map([\n ['xlink:actuate', { prefix: 'xlink', name: 'actuate', namespace: NS.XLINK }],\n ['xlink:arcrole', { prefix: 'xlink', name: 'arcrole', namespace: NS.XLINK }],\n ['xlink:href', { prefix: 'xlink', name: 'href', namespace: NS.XLINK }],\n ['xlink:role', { prefix: 'xlink', name: 'role', namespace: NS.XLINK }],\n ['xlink:show', { prefix: 'xlink', name: 'show', namespace: NS.XLINK }],\n ['xlink:title', { prefix: 'xlink', name: 'title', namespace: NS.XLINK }],\n ['xlink:type', { prefix: 'xlink', name: 'type', namespace: NS.XLINK }],\n ['xml:base', { prefix: 'xml', name: 'base', namespace: NS.XML }],\n ['xml:lang', { prefix: 'xml', name: 'lang', namespace: NS.XML }],\n ['xml:space', { prefix: 'xml', name: 'space', namespace: NS.XML }],\n ['xmlns', { prefix: '', name: 'xmlns', namespace: NS.XMLNS }],\n ['xmlns:xlink', { prefix: 'xmlns', name: 'xlink', namespace: NS.XMLNS }],\n]);\n//SVG tag names adjustment map\nexport const SVG_TAG_NAMES_ADJUSTMENT_MAP = new Map([\n 'altGlyph',\n 'altGlyphDef',\n 'altGlyphItem',\n 'animateColor',\n 'animateMotion',\n 'animateTransform',\n 'clipPath',\n 'feBlend',\n 'feColorMatrix',\n 'feComponentTransfer',\n 'feComposite',\n 'feConvolveMatrix',\n 'feDiffuseLighting',\n 'feDisplacementMap',\n 'feDistantLight',\n 'feFlood',\n 'feFuncA',\n 'feFuncB',\n 'feFuncG',\n 'feFuncR',\n 'feGaussianBlur',\n 'feImage',\n 'feMerge',\n 'feMergeNode',\n 'feMorphology',\n 'feOffset',\n 'fePointLight',\n 'feSpecularLighting',\n 'feSpotLight',\n 'feTile',\n 'feTurbulence',\n 'foreignObject',\n 'glyphRef',\n 'linearGradient',\n 'radialGradient',\n 'textPath',\n].map((tn) => [tn.toLowerCase(), tn]));\n//Tags that causes exit from foreign content\nconst EXITS_FOREIGN_CONTENT = new Set([\n $.B,\n $.BIG,\n $.BLOCKQUOTE,\n $.BODY,\n $.BR,\n $.CENTER,\n $.CODE,\n $.DD,\n $.DIV,\n $.DL,\n $.DT,\n $.EM,\n $.EMBED,\n $.H1,\n $.H2,\n $.H3,\n $.H4,\n $.H5,\n $.H6,\n $.HEAD,\n $.HR,\n $.I,\n $.IMG,\n $.LI,\n $.LISTING,\n $.MENU,\n $.META,\n $.NOBR,\n $.OL,\n $.P,\n $.PRE,\n $.RUBY,\n $.S,\n $.SMALL,\n $.SPAN,\n $.STRONG,\n $.STRIKE,\n $.SUB,\n $.SUP,\n $.TABLE,\n $.TT,\n $.U,\n $.UL,\n $.VAR,\n]);\n//Check exit from foreign content\nexport function causesExit(startTagToken) {\n const tn = startTagToken.tagID;\n const isFontWithAttrs = tn === $.FONT &&\n startTagToken.attrs.some(({ name }) => name === ATTRS.COLOR || name === ATTRS.SIZE || name === ATTRS.FACE);\n return isFontWithAttrs || EXITS_FOREIGN_CONTENT.has(tn);\n}\n//Token adjustments\nexport function adjustTokenMathMLAttrs(token) {\n for (let i = 0; i < token.attrs.length; i++) {\n if (token.attrs[i].name === DEFINITION_URL_ATTR) {\n token.attrs[i].name = ADJUSTED_DEFINITION_URL_ATTR;\n break;\n }\n }\n}\nexport function adjustTokenSVGAttrs(token) {\n for (let i = 0; i < token.attrs.length; i++) {\n const adjustedAttrName = SVG_ATTRS_ADJUSTMENT_MAP.get(token.attrs[i].name);\n if (adjustedAttrName != null) {\n token.attrs[i].name = adjustedAttrName;\n }\n }\n}\nexport function adjustTokenXMLAttrs(token) {\n for (let i = 0; i < token.attrs.length; i++) {\n const adjustedAttrEntry = XML_ATTRS_ADJUSTMENT_MAP.get(token.attrs[i].name);\n if (adjustedAttrEntry) {\n token.attrs[i].prefix = adjustedAttrEntry.prefix;\n token.attrs[i].name = adjustedAttrEntry.name;\n token.attrs[i].namespace = adjustedAttrEntry.namespace;\n }\n }\n}\nexport function adjustTokenSVGTagName(token) {\n const adjustedTagName = SVG_TAG_NAMES_ADJUSTMENT_MAP.get(token.tagName);\n if (adjustedTagName != null) {\n token.tagName = adjustedTagName;\n token.tagID = getTagID(token.tagName);\n }\n}\n//Integration points\nfunction isMathMLTextIntegrationPoint(tn, ns) {\n return ns === NS.MATHML && (tn === $.MI || tn === $.MO || tn === $.MN || tn === $.MS || tn === $.MTEXT);\n}\nfunction isHtmlIntegrationPoint(tn, ns, attrs) {\n if (ns === NS.MATHML && tn === $.ANNOTATION_XML) {\n for (let i = 0; i < attrs.length; i++) {\n if (attrs[i].name === ATTRS.ENCODING) {\n const value = attrs[i].value.toLowerCase();\n return value === MIME_TYPES.TEXT_HTML || value === MIME_TYPES.APPLICATION_XML;\n }\n }\n }\n return ns === NS.SVG && (tn === $.FOREIGN_OBJECT || tn === $.DESC || tn === $.TITLE);\n}\nexport function isIntegrationPoint(tn, ns, attrs, foreignNS) {\n return (((!foreignNS || foreignNS === NS.HTML) && isHtmlIntegrationPoint(tn, ns, attrs)) ||\n ((!foreignNS || foreignNS === NS.MATHML) && isMathMLTextIntegrationPoint(tn, ns)));\n}\n//# sourceMappingURL=foreign-content.js.map","import { Tokenizer, TokenizerMode } from '../tokenizer/index.js';\nimport { OpenElementStack } from './open-element-stack.js';\nimport { FormattingElementList, EntryType } from './formatting-element-list.js';\nimport { defaultTreeAdapter } from '../tree-adapters/default.js';\nimport * as doctype from '../common/doctype.js';\nimport * as foreignContent from '../common/foreign-content.js';\nimport { ERR } from '../common/error-codes.js';\nimport * as unicode from '../common/unicode.js';\nimport { TAG_ID as $, TAG_NAMES as TN, NS, ATTRS, SPECIAL_ELEMENTS, DOCUMENT_MODE, isNumberedHeader, getTagID, } from '../common/html.js';\nimport { TokenType, getTokenAttr, } from '../common/token.js';\n//Misc constants\nconst HIDDEN_INPUT_TYPE = 'hidden';\n//Adoption agency loops iteration count\nconst AA_OUTER_LOOP_ITER = 8;\nconst AA_INNER_LOOP_ITER = 3;\n//Insertion modes\nvar InsertionMode;\n(function (InsertionMode) {\n InsertionMode[InsertionMode[\"INITIAL\"] = 0] = \"INITIAL\";\n InsertionMode[InsertionMode[\"BEFORE_HTML\"] = 1] = \"BEFORE_HTML\";\n InsertionMode[InsertionMode[\"BEFORE_HEAD\"] = 2] = \"BEFORE_HEAD\";\n InsertionMode[InsertionMode[\"IN_HEAD\"] = 3] = \"IN_HEAD\";\n InsertionMode[InsertionMode[\"IN_HEAD_NO_SCRIPT\"] = 4] = \"IN_HEAD_NO_SCRIPT\";\n InsertionMode[InsertionMode[\"AFTER_HEAD\"] = 5] = \"AFTER_HEAD\";\n InsertionMode[InsertionMode[\"IN_BODY\"] = 6] = \"IN_BODY\";\n InsertionMode[InsertionMode[\"TEXT\"] = 7] = \"TEXT\";\n InsertionMode[InsertionMode[\"IN_TABLE\"] = 8] = \"IN_TABLE\";\n InsertionMode[InsertionMode[\"IN_TABLE_TEXT\"] = 9] = \"IN_TABLE_TEXT\";\n InsertionMode[InsertionMode[\"IN_CAPTION\"] = 10] = \"IN_CAPTION\";\n InsertionMode[InsertionMode[\"IN_COLUMN_GROUP\"] = 11] = \"IN_COLUMN_GROUP\";\n InsertionMode[InsertionMode[\"IN_TABLE_BODY\"] = 12] = \"IN_TABLE_BODY\";\n InsertionMode[InsertionMode[\"IN_ROW\"] = 13] = \"IN_ROW\";\n InsertionMode[InsertionMode[\"IN_CELL\"] = 14] = \"IN_CELL\";\n InsertionMode[InsertionMode[\"IN_SELECT\"] = 15] = \"IN_SELECT\";\n InsertionMode[InsertionMode[\"IN_SELECT_IN_TABLE\"] = 16] = \"IN_SELECT_IN_TABLE\";\n InsertionMode[InsertionMode[\"IN_TEMPLATE\"] = 17] = \"IN_TEMPLATE\";\n InsertionMode[InsertionMode[\"AFTER_BODY\"] = 18] = \"AFTER_BODY\";\n InsertionMode[InsertionMode[\"IN_FRAMESET\"] = 19] = \"IN_FRAMESET\";\n InsertionMode[InsertionMode[\"AFTER_FRAMESET\"] = 20] = \"AFTER_FRAMESET\";\n InsertionMode[InsertionMode[\"AFTER_AFTER_BODY\"] = 21] = \"AFTER_AFTER_BODY\";\n InsertionMode[InsertionMode[\"AFTER_AFTER_FRAMESET\"] = 22] = \"AFTER_AFTER_FRAMESET\";\n})(InsertionMode || (InsertionMode = {}));\nconst BASE_LOC = {\n startLine: -1,\n startCol: -1,\n startOffset: -1,\n endLine: -1,\n endCol: -1,\n endOffset: -1,\n};\nconst TABLE_STRUCTURE_TAGS = new Set([$.TABLE, $.TBODY, $.TFOOT, $.THEAD, $.TR]);\nconst defaultParserOptions = {\n scriptingEnabled: true,\n sourceCodeLocationInfo: false,\n treeAdapter: defaultTreeAdapter,\n onParseError: null,\n};\n//Parser\nexport class Parser {\n constructor(options, document, fragmentContext = null, scriptHandler = null) {\n this.fragmentContext = fragmentContext;\n this.scriptHandler = scriptHandler;\n this.currentToken = null;\n this.stopped = false;\n this.insertionMode = InsertionMode.INITIAL;\n this.originalInsertionMode = InsertionMode.INITIAL;\n this.headElement = null;\n this.formElement = null;\n /** Indicates that the current node is not an element in the HTML namespace */\n this.currentNotInHTML = false;\n /**\n * The template insertion mode stack is maintained from the left.\n * Ie. the topmost element will always have index 0.\n */\n this.tmplInsertionModeStack = [];\n this.pendingCharacterTokens = [];\n this.hasNonWhitespacePendingCharacterToken = false;\n this.framesetOk = true;\n this.skipNextNewLine = false;\n this.fosterParentingEnabled = false;\n this.options = {\n ...defaultParserOptions,\n ...options,\n };\n this.treeAdapter = this.options.treeAdapter;\n this.onParseError = this.options.onParseError;\n // Always enable location info if we report parse errors.\n if (this.onParseError) {\n this.options.sourceCodeLocationInfo = true;\n }\n this.document = document !== null && document !== void 0 ? document : this.treeAdapter.createDocument();\n this.tokenizer = new Tokenizer(this.options, this);\n this.activeFormattingElements = new FormattingElementList(this.treeAdapter);\n this.fragmentContextID = fragmentContext ? getTagID(this.treeAdapter.getTagName(fragmentContext)) : $.UNKNOWN;\n this._setContextModes(fragmentContext !== null && fragmentContext !== void 0 ? fragmentContext : this.document, this.fragmentContextID);\n this.openElements = new OpenElementStack(this.document, this.treeAdapter, this);\n }\n // API\n static parse(html, options) {\n const parser = new this(options);\n parser.tokenizer.write(html, true);\n return parser.document;\n }\n static getFragmentParser(fragmentContext, options) {\n const opts = {\n ...defaultParserOptions,\n ...options,\n };\n //NOTE: use a