diff --git a/.gitignore b/.gitignore index 0f1ec4b..e69de29 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +0,0 @@ -* - -!*/ -!.gitignore -!*/docker-compose.y*ml -!*/.*env* - -qbittorrent/config/qBittorrent/qBittorrent-data.conf -!qbittorrent/config/qBittorrent/*.json - -!stash/cron/**/* -!stash/config/config.yml -!stash/stash-box-config/* -!stash/config/plugins/**/* -!servarr/slskd/slskd.yml -qbittorrent/config/qBittorrent/qBittorrent-data.conf diff --git a/glances/docker-compose.yml b/glances/docker-compose.yml index 26e5229..6fd09f4 100644 --- a/glances/docker-compose.yml +++ b/glances/docker-compose.yml @@ -1,17 +1,14 @@ services: glances: - #image: nicolargo/glances:3.4.0.5-full - image: nicolargo/glances:latest-full container_name: glances-arr + image: nicolargo/glances:latest-full restart: always - pid: host ports: - - 61208:61208 + - '61208:61208' volumes: - /var/run/docker.sock:/var/run/docker.sock - # Uncomment the below line if you want glances to display host OS detail instead of container's - /etc/os-release:/etc/os-release:ro - - /mnt/hdd_1tb:/mnt/hdd_1tb - - /:/host + - /:/host:ro environment: - - "GLANCES_OPT=-w" + - GLANCES_OPT=-w + pid: host diff --git a/kavita/docker-compose.yml b/kavita/docker-compose.yml index 3a01190..08731fd 100644 --- a/kavita/docker-compose.yml +++ b/kavita/docker-compose.yml @@ -1,15 +1,12 @@ services: - kavita: - image: jvmilazz0/kavita:latest # Using the stable branch from the official dockerhub repo. - container_name: kavita - volumes: - - /mnt/system/Etc/NotPorn:/images # Manga is just an example you can have the name you want. See the following -# - ./comics:/comics # Use as many as you want -# - ./books:/books # - - ./data:/kavita/config # Change './data if you want to have the config files in a different place. - # /kavita/config must not be changed - environment: - - TZ=America/Sao_Paulo - ports: - - "5000:5000" # Change the public port (the first 5000) if you have conflicts with other services - restart: unless-stopped + kavita: + container_name: kavita + image: jvmilazz0/kavita:latest + restart: unless-stopped + ports: + - '5000:5000' + volumes: + - /mnt/system/f95:/images + - /home/ccalifice/docker-data/kavita/config:/kavita/config + environment: + - TZ=America/Sao_Paulo diff --git a/komodo/docker-compose.yml b/komodo/docker-compose.yml index ed28e6a..ff86dbf 100644 --- a/komodo/docker-compose.yml +++ b/komodo/docker-compose.yml @@ -1,6 +1,6 @@ services: ## Deploy Periphery container using this block, - ## or deploy the Periphery binary with systemd using + ## or deploy the Periphery binary with systemd using ## https://github.com/moghtech/komodo/tree/main/scripts periphery: image: ghcr.io/moghtech/komodo-periphery:${COMPOSE_KOMODO_IMAGE_TAG:-latest} diff --git a/qbittorrent/config/qBittorrent/categories.json b/qbittorrent/config/qBittorrent/categories.json deleted file mode 100644 index 539f23f..0000000 --- a/qbittorrent/config/qBittorrent/categories.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "books": { - "save_path": "" - }, - "games": { - "save_path": "" - }, - "movies": { - "save_path": "" - }, - "music": { - "save_path": "" - }, - "radarr": { - "save_path": "" - }, - "tv": { - "save_path": "" - }, - "xxx": { - "save_path": "" - } -} diff --git a/qbittorrent/config/qBittorrent/qBittorrent-data.conf b/qbittorrent/config/qBittorrent/qBittorrent-data.conf deleted file mode 100644 index 3701ffe..0000000 --- a/qbittorrent/config/qBittorrent/qBittorrent-data.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Stats] -AllStats=@Variant(\0\0\0\x1c\0\0\0\x2\0\0\0\x12\0\x41\0l\0l\0t\0i\0m\0\x65\0\x44\0L\0\0\0\x4\0\0\tU\f\x82\x11\xd7\0\0\0\x12\0\x41\0l\0l\0t\0i\0m\0\x65\0U\0L\0\0\0\x4\0\0RV\x93qk\xdc) diff --git a/qbittorrent/config/qBittorrent/qBittorrent.conf b/qbittorrent/config/qBittorrent/qBittorrent.conf deleted file mode 100644 index e8ac349..0000000 --- a/qbittorrent/config/qBittorrent/qBittorrent.conf +++ /dev/null @@ -1,113 +0,0 @@ -[Application] -FileLogger\Age=1 -FileLogger\AgeType=1 -FileLogger\Backup=true -FileLogger\DeleteOld=true -FileLogger\Enabled=true -FileLogger\MaxSizeBytes=66560 -FileLogger\Path=/config/qBittorrent/logs - -[AutoRun] -OnTorrentAdded\Enabled=false -OnTorrentAdded\Program= -enabled=false -program= - -[BitTorrent] -Session\AddTorrentStopped=false -Session\AlternativeGlobalDLSpeedLimit=10000 -Session\AlternativeGlobalUPSpeedLimit=0 -Session\BandwidthSchedulerEnabled=true -Session\DHTEnabled=true -Session\DefaultSavePath=/data/torrents -Session\DisableAutoTMMByDefault=false -Session\ExcludedFileNames= -Session\GlobalDLSpeedLimit=0 -Session\IgnoreSlowTorrentsForQueueing=true -Session\LSDEnabled=true -Session\MaxActiveCheckingTorrents=2 -Session\MaxActiveDownloads=10 -Session\MaxActiveTorrents=100 -Session\MaxActiveUploads=20 -Session\MaxConnections=-1 -Session\MaxUploads=-1 -Session\MaxUploadsPerTorrent=-1 -Session\PeXEnabled=true -Session\Port=40848 -Session\QueueingSystemEnabled=true -Session\SSL\Port=55040 -Session\ShareLimitAction=Stop -Session\Tags=LastFiles, SceneTime -Session\TempPath=/downloads/incomplete/ -Session\UseAlternativeGlobalSpeedLimit=true - -[Core] -AutoDeleteAddedTorrentFile=Never - -[LegalNotice] -Accepted=true - -[Meta] -MigrationVersion=8 - -[Network] -PortForwardingEnabled=false -Proxy\HostnameLookupEnabled=false -Proxy\Profiles\BitTorrent=true -Proxy\Profiles\Misc=true -Proxy\Profiles\RSS=true - -[Preferences] -Advanced\RecheckOnCompletion=false -Advanced\trackerPort=9000 -Advanced\trackerPortForwarding=false -Connection\PortRangeMin=6881 -Connection\ResolvePeerCountries=true -Connection\UPnP=false -Downloads\SavePath=/downloads/ -Downloads\TempPath=/downloads/incomplete/ -DynDNS\DomainName=aaaaaa.dyndns.org -DynDNS\Enabled=false -DynDNS\Password= -DynDNS\Service=DynDNS -DynDNS\Username= -General\Locale=en -MailNotification\email= -MailNotification\enabled=false -MailNotification\password= -MailNotification\req_auth=true -MailNotification\req_ssl=false -MailNotification\sender=qBittorrent_notification@example.com -MailNotification\smtp_server=smtp.changeme.com -MailNotification\username= -Scheduler\end_time=@Variant(\0\0\0\xf\x5%q\xa0) -Scheduler\start_time=@Variant(\0\0\0\xf\x1\xee\x62\x80) -WebUI\Address=* -WebUI\AlternativeUIEnabled=false -WebUI\AuthSubnetWhitelist=192.168.1.0/24 -WebUI\AuthSubnetWhitelistEnabled=true -WebUI\BanDuration=3600 -WebUI\CSRFProtection=true -WebUI\ClickjackingProtection=true -WebUI\CustomHTTPHeaders= -WebUI\CustomHTTPHeadersEnabled=false -WebUI\HTTPS\CertificatePath= -WebUI\HTTPS\Enabled=false -WebUI\HTTPS\KeyPath= -WebUI\HostHeaderValidation=true -WebUI\LocalHostAuth=true -WebUI\MaxAuthenticationFailCount=10 -WebUI\Password_PBKDF2="@ByteArray(OUcpojCntLZHBzdhkSxH9A==:6SbAK9PPyaEU4We0xKGyOEG9ktK0c1zdZszzsvi5jMtrJR0WuwZut60cV8IEDukvNXofPjWrGCv12kQCCKS/JA==)" -WebUI\Port=8181 -WebUI\ReverseProxySupportEnabled=true -WebUI\RootFolder= -WebUI\SecureCookie=true -WebUI\ServerDomains=* -WebUI\SessionTimeout=3600 -WebUI\TrustedReverseProxiesList=qbittorrent.ccalifice.com -WebUI\UseUPnP=false -WebUI\Username=admin - -[RSS] -AutoDownloader\DownloadRepacks=true -AutoDownloader\SmartEpisodeFilter=s(\\d+)e(\\d+), (\\d+)x(\\d+), "(\\d{4}[.\\-]\\d{1,2}[.\\-]\\d{1,2})", "(\\d{1,2}[.\\-]\\d{1,2}[.\\-]\\d{4})" diff --git a/qbittorrent/config/qBittorrent/watched_folders.json b/qbittorrent/config/qBittorrent/watched_folders.json deleted file mode 100644 index 2c63c08..0000000 --- a/qbittorrent/config/qBittorrent/watched_folders.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} diff --git a/qbittorrent/docker-compose.yml b/qbittorrent/docker-compose.yml index 57e5a13..45d7e10 100644 --- a/qbittorrent/docker-compose.yml +++ b/qbittorrent/docker-compose.yml @@ -8,38 +8,10 @@ services: - TZ=America/Sao_Paulo - WEBUI_PORT=8181 volumes: - - ./config:/config + - /home/ccalifice/docker-data/qbittorrent/config:/config - /mnt/servarr/data/torrents:/data/torrents ports: - "8181:8181" - "40848:40848" - "40848:40848/udp" restart: unless-stopped - -# qbit_manage: -# container_name: qbit_manage -# image: ghcr.io/stuffanthings/qbit_manage:latest -# volumes: -# - ./config:/config:rw -# - /mnt/user/data/torrents/:/data/torrents:rw -# - /mnt/hdd_1tb/data/torrents:/qbittorrent/:ro -# environment: -# - QBT_RUN=false -# - QBT_SCHEDULE=1440 -# - QBT_CONFIG=config.yml -# - QBT_LOGFILE=activity.log -# - QBT_CROSS_SEED=false -# - QBT_RECHECK=false -# - QBT_CAT_UPDATE=false -# - QBT_TAG_UPDATE=false -# - QBT_REM_UNREGISTERED=false -# - QBT_REM_ORPHANED=false -# - QBT_TAG_TRACKER_ERROR=false -# - QBT_TAG_NOHARDLINKS=false -# - QBT_SHARE_LIMITS=false -# - QBT_SKIP_CLEANUP=false -# - QBT_DRY_RUN=false -# - QBT_LOG_LEVEL=INFO -# - QBT_DIVIDER== -# - QBT_WIDTH=100 -# restart: on-failure:2 diff --git a/servarr/docker-compose.yml b/servarr/docker-compose.yml index 62db9e5..cc4099c 100644 --- a/servarr/docker-compose.yml +++ b/servarr/docker-compose.yml @@ -1,4 +1,3 @@ ---- services: sonarr: image: lscr.io/linuxserver/sonarr:latest @@ -8,7 +7,7 @@ services: - PGID=1002 - TZ=America/Sao_Paulo volumes: - - ./sonarr:/config + - /home/ccalifice/docker-data/servarr/sonarr:/config - /mnt/servarr/data:/data ports: - "8989:8989" @@ -22,7 +21,7 @@ services: - PGID=1002 - TZ=America/Sao_Paulo volumes: - - ./radarr:/config + - /home/ccalifice/docker-data/servarr/radarr:/config - /mnt/servarr/data:/data ports: - "7878:7878" @@ -40,25 +39,95 @@ services: - SLSKD_SLSK_USERNAME=ticonouvido - SLSKD_SLSK_PASSWORD=asdf1234 volumes: - - ./slskd:/app + - /home/ccalifice/docker-data/servarr/slskd:/app - /mnt/servarr/data/torrents/music:/music - /mnt/servarr/data/media/music:/music-organized restart: unless-stopped - lidarr: - image: ghcr.io/hotio/lidarr:pr-plugins - container_name: lidarr + prowlarr: + image: lscr.io/linuxserver/prowlarr:develop + container_name: prowlarr environment: - PUID=1000 - PGID=1002 - TZ=America/Sao_Paulo volumes: - - ./lidarr:/config - - /mnt/servarr/data/:/data #optional + - /home/ccalifice/docker-data/servarr/prowlarr:/config ports: - - 8686:8686 + - "9696:9696" restart: unless-stopped + bazarr: + image: lscr.io/linuxserver/bazarr:latest + container_name: bazarr + environment: + - PUID=1000 + - PGID=1002 + - TZ=America/Sao_Paulo + volumes: + - /home/ccalifice/docker-data/servarr/bazarr:/config + - /mnt/servarr/data/media/movies:/movies + - /mnt/servarr/data/media/tv:/tv + ports: + - "6767:6767" + restart: unless-stopped + + jellyseerr: + image: fallenbagel/jellyseerr:latest + container_name: jellyseerr + environment: + - LOG_LEVEL=info + - TZ=America/Sao_Paulo + ports: + - 5055:5055 + volumes: + - /home/ccalifice/docker-data/servarr/jellyseer:/app/config + restart: unless-stopped + networks: + - jellyseer + + flaresolverr: + image: ghcr.io/flaresolverr/flaresolverr:latest + container_name: flaresolverr + environment: + - LOG_LEVEL=${LOG_LEVEL:-info} + - LOG_HTML=${LOG_HTML:-false} + - CAPTCHA_SOLVER=${CAPTCHA_SOLVER:-none} + - TZ=America/Sao_Paulo + ports: + - "${PORT:-8191}:8191" + restart: unless-stopped + + # jackett: + # image: lscr.io/linuxserver/jackett:latest + # container_name: jackett + # environment: + # - PUID=1000 + # - PGID=1002 + # - TZ=America/Sao_Paulo + # - AUTO_UPDATE=true #optional + # - RUN_OPTS= #optional + # volumes: + # - ./jackett:/config + # - ./blackhole:/downloads + # ports: + # - 9117:9117 + # restart: unless-stopped + + # lidarr: + # image: ghcr.io/hotio/lidarr:pr-plugins + # container_name: lidarr + # environment: + # - PUID=1000 + # - PGID=1002 + # - TZ=America/Sao_Paulo + # volumes: + # - /home/ccalifice/docker-data/servarr/lidarr:/config + # - /mnt/servarr/data/:/data #optional + # ports: + # - 8686:8686 + # restart: unless-stopped + # soularr: # restart: unless-stopped @@ -79,78 +148,5 @@ services: # - ./soularr:/data # image: mrusse08/soularr:latest - prowlarr: - image: lscr.io/linuxserver/prowlarr:develop - container_name: prowlarr - environment: - - PUID=1000 - - PGID=1002 - - TZ=America/Sao_Paulo - volumes: - - ./prowlarr:/config - ports: - - "9696:9696" - restart: unless-stopped - - bazarr: - image: lscr.io/linuxserver/bazarr:latest - container_name: bazarr - environment: - - PUID=1000 - - PGID=1002 - - TZ=America/Sao_Paulo - volumes: - - ./bazarr:/config - - /mnt/servarr/data/media/movies:/movies - - /mnt/servarr/data/media/tv:/tv - ports: - - "6767:6767" - restart: unless-stopped - - jellyseerr: - image: fallenbagel/jellyseerr:latest - container_name: jellyseerr - environment: - - LOG_LEVEL=info - - TZ=America/Sao_Paulo - ports: - - 5055:5055 - volumes: - - ./jellyseer:/app/config - restart: unless-stopped - networks: - - pangolin - - flaresolverr: - # DockerHub mirror flaresolverr/flaresolverr:latest - image: ghcr.io/flaresolverr/flaresolverr:latest - container_name: flaresolverr - environment: - - LOG_LEVEL=${LOG_LEVEL:-info} - - LOG_HTML=${LOG_HTML:-false} - - CAPTCHA_SOLVER=${CAPTCHA_SOLVER:-none} - - TZ=America/Sao_Paulo - ports: - - "${PORT:-8191}:8191" - restart: unless-stopped - - jackett: - image: lscr.io/linuxserver/jackett:latest - container_name: jackett - environment: - - PUID=1000 - - PGID=1002 - - TZ=America/Sao_Paulo - - AUTO_UPDATE=true #optional - - RUN_OPTS= #optional - volumes: - - ./jackett:/config - - ./blackhole:/downloads - ports: - - 9117:9117 - restart: unless-stopped - networks: - pangolin: - external: true - name: pangolin + jellyseer: diff --git a/servarr/slskd/slskd.yml b/servarr/slskd/slskd.yml deleted file mode 100644 index d5c0a6a..0000000 --- a/servarr/slskd/slskd.yml +++ /dev/null @@ -1,265 +0,0 @@ -# debug: false -# headless: false -# remote_configuration: false -# remote_file_management: false -# instance_name: default -# flags: -# no_logo: false -# no_start: false -# no_config_watch: false -# no_connect: false -# no_share_scan: false -# force_share_scan: false -# no_version_check: false -# log_sql: false -# experimental: false -# volatile: false -# case_sensitive_reg_ex: false -# legacy_windows_tcp_keepalive: false -# optimistic_relay_file_info: false -# relay: -# enabled: false -# mode: controller # controller (default), agent, or debug (for local development) -# # controller config is required when running in 'agent' mode -# # this specifies the relay controller that will be controlling this agent -# controller: -# address: https://some.site.com:5000 -# ignore_certificate_errors: false -# api_key: -# secret: -# downloads: false -# # agent config is optional when running in 'controller' mode -# # this specifies all of the agents capable of connecting -# agents: -# my_agent: -# instance_name: my_agent # make sure the top-level instance_name of the agent matches! -# secret: -# cidr: 0.0.0.0/0,::/0 -# permissions: -# file: -# mode: ~ # not for Windows, chmod syntax, e.g. 644, 777. can't escalate beyond umask - directories: -# incomplete: ~ - downloads: /music - shares: - directories: - - /music-organized -# filters: -# - \.ini$ -# - Thumbs.db$ -# - \.DS_Store$ -# cache: -# storage_mode: memory -# workers: 16 -# retention: ~ # retain indefinitely (do not automatically re-scan) -# rooms: -# - ~ -# global: -# upload: -# slots: 20 -# speed_limit: 1000 # in kibibytes -# limits: -# queued: -# files: 500 -# megabytes: 5000 -# daily: -# files: 1000 -# megabytes: 10000 -# failures: 200 -# weekly: -# files: 5000 -# megabytes: 50000 -# failures: 1000 -# download: -# slots: 500 -# speed_limit: 1000 -# groups: -# default: -# upload: -# priority: 500 -# strategy: roundrobin -# slots: 10 -# limits: -# queued: -# files: 150 -# megabytes: 1500 -# daily: ~ # no daily limits (weekly still apply) -# weekly: -# files: 1500 -# megabytes: 15000 -# failures: 150 -# leechers: -# thresholds: -# files: 1 -# directories: 1 -# upload: -# priority: 999 -# strategy: roundrobin -# slots: 1 -# speed_limit: 100 -# limits: -# queued: -# files: 15 -# megabytes: 150 -# daily: -# files: 30 -# megabytes: 300 -# failures: 10 -# weekly: -# files: 150 -# megabytes: 1500 -# failures: 30 -# blacklisted: -# members: -# - -# cidrs: -# - -# user_defined: -# my_buddies: -# upload: -# priority: 250 -# strategy: firstinfirstout -# slots: 10 -# limits: -# queued: -# files: 1000 # override global default -# members: -# - alice -# - bob -# blacklist: -# enabled: true -# file: -# filters: -# search: -# request: -# - ^.{1,2}$ - web: -# port: 5030 -# https: -# disabled: false -# port: 5031 -# force: false -# certificate: -# pfx: ~ -# password: ~ -# url_base: / -# content_path: wwwroot -# logging: false - authentication: -# disabled: false -# username: slskd -# password: slskd -# jwt: -# key: ~ -# ttl: 604800000 - api_keys: - my_api_key: - key: qwertyuiopasdfghjklzxcvbnm -# role: readonly # readonly, readwrite, administrator -# cidr: 0.0.0.0/0,::/0 -# retention: -# searches: 10080 # 7 days, in minutes -# transfers: -# upload: -# succeeded: 1440 # 1 day, in minutes -# errored: 30 -# cancelled: 5 -# download: -# succeeded: 1440 # 1 day, in minutes -# errored: 20160 # 2 weeks, in minutes -# cancelled: 5 -# files: -# complete: 20160 # 2 weeks, in minutes -# incomplete: 43200 # 30 days, in minutes -# logs: 180 # days -# logger: -# disk: false -# no_color: false -# loki: ~ -# metrics: -# enabled: false -# url: /metrics -# authentication: -# disabled: false -# username: slskd -# password: slskd -# feature: -# swagger: false -# soulseek: -# address: vps.slsknet.org -# port: 2271 -# username: ~ -# password: ~ -# description: | -# A slskd user. https://github.com/slskd/slskd -# listen_ip_address: 0.0.0.0 -# listen_port: 50300 -# diagnostic_level: Info -# distributed_network: -# disabled: false -# disable_children: false -# child_limit: 25 -# logging: false -# connection: -# timeout: -# connect: 10000 -# inactivity: 15000 -# buffer: -# read: 16384 -# write: 16384 -# transfer: 262144 -# write_queue: 250 -# proxy: -# enabled: false -# address: ~ -# port: ~ -# username: ~ -# password: ~ -# integration: -# webhooks: -# my_webhook: -# on: -# - DownloadFileComplete -# call: -# url: https://192.168.1.42:8080/slskd_webhook -# headers: -# - name: X-API-Key -# value: foobar1234 -# - name: Authorization -# value: Bearer eyJ...ssw5c -# - name: User-Agent -# value: slskd/0.0 -# ignore_certificate_errors: false -# timeout: 5000 # in milliseconds -# retry: -# attempts: 3 -# scripts: -# my_post_download_script: -# on: -# - DownloadFileComplete -# - DownloadDirectoryComplete -# run: data/my_script.sh --json-to-process $EVENT -# my_logging_script: -# on: -# - All -# run: data/log_slskd_events.sh $DATA -# ftp: -# enabled: false -# address: ~ -# port: ~ -# username: ~ -# password: ~ -# remote_path: / -# encryption_mode: auto -# ignore_certificate_errors: false -# overwrite_existing: true -# connection_timeout: 5000 -# retry_attempts: 3 -# pushbullet: -# enabled: false -# access_token: ~ -# notification_prefix: "From slskd:" -# notify_on_private_message: true -# notify_on_room_mention: true -# retry_attempts: 3 -# cooldown_time: 900000 diff --git a/stash/config/config.yml b/stash/config/config.yml deleted file mode 100644 index 94f33f2..0000000 --- a/stash/config/config.yml +++ /dev/null @@ -1,245 +0,0 @@ -api_key: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJjY2FsaWZpY2UiLCJzdWIiOiJBUElLZXkiLCJpYXQiOjE3NDE5NTY3OTN9.UWTnuuWhw0mFNQVWcXCer-NA8IyipxoGx0VieHW7XRQ -blobs_path: /root/.stash/blobs -blobs_storage: FILESYSTEM -calculate_md5: false -create_galleries_from_folders: true -create_image_clip_from_videos: false -dangerous_allow_public_without_auth: "false" -database: /root/.stash/stash-go.sqlite -defaults: - auto_tag_task: - paths: [] - performers: - - '*' - studios: - - '*' - tags: - - '*' - generate_task: - clippreviews: false - covers: true - forcetranscodes: false - imagepreviews: false - imagethumbnails: true - interactiveheatmapsspeeds: false - markerids: [] - markerimagepreviews: false - markers: false - markerscreenshots: false - overwrite: false - phashes: true - previewoptions: - previewexcludeend: "0" - previewexcludestart: "0" - previewpreset: slow - previewsegmentduration: 0.75 - previewsegments: 12 - previews: false - sceneids: [] - sprites: false - transcodes: false - identify_task: - options: - fieldoptions: - - createmissing: false - field: title - strategy: IGNORE - - createmissing: true - field: studio - strategy: MERGE - - createmissing: true - field: performers - strategy: MERGE - - createmissing: true - field: tags - strategy: MERGE - includemaleperformers: true - setcoverimage: false - setorganized: false - skipmultiplematches: true - skipmultiplematchtag: null - skipsinglenameperformers: true - skipsinglenameperformertag: null - paths: [] - sceneids: [] - sources: - - options: - fieldoptions: [] - includemaleperformers: null - setcoverimage: null - setorganized: false - skipmultiplematches: true - skipmultiplematchtag: null - skipsinglenameperformers: true - skipsinglenameperformertag: null - source: - scraperid: builtin_autotag - stashboxendpoint: null - stashboxindex: null - - options: null - source: - scraperid: null - stashboxendpoint: https://stashdb.org/graphql - stashboxindex: null - scan_task: - scangenerateclippreviews: true - scangeneratecovers: true - scangenerateimagepreviews: false - scangeneratephashes: false - scangeneratepreviews: true - scangeneratesprites: false - scangeneratethumbnails: true -dlna: - default_whitelist: - - 192.168.1.80 -exclude: [] -gallery_cover_regex: (poster|cover|folder|board)\.[^\.]+$ -generated: "" -host: 0.0.0.0 -image_exclude: - - .*/f95/.* -jwt_secret_key: 465db67dd7d0cbf0848283511375283970db6300c7c25ff57d5fcdc901116322 -menu_items: - - scenes - - images - - groups - - markers - - galleries - - performers - - studios - - tags -no_proxy: localhost,127.0.0.1,192.168.0.0/16,10.0.0.0/8,172.16.0.0/12 -nobrowser: false -notifications_enabled: false -parallel_tasks: 0 -password: $2a$04$EcHNpS7.7GTpKNshc.QNQu53mbnVGomC5q9.YCkVPhVWBPquLIdoa -plugins: - package_sources: - - localpath: community - name: Community (stable) - url: https://stashapp.github.io/CommunityScripts/stable/index.yml - settings: - DupFileManager: - matchDupDistance: 1 - zzObsoleteSettingsCheckVer2: true -plugins_path: /root/.stash/plugins -port: 9999 -preview_audio: true -preview_exclude_end: "0" -preview_exclude_start: "0" -preview_preset: medium -preview_segment_duration: 0.75 -preview_segments: 12 -scrapers: - package_sources: - - localpath: community - name: Community (stable) - url: https://stashapp.github.io/CommunityScrapers/stable/index.yml -scrapers_path: /root/.stash/scrapers -security_tripwire_accessed_from_public_internet: "" -sequential_scanning: false -session_store_key: 5f2ae4ea161237c076aeb33c1f9a0e3f13a4d8092b3f76a669fe2e91e02f1d36 -show_one_time_moved_notification: false -sound_on_preview: false -stash: - - excludeimage: false - excludevideo: false - path: /data/ -stash_boxes: - - apikey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJhMmU5NTc3Ny0zOGEwLTQwMWYtYWMxNC01MjBkZmFjOWJhOTMiLCJzdWIiOiJBUElLZXkiLCJpYXQiOjE3NTk3NjAxMjV9.gOzykd_FyhgUNiircH9gE7S3nvLQrNMQ_26yzupVMkY - endpoint: https://stashdb.org/graphql - name: stash-box -theme_color: '#202b33' -ui: - advancedMode: true - frontPageContent: - - __typename: CustomFilter - direction: DESC - message: - id: recently_released_objects - values: - objects: Scenes - mode: SCENES - sortBy: date - - __typename: CustomFilter - direction: DESC - message: - id: recently_added_objects - values: - objects: Studios - mode: STUDIOS - sortBy: created_at - - __typename: CustomFilter - direction: DESC - message: - id: recently_released_objects - values: - objects: Movies - mode: MOVIES - sortBy: date - - __typename: CustomFilter - direction: DESC - message: - id: recently_added_objects - values: - objects: Performers - mode: PERFORMERS - sortBy: created_at - - __typename: CustomFilter - direction: DESC - message: - id: recently_released_objects - values: - objects: Galleries - mode: GALLERIES - sortBy: date - lastNoteSeen: "20240826" - pinnedFilters: - scenes: - - performers - - tags - taskDefaults: - autoTag: - performers: - - '*' - studios: [] - tags: - - '*' - cleanGenerated: - blobFiles: true - dryRun: false - imageThumbnails: true - markers: true - screenshots: true - sprites: true - transcodes: true - generate: - clipPreviews: false - covers: true - imagePreviews: false - imageThumbnails: true - interactiveHeatmapsSpeeds: false - markerImagePreviews: false - markerScreenshots: false - markers: false - phashes: true - previewOptions: - previewExcludeEnd: "0" - previewExcludeStart: "0" - previewPreset: medium - previewSegmentDuration: 0.75 - previewSegments: 12 - previews: false - sprites: false - transcodes: false - scan: - scanGenerateClipPreviews: true - scanGenerateCovers: true - scanGenerateImagePreviews: false - scanGeneratePhashes: true - scanGeneratePreviews: true - scanGenerateSprites: false - scanGenerateThumbnails: true -username: ccalifice -video_file_naming_algorithm: OSHASH -write_image_thumbnails: true diff --git a/stash/config/plugins/community/CommunityScriptsUILibrary/CommunityScriptsUILibrary.yml b/stash/config/plugins/community/CommunityScriptsUILibrary/CommunityScriptsUILibrary.yml deleted file mode 100644 index 55074e8..0000000 --- a/stash/config/plugins/community/CommunityScriptsUILibrary/CommunityScriptsUILibrary.yml +++ /dev/null @@ -1,6 +0,0 @@ -name: CommunityScriptsUILibrary -description: CommunityScripts UI helper library -version: 1.0.0 -ui: - javascript: - - cs-ui-lib.js diff --git a/stash/config/plugins/community/CommunityScriptsUILibrary/README.md b/stash/config/plugins/community/CommunityScriptsUILibrary/README.md deleted file mode 100644 index e641f69..0000000 --- a/stash/config/plugins/community/CommunityScriptsUILibrary/README.md +++ /dev/null @@ -1,90 +0,0 @@ -# CommunityScripts UI Plugin library - -This is a set of slimmed down functions from StashUserscriptLibrary, targeting CommunityScripts originally introduced in [#319](https://github.com/stashapp/CommunityScripts/pull/319) - - -## functions -All the following functions are exposed under `window.csLib` and `csLib` - -## callGQL -```js -/** - * This is a wrapped GraphQL (GQL) query caller - * @param {...Object} reqData - * @param {Object} reqData.query - GraphQL query - * @param {Object}= reqData.variables - GraphQL variables - * @returns {Object} - GQL response data with the `data` wrapper removed - * - * @example - * // fetch the count of organized scenes - * const filter = { organized: true }; - * const query = `query findScenes($filter: SceneFilter) { findScenes(filter: $filter) { count } }`; - * const variables = { filter }; - * const response = await callGQL({ query, variables }); - * // response = { findScenes: { count: 3 } } - */ -``` - -## getConfiguration -```js -/** - * Get configuration of a plugin from the server via GraphQL - * @param {string} pluginId - The ID of the plugin as it is registered in the server - * @param {*}= fallback - Fallback value if the configuration is not found. Defaults to an empty object - * @returns {Object} - The configuration object of the plugin as it is stored in the server - * - * @example - * // set default config - * const defaultConfig = { enabled: true, theme: 'light' }; - * // fetch config from the server - * const config = await getConfiguration('CommunityScriptsUIPlugin', defaultConfig); - * // config = { theme: 'dark' } - * // merge fetched with default config - * const pluginConfig = { - * ...defaultConfig - * ...config - * }; - * // pluginConfig = { enabled: true, theme: 'dark' } - * } - */ -``` - -## setConfiguration -```js -/** - * Set configuration of a plugin in the server via GraphQL - * @param {string} pluginId - The ID of the plugin as it is registered in the server - * @param {*} values - The configuration object with the values you want to save in the server - * @returns {Object} - The configuration object of the plugin as it is stored in the server after update - * - * @example - * // fetch config from the server - * const config = await getConfiguration('CommunityScriptsUIPlugin', defaultConfig); - * // config = { theme: 'dark' } - * // update the config based on user input - * // config = { theme: 'light' } - * // save config in the server - * await setConfiguration('CommunityScriptsUIPlugin', config); - * } - */ -``` - -## waitForElement -```js - /** - * Waits for an element to be available in the DOM and runs the callback function once it is - * @param {string} selector - The CSS selector of the element to wait for - * @param {function} callback - The function to be called once the element is available (with the element as an argument) - * @returns - * - * @example - * // wait for the element with the class 'my-element' to be available - * // and change its color to red - * function myCallback(el) { - * el.style.color = 'red'; - * }; - * waitForElement('.my-element', myCallback); - */ -``` - -## pathElementListener \ No newline at end of file diff --git a/stash/config/plugins/community/CommunityScriptsUILibrary/cs-ui-lib.js b/stash/config/plugins/community/CommunityScriptsUILibrary/cs-ui-lib.js deleted file mode 100644 index ba346c9..0000000 --- a/stash/config/plugins/community/CommunityScriptsUILibrary/cs-ui-lib.js +++ /dev/null @@ -1,141 +0,0 @@ -// CommunityScripts UI Library -// cs-ui-lib.js -(function () { - // get base URL for graphQL queries - const baseURL = document.querySelector("base")?.getAttribute("href") ?? "/"; - - /** - * This is a wrapped GraphQL (GQL) query caller - * @param {...Object} reqData - * @param {Object} reqData.query - GraphQL query - * @param {Object}= reqData.variables - GraphQL variables - * @returns {Object} - GQL response data with the `data` wrapper removed - * - * @example - * // fetch the count of organized scenes - * const filter = { organized: true }; - * const query = `query findScenes($filter: SceneFilter) { findScenes(filter: $filter) { count } }`; - * const variables = { filter }; - * const response = await callGQL({ query, variables }); - * // response = { findScenes: { count: 3 } } - */ - const callGQL = (reqData) => - fetch(`${baseURL}graphql`, { - method: "POST", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify(reqData), - }) - .then((res) => res.json()) - .then((res) => res.data); - - /** - * Get configuration of a plugin from the server via GraphQL - * @param {string} pluginId - The ID of the plugin as it is registered in the server - * @param {*}= fallback - Fallback value if the configuration is not found. Defaults to an empty object - * @returns {Object} - The configuration object of the plugin as it is stored in the server - * - * @example - * // set default config - * const defaultConfig = { enabled: true, theme: 'light' }; - * // fetch config from the server - * const config = await getConfiguration('CommunityScriptsUIPlugin', defaultConfig); - * // config = { theme: 'dark' } - * // merge fetched with default config - * const pluginConfig = { - * ...defaultConfig - * ...config - * }; - * // pluginConfig = { enabled: true, theme: 'dark' } - * } - */ - const getConfiguration = async (pluginId, fallback = {}) => { - const query = `query Configuration { configuration { plugins }}`; - const response = await callGQL({ query }); - return response.configuration.plugins?.[pluginId] ?? fallback; - }; - - /** - * Set configuration of a plugin in the server via GraphQL - * @param {string} pluginId - The ID of the plugin as it is registered in the server - * @param {*} values - The configuration object with the values you want to save in the server - * @returns {Object} - The configuration object of the plugin as it is stored in the server after update - * - * @example - * // fetch config from the server - * const config = await getConfiguration('CommunityScriptsUIPlugin', defaultConfig); - * // config = { theme: 'dark' } - * // update the config based on user input - * // config = { theme: 'light' } - * // save config in the server - * await setConfiguration('CommunityScriptsUIPlugin', config); - * } - */ - const setConfiguration = async (pluginId, values) => { - const query = `mutation ConfigurePlugin($pluginId: ID!, $input: Map!) { configurePlugin(plugin_id: $pluginId, input: $input) }`; - const queryBody = { - query: query, - variables: { - pluginId: pluginId, - input: values, - }, - }; - const response = await csLib.callGQL({ ...queryBody }); - return response.configurePlugin; - }; - - /** - * Waits for an element to be available in the DOM and runs the callback function once it is - * @param {string} selector - The CSS selector of the element to wait for - * @param {function} callback - The function to be called once the element is available (with the element as an argument) - * @returns - * - * @example - * // wait for the element with the class 'my-element' to be available - * // and change its color to red - * function myCallback(el) { - * el.style.color = 'red'; - * }; - * waitForElement('.my-element', myCallback); - */ - function waitForElement(selector, callback) { - var el = document.querySelector(selector); - if (el) return callback(el); - setTimeout(waitForElement, 100, selector, callback); - } - - /** - * Wait for a specific element to be available on a specific path - * This combines the `waitForElement` and `PluginApi.Event.addEventListener` functions to only trigger on certain pages - * - * @param {string} path - The path to listen for - * @param {string} element - The CSS selector of the element to wait for - * @param {function} callback - The function to be called once the element is available (with the element as an argument) - * - * @example - * // wait for the element with the class 'my-element' to be available, but only on the `/scene/#` path - * function myCallback(el) { - * el.style.color = 'red'; - * }; - * PathElementListener('/scene/', '.my-element', myCallback); - * // this will only trigger the callback function when the user is on the `/scene/` path AND the element is available - */ - const PathElementListener = (path, element, callback) => { - // startup location - if (window.location.pathname.startsWith(path)) - waitForElement(element, callback); - PluginApi.Event.addEventListener("stash:location", (e) => { - if (e.detail.data.location.pathname.startsWith(path)) - waitForElement(element, callback); - }); - }; - - // export to window - window.csLib = { - baseURL, - callGQL, - getConfiguration, - setConfiguration, - waitForElement, - PathElementListener, - }; -})(); diff --git a/stash/config/plugins/community/CommunityScriptsUILibrary/manifest b/stash/config/plugins/community/CommunityScriptsUILibrary/manifest deleted file mode 100755 index 4e01abf..0000000 --- a/stash/config/plugins/community/CommunityScriptsUILibrary/manifest +++ /dev/null @@ -1,12 +0,0 @@ -id: CommunityScriptsUILibrary -name: CommunityScriptsUILibrary -metadata: - description: CommunityScripts UI helper library -version: 1.0.0-512fbb8 -date: "2024-11-27 21:50:31" -requires: [] -source_repository: https://stashapp.github.io/CommunityScripts/stable/index.yml -files: -- cs-ui-lib.js -- README.md -- CommunityScriptsUILibrary.yml diff --git a/stash/config/plugins/community/DupFileManager/DupFileManager.log b/stash/config/plugins/community/DupFileManager/DupFileManager.log deleted file mode 100644 index 7cef01e..0000000 --- a/stash/config/plugins/community/DupFileManager/DupFileManager.log +++ /dev/null @@ -1,12 +0,0 @@ -[251006 10:33:16] [LN:95] INF: '******************* Starting *******************' -[251006 10:33:17] [LN:1573] INF: "Sending json value {'LocalDupReportExist' : false, 'Path': '/root/.stash/plugins/DupFileManager/report/DuplicateTagScenes.html'}" -[251006 10:33:17] [LN:1984] INF: '\n*********************************\nEXITING ***********************\n*********************************' -[251006 10:33:17] [LN:95] INF: '******************* Starting *******************' -[251006 10:33:17] [LN:1573] INF: "Sending json value {'LocalDupReportExist' : false, 'Path': '/root/.stash/plugins/DupFileManager/report/DuplicateTagScenes.html'}" -[251006 10:33:17] [LN:1984] INF: '\n*********************************\nEXITING ***********************\n*********************************' -[251006 10:35:25] [LN:95] INF: '******************* Starting *******************' -[251006 10:35:25] [LN:1573] INF: "Sending json value {'LocalDupReportExist' : false, 'Path': '/root/.stash/plugins/DupFileManager/report/DuplicateTagScenes.html'}" -[251006 10:35:25] [LN:1984] INF: '\n*********************************\nEXITING ***********************\n*********************************' -[251006 10:35:26] [LN:95] INF: '******************* Starting *******************' -[251006 10:35:26] [LN:1573] INF: "Sending json value {'LocalDupReportExist' : false, 'Path': '/root/.stash/plugins/DupFileManager/report/DuplicateTagScenes.html'}" -[251006 10:35:26] [LN:1984] INF: '\n*********************************\nEXITING ***********************\n*********************************' diff --git a/stash/config/plugins/community/DupFileManager/__pycache__/DupFileManager_config.cpython-312.pyc b/stash/config/plugins/community/DupFileManager/__pycache__/DupFileManager_config.cpython-312.pyc deleted file mode 100644 index d8cf7c2..0000000 Binary files a/stash/config/plugins/community/DupFileManager/__pycache__/DupFileManager_config.cpython-312.pyc and /dev/null differ diff --git a/stash/config/plugins/community/DupFileManager/__pycache__/DupFileManager_report_config.cpython-312.pyc b/stash/config/plugins/community/DupFileManager/__pycache__/DupFileManager_report_config.cpython-312.pyc deleted file mode 100644 index 61a654b..0000000 Binary files a/stash/config/plugins/community/DupFileManager/__pycache__/DupFileManager_report_config.cpython-312.pyc and /dev/null differ diff --git a/stash/config/plugins/community/DupFileManager/__pycache__/ModulesValidate.cpython-312.pyc b/stash/config/plugins/community/DupFileManager/__pycache__/ModulesValidate.cpython-312.pyc deleted file mode 100644 index f7c70e4..0000000 Binary files a/stash/config/plugins/community/DupFileManager/__pycache__/ModulesValidate.cpython-312.pyc and /dev/null differ diff --git a/stash/config/plugins/community/DupFileManager/__pycache__/StashPluginHelper.cpython-312.pyc b/stash/config/plugins/community/DupFileManager/__pycache__/StashPluginHelper.cpython-312.pyc deleted file mode 100644 index b15adee..0000000 Binary files a/stash/config/plugins/community/DupFileManager/__pycache__/StashPluginHelper.cpython-312.pyc and /dev/null differ diff --git a/stash/config/plugins/community/LocalVisage/.gitignore b/stash/config/plugins/community/LocalVisage/.gitignore deleted file mode 100644 index 1e3e14d..0000000 --- a/stash/config/plugins/community/LocalVisage/.gitignore +++ /dev/null @@ -1,179 +0,0 @@ -# Created by https://www.toptal.com/developers/gitignore/api/python -# Edit at https://www.toptal.com/developers/gitignore?templates=python - -.deepface -voy_db - -### Python ### -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -*.py,cover -.hypothesis/ -.pytest_cache/ -cover/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -.pybuilder/ -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -# For a library or package, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# .python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# poetry -# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control -#poetry.lock - -# pdm -# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. -#pdm.lock -# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it -# in version control. -# https://pdm.fming.dev/#use-with-ide -.pdm.toml - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ - -# PyCharm -# JetBrains specific template is maintained in a separate JetBrains.gitignore that can -# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore -# and can be added to the global gitignore or merged into this file. For a more nuclear -# option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ - -### Python Patch ### -# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration -poetry.toml - -# ruff -.ruff_cache/ - -# LSP config files -pyrightconfig.json - -# End of https://www.toptal.com/developers/gitignore/api/python \ No newline at end of file diff --git a/stash/config/plugins/community/LocalVisage/LocalVisage.py b/stash/config/plugins/community/LocalVisage/LocalVisage.py deleted file mode 100644 index 1432ec9..0000000 --- a/stash/config/plugins/community/LocalVisage/LocalVisage.py +++ /dev/null @@ -1,371 +0,0 @@ -import os -import sys -import zipfile -import tempfile -from PythonDepManager import ensure_import -# --- VENV AUTO-CREATION WITH REQUIREMENTS AND AUTO-RESTART --- -venv_dir = os.path.join(os.path.dirname(__file__), "venv") -requirements_path = os.path.join(os.path.dirname(__file__), "requirements.txt") -# --- PYTHON VERSION CHECK --- - -if not os.path.isdir(venv_dir) and not (sys.version_info.major == 3 and sys.version_info.minor == 10): - ensure_import("stashapi:stashapp-tools>=0.2.58") - import stashapi.log as log - log.error("Error: Python version must be >= 3.10.X (recommanded 3.10.11) for the first installation of the plugin. Once installed you can change back your python version in stash as this plugin will run within its own venv") - log.error(f"Current version: {sys.version}") - log.error("Go to https://www.python.org/downloads/release/python-31011/") - sys.exit(1) -# --- END PYTHON VERSION CHECK --- - - -def in_venv(): - # Checks if running inside the venv we expect - return ( - hasattr(sys, 'real_prefix') or - (hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix) - ) and os.path.abspath(sys.prefix) == os.path.abspath(venv_dir) -def install_dependencies(): - """ - Install dependencies from requirements.txt if not already installed. - """ - if not os.path.isfile(requirements_path): - print("No requirements.txt found, skipping dependency installation.") - return - - import subprocess - pip_exe = os.path.join(venv_dir, "Scripts", "pip.exe") if os.name == "nt" else os.path.join(venv_dir, "bin", "pip") - py_exe = os.path.join(venv_dir, "Scripts", "python.exe") if os.name == "nt" else os.path.join(venv_dir, "bin", "python") - subprocess.check_call([py_exe,"-m","pip", "install", "--upgrade", "pip"]) - subprocess.check_call([pip_exe, "install", "-r", requirements_path]) - -if not os.path.isdir(venv_dir): - - ensure_import("stashapi:stashapp-tools>=0.2.58") - import stashapi.log as log - import subprocess - log.info("No venv found. Creating virtual environment...") - - subprocess.check_call([sys.executable, "-m", "venv", venv_dir]) - log.progress(0.25) - log.info("Virtual environment created at "+ venv_dir) - if os.path.isfile(requirements_path): - log.info("Installing dependencies... This might take a while") - install_dependencies() - else: - log.info("No requirements.txt found, skipping dependency installation.") - -# If not running in the venv, restart the script using the venv's Python -if not in_venv(): - py_exe = os.path.join(venv_dir, "Scripts", "python.exe") if os.name == "nt" else os.path.join(venv_dir, "bin", "python") - print(f"Restarting script in venv: {py_exe}") - os.execv(py_exe, [py_exe] + sys.argv) -# --- END VENV AUTO-CREATION WITH REQUIREMENTS AND AUTO-RESTART --- - -import json -import subprocess -import platform - -# Set environment variables -os.environ["TF_ENABLE_ONEDNN_OPTS"] = "0" -os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3" # Suppress TF logs -# Ensure dependencies - -try: - from deepface import DeepFace - import numpy as np - import psutil - import stashapi.log as log - from stashapi.stashapp import StashInterface -except: - install_dependencies() - -from deepface import DeepFace -import numpy as np -import psutil -import stashapi.log as log -from stashapi.stashapp import StashInterface - -VOY_DB_PATH = os.path.join(os.path.dirname(__file__), "voy_db") -os.makedirs(os.path.join(VOY_DB_PATH, "facenet"), exist_ok=True) -os.makedirs(os.path.join(VOY_DB_PATH, "arc"), exist_ok=True) - - -def main(): - """ - Main entry point for the plugin. - """ - global stash - - json_input = json.loads(sys.stdin.read()) - stash = StashInterface(json_input["server_connection"]) - mode_arg = json_input["args"].get("mode") - config = stash.get_configuration()["plugins"] - settings = {"voyCount": 15, "sceneCount": 0, "imgCount": 0} - if "LocalVisage" in config: - settings.update(config["LocalVisage"]) - - if mode_arg == "spawn_server": - spawn_server(json_input["server_connection"]) - elif mode_arg == "stop_server": - kill_stashface_server() - elif mode_arg == "rebuild_model": - rebuild_model(update_only=False, settings=settings) - elif mode_arg == "update_model": - rebuild_model(update_only=True, settings=settings) - -def can_read_image(image_path): - """ - Check if an image path can be read, handling both regular files and files inside ZIP archives. - - Args: - image_path (str): Path to the image file - - Returns: - tuple: (can_read, actual_path) where can_read is bool and actual_path is the path to use - """ - if os.path.exists(image_path): - return True, image_path - - # Check if it's inside a ZIP file - if ".zip" in image_path.lower(): - try: - parts = image_path.split(".zip") - if len(parts) >= 2: - zip_path = parts[0] + ".zip" - internal_path = parts[1].lstrip(os.sep + "/") # Remove leading separators - - if os.path.exists(zip_path): - with zipfile.ZipFile(zip_path, 'r') as zip_file: - # Check if the internal path exists in the ZIP - if internal_path in zip_file.namelist(): - # Extract to temporary file and return temp path - with tempfile.NamedTemporaryFile(delete=False, suffix=os.path.splitext(internal_path)[1]) as tmp_file: - tmp_file.write(zip_file.read(internal_path)) - return True, tmp_file.name - except Exception as e: - log.warning(f"Error reading from ZIP file {image_path}: {e}") - - return False, image_path - -def cleanup_temp_file(file_path): - """ - Clean up temporary files created for ZIP extraction. - - Args: - file_path (str): Path to the temporary file - """ - try: - if file_path.startswith(tempfile.gettempdir()): - os.unlink(file_path) - except Exception as e: - log.warning(f"Error cleaning up temporary file {file_path}: {e}") - - -def find_performers(settings): - """ - Find performers with images for model building. - """ - query={} - # query performers based on sceneCount and imgCount settings - scene_count_min = settings.get("sceneCount", 0) - img_count_min = settings.get("imgCount", 0) - if scene_count_min>0 or img_count_min>0: - query={ - "scene_count": {"modifier": "GREATER_THAN", "value": scene_count_min-1}, - "image_count": {"modifier": "GREATER_THAN", "value": img_count_min-1}, - } - performers_all = stash.find_performers(f=query, fragment="id name image_path custom_fields") - performers_without_image = stash.find_performers(f={"is_missing": "image"}, fragment="id") - performers_without_image_ids = {p["id"] for p in performers_without_image} - performers_to_process = [p for p in performers_all if p["id"] not in performers_without_image_ids] - - - - performers_to_process = [ - p for p in performers_to_process - if (p.get("scene_count", 0) >= scene_count_min and - p.get("image_count", 0) >= img_count_min) - ] - return enrich_performers(performers_to_process, settings) - -def enrich_performers(performers, settings): - """ - Add extra images to each performer for embedding calculation. - """ - for progress, performer in enumerate(performers): - performer["images"] = [] - if performer.get("image_path"): - performer["images"].append(performer["image_path"]) - extra_images = stash.find_images( - filter={ - "direction": "ASC", - "page": 1, - "per_page": settings.get("voyCount", 15) - 1, - "q": "", - "sort": "random_11365347" - }, - f={ - "performer_count": {"modifier": "EQUALS", "value": 1}, - "performers": {"modifier": "INCLUDES_ALL", "value": [performer["id"]]}, - "path": { - "modifier": "NOT_MATCHES_REGEX", - "value": r".*\.(mp4|webm|avi|mov|mkv|flv|wmv|gif)$|.*[^\x00-\x7F].*" - } - } - ) - for image in extra_images: - if image.get("visual_files") and len(image["visual_files"]) > 0: - image_path = image["visual_files"][0]["path"] - can_read, actual_path = can_read_image(image_path) - if can_read: - performer["images"].append(actual_path) - else: - log.warning(f"Image path does not exist and cannot be read: {image_path}") - else: - log.warning(f"No visual files found for image ID: {image['id']}") - log.progress((progress + 1) / len(performers)) - return performers - -def rebuild_model(update_only, settings): - """ - Build or update the face embedding model for all performers. - """ - log.info("Updating model..." if update_only else "Rebuilding model...") - performers = find_performers(settings) - if not performers: - log.info("No performers found for model building.") - return - - log.info("Database scraped, starting to rebuild model...") - for progress, performer in enumerate(performers): - embeddings_facenet = [] - embeddings_arc = [] - custom_fields = performer.get("custom_fields", {}) - images_used = custom_fields.get("number_of_images_used_for_voy", 0) - if update_only and images_used >= settings["voyCount"]: - continue - if update_only and len(performer["images"]) <= images_used: - continue - - for uri in performer["images"]: - try: - result_facenet = DeepFace.represent( - img_path=uri, - model_name="Facenet512", - detector_backend='yolov8', - normalization='Facenet2018', - align=True, - enforce_detection=False - ) - embeddings_facenet.append(result_facenet[0]['embedding']) - result_arc = DeepFace.represent( - img_path=uri, - model_name="ArcFace", - detector_backend='yolov8', - enforce_detection=False, - align=True - ) - embeddings_arc.append(result_arc[0]['embedding']) - except Exception as e: - log.warning(f"[WARN] Skipping {uri}: {e}") - finally: - # Clean up temporary files created for ZIP extraction - cleanup_temp_file(uri) - - if embeddings_facenet and embeddings_arc: - avg_embedding_facenet = np.mean(embeddings_facenet, axis=0).astype(np.float32) - facenet_path = os.path.join(VOY_DB_PATH, "facenet", f"{performer['id']}-{performer['name']}.voy") - np.save(facenet_path, avg_embedding_facenet) - avg_embedding_arc = np.mean(embeddings_arc, axis=0).astype(np.float32) - arc_path = os.path.join(VOY_DB_PATH, "arc", f"{performer['id']}-{performer['name']}.voy") - np.save(arc_path, avg_embedding_arc) - embeddings_count = max(len(embeddings_facenet), len(embeddings_arc)) - stash.update_performer({ - "id": performer["id"], - "custom_fields": { - "partial": { - "number_of_images_used_for_voy": embeddings_count, - } - } - }) - log.info(f"[INFO] Saved VOY for {performer['name']} with {embeddings_count} images.") - else: - log.warning(f"[WARN] No valid embeddings for {performer['name']}.") - log.progress((progress + 1) / len(performers)) - log.info("Rebuilding model finished.") - if server_running(): - kill_stashface_server() - # Optionally, reload server with new connection info if needed - -def server_running(): - """ - Check if the stashface server is running. - """ - try: - for proc in psutil.process_iter(['pid', 'name', 'cmdline']): - name = proc.info.get('name', '').lower() - cmdline_raw = proc.info.get('cmdline') - if not cmdline_raw: - continue - cmdline = [str(arg).lower() for arg in cmdline_raw] - if 'python' in name and any('stashface' in arg and 'app.py' in arg for arg in cmdline): - log.debug("Stashface server is already running.") - return True - except psutil.NoSuchProcess: - return False - return False - -def kill_stashface_server(): - """ - Kill any running stashface server processes. - """ - killed = False - for proc in psutil.process_iter(['pid', 'name', 'cmdline']): - try: - cmdline = proc.info['cmdline'] - if cmdline and any('stashface' in arg and 'app.py' in arg for arg in cmdline): - log.debug(f"Killing process {proc.pid}: {' '.join(cmdline)}") - proc.kill() - killed = True - except (psutil.NoSuchProcess, psutil.AccessDenied): - continue - if killed: - log.info("Stashface server killed.") - -def spawn_server(server_connection=None): - """ - Spawn the stashface server as a subprocess. - """ - if server_running(): - log.info("Stashface server is already running.") - return - plugin_dir = os.path.dirname(__file__) - py_exe = os.path.join(venv_dir, "Scripts", "python.exe") if os.name == "nt" else os.path.join(venv_dir, "bin", "python") - cmd = [ - py_exe, - os.path.abspath(os.path.join(plugin_dir, "stashface", "app.py")), - ] - log.info("Spawning server") - env = os.environ.copy() - if server_connection is not None: - env["SERVER_CONNECTION"] = json.dumps(server_connection) - if platform.system() == "Windows": - subprocess.Popen( - cmd, - creationflags=subprocess.CREATE_NEW_CONSOLE, - close_fds=True, - cwd=plugin_dir, - env=env - ) - else: - subprocess.Popen( - cmd, - start_new_session=True, - close_fds=True, - cwd=plugin_dir, - env=env - ) - log.info("Server spawned successfully, you can now use the plugin.") - -if __name__ == '__main__': - main() \ No newline at end of file diff --git a/stash/config/plugins/community/LocalVisage/LocalVisage.yml b/stash/config/plugins/community/LocalVisage/LocalVisage.yml deleted file mode 100644 index fa0224d..0000000 --- a/stash/config/plugins/community/LocalVisage/LocalVisage.yml +++ /dev/null @@ -1,57 +0,0 @@ -name: Local Visage -description: Local Performer Recognition plugin using DeepFace -# requires: PythonDepManager -# requires: stashUserscriptLibrary7dJx1qP -version: 1.0.1 -exec: - - python - - "{pluginDir}/LocalVisage.py" -interface: raw -ui: - requires: - - stashUserscriptLibrary7dJx1qP - javascript: - - frontend.js - - https://cdn.jsdelivr.net/npm/@gradio/client@1.15.3/dist/index.js - css: - - frontend.css - csp: - connect-src: - - http://localhost:7860 - - http://192.168.1.198:7860 - - http://your-server-ip-address:7860 - script-src: - - https://cdn.jsdelivr.net/npm/html2canvas@1.4.1/dist/html2canvas.min.js - - https://cdn.jsdelivr.net/npm/@gradio/client@1.15.3/dist/index.js - -tasks: - - name: Rebuild Face Recognition Model - description: Rebuild the face recognition model entirely - defaultArgs: - mode: rebuild_model - - name: Update Face Recognition Model - description: Update the face performers model with new images if there model was built on less than "Target image count per voy" images - defaultArgs: - mode: update_model - - name: Start server - description: Start the face recognition server (if not started) to allow the plugin to work - defaultArgs: - mode: spawn_server - - name: Stop server - description: Stop the face recognition server - defaultArgs: - mode: stop_server - -settings: - voyCount: - displayName: Target image count per voy (default is 15) - description: Number of images to to use to create the face recognition model (per performer) - type: NUMBER - imgCount: - displayName: Minimum number of images for performer to be added to model - description: Minimum number of images a performer must have to be included in recognition (EXCLUDING THE PERFORMER THUMBNAIL). Set to 0 for best result. - type: NUMBER - sceneCount: - displayName: Minimum number of scenes for performer to be added to model - description: Minimum number of scenes a performer must have to be included in recognition - type: NUMBER diff --git a/stash/config/plugins/community/LocalVisage/frontend.css b/stash/config/plugins/community/LocalVisage/frontend.css deleted file mode 100644 index a423d17..0000000 --- a/stash/config/plugins/community/LocalVisage/frontend.css +++ /dev/null @@ -1,136 +0,0 @@ -button.svelte-localhjf { - background-color: var(--nav-color); - border: 0px; -} -.scanner.svelte-localhjf { - animation: svelte-localhjf-pulse 2s infinite; -} -@keyframes svelte-localhjf-pulse { - 0% { - transform: scale(0.95); - box-shadow: 0 0 0 0 var(--light); - } - 70% { - transform: scale(1.1); - box-shadow: 0 0 0 10px var(--info); - } - 100% { - transform: scale(0.95); - box-shadow: 0 0 0 0 var(--primary); - } -} -svg.svelte-localhjf { - fill: #ffffff; -} -button.svelte-localhjf { - background-color: var(--nav-color); - border: 0px; -} -.scanner.svelte-localhjf { - animation: svelte-localhjf-pulse 2s infinite; -} -@keyframes svelte-localhjf-pulse { - 0% { - transform: scale(0.95); - box-shadow: 0 0 0 0 var(--light); - } - 70% { - transform: scale(1.1); - box-shadow: 0 0 0 10px var(--info); - } - 100% { - transform: scale(0.95); - box-shadow: 0 0 0 0 var(--primary); - } -} -svg.svelte-localhjf { - fill: #ffffff; -} -.carousel.svelte-localhja { - display: flex; - overflow-x: auto; - overflow-y: auto; - white-space: nowrap; - overscroll-behavior-x: contain; - overscroll-behavior-y: contain; - scroll-snap-type: x mandatory; - gap: 1rem; -} -.modal-header.svelte-localhja { - font-size: 2.4rem; - border-bottom: 0px; - padding: 10px 10px 0px 10px; -} -.modal-footer.svelte-localhja { - border-top: 0px; -} -.svelte-localhja::-webkit-scrollbar { - width: 30px; -} -.svelte-localhja::-webkit-scrollbar-thumb { - background: var(--orange); - border-radius: 20px; -} -.card.svelte-localhja { - max-width: 78%; -} -.performer-card.svelte-localhja { - cursor: pointer; -} -.performer-card-image .svelte-localhja { - min-width: none !important; - aspect-ratio: 4/5; -} -.assigned.svelte-localhja { - border: 5px solid var(--green); - animation: border 1s ease-in-out; -} -.face-tab.svelte-localhja { - width: 50px; - height: 50px; - object-fit: cover; -} -.selected.svelte-localhjb { - border: 2px solid #007bff; -} -.face-tabs.svelte-localhjb { - position: absolute; - flex: 0 0 450px; - max-width: 450px; - min-width: 450px; - height: 100%; - overflow: auto; - order: -1; - background-color: var(--body-color); -} -.face-item.svelte-localhjb { - width: 160px; - height: 90px; - border-radius: 5px 5px 0px 0px; - position: relative; - cursor: pointer; -} -.svelte-tabs__tab.svelte-localhjc { - border: none; - border-bottom: 2px solid transparent; - color: #000000; - cursor: pointer; - list-style: none; - display: inline-block; - padding: 0.5em 0.75em; -} -.svelte-tabs__tab.svelte-localhjc:focus { - outline: thin dotted; -} -.svelte-tabs__selected.svelte-localhjc { - border-bottom: 2px solid #4f81e5; - color: #4f81e5; -} -.svelte-tabs__tab-panel.svelte-lcocalhjd { - margin-top: 0.5em; -} -.svelte-tabs__tab-list.svelte-localhje { - border-bottom: 1px solid #cccccc; - margin: 0; - padding: 0; -} diff --git a/stash/config/plugins/community/LocalVisage/frontend.js b/stash/config/plugins/community/LocalVisage/frontend.js deleted file mode 100644 index e275575..0000000 --- a/stash/config/plugins/community/LocalVisage/frontend.js +++ /dev/null @@ -1,14579 +0,0 @@ -(function () { - "use strict"; - // Using CDN version of @gradio/client to avoid bundling issues - // import { Client, handle_file } from "@gradio/client"; - - let VISAGE_API_URL = - window.location.protocol + "//" + window.location.hostname + ":7860"; // URL of the Visage API - let THRESHOLD = 0; // remove matches with a distance higher than this - let MAX_RESULTS = 5; // number of results to show, don't change this for now - - function waitForElm(selector) { - return new Promise((resolve) => { - if (document.querySelector(selector)) { - return resolve(document.querySelector(selector)); - } - - const observer = new MutationObserver((mutations) => { - if (document.querySelector(selector)) { - resolve(document.querySelector(selector)); - observer.disconnect(); - } - }); - - observer.observe(document.body, { - childList: true, - subtree: true, - }); - }); - } - - function getScenarioAndID() { - var result = document.URL.match(/(scenes|images)\/(\d+)/); - var scenario = result[1]; - var scenario_id = result[2]; - return [scenario, scenario_id]; - } - - async function startServer() { - const reqData = { - query: `mutation{ - runPluginTask(plugin_id:"LocalVisage",task_name:"Start server") -}`, - }; - await stash7dJx1qP.stash.callGQL(reqData); - } - - async function getPerformersForScene(scene_id) { - const reqData = { - query: `{ - findScene(id: "${scene_id}") { - performers { - id - } - } - }`, - }; - var result = await stash7dJx1qP.stash.callGQL(reqData); - return result.data.findScene.performers.map((p) => p.id); - } - - async function getPerformersForImage(image_id) { - const reqData = { - query: `{ - findImage(id: "${image_id}") { - performers { - id - } - } - }`, - }; - var result = await stash7dJx1qP.stash.callGQL(reqData); - return result.data.findImage.performers.map((p) => p.id); - } - - async function updateScene(scene_id, performer_ids) { - const reqData = { - variables: { input: { id: scene_id, performer_ids: performer_ids } }, - query: `mutation sceneUpdate($input: SceneUpdateInput!){ - sceneUpdate(input: $input) { - id - } - }`, - }; - return stash7dJx1qP.stash.callGQL(reqData); - } - - async function updateImage(image_id, performer_ids) { - const reqData = { - variables: { input: { id: image_id, performer_ids: performer_ids } }, - query: `mutation imageUpdate($input: ImageUpdateInput!){ - imageUpdate(input: $input) { - id - } - }`, - }; - return stash7dJx1qP.stash.callGQL(reqData); - } - - async function getStashboxEndpoint() { - const reqData = { - query: `{ - configuration { - general { - stashBoxes { - endpoint - } - } - } - }`, - }; - var result = await stash7dJx1qP.stash.callGQL(reqData); - return result.data.configuration.general.stashBoxes[0].endpoint; - } - - async function getPerformerDataFromStashID(stash_id) { - const reqData = { - variables: { - source: { - stash_box_index: 0, - }, - input: { - query: stash_id, - }, - }, - query: `query ScrapeSinglePerformer($source: ScraperSourceInput!, $input: ScrapeSinglePerformerInput!) { - scrapeSinglePerformer(source: $source, input: $input) { - name - disambiguation - gender - url - twitter - instagram - birthdate - ethnicity - country - eye_color - height - measurements - fake_tits - career_length - tattoos - piercings - aliases - images - details - death_date - hair_color - weight - remote_site_id - } - }`, - }; - var result = await stash7dJx1qP.stash.callGQL(reqData); - return result.data.scrapeSinglePerformer.filter( - (p) => p.remote_site_id === stash_id - )[0]; - } - - async function createPerformer(performer) { - const reqData = { - variables: { input: performer }, - query: `mutation performerCreate($input: PerformerCreateInput!) { - performerCreate(input: $input){ - id - } - }`, - }; - return stash7dJx1qP.stash.callGQL(reqData); - } - - let gradioClientModule = null; - let gradioClient = null; - - /** - * Loads the Gradio client from CDN - * @returns {Promise} - The Gradio client module - */ - async function loadGradioClient() { - if (!gradioClientModule) { - try { - // Add Node.js polyfills for browser compatibility - if (typeof window !== "undefined") { - if (!window.Buffer) { - // Create a proper Buffer constructor for instanceof checks - function Buffer(data, encoding) { - if (typeof data === "string") { - if (encoding === "base64") { - const binaryString = atob(data); - return new Uint8Array( - binaryString.split("").map((c) => c.charCodeAt(0)) - ); - } - return new TextEncoder().encode(data); - } - return new Uint8Array(data); - } - - Buffer.from = (data, encoding) => { - if (encoding === "base64") { - const binaryString = atob(data); - return new Uint8Array( - binaryString.split("").map((c) => c.charCodeAt(0)) - ); - } - return new TextEncoder().encode(data); - }; - - Buffer.isBuffer = (obj) => { - return obj instanceof Uint8Array || obj instanceof ArrayBuffer; - }; - - window.Buffer = Buffer; - } - - if (!window.global) { - window.global = window; - } - - if (!window.process) { - window.process = { - env: {}, - nextTick: (fn) => setTimeout(fn, 0), - }; - } - } - - console.log("Loading Gradio client from CDN..."); - const module = await import( - "https://cdn.jsdelivr.net/npm/@gradio/client@1.15.3/dist/index.js" - ); - console.log("Gradio client loaded:", module); - gradioClientModule = module; - } catch (error) { - console.error("Failed to load Gradio client:", error); - throw new Error(`Could not load Gradio client: ${error.message}`); - } - } - return gradioClientModule; - } - - /** - * Gets or creates a Gradio client connection. - * If the client is not available, attempts to start the server and retries for up to 1 minute. - * @returns {Promise} - The Gradio client instance - */ - async function getGradioClient() { - const RETRY_INTERVAL = 5000; // 5 seconds - const MAX_RETRIES = 12; // 12 * 5s = 60s - - if (gradioClient) return gradioClient; - - let lastError; - - for (let attempt = 0; attempt < MAX_RETRIES; attempt++) { - try { - const { Client } = await loadGradioClient(); - gradioClient = await Client.connect(VISAGE_API_URL); - return gradioClient; - } catch (error) { - lastError = error; - console.warn( - `Gradio client connection failed (attempt ${ - attempt + 1 - }/${MAX_RETRIES}): ${error.message}` - ); - - // On first failure, try to start the server - if (attempt === 0) { - try { - await startServer(); - console.info("Called startServer() after Gradio client failure."); - } catch (e) { - console.warn("startServer() also failed:", e); - } - } - - // Wait before retrying, unless it's the last attempt - if (attempt < MAX_RETRIES - 1) { - await new Promise((res) => setTimeout(res, RETRY_INTERVAL)); - } - } - } - - throw new Error( - "Server couldn't be reached nor remotely started. Please check stash log. If it's your first time using the plugin, installation can be long." - ); - } - - /** - * Converts a data URL to a Blob - * @param {string} dataUrl - The data URL to convert - * @returns {Blob} - The converted blob - */ - function dataUrlToBlob(dataUrl) { - const arr = dataUrl.split(","); - const mime = arr[0].match(/:(.*?);/)[1]; - const bstr = atob(arr[1]); - let n = bstr.length; - const u8arr = new Uint8Array(n); - while (n--) { - u8arr[n] = bstr.charCodeAt(n); - } - return new Blob([u8arr], { type: mime }); - } - - /** - * Creates a file handle for Gradio API - * @param {Blob} blob - The blob to convert to file handle - * @returns {Promise} - The file handle - */ - async function createFileHandle(blob) { - try { - // Ensure we have a valid blob-like object - if (!blob || typeof blob !== "object") { - throw new Error("Invalid blob provided to createFileHandle"); - } - - const { handle_file } = await loadGradioClient(); - if (!handle_file || typeof handle_file !== "function") { - throw new Error( - "handle_file function not available from Gradio client" - ); - } - - return handle_file(blob); - } catch (error) { - console.error("Error in createFileHandle:", error); - throw new Error(`File handle creation failed: ${error.message}`); - } - } - - /** - * Calls the Gradio API using the official client. - * If the client is not available, attempts to start the server and retries for up to 1 minute. - * @param {string} endpoint - The API endpoint name (e.g., 'image_search', 'find_faces_in_sprite') - * @param {Array} inputs - The input parameters for the API call - * @returns {Promise} - The API response data - */ - async function callGradioAPI(endpoint, inputs) { - const RETRY_INTERVAL = 5000; // 5 seconds - const MAX_RETRIES = 12; // 12 * 5s = 60s - - let lastError; - - for (let attempt = 0; attempt < MAX_RETRIES; attempt++) { - try { - const client = await getGradioClient(); - const result = await client.predict(`/${endpoint}`, inputs); - console.log(result); - return result; - } catch (error) { - lastError = error; - console.warn( - `Gradio API call failed (attempt ${attempt + 1}/${MAX_RETRIES}): ${ - error.message - }` - ); - - // On first failure, try to start the server - if (attempt === 0) { - try { - await startServer(); - console.info("Called startServer() after Gradio client failure."); - } catch (e) { - console.warn("startServer() also failed:", e); - } - } - - // Wait before retrying, unless it's the last attempt - if (attempt < MAX_RETRIES - 1) { - await new Promise((res) => setTimeout(res, RETRY_INTERVAL)); - } - } - } - - throw new Error( - "Server couldnt be reach nor remotly started. Please check stash log. If its you first time using the plugin, installation can be long." - ); - } - - function smoothload(node) { - function load() { - if (node.naturalWidth) return; // already loaded - - node.style.opacity = "0"; - node.style.transition = "opacity 0.4s"; - - node.addEventListener( - "load", - () => { - node.style.opacity = "1"; - }, - { - once: true, - } - ); - } - - const observer = new MutationObserver((mutations) => { - for (const mutation of mutations) { - if (mutation.attributeName === "src") { - load(); - } - } - }); - - observer.observe(node, { - attributes: true, - }); - - load(); - - return { - destroy() { - observer.disconnect(); - }, - }; - } - - /** - * Retrieves the URL of the sprite for a given scene ID. - * @param {number} scene_id - The ID of the scene to retrieve the sprite URL for. - * @returns {Promise} - A Promise that resolves with the sprite URL if it exists, or null if it does not. - */ - async function getUrlSprite(scene_id) { - const reqData = { - query: `{ - findScene(id: ${scene_id}){ - paths{ - sprite - } - } - }`, - }; - var result = await stash7dJx1qP.stash.callGQL(reqData); - const url = result.data.findScene.paths["sprite"]; - const response = await fetch(url); - if (response.status === 404) { - return null; - } else { - return result.data.findScene.paths["sprite"]; - } - } - - function noop() {} - const identity = (x) => x; - function assign(tar, src) { - // @ts-ignore - for (const k in src) tar[k] = src[k]; - return tar; - } - function run(fn) { - return fn(); - } - function blank_object() { - return Object.create(null); - } - function run_all(fns) { - fns.forEach(run); - } - function is_function(thing) { - return typeof thing === "function"; - } - function safe_not_equal(a, b) { - return a != a - ? b == b - : a !== b || (a && typeof a === "object") || typeof a === "function"; - } - let src_url_equal_anchor; - function src_url_equal(element_src, url) { - if (!src_url_equal_anchor) { - src_url_equal_anchor = document.createElement("a"); - } - src_url_equal_anchor.href = url; - return element_src === src_url_equal_anchor.href; - } - function is_empty(obj) { - return Object.keys(obj).length === 0; - } - function subscribe(store, ...callbacks) { - if (store == null) { - return noop; - } - const unsub = store.subscribe(...callbacks); - return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub; - } - function component_subscribe(component, store, callback) { - component.$$.on_destroy.push(subscribe(store, callback)); - } - function create_slot(definition, ctx, $$scope, fn) { - if (definition) { - const slot_ctx = get_slot_context(definition, ctx, $$scope, fn); - return definition[0](slot_ctx); - } - } - function get_slot_context(definition, ctx, $$scope, fn) { - return definition[1] && fn - ? assign($$scope.ctx.slice(), definition[1](fn(ctx))) - : $$scope.ctx; - } - function get_slot_changes(definition, $$scope, dirty, fn) { - if (definition[2] && fn) { - const lets = definition[2](fn(dirty)); - if ($$scope.dirty === undefined) { - return lets; - } - if (typeof lets === "object") { - const merged = []; - const len = Math.max($$scope.dirty.length, lets.length); - for (let i = 0; i < len; i += 1) { - merged[i] = $$scope.dirty[i] | lets[i]; - } - return merged; - } - return $$scope.dirty | lets; - } - return $$scope.dirty; - } - function update_slot_base( - slot, - slot_definition, - ctx, - $$scope, - slot_changes, - get_slot_context_fn - ) { - if (slot_changes) { - const slot_context = get_slot_context( - slot_definition, - ctx, - $$scope, - get_slot_context_fn - ); - slot.p(slot_context, slot_changes); - } - } - function get_all_dirty_from_scope($$scope) { - if ($$scope.ctx.length > 32) { - const dirty = []; - const length = $$scope.ctx.length / 32; - for (let i = 0; i < length; i++) { - dirty[i] = -1; - } - return dirty; - } - return -1; - } - function action_destroyer(action_result) { - return action_result && is_function(action_result.destroy) - ? action_result.destroy - : noop; - } - function split_css_unit(value) { - const split = - typeof value === "string" && value.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/); - return split ? [parseFloat(split[1]), split[2] || "px"] : [value, "px"]; - } - - const is_client = typeof window !== "undefined"; - let now = is_client ? () => window.performance.now() : () => Date.now(); - let raf = is_client ? (cb) => requestAnimationFrame(cb) : noop; - - const tasks = new Set(); - function run_tasks(now) { - tasks.forEach((task) => { - if (!task.c(now)) { - tasks.delete(task); - task.f(); - } - }); - if (tasks.size !== 0) raf(run_tasks); - } - /** - * Creates a new task that runs on each raf frame - * until it returns a falsy value or is aborted - */ - function loop(callback) { - let task; - if (tasks.size === 0) raf(run_tasks); - return { - promise: new Promise((fulfill) => { - tasks.add((task = { c: callback, f: fulfill })); - }), - abort() { - tasks.delete(task); - }, - }; - } - function append(target, node) { - target.appendChild(node); - } - function get_root_for_style(node) { - if (!node) return document; - const root = node.getRootNode ? node.getRootNode() : node.ownerDocument; - if (root && root.host) { - return root; - } - return node.ownerDocument; - } - function append_empty_stylesheet(node) { - const style_element = element("style"); - append_stylesheet(get_root_for_style(node), style_element); - return style_element.sheet; - } - function append_stylesheet(node, style) { - append(node.head || node, style); - return style.sheet; - } - function insert(target, node, anchor) { - target.insertBefore(node, anchor || null); - } - function detach(node) { - if (node.parentNode) { - node.parentNode.removeChild(node); - } - } - function element(name) { - return document.createElement(name); - } - function text(data) { - return document.createTextNode(data); - } - function space() { - return text(" "); - } - function empty() { - return text(""); - } - function listen(node, event, handler, options) { - node.addEventListener(event, handler, options); - return () => node.removeEventListener(event, handler, options); - } - function attr(node, attribute, value) { - if (value == null) node.removeAttribute(attribute); - else if (node.getAttribute(attribute) !== value) - node.setAttribute(attribute, value); - } - function children(element) { - return Array.from(element.childNodes); - } - function set_data(text, data) { - data = "" + data; - if (text.data === data) return; - text.data = data; - } - function set_style(node, key, value, important) { - if (value == null) { - node.style.removeProperty(key); - } else { - node.style.setProperty(key, value, important ? "important" : ""); - } - } - function toggle_class(element, name, toggle) { - element.classList[toggle ? "add" : "remove"](name); - } - function custom_event( - type, - detail, - { bubbles = false, cancelable = false } = {} - ) { - const e = document.createEvent("CustomEvent"); - e.initCustomEvent(type, bubbles, cancelable, detail); - return e; - } - - // we need to store the information for multiple documents because a Svelte application could also contain iframes - // https://github.com/sveltejs/svelte/issues/3624 - const managed_styles = new Map(); - let active = 0; - // https://github.com/darkskyapp/string-hash/blob/master/index.js - function hash(str) { - let hash = 5381; - let i = str.length; - while (i--) hash = ((hash << 5) - hash) ^ str.charCodeAt(i); - return hash >>> 0; - } - function create_style_information(doc, node) { - const info = { stylesheet: append_empty_stylesheet(node), rules: {} }; - managed_styles.set(doc, info); - return info; - } - function create_rule(node, a, b, duration, delay, ease, fn, uid = 0) { - const step = 16.666 / duration; - let keyframes = "{\n"; - for (let p = 0; p <= 1; p += step) { - const t = a + (b - a) * ease(p); - keyframes += p * 100 + `%{${fn(t, 1 - t)}}\n`; - } - const rule = keyframes + `100% {${fn(b, 1 - b)}}\n}`; - const name = `__svelte_${hash(rule)}_${uid}`; - const doc = get_root_for_style(node); - const { stylesheet, rules } = - managed_styles.get(doc) || create_style_information(doc, node); - if (!rules[name]) { - rules[name] = true; - stylesheet.insertRule( - `@keyframes ${name} ${rule}`, - stylesheet.cssRules.length - ); - } - const animation = node.style.animation || ""; - node.style.animation = `${ - animation ? `${animation}, ` : "" - }${name} ${duration}ms linear ${delay}ms 1 both`; - active += 1; - return name; - } - function delete_rule(node, name) { - const previous = (node.style.animation || "").split(", "); - const next = previous.filter( - name - ? (anim) => anim.indexOf(name) < 0 // remove specific animation - : (anim) => anim.indexOf("__svelte") === -1 // remove all Svelte animations - ); - const deleted = previous.length - next.length; - if (deleted) { - node.style.animation = next.join(", "); - active -= deleted; - if (!active) clear_rules(); - } - } - function clear_rules() { - raf(() => { - if (active) return; - managed_styles.forEach((info) => { - const { ownerNode } = info.stylesheet; - // there is no ownerNode if it runs on jsdom. - if (ownerNode) detach(ownerNode); - }); - managed_styles.clear(); - }); - } - - function create_animation(node, from, fn, params) { - if (!from) return noop; - const to = node.getBoundingClientRect(); - if ( - from.left === to.left && - from.right === to.right && - from.top === to.top && - from.bottom === to.bottom - ) - return noop; - const { - delay = 0, - duration = 300, - easing = identity, - // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation? - start: start_time = now() + delay, - // @ts-ignore todo: - end = start_time + duration, - tick = noop, - css, - } = fn(node, { from, to }, params); - let running = true; - let started = false; - let name; - function start() { - if (css) { - name = create_rule(node, 0, 1, duration, delay, easing, css); - } - if (!delay) { - started = true; - } - } - function stop() { - if (css) delete_rule(node, name); - running = false; - } - loop((now) => { - if (!started && now >= start_time) { - started = true; - } - if (started && now >= end) { - tick(1, 0); - stop(); - } - if (!running) { - return false; - } - if (started) { - const p = now - start_time; - const t = 0 + 1 * easing(p / duration); - tick(t, 1 - t); - } - return true; - }); - start(); - tick(0, 1); - return stop; - } - function fix_position(node) { - const style = getComputedStyle(node); - if (style.position !== "absolute" && style.position !== "fixed") { - const { width, height } = style; - const a = node.getBoundingClientRect(); - node.style.position = "absolute"; - node.style.width = width; - node.style.height = height; - add_transform(node, a); - } - } - function add_transform(node, a) { - const b = node.getBoundingClientRect(); - if (a.left !== b.left || a.top !== b.top) { - const style = getComputedStyle(node); - const transform = style.transform === "none" ? "" : style.transform; - node.style.transform = `${transform} translate(${a.left - b.left}px, ${ - a.top - b.top - }px)`; - } - } - - let current_component; - function set_current_component(component) { - current_component = component; - } - function get_current_component() { - if (!current_component) - throw new Error("Function called outside component initialization"); - return current_component; - } - /** - * The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM. - * It must be called during the component's initialisation (but doesn't need to live *inside* the component; - * it can be called from an external module). - * - * `onMount` does not run inside a [server-side component](/docs#run-time-server-side-component-api). - * - * https://svelte.dev/docs#run-time-svelte-onmount - */ - function onMount(fn) { - get_current_component().$$.on_mount.push(fn); - } - /** - * Schedules a callback to run immediately after the component has been updated. - * - * The first time the callback runs will be after the initial `onMount` - */ - function afterUpdate(fn) { - get_current_component().$$.after_update.push(fn); - } - /** - * Schedules a callback to run immediately before the component is unmounted. - * - * Out of `onMount`, `beforeUpdate`, `afterUpdate` and `onDestroy`, this is the - * only one that runs inside a server-side component. - * - * https://svelte.dev/docs#run-time-svelte-ondestroy - */ - function onDestroy(fn) { - get_current_component().$$.on_destroy.push(fn); - } - /** - * Associates an arbitrary `context` object with the current component and the specified `key` - * and returns that object. The context is then available to children of the component - * (including slotted content) with `getContext`. - * - * Like lifecycle functions, this must be called during component initialisation. - * - * https://svelte.dev/docs#run-time-svelte-setcontext - */ - function setContext(key, context) { - get_current_component().$$.context.set(key, context); - return context; - } - /** - * Retrieves the context that belongs to the closest parent component with the specified `key`. - * Must be called during component initialisation. - * - * https://svelte.dev/docs#run-time-svelte-getcontext - */ - function getContext(key) { - return get_current_component().$$.context.get(key); - } - - const dirty_components = []; - const binding_callbacks = []; - let render_callbacks = []; - const flush_callbacks = []; - const resolved_promise = /* @__PURE__ */ Promise.resolve(); - let update_scheduled = false; - function schedule_update() { - if (!update_scheduled) { - update_scheduled = true; - resolved_promise.then(flush); - } - } - function tick() { - schedule_update(); - return resolved_promise; - } - function add_render_callback(fn) { - render_callbacks.push(fn); - } - function add_flush_callback(fn) { - flush_callbacks.push(fn); - } - // flush() calls callbacks in this order: - // 1. All beforeUpdate callbacks, in order: parents before children - // 2. All bind:this callbacks, in reverse order: children before parents. - // 3. All afterUpdate callbacks, in order: parents before children. EXCEPT - // for afterUpdates called during the initial onMount, which are called in - // reverse order: children before parents. - // Since callbacks might update component values, which could trigger another - // call to flush(), the following steps guard against this: - // 1. During beforeUpdate, any updated components will be added to the - // dirty_components array and will cause a reentrant call to flush(). Because - // the flush index is kept outside the function, the reentrant call will pick - // up where the earlier call left off and go through all dirty components. The - // current_component value is saved and restored so that the reentrant call will - // not interfere with the "parent" flush() call. - // 2. bind:this callbacks cannot trigger new flush() calls. - // 3. During afterUpdate, any updated components will NOT have their afterUpdate - // callback called a second time; the seen_callbacks set, outside the flush() - // function, guarantees this behavior. - const seen_callbacks = new Set(); - let flushidx = 0; // Do *not* move this inside the flush() function - function flush() { - // Do not reenter flush while dirty components are updated, as this can - // result in an infinite loop. Instead, let the inner flush handle it. - // Reentrancy is ok afterwards for bindings etc. - if (flushidx !== 0) { - return; - } - const saved_component = current_component; - do { - // first, call beforeUpdate functions - // and update components - try { - while (flushidx < dirty_components.length) { - const component = dirty_components[flushidx]; - flushidx++; - set_current_component(component); - update(component.$$); - } - } catch (e) { - // reset dirty state to not end up in a deadlocked state and then rethrow - dirty_components.length = 0; - flushidx = 0; - throw e; - } - set_current_component(null); - dirty_components.length = 0; - flushidx = 0; - while (binding_callbacks.length) binding_callbacks.pop()(); - // then, once components are updated, call - // afterUpdate functions. This may cause - // subsequent updates... - for (let i = 0; i < render_callbacks.length; i += 1) { - const callback = render_callbacks[i]; - if (!seen_callbacks.has(callback)) { - // ...so guard against infinite loops - seen_callbacks.add(callback); - callback(); - } - } - render_callbacks.length = 0; - } while (dirty_components.length); - while (flush_callbacks.length) { - flush_callbacks.pop()(); - } - update_scheduled = false; - seen_callbacks.clear(); - set_current_component(saved_component); - } - function update($$) { - if ($$.fragment !== null) { - $$.update(); - run_all($$.before_update); - const dirty = $$.dirty; - $$.dirty = [-1]; - $$.fragment && $$.fragment.p($$.ctx, dirty); - $$.after_update.forEach(add_render_callback); - } - } - /** - * Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`. - */ - function flush_render_callbacks(fns) { - const filtered = []; - const targets = []; - render_callbacks.forEach((c) => - fns.indexOf(c) === -1 ? filtered.push(c) : targets.push(c) - ); - targets.forEach((c) => c()); - render_callbacks = filtered; - } - - let promise; - function wait() { - if (!promise) { - promise = Promise.resolve(); - promise.then(() => { - promise = null; - }); - } - return promise; - } - function dispatch(node, direction, kind) { - node.dispatchEvent(custom_event(`${direction ? "intro" : "outro"}${kind}`)); - } - const outroing = new Set(); - let outros; - function group_outros() { - outros = { - r: 0, - c: [], - p: outros, // parent group - }; - } - function check_outros() { - if (!outros.r) { - run_all(outros.c); - } - outros = outros.p; - } - function transition_in(block, local) { - if (block && block.i) { - outroing.delete(block); - block.i(local); - } - } - function transition_out(block, local, detach, callback) { - if (block && block.o) { - if (outroing.has(block)) return; - outroing.add(block); - outros.c.push(() => { - outroing.delete(block); - if (callback) { - if (detach) block.d(1); - callback(); - } - }); - block.o(local); - } else if (callback) { - callback(); - } - } - const null_transition = { duration: 0 }; - function create_in_transition(node, fn, params) { - const options = { direction: "in" }; - let config = fn(node, params, options); - let running = false; - let animation_name; - let task; - let uid = 0; - function cleanup() { - if (animation_name) delete_rule(node, animation_name); - } - function go() { - const { - delay = 0, - duration = 300, - easing = identity, - tick = noop, - css, - } = config || null_transition; - if (css) - animation_name = create_rule( - node, - 0, - 1, - duration, - delay, - easing, - css, - uid++ - ); - tick(0, 1); - const start_time = now() + delay; - const end_time = start_time + duration; - if (task) task.abort(); - running = true; - add_render_callback(() => dispatch(node, true, "start")); - task = loop((now) => { - if (running) { - if (now >= end_time) { - tick(1, 0); - dispatch(node, true, "end"); - cleanup(); - return (running = false); - } - if (now >= start_time) { - const t = easing((now - start_time) / duration); - tick(t, 1 - t); - } - } - return running; - }); - } - let started = false; - return { - start() { - if (started) return; - started = true; - delete_rule(node); - if (is_function(config)) { - config = config(options); - wait().then(go); - } else { - go(); - } - }, - invalidate() { - started = false; - }, - end() { - if (running) { - cleanup(); - running = false; - } - }, - }; - } - function create_out_transition(node, fn, params) { - const options = { direction: "out" }; - let config = fn(node, params, options); - let running = true; - let animation_name; - const group = outros; - group.r += 1; - function go() { - const { - delay = 0, - duration = 300, - easing = identity, - tick = noop, - css, - } = config || null_transition; - if (css) - animation_name = create_rule(node, 1, 0, duration, delay, easing, css); - const start_time = now() + delay; - const end_time = start_time + duration; - add_render_callback(() => dispatch(node, false, "start")); - loop((now) => { - if (running) { - if (now >= end_time) { - tick(0, 1); - dispatch(node, false, "end"); - if (!--group.r) { - // this will result in `end()` being called, - // so we don't need to clean up here - run_all(group.c); - } - return false; - } - if (now >= start_time) { - const t = easing((now - start_time) / duration); - tick(1 - t, t); - } - } - return running; - }); - } - if (is_function(config)) { - wait().then(() => { - // @ts-ignore - config = config(options); - go(); - }); - } else { - go(); - } - return { - end(reset) { - if (reset && config.tick) { - config.tick(1, 0); - } - if (running) { - if (animation_name) delete_rule(node, animation_name); - running = false; - } - }, - }; - } - - function destroy_block(block, lookup) { - block.d(1); - lookup.delete(block.key); - } - function outro_and_destroy_block(block, lookup) { - transition_out(block, 1, 1, () => { - lookup.delete(block.key); - }); - } - function fix_and_outro_and_destroy_block(block, lookup) { - block.f(); - outro_and_destroy_block(block, lookup); - } - function update_keyed_each( - old_blocks, - dirty, - get_key, - dynamic, - ctx, - list, - lookup, - node, - destroy, - create_each_block, - next, - get_context - ) { - let o = old_blocks.length; - let n = list.length; - let i = o; - const old_indexes = {}; - while (i--) old_indexes[old_blocks[i].key] = i; - const new_blocks = []; - const new_lookup = new Map(); - const deltas = new Map(); - const updates = []; - i = n; - while (i--) { - const child_ctx = get_context(ctx, list, i); - const key = get_key(child_ctx); - let block = lookup.get(key); - if (!block) { - block = create_each_block(key, child_ctx); - block.c(); - } else if (dynamic) { - // defer updates until all the DOM shuffling is done - updates.push(() => block.p(child_ctx, dirty)); - } - new_lookup.set(key, (new_blocks[i] = block)); - if (key in old_indexes) deltas.set(key, Math.abs(i - old_indexes[key])); - } - const will_move = new Set(); - const did_move = new Set(); - function insert(block) { - transition_in(block, 1); - block.m(node, next); - lookup.set(block.key, block); - next = block.first; - n--; - } - while (o && n) { - const new_block = new_blocks[n - 1]; - const old_block = old_blocks[o - 1]; - const new_key = new_block.key; - const old_key = old_block.key; - if (new_block === old_block) { - // do nothing - next = new_block.first; - o--; - n--; - } else if (!new_lookup.has(old_key)) { - // remove old block - destroy(old_block, lookup); - o--; - } else if (!lookup.has(new_key) || will_move.has(new_key)) { - insert(new_block); - } else if (did_move.has(old_key)) { - o--; - } else if (deltas.get(new_key) > deltas.get(old_key)) { - did_move.add(new_key); - insert(new_block); - } else { - will_move.add(old_key); - o--; - } - } - while (o--) { - const old_block = old_blocks[o]; - if (!new_lookup.has(old_block.key)) destroy(old_block, lookup); - } - while (n) insert(new_blocks[n - 1]); - run_all(updates); - return new_blocks; - } - - function bind(component, name, callback) { - const index = component.$$.props[name]; - if (index !== undefined) { - component.$$.bound[index] = callback; - callback(component.$$.ctx[index]); - } - } - function create_component(block) { - block && block.c(); - } - function mount_component(component, target, anchor, customElement) { - const { fragment, after_update } = component.$$; - fragment && fragment.m(target, anchor); - if (!customElement) { - // onMount happens before the initial afterUpdate - add_render_callback(() => { - const new_on_destroy = component.$$.on_mount - .map(run) - .filter(is_function); - // if the component was destroyed immediately - // it will update the `$$.on_destroy` reference to `null`. - // the destructured on_destroy may still reference to the old array - if (component.$$.on_destroy) { - component.$$.on_destroy.push(...new_on_destroy); - } else { - // Edge case - component was destroyed immediately, - // most likely as a result of a binding initialising - run_all(new_on_destroy); - } - component.$$.on_mount = []; - }); - } - after_update.forEach(add_render_callback); - } - function destroy_component(component, detaching) { - const $$ = component.$$; - if ($$.fragment !== null) { - flush_render_callbacks($$.after_update); - run_all($$.on_destroy); - $$.fragment && $$.fragment.d(detaching); - // TODO null out other refs, including component.$$ (but need to - // preserve final state?) - $$.on_destroy = $$.fragment = null; - $$.ctx = []; - } - } - function make_dirty(component, i) { - if (component.$$.dirty[0] === -1) { - dirty_components.push(component); - schedule_update(); - component.$$.dirty.fill(0); - } - component.$$.dirty[(i / 31) | 0] |= 1 << i % 31; - } - function init( - component, - options, - instance, - create_fragment, - not_equal, - props, - append_styles, - dirty = [-1] - ) { - const parent_component = current_component; - set_current_component(component); - const $$ = (component.$$ = { - fragment: null, - ctx: [], - // state - props, - update: noop, - not_equal, - bound: blank_object(), - // lifecycle - on_mount: [], - on_destroy: [], - on_disconnect: [], - before_update: [], - after_update: [], - context: new Map( - options.context || (parent_component ? parent_component.$$.context : []) - ), - // everything else - callbacks: blank_object(), - dirty, - skip_bound: false, - root: options.target || parent_component.$$.root, - }); - append_styles && append_styles($$.root); - let ready = false; - $$.ctx = instance - ? instance(component, options.props || {}, (i, ret, ...rest) => { - const value = rest.length ? rest[0] : ret; - if ($$.ctx && not_equal($$.ctx[i], ($$.ctx[i] = value))) { - if (!$$.skip_bound && $$.bound[i]) $$.bound[i](value); - if (ready) make_dirty(component, i); - } - return ret; - }) - : []; - $$.update(); - ready = true; - run_all($$.before_update); - // `false` as a special case of no DOM component - $$.fragment = create_fragment ? create_fragment($$.ctx) : false; - if (options.target) { - if (options.hydrate) { - const nodes = children(options.target); - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - $$.fragment && $$.fragment.l(nodes); - nodes.forEach(detach); - } else { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - $$.fragment && $$.fragment.c(); - } - if (options.intro) transition_in(component.$$.fragment); - mount_component( - component, - options.target, - options.anchor, - options.customElement - ); - flush(); - } - set_current_component(parent_component); - } - /** - * Base class for Svelte components. Used when dev=false. - */ - class SvelteComponent { - $destroy() { - destroy_component(this, 1); - this.$destroy = noop; - } - $on(type, callback) { - if (!is_function(callback)) { - return noop; - } - const callbacks = - this.$$.callbacks[type] || (this.$$.callbacks[type] = []); - callbacks.push(callback); - return () => { - const index = callbacks.indexOf(callback); - if (index !== -1) callbacks.splice(index, 1); - }; - } - $set($$props) { - if (this.$$set && !is_empty($$props)) { - this.$$.skip_bound = true; - this.$$set($$props); - this.$$.skip_bound = false; - } - } - } - - let id = 1; - - function getId() { - return `svelte-tabs-${id++}`; - } - - const subscriber_queue = []; - /** - * Create a `Writable` store that allows both updating and reading by subscription. - * @param {*=}value initial value - * @param {StartStopNotifier=} start - */ - function writable(value, start = noop) { - let stop; - const subscribers = new Set(); - function set(new_value) { - if (safe_not_equal(value, new_value)) { - value = new_value; - if (stop) { - // store is ready - const run_queue = !subscriber_queue.length; - for (const subscriber of subscribers) { - subscriber[1](); - subscriber_queue.push(subscriber, value); - } - if (run_queue) { - for (let i = 0; i < subscriber_queue.length; i += 2) { - subscriber_queue[i][0](subscriber_queue[i + 1]); - } - subscriber_queue.length = 0; - } - } - } - } - function update(fn) { - set(fn(value)); - } - function subscribe(run, invalidate = noop) { - const subscriber = [run, invalidate]; - subscribers.add(subscriber); - if (subscribers.size === 1) { - stop = start(set) || noop; - } - run(value); - return () => { - subscribers.delete(subscriber); - if (subscribers.size === 0 && stop) { - stop(); - stop = null; - } - }; - } - return { set, update, subscribe }; - } - - /* node_modules/svelte-tabs/src/Tabs.svelte generated by Svelte v3.59.2 */ - - function create_fragment$7(ctx) { - let div; - let current; - let mounted; - let dispose; - const default_slot_template = /*#slots*/ ctx[4].default; - const default_slot = create_slot( - default_slot_template, - ctx, - /*$$scope*/ ctx[3], - null - ); - - return { - c() { - div = element("div"); - if (default_slot) default_slot.c(); - attr(div, "class", "svelte-tabs"); - }, - m(target, anchor) { - insert(target, div, anchor); - - if (default_slot) { - default_slot.m(div, null); - } - - current = true; - - if (!mounted) { - dispose = listen(div, "keydown", /*handleKeyDown*/ ctx[1]); - mounted = true; - } - }, - p(ctx, [dirty]) { - if (default_slot) { - if (default_slot.p && (!current || dirty & /*$$scope*/ 8)) { - update_slot_base( - default_slot, - default_slot_template, - ctx, - /*$$scope*/ ctx[3], - !current - ? get_all_dirty_from_scope(/*$$scope*/ ctx[3]) - : get_slot_changes( - default_slot_template, - /*$$scope*/ ctx[3], - dirty, - null - ), - null - ); - } - } - }, - i(local) { - if (current) return; - transition_in(default_slot, local); - current = true; - }, - o(local) { - transition_out(default_slot, local); - current = false; - }, - d(detaching) { - if (detaching) detach(div); - if (default_slot) default_slot.d(detaching); - mounted = false; - dispose(); - }, - }; - } - - const TABS = {}; - - function removeAndUpdateSelected(arr, item, selectedStore) { - const index = arr.indexOf(item); - arr.splice(index, 1); - - selectedStore.update((selected) => - selected === item ? arr[index] || arr[arr.length - 1] : selected - ); - } - - function instance$7($$self, $$props, $$invalidate) { - let $selectedTab; - let { $$slots: slots = {}, $$scope } = $$props; - let { initialSelectedIndex = 0 } = $$props; - const tabElements = []; - const tabs = []; - const panels = []; - const controls = writable({}); - const labeledBy = writable({}); - const selectedTab = writable(null); - component_subscribe($$self, selectedTab, (value) => - $$invalidate(5, ($selectedTab = value)) - ); - const selectedPanel = writable(null); - - function registerItem(arr, item, selectedStore) { - arr.push(item); - selectedStore.update((selected) => selected || item); - onDestroy(() => removeAndUpdateSelected(arr, item, selectedStore)); - } - - function selectTab(tab) { - const index = tabs.indexOf(tab); - selectedTab.set(tab); - selectedPanel.set(panels[index]); - } - - setContext(TABS, { - registerTab(tab) { - registerItem(tabs, tab, selectedTab); - }, - registerTabElement(tabElement) { - tabElements.push(tabElement); - }, - registerPanel(panel) { - registerItem(panels, panel, selectedPanel); - }, - selectTab, - selectedTab, - selectedPanel, - controls, - labeledBy, - }); - - onMount(() => { - selectTab(tabs[initialSelectedIndex]); - }); - - afterUpdate(() => { - for (let i = 0; i < tabs.length; i++) { - controls.update((controlsData) => ({ - ...controlsData, - [tabs[i].id]: panels[i].id, - })); - - labeledBy.update((labeledByData) => ({ - ...labeledByData, - [panels[i].id]: tabs[i].id, - })); - } - }); - - async function handleKeyDown(event) { - if (event.target.classList.contains("svelte-tabs__tab")) { - let selectedIndex = tabs.indexOf($selectedTab); - - switch (event.key) { - case "ArrowRight": - selectedIndex += 1; - if (selectedIndex > tabs.length - 1) { - selectedIndex = 0; - } - selectTab(tabs[selectedIndex]); - tabElements[selectedIndex].focus(); - break; - case "ArrowLeft": - selectedIndex -= 1; - if (selectedIndex < 0) { - selectedIndex = tabs.length - 1; - } - selectTab(tabs[selectedIndex]); - tabElements[selectedIndex].focus(); - } - } - } - - $$self.$$set = ($$props) => { - if ("initialSelectedIndex" in $$props) - $$invalidate(2, (initialSelectedIndex = $$props.initialSelectedIndex)); - if ("$$scope" in $$props) $$invalidate(3, ($$scope = $$props.$$scope)); - }; - - return [selectedTab, handleKeyDown, initialSelectedIndex, $$scope, slots]; - } - - class Tabs extends SvelteComponent { - constructor(options) { - super(); - init(this, options, instance$7, create_fragment$7, safe_not_equal, { - initialSelectedIndex: 2, - }); - } - } - - /* node_modules/svelte-tabs/src/Tab.svelte generated by Svelte v3.59.2 */ - - function create_fragment$6(ctx) { - let li; - let li_aria_controls_value; - let li_tabindex_value; - let current; - let mounted; - let dispose; - const default_slot_template = /*#slots*/ ctx[9].default; - const default_slot = create_slot( - default_slot_template, - ctx, - /*$$scope*/ ctx[8], - null - ); - - return { - c() { - li = element("li"); - if (default_slot) default_slot.c(); - attr(li, "role", "tab"); - attr(li, "id", /*tab*/ ctx[3].id); - attr( - li, - "aria-controls", - (li_aria_controls_value = /*$controls*/ ctx[2][/*tab*/ ctx[3].id]) - ); - attr(li, "aria-selected", /*isSelected*/ ctx[1]); - attr( - li, - "tabindex", - (li_tabindex_value = /*isSelected*/ ctx[1] ? 0 : -1) - ); - attr(li, "class", "svelte-tabs__tab svelte-localhjc"); - toggle_class(li, "svelte-tabs__selected", /*isSelected*/ ctx[1]); - }, - m(target, anchor) { - insert(target, li, anchor); - - if (default_slot) { - default_slot.m(li, null); - } - - /*li_binding*/ ctx[10](li); - current = true; - - if (!mounted) { - dispose = listen(li, "click", /*click_handler*/ ctx[11]); - mounted = true; - } - }, - p(ctx, [dirty]) { - if (default_slot) { - if (default_slot.p && (!current || dirty & /*$$scope*/ 256)) { - update_slot_base( - default_slot, - default_slot_template, - ctx, - /*$$scope*/ ctx[8], - !current - ? get_all_dirty_from_scope(/*$$scope*/ ctx[8]) - : get_slot_changes( - default_slot_template, - /*$$scope*/ ctx[8], - dirty, - null - ), - null - ); - } - } - - if ( - !current || - (dirty & /*$controls*/ 4 && - li_aria_controls_value !== - (li_aria_controls_value = - /*$controls*/ ctx[2][/*tab*/ ctx[3].id])) - ) { - attr(li, "aria-controls", li_aria_controls_value); - } - - if (!current || dirty & /*isSelected*/ 2) { - attr(li, "aria-selected", /*isSelected*/ ctx[1]); - } - - if ( - !current || - (dirty & /*isSelected*/ 2 && - li_tabindex_value !== - (li_tabindex_value = /*isSelected*/ ctx[1] ? 0 : -1)) - ) { - attr(li, "tabindex", li_tabindex_value); - } - - if (!current || dirty & /*isSelected*/ 2) { - toggle_class(li, "svelte-tabs__selected", /*isSelected*/ ctx[1]); - } - }, - i(local) { - if (current) return; - transition_in(default_slot, local); - current = true; - }, - o(local) { - transition_out(default_slot, local); - current = false; - }, - d(detaching) { - if (detaching) detach(li); - if (default_slot) default_slot.d(detaching); - /*li_binding*/ ctx[10](null); - mounted = false; - dispose(); - }, - }; - } - - function instance$6($$self, $$props, $$invalidate) { - let $selectedTab; - let $controls; - let { $$slots: slots = {}, $$scope } = $$props; - let tabEl; - const tab = { id: getId() }; - const { - registerTab, - registerTabElement, - selectTab, - selectedTab, - controls, - } = getContext(TABS); - component_subscribe($$self, selectedTab, (value) => - $$invalidate(7, ($selectedTab = value)) - ); - component_subscribe($$self, controls, (value) => - $$invalidate(2, ($controls = value)) - ); - let isSelected; - registerTab(tab); - - onMount(async () => { - await tick(); - registerTabElement(tabEl); - }); - - function li_binding($$value) { - binding_callbacks[$$value ? "unshift" : "push"](() => { - tabEl = $$value; - $$invalidate(0, tabEl); - }); - } - - const click_handler = () => selectTab(tab); - - $$self.$$set = ($$props) => { - if ("$$scope" in $$props) $$invalidate(8, ($$scope = $$props.$$scope)); - }; - - $$self.$$.update = () => { - if ($$self.$$.dirty & /*$selectedTab*/ 128) { - $$invalidate(1, (isSelected = $selectedTab === tab)); - } - }; - - return [ - tabEl, - isSelected, - $controls, - tab, - selectTab, - selectedTab, - controls, - $selectedTab, - $$scope, - slots, - li_binding, - click_handler, - ]; - } - - class Tab extends SvelteComponent { - constructor(options) { - super(); - init(this, options, instance$6, create_fragment$6, safe_not_equal, {}); - } - } - - /* node_modules/svelte-tabs/src/TabList.svelte generated by Svelte v3.59.2 */ - - function create_fragment$5(ctx) { - let ul; - let current; - const default_slot_template = /*#slots*/ ctx[1].default; - const default_slot = create_slot( - default_slot_template, - ctx, - /*$$scope*/ ctx[0], - null - ); - - return { - c() { - ul = element("ul"); - if (default_slot) default_slot.c(); - attr(ul, "role", "tablist"); - attr(ul, "class", "svelte-tabs__tab-list svelte-localhje"); - }, - m(target, anchor) { - insert(target, ul, anchor); - - if (default_slot) { - default_slot.m(ul, null); - } - - current = true; - }, - p(ctx, [dirty]) { - if (default_slot) { - if (default_slot.p && (!current || dirty & /*$$scope*/ 1)) { - update_slot_base( - default_slot, - default_slot_template, - ctx, - /*$$scope*/ ctx[0], - !current - ? get_all_dirty_from_scope(/*$$scope*/ ctx[0]) - : get_slot_changes( - default_slot_template, - /*$$scope*/ ctx[0], - dirty, - null - ), - null - ); - } - } - }, - i(local) { - if (current) return; - transition_in(default_slot, local); - current = true; - }, - o(local) { - transition_out(default_slot, local); - current = false; - }, - d(detaching) { - if (detaching) detach(ul); - if (default_slot) default_slot.d(detaching); - }, - }; - } - - function instance$5($$self, $$props, $$invalidate) { - let { $$slots: slots = {}, $$scope } = $$props; - - $$self.$$set = ($$props) => { - if ("$$scope" in $$props) $$invalidate(0, ($$scope = $$props.$$scope)); - }; - - return [$$scope, slots]; - } - - class TabList extends SvelteComponent { - constructor(options) { - super(); - init(this, options, instance$5, create_fragment$5, safe_not_equal, {}); - } - } - - /* node_modules/svelte-tabs/src/TabPanel.svelte generated by Svelte v3.59.2 */ - - function create_if_block$1(ctx) { - let current; - const default_slot_template = /*#slots*/ ctx[6].default; - const default_slot = create_slot( - default_slot_template, - ctx, - /*$$scope*/ ctx[5], - null - ); - - return { - c() { - if (default_slot) default_slot.c(); - }, - m(target, anchor) { - if (default_slot) { - default_slot.m(target, anchor); - } - - current = true; - }, - p(ctx, dirty) { - if (default_slot) { - if (default_slot.p && (!current || dirty & /*$$scope*/ 32)) { - update_slot_base( - default_slot, - default_slot_template, - ctx, - /*$$scope*/ ctx[5], - !current - ? get_all_dirty_from_scope(/*$$scope*/ ctx[5]) - : get_slot_changes( - default_slot_template, - /*$$scope*/ ctx[5], - dirty, - null - ), - null - ); - } - } - }, - i(local) { - if (current) return; - transition_in(default_slot, local); - current = true; - }, - o(local) { - transition_out(default_slot, local); - current = false; - }, - d(detaching) { - if (default_slot) default_slot.d(detaching); - }, - }; - } - - function create_fragment$4(ctx) { - let div; - let div_aria_labelledby_value; - let current; - let if_block = - /*$selectedPanel*/ ctx[1] === /*panel*/ ctx[2] && create_if_block$1(ctx); - - return { - c() { - div = element("div"); - if (if_block) if_block.c(); - attr(div, "id", /*panel*/ ctx[2].id); - attr( - div, - "aria-labelledby", - (div_aria_labelledby_value = - /*$labeledBy*/ ctx[0][/*panel*/ ctx[2].id]) - ); - attr(div, "class", "svelte-tabs__tab-panel svelte-localhjd"); - attr(div, "role", "tabpanel"); - }, - m(target, anchor) { - insert(target, div, anchor); - if (if_block) if_block.m(div, null); - current = true; - }, - p(ctx, [dirty]) { - if (/*$selectedPanel*/ ctx[1] === /*panel*/ ctx[2]) { - if (if_block) { - if_block.p(ctx, dirty); - - if (dirty & /*$selectedPanel*/ 2) { - transition_in(if_block, 1); - } - } else { - if_block = create_if_block$1(ctx); - if_block.c(); - transition_in(if_block, 1); - if_block.m(div, null); - } - } else if (if_block) { - group_outros(); - - transition_out(if_block, 1, 1, () => { - if_block = null; - }); - - check_outros(); - } - - if ( - !current || - (dirty & /*$labeledBy*/ 1 && - div_aria_labelledby_value !== - (div_aria_labelledby_value = - /*$labeledBy*/ ctx[0][/*panel*/ ctx[2].id])) - ) { - attr(div, "aria-labelledby", div_aria_labelledby_value); - } - }, - i(local) { - if (current) return; - transition_in(if_block); - current = true; - }, - o(local) { - transition_out(if_block); - current = false; - }, - d(detaching) { - if (detaching) detach(div); - if (if_block) if_block.d(); - }, - }; - } - - function instance$4($$self, $$props, $$invalidate) { - let $labeledBy; - let $selectedPanel; - let { $$slots: slots = {}, $$scope } = $$props; - const panel = { id: getId() }; - const { registerPanel, selectedPanel, labeledBy } = getContext(TABS); - component_subscribe($$self, selectedPanel, (value) => - $$invalidate(1, ($selectedPanel = value)) - ); - component_subscribe($$self, labeledBy, (value) => - $$invalidate(0, ($labeledBy = value)) - ); - registerPanel(panel); - - $$self.$$set = ($$props) => { - if ("$$scope" in $$props) $$invalidate(5, ($$scope = $$props.$$scope)); - }; - - return [ - $labeledBy, - $selectedPanel, - panel, - selectedPanel, - labeledBy, - $$scope, - slots, - ]; - } - - class TabPanel extends SvelteComponent { - constructor(options) { - super(); - init(this, options, instance$4, create_fragment$4, safe_not_equal, {}); - } - } - - function cubicOut(t) { - const f = t - 1.0; - return f * f * f + 1.0; - } - function quintOut(t) { - return --t * t * t * t * t + 1; - } - - function fade(node, { delay = 0, duration = 400, easing = identity } = {}) { - const o = +getComputedStyle(node).opacity; - return { - delay, - duration, - easing, - css: (t) => `opacity: ${t * o}`, - }; - } - function fly( - node, - { - delay = 0, - duration = 400, - easing = cubicOut, - x = 0, - y = 0, - opacity = 0, - } = {} - ) { - const style = getComputedStyle(node); - const target_opacity = +style.opacity; - const transform = style.transform === "none" ? "" : style.transform; - const od = target_opacity * (1 - opacity); - const [xValue, xUnit] = split_css_unit(x); - const [yValue, yUnit] = split_css_unit(y); - return { - delay, - duration, - easing, - css: (t, u) => ` - transform: ${transform} translate(${(1 - t) * xValue}${xUnit}, ${ - (1 - t) * yValue - }${yUnit}); - opacity: ${target_opacity - od * u}`, - }; - } - - /* src/Match.svelte generated by Svelte v3.59.2 */ - - function get_each_context$1(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[10] = list[i]; - child_ctx[13] = i; - const constants_0 = /*face*/ child_ctx[10].performers; - child_ctx[11] = constants_0; - return child_ctx; - } - - function get_each_context_1(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[14] = list[i]; - child_ctx[13] = i; - return child_ctx; - } - - function get_each_context_2(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[10] = list[i]; - child_ctx[13] = i; - return child_ctx; - } - - // (125:0) {#if visible} - function create_if_block(ctx) { - let div5; - let div4; - let div3; - let div0; - let tabs; - let t0; - let div2; - let div1; - let button0; - let t2; - let button1; - let div5_intro; - let div5_outro; - let current; - let mounted; - let dispose; - - tabs = new Tabs({ - props: { - $$slots: { default: [create_default_slot] }, - $$scope: { ctx }, - }, - }); - - return { - c() { - div5 = element("div"); - div4 = element("div"); - div3 = element("div"); - div0 = element("div"); - create_component(tabs.$$.fragment); - t0 = space(); - div2 = element("div"); - div1 = element("div"); - button0 = element("button"); - button0.textContent = "Close"; - t2 = space(); - button1 = element("button"); - button1.textContent = "Toggle Visibility"; - attr(div0, "class", "modal-body svelte-localhja"); - attr(button0, "id", "face_close"); - attr(button0, "type", "button"); - attr(button0, "class", "ml-2 btn btn-secondary svelte-localhja"); - attr(button1, "id", "face_toggle"); - attr(button1, "type", "button"); - attr(button1, "class", "ml-2 btn btn-secondary svelte-localhja"); - attr(div1, "class", "svelte-localhja"); - attr(div2, "class", "ModalFooter modal-footer svelte-localhja"); - attr(div3, "class", "modal-content svelte-localhja"); - attr(div4, "class", "modal-dialog modal-xl svelte-localhja"); - attr(div5, "role", "dialog"); - attr(div5, "aria-modal", "true"); - attr(div5, "class", "fade ModalComponent modal show svelte-localhja"); - attr(div5, "tabindex", "-1"); - set_style(div5, "display", "block"); - }, - m(target, anchor) { - insert(target, div5, anchor); - append(div5, div4); - append(div4, div3); - append(div3, div0); - mount_component(tabs, div0, null); - append(div3, t0); - append(div3, div2); - append(div2, div1); - append(div1, button0); - append(div1, t2); - append(div1, button1); - /*div5_binding*/ ctx[8](div5); - current = true; - - if (!mounted) { - dispose = [ - listen(button0, "click", /*close*/ ctx[3]), - listen(button1, "click", /*toggle*/ ctx[4]), - ]; - - mounted = true; - } - }, - p(ctx, dirty) { - const tabs_changes = {}; - - if (dirty & /*$$scope, matches*/ 131073) { - tabs_changes.$$scope = { dirty, ctx }; - } - - tabs.$set(tabs_changes); - }, - i(local) { - if (current) return; - transition_in(tabs.$$.fragment, local); - - add_render_callback(() => { - if (!current) return; - if (div5_outro) div5_outro.end(1); - div5_intro = create_in_transition(div5, fly, { - y: 100, - duration: 400, - }); - div5_intro.start(); - }); - - current = true; - }, - o(local) { - transition_out(tabs.$$.fragment, local); - if (div5_intro) div5_intro.invalidate(); - div5_outro = create_out_transition(div5, fly, { - y: -100, - duration: 400, - }); - current = false; - }, - d(detaching) { - if (detaching) detach(div5); - destroy_component(tabs); - /*div5_binding*/ ctx[8](null); - if (detaching && div5_outro) div5_outro.end(); - mounted = false; - run_all(dispose); - }, - }; - } - - // (142:16) - function create_default_slot_3(ctx) { - let img; - let img_src_value; - let t; - - return { - c() { - img = element("img"); - t = space(); - if ( - !src_url_equal( - img.src, - (img_src_value = "data:image/jpg;base64," + /*face*/ ctx[10].image) - ) - ) - attr(img, "src", img_src_value); - attr(img, "alt", ""); - attr(img, "class", "face-tab svelte-localhja"); - }, - m(target, anchor) { - insert(target, img, anchor); - insert(target, t, anchor); - }, - p(ctx, dirty) { - if ( - dirty & /*matches*/ 1 && - !src_url_equal( - img.src, - (img_src_value = "data:image/jpg;base64," + /*face*/ ctx[10].image) - ) - ) { - attr(img, "src", img_src_value); - } - }, - d(detaching) { - if (detaching) detach(img); - if (detaching) detach(t); - }, - }; - } - - // (141:14) {#each matches as face, i (face.image)} - function create_each_block_2(key_1, ctx) { - let first; - let tab; - let current; - - tab = new Tab({ - props: { - $$slots: { default: [create_default_slot_3] }, - $$scope: { ctx }, - }, - }); - - return { - key: key_1, - first: null, - c() { - first = empty(); - create_component(tab.$$.fragment); - this.first = first; - }, - m(target, anchor) { - insert(target, first, anchor); - mount_component(tab, target, anchor); - current = true; - }, - p(new_ctx, dirty) { - ctx = new_ctx; - const tab_changes = {}; - - if (dirty & /*$$scope, matches*/ 131073) { - tab_changes.$$scope = { dirty, ctx }; - } - - tab.$set(tab_changes); - }, - i(local) { - if (current) return; - transition_in(tab.$$.fragment, local); - current = true; - }, - o(local) { - transition_out(tab.$$.fragment, local); - current = false; - }, - d(detaching) { - if (detaching) detach(first); - destroy_component(tab, detaching); - }, - }; - } - - // (140:12) - function create_default_slot_2(ctx) { - let each_blocks = []; - let each_1_lookup = new Map(); - let each_1_anchor; - let current; - let each_value_2 = /*matches*/ ctx[0]; - const get_key = (ctx) => /*face*/ ctx[10].image; - - for (let i = 0; i < each_value_2.length; i += 1) { - let child_ctx = get_each_context_2(ctx, each_value_2, i); - let key = get_key(child_ctx); - each_1_lookup.set( - key, - (each_blocks[i] = create_each_block_2(key, child_ctx)) - ); - } - - return { - c() { - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - each_1_anchor = empty(); - }, - m(target, anchor) { - for (let i = 0; i < each_blocks.length; i += 1) { - if (each_blocks[i]) { - each_blocks[i].m(target, anchor); - } - } - - insert(target, each_1_anchor, anchor); - current = true; - }, - p(ctx, dirty) { - if (dirty & /*matches*/ 1) { - each_value_2 = /*matches*/ ctx[0]; - group_outros(); - each_blocks = update_keyed_each( - each_blocks, - dirty, - get_key, - 1, - ctx, - each_value_2, - each_1_lookup, - each_1_anchor.parentNode, - outro_and_destroy_block, - create_each_block_2, - each_1_anchor, - get_each_context_2 - ); - check_outros(); - } - }, - i(local) { - if (current) return; - - for (let i = 0; i < each_value_2.length; i += 1) { - transition_in(each_blocks[i]); - } - - current = true; - }, - o(local) { - for (let i = 0; i < each_blocks.length; i += 1) { - transition_out(each_blocks[i]); - } - - current = false; - }, - d(detaching) { - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].d(detaching); - } - - if (detaching) detach(each_1_anchor); - }, - }; - } - - // (157:20) {#each performers as match, i (match.id)} - function create_each_block_1(key_1, ctx) { - let div4; - let div0; - let img; - let img_alt_value; - let img_src_value; - let t0; - let span0; - let span0_class_value; - let t1; - let div3; - let h5; - let div2; - let a; - let t2_value = /*match*/ ctx[14].name + ""; - let t2; - let a_href_value; - let t3; - let span1; - let div1; - let t4_value = /*match*/ ctx[14].confidence + ""; - let t4; - let t5; - let t6; - let div4_id_value; - let mounted; - let dispose; - - function click_handler(...args) { - return /*click_handler*/ ctx[6](/*match*/ ctx[14], ...args); - } - - function keypress_handler(...args) { - return /*keypress_handler*/ ctx[7](/*match*/ ctx[14], ...args); - } - - return { - key: key_1, - first: null, - c() { - div4 = element("div"); - div0 = element("div"); - img = element("img"); - t0 = space(); - span0 = element("span"); - t1 = space(); - div3 = element("div"); - h5 = element("h5"); - div2 = element("div"); - a = element("a"); - t2 = text(t2_value); - t3 = space(); - span1 = element("span"); - div1 = element("div"); - t4 = text(t4_value); - t5 = text("%"); - t6 = space(); - attr(img, "class", "performer-card-image svelte-localhja"); - attr(img, "alt", (img_alt_value = /*match*/ ctx[14].name)); - if (!src_url_equal(img.src, (img_src_value = /*match*/ ctx[14].image))) - attr(img, "src", img_src_value); - attr( - span0, - "class", - (span0_class_value = - "performer-card__country-flag fi fi-" + - /*match*/ ctx[14].country?.toLowerCase() + - " svelte-localhja") - ); - attr(div0, "class", "thumbnail-section svelte-localhja"); - attr( - a, - "href", - (a_href_value = - window.stash7dJx1qP.stash.serverUrl + - "/performers/" + - /*match*/ ctx[14].id) - ); - attr(a, "target", "_blank"); - attr(a, "class", "svelte-localhja"); - attr(div1, "class", "svelte-localhja"); - attr(span1, "class", "tag-item badge badge-pill svelte-localhja"); - set_style(div2, "-webkit-line-clamp", "2"); - attr(div2, "class", "svelte-localhja"); - attr(h5, "class", "card-section-title flex-aligned svelte-localhja"); - attr(div3, "class", "card-section svelte-localhja"); - attr(div4, "draggable", "false"); - attr(div4, "class", "performer-card grid-card card svelte-localhja"); - attr(div4, "id", (div4_id_value = "face-" + /*i*/ ctx[13])); - this.first = div4; - }, - m(target, anchor) { - insert(target, div4, anchor); - append(div4, div0); - append(div0, img); - append(div0, t0); - append(div0, span0); - append(div4, t1); - append(div4, div3); - append(div3, h5); - append(h5, div2); - append(div2, a); - append(a, t2); - append(div2, t3); - append(div2, span1); - append(span1, div1); - append(div1, t4); - append(div1, t5); - append(div4, t6); - - if (!mounted) { - dispose = [ - action_destroyer(smoothload.call(null, img)), - listen(div4, "click", click_handler), - listen(div4, "keypress", keypress_handler), - ]; - - mounted = true; - } - }, - p(new_ctx, dirty) { - ctx = new_ctx; - - if ( - dirty & /*matches*/ 1 && - img_alt_value !== (img_alt_value = /*match*/ ctx[14].name) - ) { - attr(img, "alt", img_alt_value); - } - - if ( - dirty & /*matches*/ 1 && - !src_url_equal(img.src, (img_src_value = /*match*/ ctx[14].image)) - ) { - attr(img, "src", img_src_value); - } - - if ( - dirty & /*matches*/ 1 && - span0_class_value !== - (span0_class_value = - "performer-card__country-flag fi fi-" + - /*match*/ ctx[14].country?.toLowerCase() + - " svelte-localhja") - ) { - attr(span0, "class", span0_class_value); - } - - if ( - dirty & /*matches*/ 1 && - t2_value !== (t2_value = /*match*/ ctx[14].name + "") - ) - set_data(t2, t2_value); - - if ( - dirty & /*matches*/ 1 && - a_href_value !== - (a_href_value = - window.stash7dJx1qP.stash.serverUrl + - "/performers/" + - /*match*/ ctx[14].id) - ) { - attr(a, "href", a_href_value); - } - - if ( - dirty & /*matches*/ 1 && - t4_value !== (t4_value = /*match*/ ctx[14].confidence + "") - ) - set_data(t4, t4_value); - - if ( - dirty & /*matches*/ 1 && - div4_id_value !== (div4_id_value = "face-" + /*i*/ ctx[13]) - ) { - attr(div4, "id", div4_id_value); - } - }, - d(detaching) { - if (detaching) detach(div4); - mounted = false; - run_all(dispose); - }, - }; - } - - // (154:14) - function create_default_slot_1(ctx) { - let div1; - let div0; - let each_blocks = []; - let each_1_lookup = new Map(); - let t; - let each_value_1 = /*performers*/ ctx[11]; - const get_key = (ctx) => /*match*/ ctx[14].id; - - for (let i = 0; i < each_value_1.length; i += 1) { - let child_ctx = get_each_context_1(ctx, each_value_1, i); - let key = get_key(child_ctx); - each_1_lookup.set( - key, - (each_blocks[i] = create_each_block_1(key, child_ctx)) - ); - } - - return { - c() { - div1 = element("div"); - div0 = element("div"); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - t = space(); - attr(div0, "class", "carousel svelte-localhja"); - attr(div1, "class", "row svelte-localhja"); - }, - m(target, anchor) { - insert(target, div1, anchor); - append(div1, div0); - - for (let i = 0; i < each_blocks.length; i += 1) { - if (each_blocks[i]) { - each_blocks[i].m(div0, null); - } - } - - insert(target, t, anchor); - }, - p(ctx, dirty) { - if (dirty & /*matches, addPerformer*/ 33) { - each_value_1 = /*performers*/ ctx[11]; - each_blocks = update_keyed_each( - each_blocks, - dirty, - get_key, - 1, - ctx, - each_value_1, - each_1_lookup, - div0, - destroy_block, - create_each_block_1, - null, - get_each_context_1 - ); - } - }, - d(detaching) { - if (detaching) detach(div1); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].d(); - } - - if (detaching) detach(t); - }, - }; - } - - // (152:12) {#each matches as face, i (face.image)} - function create_each_block$1(key_1, ctx) { - let first; - let tabpanel; - let current; - - tabpanel = new TabPanel({ - props: { - $$slots: { default: [create_default_slot_1] }, - $$scope: { ctx }, - }, - }); - - return { - key: key_1, - first: null, - c() { - first = empty(); - create_component(tabpanel.$$.fragment); - this.first = first; - }, - m(target, anchor) { - insert(target, first, anchor); - mount_component(tabpanel, target, anchor); - current = true; - }, - p(new_ctx, dirty) { - ctx = new_ctx; - const tabpanel_changes = {}; - - if (dirty & /*$$scope, matches*/ 131073) { - tabpanel_changes.$$scope = { dirty, ctx }; - } - - tabpanel.$set(tabpanel_changes); - }, - i(local) { - if (current) return; - transition_in(tabpanel.$$.fragment, local); - current = true; - }, - o(local) { - transition_out(tabpanel.$$.fragment, local); - current = false; - }, - d(detaching) { - if (detaching) detach(first); - destroy_component(tabpanel, detaching); - }, - }; - } - - // (139:10) - function create_default_slot(ctx) { - let tablist; - let t; - let each_blocks = []; - let each_1_lookup = new Map(); - let each_1_anchor; - let current; - - tablist = new TabList({ - props: { - $$slots: { default: [create_default_slot_2] }, - $$scope: { ctx }, - }, - }); - - let each_value = /*matches*/ ctx[0]; - const get_key = (ctx) => /*face*/ ctx[10].image; - - for (let i = 0; i < each_value.length; i += 1) { - let child_ctx = get_each_context$1(ctx, each_value, i); - let key = get_key(child_ctx); - each_1_lookup.set( - key, - (each_blocks[i] = create_each_block$1(key, child_ctx)) - ); - } - - return { - c() { - create_component(tablist.$$.fragment); - t = space(); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - each_1_anchor = empty(); - }, - m(target, anchor) { - mount_component(tablist, target, anchor); - insert(target, t, anchor); - - for (let i = 0; i < each_blocks.length; i += 1) { - if (each_blocks[i]) { - each_blocks[i].m(target, anchor); - } - } - - insert(target, each_1_anchor, anchor); - current = true; - }, - p(ctx, dirty) { - const tablist_changes = {}; - - if (dirty & /*$$scope, matches*/ 131073) { - tablist_changes.$$scope = { dirty, ctx }; - } - - tablist.$set(tablist_changes); - - if (dirty & /*matches, addPerformer*/ 33) { - each_value = /*matches*/ ctx[0]; - group_outros(); - each_blocks = update_keyed_each( - each_blocks, - dirty, - get_key, - 1, - ctx, - each_value, - each_1_lookup, - each_1_anchor.parentNode, - outro_and_destroy_block, - create_each_block$1, - each_1_anchor, - get_each_context$1 - ); - check_outros(); - } - }, - i(local) { - if (current) return; - transition_in(tablist.$$.fragment, local); - - for (let i = 0; i < each_value.length; i += 1) { - transition_in(each_blocks[i]); - } - - current = true; - }, - o(local) { - transition_out(tablist.$$.fragment, local); - - for (let i = 0; i < each_blocks.length; i += 1) { - transition_out(each_blocks[i]); - } - - current = false; - }, - d(detaching) { - destroy_component(tablist, detaching); - if (detaching) detach(t); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].d(detaching); - } - - if (detaching) detach(each_1_anchor); - }, - }; - } - - function create_fragment$3(ctx) { - let if_block_anchor; - let current; - let if_block = /*visible*/ ctx[1] && create_if_block(ctx); - - return { - c() { - if (if_block) if_block.c(); - if_block_anchor = empty(); - }, - m(target, anchor) { - if (if_block) if_block.m(target, anchor); - insert(target, if_block_anchor, anchor); - current = true; - }, - p(ctx, [dirty]) { - if (/*visible*/ ctx[1]) { - if (if_block) { - if_block.p(ctx, dirty); - - if (dirty & /*visible*/ 2) { - transition_in(if_block, 1); - } - } else { - if_block = create_if_block(ctx); - if_block.c(); - transition_in(if_block, 1); - if_block.m(if_block_anchor.parentNode, if_block_anchor); - } - } else if (if_block) { - group_outros(); - - transition_out(if_block, 1, 1, () => { - if_block = null; - }); - - check_outros(); - } - }, - i(local) { - if (current) return; - transition_in(if_block); - current = true; - }, - o(local) { - transition_out(if_block); - current = false; - }, - d(detaching) { - if (if_block) if_block.d(detaching); - if (detaching) detach(if_block_anchor); - }, - }; - } - - function instance$3($$self, $$props, $$invalidate) { - let { matches = [] } = $$props; - let matchesSelected = 0; - let visible = false; - let modal; - - onMount(() => { - $$invalidate(1, (visible = true)); - }); - - async function close() { - $$invalidate(1, (visible = false)); - - setTimeout(() => { - modal.remove(); - }, 400); - } - - function toggle() { - $$invalidate( - 2, - (modal.style.opacity = modal.style.opacity == "0.1" ? "1.0" : "0.1"), - modal - ); - } - - async function addPerformer(current, id_) { - current.classList.add("assigned"); - let [scenario, scenarioId] = getScenarioAndID(); - var performIds; - - if (scenario === "scenes") { - performIds = await getPerformersForScene(scenarioId); - - if (performIds.includes(id_)) { - current.classList.remove("assigned"); - alert("Performer already assigned to scene"); - return; - } - - performIds.push(id_); - await updateScene(scenarioId, performIds); - } else if (scenario === "images") { - performIds = await getPerformersForImage(scenarioId); - - if (performIds.includes(id_)) { - current.classList.remove("assigned"); - alert("Performer already assigned to image"); - return; - } - - performIds.push(id_); - await updateImage(scenarioId, performIds); - } - - matchesSelected += 1; - - if (matchesSelected === matches.length) { - close(); - window.location.reload(); - } - } - - const click_handler = (match, event) => - addPerformer(event.target, match.id); - const keypress_handler = (match, event) => - addPerformer(event.target, match.id); - - function div5_binding($$value) { - binding_callbacks[$$value ? "unshift" : "push"](() => { - modal = $$value; - $$invalidate(2, modal); - }); - } - - $$self.$$set = ($$props) => { - if ("matches" in $$props) $$invalidate(0, (matches = $$props.matches)); - }; - - return [ - matches, - visible, - modal, - close, - toggle, - addPerformer, - click_handler, - keypress_handler, - div5_binding, - ]; - } - - class Match extends SvelteComponent { - constructor(options) { - super(); - init(this, options, instance$3, create_fragment$3, safe_not_equal, { - matches: 0, - }); - } - } - - var commonjsGlobal = - typeof globalThis !== "undefined" - ? globalThis - : typeof window !== "undefined" - ? window - : typeof global !== "undefined" - ? global - : typeof self !== "undefined" - ? self - : {}; - - function createCommonjsModule(fn) { - var module = { exports: {} }; - return fn(module, module.exports), module.exports; - } - - /*! - * html2canvas 1.4.1 - * Copyright (c) 2022 Niklas von Hertzen - * Released under MIT License - */ - - var html2canvas = createCommonjsModule(function (module, exports) { - (function (global, factory) { - module.exports = factory(); - })(commonjsGlobal, function () { - /*! ***************************************************************************** - Copyright (c) Microsoft Corporation. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. - ***************************************************************************** */ - /* global Reflect, Promise */ - - var extendStatics = function (d, b) { - extendStatics = - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && - function (d, b) { - d.__proto__ = b; - }) || - function (d, b) { - for (var p in b) - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - }; - return extendStatics(d, b); - }; - - function __extends(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError( - "Class extends value " + String(b) + " is not a constructor or null" - ); - extendStatics(d, b); - function __() { - this.constructor = d; - } - d.prototype = - b === null - ? Object.create(b) - : ((__.prototype = b.prototype), new __()); - } - - var __assign = function () { - __assign = - Object.assign || - function __assign(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); - }; - - function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done - ? resolve(result.value) - : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - } - - function __generator(thisArg, body) { - var _ = { - label: 0, - sent: function () { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [], - }, - f, - y, - t, - g; - return ( - (g = { next: verb(0), throw: verb(1), return: verb(2) }), - typeof Symbol === "function" && - (g[Symbol.iterator] = function () { - return this; - }), - g - ); - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) - try { - if ( - ((f = 1), - y && - (t = - op[0] & 2 - ? y["return"] - : op[0] - ? y["throw"] || ((t = y["return"]) && t.call(y), 0) - : y.next) && - !(t = t.call(y, op[1])).done) - ) - return t; - if (((y = 0), t)) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if ( - !((t = _.trys), (t = t.length > 0 && t[t.length - 1])) && - (op[0] === 6 || op[0] === 2) - ) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } - } - - function __spreadArray(to, from, pack) { - if (pack || arguments.length === 2) - for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || from); - } - - var Bounds = /** @class */ (function () { - function Bounds(left, top, width, height) { - this.left = left; - this.top = top; - this.width = width; - this.height = height; - } - Bounds.prototype.add = function (x, y, w, h) { - return new Bounds( - this.left + x, - this.top + y, - this.width + w, - this.height + h - ); - }; - Bounds.fromClientRect = function (context, clientRect) { - return new Bounds( - clientRect.left + context.windowBounds.left, - clientRect.top + context.windowBounds.top, - clientRect.width, - clientRect.height - ); - }; - Bounds.fromDOMRectList = function (context, domRectList) { - var domRect = Array.from(domRectList).find(function (rect) { - return rect.width !== 0; - }); - return domRect - ? new Bounds( - domRect.left + context.windowBounds.left, - domRect.top + context.windowBounds.top, - domRect.width, - domRect.height - ) - : Bounds.EMPTY; - }; - Bounds.EMPTY = new Bounds(0, 0, 0, 0); - return Bounds; - })(); - var parseBounds = function (context, node) { - return Bounds.fromClientRect(context, node.getBoundingClientRect()); - }; - var parseDocumentSize = function (document) { - var body = document.body; - var documentElement = document.documentElement; - if (!body || !documentElement) { - throw new Error("Unable to get document size"); - } - var width = Math.max( - Math.max(body.scrollWidth, documentElement.scrollWidth), - Math.max(body.offsetWidth, documentElement.offsetWidth), - Math.max(body.clientWidth, documentElement.clientWidth) - ); - var height = Math.max( - Math.max(body.scrollHeight, documentElement.scrollHeight), - Math.max(body.offsetHeight, documentElement.offsetHeight), - Math.max(body.clientHeight, documentElement.clientHeight) - ); - return new Bounds(0, 0, width, height); - }; - - /* - * css-line-break 2.1.0 - * Copyright (c) 2022 Niklas von Hertzen - * Released under MIT License - */ - var toCodePoints$1 = function (str) { - var codePoints = []; - var i = 0; - var length = str.length; - while (i < length) { - var value = str.charCodeAt(i++); - if (value >= 0xd800 && value <= 0xdbff && i < length) { - var extra = str.charCodeAt(i++); - if ((extra & 0xfc00) === 0xdc00) { - codePoints.push( - ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000 - ); - } else { - codePoints.push(value); - i--; - } - } else { - codePoints.push(value); - } - } - return codePoints; - }; - var fromCodePoint$1 = function () { - var codePoints = []; - for (var _i = 0; _i < arguments.length; _i++) { - codePoints[_i] = arguments[_i]; - } - if (String.fromCodePoint) { - return String.fromCodePoint.apply(String, codePoints); - } - var length = codePoints.length; - if (!length) { - return ""; - } - var codeUnits = []; - var index = -1; - var result = ""; - while (++index < length) { - var codePoint = codePoints[index]; - if (codePoint <= 0xffff) { - codeUnits.push(codePoint); - } else { - codePoint -= 0x10000; - codeUnits.push( - (codePoint >> 10) + 0xd800, - (codePoint % 0x400) + 0xdc00 - ); - } - if (index + 1 === length || codeUnits.length > 0x4000) { - result += String.fromCharCode.apply(String, codeUnits); - codeUnits.length = 0; - } - } - return result; - }; - var chars$2 = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - // Use a lookup table to find the index. - var lookup$2 = - typeof Uint8Array === "undefined" ? [] : new Uint8Array(256); - for (var i$2 = 0; i$2 < chars$2.length; i$2++) { - lookup$2[chars$2.charCodeAt(i$2)] = i$2; - } - - /* - * utrie 1.0.2 - * Copyright (c) 2022 Niklas von Hertzen - * Released under MIT License - */ - var chars$1$1 = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - // Use a lookup table to find the index. - var lookup$1$1 = - typeof Uint8Array === "undefined" ? [] : new Uint8Array(256); - for (var i$1$1 = 0; i$1$1 < chars$1$1.length; i$1$1++) { - lookup$1$1[chars$1$1.charCodeAt(i$1$1)] = i$1$1; - } - var decode$1 = function (base64) { - var bufferLength = base64.length * 0.75, - len = base64.length, - i, - p = 0, - encoded1, - encoded2, - encoded3, - encoded4; - if (base64[base64.length - 1] === "=") { - bufferLength--; - if (base64[base64.length - 2] === "=") { - bufferLength--; - } - } - var buffer = - typeof ArrayBuffer !== "undefined" && - typeof Uint8Array !== "undefined" && - typeof Uint8Array.prototype.slice !== "undefined" - ? new ArrayBuffer(bufferLength) - : new Array(bufferLength); - var bytes = Array.isArray(buffer) ? buffer : new Uint8Array(buffer); - for (i = 0; i < len; i += 4) { - encoded1 = lookup$1$1[base64.charCodeAt(i)]; - encoded2 = lookup$1$1[base64.charCodeAt(i + 1)]; - encoded3 = lookup$1$1[base64.charCodeAt(i + 2)]; - encoded4 = lookup$1$1[base64.charCodeAt(i + 3)]; - bytes[p++] = (encoded1 << 2) | (encoded2 >> 4); - bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2); - bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63); - } - return buffer; - }; - var polyUint16Array$1 = function (buffer) { - var length = buffer.length; - var bytes = []; - for (var i = 0; i < length; i += 2) { - bytes.push((buffer[i + 1] << 8) | buffer[i]); - } - return bytes; - }; - var polyUint32Array$1 = function (buffer) { - var length = buffer.length; - var bytes = []; - for (var i = 0; i < length; i += 4) { - bytes.push( - (buffer[i + 3] << 24) | - (buffer[i + 2] << 16) | - (buffer[i + 1] << 8) | - buffer[i] - ); - } - return bytes; - }; - - /** Shift size for getting the index-2 table offset. */ - var UTRIE2_SHIFT_2$1 = 5; - /** Shift size for getting the index-1 table offset. */ - var UTRIE2_SHIFT_1$1 = 6 + 5; - /** - * Shift size for shifting left the index array values. - * Increases possible data size with 16-bit index values at the cost - * of compactability. - * This requires data blocks to be aligned by UTRIE2_DATA_GRANULARITY. - */ - var UTRIE2_INDEX_SHIFT$1 = 2; - /** - * Difference between the two shift sizes, - * for getting an index-1 offset from an index-2 offset. 6=11-5 - */ - var UTRIE2_SHIFT_1_2$1 = UTRIE2_SHIFT_1$1 - UTRIE2_SHIFT_2$1; - /** - * The part of the index-2 table for U+D800..U+DBFF stores values for - * lead surrogate code _units_ not code _points_. - * Values for lead surrogate code _points_ are indexed with this portion of the table. - * Length=32=0x20=0x400>>UTRIE2_SHIFT_2. (There are 1024=0x400 lead surrogates.) - */ - var UTRIE2_LSCP_INDEX_2_OFFSET$1 = 0x10000 >> UTRIE2_SHIFT_2$1; - /** Number of entries in a data block. 32=0x20 */ - var UTRIE2_DATA_BLOCK_LENGTH$1 = 1 << UTRIE2_SHIFT_2$1; - /** Mask for getting the lower bits for the in-data-block offset. */ - var UTRIE2_DATA_MASK$1 = UTRIE2_DATA_BLOCK_LENGTH$1 - 1; - var UTRIE2_LSCP_INDEX_2_LENGTH$1 = 0x400 >> UTRIE2_SHIFT_2$1; - /** Count the lengths of both BMP pieces. 2080=0x820 */ - var UTRIE2_INDEX_2_BMP_LENGTH$1 = - UTRIE2_LSCP_INDEX_2_OFFSET$1 + UTRIE2_LSCP_INDEX_2_LENGTH$1; - /** - * The 2-byte UTF-8 version of the index-2 table follows at offset 2080=0x820. - * Length 32=0x20 for lead bytes C0..DF, regardless of UTRIE2_SHIFT_2. - */ - var UTRIE2_UTF8_2B_INDEX_2_OFFSET$1 = UTRIE2_INDEX_2_BMP_LENGTH$1; - var UTRIE2_UTF8_2B_INDEX_2_LENGTH$1 = - 0x800 >> 6; /* U+0800 is the first code point after 2-byte UTF-8 */ - /** - * The index-1 table, only used for supplementary code points, at offset 2112=0x840. - * Variable length, for code points up to highStart, where the last single-value range starts. - * Maximum length 512=0x200=0x100000>>UTRIE2_SHIFT_1. - * (For 0x100000 supplementary code points U+10000..U+10ffff.) - * - * The part of the index-2 table for supplementary code points starts - * after this index-1 table. - * - * Both the index-1 table and the following part of the index-2 table - * are omitted completely if there is only BMP data. - */ - var UTRIE2_INDEX_1_OFFSET$1 = - UTRIE2_UTF8_2B_INDEX_2_OFFSET$1 + UTRIE2_UTF8_2B_INDEX_2_LENGTH$1; - /** - * Number of index-1 entries for the BMP. 32=0x20 - * This part of the index-1 table is omitted from the serialized form. - */ - var UTRIE2_OMITTED_BMP_INDEX_1_LENGTH$1 = 0x10000 >> UTRIE2_SHIFT_1$1; - /** Number of entries in an index-2 block. 64=0x40 */ - var UTRIE2_INDEX_2_BLOCK_LENGTH$1 = 1 << UTRIE2_SHIFT_1_2$1; - /** Mask for getting the lower bits for the in-index-2-block offset. */ - var UTRIE2_INDEX_2_MASK$1 = UTRIE2_INDEX_2_BLOCK_LENGTH$1 - 1; - var slice16$1 = function (view, start, end) { - if (view.slice) { - return view.slice(start, end); - } - return new Uint16Array(Array.prototype.slice.call(view, start, end)); - }; - var slice32$1 = function (view, start, end) { - if (view.slice) { - return view.slice(start, end); - } - return new Uint32Array(Array.prototype.slice.call(view, start, end)); - }; - var createTrieFromBase64$1 = function (base64, _byteLength) { - var buffer = decode$1(base64); - var view32 = Array.isArray(buffer) - ? polyUint32Array$1(buffer) - : new Uint32Array(buffer); - var view16 = Array.isArray(buffer) - ? polyUint16Array$1(buffer) - : new Uint16Array(buffer); - var headerLength = 24; - var index = slice16$1(view16, headerLength / 2, view32[4] / 2); - var data = - view32[5] === 2 - ? slice16$1(view16, (headerLength + view32[4]) / 2) - : slice32$1(view32, Math.ceil((headerLength + view32[4]) / 4)); - return new Trie$1( - view32[0], - view32[1], - view32[2], - view32[3], - index, - data - ); - }; - var Trie$1 = /** @class */ (function () { - function Trie( - initialValue, - errorValue, - highStart, - highValueIndex, - index, - data - ) { - this.initialValue = initialValue; - this.errorValue = errorValue; - this.highStart = highStart; - this.highValueIndex = highValueIndex; - this.index = index; - this.data = data; - } - /** - * Get the value for a code point as stored in the Trie. - * - * @param codePoint the code point - * @return the value - */ - Trie.prototype.get = function (codePoint) { - var ix; - if (codePoint >= 0) { - if ( - codePoint < 0x0d800 || - (codePoint > 0x0dbff && codePoint <= 0x0ffff) - ) { - // Ordinary BMP code point, excluding leading surrogates. - // BMP uses a single level lookup. BMP index starts at offset 0 in the Trie2 index. - // 16 bit data is stored in the index array itself. - ix = this.index[codePoint >> UTRIE2_SHIFT_2$1]; - ix = - (ix << UTRIE2_INDEX_SHIFT$1) + (codePoint & UTRIE2_DATA_MASK$1); - return this.data[ix]; - } - if (codePoint <= 0xffff) { - // Lead Surrogate Code Point. A Separate index section is stored for - // lead surrogate code units and code points. - // The main index has the code unit data. - // For this function, we need the code point data. - // Note: this expression could be refactored for slightly improved efficiency, but - // surrogate code points will be so rare in practice that it's not worth it. - ix = - this.index[ - UTRIE2_LSCP_INDEX_2_OFFSET$1 + - ((codePoint - 0xd800) >> UTRIE2_SHIFT_2$1) - ]; - ix = - (ix << UTRIE2_INDEX_SHIFT$1) + (codePoint & UTRIE2_DATA_MASK$1); - return this.data[ix]; - } - if (codePoint < this.highStart) { - // Supplemental code point, use two-level lookup. - ix = - UTRIE2_INDEX_1_OFFSET$1 - - UTRIE2_OMITTED_BMP_INDEX_1_LENGTH$1 + - (codePoint >> UTRIE2_SHIFT_1$1); - ix = this.index[ix]; - ix += (codePoint >> UTRIE2_SHIFT_2$1) & UTRIE2_INDEX_2_MASK$1; - ix = this.index[ix]; - ix = - (ix << UTRIE2_INDEX_SHIFT$1) + (codePoint & UTRIE2_DATA_MASK$1); - return this.data[ix]; - } - if (codePoint <= 0x10ffff) { - return this.data[this.highValueIndex]; - } - } - // Fall through. The code point is outside of the legal range of 0..0x10ffff. - return this.errorValue; - }; - return Trie; - })(); - - /* - * base64-arraybuffer 1.0.2 - * Copyright (c) 2022 Niklas von Hertzen - * Released under MIT License - */ - var chars$3 = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - // Use a lookup table to find the index. - var lookup$3 = - typeof Uint8Array === "undefined" ? [] : new Uint8Array(256); - for (var i$3 = 0; i$3 < chars$3.length; i$3++) { - lookup$3[chars$3.charCodeAt(i$3)] = i$3; - } - - var base64$1 = - "KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAK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ywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHL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hoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCEC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MVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwAD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EAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAA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HgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACs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wArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4A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AAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA=="; - - var LETTER_NUMBER_MODIFIER = 50; - // Non-tailorable Line Breaking Classes - var BK = 1; // Cause a line break (after) - var CR$1 = 2; // Cause a line break (after), except between CR and LF - var LF$1 = 3; // Cause a line break (after) - var CM = 4; // Prohibit a line break between the character and the preceding character - var NL = 5; // Cause a line break (after) - var WJ = 7; // Prohibit line breaks before and after - var ZW = 8; // Provide a break opportunity - var GL = 9; // Prohibit line breaks before and after - var SP = 10; // Enable indirect line breaks - var ZWJ$1 = 11; // Prohibit line breaks within joiner sequences - // Break Opportunities - var B2 = 12; // Provide a line break opportunity before and after the character - var BA = 13; // Generally provide a line break opportunity after the character - var BB = 14; // Generally provide a line break opportunity before the character - var HY = 15; // Provide a line break opportunity after the character, except in numeric context - var CB = 16; // Provide a line break opportunity contingent on additional information - // Characters Prohibiting Certain Breaks - var CL = 17; // Prohibit line breaks before - var CP = 18; // Prohibit line breaks before - var EX = 19; // Prohibit line breaks before - var IN = 20; // Allow only indirect line breaks between pairs - var NS = 21; // Allow only indirect line breaks before - var OP = 22; // Prohibit line breaks after - var QU = 23; // Act like they are both opening and closing - // Numeric Context - var IS = 24; // Prevent breaks after any and before numeric - var NU = 25; // Form numeric expressions for line breaking purposes - var PO = 26; // Do not break following a numeric expression - var PR = 27; // Do not break in front of a numeric expression - var SY = 28; // Prevent a break before; and allow a break after - // Other Characters - var AI = 29; // Act like AL when the resolvedEAW is N; otherwise; act as ID - var AL = 30; // Are alphabetic characters or symbols that are used with alphabetic characters - var CJ = 31; // Treat as NS or ID for strict or normal breaking. - var EB = 32; // Do not break from following Emoji Modifier - var EM = 33; // Do not break from preceding Emoji Base - var H2 = 34; // Form Korean syllable blocks - var H3 = 35; // Form Korean syllable blocks - var HL = 36; // Do not break around a following hyphen; otherwise act as Alphabetic - var ID = 37; // Break before or after; except in some numeric context - var JL = 38; // Form Korean syllable blocks - var JV = 39; // Form Korean syllable blocks - var JT = 40; // Form Korean syllable blocks - var RI$1 = 41; // Keep pairs together. For pairs; break before and after other classes - var SA = 42; // Provide a line break opportunity contingent on additional, language-specific context analysis - var XX = 43; // Have as yet unknown line breaking behavior or unassigned code positions - var ea_OP = [0x2329, 0xff08]; - var BREAK_MANDATORY = "!"; - var BREAK_NOT_ALLOWED$1 = "×"; - var BREAK_ALLOWED$1 = "÷"; - var UnicodeTrie$1 = createTrieFromBase64$1(base64$1); - var ALPHABETICS = [AL, HL]; - var HARD_LINE_BREAKS = [BK, CR$1, LF$1, NL]; - var SPACE$1 = [SP, ZW]; - var PREFIX_POSTFIX = [PR, PO]; - var LINE_BREAKS = HARD_LINE_BREAKS.concat(SPACE$1); - var KOREAN_SYLLABLE_BLOCK = [JL, JV, JT, H2, H3]; - var HYPHEN = [HY, BA]; - var codePointsToCharacterClasses = function (codePoints, lineBreak) { - if (lineBreak === void 0) { - lineBreak = "strict"; - } - var types = []; - var indices = []; - var categories = []; - codePoints.forEach(function (codePoint, index) { - var classType = UnicodeTrie$1.get(codePoint); - if (classType > LETTER_NUMBER_MODIFIER) { - categories.push(true); - classType -= LETTER_NUMBER_MODIFIER; - } else { - categories.push(false); - } - if (["normal", "auto", "loose"].indexOf(lineBreak) !== -1) { - // U+2010, – U+2013, 〜 U+301C, ゠ U+30A0 - if ([0x2010, 0x2013, 0x301c, 0x30a0].indexOf(codePoint) !== -1) { - indices.push(index); - return types.push(CB); - } - } - if (classType === CM || classType === ZWJ$1) { - // LB10 Treat any remaining combining mark or ZWJ as AL. - if (index === 0) { - indices.push(index); - return types.push(AL); - } - // LB9 Do not break a combining character sequence; treat it as if it has the line breaking class of - // the base character in all of the following rules. Treat ZWJ as if it were CM. - var prev = types[index - 1]; - if (LINE_BREAKS.indexOf(prev) === -1) { - indices.push(indices[index - 1]); - return types.push(prev); - } - indices.push(index); - return types.push(AL); - } - indices.push(index); - if (classType === CJ) { - return types.push(lineBreak === "strict" ? NS : ID); - } - if (classType === SA) { - return types.push(AL); - } - if (classType === AI) { - return types.push(AL); - } - // For supplementary characters, a useful default is to treat characters in the range 10000..1FFFD as AL - // and characters in the ranges 20000..2FFFD and 30000..3FFFD as ID, until the implementation can be revised - // to take into account the actual line breaking properties for these characters. - if (classType === XX) { - if ( - (codePoint >= 0x20000 && codePoint <= 0x2fffd) || - (codePoint >= 0x30000 && codePoint <= 0x3fffd) - ) { - return types.push(ID); - } else { - return types.push(AL); - } - } - types.push(classType); - }); - return [indices, types, categories]; - }; - var isAdjacentWithSpaceIgnored = function ( - a, - b, - currentIndex, - classTypes - ) { - var current = classTypes[currentIndex]; - if (Array.isArray(a) ? a.indexOf(current) !== -1 : a === current) { - var i = currentIndex; - while (i <= classTypes.length) { - i++; - var next = classTypes[i]; - if (next === b) { - return true; - } - if (next !== SP) { - break; - } - } - } - if (current === SP) { - var i = currentIndex; - while (i > 0) { - i--; - var prev = classTypes[i]; - if (Array.isArray(a) ? a.indexOf(prev) !== -1 : a === prev) { - var n = currentIndex; - while (n <= classTypes.length) { - n++; - var next = classTypes[n]; - if (next === b) { - return true; - } - if (next !== SP) { - break; - } - } - } - if (prev !== SP) { - break; - } - } - } - return false; - }; - var previousNonSpaceClassType = function (currentIndex, classTypes) { - var i = currentIndex; - while (i >= 0) { - var type = classTypes[i]; - if (type === SP) { - i--; - } else { - return type; - } - } - return 0; - }; - var _lineBreakAtIndex = function ( - codePoints, - classTypes, - indicies, - index, - forbiddenBreaks - ) { - if (indicies[index] === 0) { - return BREAK_NOT_ALLOWED$1; - } - var currentIndex = index - 1; - if ( - Array.isArray(forbiddenBreaks) && - forbiddenBreaks[currentIndex] === true - ) { - return BREAK_NOT_ALLOWED$1; - } - var beforeIndex = currentIndex - 1; - var afterIndex = currentIndex + 1; - var current = classTypes[currentIndex]; - // LB4 Always break after hard line breaks. - // LB5 Treat CR followed by LF, as well as CR, LF, and NL as hard line breaks. - var before = beforeIndex >= 0 ? classTypes[beforeIndex] : 0; - var next = classTypes[afterIndex]; - if (current === CR$1 && next === LF$1) { - return BREAK_NOT_ALLOWED$1; - } - if (HARD_LINE_BREAKS.indexOf(current) !== -1) { - return BREAK_MANDATORY; - } - // LB6 Do not break before hard line breaks. - if (HARD_LINE_BREAKS.indexOf(next) !== -1) { - return BREAK_NOT_ALLOWED$1; - } - // LB7 Do not break before spaces or zero width space. - if (SPACE$1.indexOf(next) !== -1) { - return BREAK_NOT_ALLOWED$1; - } - // LB8 Break before any character following a zero-width space, even if one or more spaces intervene. - if (previousNonSpaceClassType(currentIndex, classTypes) === ZW) { - return BREAK_ALLOWED$1; - } - // LB8a Do not break after a zero width joiner. - if (UnicodeTrie$1.get(codePoints[currentIndex]) === ZWJ$1) { - return BREAK_NOT_ALLOWED$1; - } - // zwj emojis - if ( - (current === EB || current === EM) && - UnicodeTrie$1.get(codePoints[afterIndex]) === ZWJ$1 - ) { - return BREAK_NOT_ALLOWED$1; - } - // LB11 Do not break before or after Word joiner and related characters. - if (current === WJ || next === WJ) { - return BREAK_NOT_ALLOWED$1; - } - // LB12 Do not break after NBSP and related characters. - if (current === GL) { - return BREAK_NOT_ALLOWED$1; - } - // LB12a Do not break before NBSP and related characters, except after spaces and hyphens. - if ([SP, BA, HY].indexOf(current) === -1 && next === GL) { - return BREAK_NOT_ALLOWED$1; - } - // LB13 Do not break before ‘]’ or ‘!’ or ‘;’ or ‘/’, even after spaces. - if ([CL, CP, EX, IS, SY].indexOf(next) !== -1) { - return BREAK_NOT_ALLOWED$1; - } - // LB14 Do not break after ‘[’, even after spaces. - if (previousNonSpaceClassType(currentIndex, classTypes) === OP) { - return BREAK_NOT_ALLOWED$1; - } - // LB15 Do not break within ‘”[’, even with intervening spaces. - if (isAdjacentWithSpaceIgnored(QU, OP, currentIndex, classTypes)) { - return BREAK_NOT_ALLOWED$1; - } - // LB16 Do not break between closing punctuation and a nonstarter (lb=NS), even with intervening spaces. - if ( - isAdjacentWithSpaceIgnored([CL, CP], NS, currentIndex, classTypes) - ) { - return BREAK_NOT_ALLOWED$1; - } - // LB17 Do not break within ‘——’, even with intervening spaces. - if (isAdjacentWithSpaceIgnored(B2, B2, currentIndex, classTypes)) { - return BREAK_NOT_ALLOWED$1; - } - // LB18 Break after spaces. - if (current === SP) { - return BREAK_ALLOWED$1; - } - // LB19 Do not break before or after quotation marks, such as ‘ ” ’. - if (current === QU || next === QU) { - return BREAK_NOT_ALLOWED$1; - } - // LB20 Break before and after unresolved CB. - if (next === CB || current === CB) { - return BREAK_ALLOWED$1; - } - // LB21 Do not break before hyphen-minus, other hyphens, fixed-width spaces, small kana, and other non-starters, or after acute accents. - if ([BA, HY, NS].indexOf(next) !== -1 || current === BB) { - return BREAK_NOT_ALLOWED$1; - } - // LB21a Don't break after Hebrew + Hyphen. - if (before === HL && HYPHEN.indexOf(current) !== -1) { - return BREAK_NOT_ALLOWED$1; - } - // LB21b Don’t break between Solidus and Hebrew letters. - if (current === SY && next === HL) { - return BREAK_NOT_ALLOWED$1; - } - // LB22 Do not break before ellipsis. - if (next === IN) { - return BREAK_NOT_ALLOWED$1; - } - // LB23 Do not break between digits and letters. - if ( - (ALPHABETICS.indexOf(next) !== -1 && current === NU) || - (ALPHABETICS.indexOf(current) !== -1 && next === NU) - ) { - return BREAK_NOT_ALLOWED$1; - } - // LB23a Do not break between numeric prefixes and ideographs, or between ideographs and numeric postfixes. - if ( - (current === PR && [ID, EB, EM].indexOf(next) !== -1) || - ([ID, EB, EM].indexOf(current) !== -1 && next === PO) - ) { - return BREAK_NOT_ALLOWED$1; - } - // LB24 Do not break between numeric prefix/postfix and letters, or between letters and prefix/postfix. - if ( - (ALPHABETICS.indexOf(current) !== -1 && - PREFIX_POSTFIX.indexOf(next) !== -1) || - (PREFIX_POSTFIX.indexOf(current) !== -1 && - ALPHABETICS.indexOf(next) !== -1) - ) { - return BREAK_NOT_ALLOWED$1; - } - // LB25 Do not break between the following pairs of classes relevant to numbers: - if ( - // (PR | PO) × ( OP | HY )? NU - ([PR, PO].indexOf(current) !== -1 && - (next === NU || - ([OP, HY].indexOf(next) !== -1 && - classTypes[afterIndex + 1] === NU))) || - // ( OP | HY ) × NU - ([OP, HY].indexOf(current) !== -1 && next === NU) || - // NU × (NU | SY | IS) - (current === NU && [NU, SY, IS].indexOf(next) !== -1) - ) { - return BREAK_NOT_ALLOWED$1; - } - // NU (NU | SY | IS)* × (NU | SY | IS | CL | CP) - if ([NU, SY, IS, CL, CP].indexOf(next) !== -1) { - var prevIndex = currentIndex; - while (prevIndex >= 0) { - var type = classTypes[prevIndex]; - if (type === NU) { - return BREAK_NOT_ALLOWED$1; - } else if ([SY, IS].indexOf(type) !== -1) { - prevIndex--; - } else { - break; - } - } - } - // NU (NU | SY | IS)* (CL | CP)? × (PO | PR)) - if ([PR, PO].indexOf(next) !== -1) { - var prevIndex = - [CL, CP].indexOf(current) !== -1 ? beforeIndex : currentIndex; - while (prevIndex >= 0) { - var type = classTypes[prevIndex]; - if (type === NU) { - return BREAK_NOT_ALLOWED$1; - } else if ([SY, IS].indexOf(type) !== -1) { - prevIndex--; - } else { - break; - } - } - } - // LB26 Do not break a Korean syllable. - if ( - (JL === current && [JL, JV, H2, H3].indexOf(next) !== -1) || - ([JV, H2].indexOf(current) !== -1 && [JV, JT].indexOf(next) !== -1) || - ([JT, H3].indexOf(current) !== -1 && next === JT) - ) { - return BREAK_NOT_ALLOWED$1; - } - // LB27 Treat a Korean Syllable Block the same as ID. - if ( - (KOREAN_SYLLABLE_BLOCK.indexOf(current) !== -1 && - [IN, PO].indexOf(next) !== -1) || - (KOREAN_SYLLABLE_BLOCK.indexOf(next) !== -1 && current === PR) - ) { - return BREAK_NOT_ALLOWED$1; - } - // LB28 Do not break between alphabetics (“at”). - if ( - ALPHABETICS.indexOf(current) !== -1 && - ALPHABETICS.indexOf(next) !== -1 - ) { - return BREAK_NOT_ALLOWED$1; - } - // LB29 Do not break between numeric punctuation and alphabetics (“e.g.”). - if (current === IS && ALPHABETICS.indexOf(next) !== -1) { - return BREAK_NOT_ALLOWED$1; - } - // LB30 Do not break between letters, numbers, or ordinary symbols and opening or closing parentheses. - if ( - (ALPHABETICS.concat(NU).indexOf(current) !== -1 && - next === OP && - ea_OP.indexOf(codePoints[afterIndex]) === -1) || - (ALPHABETICS.concat(NU).indexOf(next) !== -1 && current === CP) - ) { - return BREAK_NOT_ALLOWED$1; - } - // LB30a Break between two regional indicator symbols if and only if there are an even number of regional - // indicators preceding the position of the break. - if (current === RI$1 && next === RI$1) { - var i = indicies[currentIndex]; - var count = 1; - while (i > 0) { - i--; - if (classTypes[i] === RI$1) { - count++; - } else { - break; - } - } - if (count % 2 !== 0) { - return BREAK_NOT_ALLOWED$1; - } - } - // LB30b Do not break between an emoji base and an emoji modifier. - if (current === EB && next === EM) { - return BREAK_NOT_ALLOWED$1; - } - return BREAK_ALLOWED$1; - }; - var cssFormattedClasses = function (codePoints, options) { - if (!options) { - options = { lineBreak: "normal", wordBreak: "normal" }; - } - var _a = codePointsToCharacterClasses(codePoints, options.lineBreak), - indicies = _a[0], - classTypes = _a[1], - isLetterNumber = _a[2]; - if ( - options.wordBreak === "break-all" || - options.wordBreak === "break-word" - ) { - classTypes = classTypes.map(function (type) { - return [NU, AL, SA].indexOf(type) !== -1 ? ID : type; - }); - } - var forbiddenBreakpoints = - options.wordBreak === "keep-all" - ? isLetterNumber.map(function (letterNumber, i) { - return ( - letterNumber && - codePoints[i] >= 0x4e00 && - codePoints[i] <= 0x9fff - ); - }) - : undefined; - return [indicies, classTypes, forbiddenBreakpoints]; - }; - var Break = /** @class */ (function () { - function Break(codePoints, lineBreak, start, end) { - this.codePoints = codePoints; - this.required = lineBreak === BREAK_MANDATORY; - this.start = start; - this.end = end; - } - Break.prototype.slice = function () { - return fromCodePoint$1.apply( - void 0, - this.codePoints.slice(this.start, this.end) - ); - }; - return Break; - })(); - var LineBreaker = function (str, options) { - var codePoints = toCodePoints$1(str); - var _a = cssFormattedClasses(codePoints, options), - indicies = _a[0], - classTypes = _a[1], - forbiddenBreakpoints = _a[2]; - var length = codePoints.length; - var lastEnd = 0; - var nextIndex = 0; - return { - next: function () { - if (nextIndex >= length) { - return { done: true, value: null }; - } - var lineBreak = BREAK_NOT_ALLOWED$1; - while ( - nextIndex < length && - (lineBreak = _lineBreakAtIndex( - codePoints, - classTypes, - indicies, - ++nextIndex, - forbiddenBreakpoints - )) === BREAK_NOT_ALLOWED$1 - ) {} - if (lineBreak !== BREAK_NOT_ALLOWED$1 || nextIndex === length) { - var value = new Break(codePoints, lineBreak, lastEnd, nextIndex); - lastEnd = nextIndex; - return { value: value, done: false }; - } - return { done: true, value: null }; - }, - }; - }; - - // https://www.w3.org/TR/css-syntax-3 - var FLAG_UNRESTRICTED = 1 << 0; - var FLAG_ID = 1 << 1; - var FLAG_INTEGER = 1 << 2; - var FLAG_NUMBER = 1 << 3; - var LINE_FEED = 0x000a; - var SOLIDUS = 0x002f; - var REVERSE_SOLIDUS = 0x005c; - var CHARACTER_TABULATION = 0x0009; - var SPACE = 0x0020; - var QUOTATION_MARK = 0x0022; - var EQUALS_SIGN = 0x003d; - var NUMBER_SIGN = 0x0023; - var DOLLAR_SIGN = 0x0024; - var PERCENTAGE_SIGN = 0x0025; - var APOSTROPHE = 0x0027; - var LEFT_PARENTHESIS = 0x0028; - var RIGHT_PARENTHESIS = 0x0029; - var LOW_LINE = 0x005f; - var HYPHEN_MINUS = 0x002d; - var EXCLAMATION_MARK = 0x0021; - var LESS_THAN_SIGN = 0x003c; - var GREATER_THAN_SIGN = 0x003e; - var COMMERCIAL_AT = 0x0040; - var LEFT_SQUARE_BRACKET = 0x005b; - var RIGHT_SQUARE_BRACKET = 0x005d; - var CIRCUMFLEX_ACCENT = 0x003d; - var LEFT_CURLY_BRACKET = 0x007b; - var QUESTION_MARK = 0x003f; - var RIGHT_CURLY_BRACKET = 0x007d; - var VERTICAL_LINE = 0x007c; - var TILDE = 0x007e; - var CONTROL = 0x0080; - var REPLACEMENT_CHARACTER = 0xfffd; - var ASTERISK = 0x002a; - var PLUS_SIGN = 0x002b; - var COMMA = 0x002c; - var COLON = 0x003a; - var SEMICOLON = 0x003b; - var FULL_STOP = 0x002e; - var NULL = 0x0000; - var BACKSPACE = 0x0008; - var LINE_TABULATION = 0x000b; - var SHIFT_OUT = 0x000e; - var INFORMATION_SEPARATOR_ONE = 0x001f; - var DELETE = 0x007f; - var EOF = -1; - var ZERO = 0x0030; - var a = 0x0061; - var e = 0x0065; - var f = 0x0066; - var u = 0x0075; - var z = 0x007a; - var A = 0x0041; - var E = 0x0045; - var F = 0x0046; - var U = 0x0055; - var Z = 0x005a; - var isDigit = function (codePoint) { - return codePoint >= ZERO && codePoint <= 0x0039; - }; - var isSurrogateCodePoint = function (codePoint) { - return codePoint >= 0xd800 && codePoint <= 0xdfff; - }; - var isHex = function (codePoint) { - return ( - isDigit(codePoint) || - (codePoint >= A && codePoint <= F) || - (codePoint >= a && codePoint <= f) - ); - }; - var isLowerCaseLetter = function (codePoint) { - return codePoint >= a && codePoint <= z; - }; - var isUpperCaseLetter = function (codePoint) { - return codePoint >= A && codePoint <= Z; - }; - var isLetter = function (codePoint) { - return isLowerCaseLetter(codePoint) || isUpperCaseLetter(codePoint); - }; - var isNonASCIICodePoint = function (codePoint) { - return codePoint >= CONTROL; - }; - var isWhiteSpace = function (codePoint) { - return ( - codePoint === LINE_FEED || - codePoint === CHARACTER_TABULATION || - codePoint === SPACE - ); - }; - var isNameStartCodePoint = function (codePoint) { - return ( - isLetter(codePoint) || - isNonASCIICodePoint(codePoint) || - codePoint === LOW_LINE - ); - }; - var isNameCodePoint = function (codePoint) { - return ( - isNameStartCodePoint(codePoint) || - isDigit(codePoint) || - codePoint === HYPHEN_MINUS - ); - }; - var isNonPrintableCodePoint = function (codePoint) { - return ( - (codePoint >= NULL && codePoint <= BACKSPACE) || - codePoint === LINE_TABULATION || - (codePoint >= SHIFT_OUT && codePoint <= INFORMATION_SEPARATOR_ONE) || - codePoint === DELETE - ); - }; - var isValidEscape = function (c1, c2) { - if (c1 !== REVERSE_SOLIDUS) { - return false; - } - return c2 !== LINE_FEED; - }; - var isIdentifierStart = function (c1, c2, c3) { - if (c1 === HYPHEN_MINUS) { - return isNameStartCodePoint(c2) || isValidEscape(c2, c3); - } else if (isNameStartCodePoint(c1)) { - return true; - } else if (c1 === REVERSE_SOLIDUS && isValidEscape(c1, c2)) { - return true; - } - return false; - }; - var isNumberStart = function (c1, c2, c3) { - if (c1 === PLUS_SIGN || c1 === HYPHEN_MINUS) { - if (isDigit(c2)) { - return true; - } - return c2 === FULL_STOP && isDigit(c3); - } - if (c1 === FULL_STOP) { - return isDigit(c2); - } - return isDigit(c1); - }; - var stringToNumber = function (codePoints) { - var c = 0; - var sign = 1; - if (codePoints[c] === PLUS_SIGN || codePoints[c] === HYPHEN_MINUS) { - if (codePoints[c] === HYPHEN_MINUS) { - sign = -1; - } - c++; - } - var integers = []; - while (isDigit(codePoints[c])) { - integers.push(codePoints[c++]); - } - var int = integers.length - ? parseInt(fromCodePoint$1.apply(void 0, integers), 10) - : 0; - if (codePoints[c] === FULL_STOP) { - c++; - } - var fraction = []; - while (isDigit(codePoints[c])) { - fraction.push(codePoints[c++]); - } - var fracd = fraction.length; - var frac = fracd - ? parseInt(fromCodePoint$1.apply(void 0, fraction), 10) - : 0; - if (codePoints[c] === E || codePoints[c] === e) { - c++; - } - var expsign = 1; - if (codePoints[c] === PLUS_SIGN || codePoints[c] === HYPHEN_MINUS) { - if (codePoints[c] === HYPHEN_MINUS) { - expsign = -1; - } - c++; - } - var exponent = []; - while (isDigit(codePoints[c])) { - exponent.push(codePoints[c++]); - } - var exp = exponent.length - ? parseInt(fromCodePoint$1.apply(void 0, exponent), 10) - : 0; - return ( - sign * - (int + frac * Math.pow(10, -fracd)) * - Math.pow(10, expsign * exp) - ); - }; - var LEFT_PARENTHESIS_TOKEN = { - type: 2 /* LEFT_PARENTHESIS_TOKEN */, - }; - var RIGHT_PARENTHESIS_TOKEN = { - type: 3 /* RIGHT_PARENTHESIS_TOKEN */, - }; - var COMMA_TOKEN = { type: 4 /* COMMA_TOKEN */ }; - var SUFFIX_MATCH_TOKEN = { type: 13 /* SUFFIX_MATCH_TOKEN */ }; - var PREFIX_MATCH_TOKEN = { type: 8 /* PREFIX_MATCH_TOKEN */ }; - var COLUMN_TOKEN = { type: 21 /* COLUMN_TOKEN */ }; - var DASH_MATCH_TOKEN = { type: 9 /* DASH_MATCH_TOKEN */ }; - var INCLUDE_MATCH_TOKEN = { type: 10 /* INCLUDE_MATCH_TOKEN */ }; - var LEFT_CURLY_BRACKET_TOKEN = { - type: 11 /* LEFT_CURLY_BRACKET_TOKEN */, - }; - var RIGHT_CURLY_BRACKET_TOKEN = { - type: 12 /* RIGHT_CURLY_BRACKET_TOKEN */, - }; - var SUBSTRING_MATCH_TOKEN = { type: 14 /* SUBSTRING_MATCH_TOKEN */ }; - var BAD_URL_TOKEN = { type: 23 /* BAD_URL_TOKEN */ }; - var BAD_STRING_TOKEN = { type: 1 /* BAD_STRING_TOKEN */ }; - var CDO_TOKEN = { type: 25 /* CDO_TOKEN */ }; - var CDC_TOKEN = { type: 24 /* CDC_TOKEN */ }; - var COLON_TOKEN = { type: 26 /* COLON_TOKEN */ }; - var SEMICOLON_TOKEN = { type: 27 /* SEMICOLON_TOKEN */ }; - var LEFT_SQUARE_BRACKET_TOKEN = { - type: 28 /* LEFT_SQUARE_BRACKET_TOKEN */, - }; - var RIGHT_SQUARE_BRACKET_TOKEN = { - type: 29 /* RIGHT_SQUARE_BRACKET_TOKEN */, - }; - var WHITESPACE_TOKEN = { type: 31 /* WHITESPACE_TOKEN */ }; - var EOF_TOKEN = { type: 32 /* EOF_TOKEN */ }; - var Tokenizer = /** @class */ (function () { - function Tokenizer() { - this._value = []; - } - Tokenizer.prototype.write = function (chunk) { - this._value = this._value.concat(toCodePoints$1(chunk)); - }; - Tokenizer.prototype.read = function () { - var tokens = []; - var token = this.consumeToken(); - while (token !== EOF_TOKEN) { - tokens.push(token); - token = this.consumeToken(); - } - return tokens; - }; - Tokenizer.prototype.consumeToken = function () { - var codePoint = this.consumeCodePoint(); - switch (codePoint) { - case QUOTATION_MARK: - return this.consumeStringToken(QUOTATION_MARK); - case NUMBER_SIGN: - var c1 = this.peekCodePoint(0); - var c2 = this.peekCodePoint(1); - var c3 = this.peekCodePoint(2); - if (isNameCodePoint(c1) || isValidEscape(c2, c3)) { - var flags = isIdentifierStart(c1, c2, c3) - ? FLAG_ID - : FLAG_UNRESTRICTED; - var value = this.consumeName(); - return { type: 5 /* HASH_TOKEN */, value: value, flags: flags }; - } - break; - case DOLLAR_SIGN: - if (this.peekCodePoint(0) === EQUALS_SIGN) { - this.consumeCodePoint(); - return SUFFIX_MATCH_TOKEN; - } - break; - case APOSTROPHE: - return this.consumeStringToken(APOSTROPHE); - case LEFT_PARENTHESIS: - return LEFT_PARENTHESIS_TOKEN; - case RIGHT_PARENTHESIS: - return RIGHT_PARENTHESIS_TOKEN; - case ASTERISK: - if (this.peekCodePoint(0) === EQUALS_SIGN) { - this.consumeCodePoint(); - return SUBSTRING_MATCH_TOKEN; - } - break; - case PLUS_SIGN: - if ( - isNumberStart( - codePoint, - this.peekCodePoint(0), - this.peekCodePoint(1) - ) - ) { - this.reconsumeCodePoint(codePoint); - return this.consumeNumericToken(); - } - break; - case COMMA: - return COMMA_TOKEN; - case HYPHEN_MINUS: - var e1 = codePoint; - var e2 = this.peekCodePoint(0); - var e3 = this.peekCodePoint(1); - if (isNumberStart(e1, e2, e3)) { - this.reconsumeCodePoint(codePoint); - return this.consumeNumericToken(); - } - if (isIdentifierStart(e1, e2, e3)) { - this.reconsumeCodePoint(codePoint); - return this.consumeIdentLikeToken(); - } - if (e2 === HYPHEN_MINUS && e3 === GREATER_THAN_SIGN) { - this.consumeCodePoint(); - this.consumeCodePoint(); - return CDC_TOKEN; - } - break; - case FULL_STOP: - if ( - isNumberStart( - codePoint, - this.peekCodePoint(0), - this.peekCodePoint(1) - ) - ) { - this.reconsumeCodePoint(codePoint); - return this.consumeNumericToken(); - } - break; - case SOLIDUS: - if (this.peekCodePoint(0) === ASTERISK) { - this.consumeCodePoint(); - while (true) { - var c = this.consumeCodePoint(); - if (c === ASTERISK) { - c = this.consumeCodePoint(); - if (c === SOLIDUS) { - return this.consumeToken(); - } - } - if (c === EOF) { - return this.consumeToken(); - } - } - } - break; - case COLON: - return COLON_TOKEN; - case SEMICOLON: - return SEMICOLON_TOKEN; - case LESS_THAN_SIGN: - if ( - this.peekCodePoint(0) === EXCLAMATION_MARK && - this.peekCodePoint(1) === HYPHEN_MINUS && - this.peekCodePoint(2) === HYPHEN_MINUS - ) { - this.consumeCodePoint(); - this.consumeCodePoint(); - return CDO_TOKEN; - } - break; - case COMMERCIAL_AT: - var a1 = this.peekCodePoint(0); - var a2 = this.peekCodePoint(1); - var a3 = this.peekCodePoint(2); - if (isIdentifierStart(a1, a2, a3)) { - var value = this.consumeName(); - return { type: 7 /* AT_KEYWORD_TOKEN */, value: value }; - } - break; - case LEFT_SQUARE_BRACKET: - return LEFT_SQUARE_BRACKET_TOKEN; - case REVERSE_SOLIDUS: - if (isValidEscape(codePoint, this.peekCodePoint(0))) { - this.reconsumeCodePoint(codePoint); - return this.consumeIdentLikeToken(); - } - break; - case RIGHT_SQUARE_BRACKET: - return RIGHT_SQUARE_BRACKET_TOKEN; - case CIRCUMFLEX_ACCENT: - if (this.peekCodePoint(0) === EQUALS_SIGN) { - this.consumeCodePoint(); - return PREFIX_MATCH_TOKEN; - } - break; - case LEFT_CURLY_BRACKET: - return LEFT_CURLY_BRACKET_TOKEN; - case RIGHT_CURLY_BRACKET: - return RIGHT_CURLY_BRACKET_TOKEN; - case u: - case U: - var u1 = this.peekCodePoint(0); - var u2 = this.peekCodePoint(1); - if (u1 === PLUS_SIGN && (isHex(u2) || u2 === QUESTION_MARK)) { - this.consumeCodePoint(); - this.consumeUnicodeRangeToken(); - } - this.reconsumeCodePoint(codePoint); - return this.consumeIdentLikeToken(); - case VERTICAL_LINE: - if (this.peekCodePoint(0) === EQUALS_SIGN) { - this.consumeCodePoint(); - return DASH_MATCH_TOKEN; - } - if (this.peekCodePoint(0) === VERTICAL_LINE) { - this.consumeCodePoint(); - return COLUMN_TOKEN; - } - break; - case TILDE: - if (this.peekCodePoint(0) === EQUALS_SIGN) { - this.consumeCodePoint(); - return INCLUDE_MATCH_TOKEN; - } - break; - case EOF: - return EOF_TOKEN; - } - if (isWhiteSpace(codePoint)) { - this.consumeWhiteSpace(); - return WHITESPACE_TOKEN; - } - if (isDigit(codePoint)) { - this.reconsumeCodePoint(codePoint); - return this.consumeNumericToken(); - } - if (isNameStartCodePoint(codePoint)) { - this.reconsumeCodePoint(codePoint); - return this.consumeIdentLikeToken(); - } - return { - type: 6 /* DELIM_TOKEN */, - value: fromCodePoint$1(codePoint), - }; - }; - Tokenizer.prototype.consumeCodePoint = function () { - var value = this._value.shift(); - return typeof value === "undefined" ? -1 : value; - }; - Tokenizer.prototype.reconsumeCodePoint = function (codePoint) { - this._value.unshift(codePoint); - }; - Tokenizer.prototype.peekCodePoint = function (delta) { - if (delta >= this._value.length) { - return -1; - } - return this._value[delta]; - }; - Tokenizer.prototype.consumeUnicodeRangeToken = function () { - var digits = []; - var codePoint = this.consumeCodePoint(); - while (isHex(codePoint) && digits.length < 6) { - digits.push(codePoint); - codePoint = this.consumeCodePoint(); - } - var questionMarks = false; - while (codePoint === QUESTION_MARK && digits.length < 6) { - digits.push(codePoint); - codePoint = this.consumeCodePoint(); - questionMarks = true; - } - if (questionMarks) { - var start_1 = parseInt( - fromCodePoint$1.apply( - void 0, - digits.map(function (digit) { - return digit === QUESTION_MARK ? ZERO : digit; - }) - ), - 16 - ); - var end = parseInt( - fromCodePoint$1.apply( - void 0, - digits.map(function (digit) { - return digit === QUESTION_MARK ? F : digit; - }) - ), - 16 - ); - return { - type: 30 /* UNICODE_RANGE_TOKEN */, - start: start_1, - end: end, - }; - } - var start = parseInt(fromCodePoint$1.apply(void 0, digits), 16); - if ( - this.peekCodePoint(0) === HYPHEN_MINUS && - isHex(this.peekCodePoint(1)) - ) { - this.consumeCodePoint(); - codePoint = this.consumeCodePoint(); - var endDigits = []; - while (isHex(codePoint) && endDigits.length < 6) { - endDigits.push(codePoint); - codePoint = this.consumeCodePoint(); - } - var end = parseInt(fromCodePoint$1.apply(void 0, endDigits), 16); - return { - type: 30 /* UNICODE_RANGE_TOKEN */, - start: start, - end: end, - }; - } else { - return { - type: 30 /* UNICODE_RANGE_TOKEN */, - start: start, - end: start, - }; - } - }; - Tokenizer.prototype.consumeIdentLikeToken = function () { - var value = this.consumeName(); - if ( - value.toLowerCase() === "url" && - this.peekCodePoint(0) === LEFT_PARENTHESIS - ) { - this.consumeCodePoint(); - return this.consumeUrlToken(); - } else if (this.peekCodePoint(0) === LEFT_PARENTHESIS) { - this.consumeCodePoint(); - return { type: 19 /* FUNCTION_TOKEN */, value: value }; - } - return { type: 20 /* IDENT_TOKEN */, value: value }; - }; - Tokenizer.prototype.consumeUrlToken = function () { - var value = []; - this.consumeWhiteSpace(); - if (this.peekCodePoint(0) === EOF) { - return { type: 22 /* URL_TOKEN */, value: "" }; - } - var next = this.peekCodePoint(0); - if (next === APOSTROPHE || next === QUOTATION_MARK) { - var stringToken = this.consumeStringToken(this.consumeCodePoint()); - if (stringToken.type === 0 /* STRING_TOKEN */) { - this.consumeWhiteSpace(); - if ( - this.peekCodePoint(0) === EOF || - this.peekCodePoint(0) === RIGHT_PARENTHESIS - ) { - this.consumeCodePoint(); - return { type: 22 /* URL_TOKEN */, value: stringToken.value }; - } - } - this.consumeBadUrlRemnants(); - return BAD_URL_TOKEN; - } - while (true) { - var codePoint = this.consumeCodePoint(); - if (codePoint === EOF || codePoint === RIGHT_PARENTHESIS) { - return { - type: 22 /* URL_TOKEN */, - value: fromCodePoint$1.apply(void 0, value), - }; - } else if (isWhiteSpace(codePoint)) { - this.consumeWhiteSpace(); - if ( - this.peekCodePoint(0) === EOF || - this.peekCodePoint(0) === RIGHT_PARENTHESIS - ) { - this.consumeCodePoint(); - return { - type: 22 /* URL_TOKEN */, - value: fromCodePoint$1.apply(void 0, value), - }; - } - this.consumeBadUrlRemnants(); - return BAD_URL_TOKEN; - } else if ( - codePoint === QUOTATION_MARK || - codePoint === APOSTROPHE || - codePoint === LEFT_PARENTHESIS || - isNonPrintableCodePoint(codePoint) - ) { - this.consumeBadUrlRemnants(); - return BAD_URL_TOKEN; - } else if (codePoint === REVERSE_SOLIDUS) { - if (isValidEscape(codePoint, this.peekCodePoint(0))) { - value.push(this.consumeEscapedCodePoint()); - } else { - this.consumeBadUrlRemnants(); - return BAD_URL_TOKEN; - } - } else { - value.push(codePoint); - } - } - }; - Tokenizer.prototype.consumeWhiteSpace = function () { - while (isWhiteSpace(this.peekCodePoint(0))) { - this.consumeCodePoint(); - } - }; - Tokenizer.prototype.consumeBadUrlRemnants = function () { - while (true) { - var codePoint = this.consumeCodePoint(); - if (codePoint === RIGHT_PARENTHESIS || codePoint === EOF) { - return; - } - if (isValidEscape(codePoint, this.peekCodePoint(0))) { - this.consumeEscapedCodePoint(); - } - } - }; - Tokenizer.prototype.consumeStringSlice = function (count) { - var SLICE_STACK_SIZE = 50000; - var value = ""; - while (count > 0) { - var amount = Math.min(SLICE_STACK_SIZE, count); - value += fromCodePoint$1.apply( - void 0, - this._value.splice(0, amount) - ); - count -= amount; - } - this._value.shift(); - return value; - }; - Tokenizer.prototype.consumeStringToken = function (endingCodePoint) { - var value = ""; - var i = 0; - do { - var codePoint = this._value[i]; - if ( - codePoint === EOF || - codePoint === undefined || - codePoint === endingCodePoint - ) { - value += this.consumeStringSlice(i); - return { type: 0 /* STRING_TOKEN */, value: value }; - } - if (codePoint === LINE_FEED) { - this._value.splice(0, i); - return BAD_STRING_TOKEN; - } - if (codePoint === REVERSE_SOLIDUS) { - var next = this._value[i + 1]; - if (next !== EOF && next !== undefined) { - if (next === LINE_FEED) { - value += this.consumeStringSlice(i); - i = -1; - this._value.shift(); - } else if (isValidEscape(codePoint, next)) { - value += this.consumeStringSlice(i); - value += fromCodePoint$1(this.consumeEscapedCodePoint()); - i = -1; - } - } - } - i++; - } while (true); - }; - Tokenizer.prototype.consumeNumber = function () { - var repr = []; - var type = FLAG_INTEGER; - var c1 = this.peekCodePoint(0); - if (c1 === PLUS_SIGN || c1 === HYPHEN_MINUS) { - repr.push(this.consumeCodePoint()); - } - while (isDigit(this.peekCodePoint(0))) { - repr.push(this.consumeCodePoint()); - } - c1 = this.peekCodePoint(0); - var c2 = this.peekCodePoint(1); - if (c1 === FULL_STOP && isDigit(c2)) { - repr.push(this.consumeCodePoint(), this.consumeCodePoint()); - type = FLAG_NUMBER; - while (isDigit(this.peekCodePoint(0))) { - repr.push(this.consumeCodePoint()); - } - } - c1 = this.peekCodePoint(0); - c2 = this.peekCodePoint(1); - var c3 = this.peekCodePoint(2); - if ( - (c1 === E || c1 === e) && - (((c2 === PLUS_SIGN || c2 === HYPHEN_MINUS) && isDigit(c3)) || - isDigit(c2)) - ) { - repr.push(this.consumeCodePoint(), this.consumeCodePoint()); - type = FLAG_NUMBER; - while (isDigit(this.peekCodePoint(0))) { - repr.push(this.consumeCodePoint()); - } - } - return [stringToNumber(repr), type]; - }; - Tokenizer.prototype.consumeNumericToken = function () { - var _a = this.consumeNumber(), - number = _a[0], - flags = _a[1]; - var c1 = this.peekCodePoint(0); - var c2 = this.peekCodePoint(1); - var c3 = this.peekCodePoint(2); - if (isIdentifierStart(c1, c2, c3)) { - var unit = this.consumeName(); - return { - type: 15 /* DIMENSION_TOKEN */, - number: number, - flags: flags, - unit: unit, - }; - } - if (c1 === PERCENTAGE_SIGN) { - this.consumeCodePoint(); - return { - type: 16 /* PERCENTAGE_TOKEN */, - number: number, - flags: flags, - }; - } - return { type: 17 /* NUMBER_TOKEN */, number: number, flags: flags }; - }; - Tokenizer.prototype.consumeEscapedCodePoint = function () { - var codePoint = this.consumeCodePoint(); - if (isHex(codePoint)) { - var hex = fromCodePoint$1(codePoint); - while (isHex(this.peekCodePoint(0)) && hex.length < 6) { - hex += fromCodePoint$1(this.consumeCodePoint()); - } - if (isWhiteSpace(this.peekCodePoint(0))) { - this.consumeCodePoint(); - } - var hexCodePoint = parseInt(hex, 16); - if ( - hexCodePoint === 0 || - isSurrogateCodePoint(hexCodePoint) || - hexCodePoint > 0x10ffff - ) { - return REPLACEMENT_CHARACTER; - } - return hexCodePoint; - } - if (codePoint === EOF) { - return REPLACEMENT_CHARACTER; - } - return codePoint; - }; - Tokenizer.prototype.consumeName = function () { - var result = ""; - while (true) { - var codePoint = this.consumeCodePoint(); - if (isNameCodePoint(codePoint)) { - result += fromCodePoint$1(codePoint); - } else if (isValidEscape(codePoint, this.peekCodePoint(0))) { - result += fromCodePoint$1(this.consumeEscapedCodePoint()); - } else { - this.reconsumeCodePoint(codePoint); - return result; - } - } - }; - return Tokenizer; - })(); - - var Parser = /** @class */ (function () { - function Parser(tokens) { - this._tokens = tokens; - } - Parser.create = function (value) { - var tokenizer = new Tokenizer(); - tokenizer.write(value); - return new Parser(tokenizer.read()); - }; - Parser.parseValue = function (value) { - return Parser.create(value).parseComponentValue(); - }; - Parser.parseValues = function (value) { - return Parser.create(value).parseComponentValues(); - }; - Parser.prototype.parseComponentValue = function () { - var token = this.consumeToken(); - while (token.type === 31 /* WHITESPACE_TOKEN */) { - token = this.consumeToken(); - } - if (token.type === 32 /* EOF_TOKEN */) { - throw new SyntaxError( - "Error parsing CSS component value, unexpected EOF" - ); - } - this.reconsumeToken(token); - var value = this.consumeComponentValue(); - do { - token = this.consumeToken(); - } while (token.type === 31 /* WHITESPACE_TOKEN */); - if (token.type === 32 /* EOF_TOKEN */) { - return value; - } - throw new SyntaxError( - "Error parsing CSS component value, multiple values found when expecting only one" - ); - }; - Parser.prototype.parseComponentValues = function () { - var values = []; - while (true) { - var value = this.consumeComponentValue(); - if (value.type === 32 /* EOF_TOKEN */) { - return values; - } - values.push(value); - values.push(); - } - }; - Parser.prototype.consumeComponentValue = function () { - var token = this.consumeToken(); - switch (token.type) { - case 11 /* LEFT_CURLY_BRACKET_TOKEN */: - case 28 /* LEFT_SQUARE_BRACKET_TOKEN */: - case 2 /* LEFT_PARENTHESIS_TOKEN */: - return this.consumeSimpleBlock(token.type); - case 19 /* FUNCTION_TOKEN */: - return this.consumeFunction(token); - } - return token; - }; - Parser.prototype.consumeSimpleBlock = function (type) { - var block = { type: type, values: [] }; - var token = this.consumeToken(); - while (true) { - if ( - token.type === 32 /* EOF_TOKEN */ || - isEndingTokenFor(token, type) - ) { - return block; - } - this.reconsumeToken(token); - block.values.push(this.consumeComponentValue()); - token = this.consumeToken(); - } - }; - Parser.prototype.consumeFunction = function (functionToken) { - var cssFunction = { - name: functionToken.value, - values: [], - type: 18 /* FUNCTION */, - }; - while (true) { - var token = this.consumeToken(); - if ( - token.type === 32 /* EOF_TOKEN */ || - token.type === 3 /* RIGHT_PARENTHESIS_TOKEN */ - ) { - return cssFunction; - } - this.reconsumeToken(token); - cssFunction.values.push(this.consumeComponentValue()); - } - }; - Parser.prototype.consumeToken = function () { - var token = this._tokens.shift(); - return typeof token === "undefined" ? EOF_TOKEN : token; - }; - Parser.prototype.reconsumeToken = function (token) { - this._tokens.unshift(token); - }; - return Parser; - })(); - var isDimensionToken = function (token) { - return token.type === 15 /* DIMENSION_TOKEN */; - }; - var isNumberToken = function (token) { - return token.type === 17 /* NUMBER_TOKEN */; - }; - var isIdentToken = function (token) { - return token.type === 20 /* IDENT_TOKEN */; - }; - var isStringToken = function (token) { - return token.type === 0 /* STRING_TOKEN */; - }; - var isIdentWithValue = function (token, value) { - return isIdentToken(token) && token.value === value; - }; - var nonWhiteSpace = function (token) { - return token.type !== 31 /* WHITESPACE_TOKEN */; - }; - var nonFunctionArgSeparator = function (token) { - return ( - token.type !== 31 /* WHITESPACE_TOKEN */ && - token.type !== 4 /* COMMA_TOKEN */ - ); - }; - var parseFunctionArgs = function (tokens) { - var args = []; - var arg = []; - tokens.forEach(function (token) { - if (token.type === 4 /* COMMA_TOKEN */) { - if (arg.length === 0) { - throw new Error( - "Error parsing function args, zero tokens for arg" - ); - } - args.push(arg); - arg = []; - return; - } - if (token.type !== 31 /* WHITESPACE_TOKEN */) { - arg.push(token); - } - }); - if (arg.length) { - args.push(arg); - } - return args; - }; - var isEndingTokenFor = function (token, type) { - if ( - type === 11 /* LEFT_CURLY_BRACKET_TOKEN */ && - token.type === 12 /* RIGHT_CURLY_BRACKET_TOKEN */ - ) { - return true; - } - if ( - type === 28 /* LEFT_SQUARE_BRACKET_TOKEN */ && - token.type === 29 /* RIGHT_SQUARE_BRACKET_TOKEN */ - ) { - return true; - } - return ( - type === 2 /* LEFT_PARENTHESIS_TOKEN */ && - token.type === 3 /* RIGHT_PARENTHESIS_TOKEN */ - ); - }; - - var isLength = function (token) { - return ( - token.type === 17 /* NUMBER_TOKEN */ || - token.type === 15 /* DIMENSION_TOKEN */ - ); - }; - - var isLengthPercentage = function (token) { - return token.type === 16 /* PERCENTAGE_TOKEN */ || isLength(token); - }; - var parseLengthPercentageTuple = function (tokens) { - return tokens.length > 1 ? [tokens[0], tokens[1]] : [tokens[0]]; - }; - var ZERO_LENGTH = { - type: 17 /* NUMBER_TOKEN */, - number: 0, - flags: FLAG_INTEGER, - }; - var FIFTY_PERCENT = { - type: 16 /* PERCENTAGE_TOKEN */, - number: 50, - flags: FLAG_INTEGER, - }; - var HUNDRED_PERCENT = { - type: 16 /* PERCENTAGE_TOKEN */, - number: 100, - flags: FLAG_INTEGER, - }; - var getAbsoluteValueForTuple = function (tuple, width, height) { - var x = tuple[0], - y = tuple[1]; - return [ - getAbsoluteValue(x, width), - getAbsoluteValue(typeof y !== "undefined" ? y : x, height), - ]; - }; - var getAbsoluteValue = function (token, parent) { - if (token.type === 16 /* PERCENTAGE_TOKEN */) { - return (token.number / 100) * parent; - } - if (isDimensionToken(token)) { - switch (token.unit) { - case "rem": - case "em": - return 16 * token.number; // TODO use correct font-size - case "px": - default: - return token.number; - } - } - return token.number; - }; - - var DEG = "deg"; - var GRAD = "grad"; - var RAD = "rad"; - var TURN = "turn"; - var angle = { - name: "angle", - parse: function (_context, value) { - if (value.type === 15 /* DIMENSION_TOKEN */) { - switch (value.unit) { - case DEG: - return (Math.PI * value.number) / 180; - case GRAD: - return (Math.PI / 200) * value.number; - case RAD: - return value.number; - case TURN: - return Math.PI * 2 * value.number; - } - } - throw new Error("Unsupported angle type"); - }, - }; - var isAngle = function (value) { - if (value.type === 15 /* DIMENSION_TOKEN */) { - if ( - value.unit === DEG || - value.unit === GRAD || - value.unit === RAD || - value.unit === TURN - ) { - return true; - } - } - return false; - }; - var parseNamedSide = function (tokens) { - var sideOrCorner = tokens - .filter(isIdentToken) - .map(function (ident) { - return ident.value; - }) - .join(" "); - switch (sideOrCorner) { - case "to bottom right": - case "to right bottom": - case "left top": - case "top left": - return [ZERO_LENGTH, ZERO_LENGTH]; - case "to top": - case "bottom": - return deg(0); - case "to bottom left": - case "to left bottom": - case "right top": - case "top right": - return [ZERO_LENGTH, HUNDRED_PERCENT]; - case "to right": - case "left": - return deg(90); - case "to top left": - case "to left top": - case "right bottom": - case "bottom right": - return [HUNDRED_PERCENT, HUNDRED_PERCENT]; - case "to bottom": - case "top": - return deg(180); - case "to top right": - case "to right top": - case "left bottom": - case "bottom left": - return [HUNDRED_PERCENT, ZERO_LENGTH]; - case "to left": - case "right": - return deg(270); - } - return 0; - }; - var deg = function (deg) { - return (Math.PI * deg) / 180; - }; - - var color$1 = { - name: "color", - parse: function (context, value) { - if (value.type === 18 /* FUNCTION */) { - var colorFunction = SUPPORTED_COLOR_FUNCTIONS[value.name]; - if (typeof colorFunction === "undefined") { - throw new Error( - 'Attempting to parse an unsupported color function "' + - value.name + - '"' - ); - } - return colorFunction(context, value.values); - } - if (value.type === 5 /* HASH_TOKEN */) { - if (value.value.length === 3) { - var r = value.value.substring(0, 1); - var g = value.value.substring(1, 2); - var b = value.value.substring(2, 3); - return pack( - parseInt(r + r, 16), - parseInt(g + g, 16), - parseInt(b + b, 16), - 1 - ); - } - if (value.value.length === 4) { - var r = value.value.substring(0, 1); - var g = value.value.substring(1, 2); - var b = value.value.substring(2, 3); - var a = value.value.substring(3, 4); - return pack( - parseInt(r + r, 16), - parseInt(g + g, 16), - parseInt(b + b, 16), - parseInt(a + a, 16) / 255 - ); - } - if (value.value.length === 6) { - var r = value.value.substring(0, 2); - var g = value.value.substring(2, 4); - var b = value.value.substring(4, 6); - return pack(parseInt(r, 16), parseInt(g, 16), parseInt(b, 16), 1); - } - if (value.value.length === 8) { - var r = value.value.substring(0, 2); - var g = value.value.substring(2, 4); - var b = value.value.substring(4, 6); - var a = value.value.substring(6, 8); - return pack( - parseInt(r, 16), - parseInt(g, 16), - parseInt(b, 16), - parseInt(a, 16) / 255 - ); - } - } - if (value.type === 20 /* IDENT_TOKEN */) { - var namedColor = COLORS[value.value.toUpperCase()]; - if (typeof namedColor !== "undefined") { - return namedColor; - } - } - return COLORS.TRANSPARENT; - }, - }; - var isTransparent = function (color) { - return (0xff & color) === 0; - }; - var asString = function (color) { - var alpha = 0xff & color; - var blue = 0xff & (color >> 8); - var green = 0xff & (color >> 16); - var red = 0xff & (color >> 24); - return alpha < 255 - ? "rgba(" + red + "," + green + "," + blue + "," + alpha / 255 + ")" - : "rgb(" + red + "," + green + "," + blue + ")"; - }; - var pack = function (r, g, b, a) { - return ( - ((r << 24) | (g << 16) | (b << 8) | (Math.round(a * 255) << 0)) >>> 0 - ); - }; - var getTokenColorValue = function (token, i) { - if (token.type === 17 /* NUMBER_TOKEN */) { - return token.number; - } - if (token.type === 16 /* PERCENTAGE_TOKEN */) { - var max = i === 3 ? 1 : 255; - return i === 3 - ? (token.number / 100) * max - : Math.round((token.number / 100) * max); - } - return 0; - }; - var rgb = function (_context, args) { - var tokens = args.filter(nonFunctionArgSeparator); - if (tokens.length === 3) { - var _a = tokens.map(getTokenColorValue), - r = _a[0], - g = _a[1], - b = _a[2]; - return pack(r, g, b, 1); - } - if (tokens.length === 4) { - var _b = tokens.map(getTokenColorValue), - r = _b[0], - g = _b[1], - b = _b[2], - a = _b[3]; - return pack(r, g, b, a); - } - return 0; - }; - function hue2rgb(t1, t2, hue) { - if (hue < 0) { - hue += 1; - } - if (hue >= 1) { - hue -= 1; - } - if (hue < 1 / 6) { - return (t2 - t1) * hue * 6 + t1; - } else if (hue < 1 / 2) { - return t2; - } else if (hue < 2 / 3) { - return (t2 - t1) * 6 * (2 / 3 - hue) + t1; - } else { - return t1; - } - } - var hsl = function (context, args) { - var tokens = args.filter(nonFunctionArgSeparator); - var hue = tokens[0], - saturation = tokens[1], - lightness = tokens[2], - alpha = tokens[3]; - var h = - (hue.type === 17 /* NUMBER_TOKEN */ - ? deg(hue.number) - : angle.parse(context, hue)) / - (Math.PI * 2); - var s = isLengthPercentage(saturation) ? saturation.number / 100 : 0; - var l = isLengthPercentage(lightness) ? lightness.number / 100 : 0; - var a = - typeof alpha !== "undefined" && isLengthPercentage(alpha) - ? getAbsoluteValue(alpha, 1) - : 1; - if (s === 0) { - return pack(l * 255, l * 255, l * 255, 1); - } - var t2 = l <= 0.5 ? l * (s + 1) : l + s - l * s; - var t1 = l * 2 - t2; - var r = hue2rgb(t1, t2, h + 1 / 3); - var g = hue2rgb(t1, t2, h); - var b = hue2rgb(t1, t2, h - 1 / 3); - return pack(r * 255, g * 255, b * 255, a); - }; - var SUPPORTED_COLOR_FUNCTIONS = { - hsl: hsl, - hsla: hsl, - rgb: rgb, - rgba: rgb, - }; - var parseColor = function (context, value) { - return color$1.parse( - context, - Parser.create(value).parseComponentValue() - ); - }; - var COLORS = { - ALICEBLUE: 0xf0f8ffff, - ANTIQUEWHITE: 0xfaebd7ff, - AQUA: 0x00ffffff, - AQUAMARINE: 0x7fffd4ff, - AZURE: 0xf0ffffff, - BEIGE: 0xf5f5dcff, - BISQUE: 0xffe4c4ff, - BLACK: 0x000000ff, - BLANCHEDALMOND: 0xffebcdff, - BLUE: 0x0000ffff, - BLUEVIOLET: 0x8a2be2ff, - BROWN: 0xa52a2aff, - BURLYWOOD: 0xdeb887ff, - CADETBLUE: 0x5f9ea0ff, - CHARTREUSE: 0x7fff00ff, - CHOCOLATE: 0xd2691eff, - CORAL: 0xff7f50ff, - CORNFLOWERBLUE: 0x6495edff, - CORNSILK: 0xfff8dcff, - CRIMSON: 0xdc143cff, - CYAN: 0x00ffffff, - DARKBLUE: 0x00008bff, - DARKCYAN: 0x008b8bff, - DARKGOLDENROD: 0xb886bbff, - DARKGRAY: 0xa9a9a9ff, - DARKGREEN: 0x006400ff, - DARKGREY: 0xa9a9a9ff, - DARKKHAKI: 0xbdb76bff, - DARKMAGENTA: 0x8b008bff, - DARKOLIVEGREEN: 0x556b2fff, - DARKORANGE: 0xff8c00ff, - DARKORCHID: 0x9932ccff, - DARKRED: 0x8b0000ff, - DARKSALMON: 0xe9967aff, - DARKSEAGREEN: 0x8fbc8fff, - DARKSLATEBLUE: 0x483d8bff, - DARKSLATEGRAY: 0x2f4f4fff, - DARKSLATEGREY: 0x2f4f4fff, - DARKTURQUOISE: 0x00ced1ff, - DARKVIOLET: 0x9400d3ff, - DEEPPINK: 0xff1493ff, - DEEPSKYBLUE: 0x00bfffff, - DIMGRAY: 0x696969ff, - DIMGREY: 0x696969ff, - DODGERBLUE: 0x1e90ffff, - FIREBRICK: 0xb22222ff, - FLORALWHITE: 0xfffaf0ff, - FORESTGREEN: 0x228b22ff, - FUCHSIA: 0xff00ffff, - GAINSBORO: 0xdcdcdcff, - GHOSTWHITE: 0xf8f8ffff, - GOLD: 0xffd700ff, - GOLDENROD: 0xdaa520ff, - GRAY: 0x808080ff, - GREEN: 0x008000ff, - GREENYELLOW: 0xadff2fff, - GREY: 0x808080ff, - HONEYDEW: 0xf0fff0ff, - HOTPINK: 0xff69b4ff, - INDIANRED: 0xcd5c5cff, - INDIGO: 0x4b0082ff, - IVORY: 0xfffff0ff, - KHAKI: 0xf0e68cff, - LAVENDER: 0xe6e6faff, - LAVENDERBLUSH: 0xfff0f5ff, - LAWNGREEN: 0x7cfc00ff, - LEMONCHIFFON: 0xfffacdff, - LIGHTBLUE: 0xadd8e6ff, - LIGHTCORAL: 0xf08080ff, - LIGHTCYAN: 0xe0ffffff, - LIGHTGOLDENRODYELLOW: 0xfafad2ff, - LIGHTGRAY: 0xd3d3d3ff, - LIGHTGREEN: 0x90ee90ff, - LIGHTGREY: 0xd3d3d3ff, - LIGHTPINK: 0xffb6c1ff, - LIGHTSALMON: 0xffa07aff, - LIGHTSEAGREEN: 0x20b2aaff, - LIGHTSKYBLUE: 0x87cefaff, - LIGHTSLATEGRAY: 0x778899ff, - LIGHTSLATEGREY: 0x778899ff, - LIGHTSTEELBLUE: 0xb0c4deff, - LIGHTYELLOW: 0xffffe0ff, - LIME: 0x00ff00ff, - LIMEGREEN: 0x32cd32ff, - LINEN: 0xfaf0e6ff, - MAGENTA: 0xff00ffff, - MAROON: 0x800000ff, - MEDIUMAQUAMARINE: 0x66cdaaff, - MEDIUMBLUE: 0x0000cdff, - MEDIUMORCHID: 0xba55d3ff, - MEDIUMPURPLE: 0x9370dbff, - MEDIUMSEAGREEN: 0x3cb371ff, - MEDIUMSLATEBLUE: 0x7b68eeff, - MEDIUMSPRINGGREEN: 0x00fa9aff, - MEDIUMTURQUOISE: 0x48d1ccff, - MEDIUMVIOLETRED: 0xc71585ff, - MIDNIGHTBLUE: 0x191970ff, - MINTCREAM: 0xf5fffaff, - MISTYROSE: 0xffe4e1ff, - MOCCASIN: 0xffe4b5ff, - NAVAJOWHITE: 0xffdeadff, - NAVY: 0x000080ff, - OLDLACE: 0xfdf5e6ff, - OLIVE: 0x808000ff, - OLIVEDRAB: 0x6b8e23ff, - ORANGE: 0xffa500ff, - ORANGERED: 0xff4500ff, - ORCHID: 0xda70d6ff, - PALEGOLDENROD: 0xeee8aaff, - PALEGREEN: 0x98fb98ff, - PALETURQUOISE: 0xafeeeeff, - PALEVIOLETRED: 0xdb7093ff, - PAPAYAWHIP: 0xffefd5ff, - PEACHPUFF: 0xffdab9ff, - PERU: 0xcd853fff, - PINK: 0xffc0cbff, - PLUM: 0xdda0ddff, - POWDERBLUE: 0xb0e0e6ff, - PURPLE: 0x800080ff, - REBECCAPURPLE: 0x663399ff, - RED: 0xff0000ff, - ROSYBROWN: 0xbc8f8fff, - ROYALBLUE: 0x4169e1ff, - SADDLEBROWN: 0x8b4513ff, - SALMON: 0xfa8072ff, - SANDYBROWN: 0xf4a460ff, - SEAGREEN: 0x2e8b57ff, - SEASHELL: 0xfff5eeff, - SIENNA: 0xa0522dff, - SILVER: 0xc0c0c0ff, - SKYBLUE: 0x87ceebff, - SLATEBLUE: 0x6a5acdff, - SLATEGRAY: 0x708090ff, - SLATEGREY: 0x708090ff, - SNOW: 0xfffafaff, - SPRINGGREEN: 0x00ff7fff, - STEELBLUE: 0x4682b4ff, - TAN: 0xd2b48cff, - TEAL: 0x008080ff, - THISTLE: 0xd8bfd8ff, - TOMATO: 0xff6347ff, - TRANSPARENT: 0x00000000, - TURQUOISE: 0x40e0d0ff, - VIOLET: 0xee82eeff, - WHEAT: 0xf5deb3ff, - WHITE: 0xffffffff, - WHITESMOKE: 0xf5f5f5ff, - YELLOW: 0xffff00ff, - YELLOWGREEN: 0x9acd32ff, - }; - - var backgroundClip = { - name: "background-clip", - initialValue: "border-box", - prefix: false, - type: 1 /* LIST */, - parse: function (_context, tokens) { - return tokens.map(function (token) { - if (isIdentToken(token)) { - switch (token.value) { - case "padding-box": - return 1 /* PADDING_BOX */; - case "content-box": - return 2 /* CONTENT_BOX */; - } - } - return 0 /* BORDER_BOX */; - }); - }, - }; - - var backgroundColor = { - name: "background-color", - initialValue: "transparent", - prefix: false, - type: 3 /* TYPE_VALUE */, - format: "color", - }; - - var parseColorStop = function (context, args) { - var color = color$1.parse(context, args[0]); - var stop = args[1]; - return stop && isLengthPercentage(stop) - ? { color: color, stop: stop } - : { color: color, stop: null }; - }; - var processColorStops = function (stops, lineLength) { - var first = stops[0]; - var last = stops[stops.length - 1]; - if (first.stop === null) { - first.stop = ZERO_LENGTH; - } - if (last.stop === null) { - last.stop = HUNDRED_PERCENT; - } - var processStops = []; - var previous = 0; - for (var i = 0; i < stops.length; i++) { - var stop_1 = stops[i].stop; - if (stop_1 !== null) { - var absoluteValue = getAbsoluteValue(stop_1, lineLength); - if (absoluteValue > previous) { - processStops.push(absoluteValue); - } else { - processStops.push(previous); - } - previous = absoluteValue; - } else { - processStops.push(null); - } - } - var gapBegin = null; - for (var i = 0; i < processStops.length; i++) { - var stop_2 = processStops[i]; - if (stop_2 === null) { - if (gapBegin === null) { - gapBegin = i; - } - } else if (gapBegin !== null) { - var gapLength = i - gapBegin; - var beforeGap = processStops[gapBegin - 1]; - var gapValue = (stop_2 - beforeGap) / (gapLength + 1); - for (var g = 1; g <= gapLength; g++) { - processStops[gapBegin + g - 1] = gapValue * g; - } - gapBegin = null; - } - } - return stops.map(function (_a, i) { - var color = _a.color; - return { - color: color, - stop: Math.max(Math.min(1, processStops[i] / lineLength), 0), - }; - }); - }; - var getAngleFromCorner = function (corner, width, height) { - var centerX = width / 2; - var centerY = height / 2; - var x = getAbsoluteValue(corner[0], width) - centerX; - var y = centerY - getAbsoluteValue(corner[1], height); - return (Math.atan2(y, x) + Math.PI * 2) % (Math.PI * 2); - }; - var calculateGradientDirection = function (angle, width, height) { - var radian = - typeof angle === "number" - ? angle - : getAngleFromCorner(angle, width, height); - var lineLength = - Math.abs(width * Math.sin(radian)) + - Math.abs(height * Math.cos(radian)); - var halfWidth = width / 2; - var halfHeight = height / 2; - var halfLineLength = lineLength / 2; - var yDiff = Math.sin(radian - Math.PI / 2) * halfLineLength; - var xDiff = Math.cos(radian - Math.PI / 2) * halfLineLength; - return [ - lineLength, - halfWidth - xDiff, - halfWidth + xDiff, - halfHeight - yDiff, - halfHeight + yDiff, - ]; - }; - var distance = function (a, b) { - return Math.sqrt(a * a + b * b); - }; - var findCorner = function (width, height, x, y, closest) { - var corners = [ - [0, 0], - [0, height], - [width, 0], - [width, height], - ]; - return corners.reduce( - function (stat, corner) { - var cx = corner[0], - cy = corner[1]; - var d = distance(x - cx, y - cy); - if (closest ? d < stat.optimumDistance : d > stat.optimumDistance) { - return { - optimumCorner: corner, - optimumDistance: d, - }; - } - return stat; - }, - { - optimumDistance: closest ? Infinity : -Infinity, - optimumCorner: null, - } - ).optimumCorner; - }; - var calculateRadius = function (gradient, x, y, width, height) { - var rx = 0; - var ry = 0; - switch (gradient.size) { - case 0 /* CLOSEST_SIDE */: - // The ending shape is sized so that that it exactly meets the side of the gradient box closest to the gradient’s center. - // If the shape is an ellipse, it exactly meets the closest side in each dimension. - if (gradient.shape === 0 /* CIRCLE */) { - rx = ry = Math.min( - Math.abs(x), - Math.abs(x - width), - Math.abs(y), - Math.abs(y - height) - ); - } else if (gradient.shape === 1 /* ELLIPSE */) { - rx = Math.min(Math.abs(x), Math.abs(x - width)); - ry = Math.min(Math.abs(y), Math.abs(y - height)); - } - break; - case 2 /* CLOSEST_CORNER */: - // The ending shape is sized so that that it passes through the corner of the gradient box closest to the gradient’s center. - // If the shape is an ellipse, the ending shape is given the same aspect-ratio it would have if closest-side were specified. - if (gradient.shape === 0 /* CIRCLE */) { - rx = ry = Math.min( - distance(x, y), - distance(x, y - height), - distance(x - width, y), - distance(x - width, y - height) - ); - } else if (gradient.shape === 1 /* ELLIPSE */) { - // Compute the ratio ry/rx (which is to be the same as for "closest-side") - var c = - Math.min(Math.abs(y), Math.abs(y - height)) / - Math.min(Math.abs(x), Math.abs(x - width)); - var _a = findCorner(width, height, x, y, true), - cx = _a[0], - cy = _a[1]; - rx = distance(cx - x, (cy - y) / c); - ry = c * rx; - } - break; - case 1 /* FARTHEST_SIDE */: - // Same as closest-side, except the ending shape is sized based on the farthest side(s) - if (gradient.shape === 0 /* CIRCLE */) { - rx = ry = Math.max( - Math.abs(x), - Math.abs(x - width), - Math.abs(y), - Math.abs(y - height) - ); - } else if (gradient.shape === 1 /* ELLIPSE */) { - rx = Math.max(Math.abs(x), Math.abs(x - width)); - ry = Math.max(Math.abs(y), Math.abs(y - height)); - } - break; - case 3 /* FARTHEST_CORNER */: - // Same as closest-corner, except the ending shape is sized based on the farthest corner. - // If the shape is an ellipse, the ending shape is given the same aspect ratio it would have if farthest-side were specified. - if (gradient.shape === 0 /* CIRCLE */) { - rx = ry = Math.max( - distance(x, y), - distance(x, y - height), - distance(x - width, y), - distance(x - width, y - height) - ); - } else if (gradient.shape === 1 /* ELLIPSE */) { - // Compute the ratio ry/rx (which is to be the same as for "farthest-side") - var c = - Math.max(Math.abs(y), Math.abs(y - height)) / - Math.max(Math.abs(x), Math.abs(x - width)); - var _b = findCorner(width, height, x, y, false), - cx = _b[0], - cy = _b[1]; - rx = distance(cx - x, (cy - y) / c); - ry = c * rx; - } - break; - } - if (Array.isArray(gradient.size)) { - rx = getAbsoluteValue(gradient.size[0], width); - ry = - gradient.size.length === 2 - ? getAbsoluteValue(gradient.size[1], height) - : rx; - } - return [rx, ry]; - }; - - var linearGradient = function (context, tokens) { - var angle$1 = deg(180); - var stops = []; - parseFunctionArgs(tokens).forEach(function (arg, i) { - if (i === 0) { - var firstToken = arg[0]; - if ( - firstToken.type === 20 /* IDENT_TOKEN */ && - firstToken.value === "to" - ) { - angle$1 = parseNamedSide(arg); - return; - } else if (isAngle(firstToken)) { - angle$1 = angle.parse(context, firstToken); - return; - } - } - var colorStop = parseColorStop(context, arg); - stops.push(colorStop); - }); - return { angle: angle$1, stops: stops, type: 1 /* LINEAR_GRADIENT */ }; - }; - - var prefixLinearGradient = function (context, tokens) { - var angle$1 = deg(180); - var stops = []; - parseFunctionArgs(tokens).forEach(function (arg, i) { - if (i === 0) { - var firstToken = arg[0]; - if ( - firstToken.type === 20 /* IDENT_TOKEN */ && - ["top", "left", "right", "bottom"].indexOf(firstToken.value) !== - -1 - ) { - angle$1 = parseNamedSide(arg); - return; - } else if (isAngle(firstToken)) { - angle$1 = - (angle.parse(context, firstToken) + deg(270)) % deg(360); - return; - } - } - var colorStop = parseColorStop(context, arg); - stops.push(colorStop); - }); - return { - angle: angle$1, - stops: stops, - type: 1 /* LINEAR_GRADIENT */, - }; - }; - - var webkitGradient = function (context, tokens) { - var angle = deg(180); - var stops = []; - var type = 1; /* LINEAR_GRADIENT */ - var shape = 0; /* CIRCLE */ - var size = 3; /* FARTHEST_CORNER */ - var position = []; - parseFunctionArgs(tokens).forEach(function (arg, i) { - var firstToken = arg[0]; - if (i === 0) { - if (isIdentToken(firstToken) && firstToken.value === "linear") { - type = 1 /* LINEAR_GRADIENT */; - return; - } else if ( - isIdentToken(firstToken) && - firstToken.value === "radial" - ) { - type = 2 /* RADIAL_GRADIENT */; - return; - } - } - if (firstToken.type === 18 /* FUNCTION */) { - if (firstToken.name === "from") { - var color = color$1.parse(context, firstToken.values[0]); - stops.push({ stop: ZERO_LENGTH, color: color }); - } else if (firstToken.name === "to") { - var color = color$1.parse(context, firstToken.values[0]); - stops.push({ stop: HUNDRED_PERCENT, color: color }); - } else if (firstToken.name === "color-stop") { - var values = firstToken.values.filter(nonFunctionArgSeparator); - if (values.length === 2) { - var color = color$1.parse(context, values[1]); - var stop_1 = values[0]; - if (isNumberToken(stop_1)) { - stops.push({ - stop: { - type: 16 /* PERCENTAGE_TOKEN */, - number: stop_1.number * 100, - flags: stop_1.flags, - }, - color: color, - }); - } - } - } - } - }); - return type === 1 /* LINEAR_GRADIENT */ - ? { - angle: (angle + deg(180)) % deg(360), - stops: stops, - type: type, - } - : { - size: size, - shape: shape, - stops: stops, - position: position, - type: type, - }; - }; - - var CLOSEST_SIDE = "closest-side"; - var FARTHEST_SIDE = "farthest-side"; - var CLOSEST_CORNER = "closest-corner"; - var FARTHEST_CORNER = "farthest-corner"; - var CIRCLE = "circle"; - var ELLIPSE = "ellipse"; - var COVER = "cover"; - var CONTAIN = "contain"; - var radialGradient = function (context, tokens) { - var shape = 0; /* CIRCLE */ - var size = 3; /* FARTHEST_CORNER */ - var stops = []; - var position = []; - parseFunctionArgs(tokens).forEach(function (arg, i) { - var isColorStop = true; - if (i === 0) { - var isAtPosition_1 = false; - isColorStop = arg.reduce(function (acc, token) { - if (isAtPosition_1) { - if (isIdentToken(token)) { - switch (token.value) { - case "center": - position.push(FIFTY_PERCENT); - return acc; - case "top": - case "left": - position.push(ZERO_LENGTH); - return acc; - case "right": - case "bottom": - position.push(HUNDRED_PERCENT); - return acc; - } - } else if (isLengthPercentage(token) || isLength(token)) { - position.push(token); - } - } else if (isIdentToken(token)) { - switch (token.value) { - case CIRCLE: - shape = 0 /* CIRCLE */; - return false; - case ELLIPSE: - shape = 1 /* ELLIPSE */; - return false; - case "at": - isAtPosition_1 = true; - return false; - case CLOSEST_SIDE: - size = 0 /* CLOSEST_SIDE */; - return false; - case COVER: - case FARTHEST_SIDE: - size = 1 /* FARTHEST_SIDE */; - return false; - case CONTAIN: - case CLOSEST_CORNER: - size = 2 /* CLOSEST_CORNER */; - return false; - case FARTHEST_CORNER: - size = 3 /* FARTHEST_CORNER */; - return false; - } - } else if (isLength(token) || isLengthPercentage(token)) { - if (!Array.isArray(size)) { - size = []; - } - size.push(token); - return false; - } - return acc; - }, isColorStop); - } - if (isColorStop) { - var colorStop = parseColorStop(context, arg); - stops.push(colorStop); - } - }); - return { - size: size, - shape: shape, - stops: stops, - position: position, - type: 2 /* RADIAL_GRADIENT */, - }; - }; - - var prefixRadialGradient = function (context, tokens) { - var shape = 0; /* CIRCLE */ - var size = 3; /* FARTHEST_CORNER */ - var stops = []; - var position = []; - parseFunctionArgs(tokens).forEach(function (arg, i) { - var isColorStop = true; - if (i === 0) { - isColorStop = arg.reduce(function (acc, token) { - if (isIdentToken(token)) { - switch (token.value) { - case "center": - position.push(FIFTY_PERCENT); - return false; - case "top": - case "left": - position.push(ZERO_LENGTH); - return false; - case "right": - case "bottom": - position.push(HUNDRED_PERCENT); - return false; - } - } else if (isLengthPercentage(token) || isLength(token)) { - position.push(token); - return false; - } - return acc; - }, isColorStop); - } else if (i === 1) { - isColorStop = arg.reduce(function (acc, token) { - if (isIdentToken(token)) { - switch (token.value) { - case CIRCLE: - shape = 0 /* CIRCLE */; - return false; - case ELLIPSE: - shape = 1 /* ELLIPSE */; - return false; - case CONTAIN: - case CLOSEST_SIDE: - size = 0 /* CLOSEST_SIDE */; - return false; - case FARTHEST_SIDE: - size = 1 /* FARTHEST_SIDE */; - return false; - case CLOSEST_CORNER: - size = 2 /* CLOSEST_CORNER */; - return false; - case COVER: - case FARTHEST_CORNER: - size = 3 /* FARTHEST_CORNER */; - return false; - } - } else if (isLength(token) || isLengthPercentage(token)) { - if (!Array.isArray(size)) { - size = []; - } - size.push(token); - return false; - } - return acc; - }, isColorStop); - } - if (isColorStop) { - var colorStop = parseColorStop(context, arg); - stops.push(colorStop); - } - }); - return { - size: size, - shape: shape, - stops: stops, - position: position, - type: 2 /* RADIAL_GRADIENT */, - }; - }; - - var isLinearGradient = function (background) { - return background.type === 1 /* LINEAR_GRADIENT */; - }; - var isRadialGradient = function (background) { - return background.type === 2 /* RADIAL_GRADIENT */; - }; - var image = { - name: "image", - parse: function (context, value) { - if (value.type === 22 /* URL_TOKEN */) { - var image_1 = { url: value.value, type: 0 /* URL */ }; - context.cache.addImage(value.value); - return image_1; - } - if (value.type === 18 /* FUNCTION */) { - var imageFunction = SUPPORTED_IMAGE_FUNCTIONS[value.name]; - if (typeof imageFunction === "undefined") { - throw new Error( - 'Attempting to parse an unsupported image function "' + - value.name + - '"' - ); - } - return imageFunction(context, value.values); - } - throw new Error("Unsupported image type " + value.type); - }, - }; - function isSupportedImage(value) { - return ( - !(value.type === 20 /* IDENT_TOKEN */ && value.value === "none") && - (value.type !== 18 /* FUNCTION */ || - !!SUPPORTED_IMAGE_FUNCTIONS[value.name]) - ); - } - var SUPPORTED_IMAGE_FUNCTIONS = { - "linear-gradient": linearGradient, - "-moz-linear-gradient": prefixLinearGradient, - "-ms-linear-gradient": prefixLinearGradient, - "-o-linear-gradient": prefixLinearGradient, - "-webkit-linear-gradient": prefixLinearGradient, - "radial-gradient": radialGradient, - "-moz-radial-gradient": prefixRadialGradient, - "-ms-radial-gradient": prefixRadialGradient, - "-o-radial-gradient": prefixRadialGradient, - "-webkit-radial-gradient": prefixRadialGradient, - "-webkit-gradient": webkitGradient, - }; - - var backgroundImage = { - name: "background-image", - initialValue: "none", - type: 1 /* LIST */, - prefix: false, - parse: function (context, tokens) { - if (tokens.length === 0) { - return []; - } - var first = tokens[0]; - if (first.type === 20 /* IDENT_TOKEN */ && first.value === "none") { - return []; - } - return tokens - .filter(function (value) { - return nonFunctionArgSeparator(value) && isSupportedImage(value); - }) - .map(function (value) { - return image.parse(context, value); - }); - }, - }; - - var backgroundOrigin = { - name: "background-origin", - initialValue: "border-box", - prefix: false, - type: 1 /* LIST */, - parse: function (_context, tokens) { - return tokens.map(function (token) { - if (isIdentToken(token)) { - switch (token.value) { - case "padding-box": - return 1 /* PADDING_BOX */; - case "content-box": - return 2 /* CONTENT_BOX */; - } - } - return 0 /* BORDER_BOX */; - }); - }, - }; - - var backgroundPosition = { - name: "background-position", - initialValue: "0% 0%", - type: 1 /* LIST */, - prefix: false, - parse: function (_context, tokens) { - return parseFunctionArgs(tokens) - .map(function (values) { - return values.filter(isLengthPercentage); - }) - .map(parseLengthPercentageTuple); - }, - }; - - var backgroundRepeat = { - name: "background-repeat", - initialValue: "repeat", - prefix: false, - type: 1 /* LIST */, - parse: function (_context, tokens) { - return parseFunctionArgs(tokens) - .map(function (values) { - return values - .filter(isIdentToken) - .map(function (token) { - return token.value; - }) - .join(" "); - }) - .map(parseBackgroundRepeat); - }, - }; - var parseBackgroundRepeat = function (value) { - switch (value) { - case "no-repeat": - return 1 /* NO_REPEAT */; - case "repeat-x": - case "repeat no-repeat": - return 2 /* REPEAT_X */; - case "repeat-y": - case "no-repeat repeat": - return 3 /* REPEAT_Y */; - case "repeat": - default: - return 0 /* REPEAT */; - } - }; - - var BACKGROUND_SIZE; - (function (BACKGROUND_SIZE) { - BACKGROUND_SIZE["AUTO"] = "auto"; - BACKGROUND_SIZE["CONTAIN"] = "contain"; - BACKGROUND_SIZE["COVER"] = "cover"; - })(BACKGROUND_SIZE || (BACKGROUND_SIZE = {})); - var backgroundSize = { - name: "background-size", - initialValue: "0", - prefix: false, - type: 1 /* LIST */, - parse: function (_context, tokens) { - return parseFunctionArgs(tokens).map(function (values) { - return values.filter(isBackgroundSizeInfoToken); - }); - }, - }; - var isBackgroundSizeInfoToken = function (value) { - return isIdentToken(value) || isLengthPercentage(value); - }; - - var borderColorForSide = function (side) { - return { - name: "border-" + side + "-color", - initialValue: "transparent", - prefix: false, - type: 3 /* TYPE_VALUE */, - format: "color", - }; - }; - var borderTopColor = borderColorForSide("top"); - var borderRightColor = borderColorForSide("right"); - var borderBottomColor = borderColorForSide("bottom"); - var borderLeftColor = borderColorForSide("left"); - - var borderRadiusForSide = function (side) { - return { - name: "border-radius-" + side, - initialValue: "0 0", - prefix: false, - type: 1 /* LIST */, - parse: function (_context, tokens) { - return parseLengthPercentageTuple( - tokens.filter(isLengthPercentage) - ); - }, - }; - }; - var borderTopLeftRadius = borderRadiusForSide("top-left"); - var borderTopRightRadius = borderRadiusForSide("top-right"); - var borderBottomRightRadius = borderRadiusForSide("bottom-right"); - var borderBottomLeftRadius = borderRadiusForSide("bottom-left"); - - var borderStyleForSide = function (side) { - return { - name: "border-" + side + "-style", - initialValue: "solid", - prefix: false, - type: 2 /* IDENT_VALUE */, - parse: function (_context, style) { - switch (style) { - case "none": - return 0 /* NONE */; - case "dashed": - return 2 /* DASHED */; - case "dotted": - return 3 /* DOTTED */; - case "double": - return 4 /* DOUBLE */; - } - return 1 /* SOLID */; - }, - }; - }; - var borderTopStyle = borderStyleForSide("top"); - var borderRightStyle = borderStyleForSide("right"); - var borderBottomStyle = borderStyleForSide("bottom"); - var borderLeftStyle = borderStyleForSide("left"); - - var borderWidthForSide = function (side) { - return { - name: "border-" + side + "-width", - initialValue: "0", - type: 0 /* VALUE */, - prefix: false, - parse: function (_context, token) { - if (isDimensionToken(token)) { - return token.number; - } - return 0; - }, - }; - }; - var borderTopWidth = borderWidthForSide("top"); - var borderRightWidth = borderWidthForSide("right"); - var borderBottomWidth = borderWidthForSide("bottom"); - var borderLeftWidth = borderWidthForSide("left"); - - var color = { - name: "color", - initialValue: "transparent", - prefix: false, - type: 3 /* TYPE_VALUE */, - format: "color", - }; - - var direction = { - name: "direction", - initialValue: "ltr", - prefix: false, - type: 2 /* IDENT_VALUE */, - parse: function (_context, direction) { - switch (direction) { - case "rtl": - return 1 /* RTL */; - case "ltr": - default: - return 0 /* LTR */; - } - }, - }; - - var display = { - name: "display", - initialValue: "inline-block", - prefix: false, - type: 1 /* LIST */, - parse: function (_context, tokens) { - return tokens.filter(isIdentToken).reduce(function (bit, token) { - return bit | parseDisplayValue(token.value); - }, 0 /* NONE */); - }, - }; - var parseDisplayValue = function (display) { - switch (display) { - case "block": - case "-webkit-box": - return 2 /* BLOCK */; - case "inline": - return 4 /* INLINE */; - case "run-in": - return 8 /* RUN_IN */; - case "flow": - return 16 /* FLOW */; - case "flow-root": - return 32 /* FLOW_ROOT */; - case "table": - return 64 /* TABLE */; - case "flex": - case "-webkit-flex": - return 128 /* FLEX */; - case "grid": - case "-ms-grid": - return 256 /* GRID */; - case "ruby": - return 512 /* RUBY */; - case "subgrid": - return 1024 /* SUBGRID */; - case "list-item": - return 2048 /* LIST_ITEM */; - case "table-row-group": - return 4096 /* TABLE_ROW_GROUP */; - case "table-header-group": - return 8192 /* TABLE_HEADER_GROUP */; - case "table-footer-group": - return 16384 /* TABLE_FOOTER_GROUP */; - case "table-row": - return 32768 /* TABLE_ROW */; - case "table-cell": - return 65536 /* TABLE_CELL */; - case "table-column-group": - return 131072 /* TABLE_COLUMN_GROUP */; - case "table-column": - return 262144 /* TABLE_COLUMN */; - case "table-caption": - return 524288 /* TABLE_CAPTION */; - case "ruby-base": - return 1048576 /* RUBY_BASE */; - case "ruby-text": - return 2097152 /* RUBY_TEXT */; - case "ruby-base-container": - return 4194304 /* RUBY_BASE_CONTAINER */; - case "ruby-text-container": - return 8388608 /* RUBY_TEXT_CONTAINER */; - case "contents": - return 16777216 /* CONTENTS */; - case "inline-block": - return 33554432 /* INLINE_BLOCK */; - case "inline-list-item": - return 67108864 /* INLINE_LIST_ITEM */; - case "inline-table": - return 134217728 /* INLINE_TABLE */; - case "inline-flex": - return 268435456 /* INLINE_FLEX */; - case "inline-grid": - return 536870912 /* INLINE_GRID */; - } - return 0 /* NONE */; - }; - - var float = { - name: "float", - initialValue: "none", - prefix: false, - type: 2 /* IDENT_VALUE */, - parse: function (_context, float) { - switch (float) { - case "left": - return 1 /* LEFT */; - case "right": - return 2 /* RIGHT */; - case "inline-start": - return 3 /* INLINE_START */; - case "inline-end": - return 4 /* INLINE_END */; - } - return 0 /* NONE */; - }, - }; - - var letterSpacing = { - name: "letter-spacing", - initialValue: "0", - prefix: false, - type: 0 /* VALUE */, - parse: function (_context, token) { - if (token.type === 20 /* IDENT_TOKEN */ && token.value === "normal") { - return 0; - } - if (token.type === 17 /* NUMBER_TOKEN */) { - return token.number; - } - if (token.type === 15 /* DIMENSION_TOKEN */) { - return token.number; - } - return 0; - }, - }; - - var LINE_BREAK; - (function (LINE_BREAK) { - LINE_BREAK["NORMAL"] = "normal"; - LINE_BREAK["STRICT"] = "strict"; - })(LINE_BREAK || (LINE_BREAK = {})); - var lineBreak = { - name: "line-break", - initialValue: "normal", - prefix: false, - type: 2 /* IDENT_VALUE */, - parse: function (_context, lineBreak) { - switch (lineBreak) { - case "strict": - return LINE_BREAK.STRICT; - case "normal": - default: - return LINE_BREAK.NORMAL; - } - }, - }; - - var lineHeight = { - name: "line-height", - initialValue: "normal", - prefix: false, - type: 4 /* TOKEN_VALUE */, - }; - var computeLineHeight = function (token, fontSize) { - if (isIdentToken(token) && token.value === "normal") { - return 1.2 * fontSize; - } else if (token.type === 17 /* NUMBER_TOKEN */) { - return fontSize * token.number; - } else if (isLengthPercentage(token)) { - return getAbsoluteValue(token, fontSize); - } - return fontSize; - }; - - var listStyleImage = { - name: "list-style-image", - initialValue: "none", - type: 0 /* VALUE */, - prefix: false, - parse: function (context, token) { - if (token.type === 20 /* IDENT_TOKEN */ && token.value === "none") { - return null; - } - return image.parse(context, token); - }, - }; - - var listStylePosition = { - name: "list-style-position", - initialValue: "outside", - prefix: false, - type: 2 /* IDENT_VALUE */, - parse: function (_context, position) { - switch (position) { - case "inside": - return 0 /* INSIDE */; - case "outside": - default: - return 1 /* OUTSIDE */; - } - }, - }; - - var listStyleType = { - name: "list-style-type", - initialValue: "none", - prefix: false, - type: 2 /* IDENT_VALUE */, - parse: function (_context, type) { - switch (type) { - case "disc": - return 0 /* DISC */; - case "circle": - return 1 /* CIRCLE */; - case "square": - return 2 /* SQUARE */; - case "decimal": - return 3 /* DECIMAL */; - case "cjk-decimal": - return 4 /* CJK_DECIMAL */; - case "decimal-leading-zero": - return 5 /* DECIMAL_LEADING_ZERO */; - case "lower-roman": - return 6 /* LOWER_ROMAN */; - case "upper-roman": - return 7 /* UPPER_ROMAN */; - case "lower-greek": - return 8 /* LOWER_GREEK */; - case "lower-alpha": - return 9 /* LOWER_ALPHA */; - case "upper-alpha": - return 10 /* UPPER_ALPHA */; - case "arabic-indic": - return 11 /* ARABIC_INDIC */; - case "armenian": - return 12 /* ARMENIAN */; - case "bengali": - return 13 /* BENGALI */; - case "cambodian": - return 14 /* CAMBODIAN */; - case "cjk-earthly-branch": - return 15 /* CJK_EARTHLY_BRANCH */; - case "cjk-heavenly-stem": - return 16 /* CJK_HEAVENLY_STEM */; - case "cjk-ideographic": - return 17 /* CJK_IDEOGRAPHIC */; - case "devanagari": - return 18 /* DEVANAGARI */; - case "ethiopic-numeric": - return 19 /* ETHIOPIC_NUMERIC */; - case "georgian": - return 20 /* GEORGIAN */; - case "gujarati": - return 21 /* GUJARATI */; - case "gurmukhi": - return 22 /* GURMUKHI */; - case "hebrew": - return 22 /* HEBREW */; - case "hiragana": - return 23 /* HIRAGANA */; - case "hiragana-iroha": - return 24 /* HIRAGANA_IROHA */; - case "japanese-formal": - return 25 /* JAPANESE_FORMAL */; - case "japanese-informal": - return 26 /* JAPANESE_INFORMAL */; - case "kannada": - return 27 /* KANNADA */; - case "katakana": - return 28 /* KATAKANA */; - case "katakana-iroha": - return 29 /* KATAKANA_IROHA */; - case "khmer": - return 30 /* KHMER */; - case "korean-hangul-formal": - return 31 /* KOREAN_HANGUL_FORMAL */; - case "korean-hanja-formal": - return 32 /* KOREAN_HANJA_FORMAL */; - case "korean-hanja-informal": - return 33 /* KOREAN_HANJA_INFORMAL */; - case "lao": - return 34 /* LAO */; - case "lower-armenian": - return 35 /* LOWER_ARMENIAN */; - case "malayalam": - return 36 /* MALAYALAM */; - case "mongolian": - return 37 /* MONGOLIAN */; - case "myanmar": - return 38 /* MYANMAR */; - case "oriya": - return 39 /* ORIYA */; - case "persian": - return 40 /* PERSIAN */; - case "simp-chinese-formal": - return 41 /* SIMP_CHINESE_FORMAL */; - case "simp-chinese-informal": - return 42 /* SIMP_CHINESE_INFORMAL */; - case "tamil": - return 43 /* TAMIL */; - case "telugu": - return 44 /* TELUGU */; - case "thai": - return 45 /* THAI */; - case "tibetan": - return 46 /* TIBETAN */; - case "trad-chinese-formal": - return 47 /* TRAD_CHINESE_FORMAL */; - case "trad-chinese-informal": - return 48 /* TRAD_CHINESE_INFORMAL */; - case "upper-armenian": - return 49 /* UPPER_ARMENIAN */; - case "disclosure-open": - return 50 /* DISCLOSURE_OPEN */; - case "disclosure-closed": - return 51 /* DISCLOSURE_CLOSED */; - case "none": - default: - return -1 /* NONE */; - } - }, - }; - - var marginForSide = function (side) { - return { - name: "margin-" + side, - initialValue: "0", - prefix: false, - type: 4 /* TOKEN_VALUE */, - }; - }; - var marginTop = marginForSide("top"); - var marginRight = marginForSide("right"); - var marginBottom = marginForSide("bottom"); - var marginLeft = marginForSide("left"); - - var overflow = { - name: "overflow", - initialValue: "visible", - prefix: false, - type: 1 /* LIST */, - parse: function (_context, tokens) { - return tokens.filter(isIdentToken).map(function (overflow) { - switch (overflow.value) { - case "hidden": - return 1 /* HIDDEN */; - case "scroll": - return 2 /* SCROLL */; - case "clip": - return 3 /* CLIP */; - case "auto": - return 4 /* AUTO */; - case "visible": - default: - return 0 /* VISIBLE */; - } - }); - }, - }; - - var overflowWrap = { - name: "overflow-wrap", - initialValue: "normal", - prefix: false, - type: 2 /* IDENT_VALUE */, - parse: function (_context, overflow) { - switch (overflow) { - case "break-word": - return "break-word" /* BREAK_WORD */; - case "normal": - default: - return "normal" /* NORMAL */; - } - }, - }; - - var paddingForSide = function (side) { - return { - name: "padding-" + side, - initialValue: "0", - prefix: false, - type: 3 /* TYPE_VALUE */, - format: "length-percentage", - }; - }; - var paddingTop = paddingForSide("top"); - var paddingRight = paddingForSide("right"); - var paddingBottom = paddingForSide("bottom"); - var paddingLeft = paddingForSide("left"); - - var textAlign = { - name: "text-align", - initialValue: "left", - prefix: false, - type: 2 /* IDENT_VALUE */, - parse: function (_context, textAlign) { - switch (textAlign) { - case "right": - return 2 /* RIGHT */; - case "center": - case "justify": - return 1 /* CENTER */; - case "left": - default: - return 0 /* LEFT */; - } - }, - }; - - var position = { - name: "position", - initialValue: "static", - prefix: false, - type: 2 /* IDENT_VALUE */, - parse: function (_context, position) { - switch (position) { - case "relative": - return 1 /* RELATIVE */; - case "absolute": - return 2 /* ABSOLUTE */; - case "fixed": - return 3 /* FIXED */; - case "sticky": - return 4 /* STICKY */; - } - return 0 /* STATIC */; - }, - }; - - var textShadow = { - name: "text-shadow", - initialValue: "none", - type: 1 /* LIST */, - prefix: false, - parse: function (context, tokens) { - if (tokens.length === 1 && isIdentWithValue(tokens[0], "none")) { - return []; - } - return parseFunctionArgs(tokens).map(function (values) { - var shadow = { - color: COLORS.TRANSPARENT, - offsetX: ZERO_LENGTH, - offsetY: ZERO_LENGTH, - blur: ZERO_LENGTH, - }; - var c = 0; - for (var i = 0; i < values.length; i++) { - var token = values[i]; - if (isLength(token)) { - if (c === 0) { - shadow.offsetX = token; - } else if (c === 1) { - shadow.offsetY = token; - } else { - shadow.blur = token; - } - c++; - } else { - shadow.color = color$1.parse(context, token); - } - } - return shadow; - }); - }, - }; - - var textTransform = { - name: "text-transform", - initialValue: "none", - prefix: false, - type: 2 /* IDENT_VALUE */, - parse: function (_context, textTransform) { - switch (textTransform) { - case "uppercase": - return 2 /* UPPERCASE */; - case "lowercase": - return 1 /* LOWERCASE */; - case "capitalize": - return 3 /* CAPITALIZE */; - } - return 0 /* NONE */; - }, - }; - - var transform$1 = { - name: "transform", - initialValue: "none", - prefix: true, - type: 0 /* VALUE */, - parse: function (_context, token) { - if (token.type === 20 /* IDENT_TOKEN */ && token.value === "none") { - return null; - } - if (token.type === 18 /* FUNCTION */) { - var transformFunction = SUPPORTED_TRANSFORM_FUNCTIONS[token.name]; - if (typeof transformFunction === "undefined") { - throw new Error( - 'Attempting to parse an unsupported transform function "' + - token.name + - '"' - ); - } - return transformFunction(token.values); - } - return null; - }, - }; - var matrix = function (args) { - var values = args - .filter(function (arg) { - return arg.type === 17 /* NUMBER_TOKEN */; - }) - .map(function (arg) { - return arg.number; - }); - return values.length === 6 ? values : null; - }; - // doesn't support 3D transforms at the moment - var matrix3d = function (args) { - var values = args - .filter(function (arg) { - return arg.type === 17 /* NUMBER_TOKEN */; - }) - .map(function (arg) { - return arg.number; - }); - var a1 = values[0], - b1 = values[1]; - values[2]; - values[3]; - var a2 = values[4], - b2 = values[5]; - values[6]; - values[7]; - values[8]; - values[9]; - values[10]; - values[11]; - var a4 = values[12], - b4 = values[13]; - values[14]; - values[15]; - return values.length === 16 ? [a1, b1, a2, b2, a4, b4] : null; - }; - var SUPPORTED_TRANSFORM_FUNCTIONS = { - matrix: matrix, - matrix3d: matrix3d, - }; - - var DEFAULT_VALUE = { - type: 16 /* PERCENTAGE_TOKEN */, - number: 50, - flags: FLAG_INTEGER, - }; - var DEFAULT = [DEFAULT_VALUE, DEFAULT_VALUE]; - var transformOrigin = { - name: "transform-origin", - initialValue: "50% 50%", - prefix: true, - type: 1 /* LIST */, - parse: function (_context, tokens) { - var origins = tokens.filter(isLengthPercentage); - if (origins.length !== 2) { - return DEFAULT; - } - return [origins[0], origins[1]]; - }, - }; - - var visibility = { - name: "visible", - initialValue: "none", - prefix: false, - type: 2 /* IDENT_VALUE */, - parse: function (_context, visibility) { - switch (visibility) { - case "hidden": - return 1 /* HIDDEN */; - case "collapse": - return 2 /* COLLAPSE */; - case "visible": - default: - return 0 /* VISIBLE */; - } - }, - }; - - var WORD_BREAK; - (function (WORD_BREAK) { - WORD_BREAK["NORMAL"] = "normal"; - WORD_BREAK["BREAK_ALL"] = "break-all"; - WORD_BREAK["KEEP_ALL"] = "keep-all"; - })(WORD_BREAK || (WORD_BREAK = {})); - var wordBreak = { - name: "word-break", - initialValue: "normal", - prefix: false, - type: 2 /* IDENT_VALUE */, - parse: function (_context, wordBreak) { - switch (wordBreak) { - case "break-all": - return WORD_BREAK.BREAK_ALL; - case "keep-all": - return WORD_BREAK.KEEP_ALL; - case "normal": - default: - return WORD_BREAK.NORMAL; - } - }, - }; - - var zIndex = { - name: "z-index", - initialValue: "auto", - prefix: false, - type: 0 /* VALUE */, - parse: function (_context, token) { - if (token.type === 20 /* IDENT_TOKEN */) { - return { auto: true, order: 0 }; - } - if (isNumberToken(token)) { - return { auto: false, order: token.number }; - } - throw new Error("Invalid z-index number parsed"); - }, - }; - - var time = { - name: "time", - parse: function (_context, value) { - if (value.type === 15 /* DIMENSION_TOKEN */) { - switch (value.unit.toLowerCase()) { - case "s": - return 1000 * value.number; - case "ms": - return value.number; - } - } - throw new Error("Unsupported time type"); - }, - }; - - var opacity = { - name: "opacity", - initialValue: "1", - type: 0 /* VALUE */, - prefix: false, - parse: function (_context, token) { - if (isNumberToken(token)) { - return token.number; - } - return 1; - }, - }; - - var textDecorationColor = { - name: "text-decoration-color", - initialValue: "transparent", - prefix: false, - type: 3 /* TYPE_VALUE */, - format: "color", - }; - - var textDecorationLine = { - name: "text-decoration-line", - initialValue: "none", - prefix: false, - type: 1 /* LIST */, - parse: function (_context, tokens) { - return tokens - .filter(isIdentToken) - .map(function (token) { - switch (token.value) { - case "underline": - return 1 /* UNDERLINE */; - case "overline": - return 2 /* OVERLINE */; - case "line-through": - return 3 /* LINE_THROUGH */; - case "none": - return 4 /* BLINK */; - } - return 0 /* NONE */; - }) - .filter(function (line) { - return line !== 0 /* NONE */; - }); - }, - }; - - var fontFamily = { - name: "font-family", - initialValue: "", - prefix: false, - type: 1 /* LIST */, - parse: function (_context, tokens) { - var accumulator = []; - var results = []; - tokens.forEach(function (token) { - switch (token.type) { - case 20 /* IDENT_TOKEN */: - case 0 /* STRING_TOKEN */: - accumulator.push(token.value); - break; - case 17 /* NUMBER_TOKEN */: - accumulator.push(token.number.toString()); - break; - case 4 /* COMMA_TOKEN */: - results.push(accumulator.join(" ")); - accumulator.length = 0; - break; - } - }); - if (accumulator.length) { - results.push(accumulator.join(" ")); - } - return results.map(function (result) { - return result.indexOf(" ") === -1 ? result : "'" + result + "'"; - }); - }, - }; - - var fontSize = { - name: "font-size", - initialValue: "0", - prefix: false, - type: 3 /* TYPE_VALUE */, - format: "length", - }; - - var fontWeight = { - name: "font-weight", - initialValue: "normal", - type: 0 /* VALUE */, - prefix: false, - parse: function (_context, token) { - if (isNumberToken(token)) { - return token.number; - } - if (isIdentToken(token)) { - switch (token.value) { - case "bold": - return 700; - case "normal": - default: - return 400; - } - } - return 400; - }, - }; - - var fontVariant = { - name: "font-variant", - initialValue: "none", - type: 1 /* LIST */, - prefix: false, - parse: function (_context, tokens) { - return tokens.filter(isIdentToken).map(function (token) { - return token.value; - }); - }, - }; - - var fontStyle = { - name: "font-style", - initialValue: "normal", - prefix: false, - type: 2 /* IDENT_VALUE */, - parse: function (_context, overflow) { - switch (overflow) { - case "oblique": - return "oblique" /* OBLIQUE */; - case "italic": - return "italic" /* ITALIC */; - case "normal": - default: - return "normal" /* NORMAL */; - } - }, - }; - - var contains = function (bit, value) { - return (bit & value) !== 0; - }; - - var content = { - name: "content", - initialValue: "none", - type: 1 /* LIST */, - prefix: false, - parse: function (_context, tokens) { - if (tokens.length === 0) { - return []; - } - var first = tokens[0]; - if (first.type === 20 /* IDENT_TOKEN */ && first.value === "none") { - return []; - } - return tokens; - }, - }; - - var counterIncrement = { - name: "counter-increment", - initialValue: "none", - prefix: true, - type: 1 /* LIST */, - parse: function (_context, tokens) { - if (tokens.length === 0) { - return null; - } - var first = tokens[0]; - if (first.type === 20 /* IDENT_TOKEN */ && first.value === "none") { - return null; - } - var increments = []; - var filtered = tokens.filter(nonWhiteSpace); - for (var i = 0; i < filtered.length; i++) { - var counter = filtered[i]; - var next = filtered[i + 1]; - if (counter.type === 20 /* IDENT_TOKEN */) { - var increment = next && isNumberToken(next) ? next.number : 1; - increments.push({ counter: counter.value, increment: increment }); - } - } - return increments; - }, - }; - - var counterReset = { - name: "counter-reset", - initialValue: "none", - prefix: true, - type: 1 /* LIST */, - parse: function (_context, tokens) { - if (tokens.length === 0) { - return []; - } - var resets = []; - var filtered = tokens.filter(nonWhiteSpace); - for (var i = 0; i < filtered.length; i++) { - var counter = filtered[i]; - var next = filtered[i + 1]; - if (isIdentToken(counter) && counter.value !== "none") { - var reset = next && isNumberToken(next) ? next.number : 0; - resets.push({ counter: counter.value, reset: reset }); - } - } - return resets; - }, - }; - - var duration = { - name: "duration", - initialValue: "0s", - prefix: false, - type: 1 /* LIST */, - parse: function (context, tokens) { - return tokens.filter(isDimensionToken).map(function (token) { - return time.parse(context, token); - }); - }, - }; - - var quotes = { - name: "quotes", - initialValue: "none", - prefix: true, - type: 1 /* LIST */, - parse: function (_context, tokens) { - if (tokens.length === 0) { - return null; - } - var first = tokens[0]; - if (first.type === 20 /* IDENT_TOKEN */ && first.value === "none") { - return null; - } - var quotes = []; - var filtered = tokens.filter(isStringToken); - if (filtered.length % 2 !== 0) { - return null; - } - for (var i = 0; i < filtered.length; i += 2) { - var open_1 = filtered[i].value; - var close_1 = filtered[i + 1].value; - quotes.push({ open: open_1, close: close_1 }); - } - return quotes; - }, - }; - var getQuote = function (quotes, depth, open) { - if (!quotes) { - return ""; - } - var quote = quotes[Math.min(depth, quotes.length - 1)]; - if (!quote) { - return ""; - } - return open ? quote.open : quote.close; - }; - - var boxShadow = { - name: "box-shadow", - initialValue: "none", - type: 1 /* LIST */, - prefix: false, - parse: function (context, tokens) { - if (tokens.length === 1 && isIdentWithValue(tokens[0], "none")) { - return []; - } - return parseFunctionArgs(tokens).map(function (values) { - var shadow = { - color: 0x000000ff, - offsetX: ZERO_LENGTH, - offsetY: ZERO_LENGTH, - blur: ZERO_LENGTH, - spread: ZERO_LENGTH, - inset: false, - }; - var c = 0; - for (var i = 0; i < values.length; i++) { - var token = values[i]; - if (isIdentWithValue(token, "inset")) { - shadow.inset = true; - } else if (isLength(token)) { - if (c === 0) { - shadow.offsetX = token; - } else if (c === 1) { - shadow.offsetY = token; - } else if (c === 2) { - shadow.blur = token; - } else { - shadow.spread = token; - } - c++; - } else { - shadow.color = color$1.parse(context, token); - } - } - return shadow; - }); - }, - }; - - var paintOrder = { - name: "paint-order", - initialValue: "normal", - prefix: false, - type: 1 /* LIST */, - parse: function (_context, tokens) { - var DEFAULT_VALUE = [0 /* FILL */, 1 /* STROKE */, 2 /* MARKERS */]; - var layers = []; - tokens.filter(isIdentToken).forEach(function (token) { - switch (token.value) { - case "stroke": - layers.push(1 /* STROKE */); - break; - case "fill": - layers.push(0 /* FILL */); - break; - case "markers": - layers.push(2 /* MARKERS */); - break; - } - }); - DEFAULT_VALUE.forEach(function (value) { - if (layers.indexOf(value) === -1) { - layers.push(value); - } - }); - return layers; - }, - }; - - var webkitTextStrokeColor = { - name: "-webkit-text-stroke-color", - initialValue: "currentcolor", - prefix: false, - type: 3 /* TYPE_VALUE */, - format: "color", - }; - - var webkitTextStrokeWidth = { - name: "-webkit-text-stroke-width", - initialValue: "0", - type: 0 /* VALUE */, - prefix: false, - parse: function (_context, token) { - if (isDimensionToken(token)) { - return token.number; - } - return 0; - }, - }; - - var CSSParsedDeclaration = /** @class */ (function () { - function CSSParsedDeclaration(context, declaration) { - var _a, _b; - this.animationDuration = parse( - context, - duration, - declaration.animationDuration - ); - this.backgroundClip = parse( - context, - backgroundClip, - declaration.backgroundClip - ); - this.backgroundColor = parse( - context, - backgroundColor, - declaration.backgroundColor - ); - this.backgroundImage = parse( - context, - backgroundImage, - declaration.backgroundImage - ); - this.backgroundOrigin = parse( - context, - backgroundOrigin, - declaration.backgroundOrigin - ); - this.backgroundPosition = parse( - context, - backgroundPosition, - declaration.backgroundPosition - ); - this.backgroundRepeat = parse( - context, - backgroundRepeat, - declaration.backgroundRepeat - ); - this.backgroundSize = parse( - context, - backgroundSize, - declaration.backgroundSize - ); - this.borderTopColor = parse( - context, - borderTopColor, - declaration.borderTopColor - ); - this.borderRightColor = parse( - context, - borderRightColor, - declaration.borderRightColor - ); - this.borderBottomColor = parse( - context, - borderBottomColor, - declaration.borderBottomColor - ); - this.borderLeftColor = parse( - context, - borderLeftColor, - declaration.borderLeftColor - ); - this.borderTopLeftRadius = parse( - context, - borderTopLeftRadius, - declaration.borderTopLeftRadius - ); - this.borderTopRightRadius = parse( - context, - borderTopRightRadius, - declaration.borderTopRightRadius - ); - this.borderBottomRightRadius = parse( - context, - borderBottomRightRadius, - declaration.borderBottomRightRadius - ); - this.borderBottomLeftRadius = parse( - context, - borderBottomLeftRadius, - declaration.borderBottomLeftRadius - ); - this.borderTopStyle = parse( - context, - borderTopStyle, - declaration.borderTopStyle - ); - this.borderRightStyle = parse( - context, - borderRightStyle, - declaration.borderRightStyle - ); - this.borderBottomStyle = parse( - context, - borderBottomStyle, - declaration.borderBottomStyle - ); - this.borderLeftStyle = parse( - context, - borderLeftStyle, - declaration.borderLeftStyle - ); - this.borderTopWidth = parse( - context, - borderTopWidth, - declaration.borderTopWidth - ); - this.borderRightWidth = parse( - context, - borderRightWidth, - declaration.borderRightWidth - ); - this.borderBottomWidth = parse( - context, - borderBottomWidth, - declaration.borderBottomWidth - ); - this.borderLeftWidth = parse( - context, - borderLeftWidth, - declaration.borderLeftWidth - ); - this.boxShadow = parse(context, boxShadow, declaration.boxShadow); - this.color = parse(context, color, declaration.color); - this.direction = parse(context, direction, declaration.direction); - this.display = parse(context, display, declaration.display); - this.float = parse(context, float, declaration.cssFloat); - this.fontFamily = parse(context, fontFamily, declaration.fontFamily); - this.fontSize = parse(context, fontSize, declaration.fontSize); - this.fontStyle = parse(context, fontStyle, declaration.fontStyle); - this.fontVariant = parse( - context, - fontVariant, - declaration.fontVariant - ); - this.fontWeight = parse(context, fontWeight, declaration.fontWeight); - this.letterSpacing = parse( - context, - letterSpacing, - declaration.letterSpacing - ); - this.lineBreak = parse(context, lineBreak, declaration.lineBreak); - this.lineHeight = parse(context, lineHeight, declaration.lineHeight); - this.listStyleImage = parse( - context, - listStyleImage, - declaration.listStyleImage - ); - this.listStylePosition = parse( - context, - listStylePosition, - declaration.listStylePosition - ); - this.listStyleType = parse( - context, - listStyleType, - declaration.listStyleType - ); - this.marginTop = parse(context, marginTop, declaration.marginTop); - this.marginRight = parse( - context, - marginRight, - declaration.marginRight - ); - this.marginBottom = parse( - context, - marginBottom, - declaration.marginBottom - ); - this.marginLeft = parse(context, marginLeft, declaration.marginLeft); - this.opacity = parse(context, opacity, declaration.opacity); - var overflowTuple = parse(context, overflow, declaration.overflow); - this.overflowX = overflowTuple[0]; - this.overflowY = overflowTuple[overflowTuple.length > 1 ? 1 : 0]; - this.overflowWrap = parse( - context, - overflowWrap, - declaration.overflowWrap - ); - this.paddingTop = parse(context, paddingTop, declaration.paddingTop); - this.paddingRight = parse( - context, - paddingRight, - declaration.paddingRight - ); - this.paddingBottom = parse( - context, - paddingBottom, - declaration.paddingBottom - ); - this.paddingLeft = parse( - context, - paddingLeft, - declaration.paddingLeft - ); - this.paintOrder = parse(context, paintOrder, declaration.paintOrder); - this.position = parse(context, position, declaration.position); - this.textAlign = parse(context, textAlign, declaration.textAlign); - this.textDecorationColor = parse( - context, - textDecorationColor, - (_a = declaration.textDecorationColor) !== null && _a !== void 0 - ? _a - : declaration.color - ); - this.textDecorationLine = parse( - context, - textDecorationLine, - (_b = declaration.textDecorationLine) !== null && _b !== void 0 - ? _b - : declaration.textDecoration - ); - this.textShadow = parse(context, textShadow, declaration.textShadow); - this.textTransform = parse( - context, - textTransform, - declaration.textTransform - ); - this.transform = parse(context, transform$1, declaration.transform); - this.transformOrigin = parse( - context, - transformOrigin, - declaration.transformOrigin - ); - this.visibility = parse(context, visibility, declaration.visibility); - this.webkitTextStrokeColor = parse( - context, - webkitTextStrokeColor, - declaration.webkitTextStrokeColor - ); - this.webkitTextStrokeWidth = parse( - context, - webkitTextStrokeWidth, - declaration.webkitTextStrokeWidth - ); - this.wordBreak = parse(context, wordBreak, declaration.wordBreak); - this.zIndex = parse(context, zIndex, declaration.zIndex); - } - CSSParsedDeclaration.prototype.isVisible = function () { - return ( - this.display > 0 && - this.opacity > 0 && - this.visibility === 0 /* VISIBLE */ - ); - }; - CSSParsedDeclaration.prototype.isTransparent = function () { - return isTransparent(this.backgroundColor); - }; - CSSParsedDeclaration.prototype.isTransformed = function () { - return this.transform !== null; - }; - CSSParsedDeclaration.prototype.isPositioned = function () { - return this.position !== 0 /* STATIC */; - }; - CSSParsedDeclaration.prototype.isPositionedWithZIndex = function () { - return this.isPositioned() && !this.zIndex.auto; - }; - CSSParsedDeclaration.prototype.isFloating = function () { - return this.float !== 0 /* NONE */; - }; - CSSParsedDeclaration.prototype.isInlineLevel = function () { - return ( - contains(this.display, 4 /* INLINE */) || - contains(this.display, 33554432 /* INLINE_BLOCK */) || - contains(this.display, 268435456 /* INLINE_FLEX */) || - contains(this.display, 536870912 /* INLINE_GRID */) || - contains(this.display, 67108864 /* INLINE_LIST_ITEM */) || - contains(this.display, 134217728 /* INLINE_TABLE */) - ); - }; - return CSSParsedDeclaration; - })(); - var CSSParsedPseudoDeclaration = /** @class */ (function () { - function CSSParsedPseudoDeclaration(context, declaration) { - this.content = parse(context, content, declaration.content); - this.quotes = parse(context, quotes, declaration.quotes); - } - return CSSParsedPseudoDeclaration; - })(); - var CSSParsedCounterDeclaration = /** @class */ (function () { - function CSSParsedCounterDeclaration(context, declaration) { - this.counterIncrement = parse( - context, - counterIncrement, - declaration.counterIncrement - ); - this.counterReset = parse( - context, - counterReset, - declaration.counterReset - ); - } - return CSSParsedCounterDeclaration; - })(); - // eslint-disable-next-line @typescript-eslint/no-explicit-any - var parse = function (context, descriptor, style) { - var tokenizer = new Tokenizer(); - var value = - style !== null && typeof style !== "undefined" - ? style.toString() - : descriptor.initialValue; - tokenizer.write(value); - var parser = new Parser(tokenizer.read()); - switch (descriptor.type) { - case 2 /* IDENT_VALUE */: - var token = parser.parseComponentValue(); - return descriptor.parse( - context, - isIdentToken(token) ? token.value : descriptor.initialValue - ); - case 0 /* VALUE */: - return descriptor.parse(context, parser.parseComponentValue()); - case 1 /* LIST */: - return descriptor.parse(context, parser.parseComponentValues()); - case 4 /* TOKEN_VALUE */: - return parser.parseComponentValue(); - case 3 /* TYPE_VALUE */: - switch (descriptor.format) { - case "angle": - return angle.parse(context, parser.parseComponentValue()); - case "color": - return color$1.parse(context, parser.parseComponentValue()); - case "image": - return image.parse(context, parser.parseComponentValue()); - case "length": - var length_1 = parser.parseComponentValue(); - return isLength(length_1) ? length_1 : ZERO_LENGTH; - case "length-percentage": - var value_1 = parser.parseComponentValue(); - return isLengthPercentage(value_1) ? value_1 : ZERO_LENGTH; - case "time": - return time.parse(context, parser.parseComponentValue()); - } - break; - } - }; - - var elementDebuggerAttribute = "data-html2canvas-debug"; - var getElementDebugType = function (element) { - var attribute = element.getAttribute(elementDebuggerAttribute); - switch (attribute) { - case "all": - return 1 /* ALL */; - case "clone": - return 2 /* CLONE */; - case "parse": - return 3 /* PARSE */; - case "render": - return 4 /* RENDER */; - default: - return 0 /* NONE */; - } - }; - var isDebugging = function (element, type) { - var elementType = getElementDebugType(element); - return elementType === 1 /* ALL */ || type === elementType; - }; - - var ElementContainer = /** @class */ (function () { - function ElementContainer(context, element) { - this.context = context; - this.textNodes = []; - this.elements = []; - this.flags = 0; - if (isDebugging(element, 3 /* PARSE */)) { - debugger; - } - this.styles = new CSSParsedDeclaration( - context, - window.getComputedStyle(element, null) - ); - if (isHTMLElementNode(element)) { - if ( - this.styles.animationDuration.some(function (duration) { - return duration > 0; - }) - ) { - element.style.animationDuration = "0s"; - } - if (this.styles.transform !== null) { - // getBoundingClientRect takes transforms into account - element.style.transform = "none"; - } - } - this.bounds = parseBounds(this.context, element); - if (isDebugging(element, 4 /* RENDER */)) { - this.flags |= 16 /* DEBUG_RENDER */; - } - } - return ElementContainer; - })(); - - /* - * text-segmentation 1.0.3 - * Copyright (c) 2022 Niklas von Hertzen - * Released under MIT License - */ - var base64 = - "AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAA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wU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACA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GVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQg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AA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA="; - - /* - * utrie 1.0.2 - * Copyright (c) 2022 Niklas von Hertzen - * Released under MIT License - */ - var chars$1 = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - // Use a lookup table to find the index. - var lookup$1 = - typeof Uint8Array === "undefined" ? [] : new Uint8Array(256); - for (var i$1 = 0; i$1 < chars$1.length; i$1++) { - lookup$1[chars$1.charCodeAt(i$1)] = i$1; - } - var decode = function (base64) { - var bufferLength = base64.length * 0.75, - len = base64.length, - i, - p = 0, - encoded1, - encoded2, - encoded3, - encoded4; - if (base64[base64.length - 1] === "=") { - bufferLength--; - if (base64[base64.length - 2] === "=") { - bufferLength--; - } - } - var buffer = - typeof ArrayBuffer !== "undefined" && - typeof Uint8Array !== "undefined" && - typeof Uint8Array.prototype.slice !== "undefined" - ? new ArrayBuffer(bufferLength) - : new Array(bufferLength); - var bytes = Array.isArray(buffer) ? buffer : new Uint8Array(buffer); - for (i = 0; i < len; i += 4) { - encoded1 = lookup$1[base64.charCodeAt(i)]; - encoded2 = lookup$1[base64.charCodeAt(i + 1)]; - encoded3 = lookup$1[base64.charCodeAt(i + 2)]; - encoded4 = lookup$1[base64.charCodeAt(i + 3)]; - bytes[p++] = (encoded1 << 2) | (encoded2 >> 4); - bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2); - bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63); - } - return buffer; - }; - var polyUint16Array = function (buffer) { - var length = buffer.length; - var bytes = []; - for (var i = 0; i < length; i += 2) { - bytes.push((buffer[i + 1] << 8) | buffer[i]); - } - return bytes; - }; - var polyUint32Array = function (buffer) { - var length = buffer.length; - var bytes = []; - for (var i = 0; i < length; i += 4) { - bytes.push( - (buffer[i + 3] << 24) | - (buffer[i + 2] << 16) | - (buffer[i + 1] << 8) | - buffer[i] - ); - } - return bytes; - }; - - /** Shift size for getting the index-2 table offset. */ - var UTRIE2_SHIFT_2 = 5; - /** Shift size for getting the index-1 table offset. */ - var UTRIE2_SHIFT_1 = 6 + 5; - /** - * Shift size for shifting left the index array values. - * Increases possible data size with 16-bit index values at the cost - * of compactability. - * This requires data blocks to be aligned by UTRIE2_DATA_GRANULARITY. - */ - var UTRIE2_INDEX_SHIFT = 2; - /** - * Difference between the two shift sizes, - * for getting an index-1 offset from an index-2 offset. 6=11-5 - */ - var UTRIE2_SHIFT_1_2 = UTRIE2_SHIFT_1 - UTRIE2_SHIFT_2; - /** - * The part of the index-2 table for U+D800..U+DBFF stores values for - * lead surrogate code _units_ not code _points_. - * Values for lead surrogate code _points_ are indexed with this portion of the table. - * Length=32=0x20=0x400>>UTRIE2_SHIFT_2. (There are 1024=0x400 lead surrogates.) - */ - var UTRIE2_LSCP_INDEX_2_OFFSET = 0x10000 >> UTRIE2_SHIFT_2; - /** Number of entries in a data block. 32=0x20 */ - var UTRIE2_DATA_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_2; - /** Mask for getting the lower bits for the in-data-block offset. */ - var UTRIE2_DATA_MASK = UTRIE2_DATA_BLOCK_LENGTH - 1; - var UTRIE2_LSCP_INDEX_2_LENGTH = 0x400 >> UTRIE2_SHIFT_2; - /** Count the lengths of both BMP pieces. 2080=0x820 */ - var UTRIE2_INDEX_2_BMP_LENGTH = - UTRIE2_LSCP_INDEX_2_OFFSET + UTRIE2_LSCP_INDEX_2_LENGTH; - /** - * The 2-byte UTF-8 version of the index-2 table follows at offset 2080=0x820. - * Length 32=0x20 for lead bytes C0..DF, regardless of UTRIE2_SHIFT_2. - */ - var UTRIE2_UTF8_2B_INDEX_2_OFFSET = UTRIE2_INDEX_2_BMP_LENGTH; - var UTRIE2_UTF8_2B_INDEX_2_LENGTH = - 0x800 >> 6; /* U+0800 is the first code point after 2-byte UTF-8 */ - /** - * The index-1 table, only used for supplementary code points, at offset 2112=0x840. - * Variable length, for code points up to highStart, where the last single-value range starts. - * Maximum length 512=0x200=0x100000>>UTRIE2_SHIFT_1. - * (For 0x100000 supplementary code points U+10000..U+10ffff.) - * - * The part of the index-2 table for supplementary code points starts - * after this index-1 table. - * - * Both the index-1 table and the following part of the index-2 table - * are omitted completely if there is only BMP data. - */ - var UTRIE2_INDEX_1_OFFSET = - UTRIE2_UTF8_2B_INDEX_2_OFFSET + UTRIE2_UTF8_2B_INDEX_2_LENGTH; - /** - * Number of index-1 entries for the BMP. 32=0x20 - * This part of the index-1 table is omitted from the serialized form. - */ - var UTRIE2_OMITTED_BMP_INDEX_1_LENGTH = 0x10000 >> UTRIE2_SHIFT_1; - /** Number of entries in an index-2 block. 64=0x40 */ - var UTRIE2_INDEX_2_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_1_2; - /** Mask for getting the lower bits for the in-index-2-block offset. */ - var UTRIE2_INDEX_2_MASK = UTRIE2_INDEX_2_BLOCK_LENGTH - 1; - var slice16 = function (view, start, end) { - if (view.slice) { - return view.slice(start, end); - } - return new Uint16Array(Array.prototype.slice.call(view, start, end)); - }; - var slice32 = function (view, start, end) { - if (view.slice) { - return view.slice(start, end); - } - return new Uint32Array(Array.prototype.slice.call(view, start, end)); - }; - var createTrieFromBase64 = function (base64, _byteLength) { - var buffer = decode(base64); - var view32 = Array.isArray(buffer) - ? polyUint32Array(buffer) - : new Uint32Array(buffer); - var view16 = Array.isArray(buffer) - ? polyUint16Array(buffer) - : new Uint16Array(buffer); - var headerLength = 24; - var index = slice16(view16, headerLength / 2, view32[4] / 2); - var data = - view32[5] === 2 - ? slice16(view16, (headerLength + view32[4]) / 2) - : slice32(view32, Math.ceil((headerLength + view32[4]) / 4)); - return new Trie( - view32[0], - view32[1], - view32[2], - view32[3], - index, - data - ); - }; - var Trie = /** @class */ (function () { - function Trie( - initialValue, - errorValue, - highStart, - highValueIndex, - index, - data - ) { - this.initialValue = initialValue; - this.errorValue = errorValue; - this.highStart = highStart; - this.highValueIndex = highValueIndex; - this.index = index; - this.data = data; - } - /** - * Get the value for a code point as stored in the Trie. - * - * @param codePoint the code point - * @return the value - */ - Trie.prototype.get = function (codePoint) { - var ix; - if (codePoint >= 0) { - if ( - codePoint < 0x0d800 || - (codePoint > 0x0dbff && codePoint <= 0x0ffff) - ) { - // Ordinary BMP code point, excluding leading surrogates. - // BMP uses a single level lookup. BMP index starts at offset 0 in the Trie2 index. - // 16 bit data is stored in the index array itself. - ix = this.index[codePoint >> UTRIE2_SHIFT_2]; - ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK); - return this.data[ix]; - } - if (codePoint <= 0xffff) { - // Lead Surrogate Code Point. A Separate index section is stored for - // lead surrogate code units and code points. - // The main index has the code unit data. - // For this function, we need the code point data. - // Note: this expression could be refactored for slightly improved efficiency, but - // surrogate code points will be so rare in practice that it's not worth it. - ix = - this.index[ - UTRIE2_LSCP_INDEX_2_OFFSET + - ((codePoint - 0xd800) >> UTRIE2_SHIFT_2) - ]; - ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK); - return this.data[ix]; - } - if (codePoint < this.highStart) { - // Supplemental code point, use two-level lookup. - ix = - UTRIE2_INDEX_1_OFFSET - - UTRIE2_OMITTED_BMP_INDEX_1_LENGTH + - (codePoint >> UTRIE2_SHIFT_1); - ix = this.index[ix]; - ix += (codePoint >> UTRIE2_SHIFT_2) & UTRIE2_INDEX_2_MASK; - ix = this.index[ix]; - ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK); - return this.data[ix]; - } - if (codePoint <= 0x10ffff) { - return this.data[this.highValueIndex]; - } - } - // Fall through. The code point is outside of the legal range of 0..0x10ffff. - return this.errorValue; - }; - return Trie; - })(); - - /* - * base64-arraybuffer 1.0.2 - * Copyright (c) 2022 Niklas von Hertzen - * Released under MIT License - */ - var chars = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - // Use a lookup table to find the index. - var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256); - for (var i = 0; i < chars.length; i++) { - lookup[chars.charCodeAt(i)] = i; - } - - var Prepend = 1; - var CR = 2; - var LF = 3; - var Control = 4; - var Extend = 5; - var SpacingMark = 7; - var L = 8; - var V = 9; - var T = 10; - var LV = 11; - var LVT = 12; - var ZWJ = 13; - var Extended_Pictographic = 14; - var RI = 15; - var toCodePoints = function (str) { - var codePoints = []; - var i = 0; - var length = str.length; - while (i < length) { - var value = str.charCodeAt(i++); - if (value >= 0xd800 && value <= 0xdbff && i < length) { - var extra = str.charCodeAt(i++); - if ((extra & 0xfc00) === 0xdc00) { - codePoints.push( - ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000 - ); - } else { - codePoints.push(value); - i--; - } - } else { - codePoints.push(value); - } - } - return codePoints; - }; - var fromCodePoint = function () { - var codePoints = []; - for (var _i = 0; _i < arguments.length; _i++) { - codePoints[_i] = arguments[_i]; - } - if (String.fromCodePoint) { - return String.fromCodePoint.apply(String, codePoints); - } - var length = codePoints.length; - if (!length) { - return ""; - } - var codeUnits = []; - var index = -1; - var result = ""; - while (++index < length) { - var codePoint = codePoints[index]; - if (codePoint <= 0xffff) { - codeUnits.push(codePoint); - } else { - codePoint -= 0x10000; - codeUnits.push( - (codePoint >> 10) + 0xd800, - (codePoint % 0x400) + 0xdc00 - ); - } - if (index + 1 === length || codeUnits.length > 0x4000) { - result += String.fromCharCode.apply(String, codeUnits); - codeUnits.length = 0; - } - } - return result; - }; - var UnicodeTrie = createTrieFromBase64(base64); - var BREAK_NOT_ALLOWED = "×"; - var BREAK_ALLOWED = "÷"; - var codePointToClass = function (codePoint) { - return UnicodeTrie.get(codePoint); - }; - var _graphemeBreakAtIndex = function (_codePoints, classTypes, index) { - var prevIndex = index - 2; - var prev = classTypes[prevIndex]; - var current = classTypes[index - 1]; - var next = classTypes[index]; - // GB3 Do not break between a CR and LF - if (current === CR && next === LF) { - return BREAK_NOT_ALLOWED; - } - // GB4 Otherwise, break before and after controls. - if (current === CR || current === LF || current === Control) { - return BREAK_ALLOWED; - } - // GB5 - if (next === CR || next === LF || next === Control) { - return BREAK_ALLOWED; - } - // Do not break Hangul syllable sequences. - // GB6 - if (current === L && [L, V, LV, LVT].indexOf(next) !== -1) { - return BREAK_NOT_ALLOWED; - } - // GB7 - if ((current === LV || current === V) && (next === V || next === T)) { - return BREAK_NOT_ALLOWED; - } - // GB8 - if ((current === LVT || current === T) && next === T) { - return BREAK_NOT_ALLOWED; - } - // GB9 Do not break before extending characters or ZWJ. - if (next === ZWJ || next === Extend) { - return BREAK_NOT_ALLOWED; - } - // Do not break before SpacingMarks, or after Prepend characters. - // GB9a - if (next === SpacingMark) { - return BREAK_NOT_ALLOWED; - } - // GB9a - if (current === Prepend) { - return BREAK_NOT_ALLOWED; - } - // GB11 Do not break within emoji modifier sequences or emoji zwj sequences. - if (current === ZWJ && next === Extended_Pictographic) { - while (prev === Extend) { - prev = classTypes[--prevIndex]; - } - if (prev === Extended_Pictographic) { - return BREAK_NOT_ALLOWED; - } - } - // GB12 Do not break within emoji flag sequences. - // That is, do not break between regional indicator (RI) symbols - // if there is an odd number of RI characters before the break point. - if (current === RI && next === RI) { - var countRI = 0; - while (prev === RI) { - countRI++; - prev = classTypes[--prevIndex]; - } - if (countRI % 2 === 0) { - return BREAK_NOT_ALLOWED; - } - } - return BREAK_ALLOWED; - }; - var GraphemeBreaker = function (str) { - var codePoints = toCodePoints(str); - var length = codePoints.length; - var index = 0; - var lastEnd = 0; - var classTypes = codePoints.map(codePointToClass); - return { - next: function () { - if (index >= length) { - return { done: true, value: null }; - } - var graphemeBreak = BREAK_NOT_ALLOWED; - while ( - index < length && - (graphemeBreak = _graphemeBreakAtIndex( - codePoints, - classTypes, - ++index - )) === BREAK_NOT_ALLOWED - ) {} - if (graphemeBreak !== BREAK_NOT_ALLOWED || index === length) { - var value = fromCodePoint.apply( - null, - codePoints.slice(lastEnd, index) - ); - lastEnd = index; - return { value: value, done: false }; - } - return { done: true, value: null }; - }, - }; - }; - var splitGraphemes = function (str) { - var breaker = GraphemeBreaker(str); - var graphemes = []; - var bk; - while (!(bk = breaker.next()).done) { - if (bk.value) { - graphemes.push(bk.value.slice()); - } - } - return graphemes; - }; - - var testRangeBounds = function (document) { - var TEST_HEIGHT = 123; - if (document.createRange) { - var range = document.createRange(); - if (range.getBoundingClientRect) { - var testElement = document.createElement("boundtest"); - testElement.style.height = TEST_HEIGHT + "px"; - testElement.style.display = "block"; - document.body.appendChild(testElement); - range.selectNode(testElement); - var rangeBounds = range.getBoundingClientRect(); - var rangeHeight = Math.round(rangeBounds.height); - document.body.removeChild(testElement); - if (rangeHeight === TEST_HEIGHT) { - return true; - } - } - } - return false; - }; - var testIOSLineBreak = function (document) { - var testElement = document.createElement("boundtest"); - testElement.style.width = "50px"; - testElement.style.display = "block"; - testElement.style.fontSize = "12px"; - testElement.style.letterSpacing = "0px"; - testElement.style.wordSpacing = "0px"; - document.body.appendChild(testElement); - var range = document.createRange(); - testElement.innerHTML = - typeof "".repeat === "function" ? "👨".repeat(10) : ""; - var node = testElement.firstChild; - var textList = toCodePoints$1(node.data).map(function (i) { - return fromCodePoint$1(i); - }); - var offset = 0; - var prev = {}; - // ios 13 does not handle range getBoundingClientRect line changes correctly #2177 - var supports = textList.every(function (text, i) { - range.setStart(node, offset); - range.setEnd(node, offset + text.length); - var rect = range.getBoundingClientRect(); - offset += text.length; - var boundAhead = rect.x > prev.x || rect.y > prev.y; - prev = rect; - if (i === 0) { - return true; - } - return boundAhead; - }); - document.body.removeChild(testElement); - return supports; - }; - var testCORS = function () { - return typeof new Image().crossOrigin !== "undefined"; - }; - var testResponseType = function () { - return typeof new XMLHttpRequest().responseType === "string"; - }; - var testSVG = function (document) { - var img = new Image(); - var canvas = document.createElement("canvas"); - var ctx = canvas.getContext("2d"); - if (!ctx) { - return false; - } - img.src = - "data:image/svg+xml,"; - try { - ctx.drawImage(img, 0, 0); - canvas.toDataURL(); - } catch (e) { - return false; - } - return true; - }; - var isGreenPixel = function (data) { - return ( - data[0] === 0 && data[1] === 255 && data[2] === 0 && data[3] === 255 - ); - }; - var testForeignObject = function (document) { - var canvas = document.createElement("canvas"); - var size = 100; - canvas.width = size; - canvas.height = size; - var ctx = canvas.getContext("2d"); - if (!ctx) { - return Promise.reject(false); - } - ctx.fillStyle = "rgb(0, 255, 0)"; - ctx.fillRect(0, 0, size, size); - var img = new Image(); - var greenImageSrc = canvas.toDataURL(); - img.src = greenImageSrc; - var svg = createForeignObjectSVG(size, size, 0, 0, img); - ctx.fillStyle = "red"; - ctx.fillRect(0, 0, size, size); - return loadSerializedSVG$1(svg) - .then(function (img) { - ctx.drawImage(img, 0, 0); - var data = ctx.getImageData(0, 0, size, size).data; - ctx.fillStyle = "red"; - ctx.fillRect(0, 0, size, size); - var node = document.createElement("div"); - node.style.backgroundImage = "url(" + greenImageSrc + ")"; - node.style.height = size + "px"; - // Firefox 55 does not render inline tags - return isGreenPixel(data) - ? loadSerializedSVG$1( - createForeignObjectSVG(size, size, 0, 0, node) - ) - : Promise.reject(false); - }) - .then(function (img) { - ctx.drawImage(img, 0, 0); - // Edge does not render background-images - return isGreenPixel(ctx.getImageData(0, 0, size, size).data); - }) - .catch(function () { - return false; - }); - }; - var createForeignObjectSVG = function (width, height, x, y, node) { - var xmlns = "http://www.w3.org/2000/svg"; - var svg = document.createElementNS(xmlns, "svg"); - var foreignObject = document.createElementNS(xmlns, "foreignObject"); - svg.setAttributeNS(null, "width", width.toString()); - svg.setAttributeNS(null, "height", height.toString()); - foreignObject.setAttributeNS(null, "width", "100%"); - foreignObject.setAttributeNS(null, "height", "100%"); - foreignObject.setAttributeNS(null, "x", x.toString()); - foreignObject.setAttributeNS(null, "y", y.toString()); - foreignObject.setAttributeNS(null, "externalResourcesRequired", "true"); - svg.appendChild(foreignObject); - foreignObject.appendChild(node); - return svg; - }; - var loadSerializedSVG$1 = function (svg) { - return new Promise(function (resolve, reject) { - var img = new Image(); - img.onload = function () { - return resolve(img); - }; - img.onerror = reject; - img.src = - "data:image/svg+xml;charset=utf-8," + - encodeURIComponent(new XMLSerializer().serializeToString(svg)); - }); - }; - var FEATURES = { - get SUPPORT_RANGE_BOUNDS() { - var value = testRangeBounds(document); - Object.defineProperty(FEATURES, "SUPPORT_RANGE_BOUNDS", { - value: value, - }); - return value; - }, - get SUPPORT_WORD_BREAKING() { - var value = - FEATURES.SUPPORT_RANGE_BOUNDS && testIOSLineBreak(document); - Object.defineProperty(FEATURES, "SUPPORT_WORD_BREAKING", { - value: value, - }); - return value; - }, - get SUPPORT_SVG_DRAWING() { - var value = testSVG(document); - Object.defineProperty(FEATURES, "SUPPORT_SVG_DRAWING", { - value: value, - }); - return value; - }, - get SUPPORT_FOREIGNOBJECT_DRAWING() { - var value = - typeof Array.from === "function" && - typeof window.fetch === "function" - ? testForeignObject(document) - : Promise.resolve(false); - Object.defineProperty(FEATURES, "SUPPORT_FOREIGNOBJECT_DRAWING", { - value: value, - }); - return value; - }, - get SUPPORT_CORS_IMAGES() { - var value = testCORS(); - Object.defineProperty(FEATURES, "SUPPORT_CORS_IMAGES", { - value: value, - }); - return value; - }, - get SUPPORT_RESPONSE_TYPE() { - var value = testResponseType(); - Object.defineProperty(FEATURES, "SUPPORT_RESPONSE_TYPE", { - value: value, - }); - return value; - }, - get SUPPORT_CORS_XHR() { - var value = "withCredentials" in new XMLHttpRequest(); - Object.defineProperty(FEATURES, "SUPPORT_CORS_XHR", { value: value }); - return value; - }, - get SUPPORT_NATIVE_TEXT_SEGMENTATION() { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - var value = !!(typeof Intl !== "undefined" && Intl.Segmenter); - Object.defineProperty(FEATURES, "SUPPORT_NATIVE_TEXT_SEGMENTATION", { - value: value, - }); - return value; - }, - }; - - var TextBounds = /** @class */ (function () { - function TextBounds(text, bounds) { - this.text = text; - this.bounds = bounds; - } - return TextBounds; - })(); - var parseTextBounds = function (context, value, styles, node) { - var textList = breakText(value, styles); - var textBounds = []; - var offset = 0; - textList.forEach(function (text) { - if (styles.textDecorationLine.length || text.trim().length > 0) { - if (FEATURES.SUPPORT_RANGE_BOUNDS) { - var clientRects = createRange( - node, - offset, - text.length - ).getClientRects(); - if (clientRects.length > 1) { - var subSegments = segmentGraphemes(text); - var subOffset_1 = 0; - subSegments.forEach(function (subSegment) { - textBounds.push( - new TextBounds( - subSegment, - Bounds.fromDOMRectList( - context, - createRange( - node, - subOffset_1 + offset, - subSegment.length - ).getClientRects() - ) - ) - ); - subOffset_1 += subSegment.length; - }); - } else { - textBounds.push( - new TextBounds( - text, - Bounds.fromDOMRectList(context, clientRects) - ) - ); - } - } else { - var replacementNode = node.splitText(text.length); - textBounds.push( - new TextBounds(text, getWrapperBounds(context, node)) - ); - node = replacementNode; - } - } else if (!FEATURES.SUPPORT_RANGE_BOUNDS) { - node = node.splitText(text.length); - } - offset += text.length; - }); - return textBounds; - }; - var getWrapperBounds = function (context, node) { - var ownerDocument = node.ownerDocument; - if (ownerDocument) { - var wrapper = ownerDocument.createElement("html2canvaswrapper"); - wrapper.appendChild(node.cloneNode(true)); - var parentNode = node.parentNode; - if (parentNode) { - parentNode.replaceChild(wrapper, node); - var bounds = parseBounds(context, wrapper); - if (wrapper.firstChild) { - parentNode.replaceChild(wrapper.firstChild, wrapper); - } - return bounds; - } - } - return Bounds.EMPTY; - }; - var createRange = function (node, offset, length) { - var ownerDocument = node.ownerDocument; - if (!ownerDocument) { - throw new Error("Node has no owner document"); - } - var range = ownerDocument.createRange(); - range.setStart(node, offset); - range.setEnd(node, offset + length); - return range; - }; - var segmentGraphemes = function (value) { - if (FEATURES.SUPPORT_NATIVE_TEXT_SEGMENTATION) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - var segmenter = new Intl.Segmenter(void 0, { - granularity: "grapheme", - }); - // eslint-disable-next-line @typescript-eslint/no-explicit-any - return Array.from(segmenter.segment(value)).map(function (segment) { - return segment.segment; - }); - } - return splitGraphemes(value); - }; - var segmentWords = function (value, styles) { - if (FEATURES.SUPPORT_NATIVE_TEXT_SEGMENTATION) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - var segmenter = new Intl.Segmenter(void 0, { - granularity: "word", - }); - // eslint-disable-next-line @typescript-eslint/no-explicit-any - return Array.from(segmenter.segment(value)).map(function (segment) { - return segment.segment; - }); - } - return breakWords(value, styles); - }; - var breakText = function (value, styles) { - return styles.letterSpacing !== 0 - ? segmentGraphemes(value) - : segmentWords(value, styles); - }; - // https://drafts.csswg.org/css-text/#word-separator - var wordSeparators = [ - 0x0020, 0x00a0, 0x1361, 0x10100, 0x10101, 0x1039, 0x1091, - ]; - var breakWords = function (str, styles) { - var breaker = LineBreaker(str, { - lineBreak: styles.lineBreak, - wordBreak: - styles.overflowWrap === "break-word" /* BREAK_WORD */ - ? "break-word" - : styles.wordBreak, - }); - var words = []; - var bk; - var _loop_1 = function () { - if (bk.value) { - var value = bk.value.slice(); - var codePoints = toCodePoints$1(value); - var word_1 = ""; - codePoints.forEach(function (codePoint) { - if (wordSeparators.indexOf(codePoint) === -1) { - word_1 += fromCodePoint$1(codePoint); - } else { - if (word_1.length) { - words.push(word_1); - } - words.push(fromCodePoint$1(codePoint)); - word_1 = ""; - } - }); - if (word_1.length) { - words.push(word_1); - } - } - }; - while (!(bk = breaker.next()).done) { - _loop_1(); - } - return words; - }; - - var TextContainer = /** @class */ (function () { - function TextContainer(context, node, styles) { - this.text = transform(node.data, styles.textTransform); - this.textBounds = parseTextBounds(context, this.text, styles, node); - } - return TextContainer; - })(); - var transform = function (text, transform) { - switch (transform) { - case 1 /* LOWERCASE */: - return text.toLowerCase(); - case 3 /* CAPITALIZE */: - return text.replace(CAPITALIZE, capitalize); - case 2 /* UPPERCASE */: - return text.toUpperCase(); - default: - return text; - } - }; - var CAPITALIZE = /(^|\s|:|-|\(|\))([a-z])/g; - var capitalize = function (m, p1, p2) { - if (m.length > 0) { - return p1 + p2.toUpperCase(); - } - return m; - }; - - var ImageElementContainer = /** @class */ (function (_super) { - __extends(ImageElementContainer, _super); - function ImageElementContainer(context, img) { - var _this = _super.call(this, context, img) || this; - _this.src = img.currentSrc || img.src; - _this.intrinsicWidth = img.naturalWidth; - _this.intrinsicHeight = img.naturalHeight; - _this.context.cache.addImage(_this.src); - return _this; - } - return ImageElementContainer; - })(ElementContainer); - - var CanvasElementContainer = /** @class */ (function (_super) { - __extends(CanvasElementContainer, _super); - function CanvasElementContainer(context, canvas) { - var _this = _super.call(this, context, canvas) || this; - _this.canvas = canvas; - _this.intrinsicWidth = canvas.width; - _this.intrinsicHeight = canvas.height; - return _this; - } - return CanvasElementContainer; - })(ElementContainer); - - var SVGElementContainer = /** @class */ (function (_super) { - __extends(SVGElementContainer, _super); - function SVGElementContainer(context, img) { - var _this = _super.call(this, context, img) || this; - var s = new XMLSerializer(); - var bounds = parseBounds(context, img); - img.setAttribute("width", bounds.width + "px"); - img.setAttribute("height", bounds.height + "px"); - _this.svg = - "data:image/svg+xml," + - encodeURIComponent(s.serializeToString(img)); - _this.intrinsicWidth = img.width.baseVal.value; - _this.intrinsicHeight = img.height.baseVal.value; - _this.context.cache.addImage(_this.svg); - return _this; - } - return SVGElementContainer; - })(ElementContainer); - - var LIElementContainer = /** @class */ (function (_super) { - __extends(LIElementContainer, _super); - function LIElementContainer(context, element) { - var _this = _super.call(this, context, element) || this; - _this.value = element.value; - return _this; - } - return LIElementContainer; - })(ElementContainer); - - var OLElementContainer = /** @class */ (function (_super) { - __extends(OLElementContainer, _super); - function OLElementContainer(context, element) { - var _this = _super.call(this, context, element) || this; - _this.start = element.start; - _this.reversed = - typeof element.reversed === "boolean" && element.reversed === true; - return _this; - } - return OLElementContainer; - })(ElementContainer); - - var CHECKBOX_BORDER_RADIUS = [ - { - type: 15 /* DIMENSION_TOKEN */, - flags: 0, - unit: "px", - number: 3, - }, - ]; - var RADIO_BORDER_RADIUS = [ - { - type: 16 /* PERCENTAGE_TOKEN */, - flags: 0, - number: 50, - }, - ]; - var reformatInputBounds = function (bounds) { - if (bounds.width > bounds.height) { - return new Bounds( - bounds.left + (bounds.width - bounds.height) / 2, - bounds.top, - bounds.height, - bounds.height - ); - } else if (bounds.width < bounds.height) { - return new Bounds( - bounds.left, - bounds.top + (bounds.height - bounds.width) / 2, - bounds.width, - bounds.width - ); - } - return bounds; - }; - var getInputValue = function (node) { - var value = - node.type === PASSWORD - ? new Array(node.value.length + 1).join("\u2022") - : node.value; - return value.length === 0 ? node.placeholder || "" : value; - }; - var CHECKBOX = "checkbox"; - var RADIO = "radio"; - var PASSWORD = "password"; - var INPUT_COLOR = 0x2a2a2aff; - var InputElementContainer = /** @class */ (function (_super) { - __extends(InputElementContainer, _super); - function InputElementContainer(context, input) { - var _this = _super.call(this, context, input) || this; - _this.type = input.type.toLowerCase(); - _this.checked = input.checked; - _this.value = getInputValue(input); - if (_this.type === CHECKBOX || _this.type === RADIO) { - _this.styles.backgroundColor = 0xdededeff; - _this.styles.borderTopColor = - _this.styles.borderRightColor = - _this.styles.borderBottomColor = - _this.styles.borderLeftColor = - 0xa5a5a5ff; - _this.styles.borderTopWidth = - _this.styles.borderRightWidth = - _this.styles.borderBottomWidth = - _this.styles.borderLeftWidth = - 1; - _this.styles.borderTopStyle = - _this.styles.borderRightStyle = - _this.styles.borderBottomStyle = - _this.styles.borderLeftStyle = - 1 /* SOLID */; - _this.styles.backgroundClip = [0 /* BORDER_BOX */]; - _this.styles.backgroundOrigin = [0 /* BORDER_BOX */]; - _this.bounds = reformatInputBounds(_this.bounds); - } - switch (_this.type) { - case CHECKBOX: - _this.styles.borderTopRightRadius = - _this.styles.borderTopLeftRadius = - _this.styles.borderBottomRightRadius = - _this.styles.borderBottomLeftRadius = - CHECKBOX_BORDER_RADIUS; - break; - case RADIO: - _this.styles.borderTopRightRadius = - _this.styles.borderTopLeftRadius = - _this.styles.borderBottomRightRadius = - _this.styles.borderBottomLeftRadius = - RADIO_BORDER_RADIUS; - break; - } - return _this; - } - return InputElementContainer; - })(ElementContainer); - - var SelectElementContainer = /** @class */ (function (_super) { - __extends(SelectElementContainer, _super); - function SelectElementContainer(context, element) { - var _this = _super.call(this, context, element) || this; - var option = element.options[element.selectedIndex || 0]; - _this.value = option ? option.text || "" : ""; - return _this; - } - return SelectElementContainer; - })(ElementContainer); - - var TextareaElementContainer = /** @class */ (function (_super) { - __extends(TextareaElementContainer, _super); - function TextareaElementContainer(context, element) { - var _this = _super.call(this, context, element) || this; - _this.value = element.value; - return _this; - } - return TextareaElementContainer; - })(ElementContainer); - - var IFrameElementContainer = /** @class */ (function (_super) { - __extends(IFrameElementContainer, _super); - function IFrameElementContainer(context, iframe) { - var _this = _super.call(this, context, iframe) || this; - _this.src = iframe.src; - _this.width = parseInt(iframe.width, 10) || 0; - _this.height = parseInt(iframe.height, 10) || 0; - _this.backgroundColor = _this.styles.backgroundColor; - try { - if ( - iframe.contentWindow && - iframe.contentWindow.document && - iframe.contentWindow.document.documentElement - ) { - _this.tree = parseTree( - context, - iframe.contentWindow.document.documentElement - ); - // http://www.w3.org/TR/css3-background/#special-backgrounds - var documentBackgroundColor = iframe.contentWindow.document - .documentElement - ? parseColor( - context, - getComputedStyle( - iframe.contentWindow.document.documentElement - ).backgroundColor - ) - : COLORS.TRANSPARENT; - var bodyBackgroundColor = iframe.contentWindow.document.body - ? parseColor( - context, - getComputedStyle(iframe.contentWindow.document.body) - .backgroundColor - ) - : COLORS.TRANSPARENT; - _this.backgroundColor = isTransparent(documentBackgroundColor) - ? isTransparent(bodyBackgroundColor) - ? _this.styles.backgroundColor - : bodyBackgroundColor - : documentBackgroundColor; - } - } catch (e) {} - return _this; - } - return IFrameElementContainer; - })(ElementContainer); - - var LIST_OWNERS = ["OL", "UL", "MENU"]; - var parseNodeTree = function (context, node, parent, root) { - for ( - var childNode = node.firstChild, nextNode = void 0; - childNode; - childNode = nextNode - ) { - nextNode = childNode.nextSibling; - if (isTextNode(childNode) && childNode.data.trim().length > 0) { - parent.textNodes.push( - new TextContainer(context, childNode, parent.styles) - ); - } else if (isElementNode(childNode)) { - if (isSlotElement(childNode) && childNode.assignedNodes) { - childNode.assignedNodes().forEach(function (childNode) { - return parseNodeTree(context, childNode, parent, root); - }); - } else { - var container = createContainer(context, childNode); - if (container.styles.isVisible()) { - if (createsRealStackingContext(childNode, container, root)) { - container.flags |= 4 /* CREATES_REAL_STACKING_CONTEXT */; - } else if (createsStackingContext(container.styles)) { - container.flags |= 2 /* CREATES_STACKING_CONTEXT */; - } - if (LIST_OWNERS.indexOf(childNode.tagName) !== -1) { - container.flags |= 8 /* IS_LIST_OWNER */; - } - parent.elements.push(container); - childNode.slot; - if (childNode.shadowRoot) { - parseNodeTree(context, childNode.shadowRoot, container, root); - } else if ( - !isTextareaElement(childNode) && - !isSVGElement(childNode) && - !isSelectElement(childNode) - ) { - parseNodeTree(context, childNode, container, root); - } - } - } - } - } - }; - var createContainer = function (context, element) { - if (isImageElement(element)) { - return new ImageElementContainer(context, element); - } - if (isCanvasElement(element)) { - return new CanvasElementContainer(context, element); - } - if (isSVGElement(element)) { - return new SVGElementContainer(context, element); - } - if (isLIElement(element)) { - return new LIElementContainer(context, element); - } - if (isOLElement(element)) { - return new OLElementContainer(context, element); - } - if (isInputElement(element)) { - return new InputElementContainer(context, element); - } - if (isSelectElement(element)) { - return new SelectElementContainer(context, element); - } - if (isTextareaElement(element)) { - return new TextareaElementContainer(context, element); - } - if (isIFrameElement(element)) { - return new IFrameElementContainer(context, element); - } - return new ElementContainer(context, element); - }; - var parseTree = function (context, element) { - var container = createContainer(context, element); - container.flags |= 4 /* CREATES_REAL_STACKING_CONTEXT */; - parseNodeTree(context, element, container, container); - return container; - }; - var createsRealStackingContext = function (node, container, root) { - return ( - container.styles.isPositionedWithZIndex() || - container.styles.opacity < 1 || - container.styles.isTransformed() || - (isBodyElement(node) && root.styles.isTransparent()) - ); - }; - var createsStackingContext = function (styles) { - return styles.isPositioned() || styles.isFloating(); - }; - var isTextNode = function (node) { - return node.nodeType === Node.TEXT_NODE; - }; - var isElementNode = function (node) { - return node.nodeType === Node.ELEMENT_NODE; - }; - var isHTMLElementNode = function (node) { - return ( - isElementNode(node) && - typeof node.style !== "undefined" && - !isSVGElementNode(node) - ); - }; - var isSVGElementNode = function (element) { - return typeof element.className === "object"; - }; - var isLIElement = function (node) { - return node.tagName === "LI"; - }; - var isOLElement = function (node) { - return node.tagName === "OL"; - }; - var isInputElement = function (node) { - return node.tagName === "INPUT"; - }; - var isHTMLElement = function (node) { - return node.tagName === "HTML"; - }; - var isSVGElement = function (node) { - return node.tagName === "svg"; - }; - var isBodyElement = function (node) { - return node.tagName === "BODY"; - }; - var isCanvasElement = function (node) { - return node.tagName === "CANVAS"; - }; - var isVideoElement = function (node) { - return node.tagName === "VIDEO"; - }; - var isImageElement = function (node) { - return node.tagName === "IMG"; - }; - var isIFrameElement = function (node) { - return node.tagName === "IFRAME"; - }; - var isStyleElement = function (node) { - return node.tagName === "STYLE"; - }; - var isScriptElement = function (node) { - return node.tagName === "SCRIPT"; - }; - var isTextareaElement = function (node) { - return node.tagName === "TEXTAREA"; - }; - var isSelectElement = function (node) { - return node.tagName === "SELECT"; - }; - var isSlotElement = function (node) { - return node.tagName === "SLOT"; - }; - // https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name - var isCustomElement = function (node) { - return node.tagName.indexOf("-") > 0; - }; - - var CounterState = /** @class */ (function () { - function CounterState() { - this.counters = {}; - } - CounterState.prototype.getCounterValue = function (name) { - var counter = this.counters[name]; - if (counter && counter.length) { - return counter[counter.length - 1]; - } - return 1; - }; - CounterState.prototype.getCounterValues = function (name) { - var counter = this.counters[name]; - return counter ? counter : []; - }; - CounterState.prototype.pop = function (counters) { - var _this = this; - counters.forEach(function (counter) { - return _this.counters[counter].pop(); - }); - }; - CounterState.prototype.parse = function (style) { - var _this = this; - var counterIncrement = style.counterIncrement; - var counterReset = style.counterReset; - var canReset = true; - if (counterIncrement !== null) { - counterIncrement.forEach(function (entry) { - var counter = _this.counters[entry.counter]; - if (counter && entry.increment !== 0) { - canReset = false; - if (!counter.length) { - counter.push(1); - } - counter[Math.max(0, counter.length - 1)] += entry.increment; - } - }); - } - var counterNames = []; - if (canReset) { - counterReset.forEach(function (entry) { - var counter = _this.counters[entry.counter]; - counterNames.push(entry.counter); - if (!counter) { - counter = _this.counters[entry.counter] = []; - } - counter.push(entry.reset); - }); - } - return counterNames; - }; - return CounterState; - })(); - var ROMAN_UPPER = { - integers: [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1], - values: [ - "M", - "CM", - "D", - "CD", - "C", - "XC", - "L", - "XL", - "X", - "IX", - "V", - "IV", - "I", - ], - }; - var ARMENIAN = { - integers: [ - 9000, 8000, 7000, 6000, 5000, 4000, 3000, 2000, 1000, 900, 800, 700, - 600, 500, 400, 300, 200, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 9, - 8, 7, 6, 5, 4, 3, 2, 1, - ], - values: [ - "Ք", - "Փ", - "Ւ", - "Ց", - "Ր", - "Տ", - "Վ", - "Ս", - "Ռ", - "Ջ", - "Պ", - "Չ", - "Ո", - "Շ", - "Ն", - "Յ", - "Մ", - "Ճ", - "Ղ", - "Ձ", - "Հ", - "Կ", - "Ծ", - "Խ", - "Լ", - "Ի", - "Ժ", - "Թ", - "Ը", - "Է", - "Զ", - "Ե", - "Դ", - "Գ", - "Բ", - "Ա", - ], - }; - var HEBREW = { - integers: [ - 10000, 9000, 8000, 7000, 6000, 5000, 4000, 3000, 2000, 1000, 400, 300, - 200, 100, 90, 80, 70, 60, 50, 40, 30, 20, 19, 18, 17, 16, 15, 10, 9, - 8, 7, 6, 5, 4, 3, 2, 1, - ], - values: [ - "י׳", - "ט׳", - "ח׳", - "ז׳", - "ו׳", - "ה׳", - "ד׳", - "ג׳", - "ב׳", - "א׳", - "ת", - "ש", - "ר", - "ק", - "צ", - "פ", - "ע", - "ס", - "נ", - "מ", - "ל", - "כ", - "יט", - "יח", - "יז", - "טז", - "טו", - "י", - "ט", - "ח", - "ז", - "ו", - "ה", - "ד", - "ג", - "ב", - "א", - ], - }; - var GEORGIAN = { - integers: [ - 10000, 9000, 8000, 7000, 6000, 5000, 4000, 3000, 2000, 1000, 900, 800, - 700, 600, 500, 400, 300, 200, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10, - 9, 8, 7, 6, 5, 4, 3, 2, 1, - ], - values: [ - "ჵ", - "ჰ", - "ჯ", - "ჴ", - "ხ", - "ჭ", - "წ", - "ძ", - "ც", - "ჩ", - "შ", - "ყ", - "ღ", - "ქ", - "ფ", - "ჳ", - "ტ", - "ს", - "რ", - "ჟ", - "პ", - "ო", - "ჲ", - "ნ", - "მ", - "ლ", - "კ", - "ი", - "თ", - "ჱ", - "ზ", - "ვ", - "ე", - "დ", - "გ", - "ბ", - "ა", - ], - }; - var createAdditiveCounter = function ( - value, - min, - max, - symbols, - fallback, - suffix - ) { - if (value < min || value > max) { - return createCounterText(value, fallback, suffix.length > 0); - } - return ( - symbols.integers.reduce(function (string, integer, index) { - while (value >= integer) { - value -= integer; - string += symbols.values[index]; - } - return string; - }, "") + suffix - ); - }; - var createCounterStyleWithSymbolResolver = function ( - value, - codePointRangeLength, - isNumeric, - resolver - ) { - var string = ""; - do { - if (!isNumeric) { - value--; - } - string = resolver(value) + string; - value /= codePointRangeLength; - } while (value * codePointRangeLength >= codePointRangeLength); - return string; - }; - var createCounterStyleFromRange = function ( - value, - codePointRangeStart, - codePointRangeEnd, - isNumeric, - suffix - ) { - var codePointRangeLength = codePointRangeEnd - codePointRangeStart + 1; - return ( - (value < 0 ? "-" : "") + - (createCounterStyleWithSymbolResolver( - Math.abs(value), - codePointRangeLength, - isNumeric, - function (codePoint) { - return fromCodePoint$1( - Math.floor(codePoint % codePointRangeLength) + - codePointRangeStart - ); - } - ) + - suffix) - ); - }; - var createCounterStyleFromSymbols = function (value, symbols, suffix) { - if (suffix === void 0) { - suffix = ". "; - } - var codePointRangeLength = symbols.length; - return ( - createCounterStyleWithSymbolResolver( - Math.abs(value), - codePointRangeLength, - false, - function (codePoint) { - return symbols[Math.floor(codePoint % codePointRangeLength)]; - } - ) + suffix - ); - }; - var CJK_ZEROS = 1 << 0; - var CJK_TEN_COEFFICIENTS = 1 << 1; - var CJK_TEN_HIGH_COEFFICIENTS = 1 << 2; - var CJK_HUNDRED_COEFFICIENTS = 1 << 3; - var createCJKCounter = function ( - value, - numbers, - multipliers, - negativeSign, - suffix, - flags - ) { - if (value < -9999 || value > 9999) { - return createCounterText( - value, - 4 /* CJK_DECIMAL */, - suffix.length > 0 - ); - } - var tmp = Math.abs(value); - var string = suffix; - if (tmp === 0) { - return numbers[0] + string; - } - for (var digit = 0; tmp > 0 && digit <= 4; digit++) { - var coefficient = tmp % 10; - if ( - coefficient === 0 && - contains(flags, CJK_ZEROS) && - string !== "" - ) { - string = numbers[coefficient] + string; - } else if ( - coefficient > 1 || - (coefficient === 1 && digit === 0) || - (coefficient === 1 && - digit === 1 && - contains(flags, CJK_TEN_COEFFICIENTS)) || - (coefficient === 1 && - digit === 1 && - contains(flags, CJK_TEN_HIGH_COEFFICIENTS) && - value > 100) || - (coefficient === 1 && - digit > 1 && - contains(flags, CJK_HUNDRED_COEFFICIENTS)) - ) { - string = - numbers[coefficient] + - (digit > 0 ? multipliers[digit - 1] : "") + - string; - } else if (coefficient === 1 && digit > 0) { - string = multipliers[digit - 1] + string; - } - tmp = Math.floor(tmp / 10); - } - return (value < 0 ? negativeSign : "") + string; - }; - var CHINESE_INFORMAL_MULTIPLIERS = "十百千萬"; - var CHINESE_FORMAL_MULTIPLIERS = "拾佰仟萬"; - var JAPANESE_NEGATIVE = "マイナス"; - var KOREAN_NEGATIVE = "마이너스"; - var createCounterText = function (value, type, appendSuffix) { - var defaultSuffix = appendSuffix ? ". " : ""; - var cjkSuffix = appendSuffix ? "、" : ""; - var koreanSuffix = appendSuffix ? ", " : ""; - var spaceSuffix = appendSuffix ? " " : ""; - switch (type) { - case 0 /* DISC */: - return "•" + spaceSuffix; - case 1 /* CIRCLE */: - return "◦" + spaceSuffix; - case 2 /* SQUARE */: - return "◾" + spaceSuffix; - case 5 /* DECIMAL_LEADING_ZERO */: - var string = createCounterStyleFromRange( - value, - 48, - 57, - true, - defaultSuffix - ); - return string.length < 4 ? "0" + string : string; - case 4 /* CJK_DECIMAL */: - return createCounterStyleFromSymbols( - value, - "〇一二三四五六七八九", - cjkSuffix - ); - case 6 /* LOWER_ROMAN */: - return createAdditiveCounter( - value, - 1, - 3999, - ROMAN_UPPER, - 3 /* DECIMAL */, - defaultSuffix - ).toLowerCase(); - case 7 /* UPPER_ROMAN */: - return createAdditiveCounter( - value, - 1, - 3999, - ROMAN_UPPER, - 3 /* DECIMAL */, - defaultSuffix - ); - case 8 /* LOWER_GREEK */: - return createCounterStyleFromRange( - value, - 945, - 969, - false, - defaultSuffix - ); - case 9 /* LOWER_ALPHA */: - return createCounterStyleFromRange( - value, - 97, - 122, - false, - defaultSuffix - ); - case 10 /* UPPER_ALPHA */: - return createCounterStyleFromRange( - value, - 65, - 90, - false, - defaultSuffix - ); - case 11 /* ARABIC_INDIC */: - return createCounterStyleFromRange( - value, - 1632, - 1641, - true, - defaultSuffix - ); - case 12 /* ARMENIAN */: - case 49 /* UPPER_ARMENIAN */: - return createAdditiveCounter( - value, - 1, - 9999, - ARMENIAN, - 3 /* DECIMAL */, - defaultSuffix - ); - case 35 /* LOWER_ARMENIAN */: - return createAdditiveCounter( - value, - 1, - 9999, - ARMENIAN, - 3 /* DECIMAL */, - defaultSuffix - ).toLowerCase(); - case 13 /* BENGALI */: - return createCounterStyleFromRange( - value, - 2534, - 2543, - true, - defaultSuffix - ); - case 14 /* CAMBODIAN */: - case 30 /* KHMER */: - return createCounterStyleFromRange( - value, - 6112, - 6121, - true, - defaultSuffix - ); - case 15 /* CJK_EARTHLY_BRANCH */: - return createCounterStyleFromSymbols( - value, - "子丑寅卯辰巳午未申酉戌亥", - cjkSuffix - ); - case 16 /* CJK_HEAVENLY_STEM */: - return createCounterStyleFromSymbols( - value, - "甲乙丙丁戊己庚辛壬癸", - cjkSuffix - ); - case 17 /* CJK_IDEOGRAPHIC */: - case 48 /* TRAD_CHINESE_INFORMAL */: - return createCJKCounter( - value, - "零一二三四五六七八九", - CHINESE_INFORMAL_MULTIPLIERS, - "負", - cjkSuffix, - CJK_TEN_COEFFICIENTS | - CJK_TEN_HIGH_COEFFICIENTS | - CJK_HUNDRED_COEFFICIENTS - ); - case 47 /* TRAD_CHINESE_FORMAL */: - return createCJKCounter( - value, - "零壹貳參肆伍陸柒捌玖", - CHINESE_FORMAL_MULTIPLIERS, - "負", - cjkSuffix, - CJK_ZEROS | - CJK_TEN_COEFFICIENTS | - CJK_TEN_HIGH_COEFFICIENTS | - CJK_HUNDRED_COEFFICIENTS - ); - case 42 /* SIMP_CHINESE_INFORMAL */: - return createCJKCounter( - value, - "零一二三四五六七八九", - CHINESE_INFORMAL_MULTIPLIERS, - "负", - cjkSuffix, - CJK_TEN_COEFFICIENTS | - CJK_TEN_HIGH_COEFFICIENTS | - CJK_HUNDRED_COEFFICIENTS - ); - case 41 /* SIMP_CHINESE_FORMAL */: - return createCJKCounter( - value, - "零壹贰叁肆伍陆柒捌玖", - CHINESE_FORMAL_MULTIPLIERS, - "负", - cjkSuffix, - CJK_ZEROS | - CJK_TEN_COEFFICIENTS | - CJK_TEN_HIGH_COEFFICIENTS | - CJK_HUNDRED_COEFFICIENTS - ); - case 26 /* JAPANESE_INFORMAL */: - return createCJKCounter( - value, - "〇一二三四五六七八九", - "十百千万", - JAPANESE_NEGATIVE, - cjkSuffix, - 0 - ); - case 25 /* JAPANESE_FORMAL */: - return createCJKCounter( - value, - "零壱弐参四伍六七八九", - "拾百千万", - JAPANESE_NEGATIVE, - cjkSuffix, - CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS - ); - case 31 /* KOREAN_HANGUL_FORMAL */: - return createCJKCounter( - value, - "영일이삼사오육칠팔구", - "십백천만", - KOREAN_NEGATIVE, - koreanSuffix, - CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS - ); - case 33 /* KOREAN_HANJA_INFORMAL */: - return createCJKCounter( - value, - "零一二三四五六七八九", - "十百千萬", - KOREAN_NEGATIVE, - koreanSuffix, - 0 - ); - case 32 /* KOREAN_HANJA_FORMAL */: - return createCJKCounter( - value, - "零壹貳參四五六七八九", - "拾百千", - KOREAN_NEGATIVE, - koreanSuffix, - CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS - ); - case 18 /* DEVANAGARI */: - return createCounterStyleFromRange( - value, - 0x966, - 0x96f, - true, - defaultSuffix - ); - case 20 /* GEORGIAN */: - return createAdditiveCounter( - value, - 1, - 19999, - GEORGIAN, - 3 /* DECIMAL */, - defaultSuffix - ); - case 21 /* GUJARATI */: - return createCounterStyleFromRange( - value, - 0xae6, - 0xaef, - true, - defaultSuffix - ); - case 22 /* GURMUKHI */: - return createCounterStyleFromRange( - value, - 0xa66, - 0xa6f, - true, - defaultSuffix - ); - case 22 /* HEBREW */: - return createAdditiveCounter( - value, - 1, - 10999, - HEBREW, - 3 /* DECIMAL */, - defaultSuffix - ); - case 23 /* HIRAGANA */: - return createCounterStyleFromSymbols( - value, - "あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん" - ); - case 24 /* HIRAGANA_IROHA */: - return createCounterStyleFromSymbols( - value, - "いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす" - ); - case 27 /* KANNADA */: - return createCounterStyleFromRange( - value, - 0xce6, - 0xcef, - true, - defaultSuffix - ); - case 28 /* KATAKANA */: - return createCounterStyleFromSymbols( - value, - "アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン", - cjkSuffix - ); - case 29 /* KATAKANA_IROHA */: - return createCounterStyleFromSymbols( - value, - "イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス", - cjkSuffix - ); - case 34 /* LAO */: - return createCounterStyleFromRange( - value, - 0xed0, - 0xed9, - true, - defaultSuffix - ); - case 37 /* MONGOLIAN */: - return createCounterStyleFromRange( - value, - 0x1810, - 0x1819, - true, - defaultSuffix - ); - case 38 /* MYANMAR */: - return createCounterStyleFromRange( - value, - 0x1040, - 0x1049, - true, - defaultSuffix - ); - case 39 /* ORIYA */: - return createCounterStyleFromRange( - value, - 0xb66, - 0xb6f, - true, - defaultSuffix - ); - case 40 /* PERSIAN */: - return createCounterStyleFromRange( - value, - 0x6f0, - 0x6f9, - true, - defaultSuffix - ); - case 43 /* TAMIL */: - return createCounterStyleFromRange( - value, - 0xbe6, - 0xbef, - true, - defaultSuffix - ); - case 44 /* TELUGU */: - return createCounterStyleFromRange( - value, - 0xc66, - 0xc6f, - true, - defaultSuffix - ); - case 45 /* THAI */: - return createCounterStyleFromRange( - value, - 0xe50, - 0xe59, - true, - defaultSuffix - ); - case 46 /* TIBETAN */: - return createCounterStyleFromRange( - value, - 0xf20, - 0xf29, - true, - defaultSuffix - ); - case 3 /* DECIMAL */: - default: - return createCounterStyleFromRange( - value, - 48, - 57, - true, - defaultSuffix - ); - } - }; - - var IGNORE_ATTRIBUTE = "data-html2canvas-ignore"; - var DocumentCloner = /** @class */ (function () { - function DocumentCloner(context, element, options) { - this.context = context; - this.options = options; - this.scrolledElements = []; - this.referenceElement = element; - this.counters = new CounterState(); - this.quoteDepth = 0; - if (!element.ownerDocument) { - throw new Error("Cloned element does not have an owner document"); - } - this.documentElement = this.cloneNode( - element.ownerDocument.documentElement, - false - ); - } - DocumentCloner.prototype.toIFrame = function ( - ownerDocument, - windowSize - ) { - var _this = this; - var iframe = createIFrameContainer(ownerDocument, windowSize); - if (!iframe.contentWindow) { - return Promise.reject("Unable to find iframe window"); - } - var scrollX = ownerDocument.defaultView.pageXOffset; - var scrollY = ownerDocument.defaultView.pageYOffset; - var cloneWindow = iframe.contentWindow; - var documentClone = cloneWindow.document; - /* Chrome doesn't detect relative background-images assigned in inline