code
stringlengths
1
5.19M
package
stringlengths
1
81
path
stringlengths
9
304
filename
stringlengths
4
145
import unittest import os import sys from io import StringIO # from onepassword import OnePassword def set_up_one_password(): """Set up a mock OnePassword Vault""" # domain = "test" # email = "user@test.com" # secret = "test_secret" # password = "a234567890b234567890c234567890d234567890e23" # account = "test" with open('.bash_profile', 'w') as f: f.write("OP_SESSION_test=fakelettersforsessionkey\n") f.close() os.environ["OP_SESSION_test"] = 'fakelettersforsessionkey' # return OnePassword(account=account, domain=domain, email=email, secret=secret, password=password) class TestClient(unittest.TestCase): @classmethod def setUpClass(cls): print('--- Set up TestClient ---') cls.user_home = "." os.environ["HOME"] = "." set_up_one_password() @classmethod def tearDownClass(cls): print('--- Tear down TestUtilities ---') os.remove('.bash_profile') def setUp(self): """Record print statements per test""" self.held, sys.stdout = sys.stdout, StringIO() def tearDown(self): """Clear print statements after each test""" sys.stdout = self.held os.environ["HOME"] = self.user_home def test_first_use(self): """ Tested by signin_wrapper hence signin by proxy. """ pass def test_signin_wrapper(self): """ Tested by signin. """ pass @unittest.skip("Travis bash profile cannot be read.") def test_signin(self): # p, s, d, b = self.op._signin(self.op.signin_domain, self.op.email_address, self.op.secret_key, # "test_password") # self.assertEqual(p, b"test_password") # self.assertIn(b"(ERROR) invalid account key length\n", s) # self.assertEqual(d, "test") # self.assertGreater(len(b.profile_lines), 0) pass def test_get_uuid(self): """ Without user interaction will not be signed in and be unable to get anything """ pass def test_get_document(self): """ Without user interaction will not be signed in and be unable to get anything """ pass def test_put_document(self): """ Tested in signin and read_bash_return. """ pass def test_update_document(self): """ Tested in delete_document, put_document and os. """ pass def test_delete_document(self): """ Tested in signing, get_uuid and read_bash_return. """ pass def test_signout(self): """ Tested in read_bash_return. """ pass def test_list_vaults(self): """ Tested in read_bash_return. """ pass def test_get_items(self): """ Without user interaction will not be signed in and be unable to list anything """ pass if __name__ == '__main__': unittest.main()
1password
/1password-1.0.1.tar.gz/1password-1.0.1/test/test_client.py
test_client.py
import os import json import platform import yaml import subprocess from subprocess import CompletedProcess from typing import Any from getpass import getpass from json import JSONDecodeError from onepassword.utils import read_bash_return, domain_from_email, Encryption, BashProfile, get_device_uuid, \ _spawn_signin from onepassword.exceptions import OnePasswordForgottenPassword class SignIn: """ Helper class for methods common between App and Manual sign in """ _env_account = "OP_ACCOUNT" def get_account(self, bash_profile: BashProfile | None = None) -> str: """ Get the 1Password account name, using either the stored name or inputs :param bash_profile: Stored bash profile. (Optional, default = None) :return: 1Password account name """ if bash_profile is None: return self._input_account() else: return self._get_account_bash(bash_profile) @staticmethod def _input_account() -> str: account = input("Please input your 1Password account name e.g. wandera from wandera.1password.com: ") return account def _get_account_bash(self, bash_profile: BashProfile) -> str: try: session_dict = bash_profile.get_key_value(self._env_account, fuzzy=True)[0] account = session_dict.get("OP_ACCOUNT").strip('\"') except AttributeError: account = self._input_account() except ValueError: raise ValueError("First signin failed or not executed.") return account @staticmethod def get_domain() -> str: """ Get the domain name for the 1Password account :return: 1Password domain name """ domain = input("Please input your 1Password domain in the format <something>.1password.com: ") return domain def _update_bash_account(self, account: str, bash_profile: BashProfile) -> None: os.environ[self._env_account] = account bash_profile.update_profile(self._env_account, account) def signin(self): pass class ManualSignIn(SignIn): """ Class to sign in to 1Password manually, see: https://developer.1password.com/docs/cli/sign-in-manually :param account: Shorthand account name for your 1Password account e.g. wandera from wandera.1password.com. (Optional, default = None) :param password: 1Password password. (Optional, default = None) """ _env_session = "OP_SESSION" def __init__(self, account: str | None = None, password: str | None = None) -> None: # pragma: no cover bp = BashProfile() os.environ["OP_DEVICE"] = get_device_uuid(bp) # reuse existing op session if isinstance(account, str) and "{}_{}".format(self._env_account, account) in os.environ: pass # Check first time: if true, full signin, else use shortened signin elif self._check_not_first_time(bp): self.encrypted_master_password, self.session_key = self.signin_wrapper( account=account, master_password=password ) else: self.first_use() def _check_not_first_time(self, bp: BashProfile) -> bool: for line in bp.profile_lines: if self._env_session in line: return True return False def first_use(self): # pragma: no cover """ Helper function to perform first time signin either with user interaction or not, depending on _init_ """ email_address = input("Please input your email address used for 1Password account: ") account = domain_from_email(email_address) signin_domain = account + ".1password.com" confirm_signin_domain = input("Is your 1Password domain: {} (y/n)? ".format(signin_domain)) if confirm_signin_domain == "y": pass else: signin_domain = self.get_domain() confirm_account = input("Is your 1Password account name: {} (y/n)? ".format(account)) if confirm_account == "y": pass else: account = self.get_account() secret_key = getpass("Please input your 1Password secret key: ") self.signin_wrapper(account, signin_domain, email_address, secret_key) def signin_wrapper( self, account: str | None = None, domain: str | None = None, email: str | None = None, secret_key: str | None = None, master_password: str | None = None ) -> tuple[str, str]: # pragma: no cover """ Helper function for user to sign in but allows for three incorrect passwords. If successful signs in and updates bash profile, if not raises exception and points user to 1Password support. :param account: Shorthand account name for your 1Password account e.g. wandera from wandera.1password.com. (Optional, default = None) :param domain: Full domain name of 1Password account e.g. wandera.1password.com (Optional, default=None) :param email: Email address of 1Password account (Optional, default=None) :param secret_key: Secret key of 1Password account (Optional, default=None) :param master_password: Password for 1Password account (Optional, default=None) :return: encrypted_str, session_key - used by signin to know of existing login """ password, session_key, domain, account, bp = self.signin(account, domain, email, secret_key, master_password) tries = 1 while tries < 3: if session_key is False: # Not the right password, trying again password, session_key, domain, account, bp = self.signin( account, domain, email, secret_key, master_password) tries += 1 pass else: self._update_bash_account(account, bp) os.environ["{}_{}".format(self._env_session, account)] = session_key.replace("\n", "") bp.update_profile("{}_{}".format(self._env_session, account), session_key.replace("\n", "")) encrypt = Encryption(session_key) encrypted_str = encrypt.encode(password) return encrypted_str, session_key raise OnePasswordForgottenPassword("You appear to have forgotten your password, visit: " "https://support.1password.com/forgot-master-password/") def signin( self, account: str | None = None, domain: str | None = None, email: str | None = None, secret_key: str | None = None, master_password: str | None = None ) -> tuple[bytes | None, str | bool, str | None, str | None | Any, BashProfile]: # pragma: no cover """ Helper function to prepare sign in for the user :param account: Shorthand name for your 1Password account e.g. wandera from wandera.1password.com (Optional, default=None) :param domain: Full domain name of 1Password account e.g. wandera.1password.com (Optional, default=None) :param email: Email address of 1Password account (Optional, default=None) :param secret_key: Secret key of 1Password account (Optional, default=None) :param master_password: Password for 1Password account (Optional, default=None) :return: master_password, sess_key, domain, bp - all used by wrapper """ bp = BashProfile() op_command = "" if master_password is not None: master_password = str.encode(master_password) else: if 'op' in locals(): initiated_class = locals()["op"] if 'session_key' and 'encrypted_master_password' in initiated_class.__dict__: encrypt = Encryption(initiated_class.session_key) master_password = str.encode(encrypt.decode(initiated_class.encrypted_master_password)) else: master_password = str.encode(getpass("Please input your 1Password master password: ")) if secret_key: op_command = "op account add --address {} --email {} --secret-key {} --shorthand {} --signin --raw".format( domain, email, secret_key, account) else: if account is None: try: session_dict = bp.get_key_value(self._env_session, fuzzy=True)[0] # list of dicts from BashProfile account = list(session_dict.keys())[0].split(self._env_session + "_")[1] except AttributeError: account = input("Please input your 1Password account name e.g. wandera from " "wandera.1password.com: ") except ValueError: raise ValueError("First signin failed or not executed.") op_command = "op signin --account {} --raw".format(account) sess_key = _spawn_signin(op_command, master_password) return master_password, sess_key, domain, account, bp class AppSignIn(SignIn): """ Class to sign in to 1Password using the 1Password app integration, see: https://developer.1password.com/docs/cli/app-integration :param account: Shorthand account name for your 1Password account e.g. wandera from wandera.1password.com. (Optional, default = None) """ def __init__(self, account: str | None = None) -> None: self.signin(account) @staticmethod def _do_signin(account: str) -> CompletedProcess[Any] | CompletedProcess[str]: return subprocess.run("op signin --account {}".format(account), shell=True, capture_output=True, text=True) @staticmethod def _do_open_app(default_error: str) -> CompletedProcess[Any] | CompletedProcess[str]: if platform.system() == "Darwin": return subprocess.run("open -a 1Password.app", shell=True) elif platform.system() == "Linux": return subprocess.run("1password", shell=True) else: raise ConnectionError(default_error) def _signin_wrapper(self, account: str) -> None: r = self._do_signin(account) if r.returncode != 0: if "please unlock it in the 1Password app" in r.stderr: open_app = self._do_open_app(r.stderr.rstrip("\n")) if open_app.returncode == 0: sign_in = self._do_signin(account) if sign_in.returncode != 0: raise ConnectionError(sign_in.stderr.rstrip("\n")) else: raise ConnectionError(r.stderr.rstrip("\n")) raise ConnectionError(r.stderr.rstrip("\n")) def signin(self, account: str | None = None) -> None: """ Sign in to your 1Password account using the app integration :param account: Shorthand account name for your 1Password account e.g. wandera from wandera.1password.com. (Optional, default = None) """ bash_profile = BashProfile() if account is None: account = self.get_account(bash_profile) self._signin_wrapper(account) self._update_bash_account(account, bash_profile) class OnePassword: """ Class for integrating with a OnePassword password manager :param signin_method: Sign in method for 1Password (Optional, default = 'app', options: 'app', 'manual') :param account: 1Password account name (Optional, default=None) :param password: password of 1Password account (Optional, default=None) """ def __init__(self, signin_method: str = "app", account: str | None = None, password: str | None = None) -> None: # pragma: no cover if signin_method == "app": self.signin_strategy = AppSignIn(account) elif signin_method == "manual": self.signin_strategy = ManualSignIn(account, password) else: raise ValueError("Unrecognised 'signin_method', options are: 'app' or 'manual'. " "See: https://developer.1password.com/docs/cli/verify") def get_uuid(self, docname: str, vault: str = "Private") -> str: # pragma: no cover """ Helper function to get the uuid for an item :param docname: Title of the item (not filename of documents) :param vault: Vault the item is in (Optional, default=Private) :return: Uuid of item or None if it doesn't exist """ items = self.list_items(vault=vault) for t in items: if t["title"] == docname: return t["id"] def get_document(self, docname: str, vault: str = "Private") -> dict | None: # pragma: no cover """ Helper function to get a document :param docname: Title of the document (not it's filename) :param vault: Vault the document is in (Optional, default=Private) :returns: Document or None if it doesn't exist """ docid = self.get_uuid(docname, vault=vault) try: return json.loads( read_bash_return("op document get {} --vault='{}' --format=Json".format(docid, vault), single=False)) except JSONDecodeError: yaml_attempt = yaml.safe_load(read_bash_return("op document get {} --vault='{}'".format(docid, vault), single=False)) if isinstance(yaml_attempt, dict): return yaml_attempt else: print("File {} does not exist in 1Password vault: {}".format(docname, vault)) return None def put_document(self, filename: str, title: str, vault: str = "Private") -> None: # pragma: no cover """ Helper function to put a document :param filename: Path and filename of document (must be saved locally already) :param title: Title you wish to call the document :param vault: Vault the document is in (Optional, default=Private) """ cmd = "op document create {} --title={} --vault='{}'".format(filename, title, vault) # [--tags=<tags>] response = read_bash_return(cmd) if len(response) == 0: self.signin_strategy.signin() read_bash_return(cmd) # self.signout() # else: # self.signout() def delete_document(self, title: str, vault: str = "Private") -> None: # pragma: no cover """ Helper function to delete a document :param title: Title of the document you wish to remove :param vault: Vault the document is in (Optional, default=Private) """ docid = self.get_uuid(title, vault=vault) cmd = "op item delete {} --vault='{}'".format(docid, vault) response = read_bash_return(cmd) if len(response) > 0: self.signin_strategy.signin() read_bash_return(cmd) # self.signout() # else: # self.signout() def update_document(self, filename: str, title: str, vault: str = 'Private') -> None: # pragma: no cover """ Helper function to update an existing document in 1Password. :param title: Name of the document in 1Password. :param filename: Path and filename of document (must be saved locally already). :param vault: Vault the document is in (Optional, default=Private). """ # delete the old document self.delete_document(title, vault=vault) # put the new updated one self.put_document(filename, title, vault=vault) # remove the saved file locally os.remove(filename) @staticmethod def signout(): """ Helper function to sign out of 1Password """ read_bash_return("op signout") @staticmethod def list_vaults(): """ Helper function to list all vaults """ return json.loads(read_bash_return("op vault list --format=json", single=False)) @staticmethod def list_items(vault: str = "Private") -> dict: """ Helper function to list all items in a certain vault :param vault: Vault the items are in (Optional, default=Private) :returns: Dictionary of all items """ items = json.loads(read_bash_return("op items list --vault='{}' --format=json".format(vault), single=False)) return items @staticmethod def get_item(uuid: str | bytes, fields: str | bytes | list | None = None): """ Helper function to get a certain field, you can find the UUID you need using list_items :param uuid: Uuid of the item you wish to get, no vault needed :param fields: To return only certain detail use either a specific field or list of them (Optional, default=None which means all fields returned) :return: Dictionary of the item with requested fields """ if isinstance(fields, list): items = read_bash_return( "op item get {} --fields label={}".format(uuid, ",label=".join(fields)), single=False ).rstrip('\n') item = dict(zip(fields, items.split(","))) elif isinstance(fields, str): item = { fields: read_bash_return( "op item get {} --fields label={}".format(uuid, fields), single=False).rstrip('\n') } else: item = json.loads(read_bash_return("op item get {} --format=json".format(uuid), single=False)) return item
1password
/1password-1.0.1.tar.gz/1password-1.0.1/onepassword/client.py
client.py
import os import base64 import pexpect from Crypto.Cipher import AES from Crypto.Util.Padding import pad BLOCK_SIZE = 32 # Bytes master_password_regex = 'Enter the password for [a-zA-Z0-9._%+-]+\@[a-zA-Z0-9-]+\.[a-zA-z]{2,4} at ' \ '[a-zA-Z0-9-.]+\.1password+\.[a-zA-z]{2,4}' def read_bash_return(cmd, single=True): process = os.popen(cmd) preprocessed = process.read() process.close() if single: return str(preprocessed.split("\n")[0]) else: return str(preprocessed) def docker_check(): f = None user_home = os.environ.get('HOME') for rcfile in ['.bashrc', '.bash_profile', '.zshrc', '.zprofile']: rcpath = os.path.join(user_home, rcfile) if os.path.exists(rcpath): f = open(os.path.join(user_home, rcpath), "r") break if not f: raise Exception("No sehll rc or profile files exist.") bash_profile = f.read() try: docker_flag = bash_profile.split('DOCKER_FLAG="')[1][0] if docker_flag == "t": return True else: return False except IndexError: return False def domain_from_email(address): """ Method to extract a domain without sld or tld from an email address :param address: email address to extract from :type address: str :return: domain (str) """ return address.split("@")[1].split(".")[0] def get_session_key(process_resp_before): new_line_response = [x for x in process_resp_before.decode("utf-8").split("\n") if "\r" not in x] if len(new_line_response) != 1: raise IndexError("Session keys not parsed correctly from response: {}.".format(process_resp_before)) else: return new_line_response[0] def _spawn_signin(command, m_password) -> str | bool: if command != "": p = pexpect.spawn(command) index = p.expect(master_password_regex) if index == 0: p.sendline(m_password) index = p.expect([pexpect.EOF, "\(401\) Unauthorized"]) if index == 0: sess_key = get_session_key(p.before) p.close() return sess_key elif index == 1: print("Input master password is not correct. Please try again") return False else: raise IOError("Onepassword command not valid") else: raise IOError("Spawn command not valid") class BashProfile: def __init__(self): f = None user_home = os.environ.get('HOME') for rcfile in ['.bashrc', '.bash_profile', '.zshrc', '.zprofile']: rcpath = os.path.join(user_home, rcfile) if os.path.exists(rcpath): f = open(os.path.join(user_home, rcpath), "r") break if not f: raise Exception("No shell rc or profile files exist.") self.other_profile_flag = False if docker_check(): f2 = None try: f2 = open(os.path.join(user_home, ".profile"), "r") except IOError: print("Profile file does not exist.") self.other_profile = f2.read() self.other_profile_filename = f2.name self.other_profile_flag = True self.other_profile_lines = f2.readlines() f2.close() self.profile_lines = f.readlines() self.profile = f.read() self.profile_filename = f.name f.close() def get_key_value(self, key, fuzzy=False): key_lines = self.get_key_line(key, fuzzy=fuzzy) if key_lines: key_values = [] for ky in key_lines: k = ky.split("=")[0].split(" ")[1] v = ky.split("=")[1] key_values.append({k: v}) return key_values else: raise ValueError("Environment variable does not exist.") def get_key_line(self, key, fuzzy=False): key_line = None if self.other_profile_flag: prof = [self.other_profile_lines, self.profile_lines] else: prof = [self.profile_lines] key_lines = [] for prof_lines in prof: if len(prof_lines) > 0: for p in prof_lines: if (~fuzzy) & (" {}=".format(key) in p): key_line = p elif fuzzy & (key in p): key_line = p key_lines.append(key_line.replace("\n", "")) return key_lines def write_profile(self, updated_lines): if self.other_profile_flag: prof_name = [self.other_profile_filename, self.profile_filename] else: prof_name = [self.profile_filename] for p in prof_name: with open(p, 'w') as writer: writer.writelines(updated_lines) writer.close() def update_profile(self, key, value): for lines in self.profile_lines: if key in lines: self.profile_lines.remove(lines) if isinstance(value, str): new_line = 'export {}="{}"\n'.format(key, value) self.profile_lines.append(new_line) self.write_profile(self.profile_lines) class Encryption: def __init__(self, secret_key): if isinstance(secret_key, str): self.secret_key = str.encode(secret_key)[0:BLOCK_SIZE] else: self.secret_key = secret_key[0:BLOCK_SIZE] self.cipher = AES.new(self.secret_key, AES.MODE_ECB) def decode(self, encoded): return self.cipher.decrypt(base64.b64decode(encoded)).decode('UTF-8').replace("\x1f", "") def encode(self, input_str): return base64.b64encode(self.cipher.encrypt(pad(input_str, BLOCK_SIZE))) def bump_version(version_type="patch"): """ Only run in the project root directory, this is for github to bump the version file only! :return: """ __root__ = os.path.abspath("") with open(os.path.join(__root__, 'VERSION')) as version_file: version = version_file.read().strip() all_version = version.replace('"', "").split(".") if version_type == "patch": new_all_version = version.split(".")[:-1] new_all_version.append(str(int(all_version[-1]) + 1)) elif version_type == "minor": new_all_version = [version.split(".")[0]] new_all_version.extend([str(int(all_version[1]) + 1), '0']) new_line = '.'.join(new_all_version) + "\n" with open("{}/VERSION".format(__root__), "w") as fp: fp.write(new_line) fp.close() def generate_uuid(): """ Generates a random UUID to be used for op in initial set up only for more details read here https://1password.community/discussion/114059/device-uuid :return: (str) """ return read_bash_return("head -c 16 /dev/urandom | base32 | tr -d = | tr '[:upper:]' '[:lower:]'") def get_device_uuid(bp): """ Attempts to get the device_uuid from the given BashProfile. If the device_uuid is not set in the BashProfile generates a new device_uuid and sets it in the given BashProfile. :return: (str) """ try: device_uuid = bp.get_key_value("OP_DEVICE")[0]['OP_DEVICE'].strip('"') except (AttributeError, ValueError): device_uuid = generate_uuid() bp.update_profile("OP_DEVICE", device_uuid) return device_uuid
1password
/1password-1.0.1.tar.gz/1password-1.0.1/onepassword/utils.py
utils.py
from .client import OnePassword __all__ = ["client", "exceptions", "OnePassword", "utils"]
1password
/1password-1.0.1.tar.gz/1password-1.0.1/onepassword/__init__.py
__init__.py
class OnePasswordForgottenPassword(Exception): pass
1password
/1password-1.0.1.tar.gz/1password-1.0.1/onepassword/exceptions.py
exceptions.py
def primo(n): if n > 1: if n==2: print("2") else: x = 0 for i in range(2, n+1): c = 0 for j in range(2, i+1): if (i % j) == 0: c = c+1 if c == 1: print (i, end=" ") x = x+1 print("\n") print ("Entre 2 y",n, "existen",x, "numeros primos") else: print ("Debe insertar un numero entero mayor que 1")
1primo1
/1primo1-1.0-py3-none-any.whl/mostrarprimo/__init__.py
__init__.py
<p align="center"> <br> <img src="https://github.com/qvco/1secMail-Python/assets/77382767/fde69c1a-b95f-4d78-af1a-2dca315204bc" alt="1secMail" width="700"> <!-- <br> 1secMail for Python <br> --> </p> <h4 align="center">An API wrapper for <a href="https://www.1secmail.com/" target="_blank">www.1secmail.com</a> written in Python.</h4> <p align="center"> <img src="https://img.shields.io/github/release/qvco/1secMail-Python"> <img src="https://img.shields.io/badge/python-3.8-blue.svg"> <img src="https://img.shields.io/badge/License-MIT-blue.svg"> </p> ### About This is an easy to use yet full-featured Python API wrapper for www.1secmail.com ↗ using the official 1secMail API. It allows you to easily create temporary email addresses for testing, verification, or other purposes where you need a disposable email address. > Asynchronous operations are also supported!:thumbsup: ### Install To install the package, you'll need Python 3.8 or above installed on your computer. From your command line: ```bash pip install 1secMail ``` <br> > **Note** > If you're willing to install the development version, do the following: ```bash git clone https://github.com/qvco/1secMail-Python.git cd 1secMail-Python pip install -r requirements.txt pip install -e . ``` ## Usage ### Generating Email Addresses To generate a list of random email addresses, use the `random_email()` method: ```python import secmail client = secmail.Client() client.random_email(amount=3) >>> ['c3fho3cry1@1secmail.net', '5qcd3d36zr@1secmail.org', 'b6fgeothtg@1secmail.net'] ``` You can also generate a custom email address by specifying the username and domain: > **Note** > Specifying a domain is optional! ```python client.custom_email(username="bobby-bob", domain="kzccv.com") >>> 'bobby-bob@kzccv.com' ``` ### Receiving Messages To wait until a new message is received, use the `await_new_message()` method: ```python message = client.await_new_message("bobby-bob@kzccv.com") ``` To check all messages received on a particular email address, use the `get_inbox()` method and pass the email address: ```python inbox = client.get_inbox("bobby-bob@kzccv.com") for message in inbox: print(message.id) print(message.from_address) print(message.subject) print(message.date) ``` You can also fetch a single message using the `get_message()` method and passing the email address and message ID: ```python message = client.get_message(address="bobby-bob@kzccv.com", message_id=235200687) print(message.id) print(message.subject) print(message.body) print(message.text_body) print(message.html_body) print(message.attachments) print(message.date) ``` ### Downloading an attachment You can download an attachment from a message in the inbox of a specified email address using the download_attachment method like this: ```python client.download_attachment(address, message_id, attachment_filename) >>> 'Path: (C:\Users\user\path/config/rocket.png), Size: 49071B' ``` ## Asynchronous Client ### Generating Email Addresses To generate a list of random email addresses, use the `random_email()` method: ```python import asyncio import secmail async def main(): client = secmail.AsyncClient() email_addresses = await client.random_email(amount=3) print(email_addresses) asyncio.run(main()) >>> ['c3fho3cry1@1secmail.net', '5qcd3d36zr@1secmail.org', 'b6fgeothtg@1secmail.net'] ``` You can also generate a custom email address by specifying the username and domain: > **Note** > Specifying a domain is optional! ```python await client.custom_email(username="bobby-bob", domain="kzccv.com") >>> 'bobby-bob@kzccv.com' ``` ### Receiving Messages To wait until a new message is received, use the `await_new_message()` method: ```python import asyncio import secmail async def main(): client = secmail.AsyncClient() message = await client.await_new_message("bobby-bob@kzccv.com") print(f"{message.from_address}: {message.subject}") asyncio.run(main()) ``` To check all messages received on a particular email address, use the `get_inbox()` method and pass the email address: ```python import asyncio import secmail async def main(): client = secmail.AsyncClient() inbox = await client.get_inbox("bobby-bob@kzccv.com") print(f"You have {len(inbox)} messages in your inbox.") for message in inbox: print(message.id) print(message.from_address) print(message.subject) print(message.date) asyncio.run(main()) ``` You can also fetch a single message using the `get_message()` method and passing the email address and message ID: ```python import asyncio import secmail async def main(): client = secmail.AsyncClient() address = "bobby-bob@kzccv.com" inbox = await client.get_inbox(address) message_id = inbox[0].id message = await client.get_message(address, message_id) print(message.id) print(message.subject) print(message.body) print(message.text_body) print(message.html_body) print(message.attachments) print(message.date) asyncio.run(main()) ``` ### Downloading an attachment You can download an attachment from a message in the inbox of a specified email address using the download_attachment method like this: ```python import asyncio import secmail async def main(): client = secmail.AsyncClient() address = "bobby-bob@kzccv.com" inbox = await client.get_inbox(address) message_id = inbox[0].id message = await client.get_message(address, message_id) attachment_filename = message.attachments[0].filename await client.download_attachment(address, message_id, attachment_filename) asyncio.run(main()) >>> 'Path: (C:\Users\user\path/config/rocket.png), Size: 49071B' ``` ## Licnese This software is licensed under the [MIT](https://github.com/qvco/1secMail-Python/blob/master/LICENSE) © [Qvco](https://github.com/qvco).
1secMail
/1secMail-1.1.0.tar.gz/1secMail-1.1.0/README.md
README.md
from setuptools import setup, find_packages from secmail.config import VERSION name = "1secMail" author = "qvco" author_email = "nikola.desuga@gmail.com" description = "📧 Simple and intuitive, yet full featured API wrapper for www.1secmail.com, supporting both synchronous and asynchronous operations." long_description_content_type = "text/markdown" license = "MIT" url = "https://github.com/qvco/1secMail-Python" keywords = [ "1secmail", "onesecmail", "tempmail", "disposable", "temporary", "email", "api", "wrapper", "library", "async", "asynchronous", ] install_requires = ["httpx>=0.17.1"] classifiers = [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", ] with open("README.md", "r", encoding="utf-8") as f: long_description = f.read() setup( name=name, author=author, author_email=author_email, maintainer=author, maintainer_email=author_email, version=VERSION, description=description, long_description=long_description, long_description_content_type=long_description_content_type, license=license, url=url, download_url=url, keywords=keywords, install_requires=install_requires, classifiers=classifiers, packages=find_packages(), )
1secMail
/1secMail-1.1.0.tar.gz/1secMail-1.1.0/setup.py
setup.py
VERSION = "1.1.0" DOMAIN_LIST = [ "1secmail.com", "1secmail.org", "1secmail.net", "kzccv.com", "qiott.com", "wuuvo.com", "icznn.com", "ezztt.com", ] GEN_RANDOM_MAILBOX = "?action=genRandomMailbox" GET_DOMAIN_LIST = "?action=getDomainList" GET_MESSAGES = "?action=getMessages" GET_SINGLE_MESSAGE = "?action=readMessage" DELETE_MAILBOX = "?action=deleteMailbox" DOWNLOAD = "?action=download"
1secMail
/1secMail-1.1.0.tar.gz/1secMail-1.1.0/secmail/config.py
config.py
import os import re import asyncio import random import string import httpx import time import json from typing import List from json import JSONDecodeError from .config import ( DOMAIN_LIST, GET_DOMAIN_LIST, GET_MESSAGES, GET_SINGLE_MESSAGE, DOWNLOAD, ) from .models import Inbox, Message # errors class SecMailError(Exception): """Base exception for 1secMail""" pass class BadRequestError(SecMailError): """BadRequestError() Exception raised for a 400 HTTP status code """ pass class AuthenticationError(SecMailError): """AuthenticationError() Exception raised for a 401 HTTP status code """ pass class ForbiddenError(SecMailError): """ForbiddenError() Exception raised for a 403 HTTP status code """ pass class NotFoundError(SecMailError): """NotFoundError() Exception raised for a 404 HTTP status code """ pass class RateLimitError(SecMailError): """RateLimitError() Exception raised for a 429 HTTP status code """ pass class ServerError(SecMailError): """ServerError() Exception raised for a 5xx HTTP status code """ pass # utils def is_valid_username(username: str) -> bool: if username is None or len(username) > 64: return False return bool( re.match(r"^[A-Za-z][A-Za-z0-9._-]*[A-Za-z0-9]$", username) and not re.search(r"\.\.|\-\-|\_\_|\.$", username) ) current_path = os.path.abspath(os.getcwd()) # client class Client: """An API wrapper for www.1secmail.com written in Python. >>> import secmail >>> client = secmail.Client() """ def __init__( self, base_path=current_path + "/config/", host="www.1secmail.com" ) -> None: self.base_path = base_path self.api_url = "https://" + host + "/api/v1/" self.client = httpx.Client() def _request(self, action: str, params=None, data_type=None): r = self.client.request(method="GET", url=self.api_url + action, params=params) if r.status_code == 400: raise BadRequestError(f"HTTP {r.status_code}: {r.text}") if r.status_code == 401: raise AuthenticationError(f"HTTP {r.status_code}: {r.text}") if r.status_code == 403: raise ForbiddenError(f"HTTP {r.status_code}: {r.text}") if r.status_code == 404: raise NotFoundError(f"HTTP {r.status_code}: {r.text}") if r.status_code == 429: raise RateLimitError(f"HTTP {r.status_code}: {r.text}") if r.status_code == 500: raise ServerError(f"HTTP {r.status_code}: {r.text}") if action == DOWNLOAD: return r.content try: r = r.json() except JSONDecodeError: return r.text if data_type is not None: if isinstance(r, list): r = [data_type(result) for result in r] elif r is not None: r = data_type(r) return r @staticmethod def random_email(amount: int, domain: str = None) -> List[str]: """This method generates a list of random email addresses. Parameters: ---------- - `amount`: `int` - The number of email addresses to generate. - `domain`: `str` (optional) - The domain name to use for the email addresses. If not provided, a random domain from the valid list of domains will be selected. Example: ------- Generate a list of 5 email addresses with the domain "1secmail.com": >>> client.random_email(amount=5, domain="1secmail.com") Valid domains: ------------- - 1secmail.com - 1secmail.org - 1secmail.net - kzccv.com - qiott.com - wuuvo.com - icznn.com - ezztt.com If `domain` is provided and not in the valid list of domains, a ValueError will be raised with a message indicating the invalid domain and the valid list of domains. """ if domain is not None and domain not in DOMAIN_LIST: err_msg = ( f"{domain} is not a valid domain name.\nValid Domains: {DOMAIN_LIST}" ) raise ValueError(err_msg) emails = [] for _ in range(amount): username = "".join( random.choices(string.ascii_lowercase + string.digits, k=12) ) email = f"{username}@{domain or random.choice(DOMAIN_LIST)}" emails.append(email) return emails @staticmethod def custom_email(username: str, domain: str = None) -> str: """This method generates a custom email address. Parameters: ---------- - `username`: `str` - The username to use for the email address. - `domain`: `str` (optional) - The domain name to use for the email address. If not provided, a random domain from the valid list of domains will be selected. Returns: ------- - `email`: `str` - The generated email address. Example: ------- Generate a custom email address with the username "johndoe": >>> client.custom_email(username="johndoe") Valid domains: ------------- - 1secmail.com - 1secmail.org - 1secmail.net - kzccv.com - qiott.com - wuuvo.com - icznn.com - ezztt.com If `domain` is provided and not in the valid list of domains, a ValueError will be raised with a message indicating the invalid domain and the valid list of domains. """ if domain is not None and domain not in DOMAIN_LIST: err_msg = ( f"{domain} is not a valid domain name.\nValid Domains: {DOMAIN_LIST}" ) raise ValueError(err_msg) if is_valid_username(username) is False: err_msg = f"'{username}' is not a valid username." raise ValueError(err_msg) return f"{username}@{domain or random.choice(DOMAIN_LIST)}" def await_new_message(self, address: str, fetch_interval=5) -> Inbox: """This method waits until a new message is received for the specified email address. Parameters: ---------- - `address`: `str` - The email address to check for new messages. - `fetch_interval`: `int` (optional) - The time interval (in seconds) for checking new messages. The default value is 5 seconds. Returns: ------- - `message`: `Inbox` - The new message received. Example: ------- Wait for a new message to be received for the email address "johndoe@1secmail.com": >>> message = client.await_new_message("johndoe@1secmail.com") The method will continuously check for new messages every `fetch_interval` seconds until a new message is received. Once a new message is received, the message object is returned. The method also maintains a set of message IDs to check if the message is new. If the same message is received again, the method will continue to wait for a new message. Note that if no new messages are received for a long time, the method may take a long time to return. """ ids = {message.id for message in self.get_inbox(address)} while True: time.sleep(fetch_interval) new_messages = self.get_inbox(address) for message in new_messages: if message.id not in ids: return message def get_active_domains(self) -> List[str]: """This method retrieves a list of currently active domains. Returns: ------- - `domains`: `List[str]` - A list of active domains. Example: ------- Get a list of active domains: >>> domains = client.get_active_domains() The method sends a GET request to the API endpoint to retrieve a list of currently active domains. The list is returned as a list of strings. Note that the list of active domains may change over time. """ return self._request(action=GET_DOMAIN_LIST) def get_inbox(self, address: str) -> List[Inbox]: """This method retrieves all the messages in the mailbox for the specified email address. Parameters: ---------- - `address`: `str` - The email address to check for messages. Returns: ------- - `messages`: `List[Inbox]` - A list of message objects in the mailbox. Example: ------- Get all the messages in the mailbox for the email address "johndoe@1secmail.com": >>> messages = client.get_inbox("johndoe@1secmail.com") The method sends a GET request to the API endpoint to retrieve all the messages in the mailbox for the specified email address. The messages are returned as a list of inbox objects. If there are no messages in the mailbox, an empty list is returned. """ username, domain = address.split("@") return self._request( action=GET_MESSAGES, params={"login": username, "domain": domain}, data_type=Inbox, ) def get_message(self, address: str, message_id: int) -> Message: """This method retrieves a detailed message from the mailbox for the specified email address and message ID. Parameters: ---------- - `address`: `str` - The email address to check for the message. - `message_id`: `int` - The ID of the message to retrieve. Returns: ------- - `message`: `Message` - The message object with the specified ID. Example: ------- Get the message with ID 12345 in the mailbox for the email address "johndoe@1secmail.com": >>> message = client.get_message("johndoe@1secmail.com", 12345) The method sends a GET request to the API endpoint to retrieve the message with the specified ID in the mailbox for the specified email address. The message is returned as a message object. """ username, domain = address.split("@") return self._request( action=GET_SINGLE_MESSAGE, params={"login": username, "domain": domain, "id": message_id}, data_type=Message, ) def save_email(self, address: str) -> None: """This method saves the specified email address to a JSON file for future use. Parameters: ---------- - `address`: `str` - The email address to save. Example: ------- Save the email address "johndoe@1secmail.com" to the JSON file: >>> client.save_email("johndoe@1secmail.com") The JSON file is saved in the base path specified during client initialization, with the name `secmail.json`. """ data = {} if not os.path.exists(self.base_path): os.mkdir(self.base_path) if os.path.exists(self.base_path + "secmail.json"): with open(self.base_path + "secmail.json", "r") as f: data = json.load(f) data.setdefault("email", []).append(address) with open(self.base_path + "secmail.json", "w") as f: json.dump(data, f, indent=4) def download_attachment( self, address: str, message_id: int, filename: str, save_path: str = current_path + "/config/", ): """This method downloads an attachment from a message in the mailbox for the specified email address and message ID. Parameters: ---------- - `address`: `str` - The email address to check for the message containing the attachment. - `message_id`: `int` - The ID of the message containing the attachment to download. - `filename`: `str` - The name of the attachment file to download. - `save_path`: `str` - Optional. The path to save the downloaded attachment. Default is the current path + "/config/". Returns: ------- - `str` - A string indicating the path and size of the downloaded attachment. Example: ------- Download the attachment named "report.pdf" from the message with ID 12345 in the mailbox for the email address "johndoe@1secmail.com": >>> download_attachment("johndoe@1secmail.com", 12345, "report.pdf") """ username, domain = address.split("@") attachment = self._request( action=DOWNLOAD, params={ "login": username, "domain": domain, "id": message_id, "file": filename, }, ) if not os.path.exists(self.base_path): os.mkdir(self.base_path) with open(save_path + filename, "wb") as attachment_file: size = attachment_file.write(attachment) return "Path: (" + save_path + filename + "), Size: " + str(size) + "B" # async client class AsyncClient: """An API wrapper for www.1secmail.com written in Python. >>> import secmail >>> client = secmail.AsyncClient() """ def __init__( self, base_path=current_path + "/config/", host="www.1secmail.com" ) -> None: self.base_path = base_path self.api_url = "https://" + host + "/api/v1/" self.client = httpx.AsyncClient() async def _request(self, action: str, params=None, data_type=None): r = await self.client.request( method="GET", url=self.api_url + action, params=params ) if r.status_code == 400: raise BadRequestError(f"HTTP {r.status_code}: {r.text}") if r.status_code == 401: raise AuthenticationError(f"HTTP {r.status_code}: {r.text}") if r.status_code == 403: raise ForbiddenError(f"HTTP {r.status_code}: {r.text}") if r.status_code == 404: raise NotFoundError(f"HTTP {r.status_code}: {r.text}") if r.status_code == 429: raise RateLimitError(f"HTTP {r.status_code}: {r.text}") if r.status_code == 500: raise ServerError(f"HTTP {r.status_code}: {r.text}") if action == DOWNLOAD: return r.content try: r = r.json() except JSONDecodeError: return r.text if data_type is not None: if isinstance(r, list): r = [data_type(result) for result in r] elif r is not None: r = data_type(r) return r @staticmethod def random_email(amount: int, domain: str = None) -> List[str]: """This method generates a list of random email addresses. Parameters: ---------- - `amount`: `int` - The number of email addresses to generate. - `domain`: `str` (optional) - The domain name to use for the email addresses. If not provided, a random domain from the valid list of domains will be selected. Example: ------- Generate a list of 5 email addresses with the domain "1secmail.com": >>> client.random_email(amount=5, domain="1secmail.com") Valid domains: ------------- - 1secmail.com - 1secmail.org - 1secmail.net - kzccv.com - qiott.com - wuuvo.com - icznn.com - ezztt.com If `domain` is provided and not in the valid list of domains, a ValueError will be raised with a message indicating the invalid domain and the valid list of domains. """ if domain is not None and domain not in DOMAIN_LIST: err_msg = ( f"{domain} is not a valid domain name.\nValid Domains: {DOMAIN_LIST}" ) raise ValueError(err_msg) emails = [] for _ in range(amount): username = "".join( random.choices(string.ascii_lowercase + string.digits, k=12) ) email = f"{username}@{domain or random.choice(DOMAIN_LIST)}" emails.append(email) return emails @staticmethod def custom_email(username: str, domain: str = None) -> str: """This method generates a custom email address. Parameters: ---------- - `username`: `str` - The username to use for the email address. - `domain`: `str` (optional) - The domain name to use for the email address. If not provided, a random domain from the valid list of domains will be selected. Returns: ------- - `email`: `str` - The generated email address. Example: ------- Generate a custom email address with the username "johndoe": >>> client.custom_email(username="johndoe") Valid domains: ------------- - 1secmail.com - 1secmail.org - 1secmail.net - kzccv.com - qiott.com - wuuvo.com - icznn.com - ezztt.com If `domain` is provided and not in the valid list of domains, a ValueError will be raised with a message indicating the invalid domain and the valid list of domains. """ if domain is not None and domain not in DOMAIN_LIST: err_msg = ( f"{domain} is not a valid domain name.\nValid Domains: {DOMAIN_LIST}" ) raise ValueError(err_msg) if is_valid_username(username) is False: err_msg = f"'{username}' is not a valid username." raise ValueError(err_msg) return f"{username}@{domain or random.choice(DOMAIN_LIST)}" async def await_new_message(self, address: str, fetch_interval=5) -> Inbox: """This method waits until a new message is received for the specified email address. Parameters: ---------- - `address`: `str` - The email address to check for new messages. - `fetch_interval`: `int` (optional) - The time interval (in seconds) for checking new messages. The default value is 5 seconds. Returns: ------- - `message`: `Inbox` - The new message received. Example: ------- Wait for a new message to be received for the email address "johndoe@1secmail.com": >>> message = await client.await_new_message("johndoe@1secmail.com") The method will continuously check for new messages every `fetch_interval` seconds until a new message is received. Once a new message is received, the message object is returned. The method also maintains a set of message IDs to check if the message is new. If the same message is received again, the method will continue to wait for a new message. Note that if no new messages are received for a long time, the method may take a long time to return. """ ids = {message.id for message in await self.get_inbox(address)} while True: await asyncio.sleep(fetch_interval) new_messages = await self.get_inbox(address) for message in new_messages: if message.id not in ids: return message async def get_active_domains(self) -> List[str]: """This method retrieves a list of currently active domains. Returns: ------- - `domains`: `List[str]` - A list of active domains. Example: ------- Get a list of active domains: >>> domains = await client.get_active_domains() The method sends a GET request to the API endpoint to retrieve a list of currently active domains. The list is returned as a list of strings. Note that the list of active domains may change over time. """ return await self._request(action=GET_DOMAIN_LIST) async def get_inbox(self, address: str) -> List[Inbox]: """This method retrieves all the messages in the mailbox for the specified email address. Parameters: ---------- - `address`: `str` - The email address to check for messages. Returns: ------- - `messages`: `List[Inbox]` - A list of message objects in the mailbox. Example: ------- Get all the messages in the mailbox for the email address "johndoe@1secmail.com": >>> messages = await client.get_inbox("johndoe@1secmail.com") The method sends a GET request to the API endpoint to retrieve all the messages in the mailbox for the specified email address. The messages are returned as a list of inbox objects. If there are no messages in the mailbox, an empty list is returned. """ username, domain = address.split("@") return await self._request( action=GET_MESSAGES, params={"login": username, "domain": domain}, data_type=Inbox, ) async def get_message(self, address: str, message_id: int) -> Message: """This method retrieves a detailed message from the mailbox for the specified email address and message ID. Parameters: ---------- - `address`: `str` - The email address to check for the message. - `message_id`: `int` - The ID of the message to retrieve. Returns: ------- - `message`: `Message` - The message object with the specified ID. Example: ------- Get the message with ID 12345 in the mailbox for the email address "johndoe@1secmail.com": >>> message = await client.get_message("johndoe@1secmail.com", 12345) The method sends a GET request to the API endpoint to retrieve the message with the specified ID in the mailbox for the specified email address. The message is returned as a message object. """ username, domain = address.split("@") return await self._request( action=GET_SINGLE_MESSAGE, params={"login": username, "domain": domain, "id": message_id}, data_type=Message, ) async def save_email(self, address: str) -> None: """This method saves the specified email address to a JSON file for future use. Parameters: ---------- - `address`: `str` - The email address to save. Example: ------- Save the email address "johndoe@1secmail.com" to the JSON file: >>> await client.save_email("johndoe@1secmail.com") The JSON file is saved in the base path specified during client initialization, with the name `secmail.json`. """ data = {} if not os.path.exists(self.base_path): os.mkdir(self.base_path) if os.path.exists(self.base_path + "secmail.json"): with open(self.base_path + "secmail.json", "r") as f: data = json.load(f) data.setdefault("email", []).append(address) with open(self.base_path + "secmail.json", "w") as f: json.dump(data, f, indent=4) async def download_attachment( self, address: str, message_id: int, filename: str, save_path: str = current_path + "/config/", ): """This method downloads an attachment from a message in the mailbox for the specified email address and message ID. Parameters: ---------- - `address`: `str` - The email address to check for the message containing the attachment. - `message_id`: `int` - The ID of the message containing the attachment to download. - `filename`: `str` - The name of the attachment file to download. - `save_path`: `str` - Optional. The path to save the downloaded attachment. Default is the current path + "/config/". Returns: ------- - `str` - A string indicating the path and size of the downloaded attachment. Example: ------- Download the attachment named "report.pdf" from the message with ID 12345 in the mailbox for the email address "johndoe@1secmail.com": >>> await download_attachment("johndoe@1secmail.com", 12345, "report.pdf") """ username, domain = address.split("@") attachment = await self._request( action=DOWNLOAD, params={ "login": username, "domain": domain, "id": message_id, "file": filename, }, ) if not os.path.exists(self.base_path): os.mkdir(self.base_path) with open(save_path + filename, "wb") as attachment_file: size = attachment_file.write(attachment) return "Path: (" + save_path + filename + "), Size: " + str(size) + "B"
1secMail
/1secMail-1.1.0.tar.gz/1secMail-1.1.0/secmail/client.py
client.py
from .client import * from .config import * from .models import * __version__ = config.VERSION __all__ = ["Client"]
1secMail
/1secMail-1.1.0.tar.gz/1secMail-1.1.0/secmail/__init__.py
__init__.py
class Inbox: """The inbox object contains an array of email objects, each with an unique ID,\n sender's email address, subject line, and date and time the email was sent. --- Attributes: ---------- - id : (``int``) - Message id - from_address : (``str``) - Sender email address - subject : (``str``) - Subject - date : (``str``) - Receive date """ __slots__ = ("id", "from_address", "subject", "date") def __init__(self, response) -> None: self.id = response.get("id") self.from_address = response.get("from") self.subject = response.get("subject") self.date = response.get("date") def __repr__(self) -> str: return f"MailBox(id={self.id}, from_address={self.from_address}, subject={self.subject}, date={self.date})" class Message: """The message object contains an unique ID, sender's email address,\n subject line, date and time the email was sent, list of attachment object,\n body (html if exists, text otherwise), text body and HTML body. --- Attributes: ---------- - id : (``int``) - Message id - from_address : (``str``) - Sender email address - subject : (``str``) - Subject - date : (``str``) - Receive date - attachments : (``str``) - List of Attachment object - body : (``str``) - Message body (html if exists, text otherwise) - text_body : (``str``) - Message body (text) - html_body : (``str``) - Message body (html) """ __slots__ = ( "id", "from_address", "subject", "date", "attachments", "body", "text_body", "html_body", ) def __init__(self, response) -> None: self.id = response.get("id") self.from_address = response.get("from") self.subject = response.get("subject") self.date = response.get("date") self.attachments = response.get("attachments") if self.attachments is not None: self.attachments = [ Attachment(attachment) for attachment in self.attachments ] self.body = response.get("body") self.text_body = response.get("textBody") self.html_body = response.get("htmlBody") def __repr__(self) -> str: return ( f"Message(id={self.id}, from_address={self.from_address}, subject={self.subject}, " f"date={self.date}, attachments={self.attachments}, body={self.body}, " f"text_body={self.text_body}, html_body={self.html_body})" ) class Attachment: """The attachment object contains the attachment's filename, content_type and file size. --- Attributes: ---------- - filename : (``str``) - Attachment filename - content_type : (``str``) - Attachment content type - size : (``int``) - Attachment size """ __slots__ = "filename", "content_type", "size" def __init__(self, response) -> None: self.filename = response.get("filename") self.content_type = response.get("contentType") self.size = response.get("size") def __repr__(self) -> str: return f"Attachment(filename={self.filename}, content_type={self.content_type}, size={self.size})"
1secMail
/1secMail-1.1.0.tar.gz/1secMail-1.1.0/secmail/models.py
models.py
from setuptools import setup setup( name='1secmail python', version='0.1.1.1', description='A useful module for accessing the api of 1secmail', long_description="In github", author='pfp', packages=['1secmail'], license="mit", url = "https://github.com/pfpcio/1secmailpythonwarper", install_requires=['requests'], #needs requests )
1secmailpythonwarper
/1secmailpythonwarper-0.0.1.tar.gz/1secmailpythonwarper-0.0.1/setup.py
setup.py
from __future__ import annotations __version__ = "0.0.1"
1secmailpythonwarper
/1secmailpythonwarper-0.0.1.tar.gz/1secmailpythonwarper-0.0.1/1secmail/__init__.py
__init__.py
import requests class warper(): def __init__(self): print('Loaded the warper') def get_emails(self,amount:int=None): if amount==None:amount=1 self.emails = requests.get(f"https://www.1secmail.com/api/v1/?action=genRandomMailbox&count={str(amount)}").text return self.emails def domain_list(self): return requests.get('https://www.1secmail.com/api/v1/?action=getDomainList').text def email_list(self): return self.emails def check_inbox(self,email): user,domain = email.split('@') r = requests.get(f'https://www.1secmail.com/api/v1/?action=getMessages&login={user}&domain={domain}') return r.text
1secmailpythonwarper
/1secmailpythonwarper-0.0.1.tar.gz/1secmailpythonwarper-0.0.1/1secmail/warper.py
warper.py
def abc(): s=input() s1=sorted(s) s2=list(set(s1)) s2=sorted(s2) dic={s2[i]:s1.count(s2[i])for i in range(len(s2))} dic1=((sorted(dic,key=dic.get,reverse=True))[0:3]) print(dic1) if (__name__=="__abc__"): main()
1st
/1st-1.0.0-py3-none-any.whl/assignment.py
assignment.py
UNKNOWN
1st
/1st-1.0.0-py3-none-any.whl/1st-1.0.0.dist-info/DESCRIPTION.rst
DESCRIPTION.rst
1stCaptcha package for Python = [1stcaptcha.com](https://1stcaptcha.com) package for Python3 Solver recaptchaV2, recaptchaV3, hcaptcha, funcaptcha, imageToText, Zalo Captcha,.... Super fast and cheapest. # Install ```bash pip install 1stcaptcha ``` # Usage ## init client ```python from onest_captcha import OneStCaptchaClient APIKEY = "0aa92cd8393a49698c408ea0ee56c2a5" client = OneStCaptchaClient(apikey=APIKEY) ``` ## solver recaptcha v2: ```python result = client.recaptcha_v2_task_proxyless(site_url="YOUR_SITE_URL", site_key="YOUR_SITE_KEY", invisible=False) if result["code"] == 0: # success: print(result["token"]) else: # wrong print(result["messeage"]) ``` ## solver recaptcha v2 enterprise: ```python result = client.recaptcha_v2_enterprise_task_proxyless(site_url="YOUR_SITE_URL", site_key="YOUR_SITE_KEY") if result["code"] == 0: # success: print(result["token"]) else: # wrong print(result["messeage"]) ``` ## solver recaptcha v3: ```python result = client.recaptcha_v3_task_proxyless(site_url="YOUR_SITE_URL", site_key="YOUR_SITE_KEY", page_action="YOUR_PAGE_ACTION") if result["code"] == 0: # success: print(result["token"]) else: # wrong print(result["messeage"]) ``` ## solver recaptcha v3 enterprise: ```python result = client.recaptcha_v3_enterprise_task_proxyless(site_key="YOUR_SITE_KEY", site_url="YOUR_SITE_URL", page_action="YOUR_PAGE_ACTION") if result["code"] == 0: # success: print(result.get('token')) print(result.get('user_agent')) else: # wrong print(result["messeage"]) ``` ## solve image2text ```python result = client.image_to_text(file="1.jpg") if result["code"] == 0: # success: print(result["token"]) else: # wrong print(result["messeage"]) ``` ## solve recaptchaClick ```python url_list = [''] caption = 'cars' result = client.recaptcha_click(url_list=url_list, caption=caption) if result["code"] == 0: # success: print(result["token"]) else: # wrong print(result["messeage"]) ``` ## funcaptcha ```python site_key = "2CB16598-CB82-4CF7-B332-5990DB66F3AB" site_url = "https://outlook.com/" result = client.fun_captcha_task_proxyless(site_url, site_key) if result["code"] == 0: # success: print(result["token"]) else: # wrong print(result["messeage"]) ``` ## hcaptcha ```python site_key = "f5561ba9-8f1e-40ca-9b5b-a0b3f719ef34" site_url = "https://discord.com/login" token = client.h_captcha_task_proxyless(site_key=site_key, site_url=site_url) if result["code"] == 0: # success: print(result["token"]) else: # wrong print(result["messeage"]) ```
1stcaptcha
/1stcaptcha-1.0.6.tar.gz/1stcaptcha-1.0.6/README.md
README.md
import base64 import time import requests def convert_img_to_base64(img_path): with open(img_path, "rb") as img_file: b64_string = base64.b64encode(img_file.read()) return b64_string.decode("utf8") class OneStCaptchaClient: def __init__(self, apikey): self.apikey = apikey self.BASE_URL = "https://api.1stcaptcha.com" def get_balance(self): r = requests.get(f"{self.BASE_URL}/user/balance?apikey=" + self.apikey) if r.status_code == 200: data = r.json() if data['Code'] == 0: return data['Balance'] else: raise RuntimeError("Error " + str(data)) else: raise RuntimeError("Error " + r.text) def get_result(self, task_id, timeout, time_sleep, type_captcha=""): t_start = time.time() while (time.time() - t_start) < timeout: r = requests.get(f"{self.BASE_URL}/getresult?apikey=" + self.apikey + "&taskid=" + str(task_id)) if r.status_code == 200: data = r.json() if data['Code'] == 0: if data['Status'] == "SUCCESS": if type_captcha == "image2text" or type_captcha == "recaptcha_click": return data["Data"] elif type_captcha == "v3_enterprise": return data["Data"] return data["Data"]["Token"] elif data['Status'] == "ERROR": raise Exception(data["Message"]) time.sleep(time_sleep) else: raise RuntimeError("Error " + data["Message"]) else: raise RuntimeError("Error " + r.text) raise RuntimeError("TIMEOUT") def recaptcha_v2_task_proxyless(self, site_url, site_key, invisible=False, timeout=180, time_sleep=1): try: params = { "apikey": self.apikey, "sitekey": site_key, "siteurl": site_url, "version": "v2", "invisible": str(invisible).lower() } r = requests.get( f"{self.BASE_URL}/recaptchav2", params=params ) if r.status_code == 200: data = r.json() if data['Code'] == 0: task_id = data['TaskId'] else: raise RuntimeError("Error " + str(data)) else: raise RuntimeError("Error " + r.text) return {"code": 0, "token": self.get_result(task_id, timeout, time_sleep)} except Exception as e: return {"code": 1, "messeage": str(e)} def recaptcha_v2_enterprise_task_proxyless(self, site_url, site_key, s_payload=None, timeout=180, time_sleep=1): try: params = { "apikey": self.apikey, "sitekey": site_key, "siteurl": site_url, } if s_payload: params["s"] = s_payload r = requests.get( f"{self.BASE_URL}/recaptchav2_enterprise", params=params ) if r.status_code == 200: data = r.json() if data['Code'] == 0: task_id = data['TaskId'] else: raise RuntimeError("Error " + str(data)) else: raise RuntimeError("Error " + r.text) return {"code": 0, "token": self.get_result(task_id, timeout, time_sleep)} except Exception as e: return {"code": 1, "messeage": str(e)} def recaptcha_v3_task_proxyless(self, site_url, site_key, page_action, min_score: float = 0.3, timeout=180, time_sleep=1): try: params = { "apikey": self.apikey, "sitekey": site_key, "siteurl": site_url, "pageaction": page_action, "minscore": min_score, "version": "v3" } r = requests.get( f"{self.BASE_URL}/recaptchav3", params=params ) if r.status_code == 200: data = r.json() if data['Code'] == 0: task_id = data['TaskId'] else: raise RuntimeError("Error " + str(data)) else: raise RuntimeError("Error " + r.text) return {"code": 0, "token": self.get_result(task_id, timeout, time_sleep)} except Exception as e: return {"code": 1, "messeage": str(e)} def recaptcha_v3_enterprise_task_proxyless( self, site_url, site_key, page_action, s_payload=None, min_score: float = 0.3, timeout=180, time_sleep=1 ): try: params = { "apikey": self.apikey, "sitekey": site_key, "siteurl": site_url, "pageaction": page_action, "minscore": min_score } if s_payload: params["s"] = s_payload r = requests.get( f"{self.BASE_URL}/recaptchav3_enterprise", params=params ) if r.status_code == 200: data = r.json() if data['Code'] == 0: task_id = data['TaskId'] else: raise RuntimeError("Error " + str(data)) else: raise RuntimeError("Error " + r.text) result = self.get_result(task_id, timeout, time_sleep, type_captcha="v3_enterprise") return {"code": 0, "token": result.get("Token"), "user_agent": result.get("UserAgent")} except Exception as e: return {"code": 1, "messeage": str(e)} def h_captcha_task_proxyless(self, site_url, site_key, rqdata=None, timeout=180, time_sleep=3): try: params = { "apikey": self.apikey, "sitekey": site_key, "siteurl": site_url, } if rqdata: params["rqdata"] = rqdata r = requests.get( f"{self.BASE_URL}/hcaptcha" , params=params) if r.status_code == 200: data = r.json() if data['Code'] == 0: task_id = data['TaskId'] else: raise RuntimeError("Error " + str(data)) else: raise RuntimeError("Error " + r.text) return {"code": 0, "token": self.get_result(task_id, timeout, time_sleep)} except Exception as e: return {"code": 1, "messeage": str(e)} def fun_captcha_task_proxyless(self, site_url, site_key, timeout=180, time_sleep=3): try: params = { "apikey": self.apikey, "sitekey": site_key, "siteurl": site_url, } r = requests.get( f"{self.BASE_URL}/funcaptchatokentask", params=params ) if r.status_code == 200: data = r.json() if data['Code'] == 0: task_id = data['TaskId'] else: raise RuntimeError("Error " + str(data)) else: raise RuntimeError("Error " + r.text) return {"code": 0, "token": self.get_result(task_id, timeout, time_sleep)} except Exception as e: return {"code": 1, "messeage": str(e)} def recaptcha_click(self, url_list, caption, timeout=60, time_sleep=3): try: r = requests.post( f"{self.BASE_URL}/recognition", json={'Image_urls': url_list, 'Caption': caption, "Apikey": self.apikey, "Type": "recaptcha"} ) if r.status_code == 200: data = r.json() if data['Code'] == 0: task_id = data['TaskId'] else: raise RuntimeError("Error " + str(data)) else: raise RuntimeError("Error " + r.text) return {"code": 0, "token": self.get_result(task_id, timeout, time_sleep, type_captcha="recaptcha_click")} except Exception as e: return {"code": 1, "messeage": str(e)} def image_to_text(self, base64img=None, file=None, timeout=60, time_sleep=1): try: if base64img is None: if file is None: raise RuntimeError("base64img and file is None ") else: base64img = convert_img_to_base64(file) r = requests.post( f"{self.BASE_URL}/recognition", json={ 'Image': base64img, "Apikey": self.apikey, "Type": "imagetotext" }) if r.status_code == 200: data = r.json() if data['Code'] == 0: task_id = data['TaskId'] else: raise RuntimeError("Error " + str(data)) else: raise RuntimeError("Error " + r.text) return {"code": 0, "token": self.get_result(task_id, timeout, time_sleep, type_captcha="image2text")} except Exception as e: return {"code": 1, "messeage": str(e)}
1stcaptcha
/1stcaptcha-1.0.6.tar.gz/1stcaptcha-1.0.6/onest_captcha/__init__.py
__init__.py
====== 1to001 ====== *1to001* is made for padding numbers in filenames automatically. It's written in Python 3. Installation ============ System-wide installation: .. code:: sh $ pip install 1to001 User installation: .. code:: sh $ pip install --user 1to001 For development code: .. code:: sh $ pip install git+https://github.com/livibetter/1to100.git Example ======= .. code:: sh $ touch 1.txt 100.txt $ 1to001 *.txt + 001.txt ? ++ perform padding (y/n)? y 1.txt -> 001.txt Options ======= ``-i`` (``--ignore-case``) When cases are mixed, this option would ignore the cases, for example for files like:: read100me1.TXT read5Me02.txt They can be renamed to:: 1to001 -i *.{txt,TXT} + read005Me02.txt ? ++ + read100me01.TXT ? + perform padding (y/n)? ``-y`` (``--yes``) Automatic yes to prompts More information ================ * 1to001_ on GitHub * PyPI_ * Some usage examples in this `blog post`_ .. _1to001: https://github.com/livibetter/1to001 .. _PyPI: https://pypi.python.org/pypi/1to001 .. _blog post: http://blog.yjl.im/2013/07/padding-numbers-in-filenames.html License ======= This project is licensed under the MIT License, see ``COPYING``.
1to001
/1to001-0.3.0.tar.gz/1to001-0.3.0/README.rst
README.rst
#!/usr/bin/env python3 # Copyright (C) 2013, 2014 by Yu-Jie Lin # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. from __future__ import print_function import codecs import sys from distutils.core import Command, setup from unittest import TestLoader, TextTestRunner try: from wheel.bdist_wheel import bdist_wheel except ImportError: bdist_wheel = None # scripts to be exculded from checking EXCLUDE_SCRIPTS = () script_name = '1to001' # ============================================================================ # https://groups.google.com/d/msg/comp.lang.python/pAeiF0qwtY0/H9Ki0WOctBkJ # Work around mbcs bug in distutils. # http://bugs.python.org/issue10945 try: codecs.lookup('mbcs') except LookupError: ascii = codecs.lookup('ascii') func = lambda name, enc=ascii: {True: enc}.get(name == 'mbcs') codecs.register(func) # ============================================================================ class cmd_isort(Command): description = 'run isort' user_options = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): try: import isort except ImportError: print(('Cannot import isort, you forgot to install?\n' 'run `pip install isort` to install.'), file=sys.stderr) sys.exit(1) print() print('Options') print('=======') print() print('Exclude:', EXCLUDE_SCRIPTS) print() files = ['setup.py', script_name] print('Results') print('=======') print() fails = 0 for f in files: # unfortunately, we have to do it twice if isort.SortImports(f, check=True).incorrectly_sorted: fails += 1 print() isort.SortImports(f, show_diff=True) print() print() print('Statistics') print('==========') print() print('%d files failed to pass' % fails) class cmd_pep8(Command): description = 'run pep8' user_options = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): try: import pep8 except ImportError: print(('Cannot import pep8, you forgot to install?\n' 'run `pip install pep8` to install.'), file=sys.stderr) sys.exit(1) p8 = pep8.StyleGuide() # do not include code not written in b.py p8.options.exclude += EXCLUDE_SCRIPTS # ignore four-space indentation error p8.options.ignore += ('E111', 'E121') print() print('Options') print('=======') print() print('Exclude:', p8.options.exclude) print('Ignore :', p8.options.ignore) print() print('Results') print('=======') print() report = p8.check_files('.') print() print('Statistics') print('==========') print() report.print_statistics() print('%-7d Total errors and warnings' % report.get_count()) class cmd_pyflakes(Command): description = 'run Pyflakes' user_options = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): try: from pyflakes import api from pyflakes import reporter as modReporter except ImportError: print(('Cannot import pyflakes, you forgot to install?\n' 'run `pip install pyflakes` to install.'), file=sys.stderr) sys.exit(1) from os.path import basename reporter = modReporter._makeDefaultReporter() # monkey patch for exclusion of pathes api_iterSourceCode = api.iterSourceCode def _iterSourceCode(paths): for path in api_iterSourceCode(paths): if basename(path) not in EXCLUDE_SCRIPTS: yield path api.iterSourceCode = _iterSourceCode print() print('Options') print('=======') print() print('Exclude:', EXCLUDE_SCRIPTS) print() print('Results') print('=======') print() warnings = api.checkRecursive('.', reporter) print() print('Total warnings: %d' % warnings) class cmd_pylint(Command): description = 'run Pylint' user_options = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): try: from pylint import lint except ImportError: print(('Cannot import pylint, you forgot to install?\n' 'run `pip install pylint` to install.'), file=sys.stderr) sys.exit(1) print() print('Options') print('=======') print() print('Exclude:', EXCLUDE_SCRIPTS) files = ['setup.py', 'wxitx'] args = [ '--ignore=%s' % ','.join(EXCLUDE_SCRIPTS), '--output-format=colorized', '--include-ids=y', '--indent-string=" "', ] + files print() lint.Run(args) class cmd_test(Command): description = 'run tests' user_options = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): loader = TestLoader() tests = loader.discover(start_dir='tests') runner = TextTestRunner(verbosity=2) runner.run(tests) # ============================================================================ with open(script_name) as f: meta = dict( (k.strip(' _'), eval(v)) for k, v in # There will be a '\n', with eval(), it's safe to ignore (line.split('=') for line in f if line.startswith('__')) ) # renaming meta-data keys meta_renames = [ ('program', 'name'), ('website', 'url'), ('email', 'author_email'), ] for old, new in meta_renames: if old in meta: meta[new] = meta[old] del meta[old] # keep these meta_keys = ['name', 'description', 'version', 'license', 'url', 'author', 'author_email'] meta = dict([m for m in meta.items() if m[0] in meta_keys]) with open('README.rst') as f: long_description = f.read() classifiers = [ 'Development Status :: 3 - Alpha', 'Environment :: Console', 'Intended Audience :: End Users/Desktop', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python :: 3.3', 'Topic :: Utilities', ] setup_d = dict( long_description=long_description, cmdclass={ 'isort': cmd_isort, 'pep8': cmd_pep8, 'pyflakes': cmd_pyflakes, 'pylint': cmd_pylint, 'test': cmd_test, }, classifiers=classifiers, scripts=[script_name], **meta ) if bdist_wheel: setup_d['cmdclass']['bdist_wheel'] = bdist_wheel if __name__ == '__main__': setup(**setup_d)
1to001
/1to001-0.3.0.tar.gz/1to001-0.3.0/setup.py
setup.py
from emp_ide import models def visit_record(func): def wrapper(*args, **kwargs): request = args[0] models.VisitCounts.today_add_one() # print(request.META) visitor = models.Visitors( ip=request.META.get("REMOTE_ADDR"), url=request.path) visitor.save() return func(*args, **kwargs) return wrapper
1zlab-emp-ide
/1zlab_emp_ide-0.0.3-py3-none-any.whl/emp_ide/decorators.py
decorators.py
from django.apps import AppConfig class AppConfig(AppConfig): name = 'emp_ide' verbose_name = "EMP IDE"
1zlab-emp-ide
/1zlab_emp_ide-0.0.3-py3-none-any.whl/emp_ide/apps.py
apps.py
from django.urls import path from . import views urlpatterns = [ path('', views.index), path('post/ip/', views.post_esp_ip), path('get/ip/', views.get_esp_ip) ]
1zlab-emp-ide
/1zlab_emp_ide-0.0.3-py3-none-any.whl/emp_ide/urls.py
urls.py
from django.contrib import admin from emp_ide.models import Visitors, VisitCounts, MpyMachineIP class AdminVisitCounts(admin.ModelAdmin): list_display = ["date", "amount_of_day"] class AdminVisitors(admin.ModelAdmin): list_display = ["ip", "time", "url"] class AdminMpyMachine(admin.ModelAdmin): list_display = ["ip", "machine_ip"] admin.site.register(VisitCounts, AdminVisitCounts) admin.site.register(Visitors, AdminVisitors) admin.site.register(MpyMachineIP, AdminMpyMachine)
1zlab-emp-ide
/1zlab_emp_ide-0.0.3-py3-none-any.whl/emp_ide/admin.py
admin.py
from django.http import JsonResponse from django.shortcuts import render from emp_ide import models from emp_ide.decorators import visit_record @visit_record def index(request): return render(request, 'index.html') @visit_record def post_esp_ip(request): try: espip = models.MpyMachine.objects.get(ip=request.META.get("REMOTE_ADDR")) if espip: espip.set_esp_ip(request.GET.get('esp_ip', '')) rsp = dict(code=0, message='esp ip added to exist record.') except: espip = models.MpyMachine( ip=request.META.get("REMOTE_ADDR"), esp_ip=request.GET.get('esp_ip', '')) rsp = dict(code=0, message='new esp ip added.') finally: espip.save() return JsonResponse(rsp) def get_esp_ip(request): try: esp_ip = models.MpyMachine.objects.get(ip=request.META.get("REMOTE_ADDR")) rsp = dict(code=0, ip=esp_ip.get_esp_ip()) except: rsp = dict(code=-1, ip=[]) return JsonResponse(rsp)
1zlab-emp-ide
/1zlab_emp_ide-0.0.3-py3-none-any.whl/emp_ide/views.py
views.py
__version__ = "0.0.3" default_app_config = 'emp_ide.apps.AppConfig'
1zlab-emp-ide
/1zlab_emp_ide-0.0.3-py3-none-any.whl/emp_ide/__init__.py
__init__.py
import datetime from django.db import models class VisitCounts(models.Model): date = models.DateField(auto_now=True, verbose_name='日期') amount_of_day = models.IntegerField(default=0, verbose_name='单日访问量', editable=False) def __str__(self): return '{0} {1}次'.format(self.date, self.amount_of_day) @classmethod def today_add_one(cls): try: counts_today = cls.objects.get(date=datetime.datetime.today()) counts_today.amount_of_day += 1 except: counts_today = VisitCounts() counts_today.amount_of_day += 1 finally: counts_today.save() @classmethod def get_total_counts(cls): sum([i.amount_of_day for i in cls.objects.all()]) class Meta: db_table = "ide_visitor_counts" verbose_name = "访问统计" verbose_name_plural = "访问统计" class Visitors(models.Model): ip = models.CharField(max_length=15, verbose_name='IP地址', default='unknown', blank=True, editable=False) time = models.DateTimeField(auto_now=True, verbose_name='访问时间', editable=False) url = models.SlugField(verbose_name='URL', editable=False) def __str__(self): return 'IP:{0} TIME:{1} URL:{2}'.format(self.ip, self.time, self.url) class Meta: db_table = "ide_visitor" verbose_name = "访问者" verbose_name_plural = "访问者" class MpyMachineIP(models.Model): ip = models.CharField(max_length=15, verbose_name='IP地址', default='unknown', blank=True, editable=False) machine_ip = models.TextField(verbose_name='Mpy Machine 内网IP地址', default='', editable=False) def set_esp_ip(self, esp_ip): if esp_ip.replace(',', '') in self.esp_ip.split(','): pass else: self.esp_ip += esp_ip def get_esp_ip(self): return self.esp_ip.split(',') def __str__(self): return self.ip class Meta: db_table = "ide_machine_ip" verbose_name = "Mpy Machine IP" verbose_name_plural = "Mpy Machine IP"
1zlab-emp-ide
/1zlab_emp_ide-0.0.3-py3-none-any.whl/emp_ide/models.py
models.py
# Generated by Django 3.0.2 on 2020-10-12 15:26 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='MpyMachineIP', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('ip', models.CharField(blank=True, default='unknown', max_length=15, verbose_name='IP地址')), ('machine_ip', models.TextField(default='', verbose_name='Mpy Machine 内网IP地址')), ], options={ 'verbose_name': 'Mpy Machine IP', 'verbose_name_plural': 'Mpy Machine IP', 'db_table': 'ide_machine_ip', }, ), migrations.CreateModel( name='VisitCounts', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('date', models.DateField(auto_now=True, verbose_name='日期')), ('amount_of_day', models.IntegerField(default=0, editable=False, verbose_name='单日访问量')), ], options={ 'verbose_name': '访问统计', 'verbose_name_plural': '访问统计', 'db_table': 'ide_visitor_counts', }, ), migrations.CreateModel( name='Visitors', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('ip', models.CharField(blank=True, default='unknown', max_length=15, verbose_name='IP地址')), ('time', models.DateTimeField(auto_now=True, verbose_name='访问时间')), ('url', models.SlugField(verbose_name='URL')), ], options={ 'verbose_name': '访问者', 'verbose_name_plural': '访问者', 'db_table': 'ide_visitor', }, ), ]
1zlab-emp-ide
/1zlab_emp_ide-0.0.3-py3-none-any.whl/emp_ide/migrations/0001_initial.py
0001_initial.py
(function(e){function t(t){for(var i,r,a=t[0],c=t[1],d=t[2],l=0,p=[];l<a.length;l++)r=a[l],s[r]&&p.push(s[r][0]),s[r]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(e[i]=c[i]);h&&h(t);while(p.length)p.shift()();return o.push.apply(o,d||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],i=!0,r=1;r<n.length;r++){var a=n[r];0!==s[a]&&(i=!1)}i&&(o.splice(t--,1),e=c(c.s=n[0]))}return e}var i={},r={app:0},s={app:0},o=[];function a(e){return c.p+"js/"+({}[e]||e)+"."+{"chunk-2d0c0e14":"e4f25a38","chunk-2d0d3720":"f764eeca","chunk-2d0e64c6":"d56af125","chunk-2d230ab1":"d8b63db6","chunk-329d5946":"f788fc45"}[e]+".js"}function c(t){if(i[t])return i[t].exports;var n=i[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,c),n.l=!0,n.exports}c.e=function(e){var t=[],n={"chunk-329d5946":1};r[e]?t.push(r[e]):0!==r[e]&&n[e]&&t.push(r[e]=new Promise(function(t,n){for(var i="css/"+({}[e]||e)+"."+{"chunk-2d0c0e14":"31d6cfe0","chunk-2d0d3720":"31d6cfe0","chunk-2d0e64c6":"31d6cfe0","chunk-2d230ab1":"31d6cfe0","chunk-329d5946":"5e39cfad"}[e]+".css",s=c.p+i,o=document.getElementsByTagName("link"),a=0;a<o.length;a++){var d=o[a],l=d.getAttribute("data-href")||d.getAttribute("href");if("stylesheet"===d.rel&&(l===i||l===s))return t()}var p=document.getElementsByTagName("style");for(a=0;a<p.length;a++){d=p[a],l=d.getAttribute("data-href");if(l===i||l===s)return t()}var h=document.createElement("link");h.rel="stylesheet",h.type="text/css",h.onload=t,h.onerror=function(t){var i=t&&t.target&&t.target.src||s,o=new Error("Loading CSS chunk "+e+" failed.\n("+i+")");o.code="CSS_CHUNK_LOAD_FAILED",o.request=i,delete r[e],h.parentNode.removeChild(h),n(o)},h.href=s;var u=document.getElementsByTagName("head")[0];u.appendChild(h)}).then(function(){r[e]=0}));var i=s[e];if(0!==i)if(i)t.push(i[2]);else{var o=new Promise(function(t,n){i=s[e]=[t,n]});t.push(i[2]=o);var d,l=document.createElement("script");l.charset="utf-8",l.timeout=120,c.nc&&l.setAttribute("nonce",c.nc),l.src=a(e),d=function(t){l.onerror=l.onload=null,clearTimeout(p);var n=s[e];if(0!==n){if(n){var i=t&&("load"===t.type?"missing":t.type),r=t&&t.target&&t.target.src,o=new Error("Loading chunk "+e+" failed.\n("+i+": "+r+")");o.type=i,o.request=r,n[1](o)}s[e]=void 0}};var p=setTimeout(function(){d({type:"timeout",target:l})},12e4);l.onerror=l.onload=d,document.head.appendChild(l)}return Promise.all(t)},c.m=e,c.c=i,c.d=function(e,t,n){c.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},c.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,t){if(1&t&&(e=c(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(c.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)c.d(n,i,function(t){return e[t]}.bind(null,i));return n},c.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return c.d(t,"a",t),t},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.p="/static/",c.oe=function(e){throw console.error(e),e};var d=window["webpackJsonp"]=window["webpackJsonp"]||[],l=d.push.bind(d);d.push=t,d=d.slice();for(var p=0;p<d.length;p++)t(d[p]);var h=l;o.push([0,"chunk-vendors"]),n()})({0:function(e,t,n){e.exports=n("56d7")},"034f":function(e,t,n){"use strict";var i=n("64a9"),r=n.n(i);r.a},"38ab":function(e){e.exports={Action:{Cancle:"取消",Apply:"应用",Esc:"退出",Click:"点击"},Connector:{DialogTitle:"连接到你的设备",URL:"URL",Password:"密码",Connect:"连接",Disconnect:"断开连接",Wifi:"WiFi",SerialPort:"串口",Type:"连接类型"},placeholder:{Editor:"脚本文件",Uploader:"上传文件",Search:"搜索",Modules:"模块",Docs:"文档",RunScript:"运行脚本",MemoryClean:"内存清理",Connect:"连接到设备",Settings:"设置"},BottomBar:{},Cli:{DialogTitle:"连接到你的设备",URL:"URL",Password:"密码",Connect:"连接",Disconnect:"断开连接"},Editor:{},Finder:{Label:"输入以搜索"},FolderTree:{Menu:{File:[{text:"运行",code:"run"},{isdivider:!0},{text:"重命名",code:"rename"},{isdivider:!0},{text:"删除",code:"deleteFile"},{isdivider:!0}],Folder:[{text:"刷新",code:"refresh"},{isdivider:!0},{text:"重命名",code:"rename"},{isdivider:!0},{text:"新建文件",code:"newFile"},{isdivider:!0},{text:"新建文件夹",code:"newFolder"},{isdivider:!0},{text:"删除文件夹",code:"deleteFolder"}]}},Pypi:{Download:"下载/更新"},Settings:{Title:"设置",FontSize:"字体大小",MemoryLimit:"I/O内存限制"},SideBar:{},SplitPane:{},Uploader:{Upload:"上传",DragToHere:"拖拽到此处,或"},README:" _____ __ __ ____ ___ ____ _____\n | ____|| \\/ || _ \\ |_ _|| _ \\ | ____|\n | _| | |\\/| || |_) | | | | | | || _|\n | |___ | | | || __/ | | | |_| || |___\n |_____||_| |_||_| |___||____/ |_____|\n\n Easy MicroPython (EMP) 是一个由1Z实验室主导的开源项目,旨在为广大的\n MicroPython爱好者提供更加快速和高效的开发体验。\n\n GitHub: https://github.com/Fuermohao/EMP-IDE\n 主页: http://www.1zlab.com\n 文档: http://www.1zlab.com/wiki/micropython-esp32/emp-ide-userguide/\n\n 在开始使用之前,你需要在你的MicroPython设备上安装 emp-1zlab 模块。请按\n 照如下的步骤进行:\n \n import upip\n upip.install('emp-1zlab')\n\n import emp_boot\n emp_boot.set_boot_mode()\n\n 输入2,回车。这将重新覆盖你的 boot.py 文件,之后你的设备将会进行一次重启。\n 重启之后按照命令行中的提示来使你的设备连接至WiFi网络。在这之后,webrepl将会\n 自动开启,默认的连接密码为'1zlab', 你可以在 webrepl.pass 文件中修改它。"}},"56d7":function(e,t,n){"use strict";n.r(t);n("cadf"),n("551c"),n("f751"),n("097d");var i=n("8bbf"),r=n.n(i),s=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"app"}},[n("router-view")],1)},o=[],a={name:"app"},c=a,d=(n("034f"),n("2877")),l=Object(d["a"])(c,s,o,!1,null,null,null),p=l.exports,h=(n("ac6a"),n("8c4f")),u=n("0644"),f=n.n(u),_=[{path:"/",name:"ide",component:"/ide/index"},{path:"*",component:"/error"}],m=_,$=n("8bbf"),g=n("70c3");$.use(h["a"]);var y=new h["a"]({routes:w(m)});function w(e){var t=f()(e);return t.forEach(function(e){e.component&&(e.component=g(e.component))}),t}n("f5df"),n("619b"),n("64d2");var b=n("dd88"),S=n("4d7d"),v=n("00e7"),E=n.n(v),D={theme:"dark"},F={install:function(e){e.prototype.$connect=function(e){var t=e.sender,n=e.receiver,i=e.slot,r=e.kwargs,s=t.$parent;try{while(!s.isParent)s=s.$parent;"parent"===n?s[i](r):s.$refs[n][i](r)}catch(o){console.log(o)}},e.prototype.$send=function(e){e.sender.isParent?"self"===e.receiver?this[e.slot](e.kwargs):this.$refs[e.receiver][e.slot](e.kwargs):"self"===e.receiver?this[e.slot](e.kwargs):e.sender.$emit("events",e)}}},A=F,N=n("9aba"),C=n.n(N),T=(n("28a5"),{install:function(e){e.prototype.$emp={funcName:function(e){return e("").split("(")[0].split(".")[1]},deviceInfo:function(){return"ide.device_info()\r"},memoryStatus:function(){return"ide.memory_status()\r"},memoryAnalysing:function(e){return"ide.memory_analysing('".concat(e,"')\r")},runScript:function(e){return"exec(open('".concat(e,"').read())\r")},tree:function(){return"ide.tree()\r"},getCode:function(e){return"ide.get_code('".concat(e,"')\r")},newFile:function(e){return"ide.new_file('".concat(e,"')\r")},delFile:function(e){return"ide.del_file('".concat(e,"')\r")},newFolder:function(e){return"ide.new_folder('".concat(e,"')\r")},delFolder:function(e){return"ide.del_folder('".concat(e,"')\r")},rename:function(e,t){return"ide.rename('".concat(e,"','").concat(t,"')\r")},install:function(e){return"ide.emp_install('".concat(e,"')\r")}}}}),P=T,O=(n("34ef"),n("f559"),{onOpen:function(){this.$repl.term.focus(),this.$repl.term.write("Welcome to 1ZLAB-EMPIDE!\r\n"),0===this.$repl.connectionType&&this.$ws.send(this.$repl.passwd+"\r"),this.$ws.send(this.$emp.deviceInfo()),this.$ws.send(this.$emp.memoryStatus()),this.$ws.send(this.$emp.tree()),this.$toast.success("WebREPL connected!"),1===this.$ws.readyState&&(this.$send(this.SIGNAL_REPORT_CONNECTED(this)),this.$repl.connected=!0,this.connected=!0)},onClose:function(){this.$repl.connected=!1,this.connected=!1,this.$send(this.SIGNAL_REPORT_DISCONNECTED(this)),this.$toast.error("Disconnected"),this.$repl.term&&this.$repl.term.write("\r\nDisconnected\r\n")},replExec:function(e){this.tasklock?this.$toast.error("IO busy"):(this.$ws.send(e.command),e.command.startsWith(this.$emp.funcName(this.$emp.memoryAnalysing))&&this.$send(this.SIGNAL_LOCK(this)))}}),k=O,L={replExec:k.replExec,onOpen:k.onOpen,onClose:k.onClose,onMessage:function(e){var t=this;if(e.data instanceof ArrayBuffer){var n=new Uint8Array(e.data);switch(this.$dtp.binaryState){case 11:if(0==x(n)){for(var i=0;i<this.$dtp.putFileData.length;i+=1024)this.$ws.send(this.$dtp.putFileData.slice(i,i+1024));this.$dtp.binaryState=12}break;case 12:this.$send(this.SIGNAL_UNLOCK(this)),0==x(n)?(this.$toast.success("success! "+this.$dtp.putFilename+", "+this.$dtp.putFileData.length+" bytes"),this.$dtp.putFileData=null,this.$dtp.putFilename=""):this.$toast.error("Failed sending "+this.$dtp.putFilename),this.$dtp.binaryState=0,this.$ws.send("\r\r"),this.$ws.send(this.$emp.tree()),setTimeout(function(){return t.$send(t.SIGNAL_PUT_NEXT_FILE(t))},300),setTimeout(function(){return t.slotClearTerm()},300);break;case 21:if(0==x(n)){this.$dtp.binaryState=22;var r=new Uint8Array(1);r[0]=0,this.$ws.send(r)}break;case 22:var s=n[0]|n[1]<<8;if(n.length==2+s)if(0==s)this.$dtp.binaryState=23;else{var o=new Uint8Array(this.$dtp.getFileData.length+s);o.set(this.$dtp.getFileData),o.set(n.slice(2),this.$dtp.getFileData.length),this.$dtp.getFileData=o;var a=new Uint8Array(1);a[0]=0,this.$ws.send(a)}else this.$dtp.binaryState=0;break;case 23:if(0==x(n)){this.$toast.success("Got "+this.$dtp.getFilename+", "+this.$dtp.getFileData.length+" bytes");var c=new TextDecoder("utf-8").decode(this.$dtp.getFileData);this.$send(this.SIGNAL_SHOW_CODES(this,c))}else this.$toast.error("Failed getting "+this.$dtp.getFilename);this.$dtp.getFileData=null,this.$dtp.getFilename=null,this.$dtp.binaryState=0,this.$ws.send("\r\r"),setTimeout(function(){return t.slotClearTerm()},300);break}}else try{this.$dtp.recData=JSON.parse(e.data),this.$dtp.recData.func===this.$emp.funcName(this.$emp.tree)&&(this.$send(this.SIGNAL_UPDATE_TREE(this,[this.$dtp.recData.data])),this.$send(this.SIGNAL_UPDATE_FINDER(this,this.$dtp.recData.data)),this.$send(this.SIGNAL_SHOW_PANE(this))),this.$dtp.recData.func===this.$emp.funcName(this.$emp.getCode)&&this.$send(this.SIGNAL_SHOW_CODES_PMAX(this,this.$dtp.recData.data)),this.$dtp.recData.func===this.$emp.funcName(this.$emp.memoryAnalysing)&&this.$send(this.SIGNAL_DEPENDS_ON_MEMORY_TO_GET_FILE(this,this.$dtp.recData.data)),this.$dtp.recData.func===this.$emp.funcName(this.$emp.deviceInfo)&&this.$send(this.SIGNAL_SHOW_SYS_INFO(this,this.$dtp.recData.data)),this.$dtp.recData.func===this.$emp.funcName(this.$emp.memoryStatus)&&this.$send(this.SIGNAL_SHOW_MEMORY_STATUS(this,this.$dtp.recData.data))}catch(d){e.data.indexOf("Traceback (most recent call last):")>=0&&this.$send(this.SIGNAL_UNLOCK(this))}},putFile:function(e){if(this.$repl.tasklock)this.$toast.error("IO busy");else{this.$dtp.putFilename=e.filename,e.fileData.length>0?this.$dtp.putFileData=e.fileData:(this.$dtp.putFileData=(new TextEncoder).encode(" "),e.fileData=(new TextEncoder).encode(" "));var t=e.filename,n=e.fileData.length,i=new Uint8Array(82);i[0]="W".charCodeAt(0),i[1]="A".charCodeAt(0),i[2]=1,i[3]=0,i[4]=0,i[5]=0,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=0,i[11]=0,i[12]=255&n,i[13]=n>>8&255,i[14]=n>>16&255,i[15]=n>>24&255,i[16]=255&t.length,i[17]=t.length>>8&255;for(var r=0;r<64;++r)r<t.length?i[18+r]=t.charCodeAt(r):i[18+r]=0;this.$dtp.binaryState=11,this.$toast.info("Sending "+e.filename+"..."),this.$send(this.SIGNAL_LOCK(this)),this.$ws.send(i)}},getFile:function(e){this.$dtp.getFilename=e.filename;var t=e.filename,n=new Uint8Array(82);n[0]="W".charCodeAt(0),n[1]="A".charCodeAt(0),n[2]=2,n[3]=0,n[4]=0,n[5]=0,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=0,n[16]=255&t.length,n[17]=t.length>>8&255;for(var i=0;i<64;++i)i<t.length?n[18+i]=t.charCodeAt(i):n[18+i]=0;this.$dtp.binaryState=21,this.$dtp.getFilename=t,this.$dtp.getFileData=new Uint8Array(0),this.$toast.info("Getting "+this.$dtp.getFilename+"..."),this.$ws.send(n)}},x=function(e){if(e[0]=="W".charCodeAt(0)&&e[1]=="B".charCodeAt(0)){var t=e[2]|e[3]<<8;return t}return-1},I=L,M=(n("a481"),{replExec:k.replExec,onOpen:k.onOpen,onClose:k.onClose,onMessage:function(e){var t=this;try{var n=JSON.parse(e.data);n.func===this.$emp.funcName(this.$emp.getCode)&&this.$send(this.SIGNAL_SHOW_CODES_PMAX(this,n.data)),"put_file"===n.func&&(setTimeout(function(){return t.$send(t.SIGNAL_PUT_NEXT_FILE(t))},300),setTimeout(function(){return t.$send(t.SIGNAL_CLEAR_TERM(t))},300))}catch(r){}if(this.$dtp.fragments+=e.data,2===U(this.$dtp.fragments,"==> PDU")){this.$dtp.fragments=this.$dtp.fragments.split("==> PDU")[1],this.$dtp.fragments=this.$dtp.fragments.replace(/\r\n/g,"\\n"),this.$dtp.fragments=this.$dtp.fragments.slice(10,this.$dtp.fragments.length-4);var i=JSON.parse(this.$dtp.fragments);i.func===this.$emp.funcName(this.$emp.tree)&&(this.$send(this.SIGNAL_UPDATE_TREE(this,[i.data])),this.$send(this.SIGNAL_UPDATE_FINDER(this,i.data)),this.$send(this.SIGNAL_SHOW_PANE(this))),i.func===this.$emp.funcName(this.$emp.getCode)&&this.$send(this.SIGNAL_SHOW_CODES_PMAX(this,i.data)),i.func===this.$emp.funcName(this.$emp.memoryAnalysing)&&this.$send(this.SIGNAL_DEPENDS_ON_MEMORY_TO_GET_FILE(this,i.data)),i.func===this.$emp.funcName(this.$emp.deviceInfo)&&this.$send(this.SIGNAL_SHOW_SYS_INFO(this,i.data)),i.func===this.$emp.funcName(this.$emp.memoryStatus)&&this.$send(this.SIGNAL_SHOW_MEMORY_STATUS(this,i.data)),this.$dtp.fragments=""}},putFile:function(e){var t=new TextDecoder("utf-8").decode(e.fileData);this.$ws.send("EnterRawRepl"),this.$ws.send("PutFile:".concat(e.filename,":").concat(t))},getFile:function(e){this.$ws.send("EnterRawRepl"),this.$ws.send("GetFile:".concat(e.filename))}}),U=function(e,t){e+="",t+="";var n=0,i=0;if(t.length<=0)return 0;while(1){if(i=e.indexOf(t,i),!(i>=0))break;n+=1,i+=1}return n},R=M,G={},W=0,j=1;G.install=function(e){e.prototype.$ws=null,e.prototype.$dtp={binaryState:0,getFilename:null,getFileData:null,putFilename:null,putFileData:null,recData:null,fragments:""},e.prototype.$repl={passwd:"",url:"",term:null,connected:!1,connectionType:W,tasklock:!1},e.prototype.$replExec=null,e.prototype.$replStart=function(){var e=this.$repl.connectionType===j?R:I;this.$ws=new WebSocket(this.$repl.url),this.$ws.binaryType="arraybuffer",this.$repl.term.attach(this.$ws,!0,!0),this.$ws.onmessage=e.onMessage.bind(this),this.$ws.onopen=e.onOpen.bind(this),this.$ws.onclose=e.onClose.bind(this),this.$replExec=e.replExec.bind(this),this.$replSetupFTP(e)},e.prototype.$replStop=function(){this.$ws.close()},e.prototype.$replSetupFTP=function(e){this.$replPutFile=e.putFile.bind(this),this.$replGetFile=e.getFile.bind(this)},e.prototype.$replPutFile=null,e.prototype.$replGetFile=null};var H=G,z=n("c252"),B=n("5f72"),Y=function(e){z.theme.use(D.theme),e.use(z),e.use(B),e.use(b["a"]),e.use(S["a"]),e.use(E.a),e.use(A),e.use(C.a),e.use(P),e.use(H)},J=Y,K=(n("456d"),n("a925"));r.a.use(K["a"]);var X="zh-CN",Z={"zh-CN":n("38ab"),"en-US":n("9a10")},q=new K["a"]({locale:X,messages:Z}),V=q;r.a.use(J),r.a.config.productionTip=!1,new r.a({router:y,i18n:V,render:function(e){return e(p)}}).$mount("#app")},"5f72":function(e,t){e.exports=ELEMENT},"64a9":function(e,t,n){},"70c3":function(e,t,n){e.exports=function(e){return function(){return n("e399")("./pages"+e)}}},"8bbf":function(e,t){e.exports=Vue},"9a10":function(e){e.exports={Action:{Cancle:"Cancle",Apply:"Apply",Esc:"Esc",Click:"Click"},Connector:{DialogTitle:"Connect to your device",URL:"URL",Password:"Password",Connect:"Connect",Disconnect:"Disconnect",Wifi:"WiFi",SerialPort:"Serial Port",Type:"Connection mode"},placeholder:{Editor:"Scripts",Uploader:"Uploader",Search:"Search",Modules:"Modules",Docs:"Documents",RunScript:"Run Scripts",MemoryClean:"Memory Clean",Connect:"Connect",Settings:"Settings"},BottomBar:{},Cli:{DialogTitle:"Connect to your device",URL:"URL",Password:"Password",Connect:"Connect",Disconnect:"Disconnect"},Editor:{},Finder:{Label:"Type to search"},FolderTree:{Menu:{File:[{text:"Run",code:"run"},{isdivider:!0},{text:"Rename",code:"rename"},{isdivider:!0},{text:"Delete",code:"deleteFile"},{isdivider:!0}],Folder:[{text:"Refresh",code:"refresh"},{isdivider:!0},{text:"Rename",code:"rename"},{isdivider:!0},{text:"New File",code:"newFile"},{isdivider:!0},{text:"New Folder",code:"newFolder"},{isdivider:!0},{text:"Delete",code:"deleteFolder"}]}},Pypi:{Download:"Download/Update"},Settings:{Title:"Settings",FontSize:"fontsize",MemoryLimit:"memory limit"},SideBar:{},SplitPane:{},Uploader:{Upload:"Upload",DragToHere:"Drag to here, or"},README:" _____ __ __ ____ ___ ____ _____\n | ____|| \\/ || _ \\ |_ _|| _ \\ | ____|\n | _| | |\\/| || |_) | | | | | | || _|\n | |___ | | | || __/ | | | |_| || |___\n |_____||_| |_||_| |___||____/ |_____|\n\n Easy MicroPython (EMP) is an open source project led by 1ZLAB \n to provide a faster and more efficient development experience \n for MicroPython enthusiasts.\n\n GitHub: https://github.com/Fuermohao/EMP-IDE\n HomePage: http://www.1zlab.com\n Docs: http://www.1zlab.com/wiki/micropython-esp32/emp-ide-userguide/\n\n Before you start using it, you need to use the upip to install \n the emp-1zlab module on your MicroPython device. Please follow \n the instructions below:\n\n import upip\n upip.install('emp-1zlab')\n\n import emp_boot\n emp_boot.set_boot_mode()\n\n Enter 2, This operation will overwrite your boot.py file, and your \n device will restart. Please follow the prompts to connect to wifi \n after rebooting. After that, webrepl will be automatically enabled. \n The default password is '1zlab', you can modify it in webrepl.pass."}},c252:function(e,t){e.exports=MuseUI},e399:function(e,t,n){var i={"./pages/error":["5d94","chunk-2d0d3720"],"./pages/error.vue":["5d94","chunk-2d0d3720"],"./pages/ide":["0b01","chunk-329d5946"],"./pages/ide/":["0b01","chunk-329d5946"],"./pages/ide/index":["0b01","chunk-329d5946"],"./pages/ide/index.vue":["0b01","chunk-329d5946"],"./pages/ide/props":["97c5","chunk-2d0e64c6"],"./pages/ide/props.js":["97c5","chunk-2d0e64c6"],"./pages/ide/signals":["4453","chunk-2d0c0e14"],"./pages/ide/signals.js":["4453","chunk-2d0c0e14"],"./pages/ide/slots":["eceb","chunk-2d230ab1"],"./pages/ide/slots.js":["eceb","chunk-2d230ab1"]};function r(e){var t=i[e];return t?n.e(t[1]).then(function(){var e=t[0];return n(e)}):Promise.resolve().then(function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t})}r.keys=function(){return Object.keys(i)},r.id="e399",e.exports=r}}); //# sourceMappingURL=app.432c990d.js.map
1zlab-emp-ide
/1zlab_emp_ide-0.0.3-py3-none-any.whl/emp_ide/static/js/app.432c990d.js
app.432c990d.js
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-vendors"],{"00e7":function(t,e,n){(function(){Number.isInteger=Number.isInteger||function(t){return"number"===typeof t&&isFinite(t)&&Math.floor(t)===t};var e=n("06b1"),r={install:function(t){t.prototype.$cookie=this,t.cookie=this},set:function(t,n,r){var o=r;return Number.isInteger(r)&&(o={expires:r}),e.set(t,n,o)},get:function(t){return e.get(t)},delete:function(t,e){var n={expires:-1};void 0!==e&&(n=Object.assign(e,n)),this.set(t,"",n)}};t.exports=r})()},"00fd":function(t,e,n){var r=n("9e69"),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,c=r?r.toStringTag:void 0;function s(t){var e=i.call(t,c),n=t[c];try{t[c]=void 0;var r=!0}catch(s){}var o=a.call(t);return r&&(e?t[c]=n:delete t[c]),o}t.exports=s},"01f9":function(t,e,n){"use strict";var r=n("2d00"),o=n("5ca1"),i=n("2aba"),a=n("32e9"),c=n("84f2"),s=n("41a0"),u=n("7f20"),f=n("38fd"),l=n("2b4c")("iterator"),p=!([].keys&&"next"in[].keys()),h="@@iterator",d="keys",v="values",m=function(){return this};t.exports=function(t,e,n,y,b,g,_){s(n,e,y);var x,w,j,S=function(t){if(!p&&t in $)return $[t];switch(t){case d:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},k=e+" Iterator",O=b==v,A=!1,$=t.prototype,C=$[l]||$[h]||b&&$[b],E=C||S(b),T=b?O?S("entries"):E:void 0,F="Array"==e&&$.entries||C;if(F&&(j=f(F.call(new t)),j!==Object.prototype&&j.next&&(u(j,k,!0),r||"function"==typeof j[l]||a(j,l,m))),O&&C&&C.name!==v&&(A=!0,E=function(){return C.call(this)}),r&&!_||!p&&!A&&$[l]||a($,l,E),c[e]=E,c[k]=m,b)if(x={values:O?E:S(v),keys:g?E:S(d),entries:T},_)for(w in x)w in $||i($,w,x[w]);else o(o.P+o.F*(p||A),e,x);return x}},"02f4":function(t,e,n){var r=n("4588"),o=n("be13");t.exports=function(t){return function(e,n){var i,a,c=String(o(e)),s=r(n),u=c.length;return s<0||s>=u?t?"":void 0:(i=c.charCodeAt(s),i<55296||i>56319||s+1===u||(a=c.charCodeAt(s+1))<56320||a>57343?t?c.charAt(s):i:t?c.slice(s,s+2):a-56320+(i-55296<<10)+65536)}}},"0390":function(t,e,n){"use strict";var r=n("02f4")(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},"03dd":function(t,e,n){var r=n("eac5"),o=n("57a5"),i=Object.prototype,a=i.hasOwnProperty;function c(t){if(!r(t))return o(t);var e=[];for(var n in Object(t))a.call(t,n)&&"constructor"!=n&&e.push(n);return e}t.exports=c},"0644":function(t,e,n){var r=n("3818"),o=1,i=4;function a(t){return r(t,o|i)}t.exports=a},"06b1":function(t,e,n){var r,o; /*! * tiny-cookie - A tiny cookie manipulation plugin * https://github.com/Alex1990/tiny-cookie * Under the MIT license | (c) Alex Chao */!function(i,a){r=a,o="function"===typeof r?r.call(e,n,e,t):r,void 0===o||(t.exports=o)}(0,function(){"use strict";function t(e,n,r){if(void 0===n)return t.get(e);null===n?t.remove(e):t.set(e,n,r)}function e(t){return t.replace(/[.*+?^$|[\](){}\\-]/g,"\\$&")}function n(t){var e="";for(var n in t)if(t.hasOwnProperty(n)){if("expires"===n){var o=t[n];"object"!==typeof o&&(o+="number"===typeof o?"D":"",o=r(o)),t[n]=o.toUTCString()}if("secure"===n){t[n]&&(e+=";"+n);continue}e+=";"+n+"="+t[n]}return t.hasOwnProperty("path")||(e+=";path=/"),e}function r(t){var e=new Date,n=t.charAt(t.length-1),r=parseInt(t,10);switch(n){case"Y":e.setFullYear(e.getFullYear()+r);break;case"M":e.setMonth(e.getMonth()+r);break;case"D":e.setDate(e.getDate()+r);break;case"h":e.setHours(e.getHours()+r);break;case"m":e.setMinutes(e.getMinutes()+r);break;case"s":e.setSeconds(e.getSeconds()+r);break;default:e=new Date(t)}return e}return t.enabled=function(){var e,n="__test_key";return document.cookie=n+"=1",e=!!document.cookie,e&&t.remove(n),e},t.get=function(t,n){if("string"!==typeof t||!t)return null;t="(?:^|; )"+e(t)+"(?:=([^;]*?))?(?:;|$)";var r=new RegExp(t),o=r.exec(document.cookie);return null!==o?n?o[1]:decodeURIComponent(o[1]):null},t.getRaw=function(e){return t.get(e,!0)},t.set=function(t,e,r,o){!0!==r&&(o=r,r=!1),o=n(o||{});var i=t+"="+(r?e:encodeURIComponent(e))+o;document.cookie=i},t.setRaw=function(e,n,r){t.set(e,n,!0,r)},t.remove=function(e){t.set(e,"a",{expires:new Date})},t})},"07c7":function(t,e){function n(){return!1}t.exports=n},"087d":function(t,e){function n(t,e){var n=-1,r=e.length,o=t.length;while(++n<r)t[o+n]=e[n];return t}t.exports=n},"097d":function(t,e,n){"use strict";var r=n("5ca1"),o=n("8378"),i=n("7726"),a=n("ebd6"),c=n("bcaa");r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,o.Promise||i.Promise),n="function"==typeof t;return this.then(n?function(n){return c(e,t()).then(function(){return n})}:t,n?function(n){return c(e,t()).then(function(){throw n})}:t)}})},"09fa":function(t,e,n){var r=n("4588"),o=n("9def");t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=o(e);if(e!==n)throw RangeError("Wrong length!");return n}},"0a49":function(t,e,n){var r=n("9b43"),o=n("626a"),i=n("4bf8"),a=n("9def"),c=n("cd1c");t.exports=function(t,e){var n=1==t,s=2==t,u=3==t,f=4==t,l=6==t,p=5==t||l,h=e||c;return function(e,c,d){for(var v,m,y=i(e),b=o(y),g=r(c,d,3),_=a(b.length),x=0,w=n?h(e,_):s?h(e,0):void 0;_>x;x++)if((p||x in b)&&(v=b[x],m=g(v,x,y),t))if(n)w[x]=m;else if(m)switch(t){case 3:return!0;case 5:return v;case 6:return x;case 2:w.push(v)}else if(f)return!1;return l?-1:u||f?f:w}}},"0b07":function(t,e,n){var r=n("34ac"),o=n("3698");function i(t,e){var n=o(t,e);return r(n)?n:void 0}t.exports=i},"0bfb":function(t,e,n){"use strict";var r=n("cb7c");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},"0d24":function(t,e,n){(function(t){var r=n("2b3e"),o=n("07c7"),i=e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,c=a&&a.exports===i,s=c?r.Buffer:void 0,u=s?s.isBuffer:void 0,f=u||o;t.exports=f}).call(this,n("62e4")(t))},"0d58":function(t,e,n){var r=n("ce10"),o=n("e11e");t.exports=Object.keys||function(t){return r(t,o)}},"0f0f":function(t,e,n){var r=n("8eeb"),o=n("9934");function i(t,e){return t&&r(e,o(e),t)}t.exports=i},"0f88":function(t,e,n){var r,o=n("7726"),i=n("32e9"),a=n("ca5a"),c=a("typed_array"),s=a("view"),u=!(!o.ArrayBuffer||!o.DataView),f=u,l=0,p=9,h="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");while(l<p)(r=o[h[l++]])?(i(r.prototype,c,!0),i(r.prototype,s,!0)):f=!1;t.exports={ABV:u,CONSTR:f,TYPED:c,VIEW:s}},1041:function(t,e,n){var r=n("8eeb"),o=n("a029");function i(t,e){return r(t,o(t),e)}t.exports=i},1169:function(t,e,n){var r=n("2d95");t.exports=Array.isArray||function(t){return"Array"==r(t)}},"11e9":function(t,e,n){var r=n("52a7"),o=n("4630"),i=n("6821"),a=n("6a99"),c=n("69a8"),s=n("c69a"),u=Object.getOwnPropertyDescriptor;e.f=n("9e1e")?u:function(t,e){if(t=i(t),e=a(e,!0),s)try{return u(t,e)}catch(n){}if(c(t,e))return o(!r.f.call(t,e),t[e])}},1290:function(t,e){function n(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}t.exports=n},1310:function(t,e){function n(t){return null!=t&&"object"==typeof t}t.exports=n},1368:function(t,e,n){var r=n("da03"),o=function(){var t=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function i(t){return!!o&&o in t}t.exports=i},1495:function(t,e,n){var r=n("86cc"),o=n("cb7c"),i=n("0d58");t.exports=n("9e1e")?Object.defineProperties:function(t,e){o(t);var n,a=i(e),c=a.length,s=0;while(c>s)r.f(t,n=a[s++],e[n]);return t}},1991:function(t,e,n){var r,o,i,a=n("9b43"),c=n("31f4"),s=n("fab2"),u=n("230e"),f=n("7726"),l=f.process,p=f.setImmediate,h=f.clearImmediate,d=f.MessageChannel,v=f.Dispatch,m=0,y={},b="onreadystatechange",g=function(){var t=+this;if(y.hasOwnProperty(t)){var e=y[t];delete y[t],e()}},_=function(t){g.call(t.data)};p&&h||(p=function(t){var e=[],n=1;while(arguments.length>n)e.push(arguments[n++]);return y[++m]=function(){c("function"==typeof t?t:Function(t),e)},r(m),m},h=function(t){delete y[t]},"process"==n("2d95")(l)?r=function(t){l.nextTick(a(g,t,1))}:v&&v.now?r=function(t){v.now(a(g,t,1))}:d?(o=new d,i=o.port2,o.port1.onmessage=_,r=a(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",_,!1)):r=b in u("script")?function(t){s.appendChild(u("script"))[b]=function(){s.removeChild(this),g.call(t)}}:function(t){setTimeout(a(g,t,1),0)}),t.exports={set:p,clear:h}},"1a2d":function(t,e,n){var r=n("42a2"),o=n("1310"),i="[object Map]";function a(t){return o(t)&&r(t)==i}t.exports=a},"1a8c":function(t,e){function n(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}t.exports=n},"1bac":function(t,e,n){var r=n("7d1f"),o=n("a029"),i=n("9934");function a(t){return r(t,i,o)}t.exports=a},"1cec":function(t,e,n){var r=n("0b07"),o=n("2b3e"),i=r(o,"Promise");t.exports=i},"1efc":function(t,e){function n(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}t.exports=n},"1fa8":function(t,e,n){var r=n("cb7c");t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(a){var i=t["return"];throw void 0!==i&&r(i.call(t)),a}}},"1fc8":function(t,e,n){var r=n("4245");function o(t,e){var n=r(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this}t.exports=o},"214f":function(t,e,n){"use strict";n("b0c5");var r=n("2aba"),o=n("32e9"),i=n("79e5"),a=n("be13"),c=n("2b4c"),s=n("520a"),u=c("species"),f=!i(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}),l=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var p=c(t),h=!i(function(){var e={};return e[p]=function(){return 7},7!=""[t](e)}),d=h?!i(function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[u]=function(){return n}),n[p](""),!e}):void 0;if(!h||!d||"replace"===t&&!f||"split"===t&&!l){var v=/./[p],m=n(a,p,""[t],function(t,e,n,r,o){return e.exec===s?h&&!o?{done:!0,value:v.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),y=m[0],b=m[1];r(String.prototype,t,y),o(RegExp.prototype,p,2==e?function(t,e){return b.call(t,this,e)}:function(t){return b.call(t,this)})}}},"230e":function(t,e,n){var r=n("d3f4"),o=n("7726").document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},"23c6":function(t,e,n){var r=n("2d95"),o=n("2b4c")("toStringTag"),i="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(n){}};t.exports=function(t){var e,n,c;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),o))?n:i?r(e):"Object"==(c=r(e))&&"function"==typeof e.callee?"Arguments":c}},2474:function(t,e,n){var r=n("2b3e"),o=r.Uint8Array;t.exports=o},2478:function(t,e,n){var r=n("4245");function o(t){return r(this,t).get(t)}t.exports=o},2524:function(t,e,n){var r=n("6044"),o="__lodash_hash_undefined__";function i(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?o:e,this}t.exports=i},"253c":function(t,e,n){var r=n("3729"),o=n("1310"),i="[object Arguments]";function a(t){return o(t)&&r(t)==i}t.exports=a},2621:function(t,e){e.f=Object.getOwnPropertySymbols},"27ee":function(t,e,n){var r=n("23c6"),o=n("2b4c")("iterator"),i=n("84f2");t.exports=n("8378").getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},2877:function(t,e,n){"use strict";function r(t,e,n,r,o,i,a,c){var s,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),a?(s=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=s):o&&(s=c?function(){o.call(this,this.$root.$options.shadowRoot)}:o),s)if(u.functional){u._injectStyles=s;var f=u.render;u.render=function(t,e){return s.call(e),f(t,e)}}else{var l=u.beforeCreate;u.beforeCreate=l?[].concat(l,s):[s]}return{exports:t,options:u}}n.d(e,"a",function(){return r})},"28a5":function(t,e,n){"use strict";var r=n("aae3"),o=n("cb7c"),i=n("ebd6"),a=n("0390"),c=n("9def"),s=n("5f1b"),u=n("520a"),f=n("79e5"),l=Math.min,p=[].push,h="split",d="length",v="lastIndex",m=4294967295,y=!f(function(){RegExp(m,"y")});n("214f")("split",2,function(t,e,n,f){var b;return b="c"=="abbc"[h](/(b)*/)[1]||4!="test"[h](/(?:)/,-1)[d]||2!="ab"[h](/(?:ab)*/)[d]||4!="."[h](/(.?)(.?)/)[d]||"."[h](/()()/)[d]>1||""[h](/.?/)[d]?function(t,e){var o=String(this);if(void 0===t&&0===e)return[];if(!r(t))return n.call(o,t,e);var i,a,c,s=[],f=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),l=0,h=void 0===e?m:e>>>0,y=new RegExp(t.source,f+"g");while(i=u.call(y,o)){if(a=y[v],a>l&&(s.push(o.slice(l,i.index)),i[d]>1&&i.index<o[d]&&p.apply(s,i.slice(1)),c=i[0][d],l=a,s[d]>=h))break;y[v]===i.index&&y[v]++}return l===o[d]?!c&&y.test("")||s.push(""):s.push(o.slice(l)),s[d]>h?s.slice(0,h):s}:"0"[h](void 0,0)[d]?function(t,e){return void 0===t&&0===e?[]:n.call(this,t,e)}:n,[function(n,r){var o=t(this),i=void 0==n?void 0:n[e];return void 0!==i?i.call(n,o,r):b.call(String(o),n,r)},function(t,e){var r=f(b,t,this,e,b!==n);if(r.done)return r.value;var u=o(t),p=String(this),h=i(u,RegExp),d=u.unicode,v=(u.ignoreCase?"i":"")+(u.multiline?"m":"")+(u.unicode?"u":"")+(y?"y":"g"),g=new h(y?u:"^(?:"+u.source+")",v),_=void 0===e?m:e>>>0;if(0===_)return[];if(0===p.length)return null===s(g,p)?[p]:[];var x=0,w=0,j=[];while(w<p.length){g.lastIndex=y?w:0;var S,k=s(g,y?p:p.slice(w));if(null===k||(S=l(c(g.lastIndex+(y?0:w)),p.length))===x)w=a(p,w,d);else{if(j.push(p.slice(x,w)),j.length===_)return j;for(var O=1;O<=k.length-1;O++)if(j.push(k[O]),j.length===_)return j;w=x=S}}return j.push(p.slice(x)),j}]})},"28c9":function(t,e){function n(){this.__data__=[],this.size=0}t.exports=n},"29f3":function(t,e){var n=Object.prototype,r=n.toString;function o(t){return r.call(t)}t.exports=o},"2aba":function(t,e,n){var r=n("7726"),o=n("32e9"),i=n("69a8"),a=n("ca5a")("src"),c=n("fa5b"),s="toString",u=(""+c).split(s);n("8378").inspectSource=function(t){return c.call(t)},(t.exports=function(t,e,n,c){var s="function"==typeof n;s&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(s&&(i(n,a)||o(n,a,t[e]?""+t[e]:u.join(String(e)))),t===r?t[e]=n:c?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,s,function(){return"function"==typeof this&&this[a]||c.call(this)})},"2aeb":function(t,e,n){var r=n("cb7c"),o=n("1495"),i=n("e11e"),a=n("613b")("IE_PROTO"),c=function(){},s="prototype",u=function(){var t,e=n("230e")("iframe"),r=i.length,o="<",a=">";e.style.display="none",n("fab2").appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(o+"script"+a+"document.F=Object"+o+"/script"+a),t.close(),u=t.F;while(r--)delete u[s][i[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(c[s]=r(t),n=new c,c[s]=null,n[a]=t):n=u(),void 0===e?n:o(n,e)}},"2b3e":function(t,e,n){var r=n("585a"),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},"2b4c":function(t,e,n){var r=n("5537")("wks"),o=n("ca5a"),i=n("7726").Symbol,a="function"==typeof i,c=t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))};c.store=r},"2d00":function(t,e){t.exports=!1},"2d7c":function(t,e){function n(t,e){var n=-1,r=null==t?0:t.length,o=0,i=[];while(++n<r){var a=t[n];e(a,n,t)&&(i[o++]=a)}return i}t.exports=n},"2d95":function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"2dcb":function(t,e,n){var r=n("91e9"),o=r(Object.getPrototypeOf,Object);t.exports=o},"2fcc":function(t,e){function n(t){var e=this.__data__,n=e["delete"](t);return this.size=e.size,n}t.exports=n},"30c9":function(t,e,n){var r=n("9520"),o=n("b218");function i(t){return null!=t&&o(t.length)&&!r(t)}t.exports=i},"31f4":function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},"32b3":function(t,e,n){var r=n("872a"),o=n("9638"),i=Object.prototype,a=i.hasOwnProperty;function c(t,e,n){var i=t[e];a.call(t,e)&&o(i,n)&&(void 0!==n||e in t)||r(t,e,n)}t.exports=c},"32e9":function(t,e,n){var r=n("86cc"),o=n("4630");t.exports=n("9e1e")?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},"32f4":function(t,e,n){var r=n("2d7c"),o=n("d327"),i=Object.prototype,a=i.propertyIsEnumerable,c=Object.getOwnPropertySymbols,s=c?function(t){return null==t?[]:(t=Object(t),r(c(t),function(e){return a.call(t,e)}))}:o;t.exports=s},"33a4":function(t,e,n){var r=n("84f2"),o=n("2b4c")("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},"34ac":function(t,e,n){var r=n("9520"),o=n("1368"),i=n("1a8c"),a=n("dc57"),c=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,u=Function.prototype,f=Object.prototype,l=u.toString,p=f.hasOwnProperty,h=RegExp("^"+l.call(p).replace(c,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(t){if(!i(t)||o(t))return!1;var e=r(t)?h:s;return e.test(a(t))}t.exports=d},"34ef":function(t,e,n){n("ec30")("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},3698:function(t,e){function n(t,e){return null==t?void 0:t[e]}t.exports=n},"36bd":function(t,e,n){"use strict";var r=n("4bf8"),o=n("77f1"),i=n("9def");t.exports=function(t){var e=r(this),n=i(e.length),a=arguments.length,c=o(a>1?arguments[1]:void 0,n),s=a>2?arguments[2]:void 0,u=void 0===s?n:o(s,n);while(u>c)e[c++]=t;return e}},3729:function(t,e,n){var r=n("9e69"),o=n("00fd"),i=n("29f3"),a="[object Null]",c="[object Undefined]",s=r?r.toStringTag:void 0;function u(t){return null==t?void 0===t?c:a:s&&s in Object(t)?o(t):i(t)}t.exports=u},3818:function(t,e,n){var r=n("7e64"),o=n("8057"),i=n("32b3"),a=n("5b01"),c=n("0f0f"),s=n("e538"),u=n("4359"),f=n("54eb"),l=n("1041"),p=n("a994"),h=n("1bac"),d=n("42a2"),v=n("c87c"),m=n("c2b6"),y=n("fa21"),b=n("6747"),g=n("0d24"),_=n("cc45"),x=n("1a8c"),w=n("d7ee"),j=n("ec69"),S=1,k=2,O=4,A="[object Arguments]",$="[object Array]",C="[object Boolean]",E="[object Date]",T="[object Error]",F="[object Function]",I="[object GeneratorFunction]",R="[object Map]",M="[object Number]",P="[object Object]",L="[object RegExp]",N="[object Set]",D="[object String]",W="[object Symbol]",U="[object WeakMap]",V="[object ArrayBuffer]",B="[object DataView]",z="[object Float32Array]",H="[object Float64Array]",q="[object Int8Array]",G="[object Int16Array]",Y="[object Int32Array]",J="[object Uint8Array]",K="[object Uint8ClampedArray]",X="[object Uint16Array]",Q="[object Uint32Array]",Z={};function tt(t,e,n,$,C,E){var T,R=e&S,M=e&k,L=e&O;if(n&&(T=C?n(t,$,C,E):n(t)),void 0!==T)return T;if(!x(t))return t;var N=b(t);if(N){if(T=v(t),!R)return u(t,T)}else{var D=d(t),W=D==F||D==I;if(g(t))return s(t,R);if(D==P||D==A||W&&!C){if(T=M||W?{}:y(t),!R)return M?l(t,c(T,t)):f(t,a(T,t))}else{if(!Z[D])return C?t:{};T=m(t,D,R)}}E||(E=new r);var U=E.get(t);if(U)return U;E.set(t,T),w(t)?t.forEach(function(r){T.add(tt(r,e,n,r,t,E))}):_(t)&&t.forEach(function(r,o){T.set(o,tt(r,e,n,o,t,E))});var V=L?M?h:p:M?keysIn:j,B=N?void 0:V(t);return o(B||t,function(r,o){B&&(o=r,r=t[o]),i(T,o,tt(r,e,n,o,t,E))}),T}Z[A]=Z[$]=Z[V]=Z[B]=Z[C]=Z[E]=Z[z]=Z[H]=Z[q]=Z[G]=Z[Y]=Z[R]=Z[M]=Z[P]=Z[L]=Z[N]=Z[D]=Z[W]=Z[J]=Z[K]=Z[X]=Z[Q]=!0,Z[T]=Z[F]=Z[U]=!1,t.exports=tt},"38fd":function(t,e,n){var r=n("69a8"),o=n("4bf8"),i=n("613b")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},"39ff":function(t,e,n){var r=n("0b07"),o=n("2b3e"),i=r(o,"WeakMap");t.exports=i},"3b4a":function(t,e,n){var r=n("0b07"),o=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(e){}}();t.exports=o},"41a0":function(t,e,n){"use strict";var r=n("2aeb"),o=n("4630"),i=n("7f20"),a={};n("32e9")(a,n("2b4c")("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},"41c3":function(t,e,n){var r=n("1a8c"),o=n("eac5"),i=n("ec8c"),a=Object.prototype,c=a.hasOwnProperty;function s(t){if(!r(t))return i(t);var e=o(t),n=[];for(var a in t)("constructor"!=a||!e&&c.call(t,a))&&n.push(a);return n}t.exports=s},4245:function(t,e,n){var r=n("1290");function o(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}t.exports=o},"42a2":function(t,e,n){var r=n("b5a7"),o=n("79bc"),i=n("1cec"),a=n("c869"),c=n("39ff"),s=n("3729"),u=n("dc57"),f="[object Map]",l="[object Object]",p="[object Promise]",h="[object Set]",d="[object WeakMap]",v="[object DataView]",m=u(r),y=u(o),b=u(i),g=u(a),_=u(c),x=s;(r&&x(new r(new ArrayBuffer(1)))!=v||o&&x(new o)!=f||i&&x(i.resolve())!=p||a&&x(new a)!=h||c&&x(new c)!=d)&&(x=function(t){var e=s(t),n=e==l?t.constructor:void 0,r=n?u(n):"";if(r)switch(r){case m:return v;case y:return f;case b:return p;case g:return h;case _:return d}return e}),t.exports=x},4359:function(t,e){function n(t,e){var n=-1,r=t.length;e||(e=Array(r));while(++n<r)e[n]=t[n];return e}t.exports=n},"456d":function(t,e,n){var r=n("4bf8"),o=n("0d58");n("5eda")("keys",function(){return function(t){return o(r(t))}})},4588:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},4630:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"49f4":function(t,e,n){var r=n("6044");function o(){this.__data__=r?r(null):{},this.size=0}t.exports=o},"4a59":function(t,e,n){var r=n("9b43"),o=n("1fa8"),i=n("33a4"),a=n("cb7c"),c=n("9def"),s=n("27ee"),u={},f={};e=t.exports=function(t,e,n,l,p){var h,d,v,m,y=p?function(){return t}:s(t),b=r(n,l,e?2:1),g=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(i(y)){for(h=c(t.length);h>g;g++)if(m=e?b(a(d=t[g])[0],d[1]):b(t[g]),m===u||m===f)return m}else for(v=y.call(t);!(d=v.next()).done;)if(m=o(v,b,d.value,e),m===u||m===f)return m};e.BREAK=u,e.RETURN=f},"4bf8":function(t,e,n){var r=n("be13");t.exports=function(t){return Object(r(t))}},"4d7d":function(t,e,n){"use strict";var r=n("8bbf"),o=n.n(r),i={successIcon:"check_circle",infoIcon:"info",warningIcon:"priority_high",errorIcon:"warning",iconSize:24,width:350,maxWidth:"80%",className:"",okLabel:"确定",cancelLabel:"取消",transition:"scale"},a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},s=function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)},u={name:"mu-modal",props:{title:String,icon:String,iconSize:Number,mode:{type:String,default:"alert",validator:function(t){return-1!==["alert","confirm","prompt"].indexOf(t)}},type:{type:String,default:"",validator:function(t){return-1!==["","success","info","warning","error"].indexOf(t)}},content:[String,Function],width:[Number,String],maxWidth:[Number,String],className:String,transition:String,beforeClose:Function,okLabel:String,cancelLabel:String,inputType:String,inputPlaceholder:String,inputValue:[String,Number],validator:Function},data:function(){return{open:!1,value:this.inputValue,errorText:""}},methods:{handleClose:function(t){var e=this;return this.beforeClose?this.beforeClose(t,this,function(){return e.close(t)}):this.close(t)},close:function(t){if(t&&"prompt"===this.mode&&this.validator){var e=this.validator(this.value);if(!e.valid)return void(this.errorText=e.message);this.errorText=""}return this.open=!1,this.$emit("close",t,this.value),t},createInput:function(t){var e=this;if("prompt"===this.mode)return t("mu-text-field",{attrs:{type:this.inputType,placeholder:this.inputPlaceholder},props:{value:this.value,errorText:this.errorText,fullWidth:!0},on:{input:function(t){return e.value=t},keydown:function(t){13===t.keyCode&&e.handleClose(!0)}}})},createContent:function(t){var e="function"===typeof this.content?this.content(t):this.content;return t("div",{class:"mu-modal-content"},[this.icon?t("mu-icon",{staticClass:"mu-modal-icon",props:{value:this.icon,color:this.type,size:this.iconSize}}):void 0,t("div",{staticClass:"mu-modal-inner"},[e,this.createInput(t)])])},createActions:function(t){var e=this,n=[];return n.push(t("mu-button",{props:{flat:!0,color:"primary"},slot:"actions",on:{click:function(){return e.handleClose(!0)}}},this.okLabel)),"alert"!==this.mode&&n.unshift(t("mu-button",{props:{flat:!0},slot:"actions",on:{click:function(){return e.handleClose(!1)}}},this.cancelLabel)),n}},render:function(t){return t("mu-dialog",{props:{open:this.open,title:this.title,width:this.width,maxWidth:this.maxWidth,dialogClass:this.className,transition:this.transition,overlayClose:!1,escPressClose:!1}},[this.createContent(t)].concat(s(this.createActions(t))))}},f=o.a.extend(u),l="undefined"===typeof window,p=[],h=function(t){if(!l)return new Promise(function(e){var n=new f({el:document.createElement("div"),propsData:c({},i,{icon:i[t.type+"Icon"]||""},t)});document.body.appendChild(n.$el),n.open=!0,"prompt"===n.mode&&setTimeout(function(){n.$el&&n.$el.querySelector("input").focus()},200),p.push(n),n.$on("close",function(t,r){setTimeout(function(){n.$el&&n.$el.parentNode&&n.$el.parentNode.removeChild(n.$el),n.$destroy(),n=null},500);var o=p.indexOf(n);return-1!==o&&p.splice(o,1),e({result:t,value:r})})})};h.config=function(t){if(!t||Array.isArray(t)||"object"!==("undefined"===typeof t?"undefined":a(t)))return i;for(var e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);return i},h.close=function(){p.forEach(function(t){t.close(!1)})},["alert","confirm","prompt"].forEach(function(t){h[t]=function(e,n){if(e||!(arguments.length<2)){var r="";switch(arguments.length){case 1:n={};break;case 2:"string"===typeof n&&(r=n,n={});break;default:r=arguments[1],n=arguments[2];break}return h(c({title:r,content:e},n,{mode:t}))}}}),h.install=function(t,e){h.config(e),t.prototype.$message=h,t.prototype.$alert=h.alert,t.prototype.$confirm=h.confirm,t.prototype.$prompt=h.prompt},e["a"]=h},"50d8":function(t,e){function n(t,e){var n=-1,r=Array(t);while(++n<t)r[n]=e(n);return r}t.exports=n},5147:function(t,e,n){var r=n("2b4c")("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(o){}}return!0}},"520a":function(t,e,n){"use strict";var r=n("0bfb"),o=RegExp.prototype.exec,i=String.prototype.replace,a=o,c="lastIndex",s=function(){var t=/a/,e=/b*/g;return o.call(t,"a"),o.call(e,"a"),0!==t[c]||0!==e[c]}(),u=void 0!==/()??/.exec("")[1],f=s||u;f&&(a=function(t){var e,n,a,f,l=this;return u&&(n=new RegExp("^"+l.source+"$(?!\\s)",r.call(l))),s&&(e=l[c]),a=o.call(l,t),s&&a&&(l[c]=l.global?a.index+a[0].length:e),u&&a&&a.length>1&&i.call(a[0],n,function(){for(f=1;f<arguments.length-2;f++)void 0===arguments[f]&&(a[f]=void 0)}),a}),t.exports=a},"52a7":function(t,e){e.f={}.propertyIsEnumerable},"54eb":function(t,e,n){var r=n("8eeb"),o=n("32f4");function i(t,e){return r(t,o(t),e)}t.exports=i},"551c":function(t,e,n){"use strict";var r,o,i,a,c=n("2d00"),s=n("7726"),u=n("9b43"),f=n("23c6"),l=n("5ca1"),p=n("d3f4"),h=n("d8e8"),d=n("f605"),v=n("4a59"),m=n("ebd6"),y=n("1991").set,b=n("8079")(),g=n("a5b8"),_=n("9c80"),x=n("a25f"),w=n("bcaa"),j="Promise",S=s.TypeError,k=s.process,O=k&&k.versions,A=O&&O.v8||"",$=s[j],C="process"==f(k),E=function(){},T=o=g.f,F=!!function(){try{var t=$.resolve(1),e=(t.constructor={})[n("2b4c")("species")]=function(t){t(E,E)};return(C||"function"==typeof PromiseRejectionEvent)&&t.then(E)instanceof e&&0!==A.indexOf("6.6")&&-1===x.indexOf("Chrome/66")}catch(r){}}(),I=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},R=function(t,e){if(!t._n){t._n=!0;var n=t._c;b(function(){var r=t._v,o=1==t._s,i=0,a=function(e){var n,i,a,c=o?e.ok:e.fail,s=e.resolve,u=e.reject,f=e.domain;try{c?(o||(2==t._h&&L(t),t._h=1),!0===c?n=r:(f&&f.enter(),n=c(r),f&&(f.exit(),a=!0)),n===e.promise?u(S("Promise-chain cycle")):(i=I(n))?i.call(n,s,u):s(n)):u(r)}catch(l){f&&!a&&f.exit(),u(l)}};while(n.length>i)a(n[i++]);t._c=[],t._n=!1,e&&!t._h&&M(t)})}},M=function(t){y.call(s,function(){var e,n,r,o=t._v,i=P(t);if(i&&(e=_(function(){C?k.emit("unhandledRejection",o,t):(n=s.onunhandledrejection)?n({promise:t,reason:o}):(r=s.console)&&r.error&&r.error("Unhandled promise rejection",o)}),t._h=C||P(t)?2:1),t._a=void 0,i&&e.e)throw e.v})},P=function(t){return 1!==t._h&&0===(t._a||t._c).length},L=function(t){y.call(s,function(){var e;C?k.emit("rejectionHandled",t):(e=s.onrejectionhandled)&&e({promise:t,reason:t._v})})},N=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),R(e,!0))},D=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw S("Promise can't be resolved itself");(e=I(t))?b(function(){var r={_w:n,_d:!1};try{e.call(t,u(D,r,1),u(N,r,1))}catch(o){N.call(r,o)}}):(n._v=t,n._s=1,R(n,!1))}catch(r){N.call({_w:n,_d:!1},r)}}};F||($=function(t){d(this,$,j,"_h"),h(t),r.call(this);try{t(u(D,this,1),u(N,this,1))}catch(e){N.call(this,e)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n("dcbc")($.prototype,{then:function(t,e){var n=T(m(this,$));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=C?k.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&R(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=u(D,t,1),this.reject=u(N,t,1)},g.f=T=function(t){return t===$||t===a?new i(t):o(t)}),l(l.G+l.W+l.F*!F,{Promise:$}),n("7f20")($,j),n("7a56")(j),a=n("8378")[j],l(l.S+l.F*!F,j,{reject:function(t){var e=T(this),n=e.reject;return n(t),e.promise}}),l(l.S+l.F*(c||!F),j,{resolve:function(t){return w(c&&this===a?$:this,t)}}),l(l.S+l.F*!(F&&n("5cc5")(function(t){$.all(t)["catch"](E)})),j,{all:function(t){var e=this,n=T(e),r=n.resolve,o=n.reject,i=_(function(){var n=[],i=0,a=1;v(t,!1,function(t){var c=i++,s=!1;n.push(void 0),a++,e.resolve(t).then(function(t){s||(s=!0,n[c]=t,--a||r(n))},o)}),--a||r(n)});return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=T(e),r=n.reject,o=_(function(){v(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}})},5537:function(t,e,n){var r=n("8378"),o=n("7726"),i="__core-js_shared__",a=o[i]||(o[i]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n("2d00")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},"55a3":function(t,e){function n(t){return this.__data__.has(t)}t.exports=n},"57a5":function(t,e,n){var r=n("91e9"),o=r(Object.keys,Object);t.exports=o},"585a":function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n("c8ba"))},"5b01":function(t,e,n){var r=n("8eeb"),o=n("ec69");function i(t,e){return t&&r(e,o(e),t)}t.exports=i},"5ca1":function(t,e,n){var r=n("7726"),o=n("8378"),i=n("32e9"),a=n("2aba"),c=n("9b43"),s="prototype",u=function(t,e,n){var f,l,p,h,d=t&u.F,v=t&u.G,m=t&u.S,y=t&u.P,b=t&u.B,g=v?r:m?r[e]||(r[e]={}):(r[e]||{})[s],_=v?o:o[e]||(o[e]={}),x=_[s]||(_[s]={});for(f in v&&(n=e),n)l=!d&&g&&void 0!==g[f],p=(l?g:n)[f],h=b&&l?c(p,r):y&&"function"==typeof p?c(Function.call,p):p,g&&a(g,f,p,t&u.U),_[f]!=p&&i(_,f,h),y&&x[f]!=p&&(x[f]=p)};r.core=o,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},"5cc5":function(t,e,n){var r=n("2b4c")("iterator"),o=!1;try{var i=[7][r]();i["return"]=function(){o=!0},Array.from(i,function(){throw 2})}catch(a){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],c=i[r]();c.next=function(){return{done:n=!0}},i[r]=function(){return c},t(i)}catch(a){}return n}},"5d89":function(t,e,n){var r=n("f8af");function o(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}t.exports=o},"5e2e":function(t,e,n){var r=n("28c9"),o=n("69d5"),i=n("b4c0"),a=n("fba5"),c=n("67ca");function s(t){var e=-1,n=null==t?0:t.length;this.clear();while(++e<n){var r=t[e];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype["delete"]=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=c,t.exports=s},"5eda":function(t,e,n){var r=n("5ca1"),o=n("8378"),i=n("79e5");t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*i(function(){n(1)}),"Object",a)}},"5f1b":function(t,e,n){"use strict";var r=n("23c6"),o=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"===typeof n){var i=n.call(t,e);if("object"!==typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},6044:function(t,e,n){var r=n("0b07"),o=r(Object,"create");t.exports=o},"613b":function(t,e,n){var r=n("5537")("keys"),o=n("ca5a");t.exports=function(t){return r[t]||(r[t]=o(t))}},"619b":function(t,e,n){},"626a":function(t,e,n){var r=n("2d95");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},"62e4":function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},"64d2":function(t,e,n){},6747:function(t,e){var n=Array.isArray;t.exports=n},"67ca":function(t,e,n){var r=n("cb5a");function o(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}t.exports=o},6821:function(t,e,n){var r=n("626a"),o=n("be13");t.exports=function(t){return r(o(t))}},"69a8":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"69d5":function(t,e,n){var r=n("cb5a"),o=Array.prototype,i=o.splice;function a(t){var e=this.__data__,n=r(e,t);if(n<0)return!1;var o=e.length-1;return n==o?e.pop():i.call(e,n,1),--this.size,!0}t.exports=a},"6a99":function(t,e,n){var r=n("d3f4");t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},"6f6c":function(t,e){var n=/\w*$/;function r(t){var e=new t.constructor(t.source,n.exec(t));return e.lastIndex=t.lastIndex,e}t.exports=r},"6fcd":function(t,e,n){var r=n("50d8"),o=n("d370"),i=n("6747"),a=n("0d24"),c=n("c098"),s=n("73ac"),u=Object.prototype,f=u.hasOwnProperty;function l(t,e){var n=i(t),u=!n&&o(t),l=!n&&!u&&a(t),p=!n&&!u&&!l&&s(t),h=n||u||l||p,d=h?r(t.length,String):[],v=d.length;for(var m in t)!e&&!f.call(t,m)||h&&("length"==m||l&&("offset"==m||"parent"==m)||p&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||c(m,v))||d.push(m);return d}t.exports=l},7333:function(t,e,n){"use strict";var r=n("9e1e"),o=n("0d58"),i=n("2621"),a=n("52a7"),c=n("4bf8"),s=n("626a"),u=Object.assign;t.exports=!u||n("79e5")(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=r})?function(t,e){var n=c(t),u=arguments.length,f=1,l=i.f,p=a.f;while(u>f){var h,d=s(arguments[f++]),v=l?o(d).concat(l(d)):o(d),m=v.length,y=0;while(m>y)h=v[y++],r&&!p.call(d,h)||(n[h]=d[h])}return n}:u},"73ac":function(t,e,n){var r=n("743f"),o=n("b047"),i=n("99d3"),a=i&&i.isTypedArray,c=a?o(a):r;t.exports=c},"743f":function(t,e,n){var r=n("3729"),o=n("b218"),i=n("1310"),a="[object Arguments]",c="[object Array]",s="[object Boolean]",u="[object Date]",f="[object Error]",l="[object Function]",p="[object Map]",h="[object Number]",d="[object Object]",v="[object RegExp]",m="[object Set]",y="[object String]",b="[object WeakMap]",g="[object ArrayBuffer]",_="[object DataView]",x="[object Float32Array]",w="[object Float64Array]",j="[object Int8Array]",S="[object Int16Array]",k="[object Int32Array]",O="[object Uint8Array]",A="[object Uint8ClampedArray]",$="[object Uint16Array]",C="[object Uint32Array]",E={};function T(t){return i(t)&&o(t.length)&&!!E[r(t)]}E[x]=E[w]=E[j]=E[S]=E[k]=E[O]=E[A]=E[$]=E[C]=!0,E[a]=E[c]=E[g]=E[s]=E[_]=E[u]=E[f]=E[l]=E[p]=E[h]=E[d]=E[v]=E[m]=E[y]=E[b]=!1,t.exports=T},7530:function(t,e,n){var r=n("1a8c"),o=Object.create,i=function(){function t(){}return function(e){if(!r(e))return{};if(o)return o(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=i},7726:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"77f1":function(t,e,n){var r=n("4588"),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},"79bc":function(t,e,n){var r=n("0b07"),o=n("2b3e"),i=r(o,"Map");t.exports=i},"79e5":function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},"7a48":function(t,e,n){var r=n("6044"),o=Object.prototype,i=o.hasOwnProperty;function a(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}t.exports=a},"7a56":function(t,e,n){"use strict";var r=n("7726"),o=n("86cc"),i=n("9e1e"),a=n("2b4c")("species");t.exports=function(t){var e=r[t];i&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},"7b83":function(t,e,n){var r=n("7c64"),o=n("93ed"),i=n("2478"),a=n("a524"),c=n("1fc8");function s(t){var e=-1,n=null==t?0:t.length;this.clear();while(++e<n){var r=t[e];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype["delete"]=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=c,t.exports=s},"7c64":function(t,e,n){var r=n("e24b"),o=n("5e2e"),i=n("79bc");function a(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}t.exports=a},"7d1f":function(t,e,n){var r=n("087d"),o=n("6747");function i(t,e,n){var i=e(t);return o(t)?i:r(i,n(t))}t.exports=i},"7e64":function(t,e,n){var r=n("5e2e"),o=n("efb6"),i=n("2fcc"),a=n("802a"),c=n("55a3"),s=n("d02c");function u(t){var e=this.__data__=new r(t);this.size=e.size}u.prototype.clear=o,u.prototype["delete"]=i,u.prototype.get=a,u.prototype.has=c,u.prototype.set=s,t.exports=u},"7f20":function(t,e,n){var r=n("86cc").f,o=n("69a8"),i=n("2b4c")("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},"802a":function(t,e){function n(t){return this.__data__.get(t)}t.exports=n},8057:function(t,e){function n(t,e){var n=-1,r=null==t?0:t.length;while(++n<r)if(!1===e(t[n],n,t))break;return t}t.exports=n},8079:function(t,e,n){var r=n("7726"),o=n("1991").set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,c=r.Promise,s="process"==n("2d95")(a);t.exports=function(){var t,e,n,u=function(){var r,o;s&&(r=a.domain)&&r.exit();while(t){o=t.fn,t=t.next;try{o()}catch(i){throw t?n():e=void 0,i}}e=void 0,r&&r.enter()};if(s)n=function(){a.nextTick(u)};else if(!i||r.navigator&&r.navigator.standalone)if(c&&c.resolve){var f=c.resolve(void 0);n=function(){f.then(u)}}else n=function(){o.call(r,u)};else{var l=!0,p=document.createTextNode("");new i(u).observe(p,{characterData:!0}),n=function(){p.data=l=!l}}return function(r){var o={fn:r,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}},8378:function(t,e){var n=t.exports={version:"2.6.9"};"number"==typeof __e&&(__e=n)},"84f2":function(t,e){t.exports={}},"86cc":function(t,e,n){var r=n("cb7c"),o=n("c69a"),i=n("6a99"),a=Object.defineProperty;e.f=n("9e1e")?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(c){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},"872a":function(t,e,n){var r=n("3b4a");function o(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}t.exports=o},"8c4f":function(t,e,n){"use strict"; /*! * vue-router v3.1.2 * (c) 2019 Evan You * @license MIT */function r(t,e){0}function o(t){return Object.prototype.toString.call(t).indexOf("Error")>-1}function i(t,e){return e instanceof t||e&&(e.name===t.name||e._name===t._name)}function a(t,e){for(var n in e)t[n]=e[n];return t}var c={name:"RouterView",functional:!0,props:{name:{type:String,default:"default"}},render:function(t,e){var n=e.props,r=e.children,o=e.parent,i=e.data;i.routerView=!0;var c=o.$createElement,u=n.name,f=o.$route,l=o._routerViewCache||(o._routerViewCache={}),p=0,h=!1;while(o&&o._routerRoot!==o){var d=o.$vnode&&o.$vnode.data;d&&(d.routerView&&p++,d.keepAlive&&o._inactive&&(h=!0)),o=o.$parent}if(i.routerViewDepth=p,h)return c(l[u],i,r);var v=f.matched[p];if(!v)return l[u]=null,c();var m=l[u]=v.components[u];i.registerRouteInstance=function(t,e){var n=v.instances[u];(e&&n!==t||!e&&n===t)&&(v.instances[u]=e)},(i.hook||(i.hook={})).prepatch=function(t,e){v.instances[u]=e.componentInstance},i.hook.init=function(t){t.data.keepAlive&&t.componentInstance&&t.componentInstance!==v.instances[u]&&(v.instances[u]=t.componentInstance)};var y=i.props=s(f,v.props&&v.props[u]);if(y){y=i.props=a({},y);var b=i.attrs=i.attrs||{};for(var g in y)m.props&&g in m.props||(b[g]=y[g],delete y[g])}return c(m,i,r)}};function s(t,e){switch(typeof e){case"undefined":return;case"object":return e;case"function":return e(t);case"boolean":return e?t.params:void 0;default:0}}var u=/[!'()*]/g,f=function(t){return"%"+t.charCodeAt(0).toString(16)},l=/%2C/g,p=function(t){return encodeURIComponent(t).replace(u,f).replace(l,",")},h=decodeURIComponent;function d(t,e,n){void 0===e&&(e={});var r,o=n||v;try{r=o(t||"")}catch(a){r={}}for(var i in e)r[i]=e[i];return r}function v(t){var e={};return t=t.trim().replace(/^(\?|#|&)/,""),t?(t.split("&").forEach(function(t){var n=t.replace(/\+/g," ").split("="),r=h(n.shift()),o=n.length>0?h(n.join("=")):null;void 0===e[r]?e[r]=o:Array.isArray(e[r])?e[r].push(o):e[r]=[e[r],o]}),e):e}function m(t){var e=t?Object.keys(t).map(function(e){var n=t[e];if(void 0===n)return"";if(null===n)return p(e);if(Array.isArray(n)){var r=[];return n.forEach(function(t){void 0!==t&&(null===t?r.push(p(e)):r.push(p(e)+"="+p(t)))}),r.join("&")}return p(e)+"="+p(n)}).filter(function(t){return t.length>0}).join("&"):null;return e?"?"+e:""}var y=/\/?$/;function b(t,e,n,r){var o=r&&r.options.stringifyQuery,i=e.query||{};try{i=g(i)}catch(c){}var a={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:i,params:e.params||{},fullPath:w(e,o),matched:t?x(t):[]};return n&&(a.redirectedFrom=w(n,o)),Object.freeze(a)}function g(t){if(Array.isArray(t))return t.map(g);if(t&&"object"===typeof t){var e={};for(var n in t)e[n]=g(t[n]);return e}return t}var _=b(null,{path:"/"});function x(t){var e=[];while(t)e.unshift(t),t=t.parent;return e}function w(t,e){var n=t.path,r=t.query;void 0===r&&(r={});var o=t.hash;void 0===o&&(o="");var i=e||m;return(n||"/")+i(r)+o}function j(t,e){return e===_?t===e:!!e&&(t.path&&e.path?t.path.replace(y,"")===e.path.replace(y,"")&&t.hash===e.hash&&S(t.query,e.query):!(!t.name||!e.name)&&(t.name===e.name&&t.hash===e.hash&&S(t.query,e.query)&&S(t.params,e.params)))}function S(t,e){if(void 0===t&&(t={}),void 0===e&&(e={}),!t||!e)return t===e;var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(n){var r=t[n],o=e[n];return"object"===typeof r&&"object"===typeof o?S(r,o):String(r)===String(o)})}function k(t,e){return 0===t.path.replace(y,"/").indexOf(e.path.replace(y,"/"))&&(!e.hash||t.hash===e.hash)&&O(t.query,e.query)}function O(t,e){for(var n in e)if(!(n in t))return!1;return!0}function A(t,e,n){var r=t.charAt(0);if("/"===r)return t;if("?"===r||"#"===r)return e+t;var o=e.split("/");n&&o[o.length-1]||o.pop();for(var i=t.replace(/^\//,"").split("/"),a=0;a<i.length;a++){var c=i[a];".."===c?o.pop():"."!==c&&o.push(c)}return""!==o[0]&&o.unshift(""),o.join("/")}function $(t){var e="",n="",r=t.indexOf("#");r>=0&&(e=t.slice(r),t=t.slice(0,r));var o=t.indexOf("?");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{path:t,query:n,hash:e}}function C(t){return t.replace(/\/\//g,"/")}var E=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},T=K,F=L,I=N,R=U,M=J,P=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function L(t,e){var n,r=[],o=0,i=0,a="",c=e&&e.delimiter||"/";while(null!=(n=P.exec(t))){var s=n[0],u=n[1],f=n.index;if(a+=t.slice(i,f),i=f+s.length,u)a+=u[1];else{var l=t[i],p=n[2],h=n[3],d=n[4],v=n[5],m=n[6],y=n[7];a&&(r.push(a),a="");var b=null!=p&&null!=l&&l!==p,g="+"===m||"*"===m,_="?"===m||"*"===m,x=n[2]||c,w=d||v;r.push({name:h||o++,prefix:p||"",delimiter:x,optional:_,repeat:g,partial:b,asterisk:!!y,pattern:w?B(w):y?".*":"[^"+V(x)+"]+?"})}}return i<t.length&&(a+=t.substr(i)),a&&r.push(a),r}function N(t,e){return U(L(t,e))}function D(t){return encodeURI(t).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function W(t){return encodeURI(t).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function U(t){for(var e=new Array(t.length),n=0;n<t.length;n++)"object"===typeof t[n]&&(e[n]=new RegExp("^(?:"+t[n].pattern+")$"));return function(n,r){for(var o="",i=n||{},a=r||{},c=a.pretty?D:encodeURIComponent,s=0;s<t.length;s++){var u=t[s];if("string"!==typeof u){var f,l=i[u.name];if(null==l){if(u.optional){u.partial&&(o+=u.prefix);continue}throw new TypeError('Expected "'+u.name+'" to be defined')}if(E(l)){if(!u.repeat)throw new TypeError('Expected "'+u.name+'" to not repeat, but received `'+JSON.stringify(l)+"`");if(0===l.length){if(u.optional)continue;throw new TypeError('Expected "'+u.name+'" to not be empty')}for(var p=0;p<l.length;p++){if(f=c(l[p]),!e[s].test(f))throw new TypeError('Expected all "'+u.name+'" to match "'+u.pattern+'", but received `'+JSON.stringify(f)+"`");o+=(0===p?u.prefix:u.delimiter)+f}}else{if(f=u.asterisk?W(l):c(l),!e[s].test(f))throw new TypeError('Expected "'+u.name+'" to match "'+u.pattern+'", but received "'+f+'"');o+=u.prefix+f}}else o+=u}return o}}function V(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function B(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function z(t,e){return t.keys=e,t}function H(t){return t.sensitive?"":"i"}function q(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return z(t,e)}function G(t,e,n){for(var r=[],o=0;o<t.length;o++)r.push(K(t[o],e,n).source);var i=new RegExp("(?:"+r.join("|")+")",H(n));return z(i,e)}function Y(t,e,n){return J(L(t,n),e,n)}function J(t,e,n){E(e)||(n=e||n,e=[]),n=n||{};for(var r=n.strict,o=!1!==n.end,i="",a=0;a<t.length;a++){var c=t[a];if("string"===typeof c)i+=V(c);else{var s=V(c.prefix),u="(?:"+c.pattern+")";e.push(c),c.repeat&&(u+="(?:"+s+u+")*"),u=c.optional?c.partial?s+"("+u+")?":"(?:"+s+"("+u+"))?":s+"("+u+")",i+=u}}var f=V(n.delimiter||"/"),l=i.slice(-f.length)===f;return r||(i=(l?i.slice(0,-f.length):i)+"(?:"+f+"(?=$))?"),i+=o?"$":r&&l?"":"(?="+f+"|$)",z(new RegExp("^"+i,H(n)),e)}function K(t,e,n){return E(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?q(t,e):E(t)?G(t,e,n):Y(t,e,n)}T.parse=F,T.compile=I,T.tokensToFunction=R,T.tokensToRegExp=M;var X=Object.create(null);function Q(t,e,n){e=e||{};try{var r=X[t]||(X[t]=T.compile(t));return e.pathMatch&&(e[0]=e.pathMatch),r(e,{pretty:!0})}catch(o){return""}finally{delete e[0]}}function Z(t,e,n,r){var o="string"===typeof t?{path:t}:t;if(o._normalized)return o;if(o.name)return a({},t);if(!o.path&&o.params&&e){o=a({},o),o._normalized=!0;var i=a(a({},e.params),o.params);if(e.name)o.name=e.name,o.params=i;else if(e.matched.length){var c=e.matched[e.matched.length-1].path;o.path=Q(c,i,"path "+e.path)}else 0;return o}var s=$(o.path||""),u=e&&e.path||"/",f=s.path?A(s.path,u,n||o.append):u,l=d(s.query,o.query,r&&r.options.parseQuery),p=o.hash||s.hash;return p&&"#"!==p.charAt(0)&&(p="#"+p),{_normalized:!0,path:f,query:l,hash:p}}var tt,et=[String,Object],nt=[String,Array],rt=function(){},ot={name:"RouterLink",props:{to:{type:et,required:!0},tag:{type:String,default:"a"},exact:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,event:{type:nt,default:"click"}},render:function(t){var e=this,n=this.$router,r=this.$route,o=n.resolve(this.to,r,this.append),i=o.location,c=o.route,s=o.href,u={},f=n.options.linkActiveClass,l=n.options.linkExactActiveClass,p=null==f?"router-link-active":f,h=null==l?"router-link-exact-active":l,d=null==this.activeClass?p:this.activeClass,v=null==this.exactActiveClass?h:this.exactActiveClass,m=c.redirectedFrom?b(null,Z(c.redirectedFrom),null,n):c;u[v]=j(r,m),u[d]=this.exact?u[v]:k(r,m);var y=function(t){it(t)&&(e.replace?n.replace(i,rt):n.push(i,rt))},g={click:it};Array.isArray(this.event)?this.event.forEach(function(t){g[t]=y}):g[this.event]=y;var _={class:u},x=!this.$scopedSlots.$hasNormal&&this.$scopedSlots.default&&this.$scopedSlots.default({href:s,route:c,navigate:y,isActive:u[d],isExactActive:u[v]});if(x){if(1===x.length)return x[0];if(x.length>1||!x.length)return 0===x.length?t():t("span",{},x)}if("a"===this.tag)_.on=g,_.attrs={href:s};else{var w=at(this.$slots.default);if(w){w.isStatic=!1;var S=w.data=a({},w.data);S.on=g;var O=w.data.attrs=a({},w.data.attrs);O.href=s}else _.on=g}return t(this.tag,_,this.$slots.default)}};function it(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&(void 0===t.button||0===t.button)){if(t.currentTarget&&t.currentTarget.getAttribute){var e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function at(t){if(t)for(var e,n=0;n<t.length;n++){if(e=t[n],"a"===e.tag)return e;if(e.children&&(e=at(e.children)))return e}}function ct(t){if(!ct.installed||tt!==t){ct.installed=!0,tt=t;var e=function(t){return void 0!==t},n=function(t,n){var r=t.$options._parentVnode;e(r)&&e(r=r.data)&&e(r=r.registerRouteInstance)&&r(t,n)};t.mixin({beforeCreate:function(){e(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),t.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,n(this,this)},destroyed:function(){n(this)}}),Object.defineProperty(t.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(t.prototype,"$route",{get:function(){return this._routerRoot._route}}),t.component("RouterView",c),t.component("RouterLink",ot);var r=t.config.optionMergeStrategies;r.beforeRouteEnter=r.beforeRouteLeave=r.beforeRouteUpdate=r.created}}var st="undefined"!==typeof window;function ut(t,e,n,r){var o=e||[],i=n||Object.create(null),a=r||Object.create(null);t.forEach(function(t){ft(o,i,a,t)});for(var c=0,s=o.length;c<s;c++)"*"===o[c]&&(o.push(o.splice(c,1)[0]),s--,c--);return{pathList:o,pathMap:i,nameMap:a}}function ft(t,e,n,r,o,i){var a=r.path,c=r.name;var s=r.pathToRegexpOptions||{},u=pt(a,o,s.strict);"boolean"===typeof r.caseSensitive&&(s.sensitive=r.caseSensitive);var f={path:u,regex:lt(u,s),components:r.components||{default:r.component},instances:{},name:c,parent:o,matchAs:i,redirect:r.redirect,beforeEnter:r.beforeEnter,meta:r.meta||{},props:null==r.props?{}:r.components?r.props:{default:r.props}};if(r.children&&r.children.forEach(function(r){var o=i?C(i+"/"+r.path):void 0;ft(t,e,n,r,f,o)}),e[f.path]||(t.push(f.path),e[f.path]=f),void 0!==r.alias)for(var l=Array.isArray(r.alias)?r.alias:[r.alias],p=0;p<l.length;++p){var h=l[p];0;var d={path:h,children:r.children};ft(t,e,n,d,o,f.path||"/")}c&&(n[c]||(n[c]=f))}function lt(t,e){var n=T(t,[],e);return n}function pt(t,e,n){return n||(t=t.replace(/\/$/,"")),"/"===t[0]?t:null==e?t:C(e.path+"/"+t)}function ht(t,e){var n=ut(t),r=n.pathList,o=n.pathMap,i=n.nameMap;function a(t){ut(t,r,o,i)}function c(t,n,a){var c=Z(t,n,!1,e),s=c.name;if(s){var u=i[s];if(!u)return f(null,c);var l=u.regex.keys.filter(function(t){return!t.optional}).map(function(t){return t.name});if("object"!==typeof c.params&&(c.params={}),n&&"object"===typeof n.params)for(var p in n.params)!(p in c.params)&&l.indexOf(p)>-1&&(c.params[p]=n.params[p]);return c.path=Q(u.path,c.params,'named route "'+s+'"'),f(u,c,a)}if(c.path){c.params={};for(var h=0;h<r.length;h++){var d=r[h],v=o[d];if(dt(v.regex,c.path,c.params))return f(v,c,a)}}return f(null,c)}function s(t,n){var r=t.redirect,o="function"===typeof r?r(b(t,n,null,e)):r;if("string"===typeof o&&(o={path:o}),!o||"object"!==typeof o)return f(null,n);var a=o,s=a.name,u=a.path,l=n.query,p=n.hash,h=n.params;if(l=a.hasOwnProperty("query")?a.query:l,p=a.hasOwnProperty("hash")?a.hash:p,h=a.hasOwnProperty("params")?a.params:h,s){i[s];return c({_normalized:!0,name:s,query:l,hash:p,params:h},void 0,n)}if(u){var d=vt(u,t),v=Q(d,h,'redirect route with path "'+d+'"');return c({_normalized:!0,path:v,query:l,hash:p},void 0,n)}return f(null,n)}function u(t,e,n){var r=Q(n,e.params,'aliased route with path "'+n+'"'),o=c({_normalized:!0,path:r});if(o){var i=o.matched,a=i[i.length-1];return e.params=o.params,f(a,e)}return f(null,e)}function f(t,n,r){return t&&t.redirect?s(t,r||n):t&&t.matchAs?u(t,n,t.matchAs):b(t,n,r,e)}return{match:c,addRoutes:a}}function dt(t,e,n){var r=e.match(t);if(!r)return!1;if(!n)return!0;for(var o=1,i=r.length;o<i;++o){var a=t.keys[o-1],c="string"===typeof r[o]?decodeURIComponent(r[o]):r[o];a&&(n[a.name||"pathMatch"]=c)}return!0}function vt(t,e){return A(t,e.parent?e.parent.path:"/",!0)}var mt=Object.create(null);function yt(){var t=window.location.protocol+"//"+window.location.host,e=window.location.href.replace(t,"");window.history.replaceState({key:Ft()},"",e),window.addEventListener("popstate",function(t){gt(),t.state&&t.state.key&&It(t.state.key)})}function bt(t,e,n,r){if(t.app){var o=t.options.scrollBehavior;o&&t.app.$nextTick(function(){var i=_t(),a=o.call(t,e,n,r?i:null);a&&("function"===typeof a.then?a.then(function(t){At(t,i)}).catch(function(t){0}):At(a,i))})}}function gt(){var t=Ft();t&&(mt[t]={x:window.pageXOffset,y:window.pageYOffset})}function _t(){var t=Ft();if(t)return mt[t]}function xt(t,e){var n=document.documentElement,r=n.getBoundingClientRect(),o=t.getBoundingClientRect();return{x:o.left-r.left-e.x,y:o.top-r.top-e.y}}function wt(t){return kt(t.x)||kt(t.y)}function jt(t){return{x:kt(t.x)?t.x:window.pageXOffset,y:kt(t.y)?t.y:window.pageYOffset}}function St(t){return{x:kt(t.x)?t.x:0,y:kt(t.y)?t.y:0}}function kt(t){return"number"===typeof t}var Ot=/^#\d/;function At(t,e){var n="object"===typeof t;if(n&&"string"===typeof t.selector){var r=Ot.test(t.selector)?document.getElementById(t.selector.slice(1)):document.querySelector(t.selector);if(r){var o=t.offset&&"object"===typeof t.offset?t.offset:{};o=St(o),e=xt(r,o)}else wt(t)&&(e=jt(t))}else n&&wt(t)&&(e=jt(t));e&&window.scrollTo(e.x,e.y)}var $t=st&&function(){var t=window.navigator.userAgent;return(-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)}(),Ct=st&&window.performance&&window.performance.now?window.performance:Date,Et=Tt();function Tt(){return Ct.now().toFixed(3)}function Ft(){return Et}function It(t){Et=t}function Rt(t,e){gt();var n=window.history;try{e?n.replaceState({key:Et},"",t):(Et=Tt(),n.pushState({key:Et},"",t))}catch(r){window.location[e?"replace":"assign"](t)}}function Mt(t){Rt(t,!0)}function Pt(t,e,n){var r=function(o){o>=t.length?n():t[o]?e(t[o],function(){r(o+1)}):r(o+1)};r(0)}function Lt(t){return function(e,n,r){var i=!1,a=0,c=null;Nt(t,function(t,e,n,s){if("function"===typeof t&&void 0===t.cid){i=!0,a++;var u,f=Vt(function(e){Ut(e)&&(e=e.default),t.resolved="function"===typeof e?e:tt.extend(e),n.components[s]=e,a--,a<=0&&r()}),l=Vt(function(t){var e="Failed to resolve async component "+s+": "+t;c||(c=o(t)?t:new Error(e),r(c))});try{u=t(f,l)}catch(h){l(h)}if(u)if("function"===typeof u.then)u.then(f,l);else{var p=u.component;p&&"function"===typeof p.then&&p.then(f,l)}}}),i||r()}}function Nt(t,e){return Dt(t.map(function(t){return Object.keys(t.components).map(function(n){return e(t.components[n],t.instances[n],t,n)})}))}function Dt(t){return Array.prototype.concat.apply([],t)}var Wt="function"===typeof Symbol&&"symbol"===typeof Symbol.toStringTag;function Ut(t){return t.__esModule||Wt&&"Module"===t[Symbol.toStringTag]}function Vt(t){var e=!1;return function(){var n=[],r=arguments.length;while(r--)n[r]=arguments[r];if(!e)return e=!0,t.apply(this,n)}}var Bt=function(t){function e(){t.call(this,"Navigating to current location is not allowed"),this.name=this._name="NavigationDuplicated"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error);Bt._name="NavigationDuplicated";var zt=function(t,e){this.router=t,this.base=Ht(e),this.current=_,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[]};function Ht(t){if(!t)if(st){var e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^https?:\/\/[^\/]+/,"")}else t="/";return"/"!==t.charAt(0)&&(t="/"+t),t.replace(/\/$/,"")}function qt(t,e){var n,r=Math.max(t.length,e.length);for(n=0;n<r;n++)if(t[n]!==e[n])break;return{updated:e.slice(0,n),activated:e.slice(n),deactivated:t.slice(n)}}function Gt(t,e,n,r){var o=Nt(t,function(t,r,o,i){var a=Yt(t,e);if(a)return Array.isArray(a)?a.map(function(t){return n(t,r,o,i)}):n(a,r,o,i)});return Dt(r?o.reverse():o)}function Yt(t,e){return"function"!==typeof t&&(t=tt.extend(t)),t.options[e]}function Jt(t){return Gt(t,"beforeRouteLeave",Xt,!0)}function Kt(t){return Gt(t,"beforeRouteUpdate",Xt)}function Xt(t,e){if(e)return function(){return t.apply(e,arguments)}}function Qt(t,e,n){return Gt(t,"beforeRouteEnter",function(t,r,o,i){return Zt(t,o,i,e,n)})}function Zt(t,e,n,r,o){return function(i,a,c){return t(i,a,function(t){"function"===typeof t&&r.push(function(){te(t,e.instances,n,o)}),c(t)})}}function te(t,e,n,r){e[n]&&!e[n]._isBeingDestroyed?t(e[n]):r()&&setTimeout(function(){te(t,e,n,r)},16)}zt.prototype.listen=function(t){this.cb=t},zt.prototype.onReady=function(t,e){this.ready?t():(this.readyCbs.push(t),e&&this.readyErrorCbs.push(e))},zt.prototype.onError=function(t){this.errorCbs.push(t)},zt.prototype.transitionTo=function(t,e,n){var r=this,o=this.router.match(t,this.current);this.confirmTransition(o,function(){r.updateRoute(o),e&&e(o),r.ensureURL(),r.ready||(r.ready=!0,r.readyCbs.forEach(function(t){t(o)}))},function(t){n&&n(t),t&&!r.ready&&(r.ready=!0,r.readyErrorCbs.forEach(function(e){e(t)}))})},zt.prototype.confirmTransition=function(t,e,n){var a=this,c=this.current,s=function(t){!i(Bt,t)&&o(t)&&(a.errorCbs.length?a.errorCbs.forEach(function(e){e(t)}):(r(!1,"uncaught error during route navigation:"),console.error(t))),n&&n(t)};if(j(t,c)&&t.matched.length===c.matched.length)return this.ensureURL(),s(new Bt(t));var u=qt(this.current.matched,t.matched),f=u.updated,l=u.deactivated,p=u.activated,h=[].concat(Jt(l),this.router.beforeHooks,Kt(f),p.map(function(t){return t.beforeEnter}),Lt(p));this.pending=t;var d=function(e,n){if(a.pending!==t)return s();try{e(t,c,function(t){!1===t||o(t)?(a.ensureURL(!0),s(t)):"string"===typeof t||"object"===typeof t&&("string"===typeof t.path||"string"===typeof t.name)?(s(),"object"===typeof t&&t.replace?a.replace(t):a.push(t)):n(t)})}catch(r){s(r)}};Pt(h,d,function(){var n=[],r=function(){return a.current===t},o=Qt(p,n,r),i=o.concat(a.router.resolveHooks);Pt(i,d,function(){if(a.pending!==t)return s();a.pending=null,e(t),a.router.app&&a.router.app.$nextTick(function(){n.forEach(function(t){t()})})})})},zt.prototype.updateRoute=function(t){var e=this.current;this.current=t,this.cb&&this.cb(t),this.router.afterHooks.forEach(function(n){n&&n(t,e)})};var ee=function(t){function e(e,n){var r=this;t.call(this,e,n);var o=e.options.scrollBehavior,i=$t&&o;i&&yt();var a=ne(this.base);window.addEventListener("popstate",function(t){var n=r.current,o=ne(r.base);r.current===_&&o===a||r.transitionTo(o,function(t){i&&bt(e,t,n,!0)})})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,n){var r=this,o=this,i=o.current;this.transitionTo(t,function(t){Rt(C(r.base+t.fullPath)),bt(r.router,t,i,!1),e&&e(t)},n)},e.prototype.replace=function(t,e,n){var r=this,o=this,i=o.current;this.transitionTo(t,function(t){Mt(C(r.base+t.fullPath)),bt(r.router,t,i,!1),e&&e(t)},n)},e.prototype.ensureURL=function(t){if(ne(this.base)!==this.current.fullPath){var e=C(this.base+this.current.fullPath);t?Rt(e):Mt(e)}},e.prototype.getCurrentLocation=function(){return ne(this.base)},e}(zt);function ne(t){var e=decodeURI(window.location.pathname);return t&&0===e.indexOf(t)&&(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}var re=function(t){function e(e,n,r){t.call(this,e,n),r&&oe(this.base)||ie()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this,e=this.router,n=e.options.scrollBehavior,r=$t&&n;r&&yt(),window.addEventListener($t?"popstate":"hashchange",function(){var e=t.current;ie()&&t.transitionTo(ae(),function(n){r&&bt(t.router,n,e,!0),$t||ue(n.fullPath)})})},e.prototype.push=function(t,e,n){var r=this,o=this,i=o.current;this.transitionTo(t,function(t){se(t.fullPath),bt(r.router,t,i,!1),e&&e(t)},n)},e.prototype.replace=function(t,e,n){var r=this,o=this,i=o.current;this.transitionTo(t,function(t){ue(t.fullPath),bt(r.router,t,i,!1),e&&e(t)},n)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;ae()!==e&&(t?se(e):ue(e))},e.prototype.getCurrentLocation=function(){return ae()},e}(zt);function oe(t){var e=ne(t);if(!/^\/#/.test(e))return window.location.replace(C(t+"/#"+e)),!0}function ie(){var t=ae();return"/"===t.charAt(0)||(ue("/"+t),!1)}function ae(){var t=window.location.href,e=t.indexOf("#");if(e<0)return"";t=t.slice(e+1);var n=t.indexOf("?");if(n<0){var r=t.indexOf("#");t=r>-1?decodeURI(t.slice(0,r))+t.slice(r):decodeURI(t)}else n>-1&&(t=decodeURI(t.slice(0,n))+t.slice(n));return t}function ce(t){var e=window.location.href,n=e.indexOf("#"),r=n>=0?e.slice(0,n):e;return r+"#"+t}function se(t){$t?Rt(ce(t)):window.location.hash=t}function ue(t){$t?Mt(ce(t)):window.location.replace(ce(t))}var fe=function(t){function e(e,n){t.call(this,e,n),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,n){var r=this;this.transitionTo(t,function(t){r.stack=r.stack.slice(0,r.index+1).concat(t),r.index++,e&&e(t)},n)},e.prototype.replace=function(t,e,n){var r=this;this.transitionTo(t,function(t){r.stack=r.stack.slice(0,r.index).concat(t),e&&e(t)},n)},e.prototype.go=function(t){var e=this,n=this.index+t;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,function(){e.index=n,e.updateRoute(r)},function(t){i(Bt,t)&&(e.index=n)})}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(zt),le=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=ht(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!$t&&!1!==t.fallback,this.fallback&&(e="hash"),st||(e="abstract"),this.mode=e,e){case"history":this.history=new ee(this,t.base);break;case"hash":this.history=new re(this,t.base,this.fallback);break;case"abstract":this.history=new fe(this,t.base);break;default:0}},pe={currentRoute:{configurable:!0}};function he(t,e){return t.push(e),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function de(t,e,n){var r="hash"===n?"#"+e:e;return t?C(t+"/"+r):r}le.prototype.match=function(t,e,n){return this.matcher.match(t,e,n)},pe.currentRoute.get=function(){return this.history&&this.history.current},le.prototype.init=function(t){var e=this;if(this.apps.push(t),t.$once("hook:destroyed",function(){var n=e.apps.indexOf(t);n>-1&&e.apps.splice(n,1),e.app===t&&(e.app=e.apps[0]||null)}),!this.app){this.app=t;var n=this.history;if(n instanceof ee)n.transitionTo(n.getCurrentLocation());else if(n instanceof re){var r=function(){n.setupListeners()};n.transitionTo(n.getCurrentLocation(),r,r)}n.listen(function(t){e.apps.forEach(function(e){e._route=t})})}},le.prototype.beforeEach=function(t){return he(this.beforeHooks,t)},le.prototype.beforeResolve=function(t){return he(this.resolveHooks,t)},le.prototype.afterEach=function(t){return he(this.afterHooks,t)},le.prototype.onReady=function(t,e){this.history.onReady(t,e)},le.prototype.onError=function(t){this.history.onError(t)},le.prototype.push=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!==typeof Promise)return new Promise(function(e,n){r.history.push(t,e,n)});this.history.push(t,e,n)},le.prototype.replace=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!==typeof Promise)return new Promise(function(e,n){r.history.replace(t,e,n)});this.history.replace(t,e,n)},le.prototype.go=function(t){this.history.go(t)},le.prototype.back=function(){this.go(-1)},le.prototype.forward=function(){this.go(1)},le.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map(function(t){return Object.keys(t.components).map(function(e){return t.components[e]})})):[]},le.prototype.resolve=function(t,e,n){e=e||this.history.current;var r=Z(t,e,n,this),o=this.match(r,e),i=o.redirectedFrom||o.fullPath,a=this.history.base,c=de(a,i,this.mode);return{location:r,route:o,href:c,normalizedTo:r,resolved:o}},le.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==_&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(le.prototype,pe),le.install=ct,le.version="3.1.2",st&&window.Vue&&window.Vue.use(le),e["a"]=le},"8eeb":function(t,e,n){var r=n("32b3"),o=n("872a");function i(t,e,n,i){var a=!n;n||(n={});var c=-1,s=e.length;while(++c<s){var u=e[c],f=i?i(n[u],t[u],u,n,t):void 0;void 0===f&&(f=t[u]),a?o(n,u,f):r(n,u,f)}return n}t.exports=i},9093:function(t,e,n){var r=n("ce10"),o=n("e11e").concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},"91e9":function(t,e){function n(t,e){return function(n){return t(e(n))}}t.exports=n},"93ed":function(t,e,n){var r=n("4245");function o(t){var e=r(this,t)["delete"](t);return this.size-=e?1:0,e}t.exports=o},9520:function(t,e,n){var r=n("3729"),o=n("1a8c"),i="[object AsyncFunction]",a="[object Function]",c="[object GeneratorFunction]",s="[object Proxy]";function u(t){if(!o(t))return!1;var e=r(t);return e==a||e==c||e==i||e==s}t.exports=u},9638:function(t,e){function n(t,e){return t===e||t!==t&&e!==e}t.exports=n},9934:function(t,e,n){var r=n("6fcd"),o=n("41c3"),i=n("30c9");function a(t){return i(t)?r(t,!0):o(t)}t.exports=a},"99d3":function(t,e,n){(function(t){var r=n("585a"),o=e&&!e.nodeType&&e,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o,c=a&&r.process,s=function(){try{var t=i&&i.require&&i.require("util").types;return t||c&&c.binding&&c.binding("util")}catch(e){}}();t.exports=s}).call(this,n("62e4")(t))},"9aba":function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n={inserted:function(t,e,n){var r=n.context.$refs[e.arg];r.addRef({el:t,vnode:n}),r.$contextmenuId=t.id||r._uid}};function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var o={name:"VContextmenu",provide:function(){return{$$contextmenu:this}},props:{eventType:{type:String,default:"contextmenu"},theme:{type:String,default:"default"},autoPlacement:{type:Boolean,default:!0},disabled:Boolean,containerSelector:{type:String,default:"body"}},data:function(){return{visible:!1,references:[],style:{top:0,left:0}}},computed:{clickOutsideHandler:function(){return this.visible?this.hide:function(){}},isClick:function(){return"click"===this.eventType},contextmenuCls:function(){return["v-contextmenu","v-contextmenu--"+this.theme]}},watch:{visible:function(t){var e=document.querySelector(this.containerSelector);t?(this.$emit("show",this),e.addEventListener("click",this.handleBodyClick)):(this.$emit("hide",this),e.removeEventListener("click",this.handleBodyClick))}},mounted:function(){document.querySelector(this.containerSelector).appendChild(this.$el),window.$$VContextmenu?window.$$VContextmenu[this.$contextmenuId]=this:window.$$VContextmenu=r({},this.$contextmenuId,this)},beforeDestroy:function(){var t=this,e=document.querySelector(this.containerSelector);e.removeChild(this.$el),delete window.$$VContextmenu[this.$contextmenuId],this.references.forEach(function(e){e.el.removeEventListener(t.eventType,t.handleReferenceContextmenu)}),e.removeEventListener("click",this.handleBodyClick)},methods:{addRef:function(t){this.references.push(t),t.el.addEventListener(this.eventType,this.handleReferenceContextmenu)},handleReferenceContextmenu:function(t){var e=this;if(t.preventDefault(),!this.disabled){var n=this.references.find(function(e){return e.el.contains(t.target)});this.$emit("contextmenu",n?n.vnode:null);var r=t.pageX,o=t.pageY;this.show(),this.$nextTick(function(){var t={top:o,left:r};if(e.autoPlacement){var n=e.$refs.contextmenu.clientWidth,i=e.$refs.contextmenu.clientHeight;i+o>=window.innerHeight&&(t.top-=i),n+r>=window.innerWidth&&(t.left-=n)}e.style={top:t.top+"px",left:t.left+"px"}})}},handleBodyClick:function(t){this.$el.contains(t.target)||this.isClick&&this.references.some(function(e){return e.el.contains(t.target)})||(this.visible=!1)},show:function(t){var e=this;Object.keys(window.$$VContextmenu).forEach(function(t){t!==e.$contextmenuId&&window.$$VContextmenu[t].hide()}),t&&(this.style={top:t.top+"px",left:t.left+"px"}),this.visible=!0},hide:function(){this.visible=!1},hideAll:function(){Object.keys(window.$$VContextmenu).forEach(function(t){window.$$VContextmenu[t].hide()})}}},i=o,a=function(){var t=this.$createElement;return(this._self._c||t)("ul",{directives:[{name:"show",rawName:"v-show",value:this.visible,expression:"visible"}],ref:"contextmenu",class:this.contextmenuCls,style:this.style},[this._t("default")],2)},c=[];a._withStripped=!0;var s=void 0!==a?{render:a,staticRenderFns:c}:{},u=void 0,f=void 0,l=void 0,p=!1;function h(t,e,n,r,o,i,a,c){var s=n||{};return s.__file="/Users/Stephen/Repos/snokier/v-contextmenu/src/components/Contextmenu.vue",s.render||(s.render=t.render,s.staticRenderFns=t.staticRenderFns,s._compiled=!0,o&&(s.functional=!0)),s._scopeId=r,s}function d(){var t=document.head||document.getElementsByTagName("head")[0],e=d.styles||(d.styles={}),n="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(r,o){if(!document.querySelector('style[data-vue-ssr-id~="'+r+'"]')){var i=n?o.media||"default":r,a=e[i]||(e[i]={ids:[],parts:[],element:void 0});if(!a.ids.includes(r)){var c=o.source,s=a.ids.length;if(a.ids.push(r),n&&(a.element=a.element||document.querySelector("style[data-group="+i+"]")),!a.element){var u=a.element=document.createElement("style");u.type="text/css",o.media&&u.setAttribute("media",o.media),n&&(u.setAttribute("data-group",i),u.setAttribute("data-next-index","0")),t.appendChild(u)}if(n&&(s=parseInt(a.element.getAttribute("data-next-index")),a.element.setAttribute("data-next-index",s+1)),a.element.styleSheet)a.parts.push(c),a.element.styleSheet.cssText=a.parts.filter(Boolean).join("\n");else{var f=document.createTextNode(c),l=a.element.childNodes;l[s]&&a.element.removeChild(l[s]),l.length?a.element.insertBefore(f,l[s]):a.element.appendChild(f)}}}}}var v=h(s,u,void 0===i?{}:i,f,p,l,void 0!==d?d:function(){},"undefined"!=typeof __vue_create_injector_ssr__?__vue_create_injector_ssr__:function(){}),m={name:"VContextmenuItem",inject:["$$contextmenu"],props:{divider:Boolean,disabled:Boolean,autoHide:{type:Boolean,default:!0}},data:function(){return{hover:!1}},computed:{classname:function(){return{"v-contextmenu-item":!this.divider,"v-contextmenu-item--hover":this.hover,"v-contextmenu-item--disabled":this.disabled}}},methods:{handleMouseenter:function(t){this.disabled||(this.hover=!0,this.$emit("mouseenter",this,t))},handleMouseleave:function(t){this.disabled||(this.hover=!1,this.$emit("mouseleave",this,t))},handleClick:function(t){this.disabled||(this.$emit("click",this,t),this.autoHide&&this.$$contextmenu.hide())}}},y=m,b=function(){var t=this.$createElement,e=this._self._c||t;return this.divider?e("li",{staticClass:"v-contextmenu-divider"}):e("li",{class:this.classname,on:{click:this.handleClick,mouseenter:this.handleMouseenter,mouseleave:this.handleMouseleave}},[this._t("default")],2)},g=[];b._withStripped=!0;var _=void 0!==b?{render:b,staticRenderFns:g}:{},x=void 0,w=void 0,j=void 0,S=!1;function k(t,e,n,r,o,i,a,c){var s=n||{};return s.__file="/Users/Stephen/Repos/snokier/v-contextmenu/src/components/ContextmenuItem.vue",s.render||(s.render=t.render,s.staticRenderFns=t.staticRenderFns,s._compiled=!0,o&&(s.functional=!0)),s._scopeId=r,s}function O(){var t=document.head||document.getElementsByTagName("head")[0],e=O.styles||(O.styles={}),n="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(r,o){if(!document.querySelector('style[data-vue-ssr-id~="'+r+'"]')){var i=n?o.media||"default":r,a=e[i]||(e[i]={ids:[],parts:[],element:void 0});if(!a.ids.includes(r)){var c=o.source,s=a.ids.length;if(a.ids.push(r),n&&(a.element=a.element||document.querySelector("style[data-group="+i+"]")),!a.element){var u=a.element=document.createElement("style");u.type="text/css",o.media&&u.setAttribute("media",o.media),n&&(u.setAttribute("data-group",i),u.setAttribute("data-next-index","0")),t.appendChild(u)}if(n&&(s=parseInt(a.element.getAttribute("data-next-index")),a.element.setAttribute("data-next-index",s+1)),a.element.styleSheet)a.parts.push(c),a.element.styleSheet.cssText=a.parts.filter(Boolean).join("\n");else{var f=document.createTextNode(c),l=a.element.childNodes;l[s]&&a.element.removeChild(l[s]),l.length?a.element.insertBefore(f,l[s]):a.element.appendChild(f)}}}}}var A=k(_,x,void 0===y?{}:y,w,S,j,void 0!==O?O:function(){},"undefined"!=typeof __vue_create_injector_ssr__?__vue_create_injector_ssr__:function(){});function $(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}var C={name:"VContextmenuSubmenu",props:{title:String,disabled:Boolean},data:function(){return{hover:!1,submenuPlacement:[]}},computed:{classname:function(){return{"v-contextmenu-item":!0,"v-contextmenu-submenu":!0,"v-contextmenu-item--hover":this.hover,"v-contextmenu-item--disabled":this.disabled}},submenuCls:function(){return["v-contextmenu"].concat($(this.submenuPlacement))}},methods:{handleMouseenter:function(t){var e=this;if(!this.disabled){var n=t.target.getBoundingClientRect();this.hover=!0,this.$emit("mouseenter",this,t),this.$nextTick(function(){var t=e.$refs.submenu.clientWidth,r=e.$refs.submenu.clientHeight,o=[];n.right+t>=window.innerWidth?o.push("left"):o.push("right"),n.bottom+r>=window.innerHeight?o.push("bottom"):o.push("top"),e.submenuPlacement=o})}},handleMouseleave:function(t){this.disabled||(this.hover=!1,this.$emit("mouseleave",this,t))}}},E=C,T=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("li",{class:t.classname,on:{mouseenter:t.handleMouseenter,mouseleave:t.handleMouseleave}},[n("span",{staticClass:"v-contextmenu-submenu__title"},[t._t("title",[t._v(t._s(t.title))]),t._v(" "),n("span",{staticClass:"v-contextmenu-iconfont v-contextmenu-submenu__icon"})],2),t._v(" "),n("ul",{directives:[{name:"show",rawName:"v-show",value:t.hover,expression:"hover"}],ref:"submenu",class:t.submenuCls},[t._t("default")],2)])},F=[];T._withStripped=!0;var I=void 0!==T?{render:T,staticRenderFns:F}:{},R=void 0,M=void 0,P=void 0,L=!1;function N(t,e,n,r,o,i,a,c){var s=n||{};return s.__file="/Users/Stephen/Repos/snokier/v-contextmenu/src/components/ContextmenuSubmenu.vue",s.render||(s.render=t.render,s.staticRenderFns=t.staticRenderFns,s._compiled=!0,o&&(s.functional=!0)),s._scopeId=r,s}function D(){var t=document.head||document.getElementsByTagName("head")[0],e=D.styles||(D.styles={}),n="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(r,o){if(!document.querySelector('style[data-vue-ssr-id~="'+r+'"]')){var i=n?o.media||"default":r,a=e[i]||(e[i]={ids:[],parts:[],element:void 0});if(!a.ids.includes(r)){var c=o.source,s=a.ids.length;if(a.ids.push(r),n&&(a.element=a.element||document.querySelector("style[data-group="+i+"]")),!a.element){var u=a.element=document.createElement("style");u.type="text/css",o.media&&u.setAttribute("media",o.media),n&&(u.setAttribute("data-group",i),u.setAttribute("data-next-index","0")),t.appendChild(u)}if(n&&(s=parseInt(a.element.getAttribute("data-next-index")),a.element.setAttribute("data-next-index",s+1)),a.element.styleSheet)a.parts.push(c),a.element.styleSheet.cssText=a.parts.filter(Boolean).join("\n");else{var f=document.createTextNode(c),l=a.element.childNodes;l[s]&&a.element.removeChild(l[s]),l.length?a.element.insertBefore(f,l[s]):a.element.appendChild(f)}}}}}var W=N(I,R,void 0===E?{}:E,M,L,P,void 0!==D?D:function(){},"undefined"!=typeof __vue_create_injector_ssr__?__vue_create_injector_ssr__:function(){}),U={name:"VContextmenuGroup",props:{maxWidth:[Number,String]},computed:{menusStyle:function(){return this.maxWidth?{"max-width":"number"==typeof this.maxWidth?this.maxWidth+"px":this.maxWidth,"overflow-x":"auto"}:null}}},V=U,B=function(){var t=this.$createElement,e=this._self._c||t;return e("li",{staticClass:"v-contextmenu-group"},[e("ul",{staticClass:"v-contextmenu-group__menus",style:this.menusStyle},[this._t("default")],2)])},z=[];B._withStripped=!0;var H=void 0!==B?{render:B,staticRenderFns:z}:{},q=void 0,G=void 0,Y=void 0,J=!1;function K(t,e,n,r,o,i,a,c){var s=n||{};return s.__file="/Users/Stephen/Repos/snokier/v-contextmenu/src/components/ContextmenuGroup.vue",s.render||(s.render=t.render,s.staticRenderFns=t.staticRenderFns,s._compiled=!0,o&&(s.functional=!0)),s._scopeId=r,s}function X(){var t=document.head||document.getElementsByTagName("head")[0],e=X.styles||(X.styles={}),n="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(r,o){if(!document.querySelector('style[data-vue-ssr-id~="'+r+'"]')){var i=n?o.media||"default":r,a=e[i]||(e[i]={ids:[],parts:[],element:void 0});if(!a.ids.includes(r)){var c=o.source,s=a.ids.length;if(a.ids.push(r),n&&(a.element=a.element||document.querySelector("style[data-group="+i+"]")),!a.element){var u=a.element=document.createElement("style");u.type="text/css",o.media&&u.setAttribute("media",o.media),n&&(u.setAttribute("data-group",i),u.setAttribute("data-next-index","0")),t.appendChild(u)}if(n&&(s=parseInt(a.element.getAttribute("data-next-index")),a.element.setAttribute("data-next-index",s+1)),a.element.styleSheet)a.parts.push(c),a.element.styleSheet.cssText=a.parts.filter(Boolean).join("\n");else{var f=document.createTextNode(c),l=a.element.childNodes;l[s]&&a.element.removeChild(l[s]),l.length?a.element.insertBefore(f,l[s]):a.element.appendChild(f)}}}}}var Q=K(H,q,void 0===V?{}:V,G,J,Y,void 0!==X?X:function(){},"undefined"!=typeof __vue_create_injector_ssr__?__vue_create_injector_ssr__:function(){}),Z=function(t){t.directive("contextmenu",n),t.component(v.name,v),t.component(A.name,A),t.component(W.name,W),t.component(Q.name,Q)};"undefined"!=typeof window&&window.Vue&&Z(window.Vue);var tt={install:Z};e.directive=n,e.Contextmenu=v,e.ContextmenuItem=A,e.ContextmenuSubmenu=W,e.ContextmenuGroup=Q,e.default=tt},"9b43":function(t,e,n){var r=n("d8e8");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},"9c6c":function(t,e,n){var r=n("2b4c")("unscopables"),o=Array.prototype;void 0==o[r]&&n("32e9")(o,r,{}),t.exports=function(t){o[r][t]=!0}},"9c80":function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(e){return{e:!0,v:e}}}},"9def":function(t,e,n){var r=n("4588"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},"9e1e":function(t,e,n){t.exports=!n("79e5")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},"9e69":function(t,e,n){var r=n("2b3e"),o=r.Symbol;t.exports=o},a029:function(t,e,n){var r=n("087d"),o=n("2dcb"),i=n("32f4"),a=n("d327"),c=Object.getOwnPropertySymbols,s=c?function(t){var e=[];while(t)r(e,i(t)),t=o(t);return e}:a;t.exports=s},a25f:function(t,e,n){var r=n("7726"),o=r.navigator;t.exports=o&&o.userAgent||""},a2db:function(t,e,n){var r=n("9e69"),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;function a(t){return i?Object(i.call(t)):{}}t.exports=a},a481:function(t,e,n){"use strict";var r=n("cb7c"),o=n("4bf8"),i=n("9def"),a=n("4588"),c=n("0390"),s=n("5f1b"),u=Math.max,f=Math.min,l=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,h=/\$([$&`']|\d\d?)/g,d=function(t){return void 0===t?t:String(t)};n("214f")("replace",2,function(t,e,n,v){return[function(r,o){var i=t(this),a=void 0==r?void 0:r[e];return void 0!==a?a.call(r,i,o):n.call(String(i),r,o)},function(t,e){var o=v(n,t,this,e);if(o.done)return o.value;var l=r(t),p=String(this),h="function"===typeof e;h||(e=String(e));var y=l.global;if(y){var b=l.unicode;l.lastIndex=0}var g=[];while(1){var _=s(l,p);if(null===_)break;if(g.push(_),!y)break;var x=String(_[0]);""===x&&(l.lastIndex=c(p,i(l.lastIndex),b))}for(var w="",j=0,S=0;S<g.length;S++){_=g[S];for(var k=String(_[0]),O=u(f(a(_.index),p.length),0),A=[],$=1;$<_.length;$++)A.push(d(_[$]));var C=_.groups;if(h){var E=[k].concat(A,O,p);void 0!==C&&E.push(C);var T=String(e.apply(void 0,E))}else T=m(k,p,O,A,C,e);O>=j&&(w+=p.slice(j,O)+T,j=O+k.length)}return w+p.slice(j)}];function m(t,e,r,i,a,c){var s=r+t.length,u=i.length,f=h;return void 0!==a&&(a=o(a),f=p),n.call(c,f,function(n,o){var c;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(s);case"<":c=a[o.slice(1,-1)];break;default:var f=+o;if(0===f)return n;if(f>u){var p=l(f/10);return 0===p?n:p<=u?void 0===i[p-1]?o.charAt(1):i[p-1]+o.charAt(1):n}c=i[f-1]}return void 0===c?"":c})}})},a524:function(t,e,n){var r=n("4245");function o(t){return r(this,t).has(t)}t.exports=o},a5b8:function(t,e,n){"use strict";var r=n("d8e8");function o(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=r(e),this.reject=r(n)}t.exports.f=function(t){return new o(t)}},a925:function(t,e,n){"use strict"; /*! * vue-i18n v8.13.0 * (c) 2019 kazuya kawaguchi * Released under the MIT License. */var r=["style","currency","currencyDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","localeMatcher","formatMatcher"];function o(t,e){"undefined"!==typeof console&&(console.warn("[vue-i18n] "+t),e&&console.warn(e.stack))}function i(t,e){"undefined"!==typeof console&&(console.error("[vue-i18n] "+t),e&&console.error(e.stack))}function a(t){return null!==t&&"object"===typeof t}var c=Object.prototype.toString,s="[object Object]";function u(t){return c.call(t)===s}function f(t){return null===t||void 0===t}function l(){var t=[],e=arguments.length;while(e--)t[e]=arguments[e];var n=null,r=null;return 1===t.length?a(t[0])||Array.isArray(t[0])?r=t[0]:"string"===typeof t[0]&&(n=t[0]):2===t.length&&("string"===typeof t[0]&&(n=t[0]),(a(t[1])||Array.isArray(t[1]))&&(r=t[1])),{locale:n,params:r}}function p(t){return JSON.parse(JSON.stringify(t))}function h(t,e){if(t.length){var n=t.indexOf(e);if(n>-1)return t.splice(n,1)}}var d=Object.prototype.hasOwnProperty;function v(t,e){return d.call(t,e)}function m(t){for(var e=arguments,n=Object(t),r=1;r<arguments.length;r++){var o=e[r];if(void 0!==o&&null!==o){var i=void 0;for(i in o)v(o,i)&&(a(o[i])?n[i]=m(n[i],o[i]):n[i]=o[i])}}return n}function y(t,e){if(t===e)return!0;var n=a(t),r=a(e);if(!n||!r)return!n&&!r&&String(t)===String(e);try{var o=Array.isArray(t),i=Array.isArray(e);if(o&&i)return t.length===e.length&&t.every(function(t,n){return y(t,e[n])});if(o||i)return!1;var c=Object.keys(t),s=Object.keys(e);return c.length===s.length&&c.every(function(n){return y(t[n],e[n])})}catch(u){return!1}}function b(t){t.prototype.hasOwnProperty("$i18n")||Object.defineProperty(t.prototype,"$i18n",{get:function(){return this._i18n}}),t.prototype.$t=function(t){var e=[],n=arguments.length-1;while(n-- >0)e[n]=arguments[n+1];var r=this.$i18n;return r._t.apply(r,[t,r.locale,r._getMessages(),this].concat(e))},t.prototype.$tc=function(t,e){var n=[],r=arguments.length-2;while(r-- >0)n[r]=arguments[r+2];var o=this.$i18n;return o._tc.apply(o,[t,o.locale,o._getMessages(),this,e].concat(n))},t.prototype.$te=function(t,e){var n=this.$i18n;return n._te(t,n.locale,n._getMessages(),e)},t.prototype.$d=function(t){var e,n=[],r=arguments.length-1;while(r-- >0)n[r]=arguments[r+1];return(e=this.$i18n).d.apply(e,[t].concat(n))},t.prototype.$n=function(t){var e,n=[],r=arguments.length-1;while(r-- >0)n[r]=arguments[r+1];return(e=this.$i18n).n.apply(e,[t].concat(n))}}var g,_={beforeCreate:function(){var t=this.$options;if(t.i18n=t.i18n||(t.__i18n?{}:null),t.i18n)if(t.i18n instanceof lt){if(t.__i18n)try{var e={};t.__i18n.forEach(function(t){e=m(e,JSON.parse(t))}),Object.keys(e).forEach(function(n){t.i18n.mergeLocaleMessage(n,e[n])})}catch(i){0}this._i18n=t.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(u(t.i18n)){if(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof lt&&(t.i18n.root=this.$root,t.i18n.formatter=this.$root.$i18n.formatter,t.i18n.fallbackLocale=this.$root.$i18n.fallbackLocale,t.i18n.silentTranslationWarn=this.$root.$i18n.silentTranslationWarn,t.i18n.silentFallbackWarn=this.$root.$i18n.silentFallbackWarn,t.i18n.pluralizationRules=this.$root.$i18n.pluralizationRules,t.i18n.preserveDirectiveContent=this.$root.$i18n.preserveDirectiveContent),t.__i18n)try{var n={};t.__i18n.forEach(function(t){n=m(n,JSON.parse(t))}),t.i18n.messages=n}catch(i){0}var r=t.i18n,o=r.sharedMessages;o&&u(o)&&(t.i18n.messages=m(t.i18n.messages,o)),this._i18n=new lt(t.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===t.i18n.sync||t.i18n.sync)&&(this._localeWatcher=this.$i18n.watchLocale())}else 0;else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof lt?this._i18n=this.$root.$i18n:t.parent&&t.parent.$i18n&&t.parent.$i18n instanceof lt&&(this._i18n=t.parent.$i18n)},beforeMount:function(){var t=this.$options;t.i18n=t.i18n||(t.__i18n?{}:null),t.i18n?t.i18n instanceof lt?(this._i18n.subscribeDataChanging(this),this._subscribing=!0):u(t.i18n)&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof lt?(this._i18n.subscribeDataChanging(this),this._subscribing=!0):t.parent&&t.parent.$i18n&&t.parent.$i18n instanceof lt&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0)},beforeDestroy:function(){if(this._i18n){var t=this;this.$nextTick(function(){t._subscribing&&(t._i18n.unsubscribeDataChanging(t),delete t._subscribing),t._i18nWatcher&&(t._i18nWatcher(),t._i18n.destroyVM(),delete t._i18nWatcher),t._localeWatcher&&(t._localeWatcher(),delete t._localeWatcher),t._i18n=null})}}},x={name:"i18n",functional:!0,props:{tag:{type:String,default:"span"},path:{type:String,required:!0},locale:{type:String},places:{type:[Array,Object]}},render:function(t,e){var n=e.props,r=e.data,o=e.children,i=e.parent,a=i.$i18n;if(o=(o||[]).filter(function(t){return t.tag||(t.text=t.text.trim())}),!a)return o;var c=n.path,s=n.locale,u={},f=n.places||{},l=(Array.isArray(f)?f.length:Object.keys(f).length,o.every(function(t){if(t.data&&t.data.attrs){var e=t.data.attrs.place;return"undefined"!==typeof e&&""!==e}}));return Array.isArray(f)?f.forEach(function(t,e){u[e]=t}):Object.keys(f).forEach(function(t){u[t]=f[t]}),o.forEach(function(t,e){var n=l?""+t.data.attrs.place:""+e;u[n]=t}),t(n.tag,r,a.i(c,s,u))}},w={name:"i18n-n",functional:!0,props:{tag:{type:String,default:"span"},value:{type:Number,required:!0},format:{type:[String,Object]},locale:{type:String}},render:function(t,e){var n=e.props,o=e.parent,i=e.data,c=o.$i18n;if(!c)return null;var s=null,u=null;"string"===typeof n.format?s=n.format:a(n.format)&&(n.format.key&&(s=n.format.key),u=Object.keys(n.format).reduce(function(t,e){var o;return r.includes(e)?Object.assign({},t,(o={},o[e]=n.format[e],o)):t},null));var f=n.locale||c.locale,l=c._ntp(n.value,f,s,u),p=l.map(function(t,e){var n,r=i.scopedSlots&&i.scopedSlots[t.type];return r?r((n={},n[t.type]=t.value,n.index=e,n.parts=l,n)):t.value});return t(n.tag,{attrs:i.attrs,class:i["class"],staticClass:i.staticClass},p)}};function j(t,e,n){O(t,n)&&$(t,e,n)}function S(t,e,n,r){if(O(t,n)){var o=n.context.$i18n;A(t,n)&&y(e.value,e.oldValue)&&y(t._localeMessage,o.getLocaleMessage(o.locale))||$(t,e,n)}}function k(t,e,n,r){var i=n.context;if(i){var a=n.context.$i18n||{};e.modifiers.preserve||a.preserveDirectiveContent||(t.textContent=""),t._vt=void 0,delete t["_vt"],t._locale=void 0,delete t["_locale"],t._localeMessage=void 0,delete t["_localeMessage"]}else o("Vue instance does not exists in VNode context")}function O(t,e){var n=e.context;return n?!!n.$i18n||(o("VueI18n instance does not exists in Vue instance"),!1):(o("Vue instance does not exists in VNode context"),!1)}function A(t,e){var n=e.context;return t._locale===n.$i18n.locale}function $(t,e,n){var r,i,a=e.value,c=C(a),s=c.path,u=c.locale,f=c.args,l=c.choice;if(s||u||f)if(s){var p=n.context;t._vt=t.textContent=l?(r=p.$i18n).tc.apply(r,[s,l].concat(E(u,f))):(i=p.$i18n).t.apply(i,[s].concat(E(u,f))),t._locale=p.$i18n.locale,t._localeMessage=p.$i18n.getLocaleMessage(p.$i18n.locale)}else o("`path` is required in v-t directive");else o("value type not supported")}function C(t){var e,n,r,o;return"string"===typeof t?e=t:u(t)&&(e=t.path,n=t.locale,r=t.args,o=t.choice),{path:e,locale:n,args:r,choice:o}}function E(t,e){var n=[];return t&&n.push(t),e&&(Array.isArray(e)||u(e))&&n.push(e),n}function T(t){T.installed=!0,g=t;g.version&&Number(g.version.split(".")[0]);b(g),g.mixin(_),g.directive("t",{bind:j,update:S,unbind:k}),g.component(x.name,x),g.component(w.name,w);var e=g.config.optionMergeStrategies;e.i18n=function(t,e){return void 0===e?t:e}}var F=function(){this._caches=Object.create(null)};F.prototype.interpolate=function(t,e){if(!e)return[t];var n=this._caches[t];return n||(n=M(t),this._caches[t]=n),P(n,e)};var I=/^(?:\d)+/,R=/^(?:\w)+/;function M(t){var e=[],n=0,r="";while(n<t.length){var o=t[n++];if("{"===o){r&&e.push({type:"text",value:r}),r="";var i="";o=t[n++];while(void 0!==o&&"}"!==o)i+=o,o=t[n++];var a="}"===o,c=I.test(i)?"list":a&&R.test(i)?"named":"unknown";e.push({value:i,type:c})}else"%"===o?"{"!==t[n]&&(r+=o):r+=o}return r&&e.push({type:"text",value:r}),e}function P(t,e){var n=[],r=0,o=Array.isArray(e)?"list":a(e)?"named":"unknown";if("unknown"===o)return n;while(r<t.length){var i=t[r];switch(i.type){case"text":n.push(i.value);break;case"list":n.push(e[parseInt(i.value,10)]);break;case"named":"named"===o&&n.push(e[i.value]);break;case"unknown":0;break}r++}return n}var L=0,N=1,D=2,W=3,U=0,V=1,B=2,z=3,H=4,q=5,G=6,Y=7,J=8,K=[];K[U]={ws:[U],ident:[z,L],"[":[H],eof:[Y]},K[V]={ws:[V],".":[B],"[":[H],eof:[Y]},K[B]={ws:[B],ident:[z,L],0:[z,L],number:[z,L]},K[z]={ident:[z,L],0:[z,L],number:[z,L],ws:[V,N],".":[B,N],"[":[H,N],eof:[Y,N]},K[H]={"'":[q,L],'"':[G,L],"[":[H,D],"]":[V,W],eof:J,else:[H,L]},K[q]={"'":[H,L],eof:J,else:[q,L]},K[G]={'"':[H,L],eof:J,else:[G,L]};var X=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function Q(t){return X.test(t)}function Z(t){var e=t.charCodeAt(0),n=t.charCodeAt(t.length-1);return e!==n||34!==e&&39!==e?t:t.slice(1,-1)}function tt(t){if(void 0===t||null===t)return"eof";var e=t.charCodeAt(0);switch(e){case 91:case 93:case 46:case 34:case 39:return t;case 95:case 36:case 45:return"ident";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"ws"}return"ident"}function et(t){var e=t.trim();return("0"!==t.charAt(0)||!isNaN(t))&&(Q(e)?Z(e):"*"+e)}function nt(t){var e,n,r,o,i,a,c,s=[],u=-1,f=U,l=0,p=[];function h(){var e=t[u+1];if(f===q&&"'"===e||f===G&&'"'===e)return u++,r="\\"+e,p[L](),!0}p[N]=function(){void 0!==n&&(s.push(n),n=void 0)},p[L]=function(){void 0===n?n=r:n+=r},p[D]=function(){p[L](),l++},p[W]=function(){if(l>0)l--,f=H,p[L]();else{if(l=0,n=et(n),!1===n)return!1;p[N]()}};while(null!==f)if(u++,e=t[u],"\\"!==e||!h()){if(o=tt(e),c=K[f],i=c[o]||c["else"]||J,i===J)return;if(f=i[0],a=p[i[1]],a&&(r=i[2],r=void 0===r?e:r,!1===a()))return;if(f===Y)return s}}var rt=function(){this._cache=Object.create(null)};rt.prototype.parsePath=function(t){var e=this._cache[t];return e||(e=nt(t),e&&(this._cache[t]=e)),e||[]},rt.prototype.getPathValue=function(t,e){if(!a(t))return null;var n=this.parsePath(e);if(0===n.length)return null;var r=n.length,o=t,i=0;while(i<r){var c=o[n[i]];if(void 0===c)return null;o=c,i++}return o};var ot,it=/<\/?[\w\s="\/.':;#-\/]+>/,at=/(?:@(?:\.[a-z]+)?:(?:[\w\-_|.]+|\([\w\-_|.]+\)))/g,ct=/^@(?:\.([a-z]+))?:/,st=/[()]/g,ut={upper:function(t){return t.toLocaleUpperCase()},lower:function(t){return t.toLocaleLowerCase()}},ft=new F,lt=function(t){var e=this;void 0===t&&(t={}),!g&&"undefined"!==typeof window&&window.Vue&&T(window.Vue);var n=t.locale||"en-US",r=t.fallbackLocale||"en-US",o=t.messages||{},i=t.dateTimeFormats||{},a=t.numberFormats||{};this._vm=null,this._formatter=t.formatter||ft,this._missing=t.missing||null,this._root=t.root||null,this._sync=void 0===t.sync||!!t.sync,this._fallbackRoot=void 0===t.fallbackRoot||!!t.fallbackRoot,this._silentTranslationWarn=void 0!==t.silentTranslationWarn&&t.silentTranslationWarn,this._silentFallbackWarn=void 0!==t.silentFallbackWarn&&!!t.silentFallbackWarn,this._dateTimeFormatters={},this._numberFormatters={},this._path=new rt,this._dataListeners=[],this._preserveDirectiveContent=void 0!==t.preserveDirectiveContent&&!!t.preserveDirectiveContent,this.pluralizationRules=t.pluralizationRules||{},this._warnHtmlInMessage=t.warnHtmlInMessage||"off",this._exist=function(t,n){return!(!t||!n)&&(!f(e._path.getPathValue(t,n))||!!t[n])},"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||Object.keys(o).forEach(function(t){e._checkLocaleMessage(t,e._warnHtmlInMessage,o[t])}),this._initVM({locale:n,fallbackLocale:r,messages:o,dateTimeFormats:i,numberFormats:a})},pt={vm:{configurable:!0},messages:{configurable:!0},dateTimeFormats:{configurable:!0},numberFormats:{configurable:!0},availableLocales:{configurable:!0},locale:{configurable:!0},fallbackLocale:{configurable:!0},missing:{configurable:!0},formatter:{configurable:!0},silentTranslationWarn:{configurable:!0},silentFallbackWarn:{configurable:!0},preserveDirectiveContent:{configurable:!0},warnHtmlInMessage:{configurable:!0}};lt.prototype._checkLocaleMessage=function(t,e,n){var r=[],a=function(t,e,n,r){if(u(n))Object.keys(n).forEach(function(o){var i=n[o];u(i)?(r.push(o),r.push("."),a(t,e,i,r),r.pop(),r.pop()):(r.push(o),a(t,e,i,r),r.pop())});else if(Array.isArray(n))n.forEach(function(n,o){u(n)?(r.push("["+o+"]"),r.push("."),a(t,e,n,r),r.pop(),r.pop()):(r.push("["+o+"]"),a(t,e,n,r),r.pop())});else if("string"===typeof n){var c=it.test(n);if(c){var s="Detected HTML in message '"+n+"' of keypath '"+r.join("")+"' at '"+e+"'. Consider component interpolation with '<i18n>' to avoid XSS. See https://bit.ly/2ZqJzkp";"warn"===t?o(s):"error"===t&&i(s)}}};a(e,t,n,r)},lt.prototype._initVM=function(t){var e=g.config.silent;g.config.silent=!0,this._vm=new g({data:t}),g.config.silent=e},lt.prototype.destroyVM=function(){this._vm.$destroy()},lt.prototype.subscribeDataChanging=function(t){this._dataListeners.push(t)},lt.prototype.unsubscribeDataChanging=function(t){h(this._dataListeners,t)},lt.prototype.watchI18nData=function(){var t=this;return this._vm.$watch("$data",function(){var e=t._dataListeners.length;while(e--)g.nextTick(function(){t._dataListeners[e]&&t._dataListeners[e].$forceUpdate()})},{deep:!0})},lt.prototype.watchLocale=function(){if(!this._sync||!this._root)return null;var t=this._vm;return this._root.$i18n.vm.$watch("locale",function(e){t.$set(t,"locale",e),t.$forceUpdate()},{immediate:!0})},pt.vm.get=function(){return this._vm},pt.messages.get=function(){return p(this._getMessages())},pt.dateTimeFormats.get=function(){return p(this._getDateTimeFormats())},pt.numberFormats.get=function(){return p(this._getNumberFormats())},pt.availableLocales.get=function(){return Object.keys(this.messages).sort()},pt.locale.get=function(){return this._vm.locale},pt.locale.set=function(t){this._vm.$set(this._vm,"locale",t)},pt.fallbackLocale.get=function(){return this._vm.fallbackLocale},pt.fallbackLocale.set=function(t){this._vm.$set(this._vm,"fallbackLocale",t)},pt.missing.get=function(){return this._missing},pt.missing.set=function(t){this._missing=t},pt.formatter.get=function(){return this._formatter},pt.formatter.set=function(t){this._formatter=t},pt.silentTranslationWarn.get=function(){return this._silentTranslationWarn},pt.silentTranslationWarn.set=function(t){this._silentTranslationWarn=t},pt.silentFallbackWarn.get=function(){return this._silentFallbackWarn},pt.silentFallbackWarn.set=function(t){this._silentFallbackWarn=t},pt.preserveDirectiveContent.get=function(){return this._preserveDirectiveContent},pt.preserveDirectiveContent.set=function(t){this._preserveDirectiveContent=t},pt.warnHtmlInMessage.get=function(){return this._warnHtmlInMessage},pt.warnHtmlInMessage.set=function(t){var e=this,n=this._warnHtmlInMessage;if(this._warnHtmlInMessage=t,n!==t&&("warn"===t||"error"===t)){var r=this._getMessages();Object.keys(r).forEach(function(t){e._checkLocaleMessage(t,e._warnHtmlInMessage,r[t])})}},lt.prototype._getMessages=function(){return this._vm.messages},lt.prototype._getDateTimeFormats=function(){return this._vm.dateTimeFormats},lt.prototype._getNumberFormats=function(){return this._vm.numberFormats},lt.prototype._warnDefault=function(t,e,n,r,o){if(!f(n))return n;if(this._missing){var i=this._missing.apply(null,[t,e,r,o]);if("string"===typeof i)return i}else 0;return e},lt.prototype._isFallbackRoot=function(t){return!t&&!f(this._root)&&this._fallbackRoot},lt.prototype._isSilentFallbackWarn=function(t){return this._silentFallbackWarn instanceof RegExp?this._silentFallbackWarn.test(t):this._silentFallbackWarn},lt.prototype._isSilentFallback=function(t,e){return this._isSilentFallbackWarn(e)&&(this._isFallbackRoot()||t!==this.fallbackLocale)},lt.prototype._isSilentTranslationWarn=function(t){return this._silentTranslationWarn instanceof RegExp?this._silentTranslationWarn.test(t):this._silentTranslationWarn},lt.prototype._interpolate=function(t,e,n,r,o,i,a){if(!e)return null;var c,s=this._path.getPathValue(e,n);if(Array.isArray(s)||u(s))return s;if(f(s)){if(!u(e))return null;if(c=e[n],"string"!==typeof c)return null}else{if("string"!==typeof s)return null;c=s}return(c.indexOf("@:")>=0||c.indexOf("@.")>=0)&&(c=this._link(t,e,c,r,"raw",i,a)),this._render(c,o,i,n)},lt.prototype._link=function(t,e,n,r,o,i,a){var c=n,s=c.match(at);for(var u in s)if(s.hasOwnProperty(u)){var f=s[u],l=f.match(ct),p=l[0],h=l[1],d=f.replace(p,"").replace(st,"");if(a.includes(d))return c;a.push(d);var v=this._interpolate(t,e,d,r,"raw"===o?"string":o,"raw"===o?void 0:i,a);if(this._isFallbackRoot(v)){if(!this._root)throw Error("unexpected error");var m=this._root.$i18n;v=m._translate(m._getMessages(),m.locale,m.fallbackLocale,d,r,o,i)}v=this._warnDefault(t,d,v,r,Array.isArray(i)?i:[i]),ut.hasOwnProperty(h)&&(v=ut[h](v)),a.pop(),c=v?c.replace(f,v):c}return c},lt.prototype._render=function(t,e,n,r){var o=this._formatter.interpolate(t,n,r);return o||(o=ft.interpolate(t,n,r)),"string"===e?o.join(""):o},lt.prototype._translate=function(t,e,n,r,o,i,a){var c=this._interpolate(e,t[e],r,o,i,a,[r]);return f(c)?(c=this._interpolate(n,t[n],r,o,i,a,[r]),f(c)?null:c):c},lt.prototype._t=function(t,e,n,r){var o,i=[],a=arguments.length-4;while(a-- >0)i[a]=arguments[a+4];if(!t)return"";var c=l.apply(void 0,i),s=c.locale||e,u=this._translate(n,s,this.fallbackLocale,t,r,"string",c.params);if(this._isFallbackRoot(u)){if(!this._root)throw Error("unexpected error");return(o=this._root).$t.apply(o,[t].concat(i))}return this._warnDefault(s,t,u,r,i)},lt.prototype.t=function(t){var e,n=[],r=arguments.length-1;while(r-- >0)n[r]=arguments[r+1];return(e=this)._t.apply(e,[t,this.locale,this._getMessages(),null].concat(n))},lt.prototype._i=function(t,e,n,r,o){var i=this._translate(n,e,this.fallbackLocale,t,r,"raw",o);if(this._isFallbackRoot(i)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.i(t,e,o)}return this._warnDefault(e,t,i,r,[o])},lt.prototype.i=function(t,e,n){return t?("string"!==typeof e&&(e=this.locale),this._i(t,e,this._getMessages(),null,n)):""},lt.prototype._tc=function(t,e,n,r,o){var i,a=[],c=arguments.length-5;while(c-- >0)a[c]=arguments[c+5];if(!t)return"";void 0===o&&(o=1);var s={count:o,n:o},u=l.apply(void 0,a);return u.params=Object.assign(s,u.params),a=null===u.locale?[u.params]:[u.locale,u.params],this.fetchChoice((i=this)._t.apply(i,[t,e,n,r].concat(a)),o)},lt.prototype.fetchChoice=function(t,e){if(!t&&"string"!==typeof t)return null;var n=t.split("|");return e=this.getChoiceIndex(e,n.length),n[e]?n[e].trim():t},lt.prototype.getChoiceIndex=function(t,e){var n=function(t,e){return t=Math.abs(t),2===e?t?t>1?1:0:1:t?Math.min(t,2):0};return this.locale in this.pluralizationRules?this.pluralizationRules[this.locale].apply(this,[t,e]):n(t,e)},lt.prototype.tc=function(t,e){var n,r=[],o=arguments.length-2;while(o-- >0)r[o]=arguments[o+2];return(n=this)._tc.apply(n,[t,this.locale,this._getMessages(),null,e].concat(r))},lt.prototype._te=function(t,e,n){var r=[],o=arguments.length-3;while(o-- >0)r[o]=arguments[o+3];var i=l.apply(void 0,r).locale||e;return this._exist(n[i],t)},lt.prototype.te=function(t,e){return this._te(t,this.locale,this._getMessages(),e)},lt.prototype.getLocaleMessage=function(t){return p(this._vm.messages[t]||{})},lt.prototype.setLocaleMessage=function(t,e){("warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||(this._checkLocaleMessage(t,this._warnHtmlInMessage,e),"error"!==this._warnHtmlInMessage))&&this._vm.$set(this._vm.messages,t,e)},lt.prototype.mergeLocaleMessage=function(t,e){("warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||(this._checkLocaleMessage(t,this._warnHtmlInMessage,e),"error"!==this._warnHtmlInMessage))&&this._vm.$set(this._vm.messages,t,m(this._vm.messages[t]||{},e))},lt.prototype.getDateTimeFormat=function(t){return p(this._vm.dateTimeFormats[t]||{})},lt.prototype.setDateTimeFormat=function(t,e){this._vm.$set(this._vm.dateTimeFormats,t,e)},lt.prototype.mergeDateTimeFormat=function(t,e){this._vm.$set(this._vm.dateTimeFormats,t,m(this._vm.dateTimeFormats[t]||{},e))},lt.prototype._localizeDateTime=function(t,e,n,r,o){var i=e,a=r[i];if((f(a)||f(a[o]))&&(i=n,a=r[i]),f(a)||f(a[o]))return null;var c=a[o],s=i+"__"+o,u=this._dateTimeFormatters[s];return u||(u=this._dateTimeFormatters[s]=new Intl.DateTimeFormat(i,c)),u.format(t)},lt.prototype._d=function(t,e,n){if(!n)return new Intl.DateTimeFormat(e).format(t);var r=this._localizeDateTime(t,e,this.fallbackLocale,this._getDateTimeFormats(),n);if(this._isFallbackRoot(r)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.d(t,n,e)}return r||""},lt.prototype.d=function(t){var e=[],n=arguments.length-1;while(n-- >0)e[n]=arguments[n+1];var r=this.locale,o=null;return 1===e.length?"string"===typeof e[0]?o=e[0]:a(e[0])&&(e[0].locale&&(r=e[0].locale),e[0].key&&(o=e[0].key)):2===e.length&&("string"===typeof e[0]&&(o=e[0]),"string"===typeof e[1]&&(r=e[1])),this._d(t,r,o)},lt.prototype.getNumberFormat=function(t){return p(this._vm.numberFormats[t]||{})},lt.prototype.setNumberFormat=function(t,e){this._vm.$set(this._vm.numberFormats,t,e)},lt.prototype.mergeNumberFormat=function(t,e){this._vm.$set(this._vm.numberFormats,t,m(this._vm.numberFormats[t]||{},e))},lt.prototype._getNumberFormatter=function(t,e,n,r,o,i){var a=e,c=r[a];if((f(c)||f(c[o]))&&(a=n,c=r[a]),f(c)||f(c[o]))return null;var s,u=c[o];if(i)s=new Intl.NumberFormat(a,Object.assign({},u,i));else{var l=a+"__"+o;s=this._numberFormatters[l],s||(s=this._numberFormatters[l]=new Intl.NumberFormat(a,u))}return s},lt.prototype._n=function(t,e,n,r){if(!lt.availabilities.numberFormat)return"";if(!n){var o=r?new Intl.NumberFormat(e,r):new Intl.NumberFormat(e);return o.format(t)}var i=this._getNumberFormatter(t,e,this.fallbackLocale,this._getNumberFormats(),n,r),a=i&&i.format(t);if(this._isFallbackRoot(a)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.n(t,Object.assign({},{key:n,locale:e},r))}return a||""},lt.prototype.n=function(t){var e=[],n=arguments.length-1;while(n-- >0)e[n]=arguments[n+1];var o=this.locale,i=null,c=null;return 1===e.length?"string"===typeof e[0]?i=e[0]:a(e[0])&&(e[0].locale&&(o=e[0].locale),e[0].key&&(i=e[0].key),c=Object.keys(e[0]).reduce(function(t,n){var o;return r.includes(n)?Object.assign({},t,(o={},o[n]=e[0][n],o)):t},null)):2===e.length&&("string"===typeof e[0]&&(i=e[0]),"string"===typeof e[1]&&(o=e[1])),this._n(t,o,i,c)},lt.prototype._ntp=function(t,e,n,r){if(!lt.availabilities.numberFormat)return[];if(!n){var o=r?new Intl.NumberFormat(e,r):new Intl.NumberFormat(e);return o.formatToParts(t)}var i=this._getNumberFormatter(t,e,this.fallbackLocale,this._getNumberFormats(),n,r),a=i&&i.formatToParts(t);if(this._isFallbackRoot(a)){if(!this._root)throw Error("unexpected error");return this._root.$i18n._ntp(t,e,n,r)}return a||[]},Object.defineProperties(lt.prototype,pt),Object.defineProperty(lt,"availabilities",{get:function(){if(!ot){var t="undefined"!==typeof Intl;ot={dateTimeFormat:t&&"undefined"!==typeof Intl.DateTimeFormat,numberFormat:t&&"undefined"!==typeof Intl.NumberFormat}}return ot}}),lt.install=T,lt.version="8.13.0",e["a"]=lt},a994:function(t,e,n){var r=n("7d1f"),o=n("32f4"),i=n("ec69");function a(t){return r(t,i,o)}t.exports=a},aae3:function(t,e,n){var r=n("d3f4"),o=n("2d95"),i=n("2b4c")("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},ac6a:function(t,e,n){for(var r=n("cadf"),o=n("0d58"),i=n("2aba"),a=n("7726"),c=n("32e9"),s=n("84f2"),u=n("2b4c"),f=u("iterator"),l=u("toStringTag"),p=s.Array,h={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},d=o(h),v=0;v<d.length;v++){var m,y=d[v],b=h[y],g=a[y],_=g&&g.prototype;if(_&&(_[f]||c(_,f,p),_[l]||c(_,l,y),s[y]=p,b))for(m in r)_[m]||i(_,m,r[m],!0)}},b047:function(t,e){function n(t){return function(e){return t(e)}}t.exports=n},b0c5:function(t,e,n){"use strict";var r=n("520a");n("5ca1")({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},b218:function(t,e){var n=9007199254740991;function r(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=n}t.exports=r},b4c0:function(t,e,n){var r=n("cb5a");function o(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}t.exports=o},b5a7:function(t,e,n){var r=n("0b07"),o=n("2b3e"),i=r(o,"DataView");t.exports=i},ba92:function(t,e,n){"use strict";var r=n("4bf8"),o=n("77f1"),i=n("9def");t.exports=[].copyWithin||function(t,e){var n=r(this),a=i(n.length),c=o(t,a),s=o(e,a),u=arguments.length>2?arguments[2]:void 0,f=Math.min((void 0===u?a:o(u,a))-s,a-c),l=1;s<c&&c<s+f&&(l=-1,s+=f-1,c+=f-1);while(f-- >0)s in n?n[c]=n[s]:delete n[c],c+=l,s+=l;return n}},bbc0:function(t,e,n){var r=n("6044"),o="__lodash_hash_undefined__",i=Object.prototype,a=i.hasOwnProperty;function c(t){var e=this.__data__;if(r){var n=e[t];return n===o?void 0:n}return a.call(e,t)?e[t]:void 0}t.exports=c},bcaa:function(t,e,n){var r=n("cb7c"),o=n("d3f4"),i=n("a5b8");t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t),a=n.resolve;return a(e),n.promise}},be13:function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},c098:function(t,e){var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function o(t,e){var o=typeof t;return e=null==e?n:e,!!e&&("number"==o||"symbol"!=o&&r.test(t))&&t>-1&&t%1==0&&t<e}t.exports=o},c2b6:function(t,e,n){var r=n("f8af"),o=n("5d89"),i=n("6f6c"),a=n("a2db"),c=n("c8fe"),s="[object Boolean]",u="[object Date]",f="[object Map]",l="[object Number]",p="[object RegExp]",h="[object Set]",d="[object String]",v="[object Symbol]",m="[object ArrayBuffer]",y="[object DataView]",b="[object Float32Array]",g="[object Float64Array]",_="[object Int8Array]",x="[object Int16Array]",w="[object Int32Array]",j="[object Uint8Array]",S="[object Uint8ClampedArray]",k="[object Uint16Array]",O="[object Uint32Array]";function A(t,e,n){var A=t.constructor;switch(e){case m:return r(t);case s:case u:return new A(+t);case y:return o(t,n);case b:case g:case _:case x:case w:case j:case S:case k:case O:return c(t,n);case f:return new A;case l:case d:return new A(t);case p:return i(t);case h:return new A;case v:return a(t)}}t.exports=A},c366:function(t,e,n){var r=n("6821"),o=n("9def"),i=n("77f1");t.exports=function(t){return function(e,n,a){var c,s=r(e),u=o(s.length),f=i(a,u);if(t&&n!=n){while(u>f)if(c=s[f++],c!=c)return!0}else for(;u>f;f++)if((t||f in s)&&s[f]===n)return t||f||0;return!t&&-1}}},c3fc:function(t,e,n){var r=n("42a2"),o=n("1310"),i="[object Set]";function a(t){return o(t)&&r(t)==i}t.exports=a},c69a:function(t,e,n){t.exports=!n("9e1e")&&!n("79e5")(function(){return 7!=Object.defineProperty(n("230e")("div"),"a",{get:function(){return 7}}).a})},c869:function(t,e,n){var r=n("0b07"),o=n("2b3e"),i=r(o,"Set");t.exports=i},c87c:function(t,e){var n=Object.prototype,r=n.hasOwnProperty;function o(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&r.call(t,"index")&&(n.index=t.index,n.input=t.input),n}t.exports=o},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},c8fe:function(t,e,n){var r=n("f8af");function o(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}t.exports=o},ca5a:function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},cadf:function(t,e,n){"use strict";var r=n("9c6c"),o=n("d53b"),i=n("84f2"),a=n("6821");t.exports=n("01f9")(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},cb5a:function(t,e,n){var r=n("9638");function o(t,e){var n=t.length;while(n--)if(r(t[n][0],e))return n;return-1}t.exports=o},cb7c:function(t,e,n){var r=n("d3f4");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},cc45:function(t,e,n){var r=n("1a2d"),o=n("b047"),i=n("99d3"),a=i&&i.isMap,c=a?o(a):r;t.exports=c},cd1c:function(t,e,n){var r=n("e853");t.exports=function(t,e){return new(r(t))(e)}},ce10:function(t,e,n){var r=n("69a8"),o=n("6821"),i=n("c366")(!1),a=n("613b")("IE_PROTO");t.exports=function(t,e){var n,c=o(t),s=0,u=[];for(n in c)n!=a&&r(c,n)&&u.push(n);while(e.length>s)r(c,n=e[s++])&&(~i(u,n)||u.push(n));return u}},d02c:function(t,e,n){var r=n("5e2e"),o=n("79bc"),i=n("7b83"),a=200;function c(t,e){var n=this.__data__;if(n instanceof r){var c=n.__data__;if(!o||c.length<a-1)return c.push([t,e]),this.size=++n.size,this;n=this.__data__=new i(c)}return n.set(t,e),this.size=n.size,this}t.exports=c},d2c8:function(t,e,n){var r=n("aae3"),o=n("be13");t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(t))}},d327:function(t,e){function n(){return[]}t.exports=n},d370:function(t,e,n){var r=n("253c"),o=n("1310"),i=Object.prototype,a=i.hasOwnProperty,c=i.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(t){return o(t)&&a.call(t,"callee")&&!c.call(t,"callee")};t.exports=s},d3f4:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},d53b:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},d7ee:function(t,e,n){var r=n("c3fc"),o=n("b047"),i=n("99d3"),a=i&&i.isSet,c=a?o(a):r;t.exports=c},d8e8:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},da03:function(t,e,n){var r=n("2b3e"),o=r["__core-js_shared__"];t.exports=o},dc57:function(t,e){var n=Function.prototype,r=n.toString;function o(t){if(null!=t){try{return r.call(t)}catch(e){}try{return t+""}catch(e){}}return""}t.exports=o},dcbc:function(t,e,n){var r=n("2aba");t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},dd88:function(t,e,n){"use strict";var r=n("8bbf"),o=n.n(r),i={position:"bottom",time:2e3,closeIcon:"close",close:!0,successIcon:"check_circle",infoIcon:"info",warningIcon:"priority_high",errorIcon:"warning"},a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},s=function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)},u="undefined"===typeof window,f=20141223,l=o.a.extend({name:"toast-message",data:function(){return{messages:[]}},methods:{createAction:function(t,e,n,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return t("mu-button",{props:{icon:o,flat:!o,color:r.color?"#fff":"secondary"},style:o?{width:"36px",height:"36px"}:{},slot:"action",on:{click:function(){return n&&n(r.id)}}},[e])},message:function(t){var e="toast_id_"+f++;return this.messages.push(c({},t,{id:e,open:!0})),e},close:function(t){var e=this;if(t){var n=this.messages.filter(function(e){return e.id===t})[0];n&&(n.open=!1,setTimeout(function(){if(e.messages){var t=e.messages.indexOf(n);-1!==t&&e.messages.splice(t,1)}},500))}}},render:function(t){var e=this;return t("div",{staticClass:"mu-toast-plugin",style:{display:"none"}},this.messages.map(function(n){var r=n.close?e.createAction(t,t("mu-icon",{props:{value:i.closeIcon},style:{"margin-right":0}}),function(t){return e.close(t)},n,!0):void 0;return t("mu-snackbar",{props:{color:n.color,textColor:n.textColor,open:n.open,position:n.position},key:n.id},[n.icon?t("mu-icon",{props:{left:!0,value:n.icon}}):""].concat(s(n.actions&&n.actions.length>0?n.actions.map(function(r){var o=r.action,i=r.click;return e.createAction(t,o,i,n)}):[]),[n.message,r]))}))}}),p=void 0;function h(t){if(!u)return p||(p=new l({el:document.createElement("div")}),document.body.appendChild(p.$el)),p.message(t)}function d(t){p&&p.close(t)}var v={config:function(t){if(!t||Array.isArray(t)||"object"!==("undefined"===typeof t?"undefined":a(t)))return i;for(var e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);return i},message:function(t){if(t){t="string"===typeof t?{message:t}:t;var e=c({time:i.time,position:i.position,close:i.close},t),n=h(e);return e.time>0&&setTimeout(function(){return d(n)},e.time),n}}};["success","error","info","warning"].forEach(function(t){v[t]=function(e){if(e)return e="string"===typeof e?{message:e,color:t,icon:i[t+"Icon"]}:c({},e,{color:t,icon:i[t+"Icon"]}),v.message(e)}}),v.close=function(t){return d(t)},v.install=function(t,e){v.config(e),t.prototype.$toast=v},e["a"]=v},e11e:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},e24b:function(t,e,n){var r=n("49f4"),o=n("1efc"),i=n("bbc0"),a=n("7a48"),c=n("2524");function s(t){var e=-1,n=null==t?0:t.length;this.clear();while(++e<n){var r=t[e];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype["delete"]=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=c,t.exports=s},e538:function(t,e,n){(function(t){var r=n("2b3e"),o=e&&!e.nodeType&&e,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o,c=a?r.Buffer:void 0,s=c?c.allocUnsafe:void 0;function u(t,e){if(e)return t.slice();var n=t.length,r=s?s(n):new t.constructor(n);return t.copy(r),r}t.exports=u}).call(this,n("62e4")(t))},e853:function(t,e,n){var r=n("d3f4"),o=n("1169"),i=n("2b4c")("species");t.exports=function(t){var e;return o(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!o(e.prototype)||(e=void 0),r(e)&&(e=e[i],null===e&&(e=void 0))),void 0===e?Array:e}},eac5:function(t,e){var n=Object.prototype;function r(t){var e=t&&t.constructor,r="function"==typeof e&&e.prototype||n;return t===r}t.exports=r},ebd6:function(t,e,n){var r=n("cb7c"),o=n("d8e8"),i=n("2b4c")("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||void 0==(n=r(a)[i])?e:o(n)}},ec30:function(t,e,n){"use strict";if(n("9e1e")){var r=n("2d00"),o=n("7726"),i=n("79e5"),a=n("5ca1"),c=n("0f88"),s=n("ed0b"),u=n("9b43"),f=n("f605"),l=n("4630"),p=n("32e9"),h=n("dcbc"),d=n("4588"),v=n("9def"),m=n("09fa"),y=n("77f1"),b=n("6a99"),g=n("69a8"),_=n("23c6"),x=n("d3f4"),w=n("4bf8"),j=n("33a4"),S=n("2aeb"),k=n("38fd"),O=n("9093").f,A=n("27ee"),$=n("ca5a"),C=n("2b4c"),E=n("0a49"),T=n("c366"),F=n("ebd6"),I=n("cadf"),R=n("84f2"),M=n("5cc5"),P=n("7a56"),L=n("36bd"),N=n("ba92"),D=n("86cc"),W=n("11e9"),U=D.f,V=W.f,B=o.RangeError,z=o.TypeError,H=o.Uint8Array,q="ArrayBuffer",G="Shared"+q,Y="BYTES_PER_ELEMENT",J="prototype",K=Array[J],X=s.ArrayBuffer,Q=s.DataView,Z=E(0),tt=E(2),et=E(3),nt=E(4),rt=E(5),ot=E(6),it=T(!0),at=T(!1),ct=I.values,st=I.keys,ut=I.entries,ft=K.lastIndexOf,lt=K.reduce,pt=K.reduceRight,ht=K.join,dt=K.sort,vt=K.slice,mt=K.toString,yt=K.toLocaleString,bt=C("iterator"),gt=C("toStringTag"),_t=$("typed_constructor"),xt=$("def_constructor"),wt=c.CONSTR,jt=c.TYPED,St=c.VIEW,kt="Wrong length!",Ot=E(1,function(t,e){return Tt(F(t,t[xt]),e)}),At=i(function(){return 1===new H(new Uint16Array([1]).buffer)[0]}),$t=!!H&&!!H[J].set&&i(function(){new H(1).set({})}),Ct=function(t,e){var n=d(t);if(n<0||n%e)throw B("Wrong offset!");return n},Et=function(t){if(x(t)&&jt in t)return t;throw z(t+" is not a typed array!")},Tt=function(t,e){if(!(x(t)&&_t in t))throw z("It is not a typed array constructor!");return new t(e)},Ft=function(t,e){return It(F(t,t[xt]),e)},It=function(t,e){var n=0,r=e.length,o=Tt(t,r);while(r>n)o[n]=e[n++];return o},Rt=function(t,e,n){U(t,e,{get:function(){return this._d[n]}})},Mt=function(t){var e,n,r,o,i,a,c=w(t),s=arguments.length,f=s>1?arguments[1]:void 0,l=void 0!==f,p=A(c);if(void 0!=p&&!j(p)){for(a=p.call(c),r=[],e=0;!(i=a.next()).done;e++)r.push(i.value);c=r}for(l&&s>2&&(f=u(f,arguments[2],2)),e=0,n=v(c.length),o=Tt(this,n);n>e;e++)o[e]=l?f(c[e],e):c[e];return o},Pt=function(){var t=0,e=arguments.length,n=Tt(this,e);while(e>t)n[t]=arguments[t++];return n},Lt=!!H&&i(function(){yt.call(new H(1))}),Nt=function(){return yt.apply(Lt?vt.call(Et(this)):Et(this),arguments)},Dt={copyWithin:function(t,e){return N.call(Et(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return nt(Et(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return L.apply(Et(this),arguments)},filter:function(t){return Ft(this,tt(Et(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return rt(Et(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return ot(Et(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){Z(Et(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return at(Et(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return it(Et(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ht.apply(Et(this),arguments)},lastIndexOf:function(t){return ft.apply(Et(this),arguments)},map:function(t){return Ot(Et(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return lt.apply(Et(this),arguments)},reduceRight:function(t){return pt.apply(Et(this),arguments)},reverse:function(){var t,e=this,n=Et(e).length,r=Math.floor(n/2),o=0;while(o<r)t=e[o],e[o++]=e[--n],e[n]=t;return e},some:function(t){return et(Et(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return dt.call(Et(this),t)},subarray:function(t,e){var n=Et(this),r=n.length,o=y(t,r);return new(F(n,n[xt]))(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,v((void 0===e?r:y(e,r))-o))}},Wt=function(t,e){return Ft(this,vt.call(Et(this),t,e))},Ut=function(t){Et(this);var e=Ct(arguments[1],1),n=this.length,r=w(t),o=v(r.length),i=0;if(o+e>n)throw B(kt);while(i<o)this[e+i]=r[i++]},Vt={entries:function(){return ut.call(Et(this))},keys:function(){return st.call(Et(this))},values:function(){return ct.call(Et(this))}},Bt=function(t,e){return x(t)&&t[jt]&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},zt=function(t,e){return Bt(t,e=b(e,!0))?l(2,t[e]):V(t,e)},Ht=function(t,e,n){return!(Bt(t,e=b(e,!0))&&x(n)&&g(n,"value"))||g(n,"get")||g(n,"set")||n.configurable||g(n,"writable")&&!n.writable||g(n,"enumerable")&&!n.enumerable?U(t,e,n):(t[e]=n.value,t)};wt||(W.f=zt,D.f=Ht),a(a.S+a.F*!wt,"Object",{getOwnPropertyDescriptor:zt,defineProperty:Ht}),i(function(){mt.call({})})&&(mt=yt=function(){return ht.call(this)});var qt=h({},Dt);h(qt,Vt),p(qt,bt,Vt.values),h(qt,{slice:Wt,set:Ut,constructor:function(){},toString:mt,toLocaleString:Nt}),Rt(qt,"buffer","b"),Rt(qt,"byteOffset","o"),Rt(qt,"byteLength","l"),Rt(qt,"length","e"),U(qt,gt,{get:function(){return this[jt]}}),t.exports=function(t,e,n,s){s=!!s;var u=t+(s?"Clamped":"")+"Array",l="get"+t,h="set"+t,d=o[u],y=d||{},b=d&&k(d),g=!d||!c.ABV,w={},j=d&&d[J],A=function(t,n){var r=t._d;return r.v[l](n*e+r.o,At)},$=function(t,n,r){var o=t._d;s&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),o.v[h](n*e+o.o,r,At)},C=function(t,e){U(t,e,{get:function(){return A(this,e)},set:function(t){return $(this,e,t)},enumerable:!0})};g?(d=n(function(t,n,r,o){f(t,d,u,"_d");var i,a,c,s,l=0,h=0;if(x(n)){if(!(n instanceof X||(s=_(n))==q||s==G))return jt in n?It(d,n):Mt.call(d,n);i=n,h=Ct(r,e);var y=n.byteLength;if(void 0===o){if(y%e)throw B(kt);if(a=y-h,a<0)throw B(kt)}else if(a=v(o)*e,a+h>y)throw B(kt);c=a/e}else c=m(n),a=c*e,i=new X(a);p(t,"_d",{b:i,o:h,l:a,e:c,v:new Q(i)});while(l<c)C(t,l++)}),j=d[J]=S(qt),p(j,"constructor",d)):i(function(){d(1)})&&i(function(){new d(-1)})&&M(function(t){new d,new d(null),new d(1.5),new d(t)},!0)||(d=n(function(t,n,r,o){var i;return f(t,d,u),x(n)?n instanceof X||(i=_(n))==q||i==G?void 0!==o?new y(n,Ct(r,e),o):void 0!==r?new y(n,Ct(r,e)):new y(n):jt in n?It(d,n):Mt.call(d,n):new y(m(n))}),Z(b!==Function.prototype?O(y).concat(O(b)):O(y),function(t){t in d||p(d,t,y[t])}),d[J]=j,r||(j.constructor=d));var E=j[bt],T=!!E&&("values"==E.name||void 0==E.name),F=Vt.values;p(d,_t,!0),p(j,jt,u),p(j,St,!0),p(j,xt,d),(s?new d(1)[gt]==u:gt in j)||U(j,gt,{get:function(){return u}}),w[u]=d,a(a.G+a.W+a.F*(d!=y),w),a(a.S,u,{BYTES_PER_ELEMENT:e}),a(a.S+a.F*i(function(){y.of.call(d,1)}),u,{from:Mt,of:Pt}),Y in j||p(j,Y,e),a(a.P,u,Dt),P(u),a(a.P+a.F*$t,u,{set:Ut}),a(a.P+a.F*!T,u,Vt),r||j.toString==mt||(j.toString=mt),a(a.P+a.F*i(function(){new d(1).slice()}),u,{slice:Wt}),a(a.P+a.F*(i(function(){return[1,2].toLocaleString()!=new d([1,2]).toLocaleString()})||!i(function(){j.toLocaleString.call([1,2])})),u,{toLocaleString:Nt}),R[u]=T?E:F,r||T||p(j,bt,F)}}else t.exports=function(){}},ec69:function(t,e,n){var r=n("6fcd"),o=n("03dd"),i=n("30c9");function a(t){return i(t)?r(t):o(t)}t.exports=a},ec8c:function(t,e){function n(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}t.exports=n},ed0b:function(t,e,n){"use strict";var r=n("7726"),o=n("9e1e"),i=n("2d00"),a=n("0f88"),c=n("32e9"),s=n("dcbc"),u=n("79e5"),f=n("f605"),l=n("4588"),p=n("9def"),h=n("09fa"),d=n("9093").f,v=n("86cc").f,m=n("36bd"),y=n("7f20"),b="ArrayBuffer",g="DataView",_="prototype",x="Wrong length!",w="Wrong index!",j=r[b],S=r[g],k=r.Math,O=r.RangeError,A=r.Infinity,$=j,C=k.abs,E=k.pow,T=k.floor,F=k.log,I=k.LN2,R="buffer",M="byteLength",P="byteOffset",L=o?"_b":R,N=o?"_l":M,D=o?"_o":P;function W(t,e,n){var r,o,i,a=new Array(n),c=8*n-e-1,s=(1<<c)-1,u=s>>1,f=23===e?E(2,-24)-E(2,-77):0,l=0,p=t<0||0===t&&1/t<0?1:0;for(t=C(t),t!=t||t===A?(o=t!=t?1:0,r=s):(r=T(F(t)/I),t*(i=E(2,-r))<1&&(r--,i*=2),t+=r+u>=1?f/i:f*E(2,1-u),t*i>=2&&(r++,i/=2),r+u>=s?(o=0,r=s):r+u>=1?(o=(t*i-1)*E(2,e),r+=u):(o=t*E(2,u-1)*E(2,e),r=0));e>=8;a[l++]=255&o,o/=256,e-=8);for(r=r<<e|o,c+=e;c>0;a[l++]=255&r,r/=256,c-=8);return a[--l]|=128*p,a}function U(t,e,n){var r,o=8*n-e-1,i=(1<<o)-1,a=i>>1,c=o-7,s=n-1,u=t[s--],f=127&u;for(u>>=7;c>0;f=256*f+t[s],s--,c-=8);for(r=f&(1<<-c)-1,f>>=-c,c+=e;c>0;r=256*r+t[s],s--,c-=8);if(0===f)f=1-a;else{if(f===i)return r?NaN:u?-A:A;r+=E(2,e),f-=a}return(u?-1:1)*r*E(2,f-e)}function V(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function B(t){return[255&t]}function z(t){return[255&t,t>>8&255]}function H(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function q(t){return W(t,52,8)}function G(t){return W(t,23,4)}function Y(t,e,n){v(t[_],e,{get:function(){return this[n]}})}function J(t,e,n,r){var o=+n,i=h(o);if(i+e>t[N])throw O(w);var a=t[L]._b,c=i+t[D],s=a.slice(c,c+e);return r?s:s.reverse()}function K(t,e,n,r,o,i){var a=+n,c=h(a);if(c+e>t[N])throw O(w);for(var s=t[L]._b,u=c+t[D],f=r(+o),l=0;l<e;l++)s[u+l]=f[i?l:e-l-1]}if(a.ABV){if(!u(function(){j(1)})||!u(function(){new j(-1)})||u(function(){return new j,new j(1.5),new j(NaN),j.name!=b})){j=function(t){return f(this,j),new $(h(t))};for(var X,Q=j[_]=$[_],Z=d($),tt=0;Z.length>tt;)(X=Z[tt++])in j||c(j,X,$[X]);i||(Q.constructor=j)}var et=new S(new j(2)),nt=S[_].setInt8;et.setInt8(0,2147483648),et.setInt8(1,2147483649),!et.getInt8(0)&&et.getInt8(1)||s(S[_],{setInt8:function(t,e){nt.call(this,t,e<<24>>24)},setUint8:function(t,e){nt.call(this,t,e<<24>>24)}},!0)}else j=function(t){f(this,j,b);var e=h(t);this._b=m.call(new Array(e),0),this[N]=e},S=function(t,e,n){f(this,S,g),f(t,j,g);var r=t[N],o=l(e);if(o<0||o>r)throw O("Wrong offset!");if(n=void 0===n?r-o:p(n),o+n>r)throw O(x);this[L]=t,this[D]=o,this[N]=n},o&&(Y(j,M,"_l"),Y(S,R,"_b"),Y(S,M,"_l"),Y(S,P,"_o")),s(S[_],{getInt8:function(t){return J(this,1,t)[0]<<24>>24},getUint8:function(t){return J(this,1,t)[0]},getInt16:function(t){var e=J(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=J(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return V(J(this,4,t,arguments[1]))},getUint32:function(t){return V(J(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return U(J(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return U(J(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){K(this,1,t,B,e)},setUint8:function(t,e){K(this,1,t,B,e)},setInt16:function(t,e){K(this,2,t,z,e,arguments[2])},setUint16:function(t,e){K(this,2,t,z,e,arguments[2])},setInt32:function(t,e){K(this,4,t,H,e,arguments[2])},setUint32:function(t,e){K(this,4,t,H,e,arguments[2])},setFloat32:function(t,e){K(this,4,t,G,e,arguments[2])},setFloat64:function(t,e){K(this,8,t,q,e,arguments[2])}});y(j,b),y(S,g),c(S[_],a.VIEW,!0),e[b]=j,e[g]=S},efb6:function(t,e,n){var r=n("5e2e");function o(){this.__data__=new r,this.size=0}t.exports=o},f559:function(t,e,n){"use strict";var r=n("5ca1"),o=n("9def"),i=n("d2c8"),a="startsWith",c=""[a];r(r.P+r.F*n("5147")(a),"String",{startsWith:function(t){var e=i(this,t,a),n=o(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return c?c.call(e,r,n):e.slice(n,n+r.length)===r}})},f5df:function(t,e,n){},f605:function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},f751:function(t,e,n){var r=n("5ca1");r(r.S+r.F,"Object",{assign:n("7333")})},f8af:function(t,e,n){var r=n("2474");function o(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}t.exports=o},fa21:function(t,e,n){var r=n("7530"),o=n("2dcb"),i=n("eac5");function a(t){return"function"!=typeof t.constructor||i(t)?{}:r(o(t))}t.exports=a},fa5b:function(t,e,n){t.exports=n("5537")("native-function-to-string",Function.toString)},fab2:function(t,e,n){var r=n("7726").document;t.exports=r&&r.documentElement},fba5:function(t,e,n){var r=n("cb5a");function o(t){return r(this.__data__,t)>-1}t.exports=o}}]); //# sourceMappingURL=chunk-vendors.ec36a913.js.map
1zlab-emp-ide
/1zlab_emp_ide-0.0.3-py3-none-any.whl/emp_ide/static/js/chunk-vendors.ec36a913.js
chunk-vendors.ec36a913.js
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0e64c6"],{"97c5":function(n,a,c){"use strict";c.r(a);var s={data:function(){return{isParent:!0,signals:null}}};a["default"]=s}}]); //# sourceMappingURL=chunk-2d0e64c6.d56af125.js.map
1zlab-emp-ide
/1zlab_emp_ide-0.0.3-py3-none-any.whl/emp_ide/static/js/chunk-2d0e64c6.d56af125.js
chunk-2d0e64c6.d56af125.js
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0d3720"],{"5d94":function(e,r,n){"use strict";n.r(r);var o=function(){var e=this,r=e.$createElement,n=e._self._c||r;return n("div",[e._v("ERROR: "+e._s(e.errorCode))])},t=[],u={name:"error",computed:{errorCode:function(){return this.$route.meta.errorCode||"404"}}},c=u,d=n("2877"),s=Object(d["a"])(c,o,t,!1,null,null,null);r["default"]=s.exports}}]); //# sourceMappingURL=chunk-2d0d3720.f764eeca.js.map
1zlab-emp-ide
/1zlab_emp_ide-0.0.3-py3-none-any.whl/emp_ide/static/js/chunk-2d0d3720.f764eeca.js
chunk-2d0d3720.f764eeca.js
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0c0e14"],{4453:function(e,r,n){"use strict";n.r(r);var t={methods:{SIGNAL_CLEAR:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"terminal",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"slotClearTerm";return{event:"clearTerm",sender:e,receiver:r,slot:n,kwargs:{}}},SIGNAL_RESIZE_TERM:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"terminal",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"slotResizeTerm";return{event:"onResize",sender:e,receiver:r,slot:n,kwargs:{}}},SIGNAL_RESIZE_EDITOR:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"editor",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"slotResizeEditor";return{event:"onResize",sender:e,receiver:r,slot:n,kwargs:{}}}}};r["default"]=t}}]); //# sourceMappingURL=chunk-2d0c0e14.e4f25a38.js.map
1zlab-emp-ide
/1zlab_emp_ide-0.0.3-py3-none-any.whl/emp_ide/static/js/chunk-2d0c0e14.e4f25a38.js
chunk-2d0c0e14.e4f25a38.js
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d230ab1"],{eceb:function(t,o,c){"use strict";c.r(o);var n={methods:{slotSwitch:function(t){this.switcher=t.index},slotLock:function(){this.tasklock=!0},slotUnlock:function(){this.tasklock=!1}}};o["default"]=n}}]); //# sourceMappingURL=chunk-2d230ab1.d8b63db6.js.map
1zlab-emp-ide
/1zlab_emp_ide-0.0.3-py3-none-any.whl/emp_ide/static/js/chunk-2d230ab1.d8b63db6.js
chunk-2d230ab1.d8b63db6.js
from django.apps import AppConfig class AppConfig(AppConfig): name = 'homepage'
1zlab-homepage
/1zlab_homepage-0.0.3-py3-none-any.whl/homepage/apps.py
apps.py
from django.urls import path from django.views.generic import TemplateView from homepage import views app_name = 'homepage' urlpatterns = [ path('', views.index, name='index'), path('robots.txt', TemplateView.as_view(template_name='homepage/robots.txt', content_type='text/plain')), path('sitemap.xml', TemplateView.as_view(template_name='homepage/sitemap.xml', content_type='text/xml')), ]
1zlab-homepage
/1zlab_homepage-0.0.3-py3-none-any.whl/homepage/urls.py
urls.py
from django.contrib import admin from .models import * # Register your models here. class ThumbnailAdmin(admin.ModelAdmin): list_display = ["title", "rank", "img_url"] list_editable = ["rank"] search_fields = ["title", "rank"] admin.site.register(HomePageThumbnail, ThumbnailAdmin)
1zlab-homepage
/1zlab_homepage-0.0.3-py3-none-any.whl/homepage/admin.py
admin.py
# 1Z实验室 主页
1zlab-homepage
/1zlab_homepage-0.0.3-py3-none-any.whl/homepage/README.md
README.md
from django.shortcuts import render from homepage.models import HomePageThumbnail def index(request): homepagethumbnail_list = HomePageThumbnail.objects.all().order_by('-rank') context = {'homepagethumbnail_list': homepagethumbnail_list} return render(request, 'homepage/index.html', context)
1zlab-homepage
/1zlab_homepage-0.0.3-py3-none-any.whl/homepage/views.py
views.py
__version__ = '0.0.3'
1zlab-homepage
/1zlab_homepage-0.0.3-py3-none-any.whl/homepage/__init__.py
__init__.py
from django.db import models class HomePageThumbnail(models.Model): """主页项目展示表""" img_url = models.URLField(verbose_name="图片URL") title = models.CharField(max_length=31, verbose_name="标题") subtitle = models.CharField(max_length=63, verbose_name="副标题") introduction = models.TextField(max_length=511, verbose_name="介绍") content_url = models.URLField(verbose_name="内容链接") # 显示优先级, 越大越高 rank = models.PositiveIntegerField(default=1, verbose_name="排序") def __str__(self): return self.title class Meta: db_table = "homepage_thumbnail" verbose_name = "主页磁贴" verbose_name_plural = "主页磁贴"
1zlab-homepage
/1zlab_homepage-0.0.3-py3-none-any.whl/homepage/models.py
models.py
# Generated by Django 3.0.2 on 2020-10-06 11:39 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='HomePageThumbnail', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('img_url', models.URLField(verbose_name='图片URL')), ('title', models.CharField(max_length=31, verbose_name='标题')), ('subtitle', models.CharField(max_length=63, verbose_name='副标题')), ('introduction', models.TextField(max_length=511, verbose_name='介绍')), ('content_url', models.URLField(verbose_name='内容链接')), ('rank', models.PositiveIntegerField(default=1, verbose_name='排序')), ], options={ 'verbose_name': '主页磁贴', 'verbose_name_plural': '主页磁贴', 'db_table': 'homepage_thumbnail', }, ), ]
1zlab-homepage
/1zlab_homepage-0.0.3-py3-none-any.whl/homepage/migrations/0001_initial.py
0001_initial.py
var social = new Vue({ el:"#social", // data:{ data () { return { openSimple: false }; }, methods: { openSimpleDialog () { this.openSimple = true; $('#qrcode-dialog').css("display","table") }, closeSimpleDialog () { this.openSimple = false; } } // // } });
1zlab-homepage
/1zlab_homepage-0.0.3-py3-none-any.whl/homepage/static/homepage/js/vue-index.js
vue-index.js
quick calculator
2-2-4-1-3-quick-maths
/2+2=4-1=3-quick-maths-0.0.0.tar.gz/2+2=4-1=3-quick-maths-0.0.0/README.md
README.md
from setuptools import setup, find_packages classifiers = [ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Education', 'Operating System :: Microsoft :: Windows :: Windows 10', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 3' ] setup( name='2+2=4-1=3-quick-maths', version='', description='A very basic calculator', long_description=open('README.md').read() + '\n\n' + open('CHANGELOG.txt').read(), url='', author='Jannis Dietrich', author_email='jannis@jannis.jannis', license='MIT', classifiers=classifiers, keywords='calculator', packages=find_packages(), install_requires=[''] )
2-2-4-1-3-quick-maths
/2+2=4-1=3-quick-maths-0.0.0.tar.gz/2+2=4-1=3-quick-maths-0.0.0/setup.py
setup.py
def add(num1, num2): return num1+num2
2-2-4-1-3-quick-maths
/2+2=4-1=3-quick-maths-0.0.0.tar.gz/2+2=4-1=3-quick-maths-0.0.0/2+2=4-1=3-quick-maths/__init__.py
__init__.py
With this module you can create kind of 3D games easily.
2.5D
/2.5D-0.0.2.tar.gz/2.5D-0.0.2/README.md
README.md
import setuptools with open("README.md","r") as fh: long_description = fh.read() setuptools.setup( name="2.5D", version="0.0.2", author="K6nE", author_email="maknix@k6nesoftware.com", description="With this module you can create kind of 3D games easily. Documentation will be created soon.", long_description=long_description, long_description_content_type="text/markdown", url="http://k6nesoftware.com", packages=setuptools.find_packages(), classifiers=[], python_requires=">=3.7", )
2.5D
/2.5D-0.0.2.tar.gz/2.5D-0.0.2/setup.py
setup.py
from base64 import b64decode import pygame import keyboard import os import math clock = pygame.time.Clock() pygame.font.init() playerX = 0 playerY = 0 playerZ = 0 camRot = [0,0,0] camVel = [0,0,0] camSens = 6 mouseRightDown = False mouseLeftDown = False mouseSpeed = 0 lockMouse = False showMouse = True playerSpeed = 0 playerVel = [0,0,0] def pgEvents(): global playerZ,playerVel global camSens,camVel,camRot global mouseSpeed,lockMouse global mouseRightDown,mouseLeftDown for event in pygame.event.get(): if event.type == pygame.QUIT: return "QUIT" if event.type == pygame.MOUSEMOTION: dx,dy = event.rel mouseSpeed = (dx ** 2 + dy ** 2) ** (1/2) if event.type == pygame.KEYDOWN: if event.key == pygame.K_w: playerVel[2] = playerSpeed return "K_w" if event.key == pygame.K_s: playerVel[2] = -playerSpeed return "K_s" if event.key == pygame.K_a: playerVel[0] = playerSpeed return "K_a" if event.key == pygame.K_d: playerVel[0] = -playerSpeed return "K_d" #if event.key == pygame.K_LEFT: # camVel[0] = camSens # return "K_LEFT" #if event.key == pygame.K_RIGHT: # camVel[0] = -camSens # return "K_RIGHT" if event.type == pygame.KEYUP: if event.key == pygame.K_w: playerVel[2] = 0 return "K_w2" if event.key == pygame.K_s: playerVel[2] = 0 return "K_s2" if event.key == pygame.K_a: playerVel[0] = 0 return "K_a2" if event.key == pygame.K_d: playerVel[0] = 0 return "K_d2" #if event.key == pygame.K_LEFT: # camVel[0] = 0 # return "K_LEFT2" #if event.key == pygame.K_RIGHT: # camVel[0] = 0 # return "L_RIGHT2" if event.type == pygame.MOUSEBUTTONDOWN: mx,my = pygame.mouse.get_pos() if event.button == 3: mouseRightDown = True return "RIGHTMOUSEDOWN" if event.button == 1: mouseLeftDown = True return "LEFTMOUSEDOWN" return "MOUSEDOWN" if event.type == pygame.MOUSEBUTTONUP: if event.button == 3: mouseRightDown = False return "RIGHTMOUSEDOWN1" if event.button == 1: mouseLeftDown = False return "LEFTMOUSEDOWN1" return "MOUSEUP" class Win: def __init__(self,w,h,cap,icon=None,hz=144): self.w = w self.h = h self.hz = hz self.screen = pygame.display.set_mode((w,h)) pygame.display.set_caption(cap) if icon == None: iconDataUri = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAADKsSURBVHhe7d0HnCRVuffx/07a2ZwjLCywKCAIiJgQsyAYLipgVhRF0auACCbwGsDXCKLcqwRFRS4XFREUUAkqelW8ooCggrjAwrI5h8kz7znbT8PMVlVPz0xX1anu3/dj2eepGWZ7pqrO85xT1VUCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKB2xtkrnvApe/U+Ya8j8Wl7/Q97BQAAgfBJfiCnxf/bg4sMAACQgjyTfbULBQEAAGNUhIRfaWGGAHGKvl+HtHCMAXWifDDHHehFX+ikGlu97tchLaEeY42y7f3vST+Xk6JeBOh3mNFcoDe8lt2l5gVS01T36pamaaX24MXvtwMdUr9b/Gu53b9J6l0p9bnFv/avLv3M2vAXF3JhYWNIb/9Gkrz7QrZ5Mi6sTknRCoDaHCQte0mtbmlb4l79Um6716bx9k010N9XKga67pI6/+xebel92L5hVCgE6huJID959Yd+JIyRoy8coyIUAGPvENsOkCY894mldTf7Qk56XFHQ8Rtp+02lpfch+8KIsPPXH5J/vrI+ptjetUe/OAIhFwCjPzha95YmvfyJhN8yz74QqM67XCHwC2nrNa79e1tZNXb4+lF5JDjR7dNtbt/2+7d/VWtpfb2rVS/Vt8UdX7dLG861FbGy6hNJ/tmgf6wgxAJgdAdG28HS5Fe6xO+WCU+3lQXki4EtV5aW3mW2cljs5MWXvN9PeIk053ypfX9bgTHZ/mtpuSumBrbZiiGy6hMrFnvzZkkHPEl6yhK3uFpv793tC4Hr6XVdWJdbukuvXb49KPavft3W7dJjq6UVa+x1rdTfbz8kPfSTOwmpABh54h//DGnKsaWkP34fW1lHtlznRitfcEfN/9qKYbGDF1d8Qpjttv/MMyxAzWz4hrTmZAuGyOIYqpj8z3Zv6z/eJzW32IoGsdIVAo+5gmDFoNf7H5Luvk/66z/tm2qHvtIJoQAYWeJvmidNfaNL/G4p8kh/JDZfKa3/vNR9l62oiB27mKJJYbIrbhf+wALU3NI9pd4HLRgi7X4xtgA44RjXEbrEv8ciW4HH9fS4IsAVAr4YuPt+t/yj1F6z0b5h9Bq6v8yzABhZ4p/0akv8rlNsVBsvkdZ+ROpfbysSUQQUTzQpLLzeFQFHW4CaW326O6bOs2CINPvF2H7v2COkH3zVAlTtkRXSrX9wy++lW9zr8tX2hdFpuH4zrwKg+uQ/+XhphjtQJzzDVjS43jWlImDzt2xFRSHM8GB40eOhaba0xG1rpGfbL1zGONKCIdI8biKFXmuLtOI30qwZtgKjduffSoVAuSDo6rEvjEzDFAJN9pql6pL/5NdJi253o6CrSP6DtcyR5n/T/V1+4nqO/WxloornGhGwtmG3LcaqZQ9r5Ov9byL518pB7rA5/R3S9ZdIHXdJP79UetMr7IvV8/mpIfrOrEeIw/9RJx4lzTzLvT7HViBR32Zp5dvcSObHtiIRMwFhix4XU94uLahqlgej1d8rPRD7UcpMZwB+e4V02CEWIBVr1knfdd3kd68tXUMwQnXbf2Y5A+BH/sma5krzLpd2vYHkXy1/q+JdrpFmfNhWJGImoGiaJlkDqWlqccfQLhbkY1I7yT8Lc2ZJp58o3XWddMtl0tv+zb5QHd9/Vs5fBZVVAVB52n/KW6TF90jT3mwrMCJzPueKp2FHi3W5A9etpsnWQKpadrXGEGkdK5Gfu88SayAzL3q29O3PS+v/IH383VJbdR+3LJ8WqKt+NKsCIDn5zz5fWvDd0rltjN60tw9XBPhtQBFQGHlcntOA4guAzMzl3H9uZkyXzjlNeuRX0odc91mluupHs+hlkv9Yc74qzTzVAoxZdUUAgLJxzdbIROT4mzPTGsjN3NnSFz8sPXyr9O9vspWV+e1YF7MBWRQA8Uln5tmuBHu/BaiZ4YsArgcAKsusUG7i8txg7LZQ+ppLS/f/TDrxtbayMr+fFLoIyGeesf0wabb/qCVS4YuA6adYEItTAQAQY+/F0qXnSt//irTr8M+RK3QRkHYBEP+HmXaSNZCauW7vbX+BBRGZjXAAoIiOe5l0z0+rmg3w/WkhZ1aznwFoXuQKgLdagFTNv0Qal3g1ObMAAFDBtCkjmg0oXBGQdgEQHWlOfJ41kLq2JdKscyyIYBYAAKrgZwPurW42oFAXB2Y/A9Bah4/tDdnMU6T2xBsrMQsARHGBEiKm2mzAJ95rK5IV5rqA7AuAtidbA5lhFgCI17vSGkB1PvUB6aLh03shioAcCgBufZW5SS+UpiTeZZFZADSu3uXWAKp30uukn37ddasTbUW84IuA7AsAbnGaj+mJ91xgFgCNK74AaKhnwmN0Xu7GVb/+nvTkxbYiXtD9a/YFwLgp1kCm/COVJ43sCRhAXet+wP1fZ6kNjMLB+0m3uSLgkKfYinjBfjoghxmAynMmSFHyLACnAdB4uu6xBjB6/lbC13xN2mcPWxEvyCIghxkACoDcTHqx1La/BUNwGgCNp/OP1gDGZtFC6UcXDnuvgOAGWhkXAOPcv1jdsxeREk4DACXbb7YGMHb77iVd44qAGVNtRVRwFwVmXAAMSP3d1kYuJicWAJwGQOPY/jup6/8sGIJ7AGDUnn6A9KOvSW3J49ygZluzPwUw0GUN5GLCoVLrkywYgtMAaBwbzrNGBJ8AwJi84JmlIqCCYK4HSPthlNFfdM81UstsCzLUda/U8Qep+x6pb6PUb0vfptLrgI/7pObpriyaUVp8u+0p0qSXShOfbz+oDqx8j7T5IguG4OGk+YgeJzM+Js051wLU1Fo3yF+fmOfTPAYi2/mEY6TLPmdBTk51u9kFl1swBn7UO3mi6y7dMnlC6dUvM6dKixbYMr/0uptbdnVLPfukKwI+9Z8WRPmZptyLzewLgMUPuT1ldwtStO2mUsLv9MvtLrmvsy+M0jhXDEx2hcCkY6Wpx9vKgtr0HWnVCRYMQQGQj3wLgK77XEFYgwwwKv5XL//6g1+tPbDz1xPaO5o7rdu53b/V/a5/KQ0C4qXdKZff0OPqqQAYqaYm6dD9pWcdKD3TLf51j0X2xTrxkrdJt7j0kyD3IiD7AmA3dwC2H2RBjfmEv/kKaatb+jbYyhS0P8+VtR9xBcFRtqJguu6XHo69JTMFQD6ix0mmBUDi/tBoMu8PG7kAiOOvoj/sYOk1R5SWloJfM/73B6SD3Dbu7rUVUbn2udlfA1DrxNy7Slp/nuvADpEeebYb3V6YbvL3Om+THjtaevQVUk8BbyU6/klS80ILhuBCQDQqLv4LwKOuO7/qZ9LrPihNdV36W86QrrnJvlhA+y6RLjzbgni59rk5FABrrTFGPY9Kqz8kPbiLtPZ0N4r5s30hQ9uvd0XH86SO5DmeYI1/qjWG4EJANKIgzsdiqI4u6Xs/kV7zfmn+c6QvXOLSR/JIOljvep0rZF5lQVSufW72BUDvMmuMUvdSadUpLvEvkjZ+WRrosy+Mij/wk5bq9Lr38+jh0uYf2oqCaMngOgwgfP5YJ/nH89PTo11G1o8OY9V66cOuu9/l+aVCoLdghYCfBZg704Ko3GYBsi8AekZZAPSudiP+06SH9pI2fdVWjojfGXfeSf2Bn7QM/r7KO/JAj7TyOGn7721FAbRWfoIFUIfKSWnwse2PddReXD+68zLiAmHVulIhsKsrBC672lYWwNQp0lknWxCV2yxA2gVAdAP7q3BHot+Vems/Iy11CWvjV2xlVWp5oJd35Mo77OqT3PstyI2OWpkBwLAGHz/1sJSTEsKwc4FQdUHgC4F3fFx64+muXaOzyml7/1ukg/axICqXWYDsZwA6fyP1bbVgGBsvkx50iX+9L5A6SuuGV078aRzo/mcm76T+40WrXBFQBC27WQMAgjC4IKiqGLjyeumAV0pXXGcrAhfaLEDaBUB8Et72E2sk6LxTevRoN6J+hysWqr7KvrzjpJH4ByvvpPG2fMf9frdaELCmydYAgOCU+9lhC4E1G6Q3nymd8XlbEbDXHikdfbgFUZnPAmQ/A+Bt+b41duKnz9d8VFp2sLT9Rls5rHLiz1ryv7nxQmsEjAIAQPiqLgS+dJn0mn+Xtm6zFYEKaRYgnwJg24+lDYNultzfadP9e7n1Vd8VozzVn6f4nXLbNVLHHRYEqmmKNQAgeFUVAtfcLB32Bunuf9iKAD37adKJr7UgKtNZgCwKgPgNtuYD0lKX8B85Qnpggk33P2pfrKic+NOe6q9G8nvYdKk1AsUMAB6Xdx0NVM33uRWLgLvvl44+Sbpvqa0I0ClvtUZUprMAWRQAyUnSf4a+o+rbPIWU+AeL7z07brNGoPxHFwGgeHwOqDgbsHy1dOwpblwZ6CcEDniy9MoXWBCV2SxAVqcAKlZsVQgx8VfW87ewbxPcv90aAFBIFWcD7vmndJwrAnoCHeu8K/mZcpnNAmRVAFTcUBWUR/2hi//dQp4FGAj8ShkAGF7F3HLbHaUiIESvfJG0/94W5CTLiwDLG6qaQqCc+Isy6o9/n113WSNAzAAAqA8Vi4Brb5U+k/xc/ly96zhrRGVyGiDLAsDzG8ovPrlXWoqS+CvrW2ONAA1QAACoGxWLgE98Tbrx1xYExJ8GmDzBgqEyOQ2QdQHQWEIuAJgBQJkvuYHiq1gEvMeNqdeutyAQE9orXguQOgqANPUGfJNqrgEAUH8Si4Blj0kfrPo2M9k59khrRKV+GoACIE0DndYIEDMAAOpT4inky6+TfvkHCwLxnKdJu86zYKjUTwNQAKQp5Jvt9DxgDQCoO4kntj4d4AWBL3++NTJGAZCmkAuA7vutAXARAOpS7KmAX/2f9N1rLAjE0ckFQKqnASgA0tQ0yRoB6r7PGkMkXkADAAWTeD3AOV+3RiD8DEB7mwVDpXoagAIgTeNCngGILQAAoJ7EXg/wz2XS/1xvQQCaWyrOAqSGAiBNbUusEZieFdLARguGSLx4BgAKKnYW4OKrrBGIPK4DoABIU9v+1ghMD6N/AA0jdmDzyz9K/xvQU9vzuA6AAqA24jfQ+AOsERguAATQWGJnAS4KaBZg/hxp790sGCq16wAoAGojuoGapklte1oQmK57rQEADSF2FuCqG1x32GVBAJ6e8ZiRAiAtU95gjQCF/JRCAEhHZBagu1f68c0WBODQjM8aUwCkpXm+NQLTu8bt9XdaMAQfAcTOBlJa/Cmz1G9zCuwkdhbgmpAKAGYACie+I5v4EmsEJnn0zycAkBV/yswvccWBXygOkJlrbgrnNMDTk2cAUjkmKADGLub8/yxXABxmQWC2B1TuAvHiigOKAtRC7GmAa2+xIGft7dLT9rVgqGieqQEKgDRMfKk1ArT1J9YACmVwUUAxgNGKnen83V+sEYAsTwNQAIxNwvR/oAXA9t9IfcstGILz/ygSigHUVEgFQIXTADXHU0DGxndAQ41rlfZcIzVPsxUBWX2mtPGLFgzBfpCv6H4042PSnHMtSFn3A9Kyw9w+O8stM0uvTfZaXufjcc3um1vs1S1xr/2d7rfpKC2D230b3LLaLaukXv/qln7X9utrxxeyIV/LEtnOJxwjXZbzM+pPdbvZBZdbMFS99gu+aIxMqW+5Q5ocwONbbv299OK3WzBUzbcHHf/oxe5Emvpuaf43LAjM0iWu8/2XBUOwH+Qr3wIgT73rXAFyb+neFN1/e6Ld7wqE0Qu1EKAACEdkW/z8EumIwy3I0b+WSUuOsGComm8PTgGMXvxFGdPiS7fcbf6fpOTP9D/y0+IvmH2eK3hOluZ9TVp0q+v9Vkm7/UWa/WX3tZe7b5pY+t7qlU8RcHoAVWtttUbOdl9ojQxQAIxOfMfS/nxpwjMtCMymi60Rwcf/EJ72g6SZH5R2/an0pG3SLr+Upp8qNe9q31AVCgFU7etujBSClhZXB8+zYKia78cUAKNTrNH/9t9JHa4DBYpq0gukuedLez3iioGfS1NPKl2XUJ1yIQAk+nvsBGk+spoFoAAYufgqrNltsWlvsyAwmy6yRgTT/yieSUdI890+vWSdKwoultoOsi8Mi9kAlEX6vr8vtUYAdt/FGkPFDzzHgAJg5OI3wsyzrRGYznukLd+1IILpfxTb9HdJi/8iLfixNPFIW1kRswHwIn1fX58rAh6wIGfMAIQpvuMYf6g04z0WBGbjV6wRwegf9WPKv0m7/kxaeKPUfoitrIjZAESEchpgNwqA4CR3FjPPskZguu6TNn/TgghG/6g/k1/mes8/SbM+rx335KjMzwZQBOBxK9daI2eLMnqWHAVA9eKn/ie5kceUV1kQmI0XWCOC0T/q26wzpd3vdwXB8bYiEUUAHre2pvelGr0J7dZIGQVAdSqM/gM9999xu7Tp6xZEMPpH/WtbLC28Spr9BVuRiCIAO6zbaI2ctY+3RsooAIbnO4b40f+0k12pVtX5xuytDbQwAbI284zSfQRan2wrYlEEIJwZAAqAYMQnf/+xv9mftSAwGy+TOm6yIILb/qLx+PsI7HbHcJ8UoAhocGsDmQHgFEAYkjuDOV9yRcB0CwLS3yGtSxz9c+4fjat5krTwp9UUAWgMkf5wwyZr5IxTAPlLnvqf8hZp6hssCMzajyvhkb8e5/7R2JpaqikCuE9Ag9ruxk8h4BRA/uKTf9Ps0ug/RNtulTaeb0EEo3/AKxcBE15oK2JxKqABbe+0Rs7aOQWQqwpT/1+UWuZaEJi1H7ZGLEb/QJkvAuZ/R2peZCsiuB6g/kX6xI5ACgBmAPKTPPXvP1M87QQLArPWve2uP1kQwegf2FmrS/6+CEjG9QANJpQZAP9o4pYMsjMFQFT8QT9uarhT/x13SOs/aUGET/6M/otmIJCeqN5NeqE09xILYjEL0EC2d1kjZ/39Uq9b0kYBMFTyxT/zvlEaMYRozSnWiEXyL6L+rdZA6qa/U5p6ogURzAI0kFASYlYXI1IAPCE5+U8/Ldyr/le799b5vxZEMPVfDNHtNBDIHUkaxezPu95wjgURzAI0iKw+fjccCoBsJR/g7YdLc8+zIDCbr6z0tD+P0X9RdS+zBjLRMkua44qAeMwCNIhgCoCMzgBSAFS66K9pWmnqP0TdD0irKj6CmDv+FUe0UOv6o9S32QJkYtrbpUmvtiCCWYAG0N5mjZwxA5CN5OTvzb9cGr+fBYFZdbI0kJggmPovvAFpy5XWRmZmnmmNCGYB6k+kqAtlBmAbBUDqKif/ORdIk19pQWBWu06q42YLIrjqv16sPUvqvNOCFA30S/3bpd71Us9jUvdS97rMxavcskHq22bf2AAmPEualPh4b2YB6lyjnQJo1GniysnfX/QX6nn/TZe70f9bLYjF1H8xJV+EOusz0oyPuHK9xVZU0N9VStx9K93iE7hvry4tvWueaPe5dr9L7Ds+bthd+m8rcmMFfxfMZltadpXa9pZa3eJfxx/gvj7Bvrfgtt0iLX+JBRFjOb4i2/iEY6TLPmdBTk49V7rAdSsx6r0vieSBZ+wv3f5DC3J046+lo99twVA13SaNmiySO9vJx0oLf2BBYPxocNkzXSOxwyb5F1flotRr2d0l3L1cAp7n9mA3Yvej9sGvO5K6G8XnpXU/Vwgc6EbRh0tT3HHUknhVffgeebHUcasFQ1AA1I/I9jjK7bo3VLwtRDau/rl0bPynu2u6TRrxFEBy8p/wgnCT/0CftPqdrpGY/DnvX2zDn7bpfbiUlLZe6Uap17r2TaWPgHb/Req5L9/k7/X8rfTe1rxXWjrXjaL/Tdr0Pfe+Arm7ykhM88daLE4D1LE5M62RMy4CTEdy8m/bX1rwfQsCtNJ1SJ13WBDBef/6UF8jrm3XSaveIj0wTVrhXjvvsi8UgJ8JVOwpDS4GrGOhFABbt1sjZY1UACQn/+b5peQf6pTlui9IW75tQSySf/3wRUCdzeZ0uf33e9Kyg6S1ibesDktTa+k0BhrK3EAKgOWrrJGyRikAkpO/xpeS//h9LQ7M5h+6AqDiU/7q/TxdI/IFXVqFgP+Z5cX/GyNdxvae1n9KeuhAN8T5ma0I2I5ZgFicBqhTocwAPEoBUDOVD9aFV0sTD7cgMP4hPyvfYkGsNBIEwlEuBAYn36Rl8PdVWvzPLC+jsfN7Ki/+PVSn+27psaOkVe+3FYGa8irXQ862AI0glAIgYQag+mOsSvVeAFS+snr+f7sq/+UWBMZ/JntH8k/8QKjfGUbbiaOYBifvnZe8+fcwsmJg04XS6g9aEKj2Z1tjCK4DqFO7LbBGzjgFMHaVk//cb4T7gB/PJ/+ev1sQK4ROH4gzuBiobOP50pqPWBCgCc+wBupM7MzwvntZI2cJBUDN+/x6LQAqJ//ZX5Cmx99lIQh+anT7DRbEGr5jBcIw/IzAhs+7IuBsCwLT7u+7gUawz2KptdWCHG3aLG3O6Oab9VgAVE7+M11HM/MMCwK07tzS1Ggykj+KpjwjkGzDOdKW6ywISHviDEDsCBKFEckRgY/+U1FvBUDl5D/9VDf6r/l1FLWz8SJXAJxlQayA3zwwrMqzAetd8Rua5mlS2wEWoJ6FUgBk9QkAr54KgMrJf+qJ0tzzLQjQlh9Jqys+3td3nJz3R9H5fTi+CPCPQN54qQUB8c87iErua1BIzAAUV+XkP+U4aX6AHUvZ9tukFcdbEIvkj3qSvC+HOAvQtsQaqBOxp28ODWSi5+HHrJGBeikAkpP/xJeFfYvfrr9Jj/nk31eKo0j+qEfx1wT0PiRt+C8LAtFKAVBnIvli8ULpyXtakLO/uJSQlXooAJLv8td+mLTwRxYEqHe1S/6vk/orzvmQ/FGv4k8FbL/ZGoGgAKh7zz/UGgH4c3wBEH+sjFHRC4AKD/c5oJT8Q31Ged9Wl/xfLfXcYyticcU/6ll8cRtaAcApgHoSO/3//EBu9/CYGwtyEWB1kpN/y+JS8m+ZaysC4x/t+9gxUufvbEUskj8aQXRkM7BF2vYrCwLQPMsaqFehzAAkjP69VGaCi1oAJCf/Jnew+uQfctW+3I38O26xIFYq0z1AgMKfBWiaaA3Ugcj5//32kvbczYKcZXn+3ytiAVDhyX5tpeTffrDFAfLn/Lf/xIJYXPQHdPzWGqGgCKgDsdP/r3mpNQJAAVBZ7AZ8nE/+E59nQYBWnCBtrfiJBJI/4PWttEYgQr2WCCMR+2mx1xxhjQBkeQGgV6QCoPJn/UN+sp+36r3Slu9YEIvkj0YV7eBCKwDGMQNQjw58snTwfhbkbNUa6eEVFmSkKAVA5eQ/96Kwn+y3+jRp09ctiEXyRyOL7vv9m9zSYUEAmAEouuCn/7O+ANArQgFQOfnP/pI0/SQLArT6Q9LGr1gQi+QPxOnN8PNQw+nfYg0UVPDT/9fn8MGX0AuAysl/pvvSzNMtCNDqM13y/7IFsUj+QJKQTgNQABRZ7Oj/uJdJ+z/JggBc/2trZCjkAqBy8p9+mhv9x27XMKz5qEv+X7QgFskfqMTfLyMEAwNu2WoBCig2j5z8emsE4Pa7pIfinwEQvT6mhkItACon/6nvlOaeZ0GA1pwlbficBbFI/sBwmudYI2f9JP8Cix0lvuBQ6YXPsiAANyRP/6eaJ0IsACon/8mvk+ZfYkGA1rrttaHiE81I/kA1gikAmP4vqMRccnJg14xff5s1MhZiAZCc/CceJS38HwsCtNbl9vUVZ2xI/kBVWtz/Zlg7ZxQARRWbS577NOn4oy0IwAMPS3fca8FQFZNJLYRWACTf5a/9uaUb/YRq3edc8q+Y20n+QLzoNG0oo3+vd7k1UCCxU//epz9gjUDkcfV/WUgFQHLybzuwlPyb2m1FYNZf4AqAj1oQi+QPJIuO1EIqAHoesAYKInHq/53HhnXu37sh+er/1HNGKAVAcvJv2dMl/6vda0AdwmAbL5bWnmpBLJI/MFITA/qAds+/rIGCiE3+E9348dPvtyAQ/3C71i8qPhQ2XSEUAMnJv2l2Kfm37WUrArPpcmn1uy2IRfIHKoufqm3Z1RoB6GYGoEAS88kXzpAWzLMgEJf+wBpRqZ//9/IuAJKTv8aXpv3bD7I4MJt/KK16qwWJSP5j5xOEX/y+Mpal/HMQlviLfie/whoBiJ8ByKSDxoj44zzWScdL73uTBYHo6pIuSS4AMskdeRYAlTvjHU/2O9yCwGy9Xlp5nAWJxtkrRm5wwvcJIj5JjEz55wwuCBCi8YeGNevHKYAiSEz+z3qqdFGA5Zof/W/eZsFQmb3bvAoA3/kmd+rzr3QjgIA+pzHYtlulx4YdnZD8R27npJ82ioH8xXfak15pjQB03eveZeyNgJjdC0O534g1YbxLtOdYEJgK0/+Z7Vt5FACVk//ci6WpAd2jcbCO30vLX2xBIpL/yFXeJ9Ln/22KgGwl/71Dmv7v+K01EKCK/UaLy27XXCg9JaD7/Zf5K//vvM+CHGVdAFTu6Gd/WZr+LgsC03mn9MhzLEhE8h+5rEb8w/HvIXEkkQF/bAxe6l38Np90jNR+sAUB6PiNNRCYiv2GT/4/vUg6MtCzyHlf/FeWZcKqnPxnftIVAIHOqnW5Uu3hfSxIRPIfueoSbvNCafyBbnlqaWl1JX3TZLdMcn91t/hXNbuftq103/Z+9+rbPQ+6bXeXW1zx5l97Hy79vOFltS0rHxNP8J1CPU05J2/33e9123g/CwKwdHe33yyzYIjR7COR3/sEV+9cVvGxIek79VzpgsstGCrEPm3YYyb05P/ne6RDjrUgKtO/eVYzAJU32vQPhpv8e9zBT/JPwzDJf4I09V3Srr+W9lruXm+Q5riecuob3Zee7pKE2yati9zRPtPtxePd0uJqgGlu3S7ua65A8KPIKa8pPTFyl2ulPR+SFv3O/ff+Y5vD3lCqusJkbPy/UU3y9/z3+e/3iz+Wiiz5b+sf7x1S8u+6Pyn58wmA7Pn9fthjZrEbK9x4abjJ3/vM160Rlfl+lVUBkLzRpr1Xmlvxmfn56V0jPTjsCSSS/8hVTmIzPi4tWS/Nv1ia+DxbWQMTnu1+5jdKP9v/G5WlmWjH8rPLxUARC4Hk5N/qCrrQHu+dfP6fCwCz43eKYRO/96oXSrf/QHrJsGdq83PdLdKP3ZIg8/0qiwIg+aie+g5p3n9aEJi+rS75L3GNrlIcj+Q/OvEHc/MCaYEbrc85x+2ZKd72uWlC6d/Y5WaXePa1lRHDdjhjUIufXaRCoNyJJ5sd4KXaWwJ+8Fj9qzrxe2e9R7rWjaznzrIVgfrMf1kjKpdZpSwKgPgNOPFlbjT2TQsCM9Dvkv9e7nWzrYhF8h+d+IQ1rtUl5F9IU15lKzIw6cXu3/yJa7iCIF4ayTX+ZzbNdL/7m6RZn3fv6zW2siqhFwL+fVXuxOde4n7311oQCH/dT8dNFiAjfl/x+3LVif8ZB0g3XOQSa8W7sYfhv/5b+lP8U/+8XGaV0i4A4qt+f1HXvEstCNDSxVL/agsSlXfUelj8gZdVAok/sOe4o7h9fwsy5G84M/erFkRU1QmNUPRnjpsi7fYnacH3XAFwpitKrpYWPyhNP819sepD1P/cwdszb+XOvPLfcI4bEk1/pwUB2eJ663ic/6+dwQl/+H1lkFnTpK+dVZryP+r5tjJgnZ3hjf69NAuA5E7IJ39/sVaIlu4t9T1iQcPwB15+CWSqSwDT325BDnwCmpThzMPOZrqk37aHBabNFaFzz5P2eNS9vw+5FSM6VPPaloM79OE78zlfkWacbEFgNl9hjQjO/1fP7w+D94mdl6oTfll7m3S66yr+dZP072+2lQXgk//KtRZE5bZPpVkAxG/cyW90y1EWBOZBNwLt5cEfjt92aSSO+J85OfkzMZmZktib1PLvEP+zpp1kjRitC1wh8MVSITDjY+6InWlfqNrgYqC81Op38j/HL+WfW12H3jzD/U4Xud/nFFsRmK0/c/0At/91Bu8zo1n8/lDdPjGMBbOlc9zusuK30pc+7A6ZqfaFAvjDX6TPXmxBVK4zSmmfAoiaFWgBvezpUk/yCZoGlEYREO0Mmue7AuBIC3I09bjSe4mqSQeWqP25UstcCyrwhcCcc6W9VrvXC6W2MZ0u8b9TXIc90sX/nJH9faa64dvu/5CmVyh68rYx8cJkpv8z9uJnSf95tvSYS/wfP9ntNgVK/F5/n/SeT1oQL9eEmFYBEJ84/AjGf0Y7NMsOkzrvsACD+M691kXAUJMDuvgreRagVqLJcvwh1qjSuGZ3HL1PWvzX0kWTPqEOf1+D/LXuJy28Tpr/reoKnrxs/bm0/acWRDD9n7Kpk6TXHy1993PS2t9LN39bem9gT/EbCZ/870q+5W/uBWVaV7L70cFQzbtIeyx1JUebrQhE96Pu3fpHMvW7xb1t/wmActu/xsbWjo0HtSOxaz/+83aO7fuGxBnodb//tpukrj/Yili12k+iv9T875dG3yHYcrW0IvZ0RHq/vx/N+4Q+Fv1d7r1f6bahG1lv+pL7V9ywIxQTj3KFldu+03K8xmMkHnmx1HGrBUP4znqsBUBk+wd+J8BUTZ4gHezqwoP3feL1wMRP5RaPv93vu862IF7unyTLrgCYfoo09ysWIDjrXC+w7iwLItJLgLvf70bBe1uQM3/nt4efbMEQ6f3+C37kEuSrLaiB/h43gr3FLS6Jdfolh5mt9ue43v34UuJvXWgrC2DLNa4ATPwIZi32gbovAMa3lp7A1+6WCe2l17kzpcVu/Le7W/xrub3nIvuP6tDdrhY/xO1KvX4sFy/35O9lVwAs+KHrEAL7rC+GWvVeN4KMvU9lLUY//lTC0CnwpmnSko0WBOKfk93eG3lId3oFwMIbXbJ8mQUp6FnpCps/Sd2uR+r++xOv/RvsG8aoZS/X6/vnNJSXp0Y/0VAUDz87aSasFvu/F2QBMBp+YtOf3+53Ca7PT1y62Cf7cdlfVRakw14v/e5OC6JqtT+NWRoFQLSj9/ZcFfa5P7ijuVP6l9tGA1tsxRBj3Vei+0X786Tdfm1BIOKTQGoJYMezDmp5u+Nq9SwvFQP9blsPbHev/kFK/iFK1vavA25/GOcfulRe/MOXrN3shnU+2TdPtx9YcBsukNYk3k0mtQKwqAUAkr3H9XIXfd+CqGCSv5dGARDt5NoOkBbfbQGCtvJEafO3LBhirPtKdL/wz4EI7VbQy12PvO1aCx6XXgGw6I/ShEMtQC66H3CF335u6/TYiiFq2WFTANS5D/4/6fzvWBAvjZw7atlM2EwI+NFMGCrLG+L4R/mGZtxEawwRndGqlXEFuIK/3q05Iyn5e8GM1hC2s79SrOTvZVMAjD/YGgjehGdZIwNNsck2X36aO0v+wUTIz8ZLpW0/tiDCj/6BYX3uYumcb1gQL8h9KZsCoCX2BisIUcs8qTX2Svja3w8gfrSdr8zfU4u9InN+6n+tv81yIkb/GNbXLpc+ep4F8YI67z9YNgWAf8wriqN5tjVSxgwA8rTyrVL/JgsigpuuRXi+9UPpA+daEC/Y5O8xA4CorAqAEGcAYq7TQx1a4ZJ/5+8tiGDqH8Py5/xPTLx1yg5BJ38vmwJg3HhroBCaZlhjiBQuhOu214D0b7dGRpIvPkNa1n5K2lLxzjdM/SNRV5f0+tOGPefvBb8fZVQAcKVzoWR1YVrWybYa/vPvWcr632t0m66Q1ld8OgtT/0h0z/3Sc94gXXWjrUhWiP2IGQBEZVWw+RvOhCbroiTEIqhebbxEWlXxgU9M/SPRj2+SDnPJ/89/sxXJClNEZlQANFsDhTAuoxmAEEe/8e8pvcTQt8oaSNX6C6TVFR9BHPz5WuTn0xdKr36/tLnymMXvQ4WaQcqmABjosgYKIavtFeQMQOJV4enofcwaSM26z0prE2/z65H8Eetnt0kHH+N2DlcADKOQ+1BGBUCAF3shmb8HfO1FR9E9D1kjIF33WiMj/nHMSM/qM10B8HELEpH8McQGNw7w9/Q/6iTpzn/YymSFLSCZAUBUOgVAVHdgz4foWSH1r7ZgiPQO7t5l1kBNdS+VHnmptPGLtiIRF/1hiMuulvY9quIDfQbz+09hC8hsCoCsp1UxNulsr+hB0vuwW9ZbEIDu4a/uGaPoLMi2n1sDNbPF9eDLDpU6brYViUj+eNwvfiu94t3SOz4urRq+W/LHcuH3n2wKgO5/WQOF0LfOGkNEk1ctdP/VGgHoznj63+tf64qAmyzAmK1xvfeKY93ftWIPnlfnHTmG1m20BnLjr+5/0VulI98pXV/d08n9dqyL00bZFAA9S62BQogvANKx7RfWCMCWH1kjNfGdxubKjxBDFfy2e3A/acNnbUWioDrvNQFNgDWaK66Tnnlc6er+X/7RVlZWLhzrIvl7Gc0A/N0aKIT4C9PS2em3fM8aOev6m9QZW/5HRm01t+WK0pXqGLmu+9yI/3i3vNYNNIbtZ4IbuT203BrIxKbN0sVXSfu/QnrzmdIfq5+ArJtR/2BpFADRDnPbDdZA8Hrd6L/y9OlYRPcNfxHclmstyNHm/7ZGRK0P+viCwl+pvv58CzCsvq3SWvenfHgft//8wFZWFEIHHvn3V7rD7e8PWIDU/PBn0vGnStOfIb3bbYV7q/+b+/2mrkb9g2UzA9C7VOq4wwIErfMP1khF/EG06ZvWyEnPo+49fN2C1CV3JGs/KD1ypLT1p7YCEX3b3N/pM9LSRa5gqqpPDr4DvyXVQ65x3fI7l+w/Ic04VDrOJf8fuCJgBOo68ZeldSFM9JFqk4+XFl5lAYK14u1uRPVtC4ao1b4S/7i9GW4EPOccCzK2/BhpW+wsRFqjxk+5pfLDldqe5oYr75amvtWV6TxLY0fi33CetPHLI/mUSgij/p1F9v89dnH1zC0WYNTWbZB+eXtpufE26cHRnV4JcZ9JTXYFgLfgGmmK62wRpt41riea5xqxm69W+0py8pvvCsSprlDM0nqXVNaebkFEWseHN3wRsMNE9zd5c2mZeLitayDbbnYFqdsvtnzf7ZabbeWwQu7EY7f7x1ytd+5pFqAq/ql8v7KE75c/3mNfGJ2GSvxlaXVwyZ3bLDfKmzXsnbmQh9UuEW50CTGq1gdHfIHoTT9DmvsFC1Lk7z+w+gPS1itsRaw0CwCvyiLAtB3gioCXlpZJR7h3l80ZvMx1/rmU8H3i7x3x3SLT3mZjlbjNr/ii9MZXWoAh/Oj+vgefWP7011LS77evj0FDJv6yNA+W5E6+eb4b0bxdGn+Q69T2dvEs904mKbPH0OIJA32uk31U2vBlaXPiufha7yeVE1/7c10h8D63j7zeVtRQ30Zp03fc7+t6276Kc4RZJZKRFQGPa7dC4CWueZg04RBbX0B+H/T3Qthuy+juDVGkjjyxb3zpc9wv4Xb9wwq8OUdrgzs0H1sjPeS6I5/k/zEo4a+q7SeTGzrpD5ZmJzfKjg0BSmM/GX7/2FEovs0luiNdsXig1DLTvjBCPY9IXXe5EeXVbvGfuU+uTU0eHcTYjpdx010R4AqnHYsrCNqf4QrqNvtigPwzF/z0fjnpa9TPCyliZz7stj7xtdJTlkhLdpf22k3afaF9IUD9bhje3eMOs1632Gv3oHb5tdNt4hWrXZJ3ywqX6H2y9/GOda7dke4d40n6MdIe5Qzb0yJ4ae4jI9s/Wha7QuCp7nWRS26T3Tvzs0Z+ce0B18MMbHO9kS0DW10v9E+XaO52setdqpd3R1G7wrl1H6ltP7fs6/5u/tWWLAuDvs2l4stvhx2vtmjMvX3RO3QGSOkj6Q8ji2lOdvTiyuIACmn/CK3DSOdv0zRbap7nCqn5O726Zdx4W9qjbfW5wqqztPT7V5fEy3GfK7J6V7jXlaXXcrt/Q+nfrI1669DpG2uLhB8ov6P70R5LcRa/zbISwv6R5e87Go16DIW+XcaqUbdrLZZ63zfqEjt82EueB1Ue+0YRO5F6P4aKuE3Gqt636ViWRtwfgIaWZodYbx2K/32KnEDK7x/F35YjXdj2AKoy0s6xkTuXkf6tslwadZsAQcniIkAA4Skn4TQuQvMXY3lckAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANAIpP8P3sak7cyUXx0AAAAASUVORK5CYII=" header,encoded = iconDataUri.split(",",1) iconDataUri = b64decode(encoded) open("image.png","wb").write(iconDataUri) pygame.display.set_icon(pygame.image.load("image.png")) os.remove("image.png") else: pygame.display.set_icon(pygame.image.load(icon[0])) def update(self): global showMouse if pgEvents() == "QUIT": quit() if showMouse == False: pygame.mouse.set_visible(False) if showMouse == True: pygame.mouse.set_visible(True) pygame.display.update() clock.tick(self.hz) class Sky: def __init__(self,win,color): self.color = color self.win = win def draw(self): self.win.screen.fill(self.color) class ImgSky: def __init__(self,win,img): self.win = win self.img = pygame.image.load(img) def draw(self): self.img = pygame.transform.scale(self.img,(self.win.w,self.win.h)) self.win.screen.blit(self.img,(0,0)) class Ground: def __init__(self,win,color,h): self.win = win self.color = color self.h = h def draw(self): pygame.draw.rect(self.win.screen,self.color,(0,self.win.h-self.h,self.win.w,self.h)) class Obj: def __init__(self,win,x,y,z,w,h,img,fixy=1,collision=False,hboxsize=1): self.win = win self.x = x self.y = y self.imga = img self.fixy = fixy self.z = z self.w = w self.h = h self.y = self.y/fixy self.img = pygame.image.load(img) self.img = pygame.transform.scale(self.img,(self.w,self.h)) self.collision = collision self.enabled = True self.hboxsize = hboxsize def draw(self): if self.enabled: global playerZ,playerX,camRot,playerSpeed self.x += camVel[0] if self.w+playerZ-self.z < 1: return if self.h+playerZ-self.z < 1: return if self.w+playerZ-self.z > 799: return if self.h+playerZ-self.z > 799: return if self.x > self.win.w + self.win.w/2: self.x = 0 - self.win.w - self.win.w/2 if self.x < 0 - self.win.w - self.win.w/2: self.x = self.win.w + self.win.w/2 if self.collision: dis = math.sqrt(math.pow(self.x-int(playerZ)+playerX-playerZ,2)) if dis < self.hboxsize: playerZ -= playerSpeed self.img = pygame.image.load(self.imga) self.img = pygame.transform.scale(self.img,(self.w+playerZ-self.z,self.h+playerZ-self.z)) self.win.screen.blit(self.img,(self.x-int(playerZ)+playerX,self.win.h-self.h-self.y-playerZ)) def enable(self): self.enabled = True def disable(self): self.enabled = False def getDistance(self): global playerX,playerZ return math.sqrt(math.pow(self.x-int(playerZ)+playerX-playerZ,2)) class FPPlayer: def __init__(self,win,speed=5): global lockMouse self.win = win self.speed = speed lockMouse = True def work(self): global playerZ,playerX global playerSpeed global camRot,camVel,camSens global lockMouse,mouseSpeed,mouseRightDown mx,my = pygame.mouse.get_pos() playerSpeed = self.speed playerZ += playerVel[2] playerX += playerVel[0] camRot[0] += camVel[0] camRot[1] += camVel[1] camRot[2] += camVel[2] if camRot[0] < -360: camRot[0] = 360 if camRot[0] > 360: camRot[0] = -360 if mouseSpeed < 1: mouseSpeed = 0 if mx < 400: camVel[0] = int(mouseSpeed/10-1) if mx > 400: camVel[0] = -int(mouseSpeed/10-1) #camVel[0] = int(mouseSpeed/10-1) if lockMouse == True: pygame.mouse.set_pos(self.win.w/2,self.win.h/2) pygame.event.set_grab(True) def unlockMouse(self): global lockMouse lockMouse = False pygame.event.set_grab(False) def lockMouse(self): global lockMouse lockMouse = True pygame.event.set_grab(True) def setSens(self,sens): global camSens camSens = sens class TPPlayer: def __init__(self,win,speed,charimg,w,h,x,y): self.win = win self.speed = speed self.charimg = pygame.image.load(charimg) self.w = w self.h = h self.x = x self.y = y self.charimg = pygame.transform.scale(self.charimg,(self.w,self.h)) def work(self): self.win.screen.blit(self.charimg,(self.win.w/2-self.w/2-self.x,self.win.h-self.y)) global playerZ,playerX global playerSpeed global camRot,camVel,camSens global lockMouse,mouseSpeed,mouseRightDown playerSpeed = self.speed playerZ += playerVel[2] playerX += playerVel[0] camRot[0] += camVel[0] camRot[1] += camVel[1] camRot[2] += camVel[2] if camRot[0] < -360: camRot[0] = 360 if camRot[0] > 360: camRot[0] = -360 if mouseSpeed < 1: mouseSpeed = 0 if mouseRightDown: mx,my = pygame.mouse.get_pos() if mx < 400: camVel[0] = int(mouseSpeed/2-1) if mx > 400: camVel[0] = -int(mouseSpeed/2-1) if lockMouse == True: pygame.mouse.set_pos(self.win.w/2,self.win.h/2) pygame.event.set_grab(True) def lockMouse(self): global lockMouse lockMouse = True pygame.event.set_grab(True) def unlockMouse(self): global lockMouse lockMouse = False pygame.event.set_grab(False) def setSens(self,sens): global camSens camSens = sens class Text: def __init__(self,win,x,y,text="Sample Text",size=30,font="Comic Sans MS",color=(255,255,255)): self.text = text self.size = size self.font = font self.color = color self.x = x self.y = y self.win = win self.enabled = True def draw(self): if self.enabled: font = pygame.font.SysFont(self.font,self.size) text = font.render(self.text,False,self.color) self.win.screen.blit(text,(self.x,self.y)) def enable(self): self.enabled = True def disable(self): self.enabled = False class Button: def __init__(self,win,x=100,y=100,fg=(255,255,255),bg=(40,40,40),text="Button",w=150,h=75,size=30,font="Comic Sans MS"): self.win = win self.x = x self.y = y self.fg = fg self.bg = bg self.text = text self.size = size self.w = w self.h = h self.font = font self.enabled = True def draw(self): if self.enabled: pygame.draw.rect(self.win.screen,self.bg,(self.x,self.y,self.w,self.h)) font = pygame.font.SysFont(self.font,self.size) text = font.render(self.text,False,self.fg) self.win.screen.blit(text,(self.x,self.y)) def onclick(self,function): global mouseLeftDown if self.enabled: if mouseLeftDown: mx,my = pygame.mouse.get_pos() if mx > self.x and mx < self.x + self.w and my > self.y and my < self.y + self.h: function() def enable(self): self.enabled = True def disable(self): self.enabled = False class Frame: def __init__(self,win,x,y,w,h,color=(40,40,40)): self.win = win self.x = x self.y = y self.color = color self.w = w self.h = h self.enabled = True def draw(self): if self.enabled: pygame.draw.rect(self.win.screen,self.color,(self.x,self.y,self.w,self.h)) def enable(self): self.enabled = True def disable(self): self.enabled = False class Crosshair: def __init__(self,win,img,w,h,followmouse=False,showmouse=False): self.win = win self.w = w self.h = h self.img = pygame.image.load(img) self.img = pygame.transform.scale(self.img,(self.w,self.h)) self.fmouse = followmouse self.x = self.win.w/2-w/2 self.y = self.win.h/2-h/2 self.smouse = showmouse self.enabled = True def draw(self): if self.enabled: if self.smouse == False: pygame.mouse.set_cursor((8,8),(0,0),(0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0)) if self.fmouse == True: mx,my = pygame.mouse.get_pos() self.x = mx - self.w/2 self.y = my - self.h/2 else: self.x = self.win.w/2-self.w/2 self.y = self.win.h/2-self.h/2 self.win.screen.blit(self.img,(self.x,self.y)) def enable(self): self.enabled = True def disable(self): self.enabled = False class Image: def __init__(self,win,img,x,y,w,h): self.win = win self.img = img self.w = w self.h = h self.img = pygame.image.load(self.img) self.img = pygame.transform.scale(self.img,(self.w,self.h)) self.x = x self.y = y self.enabled = True def draw(self): if self.enabled: self.win.screen.blit(self.img,(self.x,self.y)) def enable(self): self.enabled = True def disable(self): self.enabled = False class KeyboardListener: def __init__(self,key): self.key = key self.enabled = True def listen(self): if self.enabled: if keyboard.is_pressed(self.key): return True def enable(self): self.enabled = True def disable(self): self.enabled = False
2.5D
/2.5D-0.0.2.tar.gz/2.5D-0.0.2/d25/__init__.py
__init__.py
"""此模块用于打印嵌套列表""" def print_lol(the_list,level): for each_item in the_list: if isinstance(each_item, list): print_lol(each_item,level+1) else: for item in range(level): print("\t",end='') print(each_item)
20191004
/20191004-1.1.0.tar.gz/20191004-1.1.0/netster.py
netster.py
from distutils.core import setup setup( name = '20191004', version = '1.1.0', py_modules = ['netster'], author = 'hfpython', author_email= 'hfpython@headfirstlabs.com', url = 'http://www.headfirstlabs.com', description = 'A simple printer of nested lists', )
20191004
/20191004-1.1.0.tar.gz/20191004-1.1.0/setup.py
setup.py
import setuptools setuptools.setup( name='2020', version='0.0.1', author='asimov', author_email='1019022410@qq.com', packages=setuptools.find_packages(), )
2020
/2020-0.0.1.tar.gz/2020-0.0.1/setup.py
setup.py
import setuptools with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name="2021ccps3", # Replace with your own username above version="0.0.1", author="Example Author", author_email="author@example.com", description="A small example package", long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/pypa/sampleproject", packages=setuptools.find_packages(), # if you have libraries that your module/package/library #you would include them in the install_requires argument install_requires=[''], classifiers=[ "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ], python_requires='>=3.6', )
2021ccps3
/2021ccps3-0.0.1.tar.gz/2021ccps3-0.0.1/setup.py
setup.py
import boto3 def upload_file(file_name, bucket): """ Function to upload a file to an S3 bucket """ object_name = file_name s3_client = boto3.client('s3') response = s3_client.upload_file(file_name, bucket, object_name) return response def download_file(file_name, bucket): """ Function to download a given file from an S3 bucket """ s3 = boto3.resource('s3') output = f"downloads/{file_name}" s3.Bucket(bucket).download_file(file_name, output) return output def list_files(bucket): """ Function to list files in a given S3 bucket """ s3 = boto3.client('s3') contents = [] try: for item in s3.list_objects(Bucket=bucket)['Contents']: print(item) contents.append(item) except Exception as e: pass return contents
2021ccps3
/2021ccps3-0.0.1.tar.gz/2021ccps3-0.0.1/s3_cpp21_pkg/s3_cpp21.py
s3_cpp21.py
# Trabalho individual de GCES 2022-2 Os conhecimentos de Gestão de Configuração de Software são fundamentais no ciclo de vida de um produto de software. As técnicas para a gestão vão desde o controle de versão, automação de build e de configuração de ambiente, testes automatizados, isolamento do ambiente até o deploy do sistema. Todo este ciclo nos dias de hoje são integrados em um pipeline de DevOps com as etapas de Integração Contínua (CI) e Deploy Contínuo (CD) implementadas e automatizada. Para exercitar estes conhecimentos, neste trabalho, você deverá aplicar os conceitos estudados ao longo da disciplina no produto de software contido neste repositório. O sistema se trata de uma biblioteca python para executar pipelines de dados de forma customizável em bancos de dados. Para executar a aplicação em sua máquina, basta seguir o passo-a-passo descritos abaixo. # Resumo da aplicação A biblioteca desenvolvida auxilia desenvolvedores a explorar os dados com funções essenciais para a identificação de outliers e anomalias e uma interface que auxilia a visualizar as informações de acordo com o arquivo de configuração. A biblioteca recebe um arquivo yaml com as configurações de cada etapa do pipeline de dados, e do endereço do banco de dados. Após a execução do banco de dados, o banco de dados de dados é atualizado com os resultados da análise e os resultados podem ser visualizados por meio de dashboards no metabase. # Etapas do Trabalho O trabalho deve ser elaborado através de etapas. Cada uma das etapas deve ser realizada em um commit separado com o resultado funcional desta etapa. As etapas de 1 a 3 são relacionadas ao isolamento do ambiente utilizando a ferramenta Docker e Docker Compose. Neste sentido o tutorial abaixo cobre os conceitos fundamentais para o uso destas tecnologias. [Tutorial de Docker](https://github.com/FGA-GCES/Workshop-Docker-Entrega-01/tree/main/tutorial_docker) As etapas de 4 e 5 são relacionadas à configuração do pipeline de CI e CD. [Tutorial CI - Gitlab](https://github.com/FGA-GCES/Workshop-CI-Entrega-02/tree/main/gitlab-ci_tutorial) ## Containerização do Banco A versão inicial do sistema contém o metabase no backend cujo funcionamento requer uma instalação de um banco de dados Mongo. A primeira etapa do trabalho é de configurar um container somente para o banco de dados com as credenciais especificadas na descrição da aplicação e testar o funcionamento do mesmo. ## Containerização da aplicação + metabase Nesta etapa, tanto o a aplicação python quanto o metabase/banco deverão estar funcionando em containers individuais. Deverá ser utilizado um orquestrador (Docker Compose) para gerenciar comunicação entre os containers além do uso de credenciais, networks, volumes, entre outras configurações necessárias para a correta execução da aplicação. ## Gestão de dependencias e pacotes python Configurar o gerenciador de dependencias e pacotes python, o poetry, para gerar um pacote pip da solução. Publicar a biblioteca https://python-poetry.org ## Documentação automatizada Gerar a documentação da biblioteca de forma automatizada utilizando o doxygen para gerar informacoes da biblioteca e o sphinx para criar documentação https://www.sphinx-doc.org ## Integração Contínua (CI) Para a realização desta etapa, a aplicação já deverá ter seu ambiente completamente containerizado. Deverá ser utilizada uma ferramenta de Integração Contínua para garantir o build, os testes e o deploy para o https://pypi.org . Esta etapa do trabalho poderá ser realizada utilizado os ambientes de CI do GitLab-CI ou Github Actions. Requisitos da configuração da Integração Contínua (Gitlab ou Github) incluem: Build (Poetry) Test - unitários Lint - Documentação (sphinx) ## Avaliação A avaliação do trabalho será feita à partir da correta implementação de cada etapa. A avaliação será feita de maneira **quantitativa** (se foi realizado a implementação + documentação), e **qualitativa** (como foi implementado, entendimento dos conceitos na prática, complexidade da solução). Para isso, faça os **commits atômicos, bem documentados, completos** a fim de facilitar o entendimento e avaliação do seu trabalho. Lembrando o trabalho é individual. **Observações**: 1. A data final de entrega do trabalho é o dia 28/01/2023; 2. O trabalho deve ser desenvolvido em um **repositório PESSOAL e PRIVADO** que deverá ser tornado público somente após a data de entrega do trabalho (no dia 28/01/2023); 3. Cada etapa do trabalho deverá ser entregue em commits progressivos (pendendo ser mais de um commit por etapa); 4. Os **commits devem estar espaçados em dias ao longo do desenvolvimento do trabalho**. Commits feitos todos juntos na data de entrega não serão descontados da nota final. | Item | Peso | |---|---| | 1. Containerização do Banco | 1.0 | | 2. Containerização da biblioteca + Banco | 1.5 | | 3. Publicação da biblioteca | 1.5 | | 4. Documentação automatiza | 1.5 | | 5. Integração Contínua (Build, Test, Lint, documentacao) | 3.0 | | 6. Deploy Contínuo | 1.5 | ## Exemplo de Trabalhos Anteriores Alguns trabalhos de trabalhos anteriores: - [2020/2](https://github.com/FGA-GCES/Trabalho-Individual-2020-2) - [2021/1](https://github.com/FGA-GCES/Workshop-Docker-Entrega-01) - [2021/2](https://github.com/FGA-GCES/Trabalho-Individual-2021-2) ### Requisitos de instação ``` python -m venv env source env/bin/activate pip install -r requirements.txt ``` ### Rodando a aplicação ``` python src/main.py ``` ### Testando ``` pytest --cov ``` ### Metabase O metabase ajuda a visualizar e a modelar o processamento dos dados, a engenharia de features e monitoramento do modelo. | Keywords | Descrição | |-----------|-------------| | CSV | Um arquivo CSV é um arquivo de texto simples que armazena informações de tabelas e planilhas. Os arquivos CSV podem ser facilmente importados e exportados usando programas que armazenam dados em tabelas.| | Collection (coleção)| Uma coleção é um agrupamento de documentos do MongoDB. Os documentos dentro de uma coleção podem ter campos diferentes. Uma coleção é o equivalente a uma tabela em um sistema de banco de dados relacional.| | Database | Um banco de dados armazena uma ou mais coleções de documentos.| | Mongo| É um banco de dados NoSQL desenvolvido pela MongoDB Inc. O banco de dados MongoDB foi criado para armazenar uma grande quantidade de dados e também executar rapidamente.| **Connect the database to the metabase** - step 1: Open localhost:3000 - step 2: Click Admin setting - step 3: Click Database - step 4: Adicione os dados de autenticação de banco de dados **Exemplo da conexão mongo metabase** | metabase | credential | |------------|-------------| | host | mongo | |dabase_name | use the name you define in make migrate| | user | lappis | | password | lappis |
2022-2-gces-ifpf
/2022_2_gces_ifpf-0.3.0.tar.gz/2022_2_gces_ifpf-0.3.0/README.md
README.md
# -*- coding: utf-8 -*- from setuptools import setup packages = \ ['src', 'src.data_pipeline', 'src.data_pipeline.feature_engineering', 'src.data_pipeline.pre_processing', 'src.parser'] package_data = \ {'': ['*'], 'src': ['yamls/*']} install_requires = \ ['Jinja2>=3.1.2,<4.0.0', 'MarkupSafe>=2.1.1,<3.0.0', 'Pillow>=9.4.0,<10.0.0', 'PyYAML>=6.0,<7.0', 'altair>=4.2.0,<5.0.0', 'attrs>=22.2.0,<23.0.0', 'bpemb>=0.3.4,<0.4.0', 'certifi>=2022.12.7,<2023.0.0', 'charset-normalizer>=2.1.1,<3.0.0', 'contourpy>=1.0.6,<2.0.0', 'coverage>=7.0.2,<8.0.0', 'cycler>=0.11.0,<0.12.0', 'entrypoints>=0.4,<0.5', 'exceptiongroup>=1.1.0,<2.0.0', 'fonttools>=4.38.0,<5.0.0', 'gensim>=3.8.3,<4.0.0', 'idna>=3.4,<4.0', 'importlib-resources>=5.10.2,<6.0.0', 'iniconfig>=1.1.1,<2.0.0', 'joblib>=1.2.0,<2.0.0', 'jsonschema>=4.17.3,<5.0.0', 'kiwisolver>=1.4.4,<2.0.0', 'matplotlib>=3.6.2,<4.0.0', 'numpy>=1.24.1,<2.0.0', 'packaging>=22.0,<23.0', 'pandas>=1.5.2,<2.0.0', 'pkgutil-resolve-name>=1.3.10,<2.0.0', 'pluggy>=1.0.0,<2.0.0', 'pyparsing>=3.0.9,<4.0.0', 'pyrsistent>=0.19.3,<0.20.0', 'python-dateutil>=2.8.2,<3.0.0', 'pytz>=2022.7,<2023.0', 'requests>=2.28.1,<3.0.0', 'scikit-learn>=1.2.0,<2.0.0', 'scipy>=1.9.3,<2.0.0', 'sentencepiece>=0.1.97,<0.2.0', 'six>=1.16.0,<2.0.0', 'smart-open>=6.3.0,<7.0.0', 'threadpoolctl>=3.1.0,<4.0.0', 'tomli>=2.0.1,<3.0.0', 'toolz>=0.12.0,<0.13.0', 'tqdm>=4.64.1,<5.0.0', 'urllib3>=1.26.13,<2.0.0', 'whatlies>=0.7.0,<0.8.0', 'zipp>=3.11.0,<4.0.0'] setup_kwargs = { 'name': '2022-2-gces-ifpf', 'version': '0.3.0', 'description': '', 'long_description': '# Trabalho individual de GCES 2022-2\n\n\nOs conhecimentos de Gestão de Configuração de Software são fundamentais no ciclo de vida de um produto de software. As técnicas para a gestão vão desde o controle de versão, automação de build e de configuração de ambiente, testes automatizados, isolamento do ambiente até o deploy do sistema. Todo este ciclo nos dias de hoje são integrados em um pipeline de DevOps com as etapas de Integração Contínua (CI) e Deploy Contínuo (CD) implementadas e automatizada.\n\nPara exercitar estes conhecimentos, neste trabalho, você deverá aplicar os conceitos estudados ao longo da disciplina no produto de software contido neste repositório.\n\nO sistema se trata de uma biblioteca python para executar pipelines de dados de forma customizável em bancos de dados.\n\nPara executar a aplicação em sua máquina, basta seguir o passo-a-passo descritos abaixo.\n\n# Resumo da aplicação \n\n A biblioteca desenvolvida auxilia desenvolvedores a explorar os dados com funções essenciais para a identificação de outliers e anomalias e uma interface que auxilia a visualizar as informações de acordo com o arquivo de configuração.\n\n A biblioteca recebe um arquivo yaml com as configurações de cada etapa do pipeline de dados, e do endereço do banco de dados.\n Após a execução do banco de dados, o banco de dados de dados é atualizado com os resultados da análise e os resultados podem ser visualizados por meio de dashboards no metabase.\n\n # Etapas do Trabalho\n\n O trabalho deve ser elaborado através de etapas. Cada uma das etapas deve ser realizada em um commit separado com o resultado funcional desta etapa.\n\nAs etapas de 1 a 3 são relacionadas ao isolamento do ambiente utilizando a ferramenta Docker e Docker Compose. Neste sentido o tutorial abaixo cobre os conceitos fundamentais para o uso destas tecnologias.\n\n[Tutorial de Docker](https://github.com/FGA-GCES/Workshop-Docker-Entrega-01/tree/main/tutorial_docker)\n\nAs etapas de 4 e 5 são relacionadas à configuração do pipeline de CI e CD.\n\n[Tutorial CI - Gitlab](https://github.com/FGA-GCES/Workshop-CI-Entrega-02/tree/main/gitlab-ci_tutorial)\n\n\n## Containerização do Banco\n\n\nA versão inicial do sistema contém o metabase no backend cujo funcionamento requer uma instalação de um banco de dados Mongo. A primeira etapa do trabalho é de configurar um container somente para o banco de dados com as credenciais especificadas na descrição da aplicação e testar o funcionamento do mesmo.\n\n## Containerização da aplicação + metabase\n\nNesta etapa, tanto o a aplicação python quanto o metabase/banco deverão estar funcionando em containers individuais.\n\nDeverá ser utilizado um orquestrador (Docker Compose) para gerenciar comunicação entre os containers além do uso de credenciais, networks, volumes, entre outras configurações necessárias para a correta execução da aplicação.\n\n## Gestão de dependencias e pacotes python\n\nConfigurar o gerenciador de dependencias e pacotes python, o poetry, para gerar um pacote pip da solução. Publicar a biblioteca\n\nhttps://python-poetry.org\n\n## Documentação automatizada\n\nGerar a documentação da biblioteca de forma automatizada utilizando o doxygen para gerar informacoes da biblioteca e o sphinx para criar documentação https://www.sphinx-doc.org\n\n\n\n## Integração Contínua (CI)\n\nPara a realização desta etapa, a aplicação já deverá ter seu ambiente completamente containerizado.\n\nDeverá ser utilizada uma ferramenta de Integração Contínua para garantir o build, os testes e o deploy para o https://pypi.org .\n\nEsta etapa do trabalho poderá ser realizada utilizado os ambientes de CI do GitLab-CI ou Github Actions.\n\nRequisitos da configuração da Integração Contínua (Gitlab ou Github) incluem:\n\nBuild (Poetry)\nTest - unitários\nLint - \nDocumentação (sphinx)\n\n\n## Avaliação\n\nA avaliação do trabalho será feita à partir da correta implementação de cada etapa. A avaliação será feita de maneira **quantitativa** (se foi realizado a implementação + documentação), e **qualitativa** (como foi implementado, entendimento dos conceitos na prática, complexidade da solução). Para isso, faça os **commits atômicos, bem documentados, completos** a fim de facilitar o entendimento e avaliação do seu trabalho. Lembrando o trabalho é individual.\n\n**Observações**: \n1. A data final de entrega do trabalho é o dia 28/01/2023;\n2. O trabalho deve ser desenvolvido em um **repositório PESSOAL e PRIVADO** que deverá ser tornado público somente após a data de entrega do trabalho (no dia 28/01/2023);\n3. Cada etapa do trabalho deverá ser entregue em commits progressivos (pendendo ser mais de um commit por etapa);\n4. Os **commits devem estar espaçados em dias ao longo do desenvolvimento do trabalho**. Commits feitos todos juntos na data de entrega não serão descontados da nota final.\n\n| Item | Peso |\n|---|---|\n| 1. Containerização do Banco | 1.0 |\n| 2. Containerização da biblioteca + Banco | 1.5 |\n| 3. Publicação da biblioteca | 1.5 |\n| 4. Documentação automatiza | 1.5 |\n| 5. Integração Contínua (Build, Test, Lint, documentacao) | 3.0 |\n| 6. Deploy Contínuo | 1.5 |\n\n\n## Exemplo de Trabalhos Anteriores\n\nAlguns trabalhos de trabalhos anteriores:\n\n- [2020/2](https://github.com/FGA-GCES/Trabalho-Individual-2020-2)\n- [2021/1](https://github.com/FGA-GCES/Workshop-Docker-Entrega-01)\n- [2021/2](https://github.com/FGA-GCES/Trabalho-Individual-2021-2)\n\n\n\n### Requisitos de instação\n\n```\npython -m venv env\nsource env/bin/activate\npip install -r requirements.txt\n```\n\n### Rodando a aplicação\n\n```\npython src/main.py\n```\n\n### Testando\n\n```\npytest --cov\n```\n\n### Metabase\n\nO metabase ajuda a visualizar e a modelar o processamento dos dados, a engenharia de features e monitoramento do modelo.\n\n\n\n| Keywords | Descrição |\n|-----------|-------------|\n| CSV | Um arquivo CSV é um arquivo de texto simples que armazena informações de tabelas e planilhas. Os arquivos CSV podem ser facilmente importados e exportados usando programas que armazenam dados em tabelas.|\n| Collection (coleção)| Uma coleção é um agrupamento de documentos do MongoDB. Os documentos dentro de uma coleção podem ter campos diferentes. Uma coleção é o equivalente a uma tabela em um sistema de banco de dados relacional.|\n| Database | Um banco de dados armazena uma ou mais coleções de documentos.|\n| Mongo| É um banco de dados NoSQL desenvolvido pela MongoDB Inc. O banco de dados MongoDB foi criado para armazenar uma grande quantidade de dados e também executar rapidamente.|\n\n\n\n**Connect the database to the metabase**\n\n- step 1: Open localhost:3000\n- step 2: Click Admin setting\n- step 3: Click Database\n- step 4: Adicione os dados de autenticação de banco de dados \n\n\n**Exemplo da conexão mongo metabase**\n| metabase | credential |\n|------------|-------------|\n| host | mongo |\n|dabase_name | use the name you define in make migrate|\n| user | lappis |\n| password | lappis |\n\n', 'author': 'IanFPFerreira', 'author_email': 'ianfillipe@gmail.com', 'maintainer': 'None', 'maintainer_email': 'None', 'url': 'None', 'packages': packages, 'package_data': package_data, 'install_requires': install_requires, 'python_requires': '>=3.9,<4.0', } setup(**setup_kwargs)
2022-2-gces-ifpf
/2022_2_gces_ifpf-0.3.0.tar.gz/2022_2_gces_ifpf-0.3.0/setup.py
setup.py
import os from parser.YAML_parser import YAMLParser from parser.feature_engineering_parser import FeatureEngineeringParser from parser.model_parser import ModelParser if __name__ != "__main__": exit() def get_config(): initialParser = YAMLParser featureEngineringParser = FeatureEngineeringParser modelParser = ModelParser for file in os.listdir('src/yamls'): filepath = os.path.join('src/yamls', file) config = initialParser(filepath).parse() features_configs, columns_set_alias = featureEngineringParser(filepath).parse(config['feature_engineering']) del config['feature_engineering'] model_configs = modelParser(columns_set_alias).parse(config['model']) del config['model'] print("FEATURES") print(features_configs) print(3 * '\n') print(20 * '-') print(3 * '\n') print(model_configs) get_config()
2022-2-gces-ifpf
/2022_2_gces_ifpf-0.3.0.tar.gz/2022_2_gces_ifpf-0.3.0/src/main.py
main.py
from whatlies.language import BytePairLanguage class WordEmbedding: def __init__(self, lang, dimensions): """Initialize a word embedding object using the BytePairLanguage model. Parameters ---------- lang: str The language to use for the word embedding (default is "es") dimensions: str The number of dimensions for the word embedding vectors (default is 25) """ self.bpl = BytePairLanguage(lang=lang, dim=dimensions) def get_embedding(self, text): """Get the word embedding vector for a given text. Parameters ---------- text: str The string to be processed Returns ---------- arr[float] A word embedding vector for the given text Examples -------- >>> get_embedding("This is a text", "es", 25) [ 0.06799883 0.17547965 0.47599664 0.16108984 -0.1360625 -0.10632467 -0.10654568 -0.09805 -0.33004168 -0.33528003 -0.23304085 0.36661038 -0.5797167 0.53252834 0.30276018 -0.01584417 0.85087484 0.14121284 0.74862367 -0.33011952 0.015432 0.02694534 0.10118082 -0.34017918 -0.14560167] """ return self.bpl[text].vector
2022-2-gces-ifpf
/2022_2_gces_ifpf-0.3.0.tar.gz/2022_2_gces_ifpf-0.3.0/src/data_pipeline/feature_engineering/word_embedding.py
word_embedding.py
from statistics import mean class KeySmash: """A class for calculating metrics to indicate key smashing behavior in a text. Key smashing is the act of typing on a keyboard in a rapid and uncontrolled manner, often resulting in a series of random characters being entered into a document or text field. """ def __init__(self): self.char_sets = { "vowels": 'aeiouáéíóúãõ', "consonants": 'bcdfghjklmnñpqrstvwxyz', "special_characters": '!@#$%^¨|\'\"&*()_+:;~`´]}{[}ºª=-.¿¡' } def calculate_char_frequency_metric(self, text): """ Calculate the Char Frequency Metric. Parameters ---------- text : str The text to use for the calculation. Returns ------- float Char Frequency Metric. Examples -------- >>> calculate_char_frequency_metric("PUENTECILLA KM. 1.7") 1.121212121212121 >>> calculate_char_frequency_metric("ASDASD XXXX") 3.0 """ word_results = [] for w in text.split(' '): char_count = [] if w and len(w) > 0: for e in set(w): char_count.append(w.count(e)**2) word_results.append(sum(char_count) / len(w)) if word_results == 0 or len(word_results) == 0: return 0 else: return mean(word_results) def calculate_irregular_sequence_metric(self, text, opt): """ Calculate the Irregular Sequence Metric. Parameters ---------- text : str The text to use for the calculation. opt : str The type of characters to consider for the calculation, can be one of 'vowels', 'consonants', or 'special_characters'. Returns ------- float Irregular Sequence Metric. Examples -------- >>> calculate_irregular_sequence_metric("PUENTECILLA KM. 1.7", "vowels") 0.21052631578947367 >>> calculate_irregular_sequence_metric("ASDASD XXXX", "consonants") 2.1818181818181817 >>> calculate_irregular_sequence_metric("!@#$% ASDFGHJKL", "special_characters") 1.5625 """ count_sequence = 1 sequence_regex = [] text = str(text).lower() opt = self.char_sets[opt] for i in range(len(text) - 1): if text[i] in opt and text[i + 1] in opt: count_sequence = count_sequence + 1 else: if (count_sequence != 1): sequence_regex.append(count_sequence**2) count_sequence = 1 if (count_sequence != 1): sequence_regex.append(count_sequence**2) return sum(sequence_regex) / len(text) def calculate_number_count_metric(self, text): """ Calculate the Number Count Metric. Parameters ---------- text : str The text field to use for the calculation. Returns ------- float Number Count Metric. Examples -------- >>> calculate_number_count_metric("ABC 123 !@#") 0.0 >>> calculate_number_count_metric("ABC123 !@#") 0.9 """ text_list = text.split() calc_num_line = 0 if text_list: for word in text_list: if any(char.isdigit() for char in word) and any(not char.isdigit() for char in word): num = len([char for char in word if char.isdigit()]) calc_num = num**2 calc_num_line += calc_num return calc_num_line / len(' '.join(text_list)) return 0
2022-2-gces-ifpf
/2022_2_gces_ifpf-0.3.0.tar.gz/2022_2_gces_ifpf-0.3.0/src/data_pipeline/feature_engineering/key_smash.py
key_smash.py
from pandas import DataFrame def get_concatenated_column(csv, columns, column_name): if (type(columns) == str): csv[column_name] = csv[columns] return DataFrame(csv[column_name]) for value in columns: if (not (column_name in csv)): csv[column_name] = csv[value].astype(str) continue csv[column_name] = csv[column_name] + ' ' + csv[value].astype(str) return DataFrame(csv[column_name])
2022-2-gces-ifpf
/2022_2_gces_ifpf-0.3.0.tar.gz/2022_2_gces_ifpf-0.3.0/src/data_pipeline/pre_processing/concatenate_columns.py
concatenate_columns.py
from parser.parser_base import ParserBase class FeatureEngineeringParser(ParserBase): def parse(self, data: list): return self._parse_feature_engineering_configs(data) def _parse_feature_engineering_configs(self, data: list): if (not data): return configs = [] columns_set_alias = [] for inputs in data: input = self._try_get(inputs, 'input') # columns columns_set, columns_alias = self._get_dataframe(self._try_get(input, 'columns')) columns_set_alias = columns_alias + columns_set_alias # features word_embedding, keyboard_smash = self._get_features_details(self._try_get(input, 'features')) data_lang, dimensions = self._get_word_embedding_config(word_embedding, columns_set_alias) # Enabled features enabled_features = keyboard_smash if (not dimensions): enabled_features['word_embedding'] = False else: enabled_features['word_embedding'] = True configs.append({ 'columns_alias': columns_alias, 'columns_set': columns_set, 'data_lang': data_lang, 'dimensions': dimensions, 'enabled_features': enabled_features }) return configs, columns_set_alias def _get_dataframe(self, columns: dict): if (not columns): return columns_alias = [] for column in columns: for key in column.keys(): columns_alias.append(key) return columns, columns_alias def _get_features_details(self, features: dict): if (not features): return word_embedding = self._try_get(features, 'word_embedding') if (word_embedding == 'off'): word_embedding = False keyboard_smash = self._get_keyboard_smash_config(features) return word_embedding, keyboard_smash def _get_word_embedding_config(self, feature: dict, columns_alias: list): if (not feature): return 'es', None data_lang = self._get(feature, 'data_lang', 'es') if ('data_lang' in feature): del feature['data_lang'] dimensions = {} dimensions_default_value = 25 for key, item in feature.items(): if (not (key in columns_alias)): error_msg = f'Label {key} not match' raise ValueError(error_msg) dimensions[key] = self._get(item, 'dimensions', dimensions_default_value) for name in columns_alias: if (not (name in dimensions)): dimensions[name] = dimensions_default_value return data_lang, dimensions def _get_keyboard_smash_config(self, features: dict): keyboard_smash_default_value = { 'ksmash_sequence_vowels': True, 'ksmash_sequence_consonants': True, 'ksmash_sequence_special_characters': True, 'ksmash_numbers': True, 'ksmash_char_frequence': True } keyboard_smash = self._get(features, 'keyboard_smash', keyboard_smash_default_value) if (keyboard_smash == keyboard_smash_default_value): return keyboard_smash for key in keyboard_smash.keys(): if (key in keyboard_smash_default_value and keyboard_smash[key] == 'off'): keyboard_smash_default_value[key] = False return keyboard_smash_default_value
2022-2-gces-ifpf
/2022_2_gces_ifpf-0.3.0.tar.gz/2022_2_gces_ifpf-0.3.0/src/parser/feature_engineering_parser.py
feature_engineering_parser.py
model_type = { 'ADDRESS': 'address' }
2022-2-gces-ifpf
/2022_2_gces_ifpf-0.3.0.tar.gz/2022_2_gces_ifpf-0.3.0/src/parser/const.py
const.py
class ParserBase(): def __init__(self, filepath='src/yamls/config.yaml'): self.filepath = filepath def _try_get(self, variable: dict, field, error_msg=None): try: return variable[field] except KeyError: if not error_msg: error_msg = f'the field `{field}` is required.' file_name = self.filepath.split('/')[-1] error_msg = f'Error in file {file_name}: {error_msg}' raise ValueError(error_msg) def _get(self, variable: dict, field, default_value): try: return variable[field] except KeyError: return default_value
2022-2-gces-ifpf
/2022_2_gces_ifpf-0.3.0.tar.gz/2022_2_gces_ifpf-0.3.0/src/parser/parser_base.py
parser_base.py
import yaml from parser.parser_base import ParserBase class YAMLParser(ParserBase): def parse(self): return self._parse_yaml() def _parse_yaml(self): with open(self.filepath, 'r') as file: dag_config_dict = yaml.safe_load(file) dag = self._try_get(dag_config_dict, 'dag') initial_parser = { "dag_id": self._try_get(dag, 'id'), "data_path": self._try_get(dag, 'data_path'), "output_folder": self._try_get(dag, 'output_folder'), "description": self._try_get(dag, 'description'), "feature_engineering": self._try_get(dag, 'feature_engineering'), "model": self._try_get(dag, 'model'), } return initial_parser
2022-2-gces-ifpf
/2022_2_gces_ifpf-0.3.0.tar.gz/2022_2_gces_ifpf-0.3.0/src/parser/YAML_parser.py
YAML_parser.py
from parser.parser_base import ParserBase from parser.const import model_type class ModelParser(ParserBase): def __init__(self, columns_alias): self.columns_alias = columns_alias self.default_keyboard_smash_values = { 'ksmash_sequence_vowels': 1.00, 'ksmash_sequence_consonants': 1.999, 'ksmash_sequence_special_characters': 2.2499, 'ksmash_numbers': 2.9, 'ksmash_char_frequence': 2.78 } def parse(self, data: list): return self._parse_modal_configs(data) def _parse_modal_configs(self, data: list): if (not data): return random_forest = data.get('random_forest') if (random_forest): return self.get_random_forest_address_config(random_forest) def get_random_forest_address_config(self, model: list): configs = [] for inputs in model: input = self._try_get(inputs, 'input', 'The inputs should be specified') type = self._try_get(input, 'type') if (type == model_type['ADDRESS']): columns_set_alias = self.get_columns(input) keyboard_smash, n_estimators, test_size = self.get_thresholds(input, columns_set_alias) configs.append({ 'model': 'keyboard_smash', 'type': model_type['ADDRESS'], 'columns_set_alias': columns_set_alias, 'keyboard_smash': keyboard_smash, 'n_estimators': n_estimators, 'test_size': test_size }) return configs def get_columns(self, input): columns_set_alias = self._try_get(input, 'columns') for alias in columns_set_alias: if (not (alias in self.columns_alias)): raise ValueError(f'`{alias}` column not match with the available columns') return columns_set_alias def get_thresholds(self, input, columns_set_alias): thresholds = self._try_get(input, 'thresholds') test_size = self._get(thresholds, 'test_size', 0.3) n_estimators = self._get(thresholds, 'n_estimators', 100) keyboard_smash_default = self.get_keyboard_smash_default_thresholds(columns_set_alias) keyboard_smash = self._get(thresholds, 'keyboard_smash', keyboard_smash_default) for key in keyboard_smash.keys(): if (not (key in columns_set_alias)): raise ValueError( f'`{key}` key not match with the available columns') for alias in columns_set_alias: if (not (alias in keyboard_smash.keys())): keyboard_smash.append( {alias: self.default_keyboard_smash_values}) return keyboard_smash, n_estimators, test_size def get_keyboard_smash_default_thresholds(self, columns_set_alias): default_config = [] for alias in columns_set_alias: default_config.append({alias: self.default_keyboard_smash_values}) return default_config
2022-2-gces-ifpf
/2022_2_gces_ifpf-0.3.0.tar.gz/2022_2_gces_ifpf-0.3.0/src/parser/model_parser.py
model_parser.py
from setuptools import setup, find_packages setup( name="2022_assignment1_ITIS", version="0.1", description="assignment 1", long_description="assignment 1, Gruppo ITIS", long_description_content_type='text/x-rst', url="https://gitlab.com/magni5/2022_assignment1_itis.git", author="Gruppo ITIS", packages=find_packages(where="src"), python_requires='>=3', )
2022-assignment1-ITIS
/2022_assignment1_ITIS-0.1.tar.gz/2022_assignment1_ITIS-0.1/setup.py
setup.py
from setuptools import setup setup(name='2022_distributions', version='0.1', description='Gaussian and Binomial distributions', packages=['2022_distributions'], author = 'Jonathan Koefman', author_email = 'jkoefman@outlook.com', zip_safe=False)
2022-distributions
/2022_distributions-0.1.tar.gz/2022_distributions-0.1/setup.py
setup.py
import math import matplotlib.pyplot as plt from .Generaldistribution import Distribution class Gaussian(Distribution): """ Gaussian distribution class for calculating and visualizing a Gaussian distribution. Attributes: mean (float) representing the mean value of the distribution stdev (float) representing the standard deviation of the distribution data_list (list of floats) a list of floats extracted from the data file """ def __init__(self, mu=0, sigma=1): Distribution.__init__(self, mu, sigma) def calculate_mean(self): """Function to calculate the mean of the data set. Args: None Returns: float: mean of the data set """ avg = 1.0 * sum(self.data) / len(self.data) self.mean = avg return self.mean def calculate_stdev(self, sample=True): """Function to calculate the standard deviation of the data set. Args: sample (bool): whether the data represents a sample or population Returns: float: standard deviation of the data set """ if sample: n = len(self.data) - 1 else: n = len(self.data) mean = self.calculate_mean() sigma = 0 for d in self.data: sigma += (d - mean) ** 2 sigma = math.sqrt(sigma / n) self.stdev = sigma return self.stdev def plot_histogram(self): """Function to output a histogram of the instance variable data using matplotlib pyplot library. Args: None Returns: None """ plt.hist(self.data) plt.title('Histogram of Data') plt.xlabel('data') plt.ylabel('count') def pdf(self, x): """Probability density function calculator for the gaussian distribution. Args: x (float): point for calculating the probability density function Returns: float: probability density function output """ return (1.0 / (self.stdev * math.sqrt(2*math.pi))) * math.exp(-0.5*((x - self.mean) / self.stdev) ** 2) def plot_histogram_pdf(self, n_spaces = 50): """Function to plot the normalized histogram of the data and a plot of the probability density function along the same range Args: n_spaces (int): number of data points Returns: list: x values for the pdf plot list: y values for the pdf plot """ mu = self.mean sigma = self.stdev min_range = min(self.data) max_range = max(self.data) # calculates the interval between x values interval = 1.0 * (max_range - min_range) / n_spaces x = [] y = [] # calculate the x values to visualize for i in range(n_spaces): tmp = min_range + interval*i x.append(tmp) y.append(self.pdf(tmp)) # make the plots fig, axes = plt.subplots(2,sharex=True) fig.subplots_adjust(hspace=.5) axes[0].hist(self.data, density=True) axes[0].set_title('Normed Histogram of Data') axes[0].set_ylabel('Density') axes[1].plot(x, y) axes[1].set_title('Normal Distribution for \n Sample Mean and Sample Standard Deviation') axes[0].set_ylabel('Density') plt.show() return x, y def __add__(self, other): """Function to add together two Gaussian distributions Args: other (Gaussian): Gaussian instance Returns: Gaussian: Gaussian distribution """ result = Gaussian() result.mean = self.mean + other.mean result.stdev = math.sqrt(self.stdev ** 2 + other.stdev ** 2) return result def __repr__(self): """Function to output the characteristics of the Gaussian instance Args: None Returns: string: characteristics of the Gaussian """ return "mean {}, standard deviation {}".format(self.mean, self.stdev)
2022-distributions
/2022_distributions-0.1.tar.gz/2022_distributions-0.1/2022_distributions/Gaussiandistribution.py
Gaussiandistribution.py
class Distribution: def __init__(self, mu=0, sigma=1): """ Generic distribution class for calculating and visualizing a probability distribution. Attributes: mean (float) representing the mean value of the distribution stdev (float) representing the standard deviation of the distribution data_list (list of floats) a list of floats extracted from the data file """ self.mean = mu self.stdev = sigma self.data = [] def read_data_file(self, file_name): """Function to read in data from a txt file. The txt file should have one number (float) per line. The numbers are stored in the data attribute. Args: file_name (string): name of a file to read from Returns: None """ with open(file_name) as file: data_list = [] line = file.readline() while line: data_list.append(int(line)) line = file.readline() file.close() self.data = data_list
2022-distributions
/2022_distributions-0.1.tar.gz/2022_distributions-0.1/2022_distributions/Generaldistribution.py
Generaldistribution.py
from .Gaussiandistribution import Gaussian from .Binomialdistribution import Binomial # TODO: import the Binomial class from the Binomialdistribution module
2022-distributions
/2022_distributions-0.1.tar.gz/2022_distributions-0.1/2022_distributions/__init__.py
__init__.py
import math import matplotlib.pyplot as plt from .Generaldistribution import Distribution class Binomial(Distribution): """ Binomial distribution class for calculating and visualizing a Binomial distribution. Attributes: mean (float) representing the mean value of the distribution stdev (float) representing the standard deviation of the distribution data_list (list of floats) a list of floats to be extracted from the data file p (float) representing the probability of an event occurring n (int) the total number of trials TODO: Fill out all TODOs in the functions below """ # A binomial distribution is defined by two variables: # the probability of getting a positive outcome # the number of trials # If you know these two values, you can calculate the mean and the standard deviation # # For example, if you flip a fair coin 25 times, p = 0.5 and n = 25 # You can then calculate the mean and standard deviation with the following formula: # mean = p * n # standard deviation = sqrt(n * p * (1 - p)) # def __init__(self, prob=.5, size=20): # TODO: store the probability of the distribution in an instance variable p self.p = prob # TODO: store the size of the distribution in an instance variable n self.n = size # TODO: Now that you know p and n, you can calculate the mean and standard deviation # Use the calculate_mean() and calculate_stdev() methods to calculate the # distribution mean and standard deviation # # Then use the init function from the Distribution class to initialize the # mean and the standard deviation of the distribution # # Hint: You need to define the calculate_mean() and calculate_stdev() methods # farther down in the code starting in line 55. # The init function can get access to these methods via the self # variable. self.mean = self.calculate_mean()#self.n * self.p #calculate_mean(self) self.stdev = self.calculate_stdev()#math.sqrt(self.n * self.p * (1-self.p))#calculate_stdev(self) Distribution.__init__(self, self.mean, self.stdev) def calculate_mean(self): """Function to calculate the mean from p and n Args: None Returns: float: mean of the data set """ # TODO: calculate the mean of the Binomial distribution. Store the mean # via the self variable and also return the new mean value self.mean = (self.n * self.p) return self.mean def calculate_stdev(self): """Function to calculate the standard deviation from p and n. Args: None Returns: float: standard deviation of the data set """ # TODO: calculate the standard deviation of the Binomial distribution. Store # the result in the self standard deviation attribute. Return the value # of the standard deviation. self.stdev = math.sqrt(self.n * self.p * (1-self.p)) return self.stdev def replace_stats_with_data(self): """Function to calculate p and n from the data set Args: None Returns: float: the p value float: the n value """ # TODO: The read_data_file() from the Generaldistribution class can read in a data # file. Because the Binomaildistribution class inherits from the Generaldistribution class, # you don't need to re-write this method. However, the method # doesn't update the mean or standard deviation of # a distribution. Hence you are going to write a method that calculates n, p, mean and # standard deviation from a data set and then updates the n, p, mean and stdev attributes. # Assume that the data is a list of zeros and ones like [0 1 0 1 1 0 1]. # # Write code that: # updates the n attribute of the binomial distribution # updates the p value of the binomial distribution by calculating the # number of positive trials divided by the total trials # updates the mean attribute # updates the standard deviation attribute # # Hint: You can use the calculate_mean() and calculate_stdev() methods # defined previously. self.n = len(self.data) self.p = self.data.count(1) / self.n self.mean = self.calculate_mean() self.stdev = self.calculate_stdev() return self.p, self.n def plot_bar(self): """Function to output a histogram of the instance variable data using matplotlib pyplot library. Args: None Returns: None """ # TODO: Use the matplotlib package to plot a bar chart of the data # The x-axis should have the value zero or one # The y-axis should have the count of results for each case # # For example, say you have a coin where heads = 1 and tails = 0. # If you flipped a coin 35 times, and the coin landed on # heads 20 times and tails 15 times, the bar chart would have two bars: # 0 on the x-axis and 15 on the y-axis # 1 on the x-axis and 20 on the y-axis # Make sure to label the chart with a title, x-axis label and y-axis label #plt.hist(self.data) plt.bar(x = ['0', '1'], height = [(1-self.p) * self.n, self.p * self.n]) plt.title("Bar chart of Coin Flips") plt.xlabel("Heads (1) or Tails (0)") plt.ylabel("Number of outcomes") plt.show() def pdf(self, k): """Probability density function calculator for the gaussian distribution. Args: k (float): point for calculating the probability density function Returns: float: probability density function output """ # TODO: Calculate the probability density function for a binomial distribution # For a binomial distribution with n trials and probability p, # the probability density function calculates the likelihood of getting # k positive outcomes. # # For example, if you flip a coin n = 60 times, with p = .5, # what's the likelihood that the coin lands on heads 40 out of 60 times? bicoef = math.factorial(self.n)/(math.factorial(k)*math.factorial(self.n - k)) mass = (self.p ** k)*(1-self.p)**(self.n - k) return bicoef * mass #pass def plot_bar_pdf(self): """Function to plot the pdf of the binomial distribution Args: None Returns: list: x values for the pdf plot list: y values for the pdf plot """ # TODO: Use a bar chart to plot the probability density function from # k = 0 to k = n # Hint: You'll need to use the pdf() method defined above to calculate the # density function for every value of k. # Be sure to label the bar chart with a title, x label and y label # This method should also return the x and y values used to make the chart # The x and y values should be stored in separate lists X = [i for i in range(0,self.n+1)] Y = [] for k in X: prob = self.pdf(k) Y.append(prob) #OR # for i in range(self.n+1) # X.append(i) # Y.append(self.pdf(i) plt.bar(X,Y) plt.title("Prob Density Function") plt.xlabel("k positive outcomes") plt.ylabel("Probablity of k in n outcomes") plt.show() return X, Y def __add__(self, other): """Function to add together two Binomial distributions with equal p Args: other (Binomial): Binomial instance Returns: Binomial: Binomial distribution """ try: assert self.p == other.p, 'p values are not equal' except AssertionError as error: raise # TODO: Define addition for two binomial distributions. Assume that the # p values of the two distributions are the same. The formula for # summing two binomial distributions with different p values is more complicated, # so you are only expected to implement the case for two distributions with equal p. # the try, except statement above will raise an exception if the p values are not equal # Hint: You need to instantiate a new binomial object with the correct n, p, # mean and standard deviation values. The __add__ method should return this # new binomial object. # When adding two binomial distributions, the p value remains the same # The new n value is the sum of the n values of the two distributions. sum_n = self.n + other.n binomial_sum = Binomial(self.p, sum_n) return binomial_sum def __repr__(self): """Function to output the characteristics of the Binomial instance Args: None Returns: string: characteristics of the Binomial """ # TODO: Define the representation method so that the output looks like # mean 5, standard deviation 4.5, p .8, n 20 # # with the values replaced by whatever the actual distributions values are # The method should return a string in the expected format combined = "mean {}, standard deviation {}, p {}, n {}".format(self.mean, self.stdev, self.p, self.n) return combined
2022-distributions
/2022_distributions-0.1.tar.gz/2022_distributions-0.1/2022_distributions/Binomialdistribution.py
Binomialdistribution.py
#!python """A command line tool for extracting text and images from PDF and output it to plain text, html, xml or tags.""" import argparse import logging import sys from typing import Any, Container, Iterable, List, Optional import pdfminer.high_level from pdfminer.layout import LAParams from pdfminer.utils import AnyIO logging.basicConfig() OUTPUT_TYPES = ((".htm", "html"), (".html", "html"), (".xml", "xml"), (".tag", "tag")) def float_or_disabled(x: str) -> Optional[float]: if x.lower().strip() == "disabled": return None try: return float(x) except ValueError: raise argparse.ArgumentTypeError("invalid float value: {}".format(x)) def extract_text( files: Iterable[str] = [], outfile: str = "-", laparams: Optional[LAParams] = None, output_type: str = "text", codec: str = "utf-8", strip_control: bool = False, maxpages: int = 0, page_numbers: Optional[Container[int]] = None, password: str = "", scale: float = 1.0, rotation: int = 0, layoutmode: str = "normal", output_dir: Optional[str] = None, debug: bool = False, disable_caching: bool = False, **kwargs: Any ) -> AnyIO: if not files: raise ValueError("Must provide files to work upon!") if output_type == "text" and outfile != "-": for override, alttype in OUTPUT_TYPES: if outfile.endswith(override): output_type = alttype if outfile == "-": outfp: AnyIO = sys.stdout if sys.stdout.encoding is not None: codec = "utf-8" else: outfp = open(outfile, "wb") for fname in files: with open(fname, "rb") as fp: pdfminer.high_level.extract_text_to_fp(fp, **locals()) return outfp def parse_args(args: Optional[List[str]]) -> argparse.Namespace: parser = argparse.ArgumentParser(description=__doc__, add_help=True) parser.add_argument( "files", type=str, default=None, nargs="+", help="One or more paths to PDF files.", ) parser.add_argument( "--version", "-v", action="version", version="pdfminer.six v{}".format(pdfminer.__version__), ) parser.add_argument( "--debug", "-d", default=False, action="store_true", help="Use debug logging level.", ) parser.add_argument( "--disable-caching", "-C", default=False, action="store_true", help="If caching or resources, such as fonts, should be disabled.", ) parse_params = parser.add_argument_group( "Parser", description="Used during PDF parsing" ) parse_params.add_argument( "--page-numbers", type=int, default=None, nargs="+", help="A space-seperated list of page numbers to parse.", ) parse_params.add_argument( "--pagenos", "-p", type=str, help="A comma-separated list of page numbers to parse. " "Included for legacy applications, use --page-numbers " "for more idiomatic argument entry.", ) parse_params.add_argument( "--maxpages", "-m", type=int, default=0, help="The maximum number of pages to parse.", ) parse_params.add_argument( "--password", "-P", type=str, default="", help="The password to use for decrypting PDF file.", ) parse_params.add_argument( "--rotation", "-R", default=0, type=int, help="The number of degrees to rotate the PDF " "before other types of processing.", ) la_params = LAParams() # will be used for defaults la_param_group = parser.add_argument_group( "Layout analysis", description="Used during layout analysis." ) la_param_group.add_argument( "--no-laparams", "-n", default=False, action="store_true", help="If layout analysis parameters should be ignored.", ) la_param_group.add_argument( "--detect-vertical", "-V", default=la_params.detect_vertical, action="store_true", help="If vertical text should be considered during layout analysis", ) la_param_group.add_argument( "--line-overlap", type=float, default=la_params.line_overlap, help="If two characters have more overlap than this they " "are considered to be on the same line. The overlap is specified " "relative to the minimum height of both characters.", ) la_param_group.add_argument( "--char-margin", "-M", type=float, default=la_params.char_margin, help="If two characters are closer together than this margin they " "are considered to be part of the same line. The margin is " "specified relative to the width of the character.", ) la_param_group.add_argument( "--word-margin", "-W", type=float, default=la_params.word_margin, help="If two characters on the same line are further apart than this " "margin then they are considered to be two separate words, and " "an intermediate space will be added for readability. The margin " "is specified relative to the width of the character.", ) la_param_group.add_argument( "--line-margin", "-L", type=float, default=la_params.line_margin, help="If two lines are close together they are considered to " "be part of the same paragraph. The margin is specified " "relative to the height of a line.", ) la_param_group.add_argument( "--boxes-flow", "-F", type=float_or_disabled, default=la_params.boxes_flow, help="Specifies how much a horizontal and vertical position of a " "text matters when determining the order of lines. The value " "should be within the range of -1.0 (only horizontal position " "matters) to +1.0 (only vertical position matters). You can also " "pass `disabled` to disable advanced layout analysis, and " "instead return text based on the position of the bottom left " "corner of the text box.", ) la_param_group.add_argument( "--all-texts", "-A", default=la_params.all_texts, action="store_true", help="If layout analysis should be performed on text in figures.", ) output_params = parser.add_argument_group( "Output", description="Used during output generation." ) output_params.add_argument( "--outfile", "-o", type=str, default="-", help="Path to file where output is written. " 'Or "-" (default) to write to stdout.', ) output_params.add_argument( "--output_type", "-t", type=str, default="text", help="Type of output to generate {text,html,xml,tag}.", ) output_params.add_argument( "--codec", "-c", type=str, default="utf-8", help="Text encoding to use in output file.", ) output_params.add_argument( "--output-dir", "-O", default=None, help="The output directory to put extracted images in. If not given, " "images are not extracted.", ) output_params.add_argument( "--layoutmode", "-Y", default="normal", type=str, help="Type of layout to use when generating html " "{normal,exact,loose}. If normal,each line is" " positioned separately in the html. If exact" ", each character is positioned separately in" " the html. If loose, same result as normal " "but with an additional newline after each " "text line. Only used when output_type is html.", ) output_params.add_argument( "--scale", "-s", type=float, default=1.0, help="The amount of zoom to use when generating html file. " "Only used when output_type is html.", ) output_params.add_argument( "--strip-control", "-S", default=False, action="store_true", help="Remove control statement from text. " "Only used when output_type is xml.", ) parsed_args = parser.parse_args(args=args) # Propagate parsed layout parameters to LAParams object if parsed_args.no_laparams: parsed_args.laparams = None else: parsed_args.laparams = LAParams( line_overlap=parsed_args.line_overlap, char_margin=parsed_args.char_margin, line_margin=parsed_args.line_margin, word_margin=parsed_args.word_margin, boxes_flow=parsed_args.boxes_flow, detect_vertical=parsed_args.detect_vertical, all_texts=parsed_args.all_texts, ) if parsed_args.page_numbers: parsed_args.page_numbers = {x - 1 for x in parsed_args.page_numbers} if parsed_args.pagenos: parsed_args.page_numbers = {int(x) - 1 for x in parsed_args.pagenos.split(",")} if parsed_args.output_type == "text" and parsed_args.outfile != "-": for override, alttype in OUTPUT_TYPES: if parsed_args.outfile.endswith(override): parsed_args.output_type = alttype return parsed_args def main(args: Optional[List[str]] = None) -> int: parsed_args = parse_args(args) outfp = extract_text(**vars(parsed_args)) outfp.close() return 0 if __name__ == "__main__": sys.exit(main())
20220429-pdfminer-jameslp310
/20220429_pdfminer_jameslp310-0.0.2-py3-none-any.whl/20220429_pdfminer_jameslp310-0.0.2.data/scripts/pdf2txt.py
pdf2txt.py
#!python """Extract pdf structure in XML format""" import logging import os.path import re import sys from typing import Any, Container, Dict, Iterable, List, Optional, TextIO, Union, cast from argparse import ArgumentParser import pdfminer from pdfminer.pdfdocument import PDFDocument, PDFNoOutlines, PDFXRefFallback from pdfminer.pdfpage import PDFPage from pdfminer.pdfparser import PDFParser from pdfminer.pdftypes import PDFObjectNotFound, PDFValueError from pdfminer.pdftypes import PDFStream, PDFObjRef, resolve1, stream_value from pdfminer.psparser import PSKeyword, PSLiteral, LIT from pdfminer.utils import isnumber logging.basicConfig() logger = logging.getLogger(__name__) ESC_PAT = re.compile(r'[\000-\037&<>()"\042\047\134\177-\377]') def escape(s: Union[str, bytes]) -> str: if isinstance(s, bytes): us = str(s, "latin-1") else: us = s return ESC_PAT.sub(lambda m: "&#%d;" % ord(m.group(0)), us) def dumpxml(out: TextIO, obj: object, codec: Optional[str] = None) -> None: if obj is None: out.write("<null />") return if isinstance(obj, dict): out.write('<dict size="%d">\n' % len(obj)) for (k, v) in obj.items(): out.write("<key>%s</key>\n" % k) out.write("<value>") dumpxml(out, v) out.write("</value>\n") out.write("</dict>") return if isinstance(obj, list): out.write('<list size="%d">\n' % len(obj)) for v in obj: dumpxml(out, v) out.write("\n") out.write("</list>") return if isinstance(obj, (str, bytes)): out.write('<string size="%d">%s</string>' % (len(obj), escape(obj))) return if isinstance(obj, PDFStream): if codec == "raw": # Bug: writing bytes to text I/O. This will raise TypeError. out.write(obj.get_rawdata()) # type: ignore [arg-type] elif codec == "binary": # Bug: writing bytes to text I/O. This will raise TypeError. out.write(obj.get_data()) # type: ignore [arg-type] else: out.write("<stream>\n<props>\n") dumpxml(out, obj.attrs) out.write("\n</props>\n") if codec == "text": data = obj.get_data() out.write('<data size="%d">%s</data>\n' % (len(data), escape(data))) out.write("</stream>") return if isinstance(obj, PDFObjRef): out.write('<ref id="%d" />' % obj.objid) return if isinstance(obj, PSKeyword): # Likely bug: obj.name is bytes, not str out.write("<keyword>%s</keyword>" % obj.name) # type: ignore [str-bytes-safe] return if isinstance(obj, PSLiteral): # Likely bug: obj.name may be bytes, not str out.write("<literal>%s</literal>" % obj.name) # type: ignore [str-bytes-safe] return if isnumber(obj): out.write("<number>%s</number>" % obj) return raise TypeError(obj) def dumptrailers( out: TextIO, doc: PDFDocument, show_fallback_xref: bool = False ) -> None: for xref in doc.xrefs: if not isinstance(xref, PDFXRefFallback) or show_fallback_xref: out.write("<trailer>\n") dumpxml(out, xref.get_trailer()) out.write("\n</trailer>\n\n") no_xrefs = all(isinstance(xref, PDFXRefFallback) for xref in doc.xrefs) if no_xrefs and not show_fallback_xref: msg = ( "This PDF does not have an xref. Use --show-fallback-xref if " "you want to display the content of a fallback xref that " "contains all objects." ) logger.warning(msg) return def dumpallobjs( out: TextIO, doc: PDFDocument, codec: Optional[str] = None, show_fallback_xref: bool = False, ) -> None: visited = set() out.write("<pdf>") for xref in doc.xrefs: for objid in xref.get_objids(): if objid in visited: continue visited.add(objid) try: obj = doc.getobj(objid) if obj is None: continue out.write('<object id="%d">\n' % objid) dumpxml(out, obj, codec=codec) out.write("\n</object>\n\n") except PDFObjectNotFound as e: print("not found: %r" % e) dumptrailers(out, doc, show_fallback_xref) out.write("</pdf>") return def dumpoutline( outfp: TextIO, fname: str, objids: Any, pagenos: Container[int], password: str = "", dumpall: bool = False, codec: Optional[str] = None, extractdir: Optional[str] = None, ) -> None: fp = open(fname, "rb") parser = PDFParser(fp) doc = PDFDocument(parser, password) pages = { page.pageid: pageno for (pageno, page) in enumerate(PDFPage.create_pages(doc), 1) } def resolve_dest(dest: object) -> Any: if isinstance(dest, (str, bytes)): dest = resolve1(doc.get_dest(dest)) elif isinstance(dest, PSLiteral): dest = resolve1(doc.get_dest(dest.name)) if isinstance(dest, dict): dest = dest["D"] if isinstance(dest, PDFObjRef): dest = dest.resolve() return dest try: outlines = doc.get_outlines() outfp.write("<outlines>\n") for (level, title, dest, a, se) in outlines: pageno = None if dest: dest = resolve_dest(dest) pageno = pages[dest[0].objid] elif a: action = a if isinstance(action, dict): subtype = action.get("S") if subtype and repr(subtype) == "/'GoTo'" and action.get("D"): dest = resolve_dest(action["D"]) pageno = pages[dest[0].objid] s = escape(title) outfp.write('<outline level="{!r}" title="{}">\n'.format(level, s)) if dest is not None: outfp.write("<dest>") dumpxml(outfp, dest) outfp.write("</dest>\n") if pageno is not None: outfp.write("<pageno>%r</pageno>\n" % pageno) outfp.write("</outline>\n") outfp.write("</outlines>\n") except PDFNoOutlines: pass parser.close() fp.close() return LITERAL_FILESPEC = LIT("Filespec") LITERAL_EMBEDDEDFILE = LIT("EmbeddedFile") def extractembedded(fname: str, password: str, extractdir: str) -> None: def extract1(objid: int, obj: Dict[str, Any]) -> None: filename = os.path.basename(obj.get("UF") or cast(bytes, obj.get("F")).decode()) fileref = obj["EF"].get("UF") or obj["EF"].get("F") fileobj = doc.getobj(fileref.objid) if not isinstance(fileobj, PDFStream): error_msg = ( "unable to process PDF: reference for %r is not a " "PDFStream" % filename ) raise PDFValueError(error_msg) if fileobj.get("Type") is not LITERAL_EMBEDDEDFILE: raise PDFValueError( "unable to process PDF: reference for %r " "is not an EmbeddedFile" % (filename) ) path = os.path.join(extractdir, "%.6d-%s" % (objid, filename)) if os.path.exists(path): raise IOError("file exists: %r" % path) print("extracting: %r" % path) os.makedirs(os.path.dirname(path), exist_ok=True) out = open(path, "wb") out.write(fileobj.get_data()) out.close() return with open(fname, "rb") as fp: parser = PDFParser(fp) doc = PDFDocument(parser, password) extracted_objids = set() for xref in doc.xrefs: for objid in xref.get_objids(): obj = doc.getobj(objid) if ( objid not in extracted_objids and isinstance(obj, dict) and obj.get("Type") is LITERAL_FILESPEC ): extracted_objids.add(objid) extract1(objid, obj) return def dumppdf( outfp: TextIO, fname: str, objids: Iterable[int], pagenos: Container[int], password: str = "", dumpall: bool = False, codec: Optional[str] = None, extractdir: Optional[str] = None, show_fallback_xref: bool = False, ) -> None: fp = open(fname, "rb") parser = PDFParser(fp) doc = PDFDocument(parser, password) if objids: for objid in objids: obj = doc.getobj(objid) dumpxml(outfp, obj, codec=codec) if pagenos: for (pageno, page) in enumerate(PDFPage.create_pages(doc)): if pageno in pagenos: if codec: for obj in page.contents: obj = stream_value(obj) dumpxml(outfp, obj, codec=codec) else: dumpxml(outfp, page.attrs) if dumpall: dumpallobjs(outfp, doc, codec, show_fallback_xref) if (not objids) and (not pagenos) and (not dumpall): dumptrailers(outfp, doc, show_fallback_xref) fp.close() if codec not in ("raw", "binary"): outfp.write("\n") return def create_parser() -> ArgumentParser: parser = ArgumentParser(description=__doc__, add_help=True) parser.add_argument( "files", type=str, default=None, nargs="+", help="One or more paths to PDF files.", ) parser.add_argument( "--version", "-v", action="version", version="pdfminer.six v{}".format(pdfminer.__version__), ) parser.add_argument( "--debug", "-d", default=False, action="store_true", help="Use debug logging level.", ) procedure_parser = parser.add_mutually_exclusive_group() procedure_parser.add_argument( "--extract-toc", "-T", default=False, action="store_true", help="Extract structure of outline", ) procedure_parser.add_argument( "--extract-embedded", "-E", type=str, help="Extract embedded files" ) parse_params = parser.add_argument_group( "Parser", description="Used during PDF parsing" ) parse_params.add_argument( "--page-numbers", type=int, default=None, nargs="+", help="A space-seperated list of page numbers to parse.", ) parse_params.add_argument( "--pagenos", "-p", type=str, help="A comma-separated list of page numbers to parse. Included for " "legacy applications, use --page-numbers for more idiomatic " "argument entry.", ) parse_params.add_argument( "--objects", "-i", type=str, help="Comma separated list of object numbers to extract", ) parse_params.add_argument( "--all", "-a", default=False, action="store_true", help="If the structure of all objects should be extracted", ) parse_params.add_argument( "--show-fallback-xref", action="store_true", help="Additionally show the fallback xref. Use this if the PDF " "has zero or only invalid xref's. This setting is ignored if " "--extract-toc or --extract-embedded is used.", ) parse_params.add_argument( "--password", "-P", type=str, default="", help="The password to use for decrypting PDF file.", ) output_params = parser.add_argument_group( "Output", description="Used during output generation." ) output_params.add_argument( "--outfile", "-o", type=str, default="-", help='Path to file where output is written. Or "-" (default) to ' "write to stdout.", ) codec_parser = output_params.add_mutually_exclusive_group() codec_parser.add_argument( "--raw-stream", "-r", default=False, action="store_true", help="Write stream objects without encoding", ) codec_parser.add_argument( "--binary-stream", "-b", default=False, action="store_true", help="Write stream objects with binary encoding", ) codec_parser.add_argument( "--text-stream", "-t", default=False, action="store_true", help="Write stream objects as plain text", ) return parser def main(argv: Optional[List[str]] = None) -> None: parser = create_parser() args = parser.parse_args(args=argv) if args.debug: logging.getLogger().setLevel(logging.DEBUG) if args.outfile == "-": outfp = sys.stdout else: outfp = open(args.outfile, "w") if args.objects: objids = [int(x) for x in args.objects.split(",")] else: objids = [] if args.page_numbers: pagenos = {x - 1 for x in args.page_numbers} elif args.pagenos: pagenos = {int(x) - 1 for x in args.pagenos.split(",")} else: pagenos = set() password = args.password if args.raw_stream: codec: Optional[str] = "raw" elif args.binary_stream: codec = "binary" elif args.text_stream: codec = "text" else: codec = None for fname in args.files: if args.extract_toc: dumpoutline( outfp, fname, objids, pagenos, password=password, dumpall=args.all, codec=codec, extractdir=None, ) elif args.extract_embedded: extractembedded(fname, password=password, extractdir=args.extract_embedded) else: dumppdf( outfp, fname, objids, pagenos, password=password, dumpall=args.all, codec=codec, extractdir=None, show_fallback_xref=args.show_fallback_xref, ) outfp.close() if __name__ == "__main__": main()
20220429-pdfminer-jameslp310
/20220429_pdfminer_jameslp310-0.0.2-py3-none-any.whl/20220429_pdfminer_jameslp310-0.0.2.data/scripts/dumppdf.py
dumppdf.py
import io import logging import sys import zlib from typing import ( TYPE_CHECKING, Any, Dict, Iterable, Optional, Union, List, Tuple, cast, ) from . import settings from .ascii85 import ascii85decode from .ascii85 import asciihexdecode from .ccitt import ccittfaxdecode from .lzw import lzwdecode from .psparser import LIT from .psparser import PSException from .psparser import PSObject from .runlength import rldecode from .utils import apply_png_predictor if TYPE_CHECKING: from .pdfdocument import PDFDocument logger = logging.getLogger(__name__) LITERAL_CRYPT = LIT("Crypt") # Abbreviation of Filter names in PDF 4.8.6. "Inline Images" LITERALS_FLATE_DECODE = (LIT("FlateDecode"), LIT("Fl")) LITERALS_LZW_DECODE = (LIT("LZWDecode"), LIT("LZW")) LITERALS_ASCII85_DECODE = (LIT("ASCII85Decode"), LIT("A85")) LITERALS_ASCIIHEX_DECODE = (LIT("ASCIIHexDecode"), LIT("AHx")) LITERALS_RUNLENGTH_DECODE = (LIT("RunLengthDecode"), LIT("RL")) LITERALS_CCITTFAX_DECODE = (LIT("CCITTFaxDecode"), LIT("CCF")) LITERALS_DCT_DECODE = (LIT("DCTDecode"), LIT("DCT")) LITERALS_JBIG2_DECODE = (LIT("JBIG2Decode"),) LITERALS_JPX_DECODE = (LIT("JPXDecode"),) if sys.version_info >= (3, 8): from typing import Protocol class DecipherCallable(Protocol): """Fully typed a decipher callback, with optional parameter.""" def __call__( self, objid: int, genno: int, data: bytes, attrs: Optional[Dict[str, Any]] = None, ) -> bytes: raise NotImplementedError else: # Fallback for older Python from typing import Callable DecipherCallable = Callable[..., bytes] class PDFObject(PSObject): pass class PDFException(PSException): pass class PDFTypeError(PDFException): pass class PDFValueError(PDFException): pass class PDFObjectNotFound(PDFException): pass class PDFNotImplementedError(PDFException): pass class PDFObjRef(PDFObject): def __init__(self, doc: Optional["PDFDocument"], objid: int, _: object) -> None: if objid == 0: if settings.STRICT: raise PDFValueError("PDF object id cannot be 0.") self.doc = doc self.objid = objid def __repr__(self) -> str: return "<PDFObjRef:%d>" % (self.objid) def resolve(self, default: object = None) -> Any: assert self.doc is not None try: return self.doc.getobj(self.objid) except PDFObjectNotFound: return default def resolve1(x: object, default: object = None) -> Any: """Resolves an object. If this is an array or dictionary, it may still contains some indirect objects inside. """ while isinstance(x, PDFObjRef): x = x.resolve(default=default) return x def resolve_all(x: object, default: object = None) -> Any: """Recursively resolves the given object and all the internals. Make sure there is no indirect reference within the nested object. This procedure might be slow. """ while isinstance(x, PDFObjRef): x = x.resolve(default=default) if isinstance(x, list): x = [resolve_all(v, default=default) for v in x] elif isinstance(x, dict): for (k, v) in x.items(): x[k] = resolve_all(v, default=default) return x def decipher_all(decipher: DecipherCallable, objid: int, genno: int, x: object) -> Any: """Recursively deciphers the given object.""" if isinstance(x, bytes): return decipher(objid, genno, x) if isinstance(x, list): x = [decipher_all(decipher, objid, genno, v) for v in x] elif isinstance(x, dict): for (k, v) in x.items(): x[k] = decipher_all(decipher, objid, genno, v) return x def int_value(x: object) -> int: x = resolve1(x) if not isinstance(x, int): if settings.STRICT: raise PDFTypeError("Integer required: %r" % x) return 0 return x def float_value(x: object) -> float: x = resolve1(x) if not isinstance(x, float): if settings.STRICT: raise PDFTypeError("Float required: %r" % x) return 0.0 return x def num_value(x: object) -> float: x = resolve1(x) if not isinstance(x, (int, float)): # == utils.isnumber(x) if settings.STRICT: raise PDFTypeError("Int or Float required: %r" % x) return 0 return x def uint_value(x: object, n_bits: int) -> int: """Resolve number and interpret it as a two's-complement unsigned number""" xi = int_value(x) if xi > 0: return xi else: return xi + cast(int, 2**n_bits) def str_value(x: object) -> bytes: x = resolve1(x) if not isinstance(x, bytes): if settings.STRICT: raise PDFTypeError("String required: %r" % x) return b"" return x def list_value(x: object) -> Union[List[Any], Tuple[Any, ...]]: x = resolve1(x) if not isinstance(x, (list, tuple)): if settings.STRICT: raise PDFTypeError("List required: %r" % x) return [] return x def dict_value(x: object) -> Dict[Any, Any]: x = resolve1(x) if not isinstance(x, dict): if settings.STRICT: logger.error("PDFTypeError : Dict required: %r", x) raise PDFTypeError("Dict required: %r" % x) return {} return x def stream_value(x: object) -> "PDFStream": x = resolve1(x) if not isinstance(x, PDFStream): if settings.STRICT: raise PDFTypeError("PDFStream required: %r" % x) return PDFStream({}, b"") return x def decompress_corrupted(data: bytes) -> bytes: """Called on some data that can't be properly decoded because of CRC checksum error. Attempt to decode it skipping the CRC. """ d = zlib.decompressobj() f = io.BytesIO(data) result_str = b"" buffer = f.read(1) i = 0 try: while buffer: result_str += d.decompress(buffer) buffer = f.read(1) i += 1 except zlib.error: # Let the error propagates if we're not yet in the CRC checksum if i < len(data) - 3: logger.warning("Data-loss while decompressing corrupted data") return result_str class PDFStream(PDFObject): def __init__( self, attrs: Dict[str, Any], rawdata: bytes, decipher: Optional[DecipherCallable] = None, ) -> None: assert isinstance(attrs, dict), str(type(attrs)) self.attrs = attrs self.rawdata: Optional[bytes] = rawdata self.decipher = decipher self.data: Optional[bytes] = None self.objid: Optional[int] = None self.genno: Optional[int] = None def set_objid(self, objid: int, genno: int) -> None: self.objid = objid self.genno = genno def __repr__(self) -> str: if self.data is None: assert self.rawdata is not None return "<PDFStream(%r): raw=%d, %r>" % ( self.objid, len(self.rawdata), self.attrs, ) else: assert self.data is not None return "<PDFStream(%r): len=%d, %r>" % ( self.objid, len(self.data), self.attrs, ) def __contains__(self, name: object) -> bool: return name in self.attrs def __getitem__(self, name: str) -> Any: return self.attrs[name] def get(self, name: str, default: object = None) -> Any: return self.attrs.get(name, default) def get_any(self, names: Iterable[str], default: object = None) -> Any: for name in names: if name in self.attrs: return self.attrs[name] return default def get_filters(self) -> List[Tuple[Any, Any]]: filters = self.get_any(("F", "Filter")) params = self.get_any(("DP", "DecodeParms", "FDecodeParms"), {}) if not filters: return [] if not isinstance(filters, list): filters = [filters] if not isinstance(params, list): # Make sure the parameters list is the same as filters. params = [params] * len(filters) if settings.STRICT and len(params) != len(filters): raise PDFException("Parameters len filter mismatch") # resolve filter if possible _filters = [] for fltr in filters: if hasattr(fltr, "resolve"): fltr = fltr.resolve()[0] _filters.append(fltr) # return list solves https://github.com/pdfminer/pdfminer.six/issues/15 return list(zip(_filters, params)) def decode(self) -> None: assert self.data is None and self.rawdata is not None, str( (self.data, self.rawdata) ) data = self.rawdata if self.decipher: # Handle encryption assert self.objid is not None assert self.genno is not None data = self.decipher(self.objid, self.genno, data, self.attrs) filters = self.get_filters() if not filters: self.data = data self.rawdata = None return for (f, params) in filters: if f in LITERALS_FLATE_DECODE: # will get errors if the document is encrypted. try: data = zlib.decompress(data) except zlib.error as e: if settings.STRICT: error_msg = "Invalid zlib bytes: {!r}, {!r}".format(e, data) raise PDFException(error_msg) try: data = decompress_corrupted(data) except zlib.error: data = b"" elif f in LITERALS_LZW_DECODE: data = lzwdecode(data) elif f in LITERALS_ASCII85_DECODE: data = ascii85decode(data) elif f in LITERALS_ASCIIHEX_DECODE: data = asciihexdecode(data) elif f in LITERALS_RUNLENGTH_DECODE: data = rldecode(data) elif f in LITERALS_CCITTFAX_DECODE: data = ccittfaxdecode(data, params) elif f in LITERALS_DCT_DECODE: # This is probably a JPG stream # it does not need to be decoded twice. # Just return the stream to the user. pass elif f in LITERALS_JBIG2_DECODE: pass elif f in LITERALS_JPX_DECODE: pass elif f == LITERAL_CRYPT: # not yet.. raise PDFNotImplementedError("/Crypt filter is unsupported") else: raise PDFNotImplementedError("Unsupported filter: %r" % f) # apply predictors if params and "Predictor" in params: pred = int_value(params["Predictor"]) if pred == 1: # no predictor pass elif 10 <= pred: # PNG predictor colors = int_value(params.get("Colors", 1)) columns = int_value(params.get("Columns", 1)) raw_bits_per_component = params.get("BitsPerComponent", 8) bitspercomponent = int_value(raw_bits_per_component) data = apply_png_predictor( pred, colors, columns, bitspercomponent, data ) else: error_msg = "Unsupported predictor: %r" % pred raise PDFNotImplementedError(error_msg) self.data = data self.rawdata = None return def get_data(self) -> bytes: if self.data is None: self.decode() assert self.data is not None return self.data def get_rawdata(self) -> Optional[bytes]: return self.rawdata
20220429-pdfminer-jameslp310
/20220429_pdfminer_jameslp310-0.0.2-py3-none-any.whl/pdfminer/pdftypes.py
pdftypes.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import logging import re from typing import ( Any, BinaryIO, Dict, Generic, Iterator, List, Optional, Tuple, Type, TypeVar, Union, ) from . import settings from .utils import choplist log = logging.getLogger(__name__) class PSException(Exception): pass class PSEOF(PSException): pass class PSSyntaxError(PSException): pass class PSTypeError(PSException): pass class PSValueError(PSException): pass class PSObject: """Base class for all PS or PDF-related data types.""" pass class PSLiteral(PSObject): """A class that represents a PostScript literal. Postscript literals are used as identifiers, such as variable names, property names and dictionary keys. Literals are case sensitive and denoted by a preceding slash sign (e.g. "/Name") Note: Do not create an instance of PSLiteral directly. Always use PSLiteralTable.intern(). """ NameType = Union[str, bytes] def __init__(self, name: NameType) -> None: self.name = name def __repr__(self) -> str: name = self.name return "/%r" % name class PSKeyword(PSObject): """A class that represents a PostScript keyword. PostScript keywords are a dozen of predefined words. Commands and directives in PostScript are expressed by keywords. They are also used to denote the content boundaries. Note: Do not create an instance of PSKeyword directly. Always use PSKeywordTable.intern(). """ def __init__(self, name: bytes) -> None: self.name = name def __repr__(self) -> str: name = self.name return "/%r" % name _SymbolT = TypeVar("_SymbolT", PSLiteral, PSKeyword) class PSSymbolTable(Generic[_SymbolT]): """A utility class for storing PSLiteral/PSKeyword objects. Interned objects can be checked its identity with "is" operator. """ def __init__(self, klass: Type[_SymbolT]) -> None: self.dict: Dict[PSLiteral.NameType, _SymbolT] = {} self.klass: Type[_SymbolT] = klass def intern(self, name: PSLiteral.NameType) -> _SymbolT: if name in self.dict: lit = self.dict[name] else: # Type confusion issue: PSKeyword always takes bytes as name # PSLiteral uses either str or bytes lit = self.klass(name) # type: ignore[arg-type] self.dict[name] = lit return lit PSLiteralTable = PSSymbolTable(PSLiteral) PSKeywordTable = PSSymbolTable(PSKeyword) LIT = PSLiteralTable.intern KWD = PSKeywordTable.intern KEYWORD_PROC_BEGIN = KWD(b"{") KEYWORD_PROC_END = KWD(b"}") KEYWORD_ARRAY_BEGIN = KWD(b"[") KEYWORD_ARRAY_END = KWD(b"]") KEYWORD_DICT_BEGIN = KWD(b"<<") KEYWORD_DICT_END = KWD(b">>") def literal_name(x: object) -> Any: if not isinstance(x, PSLiteral): if settings.STRICT: raise PSTypeError("Literal required: {!r}".format(x)) else: name = x else: name = x.name if not isinstance(name, str): try: name = str(name, "utf-8") except Exception: pass return name def keyword_name(x: object) -> Any: if not isinstance(x, PSKeyword): if settings.STRICT: raise PSTypeError("Keyword required: %r" % x) else: name = x else: name = str(x.name, "utf-8", "ignore") return name EOL = re.compile(rb"[\r\n]") SPC = re.compile(rb"\s") NONSPC = re.compile(rb"\S") HEX = re.compile(rb"[0-9a-fA-F]") END_LITERAL = re.compile(rb"[#/%\[\]()<>{}\s]") END_HEX_STRING = re.compile(rb"[^\s0-9a-fA-F]") HEX_PAIR = re.compile(rb"[0-9a-fA-F]{2}|.") END_NUMBER = re.compile(rb"[^0-9]") END_KEYWORD = re.compile(rb"[#/%\[\]()<>{}\s]") END_STRING = re.compile(rb"[()\134]") OCT_STRING = re.compile(rb"[0-7]") ESC_STRING = { b"b": 8, b"t": 9, b"n": 10, b"f": 12, b"r": 13, b"(": 40, b")": 41, b"\\": 92, } PSBaseParserToken = Union[float, bool, PSLiteral, PSKeyword, bytes] class PSBaseParser: """Most basic PostScript parser that performs only tokenization.""" BUFSIZ = 4096 def __init__(self, fp: BinaryIO) -> None: self.fp = fp self.seek(0) def __repr__(self) -> str: return "<%s: %r, bufpos=%d>" % (self.__class__.__name__, self.fp, self.bufpos) def flush(self) -> None: return def close(self) -> None: self.flush() return def tell(self) -> int: return self.bufpos + self.charpos def poll(self, pos: Optional[int] = None, n: int = 80) -> None: pos0 = self.fp.tell() if not pos: pos = self.bufpos + self.charpos self.fp.seek(pos) log.debug("poll(%d): %r", pos, self.fp.read(n)) self.fp.seek(pos0) return def seek(self, pos: int) -> None: """Seeks the parser to the given position.""" log.debug("seek: %r", pos) self.fp.seek(pos) # reset the status for nextline() self.bufpos = pos self.buf = b"" self.charpos = 0 # reset the status for nexttoken() self._parse1 = self._parse_main self._curtoken = b"" self._curtokenpos = 0 self._tokens: List[Tuple[int, PSBaseParserToken]] = [] return def fillbuf(self) -> None: if self.charpos < len(self.buf): return # fetch next chunk. self.bufpos = self.fp.tell() self.buf = self.fp.read(self.BUFSIZ) if not self.buf: raise PSEOF("Unexpected EOF") self.charpos = 0 return def nextline(self) -> Tuple[int, bytes]: """Fetches a next line that ends either with \\r or \\n.""" linebuf = b"" linepos = self.bufpos + self.charpos eol = False while 1: self.fillbuf() if eol: c = self.buf[self.charpos : self.charpos + 1] # handle b'\r\n' if c == b"\n": linebuf += c self.charpos += 1 break m = EOL.search(self.buf, self.charpos) if m: linebuf += self.buf[self.charpos : m.end(0)] self.charpos = m.end(0) if linebuf[-1:] == b"\r": eol = True else: break else: linebuf += self.buf[self.charpos :] self.charpos = len(self.buf) log.debug("nextline: %r, %r", linepos, linebuf) return (linepos, linebuf) def revreadlines(self) -> Iterator[bytes]: """Fetches a next line backword. This is used to locate the trailers at the end of a file. """ self.fp.seek(0, 2) pos = self.fp.tell() buf = b"" while 0 < pos: prevpos = pos pos = max(0, pos - self.BUFSIZ) self.fp.seek(pos) s = self.fp.read(prevpos - pos) if not s: break while 1: n = max(s.rfind(b"\r"), s.rfind(b"\n")) if n == -1: buf = s + buf break yield s[n:] + buf s = s[:n] buf = b"" return def _parse_main(self, s: bytes, i: int) -> int: m = NONSPC.search(s, i) if not m: return len(s) j = m.start(0) c = s[j : j + 1] self._curtokenpos = self.bufpos + j if c == b"%": self._curtoken = b"%" self._parse1 = self._parse_comment return j + 1 elif c == b"/": self._curtoken = b"" self._parse1 = self._parse_literal return j + 1 elif c in b"-+" or c.isdigit(): self._curtoken = c self._parse1 = self._parse_number return j + 1 elif c == b".": self._curtoken = c self._parse1 = self._parse_float return j + 1 elif c.isalpha(): self._curtoken = c self._parse1 = self._parse_keyword return j + 1 elif c == b"(": self._curtoken = b"" self.paren = 1 self._parse1 = self._parse_string return j + 1 elif c == b"<": self._curtoken = b"" self._parse1 = self._parse_wopen return j + 1 elif c == b">": self._curtoken = b"" self._parse1 = self._parse_wclose return j + 1 else: self._add_token(KWD(c)) return j + 1 def _add_token(self, obj: PSBaseParserToken) -> None: self._tokens.append((self._curtokenpos, obj)) return def _parse_comment(self, s: bytes, i: int) -> int: m = EOL.search(s, i) if not m: self._curtoken += s[i:] return len(s) j = m.start(0) self._curtoken += s[i:j] self._parse1 = self._parse_main # We ignore comments. # self._tokens.append(self._curtoken) return j def _parse_literal(self, s: bytes, i: int) -> int: m = END_LITERAL.search(s, i) if not m: self._curtoken += s[i:] return len(s) j = m.start(0) self._curtoken += s[i:j] c = s[j : j + 1] if c == b"#": self.hex = b"" self._parse1 = self._parse_literal_hex return j + 1 try: name: Union[str, bytes] = str(self._curtoken, "utf-8") except Exception: name = self._curtoken self._add_token(LIT(name)) self._parse1 = self._parse_main return j def _parse_literal_hex(self, s: bytes, i: int) -> int: c = s[i : i + 1] if HEX.match(c) and len(self.hex) < 2: self.hex += c return i + 1 if self.hex: self._curtoken += bytes((int(self.hex, 16),)) self._parse1 = self._parse_literal return i def _parse_number(self, s: bytes, i: int) -> int: m = END_NUMBER.search(s, i) if not m: self._curtoken += s[i:] return len(s) j = m.start(0) self._curtoken += s[i:j] c = s[j : j + 1] if c == b".": self._curtoken += c self._parse1 = self._parse_float return j + 1 try: self._add_token(int(self._curtoken)) except ValueError: pass self._parse1 = self._parse_main return j def _parse_float(self, s: bytes, i: int) -> int: m = END_NUMBER.search(s, i) if not m: self._curtoken += s[i:] return len(s) j = m.start(0) self._curtoken += s[i:j] try: self._add_token(float(self._curtoken)) except ValueError: pass self._parse1 = self._parse_main return j def _parse_keyword(self, s: bytes, i: int) -> int: m = END_KEYWORD.search(s, i) if not m: self._curtoken += s[i:] return len(s) j = m.start(0) self._curtoken += s[i:j] if self._curtoken == b"true": token: Union[bool, PSKeyword] = True elif self._curtoken == b"false": token = False else: token = KWD(self._curtoken) self._add_token(token) self._parse1 = self._parse_main return j def _parse_string(self, s: bytes, i: int) -> int: m = END_STRING.search(s, i) if not m: self._curtoken += s[i:] return len(s) j = m.start(0) self._curtoken += s[i:j] c = s[j : j + 1] if c == b"\\": self.oct = b"" self._parse1 = self._parse_string_1 return j + 1 if c == b"(": self.paren += 1 self._curtoken += c return j + 1 if c == b")": self.paren -= 1 if self.paren: # WTF, they said balanced parens need no special treatment. self._curtoken += c return j + 1 self._add_token(self._curtoken) self._parse1 = self._parse_main return j + 1 def _parse_string_1(self, s: bytes, i: int) -> int: """Parse literal strings PDF Reference 3.2.3 """ c = s[i : i + 1] if OCT_STRING.match(c) and len(self.oct) < 3: self.oct += c return i + 1 elif self.oct: self._curtoken += bytes((int(self.oct, 8),)) self._parse1 = self._parse_string return i elif c in ESC_STRING: self._curtoken += bytes((ESC_STRING[c],)) elif c == b"\r" and len(s) > i + 1 and s[i + 1 : i + 2] == b"\n": # If current and next character is \r\n skip both because enters # after a \ are ignored i += 1 # default action self._parse1 = self._parse_string return i + 1 def _parse_wopen(self, s: bytes, i: int) -> int: c = s[i : i + 1] if c == b"<": self._add_token(KEYWORD_DICT_BEGIN) self._parse1 = self._parse_main i += 1 else: self._parse1 = self._parse_hexstring return i def _parse_wclose(self, s: bytes, i: int) -> int: c = s[i : i + 1] if c == b">": self._add_token(KEYWORD_DICT_END) i += 1 self._parse1 = self._parse_main return i def _parse_hexstring(self, s: bytes, i: int) -> int: m = END_HEX_STRING.search(s, i) if not m: self._curtoken += s[i:] return len(s) j = m.start(0) self._curtoken += s[i:j] token = HEX_PAIR.sub( lambda m: bytes((int(m.group(0), 16),)), SPC.sub(b"", self._curtoken) ) self._add_token(token) self._parse1 = self._parse_main return j def nexttoken(self) -> Tuple[int, PSBaseParserToken]: while not self._tokens: self.fillbuf() self.charpos = self._parse1(self.buf, self.charpos) token = self._tokens.pop(0) log.debug("nexttoken: %r", token) return token # Stack slots may by occupied by any of: # * the PSBaseParserToken types # * list (via KEYWORD_ARRAY) # * dict (via KEYWORD_DICT) # * subclass-specific extensions (e.g. PDFStream, PDFObjRef) via ExtraT ExtraT = TypeVar("ExtraT") PSStackType = Union[float, bool, PSLiteral, bytes, List, Dict, ExtraT] PSStackEntry = Tuple[int, PSStackType[ExtraT]] class PSStackParser(PSBaseParser, Generic[ExtraT]): def __init__(self, fp: BinaryIO) -> None: PSBaseParser.__init__(self, fp) self.reset() return def reset(self) -> None: self.context: List[Tuple[int, Optional[str], List[PSStackEntry[ExtraT]]]] = [] self.curtype: Optional[str] = None self.curstack: List[PSStackEntry[ExtraT]] = [] self.results: List[PSStackEntry[ExtraT]] = [] return def seek(self, pos: int) -> None: PSBaseParser.seek(self, pos) self.reset() return def push(self, *objs: PSStackEntry[ExtraT]) -> None: self.curstack.extend(objs) return def pop(self, n: int) -> List[PSStackEntry[ExtraT]]: objs = self.curstack[-n:] self.curstack[-n:] = [] return objs def popall(self) -> List[PSStackEntry[ExtraT]]: objs = self.curstack self.curstack = [] return objs def add_results(self, *objs: PSStackEntry[ExtraT]) -> None: try: log.debug("add_results: %r", objs) except Exception: log.debug("add_results: (unprintable object)") self.results.extend(objs) return def start_type(self, pos: int, type: str) -> None: self.context.append((pos, self.curtype, self.curstack)) (self.curtype, self.curstack) = (type, []) log.debug("start_type: pos=%r, type=%r", pos, type) return def end_type(self, type: str) -> Tuple[int, List[PSStackType[ExtraT]]]: if self.curtype != type: raise PSTypeError("Type mismatch: {!r} != {!r}".format(self.curtype, type)) objs = [obj for (_, obj) in self.curstack] (pos, self.curtype, self.curstack) = self.context.pop() log.debug("end_type: pos=%r, type=%r, objs=%r", pos, type, objs) return (pos, objs) def do_keyword(self, pos: int, token: PSKeyword) -> None: return def nextobject(self) -> PSStackEntry[ExtraT]: """Yields a list of objects. Arrays and dictionaries are represented as Python lists and dictionaries. :return: keywords, literals, strings, numbers, arrays and dictionaries. """ while not self.results: (pos, token) = self.nexttoken() if isinstance(token, (int, float, bool, str, bytes, PSLiteral)): # normal token self.push((pos, token)) elif token == KEYWORD_ARRAY_BEGIN: # begin array self.start_type(pos, "a") elif token == KEYWORD_ARRAY_END: # end array try: self.push(self.end_type("a")) except PSTypeError: if settings.STRICT: raise elif token == KEYWORD_DICT_BEGIN: # begin dictionary self.start_type(pos, "d") elif token == KEYWORD_DICT_END: # end dictionary try: (pos, objs) = self.end_type("d") if len(objs) % 2 != 0: error_msg = "Invalid dictionary construct: %r" % objs raise PSSyntaxError(error_msg) d = { literal_name(k): v for (k, v) in choplist(2, objs) if v is not None } self.push((pos, d)) except PSTypeError: if settings.STRICT: raise elif token == KEYWORD_PROC_BEGIN: # begin proc self.start_type(pos, "p") elif token == KEYWORD_PROC_END: # end proc try: self.push(self.end_type("p")) except PSTypeError: if settings.STRICT: raise elif isinstance(token, PSKeyword): log.debug( "do_keyword: pos=%r, token=%r, stack=%r", pos, token, self.curstack ) self.do_keyword(pos, token) else: log.error( "unknown token: pos=%r, token=%r, stack=%r", pos, token, self.curstack, ) self.do_keyword(pos, token) raise if self.context: continue else: self.flush() obj = self.results.pop(0) try: log.debug("nextobject: %r", obj) except Exception: log.debug("nextobject: (unprintable object)") return obj
20220429-pdfminer-jameslp310
/20220429_pdfminer_jameslp310-0.0.2-py3-none-any.whl/pdfminer/psparser.py
psparser.py
import io import logging import re from typing import ( BinaryIO, Dict, Generic, List, Optional, Sequence, TextIO, Tuple, TypeVar, Union, cast, ) from pdfminer.pdfcolor import PDFColorSpace from . import utils from .image import ImageWriter from .layout import LAParams, LTComponent, TextGroupElement from .layout import LTChar from .layout import LTContainer from .layout import LTCurve from .layout import LTFigure from .layout import LTImage from .layout import LTItem from .layout import LTLayoutContainer from .layout import LTLine from .layout import LTPage from .layout import LTRect from .layout import LTText from .layout import LTTextBox from .layout import LTTextBoxVertical from .layout import LTTextGroup from .layout import LTTextLine from .pdfdevice import PDFTextDevice from .pdffont import PDFFont from .pdffont import PDFUnicodeNotDefined from .pdfinterp import PDFGraphicState, PDFResourceManager from .pdfpage import PDFPage from .pdftypes import PDFStream from .utils import AnyIO, Point, Matrix, Rect, PathSegment, make_compat_str from .utils import apply_matrix_pt from .utils import bbox2str from .utils import enc from .utils import mult_matrix log = logging.getLogger(__name__) class PDFLayoutAnalyzer(PDFTextDevice): cur_item: LTLayoutContainer ctm: Matrix def __init__( self, rsrcmgr: PDFResourceManager, pageno: int = 1, laparams: Optional[LAParams] = None, ) -> None: PDFTextDevice.__init__(self, rsrcmgr) self.pageno = pageno self.laparams = laparams self._stack: List[LTLayoutContainer] = [] def begin_page(self, page: PDFPage, ctm: Matrix) -> None: (x0, y0, x1, y1) = page.mediabox (x0, y0) = apply_matrix_pt(ctm, (x0, y0)) (x1, y1) = apply_matrix_pt(ctm, (x1, y1)) mediabox = (0, 0, abs(x0 - x1), abs(y0 - y1)) self.cur_item = LTPage(self.pageno, mediabox) def end_page(self, page: PDFPage) -> None: assert not self._stack, str(len(self._stack)) assert isinstance(self.cur_item, LTPage), str(type(self.cur_item)) if self.laparams is not None: self.cur_item.analyze(self.laparams) self.pageno += 1 self.receive_layout(self.cur_item) def begin_figure(self, name: str, bbox: Rect, matrix: Matrix) -> None: self._stack.append(self.cur_item) self.cur_item = LTFigure(name, bbox, mult_matrix(matrix, self.ctm)) def end_figure(self, _: str) -> None: fig = self.cur_item assert isinstance(self.cur_item, LTFigure), str(type(self.cur_item)) self.cur_item = self._stack.pop() self.cur_item.add(fig) def render_image(self, name: str, stream: PDFStream) -> None: assert isinstance(self.cur_item, LTFigure), str(type(self.cur_item)) item = LTImage( name, stream, (self.cur_item.x0, self.cur_item.y0, self.cur_item.x1, self.cur_item.y1), ) self.cur_item.add(item) def paint_path( self, gstate: PDFGraphicState, stroke: bool, fill: bool, evenodd: bool, path: Sequence[PathSegment], ) -> None: """Paint paths described in section 4.4 of the PDF reference manual""" shape = "".join(x[0] for x in path) if shape.count("m") > 1: # recurse if there are multiple m's in this shape for m in re.finditer(r"m[^m]+", shape): subpath = path[m.start(0) : m.end(0)] self.paint_path(gstate, stroke, fill, evenodd, subpath) else: # Although the 'h' command does not not literally provide a # point-position, its position is (by definition) equal to the # subpath's starting point. # # And, per Section 4.4's Table 4.9, all other path commands place # their point-position in their final two arguments. (Any preceding # arguments represent control points on Bézier curves.) raw_pts = [ cast(Point, p[-2:] if p[0] != "h" else path[0][-2:]) for p in path ] pts = [apply_matrix_pt(self.ctm, pt) for pt in raw_pts] if shape in {"mlh", "ml"}: # single line segment # # Note: 'ml', in conditional above, is a frequent anomaly # that we want to support. line = LTLine( gstate.linewidth, pts[0], pts[1], stroke, fill, evenodd, gstate.scolor, gstate.ncolor, ) self.cur_item.add(line) elif shape in {"mlllh", "mllll"}: (x0, y0), (x1, y1), (x2, y2), (x3, y3), _ = pts is_closed_loop = pts[0] == pts[4] has_square_coordinates = ( x0 == x1 and y1 == y2 and x2 == x3 and y3 == y0 ) or (y0 == y1 and x1 == x2 and y2 == y3 and x3 == x0) if is_closed_loop and has_square_coordinates: rect = LTRect( gstate.linewidth, (*pts[0], *pts[2]), stroke, fill, evenodd, gstate.scolor, gstate.ncolor, ) self.cur_item.add(rect) else: curve = LTCurve( gstate.linewidth, pts, stroke, fill, evenodd, gstate.scolor, gstate.ncolor, ) self.cur_item.add(curve) else: curve = LTCurve( gstate.linewidth, pts, stroke, fill, evenodd, gstate.scolor, gstate.ncolor, ) self.cur_item.add(curve) def render_char( self, matrix: Matrix, font: PDFFont, fontsize: float, scaling: float, rise: float, cid: int, ncs: PDFColorSpace, graphicstate: PDFGraphicState, ) -> float: try: text = font.to_unichr(cid) assert isinstance(text, str), str(type(text)) except PDFUnicodeNotDefined: text = self.handle_undefined_char(font, cid) textwidth = font.char_width(cid) textdisp = font.char_disp(cid) item = LTChar( matrix, font, fontsize, scaling, rise, text, textwidth, textdisp, ncs, graphicstate, ) self.cur_item.add(item) return item.adv def handle_undefined_char(self, font: PDFFont, cid: int) -> str: log.debug("undefined: %r, %r", font, cid) return "(cid:%d)" % cid def receive_layout(self, ltpage: LTPage) -> None: pass class PDFPageAggregator(PDFLayoutAnalyzer): def __init__( self, rsrcmgr: PDFResourceManager, pageno: int = 1, laparams: Optional[LAParams] = None, ) -> None: PDFLayoutAnalyzer.__init__(self, rsrcmgr, pageno=pageno, laparams=laparams) self.result: Optional[LTPage] = None def receive_layout(self, ltpage: LTPage) -> None: self.result = ltpage def get_result(self) -> LTPage: assert self.result is not None return self.result # Some PDFConverter children support only binary I/O IOType = TypeVar("IOType", TextIO, BinaryIO, AnyIO) class PDFConverter(PDFLayoutAnalyzer, Generic[IOType]): def __init__( self, rsrcmgr: PDFResourceManager, outfp: IOType, codec: str = "utf-8", pageno: int = 1, laparams: Optional[LAParams] = None, ) -> None: PDFLayoutAnalyzer.__init__(self, rsrcmgr, pageno=pageno, laparams=laparams) self.outfp: IOType = outfp self.codec = codec self.outfp_binary = self._is_binary_stream(self.outfp) @staticmethod def _is_binary_stream(outfp: AnyIO) -> bool: """Test if an stream is binary or not""" if "b" in getattr(outfp, "mode", ""): return True elif hasattr(outfp, "mode"): # output stream has a mode, but it does not contain 'b' return False elif isinstance(outfp, io.BytesIO): return True elif isinstance(outfp, io.StringIO): return False elif isinstance(outfp, io.TextIOBase): return False return True class TextConverter(PDFConverter[AnyIO]): def __init__( self, rsrcmgr: PDFResourceManager, outfp: AnyIO, codec: str = "utf-8", pageno: int = 1, laparams: Optional[LAParams] = None, showpageno: bool = False, imagewriter: Optional[ImageWriter] = None, ) -> None: super().__init__(rsrcmgr, outfp, codec=codec, pageno=pageno, laparams=laparams) self.showpageno = showpageno self.imagewriter = imagewriter def write_text(self, text: str) -> None: text = utils.compatible_encode_method(text, self.codec, "ignore") if self.outfp_binary: cast(BinaryIO, self.outfp).write(text.encode()) else: cast(TextIO, self.outfp).write(text) def receive_layout(self, ltpage: LTPage) -> None: def render(item: LTItem) -> None: if isinstance(item, LTContainer): for child in item: render(child) elif isinstance(item, LTText): self.write_text(item.get_text()) if isinstance(item, LTTextBox): self.write_text("\n") elif isinstance(item, LTImage): if self.imagewriter is not None: self.imagewriter.export_image(item) if self.showpageno: self.write_text("Page %s\n" % ltpage.pageid) render(ltpage) self.write_text("\f") # Some dummy functions to save memory/CPU when all that is wanted # is text. This stops all the image and drawing output from being # recorded and taking up RAM. def render_image(self, name: str, stream: PDFStream) -> None: if self.imagewriter is None: return PDFConverter.render_image(self, name, stream) return def paint_path( self, gstate: PDFGraphicState, stroke: bool, fill: bool, evenodd: bool, path: Sequence[PathSegment], ) -> None: return class HTMLConverter(PDFConverter[AnyIO]): RECT_COLORS = { "figure": "yellow", "textline": "magenta", "textbox": "cyan", "textgroup": "red", "curve": "black", "page": "gray", } TEXT_COLORS = { "textbox": "blue", "char": "black", } def __init__( self, rsrcmgr: PDFResourceManager, outfp: AnyIO, codec: str = "utf-8", pageno: int = 1, laparams: Optional[LAParams] = None, scale: float = 1, fontscale: float = 1.0, layoutmode: str = "normal", showpageno: bool = True, pagemargin: int = 50, imagewriter: Optional[ImageWriter] = None, debug: int = 0, rect_colors: Optional[Dict[str, str]] = None, text_colors: Optional[Dict[str, str]] = None, ) -> None: PDFConverter.__init__( self, rsrcmgr, outfp, codec=codec, pageno=pageno, laparams=laparams ) # write() assumes a codec for binary I/O, or no codec for text I/O. if self.outfp_binary == (not self.codec): raise ValueError("Codec is required for a binary I/O output") if text_colors is None: text_colors = {"char": "black"} if rect_colors is None: rect_colors = {"curve": "black", "page": "gray"} self.scale = scale self.fontscale = fontscale self.layoutmode = layoutmode self.showpageno = showpageno self.pagemargin = pagemargin self.imagewriter = imagewriter self.rect_colors = rect_colors self.text_colors = text_colors if debug: self.rect_colors.update(self.RECT_COLORS) self.text_colors.update(self.TEXT_COLORS) self._yoffset: float = self.pagemargin self._font: Optional[Tuple[str, float]] = None self._fontstack: List[Optional[Tuple[str, float]]] = [] self.write_header() return def write(self, text: str) -> None: if self.codec: cast(BinaryIO, self.outfp).write(text.encode(self.codec)) else: cast(TextIO, self.outfp).write(text) return def write_header(self) -> None: self.write("<html><head>\n") if self.codec: s = ( '<meta http-equiv="Content-Type" content="text/html; ' 'charset=%s">\n' % self.codec ) else: s = '<meta http-equiv="Content-Type" content="text/html">\n' self.write(s) self.write("</head><body>\n") return def write_footer(self) -> None: page_links = [ '<a href="#{}">{}</a>'.format(i, i) for i in range(1, self.pageno) ] s = '<div style="position:absolute; top:0px;">Page: %s</div>\n' % ", ".join( page_links ) self.write(s) self.write("</body></html>\n") return def write_text(self, text: str) -> None: self.write(enc(text)) return def place_rect( self, color: str, borderwidth: int, x: float, y: float, w: float, h: float ) -> None: color2 = self.rect_colors.get(color) if color2 is not None: s = ( '<span style="position:absolute; border: %s %dpx solid; ' 'left:%dpx; top:%dpx; width:%dpx; height:%dpx;"></span>\n' % ( color2, borderwidth, x * self.scale, (self._yoffset - y) * self.scale, w * self.scale, h * self.scale, ) ) self.write(s) return def place_border(self, color: str, borderwidth: int, item: LTComponent) -> None: self.place_rect(color, borderwidth, item.x0, item.y1, item.width, item.height) return def place_image( self, item: LTImage, borderwidth: int, x: float, y: float, w: float, h: float ) -> None: if self.imagewriter is not None: name = self.imagewriter.export_image(item) s = ( '<img src="%s" border="%d" style="position:absolute; ' 'left:%dpx; top:%dpx;" width="%d" height="%d" />\n' % ( enc(name), borderwidth, x * self.scale, (self._yoffset - y) * self.scale, w * self.scale, h * self.scale, ) ) self.write(s) return def place_text( self, color: str, text: str, x: float, y: float, size: float ) -> None: color2 = self.text_colors.get(color) if color2 is not None: s = ( '<span style="position:absolute; color:%s; left:%dpx; ' 'top:%dpx; font-size:%dpx;">' % ( color2, x * self.scale, (self._yoffset - y) * self.scale, size * self.scale * self.fontscale, ) ) self.write(s) self.write_text(text) self.write("</span>\n") return def begin_div( self, color: str, borderwidth: int, x: float, y: float, w: float, h: float, writing_mode: str = "False", ) -> None: self._fontstack.append(self._font) self._font = None s = ( '<div style="position:absolute; border: %s %dpx solid; ' "writing-mode:%s; left:%dpx; top:%dpx; width:%dpx; " 'height:%dpx;">' % ( color, borderwidth, writing_mode, x * self.scale, (self._yoffset - y) * self.scale, w * self.scale, h * self.scale, ) ) self.write(s) return def end_div(self, color: str) -> None: if self._font is not None: self.write("</span>") self._font = self._fontstack.pop() self.write("</div>") return def put_text(self, text: str, fontname: str, fontsize: float) -> None: font = (fontname, fontsize) if font != self._font: if self._font is not None: self.write("</span>") # Remove subset tag from fontname, see PDF Reference 5.5.3 fontname_without_subset_tag = fontname.split("+")[-1] self.write( '<span style="font-family: %s; font-size:%dpx">' % (fontname_without_subset_tag, fontsize * self.scale * self.fontscale) ) self._font = font self.write_text(text) return def put_newline(self) -> None: self.write("<br>") return def receive_layout(self, ltpage: LTPage) -> None: def show_group(item: Union[LTTextGroup, TextGroupElement]) -> None: if isinstance(item, LTTextGroup): self.place_border("textgroup", 1, item) for child in item: show_group(child) return def render(item: LTItem) -> None: child: LTItem if isinstance(item, LTPage): self._yoffset += item.y1 self.place_border("page", 1, item) if self.showpageno: self.write( '<div style="position:absolute; top:%dpx;">' % ((self._yoffset - item.y1) * self.scale) ) self.write( '<a name="{}">Page {}</a></div>\n'.format( item.pageid, item.pageid ) ) for child in item: render(child) if item.groups is not None: for group in item.groups: show_group(group) elif isinstance(item, LTCurve): self.place_border("curve", 1, item) elif isinstance(item, LTFigure): self.begin_div("figure", 1, item.x0, item.y1, item.width, item.height) for child in item: render(child) self.end_div("figure") elif isinstance(item, LTImage): self.place_image(item, 1, item.x0, item.y1, item.width, item.height) else: if self.layoutmode == "exact": if isinstance(item, LTTextLine): self.place_border("textline", 1, item) for child in item: render(child) elif isinstance(item, LTTextBox): self.place_border("textbox", 1, item) self.place_text( "textbox", str(item.index + 1), item.x0, item.y1, 20 ) for child in item: render(child) elif isinstance(item, LTChar): self.place_border("char", 1, item) self.place_text( "char", item.get_text(), item.x0, item.y1, item.size ) else: if isinstance(item, LTTextLine): for child in item: render(child) if self.layoutmode != "loose": self.put_newline() elif isinstance(item, LTTextBox): self.begin_div( "textbox", 1, item.x0, item.y1, item.width, item.height, item.get_writing_mode(), ) for child in item: render(child) self.end_div("textbox") elif isinstance(item, LTChar): fontname = make_compat_str(item.fontname) self.put_text(item.get_text(), fontname, item.size) elif isinstance(item, LTText): self.write_text(item.get_text()) return render(ltpage) self._yoffset += self.pagemargin return def close(self) -> None: self.write_footer() return class XMLConverter(PDFConverter[AnyIO]): CONTROL = re.compile("[\x00-\x08\x0b-\x0c\x0e-\x1f]") def __init__( self, rsrcmgr: PDFResourceManager, outfp: AnyIO, codec: str = "utf-8", pageno: int = 1, laparams: Optional[LAParams] = None, imagewriter: Optional[ImageWriter] = None, stripcontrol: bool = False, ) -> None: PDFConverter.__init__( self, rsrcmgr, outfp, codec=codec, pageno=pageno, laparams=laparams ) # write() assumes a codec for binary I/O, or no codec for text I/O. if self.outfp_binary == (not self.codec): raise ValueError("Codec is required for a binary I/O output") self.imagewriter = imagewriter self.stripcontrol = stripcontrol self.write_header() return def write(self, text: str) -> None: if self.codec: cast(BinaryIO, self.outfp).write(text.encode(self.codec)) else: cast(TextIO, self.outfp).write(text) return def write_header(self) -> None: if self.codec: self.write('<?xml version="1.0" encoding="%s" ?>\n' % self.codec) else: self.write('<?xml version="1.0" ?>\n') self.write("<pages>\n") return def write_footer(self) -> None: self.write("</pages>\n") return def write_text(self, text: str) -> None: if self.stripcontrol: text = self.CONTROL.sub("", text) self.write(enc(text)) return def receive_layout(self, ltpage: LTPage) -> None: def show_group(item: LTItem) -> None: if isinstance(item, LTTextBox): self.write( '<textbox id="%d" bbox="%s" />\n' % (item.index, bbox2str(item.bbox)) ) elif isinstance(item, LTTextGroup): self.write('<textgroup bbox="%s">\n' % bbox2str(item.bbox)) for child in item: show_group(child) self.write("</textgroup>\n") return def render(item: LTItem) -> None: child: LTItem if isinstance(item, LTPage): s = '<page id="%s" bbox="%s" rotate="%d">\n' % ( item.pageid, bbox2str(item.bbox), item.rotate, ) self.write(s) for child in item: render(child) if item.groups is not None: self.write("<layout>\n") for group in item.groups: show_group(group) self.write("</layout>\n") self.write("</page>\n") elif isinstance(item, LTLine): s = '<line linewidth="%d" bbox="%s" />\n' % ( item.linewidth, bbox2str(item.bbox), ) self.write(s) elif isinstance(item, LTRect): s = '<rect linewidth="%d" bbox="%s" />\n' % ( item.linewidth, bbox2str(item.bbox), ) self.write(s) elif isinstance(item, LTCurve): s = '<curve linewidth="%d" bbox="%s" pts="%s"/>\n' % ( item.linewidth, bbox2str(item.bbox), item.get_pts(), ) self.write(s) elif isinstance(item, LTFigure): s = '<figure name="%s" bbox="%s">\n' % (item.name, bbox2str(item.bbox)) self.write(s) for child in item: render(child) self.write("</figure>\n") elif isinstance(item, LTTextLine): self.write('<textline bbox="%s">\n' % bbox2str(item.bbox)) for child in item: render(child) self.write("</textline>\n") elif isinstance(item, LTTextBox): wmode = "" if isinstance(item, LTTextBoxVertical): wmode = ' wmode="vertical"' s = '<textbox id="%d" bbox="%s"%s>\n' % ( item.index, bbox2str(item.bbox), wmode, ) self.write(s) for child in item: render(child) self.write("</textbox>\n") elif isinstance(item, LTChar): s = ( '<text font="%s" bbox="%s" colourspace="%s" ' 'ncolour="%s" size="%.3f">' % ( enc(item.fontname), bbox2str(item.bbox), item.ncs.name, item.graphicstate.ncolor, item.size, ) ) self.write(s) self.write_text(item.get_text()) self.write("</text>\n") elif isinstance(item, LTText): self.write("<text>%s</text>\n" % item.get_text()) elif isinstance(item, LTImage): if self.imagewriter is not None: name = self.imagewriter.export_image(item) self.write( '<image src="%s" width="%d" height="%d" />\n' % (enc(name), item.width, item.height) ) else: self.write( '<image width="%d" height="%d" />\n' % (item.width, item.height) ) else: assert False, str(("Unhandled", item)) return render(ltpage) return def close(self) -> None: self.write_footer() return
20220429-pdfminer-jameslp310
/20220429_pdfminer_jameslp310-0.0.2-py3-none-any.whl/pdfminer/converter.py
converter.py
""" Font metrics for the Adobe core 14 fonts. Font metrics are used to compute the boundary of each character written with a proportional font. The following data were extracted from the AFM files: http://www.ctan.org/tex-archive/fonts/adobe/afm/ """ ### BEGIN Verbatim copy of the license part # # Adobe Core 35 AFM Files with 314 Glyph Entries - ReadMe # # This file and the 35 PostScript(R) AFM files it accompanies may be # used, copied, and distributed for any purpose and without charge, # with or without modification, provided that all copyright notices # are retained; that the AFM files are not distributed without this # file; that all modifications to this file or any of the AFM files # are prominently noted in the modified file(s); and that this # paragraph is not modified. Adobe Systems has no responsibility or # obligation to support the use of the AFM files. # ### END Verbatim copy of the license part # flake8: noqa FONT_METRICS = { "Courier": ( { "FontName": "Courier", "Descent": -194.0, "FontBBox": (-6.0, -249.0, 639.0, 803.0), "FontWeight": "Medium", "CapHeight": 572.0, "FontFamily": "Courier", "Flags": 64, "XHeight": 434.0, "ItalicAngle": 0.0, "Ascent": 627.0, }, { " ": 600, "!": 600, '"': 600, "#": 600, "$": 600, "%": 600, "&": 600, "'": 600, "(": 600, ")": 600, "*": 600, "+": 600, ",": 600, "-": 600, ".": 600, "/": 600, "0": 600, "1": 600, "2": 600, "3": 600, "4": 600, "5": 600, "6": 600, "7": 600, "8": 600, "9": 600, ":": 600, ";": 600, "<": 600, "=": 600, ">": 600, "?": 600, "@": 600, "A": 600, "B": 600, "C": 600, "D": 600, "E": 600, "F": 600, "G": 600, "H": 600, "I": 600, "J": 600, "K": 600, "L": 600, "M": 600, "N": 600, "O": 600, "P": 600, "Q": 600, "R": 600, "S": 600, "T": 600, "U": 600, "V": 600, "W": 600, "X": 600, "Y": 600, "Z": 600, "[": 600, "\\": 600, "]": 600, "^": 600, "_": 600, "`": 600, "a": 600, "b": 600, "c": 600, "d": 600, "e": 600, "f": 600, "g": 600, "h": 600, "i": 600, "j": 600, "k": 600, "l": 600, "m": 600, "n": 600, "o": 600, "p": 600, "q": 600, "r": 600, "s": 600, "t": 600, "u": 600, "v": 600, "w": 600, "x": 600, "y": 600, "z": 600, "{": 600, "|": 600, "}": 600, "~": 600, "\xa1": 600, "\xa2": 600, "\xa3": 600, "\xa4": 600, "\xa5": 600, "\xa6": 600, "\xa7": 600, "\xa8": 600, "\xa9": 600, "\xaa": 600, "\xab": 600, "\xac": 600, "\xae": 600, "\xaf": 600, "\xb0": 600, "\xb1": 600, "\xb2": 600, "\xb3": 600, "\xb4": 600, "\xb5": 600, "\xb6": 600, "\xb7": 600, "\xb8": 600, "\xb9": 600, "\xba": 600, "\xbb": 600, "\xbc": 600, "\xbd": 600, "\xbe": 600, "\xbf": 600, "\xc0": 600, "\xc1": 600, "\xc2": 600, "\xc3": 600, "\xc4": 600, "\xc5": 600, "\xc6": 600, "\xc7": 600, "\xc8": 600, "\xc9": 600, "\xca": 600, "\xcb": 600, "\xcc": 600, "\xcd": 600, "\xce": 600, "\xcf": 600, "\xd0": 600, "\xd1": 600, "\xd2": 600, "\xd3": 600, "\xd4": 600, "\xd5": 600, "\xd6": 600, "\xd7": 600, "\xd8": 600, "\xd9": 600, "\xda": 600, "\xdb": 600, "\xdc": 600, "\xdd": 600, "\xde": 600, "\xdf": 600, "\xe0": 600, "\xe1": 600, "\xe2": 600, "\xe3": 600, "\xe4": 600, "\xe5": 600, "\xe6": 600, "\xe7": 600, "\xe8": 600, "\xe9": 600, "\xea": 600, "\xeb": 600, "\xec": 600, "\xed": 600, "\xee": 600, "\xef": 600, "\xf0": 600, "\xf1": 600, "\xf2": 600, "\xf3": 600, "\xf4": 600, "\xf5": 600, "\xf6": 600, "\xf7": 600, "\xf8": 600, "\xf9": 600, "\xfa": 600, "\xfb": 600, "\xfc": 600, "\xfd": 600, "\xfe": 600, "\xff": 600, "\u0100": 600, "\u0101": 600, "\u0102": 600, "\u0103": 600, "\u0104": 600, "\u0105": 600, "\u0106": 600, "\u0107": 600, "\u010c": 600, "\u010d": 600, "\u010e": 600, "\u010f": 600, "\u0110": 600, "\u0111": 600, "\u0112": 600, "\u0113": 600, "\u0116": 600, "\u0117": 600, "\u0118": 600, "\u0119": 600, "\u011a": 600, "\u011b": 600, "\u011e": 600, "\u011f": 600, "\u0122": 600, "\u0123": 600, "\u012a": 600, "\u012b": 600, "\u012e": 600, "\u012f": 600, "\u0130": 600, "\u0131": 600, "\u0136": 600, "\u0137": 600, "\u0139": 600, "\u013a": 600, "\u013b": 600, "\u013c": 600, "\u013d": 600, "\u013e": 600, "\u0141": 600, "\u0142": 600, "\u0143": 600, "\u0144": 600, "\u0145": 600, "\u0146": 600, "\u0147": 600, "\u0148": 600, "\u014c": 600, "\u014d": 600, "\u0150": 600, "\u0151": 600, "\u0152": 600, "\u0153": 600, "\u0154": 600, "\u0155": 600, "\u0156": 600, "\u0157": 600, "\u0158": 600, "\u0159": 600, "\u015a": 600, "\u015b": 600, "\u015e": 600, "\u015f": 600, "\u0160": 600, "\u0161": 600, "\u0162": 600, "\u0163": 600, "\u0164": 600, "\u0165": 600, "\u016a": 600, "\u016b": 600, "\u016e": 600, "\u016f": 600, "\u0170": 600, "\u0171": 600, "\u0172": 600, "\u0173": 600, "\u0178": 600, "\u0179": 600, "\u017a": 600, "\u017b": 600, "\u017c": 600, "\u017d": 600, "\u017e": 600, "\u0192": 600, "\u0218": 600, "\u0219": 600, "\u02c6": 600, "\u02c7": 600, "\u02d8": 600, "\u02d9": 600, "\u02da": 600, "\u02db": 600, "\u02dc": 600, "\u02dd": 600, "\u2013": 600, "\u2014": 600, "\u2018": 600, "\u2019": 600, "\u201a": 600, "\u201c": 600, "\u201d": 600, "\u201e": 600, "\u2020": 600, "\u2021": 600, "\u2022": 600, "\u2026": 600, "\u2030": 600, "\u2039": 600, "\u203a": 600, "\u2044": 600, "\u2122": 600, "\u2202": 600, "\u2206": 600, "\u2211": 600, "\u2212": 600, "\u221a": 600, "\u2260": 600, "\u2264": 600, "\u2265": 600, "\u25ca": 600, "\uf6c3": 600, "\ufb01": 600, "\ufb02": 600, }, ), "Courier-Bold": ( { "FontName": "Courier-Bold", "Descent": -194.0, "FontBBox": (-88.0, -249.0, 697.0, 811.0), "FontWeight": "Bold", "CapHeight": 572.0, "FontFamily": "Courier", "Flags": 64, "XHeight": 434.0, "ItalicAngle": 0.0, "Ascent": 627.0, }, { " ": 600, "!": 600, '"': 600, "#": 600, "$": 600, "%": 600, "&": 600, "'": 600, "(": 600, ")": 600, "*": 600, "+": 600, ",": 600, "-": 600, ".": 600, "/": 600, "0": 600, "1": 600, "2": 600, "3": 600, "4": 600, "5": 600, "6": 600, "7": 600, "8": 600, "9": 600, ":": 600, ";": 600, "<": 600, "=": 600, ">": 600, "?": 600, "@": 600, "A": 600, "B": 600, "C": 600, "D": 600, "E": 600, "F": 600, "G": 600, "H": 600, "I": 600, "J": 600, "K": 600, "L": 600, "M": 600, "N": 600, "O": 600, "P": 600, "Q": 600, "R": 600, "S": 600, "T": 600, "U": 600, "V": 600, "W": 600, "X": 600, "Y": 600, "Z": 600, "[": 600, "\\": 600, "]": 600, "^": 600, "_": 600, "`": 600, "a": 600, "b": 600, "c": 600, "d": 600, "e": 600, "f": 600, "g": 600, "h": 600, "i": 600, "j": 600, "k": 600, "l": 600, "m": 600, "n": 600, "o": 600, "p": 600, "q": 600, "r": 600, "s": 600, "t": 600, "u": 600, "v": 600, "w": 600, "x": 600, "y": 600, "z": 600, "{": 600, "|": 600, "}": 600, "~": 600, "\xa1": 600, "\xa2": 600, "\xa3": 600, "\xa4": 600, "\xa5": 600, "\xa6": 600, "\xa7": 600, "\xa8": 600, "\xa9": 600, "\xaa": 600, "\xab": 600, "\xac": 600, "\xae": 600, "\xaf": 600, "\xb0": 600, "\xb1": 600, "\xb2": 600, "\xb3": 600, "\xb4": 600, "\xb5": 600, "\xb6": 600, "\xb7": 600, "\xb8": 600, "\xb9": 600, "\xba": 600, "\xbb": 600, "\xbc": 600, "\xbd": 600, "\xbe": 600, "\xbf": 600, "\xc0": 600, "\xc1": 600, "\xc2": 600, "\xc3": 600, "\xc4": 600, "\xc5": 600, "\xc6": 600, "\xc7": 600, "\xc8": 600, "\xc9": 600, "\xca": 600, "\xcb": 600, "\xcc": 600, "\xcd": 600, "\xce": 600, "\xcf": 600, "\xd0": 600, "\xd1": 600, "\xd2": 600, "\xd3": 600, "\xd4": 600, "\xd5": 600, "\xd6": 600, "\xd7": 600, "\xd8": 600, "\xd9": 600, "\xda": 600, "\xdb": 600, "\xdc": 600, "\xdd": 600, "\xde": 600, "\xdf": 600, "\xe0": 600, "\xe1": 600, "\xe2": 600, "\xe3": 600, "\xe4": 600, "\xe5": 600, "\xe6": 600, "\xe7": 600, "\xe8": 600, "\xe9": 600, "\xea": 600, "\xeb": 600, "\xec": 600, "\xed": 600, "\xee": 600, "\xef": 600, "\xf0": 600, "\xf1": 600, "\xf2": 600, "\xf3": 600, "\xf4": 600, "\xf5": 600, "\xf6": 600, "\xf7": 600, "\xf8": 600, "\xf9": 600, "\xfa": 600, "\xfb": 600, "\xfc": 600, "\xfd": 600, "\xfe": 600, "\xff": 600, "\u0100": 600, "\u0101": 600, "\u0102": 600, "\u0103": 600, "\u0104": 600, "\u0105": 600, "\u0106": 600, "\u0107": 600, "\u010c": 600, "\u010d": 600, "\u010e": 600, "\u010f": 600, "\u0110": 600, "\u0111": 600, "\u0112": 600, "\u0113": 600, "\u0116": 600, "\u0117": 600, "\u0118": 600, "\u0119": 600, "\u011a": 600, "\u011b": 600, "\u011e": 600, "\u011f": 600, "\u0122": 600, "\u0123": 600, "\u012a": 600, "\u012b": 600, "\u012e": 600, "\u012f": 600, "\u0130": 600, "\u0131": 600, "\u0136": 600, "\u0137": 600, "\u0139": 600, "\u013a": 600, "\u013b": 600, "\u013c": 600, "\u013d": 600, "\u013e": 600, "\u0141": 600, "\u0142": 600, "\u0143": 600, "\u0144": 600, "\u0145": 600, "\u0146": 600, "\u0147": 600, "\u0148": 600, "\u014c": 600, "\u014d": 600, "\u0150": 600, "\u0151": 600, "\u0152": 600, "\u0153": 600, "\u0154": 600, "\u0155": 600, "\u0156": 600, "\u0157": 600, "\u0158": 600, "\u0159": 600, "\u015a": 600, "\u015b": 600, "\u015e": 600, "\u015f": 600, "\u0160": 600, "\u0161": 600, "\u0162": 600, "\u0163": 600, "\u0164": 600, "\u0165": 600, "\u016a": 600, "\u016b": 600, "\u016e": 600, "\u016f": 600, "\u0170": 600, "\u0171": 600, "\u0172": 600, "\u0173": 600, "\u0178": 600, "\u0179": 600, "\u017a": 600, "\u017b": 600, "\u017c": 600, "\u017d": 600, "\u017e": 600, "\u0192": 600, "\u0218": 600, "\u0219": 600, "\u02c6": 600, "\u02c7": 600, "\u02d8": 600, "\u02d9": 600, "\u02da": 600, "\u02db": 600, "\u02dc": 600, "\u02dd": 600, "\u2013": 600, "\u2014": 600, "\u2018": 600, "\u2019": 600, "\u201a": 600, "\u201c": 600, "\u201d": 600, "\u201e": 600, "\u2020": 600, "\u2021": 600, "\u2022": 600, "\u2026": 600, "\u2030": 600, "\u2039": 600, "\u203a": 600, "\u2044": 600, "\u2122": 600, "\u2202": 600, "\u2206": 600, "\u2211": 600, "\u2212": 600, "\u221a": 600, "\u2260": 600, "\u2264": 600, "\u2265": 600, "\u25ca": 600, "\uf6c3": 600, "\ufb01": 600, "\ufb02": 600, }, ), "Courier-BoldOblique": ( { "FontName": "Courier-BoldOblique", "Descent": -194.0, "FontBBox": (-49.0, -249.0, 758.0, 811.0), "FontWeight": "Bold", "CapHeight": 572.0, "FontFamily": "Courier", "Flags": 64, "XHeight": 434.0, "ItalicAngle": -11.0, "Ascent": 627.0, }, { " ": 600, "!": 600, '"': 600, "#": 600, "$": 600, "%": 600, "&": 600, "'": 600, "(": 600, ")": 600, "*": 600, "+": 600, ",": 600, "-": 600, ".": 600, "/": 600, "0": 600, "1": 600, "2": 600, "3": 600, "4": 600, "5": 600, "6": 600, "7": 600, "8": 600, "9": 600, ":": 600, ";": 600, "<": 600, "=": 600, ">": 600, "?": 600, "@": 600, "A": 600, "B": 600, "C": 600, "D": 600, "E": 600, "F": 600, "G": 600, "H": 600, "I": 600, "J": 600, "K": 600, "L": 600, "M": 600, "N": 600, "O": 600, "P": 600, "Q": 600, "R": 600, "S": 600, "T": 600, "U": 600, "V": 600, "W": 600, "X": 600, "Y": 600, "Z": 600, "[": 600, "\\": 600, "]": 600, "^": 600, "_": 600, "`": 600, "a": 600, "b": 600, "c": 600, "d": 600, "e": 600, "f": 600, "g": 600, "h": 600, "i": 600, "j": 600, "k": 600, "l": 600, "m": 600, "n": 600, "o": 600, "p": 600, "q": 600, "r": 600, "s": 600, "t": 600, "u": 600, "v": 600, "w": 600, "x": 600, "y": 600, "z": 600, "{": 600, "|": 600, "}": 600, "~": 600, "\xa1": 600, "\xa2": 600, "\xa3": 600, "\xa4": 600, "\xa5": 600, "\xa6": 600, "\xa7": 600, "\xa8": 600, "\xa9": 600, "\xaa": 600, "\xab": 600, "\xac": 600, "\xae": 600, "\xaf": 600, "\xb0": 600, "\xb1": 600, "\xb2": 600, "\xb3": 600, "\xb4": 600, "\xb5": 600, "\xb6": 600, "\xb7": 600, "\xb8": 600, "\xb9": 600, "\xba": 600, "\xbb": 600, "\xbc": 600, "\xbd": 600, "\xbe": 600, "\xbf": 600, "\xc0": 600, "\xc1": 600, "\xc2": 600, "\xc3": 600, "\xc4": 600, "\xc5": 600, "\xc6": 600, "\xc7": 600, "\xc8": 600, "\xc9": 600, "\xca": 600, "\xcb": 600, "\xcc": 600, "\xcd": 600, "\xce": 600, "\xcf": 600, "\xd0": 600, "\xd1": 600, "\xd2": 600, "\xd3": 600, "\xd4": 600, "\xd5": 600, "\xd6": 600, "\xd7": 600, "\xd8": 600, "\xd9": 600, "\xda": 600, "\xdb": 600, "\xdc": 600, "\xdd": 600, "\xde": 600, "\xdf": 600, "\xe0": 600, "\xe1": 600, "\xe2": 600, "\xe3": 600, "\xe4": 600, "\xe5": 600, "\xe6": 600, "\xe7": 600, "\xe8": 600, "\xe9": 600, "\xea": 600, "\xeb": 600, "\xec": 600, "\xed": 600, "\xee": 600, "\xef": 600, "\xf0": 600, "\xf1": 600, "\xf2": 600, "\xf3": 600, "\xf4": 600, "\xf5": 600, "\xf6": 600, "\xf7": 600, "\xf8": 600, "\xf9": 600, "\xfa": 600, "\xfb": 600, "\xfc": 600, "\xfd": 600, "\xfe": 600, "\xff": 600, "\u0100": 600, "\u0101": 600, "\u0102": 600, "\u0103": 600, "\u0104": 600, "\u0105": 600, "\u0106": 600, "\u0107": 600, "\u010c": 600, "\u010d": 600, "\u010e": 600, "\u010f": 600, "\u0110": 600, "\u0111": 600, "\u0112": 600, "\u0113": 600, "\u0116": 600, "\u0117": 600, "\u0118": 600, "\u0119": 600, "\u011a": 600, "\u011b": 600, "\u011e": 600, "\u011f": 600, "\u0122": 600, "\u0123": 600, "\u012a": 600, "\u012b": 600, "\u012e": 600, "\u012f": 600, "\u0130": 600, "\u0131": 600, "\u0136": 600, "\u0137": 600, "\u0139": 600, "\u013a": 600, "\u013b": 600, "\u013c": 600, "\u013d": 600, "\u013e": 600, "\u0141": 600, "\u0142": 600, "\u0143": 600, "\u0144": 600, "\u0145": 600, "\u0146": 600, "\u0147": 600, "\u0148": 600, "\u014c": 600, "\u014d": 600, "\u0150": 600, "\u0151": 600, "\u0152": 600, "\u0153": 600, "\u0154": 600, "\u0155": 600, "\u0156": 600, "\u0157": 600, "\u0158": 600, "\u0159": 600, "\u015a": 600, "\u015b": 600, "\u015e": 600, "\u015f": 600, "\u0160": 600, "\u0161": 600, "\u0162": 600, "\u0163": 600, "\u0164": 600, "\u0165": 600, "\u016a": 600, "\u016b": 600, "\u016e": 600, "\u016f": 600, "\u0170": 600, "\u0171": 600, "\u0172": 600, "\u0173": 600, "\u0178": 600, "\u0179": 600, "\u017a": 600, "\u017b": 600, "\u017c": 600, "\u017d": 600, "\u017e": 600, "\u0192": 600, "\u0218": 600, "\u0219": 600, "\u02c6": 600, "\u02c7": 600, "\u02d8": 600, "\u02d9": 600, "\u02da": 600, "\u02db": 600, "\u02dc": 600, "\u02dd": 600, "\u2013": 600, "\u2014": 600, "\u2018": 600, "\u2019": 600, "\u201a": 600, "\u201c": 600, "\u201d": 600, "\u201e": 600, "\u2020": 600, "\u2021": 600, "\u2022": 600, "\u2026": 600, "\u2030": 600, "\u2039": 600, "\u203a": 600, "\u2044": 600, "\u2122": 600, "\u2202": 600, "\u2206": 600, "\u2211": 600, "\u2212": 600, "\u221a": 600, "\u2260": 600, "\u2264": 600, "\u2265": 600, "\u25ca": 600, "\uf6c3": 600, "\ufb01": 600, "\ufb02": 600, }, ), "Courier-Oblique": ( { "FontName": "Courier-Oblique", "Descent": -194.0, "FontBBox": (-49.0, -249.0, 749.0, 803.0), "FontWeight": "Medium", "CapHeight": 572.0, "FontFamily": "Courier", "Flags": 64, "XHeight": 434.0, "ItalicAngle": -11.0, "Ascent": 627.0, }, { " ": 600, "!": 600, '"': 600, "#": 600, "$": 600, "%": 600, "&": 600, "'": 600, "(": 600, ")": 600, "*": 600, "+": 600, ",": 600, "-": 600, ".": 600, "/": 600, "0": 600, "1": 600, "2": 600, "3": 600, "4": 600, "5": 600, "6": 600, "7": 600, "8": 600, "9": 600, ":": 600, ";": 600, "<": 600, "=": 600, ">": 600, "?": 600, "@": 600, "A": 600, "B": 600, "C": 600, "D": 600, "E": 600, "F": 600, "G": 600, "H": 600, "I": 600, "J": 600, "K": 600, "L": 600, "M": 600, "N": 600, "O": 600, "P": 600, "Q": 600, "R": 600, "S": 600, "T": 600, "U": 600, "V": 600, "W": 600, "X": 600, "Y": 600, "Z": 600, "[": 600, "\\": 600, "]": 600, "^": 600, "_": 600, "`": 600, "a": 600, "b": 600, "c": 600, "d": 600, "e": 600, "f": 600, "g": 600, "h": 600, "i": 600, "j": 600, "k": 600, "l": 600, "m": 600, "n": 600, "o": 600, "p": 600, "q": 600, "r": 600, "s": 600, "t": 600, "u": 600, "v": 600, "w": 600, "x": 600, "y": 600, "z": 600, "{": 600, "|": 600, "}": 600, "~": 600, "\xa1": 600, "\xa2": 600, "\xa3": 600, "\xa4": 600, "\xa5": 600, "\xa6": 600, "\xa7": 600, "\xa8": 600, "\xa9": 600, "\xaa": 600, "\xab": 600, "\xac": 600, "\xae": 600, "\xaf": 600, "\xb0": 600, "\xb1": 600, "\xb2": 600, "\xb3": 600, "\xb4": 600, "\xb5": 600, "\xb6": 600, "\xb7": 600, "\xb8": 600, "\xb9": 600, "\xba": 600, "\xbb": 600, "\xbc": 600, "\xbd": 600, "\xbe": 600, "\xbf": 600, "\xc0": 600, "\xc1": 600, "\xc2": 600, "\xc3": 600, "\xc4": 600, "\xc5": 600, "\xc6": 600, "\xc7": 600, "\xc8": 600, "\xc9": 600, "\xca": 600, "\xcb": 600, "\xcc": 600, "\xcd": 600, "\xce": 600, "\xcf": 600, "\xd0": 600, "\xd1": 600, "\xd2": 600, "\xd3": 600, "\xd4": 600, "\xd5": 600, "\xd6": 600, "\xd7": 600, "\xd8": 600, "\xd9": 600, "\xda": 600, "\xdb": 600, "\xdc": 600, "\xdd": 600, "\xde": 600, "\xdf": 600, "\xe0": 600, "\xe1": 600, "\xe2": 600, "\xe3": 600, "\xe4": 600, "\xe5": 600, "\xe6": 600, "\xe7": 600, "\xe8": 600, "\xe9": 600, "\xea": 600, "\xeb": 600, "\xec": 600, "\xed": 600, "\xee": 600, "\xef": 600, "\xf0": 600, "\xf1": 600, "\xf2": 600, "\xf3": 600, "\xf4": 600, "\xf5": 600, "\xf6": 600, "\xf7": 600, "\xf8": 600, "\xf9": 600, "\xfa": 600, "\xfb": 600, "\xfc": 600, "\xfd": 600, "\xfe": 600, "\xff": 600, "\u0100": 600, "\u0101": 600, "\u0102": 600, "\u0103": 600, "\u0104": 600, "\u0105": 600, "\u0106": 600, "\u0107": 600, "\u010c": 600, "\u010d": 600, "\u010e": 600, "\u010f": 600, "\u0110": 600, "\u0111": 600, "\u0112": 600, "\u0113": 600, "\u0116": 600, "\u0117": 600, "\u0118": 600, "\u0119": 600, "\u011a": 600, "\u011b": 600, "\u011e": 600, "\u011f": 600, "\u0122": 600, "\u0123": 600, "\u012a": 600, "\u012b": 600, "\u012e": 600, "\u012f": 600, "\u0130": 600, "\u0131": 600, "\u0136": 600, "\u0137": 600, "\u0139": 600, "\u013a": 600, "\u013b": 600, "\u013c": 600, "\u013d": 600, "\u013e": 600, "\u0141": 600, "\u0142": 600, "\u0143": 600, "\u0144": 600, "\u0145": 600, "\u0146": 600, "\u0147": 600, "\u0148": 600, "\u014c": 600, "\u014d": 600, "\u0150": 600, "\u0151": 600, "\u0152": 600, "\u0153": 600, "\u0154": 600, "\u0155": 600, "\u0156": 600, "\u0157": 600, "\u0158": 600, "\u0159": 600, "\u015a": 600, "\u015b": 600, "\u015e": 600, "\u015f": 600, "\u0160": 600, "\u0161": 600, "\u0162": 600, "\u0163": 600, "\u0164": 600, "\u0165": 600, "\u016a": 600, "\u016b": 600, "\u016e": 600, "\u016f": 600, "\u0170": 600, "\u0171": 600, "\u0172": 600, "\u0173": 600, "\u0178": 600, "\u0179": 600, "\u017a": 600, "\u017b": 600, "\u017c": 600, "\u017d": 600, "\u017e": 600, "\u0192": 600, "\u0218": 600, "\u0219": 600, "\u02c6": 600, "\u02c7": 600, "\u02d8": 600, "\u02d9": 600, "\u02da": 600, "\u02db": 600, "\u02dc": 600, "\u02dd": 600, "\u2013": 600, "\u2014": 600, "\u2018": 600, "\u2019": 600, "\u201a": 600, "\u201c": 600, "\u201d": 600, "\u201e": 600, "\u2020": 600, "\u2021": 600, "\u2022": 600, "\u2026": 600, "\u2030": 600, "\u2039": 600, "\u203a": 600, "\u2044": 600, "\u2122": 600, "\u2202": 600, "\u2206": 600, "\u2211": 600, "\u2212": 600, "\u221a": 600, "\u2260": 600, "\u2264": 600, "\u2265": 600, "\u25ca": 600, "\uf6c3": 600, "\ufb01": 600, "\ufb02": 600, }, ), "Helvetica": ( { "FontName": "Helvetica", "Descent": -207.0, "FontBBox": (-166.0, -225.0, 1000.0, 931.0), "FontWeight": "Medium", "CapHeight": 718.0, "FontFamily": "Helvetica", "Flags": 0, "XHeight": 523.0, "ItalicAngle": 0.0, "Ascent": 718.0, }, { " ": 278, "!": 278, '"': 355, "#": 556, "$": 556, "%": 889, "&": 667, "'": 191, "(": 333, ")": 333, "*": 389, "+": 584, ",": 278, "-": 333, ".": 278, "/": 278, "0": 556, "1": 556, "2": 556, "3": 556, "4": 556, "5": 556, "6": 556, "7": 556, "8": 556, "9": 556, ":": 278, ";": 278, "<": 584, "=": 584, ">": 584, "?": 556, "@": 1015, "A": 667, "B": 667, "C": 722, "D": 722, "E": 667, "F": 611, "G": 778, "H": 722, "I": 278, "J": 500, "K": 667, "L": 556, "M": 833, "N": 722, "O": 778, "P": 667, "Q": 778, "R": 722, "S": 667, "T": 611, "U": 722, "V": 667, "W": 944, "X": 667, "Y": 667, "Z": 611, "[": 278, "\\": 278, "]": 278, "^": 469, "_": 556, "`": 333, "a": 556, "b": 556, "c": 500, "d": 556, "e": 556, "f": 278, "g": 556, "h": 556, "i": 222, "j": 222, "k": 500, "l": 222, "m": 833, "n": 556, "o": 556, "p": 556, "q": 556, "r": 333, "s": 500, "t": 278, "u": 556, "v": 500, "w": 722, "x": 500, "y": 500, "z": 500, "{": 334, "|": 260, "}": 334, "~": 584, "\xa1": 333, "\xa2": 556, "\xa3": 556, "\xa4": 556, "\xa5": 556, "\xa6": 260, "\xa7": 556, "\xa8": 333, "\xa9": 737, "\xaa": 370, "\xab": 556, "\xac": 584, "\xae": 737, "\xaf": 333, "\xb0": 400, "\xb1": 584, "\xb2": 333, "\xb3": 333, "\xb4": 333, "\xb5": 556, "\xb6": 537, "\xb7": 278, "\xb8": 333, "\xb9": 333, "\xba": 365, "\xbb": 556, "\xbc": 834, "\xbd": 834, "\xbe": 834, "\xbf": 611, "\xc0": 667, "\xc1": 667, "\xc2": 667, "\xc3": 667, "\xc4": 667, "\xc5": 667, "\xc6": 1000, "\xc7": 722, "\xc8": 667, "\xc9": 667, "\xca": 667, "\xcb": 667, "\xcc": 278, "\xcd": 278, "\xce": 278, "\xcf": 278, "\xd0": 722, "\xd1": 722, "\xd2": 778, "\xd3": 778, "\xd4": 778, "\xd5": 778, "\xd6": 778, "\xd7": 584, "\xd8": 778, "\xd9": 722, "\xda": 722, "\xdb": 722, "\xdc": 722, "\xdd": 667, "\xde": 667, "\xdf": 611, "\xe0": 556, "\xe1": 556, "\xe2": 556, "\xe3": 556, "\xe4": 556, "\xe5": 556, "\xe6": 889, "\xe7": 500, "\xe8": 556, "\xe9": 556, "\xea": 556, "\xeb": 556, "\xec": 278, "\xed": 278, "\xee": 278, "\xef": 278, "\xf0": 556, "\xf1": 556, "\xf2": 556, "\xf3": 556, "\xf4": 556, "\xf5": 556, "\xf6": 556, "\xf7": 584, "\xf8": 611, "\xf9": 556, "\xfa": 556, "\xfb": 556, "\xfc": 556, "\xfd": 500, "\xfe": 556, "\xff": 500, "\u0100": 667, "\u0101": 556, "\u0102": 667, "\u0103": 556, "\u0104": 667, "\u0105": 556, "\u0106": 722, "\u0107": 500, "\u010c": 722, "\u010d": 500, "\u010e": 722, "\u010f": 643, "\u0110": 722, "\u0111": 556, "\u0112": 667, "\u0113": 556, "\u0116": 667, "\u0117": 556, "\u0118": 667, "\u0119": 556, "\u011a": 667, "\u011b": 556, "\u011e": 778, "\u011f": 556, "\u0122": 778, "\u0123": 556, "\u012a": 278, "\u012b": 278, "\u012e": 278, "\u012f": 222, "\u0130": 278, "\u0131": 278, "\u0136": 667, "\u0137": 500, "\u0139": 556, "\u013a": 222, "\u013b": 556, "\u013c": 222, "\u013d": 556, "\u013e": 299, "\u0141": 556, "\u0142": 222, "\u0143": 722, "\u0144": 556, "\u0145": 722, "\u0146": 556, "\u0147": 722, "\u0148": 556, "\u014c": 778, "\u014d": 556, "\u0150": 778, "\u0151": 556, "\u0152": 1000, "\u0153": 944, "\u0154": 722, "\u0155": 333, "\u0156": 722, "\u0157": 333, "\u0158": 722, "\u0159": 333, "\u015a": 667, "\u015b": 500, "\u015e": 667, "\u015f": 500, "\u0160": 667, "\u0161": 500, "\u0162": 611, "\u0163": 278, "\u0164": 611, "\u0165": 317, "\u016a": 722, "\u016b": 556, "\u016e": 722, "\u016f": 556, "\u0170": 722, "\u0171": 556, "\u0172": 722, "\u0173": 556, "\u0178": 667, "\u0179": 611, "\u017a": 500, "\u017b": 611, "\u017c": 500, "\u017d": 611, "\u017e": 500, "\u0192": 556, "\u0218": 667, "\u0219": 500, "\u02c6": 333, "\u02c7": 333, "\u02d8": 333, "\u02d9": 333, "\u02da": 333, "\u02db": 333, "\u02dc": 333, "\u02dd": 333, "\u2013": 556, "\u2014": 1000, "\u2018": 222, "\u2019": 222, "\u201a": 222, "\u201c": 333, "\u201d": 333, "\u201e": 333, "\u2020": 556, "\u2021": 556, "\u2022": 350, "\u2026": 1000, "\u2030": 1000, "\u2039": 333, "\u203a": 333, "\u2044": 167, "\u2122": 1000, "\u2202": 476, "\u2206": 612, "\u2211": 600, "\u2212": 584, "\u221a": 453, "\u2260": 549, "\u2264": 549, "\u2265": 549, "\u25ca": 471, "\uf6c3": 250, "\ufb01": 500, "\ufb02": 500, }, ), "Helvetica-Bold": ( { "FontName": "Helvetica-Bold", "Descent": -207.0, "FontBBox": (-170.0, -228.0, 1003.0, 962.0), "FontWeight": "Bold", "CapHeight": 718.0, "FontFamily": "Helvetica", "Flags": 0, "XHeight": 532.0, "ItalicAngle": 0.0, "Ascent": 718.0, }, { " ": 278, "!": 333, '"': 474, "#": 556, "$": 556, "%": 889, "&": 722, "'": 238, "(": 333, ")": 333, "*": 389, "+": 584, ",": 278, "-": 333, ".": 278, "/": 278, "0": 556, "1": 556, "2": 556, "3": 556, "4": 556, "5": 556, "6": 556, "7": 556, "8": 556, "9": 556, ":": 333, ";": 333, "<": 584, "=": 584, ">": 584, "?": 611, "@": 975, "A": 722, "B": 722, "C": 722, "D": 722, "E": 667, "F": 611, "G": 778, "H": 722, "I": 278, "J": 556, "K": 722, "L": 611, "M": 833, "N": 722, "O": 778, "P": 667, "Q": 778, "R": 722, "S": 667, "T": 611, "U": 722, "V": 667, "W": 944, "X": 667, "Y": 667, "Z": 611, "[": 333, "\\": 278, "]": 333, "^": 584, "_": 556, "`": 333, "a": 556, "b": 611, "c": 556, "d": 611, "e": 556, "f": 333, "g": 611, "h": 611, "i": 278, "j": 278, "k": 556, "l": 278, "m": 889, "n": 611, "o": 611, "p": 611, "q": 611, "r": 389, "s": 556, "t": 333, "u": 611, "v": 556, "w": 778, "x": 556, "y": 556, "z": 500, "{": 389, "|": 280, "}": 389, "~": 584, "\xa1": 333, "\xa2": 556, "\xa3": 556, "\xa4": 556, "\xa5": 556, "\xa6": 280, "\xa7": 556, "\xa8": 333, "\xa9": 737, "\xaa": 370, "\xab": 556, "\xac": 584, "\xae": 737, "\xaf": 333, "\xb0": 400, "\xb1": 584, "\xb2": 333, "\xb3": 333, "\xb4": 333, "\xb5": 611, "\xb6": 556, "\xb7": 278, "\xb8": 333, "\xb9": 333, "\xba": 365, "\xbb": 556, "\xbc": 834, "\xbd": 834, "\xbe": 834, "\xbf": 611, "\xc0": 722, "\xc1": 722, "\xc2": 722, "\xc3": 722, "\xc4": 722, "\xc5": 722, "\xc6": 1000, "\xc7": 722, "\xc8": 667, "\xc9": 667, "\xca": 667, "\xcb": 667, "\xcc": 278, "\xcd": 278, "\xce": 278, "\xcf": 278, "\xd0": 722, "\xd1": 722, "\xd2": 778, "\xd3": 778, "\xd4": 778, "\xd5": 778, "\xd6": 778, "\xd7": 584, "\xd8": 778, "\xd9": 722, "\xda": 722, "\xdb": 722, "\xdc": 722, "\xdd": 667, "\xde": 667, "\xdf": 611, "\xe0": 556, "\xe1": 556, "\xe2": 556, "\xe3": 556, "\xe4": 556, "\xe5": 556, "\xe6": 889, "\xe7": 556, "\xe8": 556, "\xe9": 556, "\xea": 556, "\xeb": 556, "\xec": 278, "\xed": 278, "\xee": 278, "\xef": 278, "\xf0": 611, "\xf1": 611, "\xf2": 611, "\xf3": 611, "\xf4": 611, "\xf5": 611, "\xf6": 611, "\xf7": 584, "\xf8": 611, "\xf9": 611, "\xfa": 611, "\xfb": 611, "\xfc": 611, "\xfd": 556, "\xfe": 611, "\xff": 556, "\u0100": 722, "\u0101": 556, "\u0102": 722, "\u0103": 556, "\u0104": 722, "\u0105": 556, "\u0106": 722, "\u0107": 556, "\u010c": 722, "\u010d": 556, "\u010e": 722, "\u010f": 743, "\u0110": 722, "\u0111": 611, "\u0112": 667, "\u0113": 556, "\u0116": 667, "\u0117": 556, "\u0118": 667, "\u0119": 556, "\u011a": 667, "\u011b": 556, "\u011e": 778, "\u011f": 611, "\u0122": 778, "\u0123": 611, "\u012a": 278, "\u012b": 278, "\u012e": 278, "\u012f": 278, "\u0130": 278, "\u0131": 278, "\u0136": 722, "\u0137": 556, "\u0139": 611, "\u013a": 278, "\u013b": 611, "\u013c": 278, "\u013d": 611, "\u013e": 400, "\u0141": 611, "\u0142": 278, "\u0143": 722, "\u0144": 611, "\u0145": 722, "\u0146": 611, "\u0147": 722, "\u0148": 611, "\u014c": 778, "\u014d": 611, "\u0150": 778, "\u0151": 611, "\u0152": 1000, "\u0153": 944, "\u0154": 722, "\u0155": 389, "\u0156": 722, "\u0157": 389, "\u0158": 722, "\u0159": 389, "\u015a": 667, "\u015b": 556, "\u015e": 667, "\u015f": 556, "\u0160": 667, "\u0161": 556, "\u0162": 611, "\u0163": 333, "\u0164": 611, "\u0165": 389, "\u016a": 722, "\u016b": 611, "\u016e": 722, "\u016f": 611, "\u0170": 722, "\u0171": 611, "\u0172": 722, "\u0173": 611, "\u0178": 667, "\u0179": 611, "\u017a": 500, "\u017b": 611, "\u017c": 500, "\u017d": 611, "\u017e": 500, "\u0192": 556, "\u0218": 667, "\u0219": 556, "\u02c6": 333, "\u02c7": 333, "\u02d8": 333, "\u02d9": 333, "\u02da": 333, "\u02db": 333, "\u02dc": 333, "\u02dd": 333, "\u2013": 556, "\u2014": 1000, "\u2018": 278, "\u2019": 278, "\u201a": 278, "\u201c": 500, "\u201d": 500, "\u201e": 500, "\u2020": 556, "\u2021": 556, "\u2022": 350, "\u2026": 1000, "\u2030": 1000, "\u2039": 333, "\u203a": 333, "\u2044": 167, "\u2122": 1000, "\u2202": 494, "\u2206": 612, "\u2211": 600, "\u2212": 584, "\u221a": 549, "\u2260": 549, "\u2264": 549, "\u2265": 549, "\u25ca": 494, "\uf6c3": 250, "\ufb01": 611, "\ufb02": 611, }, ), "Helvetica-BoldOblique": ( { "FontName": "Helvetica-BoldOblique", "Descent": -207.0, "FontBBox": (-175.0, -228.0, 1114.0, 962.0), "FontWeight": "Bold", "CapHeight": 718.0, "FontFamily": "Helvetica", "Flags": 0, "XHeight": 532.0, "ItalicAngle": -12.0, "Ascent": 718.0, }, { " ": 278, "!": 333, '"': 474, "#": 556, "$": 556, "%": 889, "&": 722, "'": 238, "(": 333, ")": 333, "*": 389, "+": 584, ",": 278, "-": 333, ".": 278, "/": 278, "0": 556, "1": 556, "2": 556, "3": 556, "4": 556, "5": 556, "6": 556, "7": 556, "8": 556, "9": 556, ":": 333, ";": 333, "<": 584, "=": 584, ">": 584, "?": 611, "@": 975, "A": 722, "B": 722, "C": 722, "D": 722, "E": 667, "F": 611, "G": 778, "H": 722, "I": 278, "J": 556, "K": 722, "L": 611, "M": 833, "N": 722, "O": 778, "P": 667, "Q": 778, "R": 722, "S": 667, "T": 611, "U": 722, "V": 667, "W": 944, "X": 667, "Y": 667, "Z": 611, "[": 333, "\\": 278, "]": 333, "^": 584, "_": 556, "`": 333, "a": 556, "b": 611, "c": 556, "d": 611, "e": 556, "f": 333, "g": 611, "h": 611, "i": 278, "j": 278, "k": 556, "l": 278, "m": 889, "n": 611, "o": 611, "p": 611, "q": 611, "r": 389, "s": 556, "t": 333, "u": 611, "v": 556, "w": 778, "x": 556, "y": 556, "z": 500, "{": 389, "|": 280, "}": 389, "~": 584, "\xa1": 333, "\xa2": 556, "\xa3": 556, "\xa4": 556, "\xa5": 556, "\xa6": 280, "\xa7": 556, "\xa8": 333, "\xa9": 737, "\xaa": 370, "\xab": 556, "\xac": 584, "\xae": 737, "\xaf": 333, "\xb0": 400, "\xb1": 584, "\xb2": 333, "\xb3": 333, "\xb4": 333, "\xb5": 611, "\xb6": 556, "\xb7": 278, "\xb8": 333, "\xb9": 333, "\xba": 365, "\xbb": 556, "\xbc": 834, "\xbd": 834, "\xbe": 834, "\xbf": 611, "\xc0": 722, "\xc1": 722, "\xc2": 722, "\xc3": 722, "\xc4": 722, "\xc5": 722, "\xc6": 1000, "\xc7": 722, "\xc8": 667, "\xc9": 667, "\xca": 667, "\xcb": 667, "\xcc": 278, "\xcd": 278, "\xce": 278, "\xcf": 278, "\xd0": 722, "\xd1": 722, "\xd2": 778, "\xd3": 778, "\xd4": 778, "\xd5": 778, "\xd6": 778, "\xd7": 584, "\xd8": 778, "\xd9": 722, "\xda": 722, "\xdb": 722, "\xdc": 722, "\xdd": 667, "\xde": 667, "\xdf": 611, "\xe0": 556, "\xe1": 556, "\xe2": 556, "\xe3": 556, "\xe4": 556, "\xe5": 556, "\xe6": 889, "\xe7": 556, "\xe8": 556, "\xe9": 556, "\xea": 556, "\xeb": 556, "\xec": 278, "\xed": 278, "\xee": 278, "\xef": 278, "\xf0": 611, "\xf1": 611, "\xf2": 611, "\xf3": 611, "\xf4": 611, "\xf5": 611, "\xf6": 611, "\xf7": 584, "\xf8": 611, "\xf9": 611, "\xfa": 611, "\xfb": 611, "\xfc": 611, "\xfd": 556, "\xfe": 611, "\xff": 556, "\u0100": 722, "\u0101": 556, "\u0102": 722, "\u0103": 556, "\u0104": 722, "\u0105": 556, "\u0106": 722, "\u0107": 556, "\u010c": 722, "\u010d": 556, "\u010e": 722, "\u010f": 743, "\u0110": 722, "\u0111": 611, "\u0112": 667, "\u0113": 556, "\u0116": 667, "\u0117": 556, "\u0118": 667, "\u0119": 556, "\u011a": 667, "\u011b": 556, "\u011e": 778, "\u011f": 611, "\u0122": 778, "\u0123": 611, "\u012a": 278, "\u012b": 278, "\u012e": 278, "\u012f": 278, "\u0130": 278, "\u0131": 278, "\u0136": 722, "\u0137": 556, "\u0139": 611, "\u013a": 278, "\u013b": 611, "\u013c": 278, "\u013d": 611, "\u013e": 400, "\u0141": 611, "\u0142": 278, "\u0143": 722, "\u0144": 611, "\u0145": 722, "\u0146": 611, "\u0147": 722, "\u0148": 611, "\u014c": 778, "\u014d": 611, "\u0150": 778, "\u0151": 611, "\u0152": 1000, "\u0153": 944, "\u0154": 722, "\u0155": 389, "\u0156": 722, "\u0157": 389, "\u0158": 722, "\u0159": 389, "\u015a": 667, "\u015b": 556, "\u015e": 667, "\u015f": 556, "\u0160": 667, "\u0161": 556, "\u0162": 611, "\u0163": 333, "\u0164": 611, "\u0165": 389, "\u016a": 722, "\u016b": 611, "\u016e": 722, "\u016f": 611, "\u0170": 722, "\u0171": 611, "\u0172": 722, "\u0173": 611, "\u0178": 667, "\u0179": 611, "\u017a": 500, "\u017b": 611, "\u017c": 500, "\u017d": 611, "\u017e": 500, "\u0192": 556, "\u0218": 667, "\u0219": 556, "\u02c6": 333, "\u02c7": 333, "\u02d8": 333, "\u02d9": 333, "\u02da": 333, "\u02db": 333, "\u02dc": 333, "\u02dd": 333, "\u2013": 556, "\u2014": 1000, "\u2018": 278, "\u2019": 278, "\u201a": 278, "\u201c": 500, "\u201d": 500, "\u201e": 500, "\u2020": 556, "\u2021": 556, "\u2022": 350, "\u2026": 1000, "\u2030": 1000, "\u2039": 333, "\u203a": 333, "\u2044": 167, "\u2122": 1000, "\u2202": 494, "\u2206": 612, "\u2211": 600, "\u2212": 584, "\u221a": 549, "\u2260": 549, "\u2264": 549, "\u2265": 549, "\u25ca": 494, "\uf6c3": 250, "\ufb01": 611, "\ufb02": 611, }, ), "Helvetica-Oblique": ( { "FontName": "Helvetica-Oblique", "Descent": -207.0, "FontBBox": (-171.0, -225.0, 1116.0, 931.0), "FontWeight": "Medium", "CapHeight": 718.0, "FontFamily": "Helvetica", "Flags": 0, "XHeight": 523.0, "ItalicAngle": -12.0, "Ascent": 718.0, }, { " ": 278, "!": 278, '"': 355, "#": 556, "$": 556, "%": 889, "&": 667, "'": 191, "(": 333, ")": 333, "*": 389, "+": 584, ",": 278, "-": 333, ".": 278, "/": 278, "0": 556, "1": 556, "2": 556, "3": 556, "4": 556, "5": 556, "6": 556, "7": 556, "8": 556, "9": 556, ":": 278, ";": 278, "<": 584, "=": 584, ">": 584, "?": 556, "@": 1015, "A": 667, "B": 667, "C": 722, "D": 722, "E": 667, "F": 611, "G": 778, "H": 722, "I": 278, "J": 500, "K": 667, "L": 556, "M": 833, "N": 722, "O": 778, "P": 667, "Q": 778, "R": 722, "S": 667, "T": 611, "U": 722, "V": 667, "W": 944, "X": 667, "Y": 667, "Z": 611, "[": 278, "\\": 278, "]": 278, "^": 469, "_": 556, "`": 333, "a": 556, "b": 556, "c": 500, "d": 556, "e": 556, "f": 278, "g": 556, "h": 556, "i": 222, "j": 222, "k": 500, "l": 222, "m": 833, "n": 556, "o": 556, "p": 556, "q": 556, "r": 333, "s": 500, "t": 278, "u": 556, "v": 500, "w": 722, "x": 500, "y": 500, "z": 500, "{": 334, "|": 260, "}": 334, "~": 584, "\xa1": 333, "\xa2": 556, "\xa3": 556, "\xa4": 556, "\xa5": 556, "\xa6": 260, "\xa7": 556, "\xa8": 333, "\xa9": 737, "\xaa": 370, "\xab": 556, "\xac": 584, "\xae": 737, "\xaf": 333, "\xb0": 400, "\xb1": 584, "\xb2": 333, "\xb3": 333, "\xb4": 333, "\xb5": 556, "\xb6": 537, "\xb7": 278, "\xb8": 333, "\xb9": 333, "\xba": 365, "\xbb": 556, "\xbc": 834, "\xbd": 834, "\xbe": 834, "\xbf": 611, "\xc0": 667, "\xc1": 667, "\xc2": 667, "\xc3": 667, "\xc4": 667, "\xc5": 667, "\xc6": 1000, "\xc7": 722, "\xc8": 667, "\xc9": 667, "\xca": 667, "\xcb": 667, "\xcc": 278, "\xcd": 278, "\xce": 278, "\xcf": 278, "\xd0": 722, "\xd1": 722, "\xd2": 778, "\xd3": 778, "\xd4": 778, "\xd5": 778, "\xd6": 778, "\xd7": 584, "\xd8": 778, "\xd9": 722, "\xda": 722, "\xdb": 722, "\xdc": 722, "\xdd": 667, "\xde": 667, "\xdf": 611, "\xe0": 556, "\xe1": 556, "\xe2": 556, "\xe3": 556, "\xe4": 556, "\xe5": 556, "\xe6": 889, "\xe7": 500, "\xe8": 556, "\xe9": 556, "\xea": 556, "\xeb": 556, "\xec": 278, "\xed": 278, "\xee": 278, "\xef": 278, "\xf0": 556, "\xf1": 556, "\xf2": 556, "\xf3": 556, "\xf4": 556, "\xf5": 556, "\xf6": 556, "\xf7": 584, "\xf8": 611, "\xf9": 556, "\xfa": 556, "\xfb": 556, "\xfc": 556, "\xfd": 500, "\xfe": 556, "\xff": 500, "\u0100": 667, "\u0101": 556, "\u0102": 667, "\u0103": 556, "\u0104": 667, "\u0105": 556, "\u0106": 722, "\u0107": 500, "\u010c": 722, "\u010d": 500, "\u010e": 722, "\u010f": 643, "\u0110": 722, "\u0111": 556, "\u0112": 667, "\u0113": 556, "\u0116": 667, "\u0117": 556, "\u0118": 667, "\u0119": 556, "\u011a": 667, "\u011b": 556, "\u011e": 778, "\u011f": 556, "\u0122": 778, "\u0123": 556, "\u012a": 278, "\u012b": 278, "\u012e": 278, "\u012f": 222, "\u0130": 278, "\u0131": 278, "\u0136": 667, "\u0137": 500, "\u0139": 556, "\u013a": 222, "\u013b": 556, "\u013c": 222, "\u013d": 556, "\u013e": 299, "\u0141": 556, "\u0142": 222, "\u0143": 722, "\u0144": 556, "\u0145": 722, "\u0146": 556, "\u0147": 722, "\u0148": 556, "\u014c": 778, "\u014d": 556, "\u0150": 778, "\u0151": 556, "\u0152": 1000, "\u0153": 944, "\u0154": 722, "\u0155": 333, "\u0156": 722, "\u0157": 333, "\u0158": 722, "\u0159": 333, "\u015a": 667, "\u015b": 500, "\u015e": 667, "\u015f": 500, "\u0160": 667, "\u0161": 500, "\u0162": 611, "\u0163": 278, "\u0164": 611, "\u0165": 317, "\u016a": 722, "\u016b": 556, "\u016e": 722, "\u016f": 556, "\u0170": 722, "\u0171": 556, "\u0172": 722, "\u0173": 556, "\u0178": 667, "\u0179": 611, "\u017a": 500, "\u017b": 611, "\u017c": 500, "\u017d": 611, "\u017e": 500, "\u0192": 556, "\u0218": 667, "\u0219": 500, "\u02c6": 333, "\u02c7": 333, "\u02d8": 333, "\u02d9": 333, "\u02da": 333, "\u02db": 333, "\u02dc": 333, "\u02dd": 333, "\u2013": 556, "\u2014": 1000, "\u2018": 222, "\u2019": 222, "\u201a": 222, "\u201c": 333, "\u201d": 333, "\u201e": 333, "\u2020": 556, "\u2021": 556, "\u2022": 350, "\u2026": 1000, "\u2030": 1000, "\u2039": 333, "\u203a": 333, "\u2044": 167, "\u2122": 1000, "\u2202": 476, "\u2206": 612, "\u2211": 600, "\u2212": 584, "\u221a": 453, "\u2260": 549, "\u2264": 549, "\u2265": 549, "\u25ca": 471, "\uf6c3": 250, "\ufb01": 500, "\ufb02": 500, }, ), "Symbol": ( { "FontName": "Symbol", "FontBBox": (-180.0, -293.0, 1090.0, 1010.0), "FontWeight": "Medium", "FontFamily": "Symbol", "Flags": 0, "ItalicAngle": 0.0, }, { " ": 250, "!": 333, "#": 500, "%": 833, "&": 778, "(": 333, ")": 333, "+": 549, ",": 250, ".": 250, "/": 278, "0": 500, "1": 500, "2": 500, "3": 500, "4": 500, "5": 500, "6": 500, "7": 500, "8": 500, "9": 500, ":": 278, ";": 278, "<": 549, "=": 549, ">": 549, "?": 444, "[": 333, "]": 333, "_": 500, "{": 480, "|": 200, "}": 480, "\xac": 713, "\xb0": 400, "\xb1": 549, "\xb5": 576, "\xd7": 549, "\xf7": 549, "\u0192": 500, "\u0391": 722, "\u0392": 667, "\u0393": 603, "\u0395": 611, "\u0396": 611, "\u0397": 722, "\u0398": 741, "\u0399": 333, "\u039a": 722, "\u039b": 686, "\u039c": 889, "\u039d": 722, "\u039e": 645, "\u039f": 722, "\u03a0": 768, "\u03a1": 556, "\u03a3": 592, "\u03a4": 611, "\u03a5": 690, "\u03a6": 763, "\u03a7": 722, "\u03a8": 795, "\u03b1": 631, "\u03b2": 549, "\u03b3": 411, "\u03b4": 494, "\u03b5": 439, "\u03b6": 494, "\u03b7": 603, "\u03b8": 521, "\u03b9": 329, "\u03ba": 549, "\u03bb": 549, "\u03bd": 521, "\u03be": 493, "\u03bf": 549, "\u03c0": 549, "\u03c1": 549, "\u03c2": 439, "\u03c3": 603, "\u03c4": 439, "\u03c5": 576, "\u03c6": 521, "\u03c7": 549, "\u03c8": 686, "\u03c9": 686, "\u03d1": 631, "\u03d2": 620, "\u03d5": 603, "\u03d6": 713, "\u2022": 460, "\u2026": 1000, "\u2032": 247, "\u2033": 411, "\u2044": 167, "\u20ac": 750, "\u2111": 686, "\u2118": 987, "\u211c": 795, "\u2126": 768, "\u2135": 823, "\u2190": 987, "\u2191": 603, "\u2192": 987, "\u2193": 603, "\u2194": 1042, "\u21b5": 658, "\u21d0": 987, "\u21d1": 603, "\u21d2": 987, "\u21d3": 603, "\u21d4": 1042, "\u2200": 713, "\u2202": 494, "\u2203": 549, "\u2205": 823, "\u2206": 612, "\u2207": 713, "\u2208": 713, "\u2209": 713, "\u220b": 439, "\u220f": 823, "\u2211": 713, "\u2212": 549, "\u2217": 500, "\u221a": 549, "\u221d": 713, "\u221e": 713, "\u2220": 768, "\u2227": 603, "\u2228": 603, "\u2229": 768, "\u222a": 768, "\u222b": 274, "\u2234": 863, "\u223c": 549, "\u2245": 549, "\u2248": 549, "\u2260": 549, "\u2261": 549, "\u2264": 549, "\u2265": 549, "\u2282": 713, "\u2283": 713, "\u2284": 713, "\u2286": 713, "\u2287": 713, "\u2295": 768, "\u2297": 768, "\u22a5": 658, "\u22c5": 250, "\u2320": 686, "\u2321": 686, "\u2329": 329, "\u232a": 329, "\u25ca": 494, "\u2660": 753, "\u2663": 753, "\u2665": 753, "\u2666": 753, "\uf6d9": 790, "\uf6da": 790, "\uf6db": 890, "\uf8e5": 500, "\uf8e6": 603, "\uf8e7": 1000, "\uf8e8": 790, "\uf8e9": 790, "\uf8ea": 786, "\uf8eb": 384, "\uf8ec": 384, "\uf8ed": 384, "\uf8ee": 384, "\uf8ef": 384, "\uf8f0": 384, "\uf8f1": 494, "\uf8f2": 494, "\uf8f3": 494, "\uf8f4": 494, "\uf8f5": 686, "\uf8f6": 384, "\uf8f7": 384, "\uf8f8": 384, "\uf8f9": 384, "\uf8fa": 384, "\uf8fb": 384, "\uf8fc": 494, "\uf8fd": 494, "\uf8fe": 494, "\uf8ff": 790, }, ), "Times-Bold": ( { "FontName": "Times-Bold", "Descent": -217.0, "FontBBox": (-168.0, -218.0, 1000.0, 935.0), "FontWeight": "Bold", "CapHeight": 676.0, "FontFamily": "Times", "Flags": 0, "XHeight": 461.0, "ItalicAngle": 0.0, "Ascent": 683.0, }, { " ": 250, "!": 333, '"': 555, "#": 500, "$": 500, "%": 1000, "&": 833, "'": 278, "(": 333, ")": 333, "*": 500, "+": 570, ",": 250, "-": 333, ".": 250, "/": 278, "0": 500, "1": 500, "2": 500, "3": 500, "4": 500, "5": 500, "6": 500, "7": 500, "8": 500, "9": 500, ":": 333, ";": 333, "<": 570, "=": 570, ">": 570, "?": 500, "@": 930, "A": 722, "B": 667, "C": 722, "D": 722, "E": 667, "F": 611, "G": 778, "H": 778, "I": 389, "J": 500, "K": 778, "L": 667, "M": 944, "N": 722, "O": 778, "P": 611, "Q": 778, "R": 722, "S": 556, "T": 667, "U": 722, "V": 722, "W": 1000, "X": 722, "Y": 722, "Z": 667, "[": 333, "\\": 278, "]": 333, "^": 581, "_": 500, "`": 333, "a": 500, "b": 556, "c": 444, "d": 556, "e": 444, "f": 333, "g": 500, "h": 556, "i": 278, "j": 333, "k": 556, "l": 278, "m": 833, "n": 556, "o": 500, "p": 556, "q": 556, "r": 444, "s": 389, "t": 333, "u": 556, "v": 500, "w": 722, "x": 500, "y": 500, "z": 444, "{": 394, "|": 220, "}": 394, "~": 520, "\xa1": 333, "\xa2": 500, "\xa3": 500, "\xa4": 500, "\xa5": 500, "\xa6": 220, "\xa7": 500, "\xa8": 333, "\xa9": 747, "\xaa": 300, "\xab": 500, "\xac": 570, "\xae": 747, "\xaf": 333, "\xb0": 400, "\xb1": 570, "\xb2": 300, "\xb3": 300, "\xb4": 333, "\xb5": 556, "\xb6": 540, "\xb7": 250, "\xb8": 333, "\xb9": 300, "\xba": 330, "\xbb": 500, "\xbc": 750, "\xbd": 750, "\xbe": 750, "\xbf": 500, "\xc0": 722, "\xc1": 722, "\xc2": 722, "\xc3": 722, "\xc4": 722, "\xc5": 722, "\xc6": 1000, "\xc7": 722, "\xc8": 667, "\xc9": 667, "\xca": 667, "\xcb": 667, "\xcc": 389, "\xcd": 389, "\xce": 389, "\xcf": 389, "\xd0": 722, "\xd1": 722, "\xd2": 778, "\xd3": 778, "\xd4": 778, "\xd5": 778, "\xd6": 778, "\xd7": 570, "\xd8": 778, "\xd9": 722, "\xda": 722, "\xdb": 722, "\xdc": 722, "\xdd": 722, "\xde": 611, "\xdf": 556, "\xe0": 500, "\xe1": 500, "\xe2": 500, "\xe3": 500, "\xe4": 500, "\xe5": 500, "\xe6": 722, "\xe7": 444, "\xe8": 444, "\xe9": 444, "\xea": 444, "\xeb": 444, "\xec": 278, "\xed": 278, "\xee": 278, "\xef": 278, "\xf0": 500, "\xf1": 556, "\xf2": 500, "\xf3": 500, "\xf4": 500, "\xf5": 500, "\xf6": 500, "\xf7": 570, "\xf8": 500, "\xf9": 556, "\xfa": 556, "\xfb": 556, "\xfc": 556, "\xfd": 500, "\xfe": 556, "\xff": 500, "\u0100": 722, "\u0101": 500, "\u0102": 722, "\u0103": 500, "\u0104": 722, "\u0105": 500, "\u0106": 722, "\u0107": 444, "\u010c": 722, "\u010d": 444, "\u010e": 722, "\u010f": 672, "\u0110": 722, "\u0111": 556, "\u0112": 667, "\u0113": 444, "\u0116": 667, "\u0117": 444, "\u0118": 667, "\u0119": 444, "\u011a": 667, "\u011b": 444, "\u011e": 778, "\u011f": 500, "\u0122": 778, "\u0123": 500, "\u012a": 389, "\u012b": 278, "\u012e": 389, "\u012f": 278, "\u0130": 389, "\u0131": 278, "\u0136": 778, "\u0137": 556, "\u0139": 667, "\u013a": 278, "\u013b": 667, "\u013c": 278, "\u013d": 667, "\u013e": 394, "\u0141": 667, "\u0142": 278, "\u0143": 722, "\u0144": 556, "\u0145": 722, "\u0146": 556, "\u0147": 722, "\u0148": 556, "\u014c": 778, "\u014d": 500, "\u0150": 778, "\u0151": 500, "\u0152": 1000, "\u0153": 722, "\u0154": 722, "\u0155": 444, "\u0156": 722, "\u0157": 444, "\u0158": 722, "\u0159": 444, "\u015a": 556, "\u015b": 389, "\u015e": 556, "\u015f": 389, "\u0160": 556, "\u0161": 389, "\u0162": 667, "\u0163": 333, "\u0164": 667, "\u0165": 416, "\u016a": 722, "\u016b": 556, "\u016e": 722, "\u016f": 556, "\u0170": 722, "\u0171": 556, "\u0172": 722, "\u0173": 556, "\u0178": 722, "\u0179": 667, "\u017a": 444, "\u017b": 667, "\u017c": 444, "\u017d": 667, "\u017e": 444, "\u0192": 500, "\u0218": 556, "\u0219": 389, "\u02c6": 333, "\u02c7": 333, "\u02d8": 333, "\u02d9": 333, "\u02da": 333, "\u02db": 333, "\u02dc": 333, "\u02dd": 333, "\u2013": 500, "\u2014": 1000, "\u2018": 333, "\u2019": 333, "\u201a": 333, "\u201c": 500, "\u201d": 500, "\u201e": 500, "\u2020": 500, "\u2021": 500, "\u2022": 350, "\u2026": 1000, "\u2030": 1000, "\u2039": 333, "\u203a": 333, "\u2044": 167, "\u2122": 1000, "\u2202": 494, "\u2206": 612, "\u2211": 600, "\u2212": 570, "\u221a": 549, "\u2260": 549, "\u2264": 549, "\u2265": 549, "\u25ca": 494, "\uf6c3": 250, "\ufb01": 556, "\ufb02": 556, }, ), "Times-BoldItalic": ( { "FontName": "Times-BoldItalic", "Descent": -217.0, "FontBBox": (-200.0, -218.0, 996.0, 921.0), "FontWeight": "Bold", "CapHeight": 669.0, "FontFamily": "Times", "Flags": 0, "XHeight": 462.0, "ItalicAngle": -15.0, "Ascent": 683.0, }, { " ": 250, "!": 389, '"': 555, "#": 500, "$": 500, "%": 833, "&": 778, "'": 278, "(": 333, ")": 333, "*": 500, "+": 570, ",": 250, "-": 333, ".": 250, "/": 278, "0": 500, "1": 500, "2": 500, "3": 500, "4": 500, "5": 500, "6": 500, "7": 500, "8": 500, "9": 500, ":": 333, ";": 333, "<": 570, "=": 570, ">": 570, "?": 500, "@": 832, "A": 667, "B": 667, "C": 667, "D": 722, "E": 667, "F": 667, "G": 722, "H": 778, "I": 389, "J": 500, "K": 667, "L": 611, "M": 889, "N": 722, "O": 722, "P": 611, "Q": 722, "R": 667, "S": 556, "T": 611, "U": 722, "V": 667, "W": 889, "X": 667, "Y": 611, "Z": 611, "[": 333, "\\": 278, "]": 333, "^": 570, "_": 500, "`": 333, "a": 500, "b": 500, "c": 444, "d": 500, "e": 444, "f": 333, "g": 500, "h": 556, "i": 278, "j": 278, "k": 500, "l": 278, "m": 778, "n": 556, "o": 500, "p": 500, "q": 500, "r": 389, "s": 389, "t": 278, "u": 556, "v": 444, "w": 667, "x": 500, "y": 444, "z": 389, "{": 348, "|": 220, "}": 348, "~": 570, "\xa1": 389, "\xa2": 500, "\xa3": 500, "\xa4": 500, "\xa5": 500, "\xa6": 220, "\xa7": 500, "\xa8": 333, "\xa9": 747, "\xaa": 266, "\xab": 500, "\xac": 606, "\xae": 747, "\xaf": 333, "\xb0": 400, "\xb1": 570, "\xb2": 300, "\xb3": 300, "\xb4": 333, "\xb5": 576, "\xb6": 500, "\xb7": 250, "\xb8": 333, "\xb9": 300, "\xba": 300, "\xbb": 500, "\xbc": 750, "\xbd": 750, "\xbe": 750, "\xbf": 500, "\xc0": 667, "\xc1": 667, "\xc2": 667, "\xc3": 667, "\xc4": 667, "\xc5": 667, "\xc6": 944, "\xc7": 667, "\xc8": 667, "\xc9": 667, "\xca": 667, "\xcb": 667, "\xcc": 389, "\xcd": 389, "\xce": 389, "\xcf": 389, "\xd0": 722, "\xd1": 722, "\xd2": 722, "\xd3": 722, "\xd4": 722, "\xd5": 722, "\xd6": 722, "\xd7": 570, "\xd8": 722, "\xd9": 722, "\xda": 722, "\xdb": 722, "\xdc": 722, "\xdd": 611, "\xde": 611, "\xdf": 500, "\xe0": 500, "\xe1": 500, "\xe2": 500, "\xe3": 500, "\xe4": 500, "\xe5": 500, "\xe6": 722, "\xe7": 444, "\xe8": 444, "\xe9": 444, "\xea": 444, "\xeb": 444, "\xec": 278, "\xed": 278, "\xee": 278, "\xef": 278, "\xf0": 500, "\xf1": 556, "\xf2": 500, "\xf3": 500, "\xf4": 500, "\xf5": 500, "\xf6": 500, "\xf7": 570, "\xf8": 500, "\xf9": 556, "\xfa": 556, "\xfb": 556, "\xfc": 556, "\xfd": 444, "\xfe": 500, "\xff": 444, "\u0100": 667, "\u0101": 500, "\u0102": 667, "\u0103": 500, "\u0104": 667, "\u0105": 500, "\u0106": 667, "\u0107": 444, "\u010c": 667, "\u010d": 444, "\u010e": 722, "\u010f": 608, "\u0110": 722, "\u0111": 500, "\u0112": 667, "\u0113": 444, "\u0116": 667, "\u0117": 444, "\u0118": 667, "\u0119": 444, "\u011a": 667, "\u011b": 444, "\u011e": 722, "\u011f": 500, "\u0122": 722, "\u0123": 500, "\u012a": 389, "\u012b": 278, "\u012e": 389, "\u012f": 278, "\u0130": 389, "\u0131": 278, "\u0136": 667, "\u0137": 500, "\u0139": 611, "\u013a": 278, "\u013b": 611, "\u013c": 278, "\u013d": 611, "\u013e": 382, "\u0141": 611, "\u0142": 278, "\u0143": 722, "\u0144": 556, "\u0145": 722, "\u0146": 556, "\u0147": 722, "\u0148": 556, "\u014c": 722, "\u014d": 500, "\u0150": 722, "\u0151": 500, "\u0152": 944, "\u0153": 722, "\u0154": 667, "\u0155": 389, "\u0156": 667, "\u0157": 389, "\u0158": 667, "\u0159": 389, "\u015a": 556, "\u015b": 389, "\u015e": 556, "\u015f": 389, "\u0160": 556, "\u0161": 389, "\u0162": 611, "\u0163": 278, "\u0164": 611, "\u0165": 366, "\u016a": 722, "\u016b": 556, "\u016e": 722, "\u016f": 556, "\u0170": 722, "\u0171": 556, "\u0172": 722, "\u0173": 556, "\u0178": 611, "\u0179": 611, "\u017a": 389, "\u017b": 611, "\u017c": 389, "\u017d": 611, "\u017e": 389, "\u0192": 500, "\u0218": 556, "\u0219": 389, "\u02c6": 333, "\u02c7": 333, "\u02d8": 333, "\u02d9": 333, "\u02da": 333, "\u02db": 333, "\u02dc": 333, "\u02dd": 333, "\u2013": 500, "\u2014": 1000, "\u2018": 333, "\u2019": 333, "\u201a": 333, "\u201c": 500, "\u201d": 500, "\u201e": 500, "\u2020": 500, "\u2021": 500, "\u2022": 350, "\u2026": 1000, "\u2030": 1000, "\u2039": 333, "\u203a": 333, "\u2044": 167, "\u2122": 1000, "\u2202": 494, "\u2206": 612, "\u2211": 600, "\u2212": 606, "\u221a": 549, "\u2260": 549, "\u2264": 549, "\u2265": 549, "\u25ca": 494, "\uf6c3": 250, "\ufb01": 556, "\ufb02": 556, }, ), "Times-Italic": ( { "FontName": "Times-Italic", "Descent": -217.0, "FontBBox": (-169.0, -217.0, 1010.0, 883.0), "FontWeight": "Medium", "CapHeight": 653.0, "FontFamily": "Times", "Flags": 0, "XHeight": 441.0, "ItalicAngle": -15.5, "Ascent": 683.0, }, { " ": 250, "!": 333, '"': 420, "#": 500, "$": 500, "%": 833, "&": 778, "'": 214, "(": 333, ")": 333, "*": 500, "+": 675, ",": 250, "-": 333, ".": 250, "/": 278, "0": 500, "1": 500, "2": 500, "3": 500, "4": 500, "5": 500, "6": 500, "7": 500, "8": 500, "9": 500, ":": 333, ";": 333, "<": 675, "=": 675, ">": 675, "?": 500, "@": 920, "A": 611, "B": 611, "C": 667, "D": 722, "E": 611, "F": 611, "G": 722, "H": 722, "I": 333, "J": 444, "K": 667, "L": 556, "M": 833, "N": 667, "O": 722, "P": 611, "Q": 722, "R": 611, "S": 500, "T": 556, "U": 722, "V": 611, "W": 833, "X": 611, "Y": 556, "Z": 556, "[": 389, "\\": 278, "]": 389, "^": 422, "_": 500, "`": 333, "a": 500, "b": 500, "c": 444, "d": 500, "e": 444, "f": 278, "g": 500, "h": 500, "i": 278, "j": 278, "k": 444, "l": 278, "m": 722, "n": 500, "o": 500, "p": 500, "q": 500, "r": 389, "s": 389, "t": 278, "u": 500, "v": 444, "w": 667, "x": 444, "y": 444, "z": 389, "{": 400, "|": 275, "}": 400, "~": 541, "\xa1": 389, "\xa2": 500, "\xa3": 500, "\xa4": 500, "\xa5": 500, "\xa6": 275, "\xa7": 500, "\xa8": 333, "\xa9": 760, "\xaa": 276, "\xab": 500, "\xac": 675, "\xae": 760, "\xaf": 333, "\xb0": 400, "\xb1": 675, "\xb2": 300, "\xb3": 300, "\xb4": 333, "\xb5": 500, "\xb6": 523, "\xb7": 250, "\xb8": 333, "\xb9": 300, "\xba": 310, "\xbb": 500, "\xbc": 750, "\xbd": 750, "\xbe": 750, "\xbf": 500, "\xc0": 611, "\xc1": 611, "\xc2": 611, "\xc3": 611, "\xc4": 611, "\xc5": 611, "\xc6": 889, "\xc7": 667, "\xc8": 611, "\xc9": 611, "\xca": 611, "\xcb": 611, "\xcc": 333, "\xcd": 333, "\xce": 333, "\xcf": 333, "\xd0": 722, "\xd1": 667, "\xd2": 722, "\xd3": 722, "\xd4": 722, "\xd5": 722, "\xd6": 722, "\xd7": 675, "\xd8": 722, "\xd9": 722, "\xda": 722, "\xdb": 722, "\xdc": 722, "\xdd": 556, "\xde": 611, "\xdf": 500, "\xe0": 500, "\xe1": 500, "\xe2": 500, "\xe3": 500, "\xe4": 500, "\xe5": 500, "\xe6": 667, "\xe7": 444, "\xe8": 444, "\xe9": 444, "\xea": 444, "\xeb": 444, "\xec": 278, "\xed": 278, "\xee": 278, "\xef": 278, "\xf0": 500, "\xf1": 500, "\xf2": 500, "\xf3": 500, "\xf4": 500, "\xf5": 500, "\xf6": 500, "\xf7": 675, "\xf8": 500, "\xf9": 500, "\xfa": 500, "\xfb": 500, "\xfc": 500, "\xfd": 444, "\xfe": 500, "\xff": 444, "\u0100": 611, "\u0101": 500, "\u0102": 611, "\u0103": 500, "\u0104": 611, "\u0105": 500, "\u0106": 667, "\u0107": 444, "\u010c": 667, "\u010d": 444, "\u010e": 722, "\u010f": 544, "\u0110": 722, "\u0111": 500, "\u0112": 611, "\u0113": 444, "\u0116": 611, "\u0117": 444, "\u0118": 611, "\u0119": 444, "\u011a": 611, "\u011b": 444, "\u011e": 722, "\u011f": 500, "\u0122": 722, "\u0123": 500, "\u012a": 333, "\u012b": 278, "\u012e": 333, "\u012f": 278, "\u0130": 333, "\u0131": 278, "\u0136": 667, "\u0137": 444, "\u0139": 556, "\u013a": 278, "\u013b": 556, "\u013c": 278, "\u013d": 611, "\u013e": 300, "\u0141": 556, "\u0142": 278, "\u0143": 667, "\u0144": 500, "\u0145": 667, "\u0146": 500, "\u0147": 667, "\u0148": 500, "\u014c": 722, "\u014d": 500, "\u0150": 722, "\u0151": 500, "\u0152": 944, "\u0153": 667, "\u0154": 611, "\u0155": 389, "\u0156": 611, "\u0157": 389, "\u0158": 611, "\u0159": 389, "\u015a": 500, "\u015b": 389, "\u015e": 500, "\u015f": 389, "\u0160": 500, "\u0161": 389, "\u0162": 556, "\u0163": 278, "\u0164": 556, "\u0165": 300, "\u016a": 722, "\u016b": 500, "\u016e": 722, "\u016f": 500, "\u0170": 722, "\u0171": 500, "\u0172": 722, "\u0173": 500, "\u0178": 556, "\u0179": 556, "\u017a": 389, "\u017b": 556, "\u017c": 389, "\u017d": 556, "\u017e": 389, "\u0192": 500, "\u0218": 500, "\u0219": 389, "\u02c6": 333, "\u02c7": 333, "\u02d8": 333, "\u02d9": 333, "\u02da": 333, "\u02db": 333, "\u02dc": 333, "\u02dd": 333, "\u2013": 500, "\u2014": 889, "\u2018": 333, "\u2019": 333, "\u201a": 333, "\u201c": 556, "\u201d": 556, "\u201e": 556, "\u2020": 500, "\u2021": 500, "\u2022": 350, "\u2026": 889, "\u2030": 1000, "\u2039": 333, "\u203a": 333, "\u2044": 167, "\u2122": 980, "\u2202": 476, "\u2206": 612, "\u2211": 600, "\u2212": 675, "\u221a": 453, "\u2260": 549, "\u2264": 549, "\u2265": 549, "\u25ca": 471, "\uf6c3": 250, "\ufb01": 500, "\ufb02": 500, }, ), "Times-Roman": ( { "FontName": "Times-Roman", "Descent": -217.0, "FontBBox": (-168.0, -218.0, 1000.0, 898.0), "FontWeight": "Roman", "CapHeight": 662.0, "FontFamily": "Times", "Flags": 0, "XHeight": 450.0, "ItalicAngle": 0.0, "Ascent": 683.0, }, { " ": 250, "!": 333, '"': 408, "#": 500, "$": 500, "%": 833, "&": 778, "'": 180, "(": 333, ")": 333, "*": 500, "+": 564, ",": 250, "-": 333, ".": 250, "/": 278, "0": 500, "1": 500, "2": 500, "3": 500, "4": 500, "5": 500, "6": 500, "7": 500, "8": 500, "9": 500, ":": 278, ";": 278, "<": 564, "=": 564, ">": 564, "?": 444, "@": 921, "A": 722, "B": 667, "C": 667, "D": 722, "E": 611, "F": 556, "G": 722, "H": 722, "I": 333, "J": 389, "K": 722, "L": 611, "M": 889, "N": 722, "O": 722, "P": 556, "Q": 722, "R": 667, "S": 556, "T": 611, "U": 722, "V": 722, "W": 944, "X": 722, "Y": 722, "Z": 611, "[": 333, "\\": 278, "]": 333, "^": 469, "_": 500, "`": 333, "a": 444, "b": 500, "c": 444, "d": 500, "e": 444, "f": 333, "g": 500, "h": 500, "i": 278, "j": 278, "k": 500, "l": 278, "m": 778, "n": 500, "o": 500, "p": 500, "q": 500, "r": 333, "s": 389, "t": 278, "u": 500, "v": 500, "w": 722, "x": 500, "y": 500, "z": 444, "{": 480, "|": 200, "}": 480, "~": 541, "\xa1": 333, "\xa2": 500, "\xa3": 500, "\xa4": 500, "\xa5": 500, "\xa6": 200, "\xa7": 500, "\xa8": 333, "\xa9": 760, "\xaa": 276, "\xab": 500, "\xac": 564, "\xae": 760, "\xaf": 333, "\xb0": 400, "\xb1": 564, "\xb2": 300, "\xb3": 300, "\xb4": 333, "\xb5": 500, "\xb6": 453, "\xb7": 250, "\xb8": 333, "\xb9": 300, "\xba": 310, "\xbb": 500, "\xbc": 750, "\xbd": 750, "\xbe": 750, "\xbf": 444, "\xc0": 722, "\xc1": 722, "\xc2": 722, "\xc3": 722, "\xc4": 722, "\xc5": 722, "\xc6": 889, "\xc7": 667, "\xc8": 611, "\xc9": 611, "\xca": 611, "\xcb": 611, "\xcc": 333, "\xcd": 333, "\xce": 333, "\xcf": 333, "\xd0": 722, "\xd1": 722, "\xd2": 722, "\xd3": 722, "\xd4": 722, "\xd5": 722, "\xd6": 722, "\xd7": 564, "\xd8": 722, "\xd9": 722, "\xda": 722, "\xdb": 722, "\xdc": 722, "\xdd": 722, "\xde": 556, "\xdf": 500, "\xe0": 444, "\xe1": 444, "\xe2": 444, "\xe3": 444, "\xe4": 444, "\xe5": 444, "\xe6": 667, "\xe7": 444, "\xe8": 444, "\xe9": 444, "\xea": 444, "\xeb": 444, "\xec": 278, "\xed": 278, "\xee": 278, "\xef": 278, "\xf0": 500, "\xf1": 500, "\xf2": 500, "\xf3": 500, "\xf4": 500, "\xf5": 500, "\xf6": 500, "\xf7": 564, "\xf8": 500, "\xf9": 500, "\xfa": 500, "\xfb": 500, "\xfc": 500, "\xfd": 500, "\xfe": 500, "\xff": 500, "\u0100": 722, "\u0101": 444, "\u0102": 722, "\u0103": 444, "\u0104": 722, "\u0105": 444, "\u0106": 667, "\u0107": 444, "\u010c": 667, "\u010d": 444, "\u010e": 722, "\u010f": 588, "\u0110": 722, "\u0111": 500, "\u0112": 611, "\u0113": 444, "\u0116": 611, "\u0117": 444, "\u0118": 611, "\u0119": 444, "\u011a": 611, "\u011b": 444, "\u011e": 722, "\u011f": 500, "\u0122": 722, "\u0123": 500, "\u012a": 333, "\u012b": 278, "\u012e": 333, "\u012f": 278, "\u0130": 333, "\u0131": 278, "\u0136": 722, "\u0137": 500, "\u0139": 611, "\u013a": 278, "\u013b": 611, "\u013c": 278, "\u013d": 611, "\u013e": 344, "\u0141": 611, "\u0142": 278, "\u0143": 722, "\u0144": 500, "\u0145": 722, "\u0146": 500, "\u0147": 722, "\u0148": 500, "\u014c": 722, "\u014d": 500, "\u0150": 722, "\u0151": 500, "\u0152": 889, "\u0153": 722, "\u0154": 667, "\u0155": 333, "\u0156": 667, "\u0157": 333, "\u0158": 667, "\u0159": 333, "\u015a": 556, "\u015b": 389, "\u015e": 556, "\u015f": 389, "\u0160": 556, "\u0161": 389, "\u0162": 611, "\u0163": 278, "\u0164": 611, "\u0165": 326, "\u016a": 722, "\u016b": 500, "\u016e": 722, "\u016f": 500, "\u0170": 722, "\u0171": 500, "\u0172": 722, "\u0173": 500, "\u0178": 722, "\u0179": 611, "\u017a": 444, "\u017b": 611, "\u017c": 444, "\u017d": 611, "\u017e": 444, "\u0192": 500, "\u0218": 556, "\u0219": 389, "\u02c6": 333, "\u02c7": 333, "\u02d8": 333, "\u02d9": 333, "\u02da": 333, "\u02db": 333, "\u02dc": 333, "\u02dd": 333, "\u2013": 500, "\u2014": 1000, "\u2018": 333, "\u2019": 333, "\u201a": 333, "\u201c": 444, "\u201d": 444, "\u201e": 444, "\u2020": 500, "\u2021": 500, "\u2022": 350, "\u2026": 1000, "\u2030": 1000, "\u2039": 333, "\u203a": 333, "\u2044": 167, "\u2122": 980, "\u2202": 476, "\u2206": 612, "\u2211": 600, "\u2212": 564, "\u221a": 453, "\u2260": 549, "\u2264": 549, "\u2265": 549, "\u25ca": 471, "\uf6c3": 250, "\ufb01": 556, "\ufb02": 556, }, ), "ZapfDingbats": ( { "FontName": "ZapfDingbats", "FontBBox": (-1.0, -143.0, 981.0, 820.0), "FontWeight": "Medium", "FontFamily": "ITC", "Flags": 0, "ItalicAngle": 0.0, }, { "\x01": 974, "\x02": 961, "\x03": 980, "\x04": 719, "\x05": 789, "\x06": 494, "\x07": 552, "\x08": 537, "\t": 577, "\n": 692, "\x0b": 960, "\x0c": 939, "\r": 549, "\x0e": 855, "\x0f": 911, "\x10": 933, "\x11": 945, "\x12": 974, "\x13": 755, "\x14": 846, "\x15": 762, "\x16": 761, "\x17": 571, "\x18": 677, "\x19": 763, "\x1a": 760, "\x1b": 759, "\x1c": 754, "\x1d": 786, "\x1e": 788, "\x1f": 788, " ": 790, "!": 793, '"': 794, "#": 816, "$": 823, "%": 789, "&": 841, "'": 823, "(": 833, ")": 816, "*": 831, "+": 923, ",": 744, "-": 723, ".": 749, "/": 790, "0": 792, "1": 695, "2": 776, "3": 768, "4": 792, "5": 759, "6": 707, "7": 708, "8": 682, "9": 701, ":": 826, ";": 815, "<": 789, "=": 789, ">": 707, "?": 687, "@": 696, "A": 689, "B": 786, "C": 787, "D": 713, "E": 791, "F": 785, "G": 791, "H": 873, "I": 761, "J": 762, "K": 759, "L": 892, "M": 892, "N": 788, "O": 784, "Q": 438, "R": 138, "S": 277, "T": 415, "U": 509, "V": 410, "W": 234, "X": 234, "Y": 390, "Z": 390, "[": 276, "\\": 276, "]": 317, "^": 317, "_": 334, "`": 334, "a": 392, "b": 392, "c": 668, "d": 668, "e": 732, "f": 544, "g": 544, "h": 910, "i": 911, "j": 667, "k": 760, "l": 760, "m": 626, "n": 694, "o": 595, "p": 776, "u": 690, "v": 791, "w": 790, "x": 788, "y": 788, "z": 788, "{": 788, "|": 788, "}": 788, "~": 788, "\x7f": 788, "\x80": 788, "\x81": 788, "\x82": 788, "\x83": 788, "\x84": 788, "\x85": 788, "\x86": 788, "\x87": 788, "\x88": 788, "\x89": 788, "\x8a": 788, "\x8b": 788, "\x8c": 788, "\x8d": 788, "\x8e": 788, "\x8f": 788, "\x90": 788, "\x91": 788, "\x92": 788, "\x93": 788, "\x94": 788, "\x95": 788, "\x96": 788, "\x97": 788, "\x98": 788, "\x99": 788, "\x9a": 788, "\x9b": 788, "\x9c": 788, "\x9d": 788, "\x9e": 788, "\x9f": 788, "\xa0": 894, "\xa1": 838, "\xa2": 924, "\xa3": 1016, "\xa4": 458, "\xa5": 924, "\xa6": 918, "\xa7": 927, "\xa8": 928, "\xa9": 928, "\xaa": 834, "\xab": 873, "\xac": 828, "\xad": 924, "\xae": 917, "\xaf": 930, "\xb0": 931, "\xb1": 463, "\xb2": 883, "\xb3": 836, "\xb4": 867, "\xb5": 696, "\xb6": 874, "\xb7": 760, "\xb8": 946, "\xb9": 865, "\xba": 967, "\xbb": 831, "\xbc": 873, "\xbd": 927, "\xbe": 970, "\xbf": 918, "\xc0": 748, "\xc1": 836, "\xc2": 771, "\xc3": 888, "\xc4": 748, "\xc5": 771, "\xc6": 888, "\xc7": 867, "\xc8": 696, "\xc9": 874, "\xca": 974, "\xcb": 762, "\xcc": 759, "\xcd": 509, "\xce": 410, }, ), }
20220429-pdfminer-jameslp310
/20220429_pdfminer_jameslp310-0.0.2-py3-none-any.whl/pdfminer/fontmetrics.py
fontmetrics.py
import logging import re from typing import Dict, Iterable, Optional, cast from .glyphlist import glyphname2unicode from .latin_enc import ENCODING from .psparser import PSLiteral HEXADECIMAL = re.compile(r"[0-9a-fA-F]+") log = logging.getLogger(__name__) def name2unicode(name: str) -> str: """Converts Adobe glyph names to Unicode numbers. In contrast to the specification, this raises a KeyError instead of return an empty string when the key is unknown. This way the caller must explicitly define what to do when there is not a match. Reference: https://github.com/adobe-type-tools/agl-specification#2-the-mapping :returns unicode character if name resembles something, otherwise a KeyError """ if not isinstance(name, str): raise KeyError( 'Could not convert unicode name "%s" to character because ' "it should be of type str but is of type %s" % (name, type(name)) ) name = name.split(".")[0] components = name.split("_") if len(components) > 1: return "".join(map(name2unicode, components)) else: if name in glyphname2unicode: return glyphname2unicode[name] elif name.startswith("uni"): name_without_uni = name.strip("uni") if HEXADECIMAL.match(name_without_uni) and len(name_without_uni) % 4 == 0: unicode_digits = [ int(name_without_uni[i : i + 4], base=16) for i in range(0, len(name_without_uni), 4) ] for digit in unicode_digits: raise_key_error_for_invalid_unicode(digit) characters = map(chr, unicode_digits) return "".join(characters) elif name.startswith("u"): name_without_u = name.strip("u") if HEXADECIMAL.match(name_without_u) and 4 <= len(name_without_u) <= 6: unicode_digit = int(name_without_u, base=16) raise_key_error_for_invalid_unicode(unicode_digit) return chr(unicode_digit) raise KeyError( 'Could not convert unicode name "%s" to character because ' "it does not match specification" % name ) def raise_key_error_for_invalid_unicode(unicode_digit: int) -> None: """Unicode values should not be in the range D800 through DFFF because that is used for surrogate pairs in UTF-16 :raises KeyError if unicode digit is invalid """ if 55295 < unicode_digit < 57344: raise KeyError( "Unicode digit %d is invalid because " "it is in the range D800 through DFFF" % unicode_digit ) class EncodingDB: std2unicode: Dict[int, str] = {} mac2unicode: Dict[int, str] = {} win2unicode: Dict[int, str] = {} pdf2unicode: Dict[int, str] = {} for (name, std, mac, win, pdf) in ENCODING: c = name2unicode(name) if std: std2unicode[std] = c if mac: mac2unicode[mac] = c if win: win2unicode[win] = c if pdf: pdf2unicode[pdf] = c encodings = { "StandardEncoding": std2unicode, "MacRomanEncoding": mac2unicode, "WinAnsiEncoding": win2unicode, "PDFDocEncoding": pdf2unicode, } @classmethod def get_encoding( cls, name: str, diff: Optional[Iterable[object]] = None ) -> Dict[int, str]: cid2unicode = cls.encodings.get(name, cls.std2unicode) if diff: cid2unicode = cid2unicode.copy() cid = 0 for x in diff: if isinstance(x, int): cid = x elif isinstance(x, PSLiteral): try: cid2unicode[cid] = name2unicode(cast(str, x.name)) except (KeyError, ValueError) as e: log.debug(str(e)) cid += 1 return cid2unicode
20220429-pdfminer-jameslp310
/20220429_pdfminer_jameslp310-0.0.2-py3-none-any.whl/pdfminer/encodingdb.py
encodingdb.py
""" Python implementation of ASCII85/ASCIIHex decoder (Adobe version). This code is in the public domain. """ import re import struct # ascii85decode(data) def ascii85decode(data: bytes) -> bytes: """ In ASCII85 encoding, every four bytes are encoded with five ASCII letters, using 85 different types of characters (as 256**4 < 85**5). When the length of the original bytes is not a multiple of 4, a special rule is used for round up. The Adobe's ASCII85 implementation is slightly different from its original in handling the last characters. """ n = b = 0 out = b"" for i in iter(data): c = bytes((i,)) if b"!" <= c and c <= b"u": n += 1 b = b * 85 + (ord(c) - 33) if n == 5: out += struct.pack(">L", b) n = b = 0 elif c == b"z": assert n == 0, str(n) out += b"\0\0\0\0" elif c == b"~": if n: for _ in range(5 - n): b = b * 85 + 84 out += struct.pack(">L", b)[: n - 1] break return out # asciihexdecode(data) hex_re = re.compile(rb"([a-f\d]{2})", re.IGNORECASE) trail_re = re.compile(rb"^(?:[a-f\d]{2}|\s)*([a-f\d])[\s>]*$", re.IGNORECASE) def asciihexdecode(data: bytes) -> bytes: """ ASCIIHexDecode filter: PDFReference v1.4 section 3.3.1 For each pair of ASCII hexadecimal digits (0-9 and A-F or a-f), the ASCIIHexDecode filter produces one byte of binary data. All white-space characters are ignored. A right angle bracket character (>) indicates EOD. Any other characters will cause an error. If the filter encounters the EOD marker after reading an odd number of hexadecimal digits, it will behave as if a 0 followed the last digit. """ def decode(x: bytes) -> bytes: i = int(x, 16) return bytes((i,)) out = b"" for x in hex_re.findall(data): out += decode(x) m = trail_re.search(data) if m: out += decode(m.group(1) + b"0") return out
20220429-pdfminer-jameslp310
/20220429_pdfminer_jameslp310-0.0.2-py3-none-any.whl/pdfminer/ascii85.py
ascii85.py
import logging from io import BytesIO from typing import BinaryIO, Iterator, List, Optional, cast logger = logging.getLogger(__name__) class CorruptDataError(Exception): pass class LZWDecoder: def __init__(self, fp: BinaryIO) -> None: self.fp = fp self.buff = 0 self.bpos = 8 self.nbits = 9 # NB: self.table stores None only in indices 256 and 257 self.table: List[Optional[bytes]] = [] self.prevbuf: Optional[bytes] = None def readbits(self, bits: int) -> int: v = 0 while 1: # the number of remaining bits we can get from the current buffer. r = 8 - self.bpos if bits <= r: # |-----8-bits-----| # |-bpos-|-bits-| | # | |----r----| v = (v << bits) | ((self.buff >> (r - bits)) & ((1 << bits) - 1)) self.bpos += bits break else: # |-----8-bits-----| # |-bpos-|---bits----... # | |----r----| v = (v << r) | (self.buff & ((1 << r) - 1)) bits -= r x = self.fp.read(1) if not x: raise EOFError self.buff = ord(x) self.bpos = 0 return v def feed(self, code: int) -> bytes: x = b"" if code == 256: self.table = [bytes((c,)) for c in range(256)] # 0-255 self.table.append(None) # 256 self.table.append(None) # 257 self.prevbuf = b"" self.nbits = 9 elif code == 257: pass elif not self.prevbuf: x = self.prevbuf = cast(bytes, self.table[code]) # assume not None else: if code < len(self.table): x = cast(bytes, self.table[code]) # assume not None self.table.append(self.prevbuf + x[:1]) elif code == len(self.table): self.table.append(self.prevbuf + self.prevbuf[:1]) x = cast(bytes, self.table[code]) else: raise CorruptDataError table_length = len(self.table) if table_length == 511: self.nbits = 10 elif table_length == 1023: self.nbits = 11 elif table_length == 2047: self.nbits = 12 self.prevbuf = x return x def run(self) -> Iterator[bytes]: while 1: try: code = self.readbits(self.nbits) except EOFError: break try: x = self.feed(code) except CorruptDataError: # just ignore corrupt data and stop yielding there break yield x logger.debug( "nbits=%d, code=%d, output=%r, table=%r", self.nbits, code, x, self.table[258:], ) def lzwdecode(data: bytes) -> bytes: fp = BytesIO(data) s = LZWDecoder(fp).run() return b"".join(s)
20220429-pdfminer-jameslp310
/20220429_pdfminer_jameslp310-0.0.2-py3-none-any.whl/pdfminer/lzw.py
lzw.py
STRICT = False
20220429-pdfminer-jameslp310
/20220429_pdfminer_jameslp310-0.0.2-py3-none-any.whl/pdfminer/settings.py
settings.py
import itertools import logging from typing import BinaryIO, Container, Dict, Iterator, List, Optional, Tuple from pdfminer.utils import Rect from . import settings from .pdfdocument import PDFDocument, PDFTextExtractionNotAllowed, PDFNoPageLabels from .pdfparser import PDFParser from .pdftypes import PDFObjectNotFound from .pdftypes import dict_value from .pdftypes import int_value from .pdftypes import list_value from .pdftypes import resolve1 from .psparser import LIT log = logging.getLogger(__name__) # some predefined literals and keywords. LITERAL_PAGE = LIT("Page") LITERAL_PAGES = LIT("Pages") class PDFPage: """An object that holds the information about a page. A PDFPage object is merely a convenience class that has a set of keys and values, which describe the properties of a page and point to its contents. Attributes: doc: a PDFDocument object. pageid: any Python object that can uniquely identify the page. attrs: a dictionary of page attributes. contents: a list of PDFStream objects that represents the page content. lastmod: the last modified time of the page. resources: a dictionary of resources used by the page. mediabox: the physical size of the page. cropbox: the crop rectangle of the page. rotate: the page rotation (in degree). annots: the page annotations. beads: a chain that represents natural reading order. label: the page's label (typically, the logical page number). """ def __init__( self, doc: PDFDocument, pageid: object, attrs: object, label: Optional[str] ) -> None: """Initialize a page object. doc: a PDFDocument object. pageid: any Python object that can uniquely identify the page. attrs: a dictionary of page attributes. label: page label string. """ self.doc = doc self.pageid = pageid self.attrs = dict_value(attrs) self.label = label self.lastmod = resolve1(self.attrs.get("LastModified")) self.resources: Dict[object, object] = resolve1( self.attrs.get("Resources", dict()) ) self.mediabox: Rect = resolve1(self.attrs["MediaBox"]) if "CropBox" in self.attrs: self.cropbox: Rect = resolve1(self.attrs["CropBox"]) else: self.cropbox = self.mediabox self.rotate = (int_value(self.attrs.get("Rotate", 0)) + 360) % 360 self.annots = self.attrs.get("Annots") self.beads = self.attrs.get("B") if "Contents" in self.attrs: contents = resolve1(self.attrs["Contents"]) else: contents = [] if not isinstance(contents, list): contents = [contents] self.contents: List[object] = contents def __repr__(self) -> str: return "<PDFPage: Resources={!r}, MediaBox={!r}>".format( self.resources, self.mediabox ) INHERITABLE_ATTRS = {"Resources", "MediaBox", "CropBox", "Rotate"} @classmethod def create_pages(cls, document: PDFDocument) -> Iterator["PDFPage"]: def search( obj: object, parent: Dict[str, object] ) -> Iterator[Tuple[int, Dict[object, Dict[object, object]]]]: if isinstance(obj, int): objid = obj tree = dict_value(document.getobj(objid)).copy() else: # This looks broken. obj.objid means obj could be either # PDFObjRef or PDFStream, but neither is valid for dict_value. objid = obj.objid # type: ignore[attr-defined] tree = dict_value(obj).copy() for (k, v) in parent.items(): if k in cls.INHERITABLE_ATTRS and k not in tree: tree[k] = v tree_type = tree.get("Type") if tree_type is None and not settings.STRICT: # See #64 tree_type = tree.get("type") if tree_type is LITERAL_PAGES and "Kids" in tree: log.debug("Pages: Kids=%r", tree["Kids"]) for c in list_value(tree["Kids"]): yield from search(c, tree) elif tree_type is LITERAL_PAGE: log.debug("Page: %r", tree) yield (objid, tree) try: page_labels: Iterator[Optional[str]] = document.get_page_labels() except PDFNoPageLabels: page_labels = itertools.repeat(None) pages = False if "Pages" in document.catalog: objects = search(document.catalog["Pages"], document.catalog) for (objid, tree) in objects: yield cls(document, objid, tree, next(page_labels)) pages = True if not pages: # fallback when /Pages is missing. for xref in document.xrefs: for objid in xref.get_objids(): try: obj = document.getobj(objid) if isinstance(obj, dict) and obj.get("Type") is LITERAL_PAGE: yield cls(document, objid, obj, next(page_labels)) except PDFObjectNotFound: pass return @classmethod def get_pages( cls, fp: BinaryIO, pagenos: Optional[Container[int]] = None, maxpages: int = 0, password: str = "", caching: bool = True, check_extractable: bool = False, ) -> Iterator["PDFPage"]: # Create a PDF parser object associated with the file object. parser = PDFParser(fp) # Create a PDF document object that stores the document structure. doc = PDFDocument(parser, password=password, caching=caching) # Check if the document allows text extraction. # If not, warn the user and proceed. if not doc.is_extractable: if check_extractable: error_msg = "Text extraction is not allowed: %r" % fp raise PDFTextExtractionNotAllowed(error_msg) else: warning_msg = ( "The PDF %r contains a metadata field " "indicating that it should not allow " "text extraction. Ignoring this field " "and proceeding. Use the check_extractable " "if you want to raise an error in this case" % fp ) log.warning(warning_msg) # Process each page contained in the document. for (pageno, page) in enumerate(cls.create_pages(doc)): if pagenos and (pageno not in pagenos): continue yield page if maxpages and maxpages <= pageno + 1: break return
20220429-pdfminer-jameslp310
/20220429_pdfminer_jameslp310-0.0.2-py3-none-any.whl/pdfminer/pdfpage.py
pdfpage.py
import logging import re from io import BytesIO from typing import Dict, List, Mapping, Optional, Sequence, Tuple, Union, cast from . import settings from .cmapdb import CMap from .cmapdb import CMapBase from .cmapdb import CMapDB from .pdfcolor import PDFColorSpace from .pdfcolor import PREDEFINED_COLORSPACE from .pdfdevice import PDFDevice from .pdfdevice import PDFTextSeq from .pdffont import PDFCIDFont from .pdffont import PDFFont from .pdffont import PDFFontError from .pdffont import PDFTrueTypeFont from .pdffont import PDFType1Font from .pdffont import PDFType3Font from .pdfpage import PDFPage from .pdftypes import PDFException from .pdftypes import PDFObjRef from .pdftypes import PDFStream from .pdftypes import dict_value from .pdftypes import list_value from .pdftypes import resolve1 from .pdftypes import stream_value from .psparser import KWD from .psparser import LIT from .psparser import PSEOF from .psparser import PSKeyword from .psparser import PSLiteral, PSTypeError from .psparser import PSStackParser from .psparser import PSStackType from .psparser import keyword_name from .psparser import literal_name from .utils import MATRIX_IDENTITY from .utils import Matrix, Point, PathSegment, Rect from .utils import choplist from .utils import mult_matrix log = logging.getLogger(__name__) class PDFResourceError(PDFException): pass class PDFInterpreterError(PDFException): pass LITERAL_PDF = LIT("PDF") LITERAL_TEXT = LIT("Text") LITERAL_FONT = LIT("Font") LITERAL_FORM = LIT("Form") LITERAL_IMAGE = LIT("Image") class PDFTextState: matrix: Matrix linematrix: Point def __init__(self) -> None: self.font: Optional[PDFFont] = None self.fontsize: float = 0 self.charspace: float = 0 self.wordspace: float = 0 self.scaling: float = 100 self.leading: float = 0 self.render: int = 0 self.rise: float = 0 self.reset() # self.matrix is set # self.linematrix is set def __repr__(self) -> str: return ( "<PDFTextState: font=%r, fontsize=%r, charspace=%r, " "wordspace=%r, scaling=%r, leading=%r, render=%r, rise=%r, " "matrix=%r, linematrix=%r>" % ( self.font, self.fontsize, self.charspace, self.wordspace, self.scaling, self.leading, self.render, self.rise, self.matrix, self.linematrix, ) ) def copy(self) -> "PDFTextState": obj = PDFTextState() obj.font = self.font obj.fontsize = self.fontsize obj.charspace = self.charspace obj.wordspace = self.wordspace obj.scaling = self.scaling obj.leading = self.leading obj.render = self.render obj.rise = self.rise obj.matrix = self.matrix obj.linematrix = self.linematrix return obj def reset(self) -> None: self.matrix = MATRIX_IDENTITY self.linematrix = (0, 0) Color = Union[ float, # Greyscale Tuple[float, float, float], # R, G, B Tuple[float, float, float, float], ] # C, M, Y, K class PDFGraphicState: def __init__(self) -> None: self.linewidth: float = 0 self.linecap: Optional[object] = None self.linejoin: Optional[object] = None self.miterlimit: Optional[object] = None self.dash: Optional[Tuple[object, object]] = None self.intent: Optional[object] = None self.flatness: Optional[object] = None # stroking color self.scolor: Optional[Color] = None # non stroking color self.ncolor: Optional[Color] = None def copy(self) -> "PDFGraphicState": obj = PDFGraphicState() obj.linewidth = self.linewidth obj.linecap = self.linecap obj.linejoin = self.linejoin obj.miterlimit = self.miterlimit obj.dash = self.dash obj.intent = self.intent obj.flatness = self.flatness obj.scolor = self.scolor obj.ncolor = self.ncolor return obj def __repr__(self) -> str: return ( "<PDFGraphicState: linewidth=%r, linecap=%r, linejoin=%r, " " miterlimit=%r, dash=%r, intent=%r, flatness=%r, " " stroking color=%r, non stroking color=%r>" % ( self.linewidth, self.linecap, self.linejoin, self.miterlimit, self.dash, self.intent, self.flatness, self.scolor, self.ncolor, ) ) class PDFResourceManager: """Repository of shared resources. ResourceManager facilitates reuse of shared resources such as fonts and images so that large objects are not allocated multiple times. """ def __init__(self, caching: bool = True) -> None: self.caching = caching self._cached_fonts: Dict[object, PDFFont] = {} def get_procset(self, procs: Sequence[object]) -> None: for proc in procs: if proc is LITERAL_PDF: pass elif proc is LITERAL_TEXT: pass else: pass def get_cmap(self, cmapname: str, strict: bool = False) -> CMapBase: try: return CMapDB.get_cmap(cmapname) except CMapDB.CMapNotFound: if strict: raise return CMap() def get_font(self, objid: object, spec: Mapping[str, object]) -> PDFFont: if objid and objid in self._cached_fonts: font = self._cached_fonts[objid] else: log.debug("get_font: create: objid=%r, spec=%r", objid, spec) if settings.STRICT: if spec["Type"] is not LITERAL_FONT: raise PDFFontError("Type is not /Font") # Create a Font object. if "Subtype" in spec: subtype = literal_name(spec["Subtype"]) else: if settings.STRICT: raise PDFFontError("Font Subtype is not specified.") subtype = "Type1" if subtype in ("Type1", "MMType1"): # Type1 Font font = PDFType1Font(self, spec) elif subtype == "TrueType": # TrueType Font font = PDFTrueTypeFont(self, spec) elif subtype == "Type3": # Type3 Font font = PDFType3Font(self, spec) elif subtype in ("CIDFontType0", "CIDFontType2"): # CID Font font = PDFCIDFont(self, spec) elif subtype == "Type0": # Type0 Font dfonts = list_value(spec["DescendantFonts"]) assert dfonts subspec = dict_value(dfonts[0]).copy() for k in ("Encoding", "ToUnicode"): if k in spec: subspec[k] = resolve1(spec[k]) font = self.get_font(None, subspec) else: if settings.STRICT: raise PDFFontError("Invalid Font spec: %r" % spec) font = PDFType1Font(self, spec) # this is so wrong! if objid and self.caching: self._cached_fonts[objid] = font return font class PDFContentParser(PSStackParser[Union[PSKeyword, PDFStream]]): def __init__(self, streams: Sequence[object]) -> None: self.streams = streams self.istream = 0 # PSStackParser.__init__(fp=None) is safe only because we've overloaded # all the methods that would attempt to access self.fp without first # calling self.fillfp(). PSStackParser.__init__(self, None) # type: ignore[arg-type] def fillfp(self) -> None: if not self.fp: if self.istream < len(self.streams): strm = stream_value(self.streams[self.istream]) self.istream += 1 else: raise PSEOF("Unexpected EOF, file truncated?") self.fp = BytesIO(strm.get_data()) def seek(self, pos: int) -> None: self.fillfp() PSStackParser.seek(self, pos) def fillbuf(self) -> None: if self.charpos < len(self.buf): return while 1: self.fillfp() self.bufpos = self.fp.tell() self.buf = self.fp.read(self.BUFSIZ) if self.buf: break self.fp = None # type: ignore[assignment] self.charpos = 0 def get_inline_data(self, pos: int, target: bytes = b"EI") -> Tuple[int, bytes]: self.seek(pos) i = 0 data = b"" while i <= len(target): self.fillbuf() if i: ci = self.buf[self.charpos] c = bytes((ci,)) data += c self.charpos += 1 if len(target) <= i and c.isspace(): i += 1 elif i < len(target) and c == (bytes((target[i],))): i += 1 else: i = 0 else: try: j = self.buf.index(target[0], self.charpos) data += self.buf[self.charpos : j + 1] self.charpos = j + 1 i = 1 except ValueError: data += self.buf[self.charpos :] self.charpos = len(self.buf) data = data[: -(len(target) + 1)] # strip the last part data = re.sub(rb"(\x0d\x0a|[\x0d\x0a])$", b"", data) return (pos, data) def flush(self) -> None: self.add_results(*self.popall()) KEYWORD_BI = KWD(b"BI") KEYWORD_ID = KWD(b"ID") KEYWORD_EI = KWD(b"EI") def do_keyword(self, pos: int, token: PSKeyword) -> None: if token is self.KEYWORD_BI: # inline image within a content stream self.start_type(pos, "inline") elif token is self.KEYWORD_ID: try: (_, objs) = self.end_type("inline") if len(objs) % 2 != 0: error_msg = "Invalid dictionary construct: {!r}".format(objs) raise PSTypeError(error_msg) d = {literal_name(k): v for (k, v) in choplist(2, objs)} (pos, data) = self.get_inline_data(pos + len(b"ID ")) obj = PDFStream(d, data) self.push((pos, obj)) self.push((pos, self.KEYWORD_EI)) except PSTypeError: if settings.STRICT: raise else: self.push((pos, token)) PDFStackT = PSStackType[PDFStream] """Types that may appear on the PDF argument stack.""" class PDFPageInterpreter: """Processor for the content of a PDF page Reference: PDF Reference, Appendix A, Operator Summary """ def __init__(self, rsrcmgr: PDFResourceManager, device: PDFDevice) -> None: self.rsrcmgr = rsrcmgr self.device = device return def dup(self) -> "PDFPageInterpreter": return self.__class__(self.rsrcmgr, self.device) def init_resources(self, resources: Dict[object, object]) -> None: """Prepare the fonts and XObjects listed in the Resource attribute.""" self.resources = resources self.fontmap: Dict[object, PDFFont] = {} self.xobjmap = {} self.csmap: Dict[str, PDFColorSpace] = PREDEFINED_COLORSPACE.copy() if not resources: return def get_colorspace(spec: object) -> Optional[PDFColorSpace]: if isinstance(spec, list): name = literal_name(spec[0]) else: name = literal_name(spec) if name == "ICCBased" and isinstance(spec, list) and 2 <= len(spec): return PDFColorSpace(name, stream_value(spec[1])["N"]) elif name == "DeviceN" and isinstance(spec, list) and 2 <= len(spec): return PDFColorSpace(name, len(list_value(spec[1]))) else: return PREDEFINED_COLORSPACE.get(name) for (k, v) in dict_value(resources).items(): log.debug("Resource: %r: %r", k, v) if k == "Font": for (fontid, spec) in dict_value(v).items(): objid = None if isinstance(spec, PDFObjRef): objid = spec.objid spec = dict_value(spec) self.fontmap[fontid] = self.rsrcmgr.get_font(objid, spec) elif k == "ColorSpace": for (csid, spec) in dict_value(v).items(): colorspace = get_colorspace(resolve1(spec)) if colorspace is not None: self.csmap[csid] = colorspace elif k == "ProcSet": self.rsrcmgr.get_procset(list_value(v)) elif k == "XObject": for (xobjid, xobjstrm) in dict_value(v).items(): self.xobjmap[xobjid] = xobjstrm return def init_state(self, ctm: Matrix) -> None: """Initialize the text and graphic states for rendering a page.""" # gstack: stack for graphical states. self.gstack: List[Tuple[Matrix, PDFTextState, PDFGraphicState]] = [] self.ctm = ctm self.device.set_ctm(self.ctm) self.textstate = PDFTextState() self.graphicstate = PDFGraphicState() self.curpath: List[PathSegment] = [] # argstack: stack for command arguments. self.argstack: List[PDFStackT] = [] # set some global states. self.scs: Optional[PDFColorSpace] = None self.ncs: Optional[PDFColorSpace] = None if self.csmap: self.scs = self.ncs = next(iter(self.csmap.values())) return def push(self, obj: PDFStackT) -> None: self.argstack.append(obj) return def pop(self, n: int) -> List[PDFStackT]: if n == 0: return [] x = self.argstack[-n:] self.argstack = self.argstack[:-n] return x def get_current_state(self) -> Tuple[Matrix, PDFTextState, PDFGraphicState]: return (self.ctm, self.textstate.copy(), self.graphicstate.copy()) def set_current_state( self, state: Tuple[Matrix, PDFTextState, PDFGraphicState] ) -> None: (self.ctm, self.textstate, self.graphicstate) = state self.device.set_ctm(self.ctm) return def do_q(self) -> None: """Save graphics state""" self.gstack.append(self.get_current_state()) return def do_Q(self) -> None: """Restore graphics state""" if self.gstack: self.set_current_state(self.gstack.pop()) return def do_cm( self, a1: PDFStackT, b1: PDFStackT, c1: PDFStackT, d1: PDFStackT, e1: PDFStackT, f1: PDFStackT, ) -> None: """Concatenate matrix to current transformation matrix""" self.ctm = mult_matrix(cast(Matrix, (a1, b1, c1, d1, e1, f1)), self.ctm) self.device.set_ctm(self.ctm) return def do_w(self, linewidth: PDFStackT) -> None: """Set line width""" self.graphicstate.linewidth = cast(float, linewidth) return def do_J(self, linecap: PDFStackT) -> None: """Set line cap style""" self.graphicstate.linecap = linecap return def do_j(self, linejoin: PDFStackT) -> None: """Set line join style""" self.graphicstate.linejoin = linejoin return def do_M(self, miterlimit: PDFStackT) -> None: """Set miter limit""" self.graphicstate.miterlimit = miterlimit return def do_d(self, dash: PDFStackT, phase: PDFStackT) -> None: """Set line dash pattern""" self.graphicstate.dash = (dash, phase) return def do_ri(self, intent: PDFStackT) -> None: """Set color rendering intent""" self.graphicstate.intent = intent return def do_i(self, flatness: PDFStackT) -> None: """Set flatness tolerance""" self.graphicstate.flatness = flatness return def do_gs(self, name: PDFStackT) -> None: """Set parameters from graphics state parameter dictionary""" # todo return def do_m(self, x: PDFStackT, y: PDFStackT) -> None: """Begin new subpath""" self.curpath.append(("m", cast(float, x), cast(float, y))) return def do_l(self, x: PDFStackT, y: PDFStackT) -> None: """Append straight line segment to path""" self.curpath.append(("l", cast(float, x), cast(float, y))) return def do_c( self, x1: PDFStackT, y1: PDFStackT, x2: PDFStackT, y2: PDFStackT, x3: PDFStackT, y3: PDFStackT, ) -> None: """Append curved segment to path (three control points)""" self.curpath.append( ( "c", cast(float, x1), cast(float, y1), cast(float, x2), cast(float, y2), cast(float, x3), cast(float, y3), ) ) return def do_v(self, x2: PDFStackT, y2: PDFStackT, x3: PDFStackT, y3: PDFStackT) -> None: """Append curved segment to path (initial point replicated)""" self.curpath.append( ("v", cast(float, x2), cast(float, y2), cast(float, x3), cast(float, y3)) ) return def do_y(self, x1: PDFStackT, y1: PDFStackT, x3: PDFStackT, y3: PDFStackT) -> None: """Append curved segment to path (final point replicated)""" self.curpath.append( ("y", cast(float, x1), cast(float, y1), cast(float, x3), cast(float, y3)) ) return def do_h(self) -> None: """Close subpath""" self.curpath.append(("h",)) return def do_re(self, x: PDFStackT, y: PDFStackT, w: PDFStackT, h: PDFStackT) -> None: """Append rectangle to path""" x = cast(float, x) y = cast(float, y) w = cast(float, w) h = cast(float, h) self.curpath.append(("m", x, y)) self.curpath.append(("l", x + w, y)) self.curpath.append(("l", x + w, y + h)) self.curpath.append(("l", x, y + h)) self.curpath.append(("h",)) return def do_S(self) -> None: """Stroke path""" self.device.paint_path(self.graphicstate, True, False, False, self.curpath) self.curpath = [] return def do_s(self) -> None: """Close and stroke path""" self.do_h() self.do_S() return def do_f(self) -> None: """Fill path using nonzero winding number rule""" self.device.paint_path(self.graphicstate, False, True, False, self.curpath) self.curpath = [] return def do_F(self) -> None: """Fill path using nonzero winding number rule (obsolete)""" return self.do_f() def do_f_a(self) -> None: """Fill path using even-odd rule""" self.device.paint_path(self.graphicstate, False, True, True, self.curpath) self.curpath = [] return def do_B(self) -> None: """Fill and stroke path using nonzero winding number rule""" self.device.paint_path(self.graphicstate, True, True, False, self.curpath) self.curpath = [] return def do_B_a(self) -> None: """Fill and stroke path using even-odd rule""" self.device.paint_path(self.graphicstate, True, True, True, self.curpath) self.curpath = [] return def do_b(self) -> None: """Close, fill, and stroke path using nonzero winding number rule""" self.do_h() self.do_B() return def do_b_a(self) -> None: """Close, fill, and stroke path using even-odd rule""" self.do_h() self.do_B_a() return def do_n(self) -> None: """End path without filling or stroking""" self.curpath = [] return def do_W(self) -> None: """Set clipping path using nonzero winding number rule""" return def do_W_a(self) -> None: """Set clipping path using even-odd rule""" return def do_CS(self, name: PDFStackT) -> None: """Set color space for stroking operations Introduced in PDF 1.1 """ try: self.scs = self.csmap[literal_name(name)] except KeyError: if settings.STRICT: raise PDFInterpreterError("Undefined ColorSpace: %r" % name) return def do_cs(self, name: PDFStackT) -> None: """Set color space for nonstroking operations""" try: self.ncs = self.csmap[literal_name(name)] except KeyError: if settings.STRICT: raise PDFInterpreterError("Undefined ColorSpace: %r" % name) return def do_G(self, gray: PDFStackT) -> None: """Set gray level for stroking operations""" self.graphicstate.scolor = cast(float, gray) return def do_g(self, gray: PDFStackT) -> None: """Set gray level for nonstroking operations""" self.graphicstate.ncolor = cast(float, gray) return def do_RG(self, r: PDFStackT, g: PDFStackT, b: PDFStackT) -> None: """Set RGB color for stroking operations""" self.graphicstate.scolor = (cast(float, r), cast(float, g), cast(float, b)) return def do_rg(self, r: PDFStackT, g: PDFStackT, b: PDFStackT) -> None: """Set RGB color for nonstroking operations""" self.graphicstate.ncolor = (cast(float, r), cast(float, g), cast(float, b)) return def do_K(self, c: PDFStackT, m: PDFStackT, y: PDFStackT, k: PDFStackT) -> None: """Set CMYK color for stroking operations""" self.graphicstate.scolor = ( cast(float, c), cast(float, m), cast(float, y), cast(float, k), ) return def do_k(self, c: PDFStackT, m: PDFStackT, y: PDFStackT, k: PDFStackT) -> None: """Set CMYK color for nonstroking operations""" self.graphicstate.ncolor = ( cast(float, c), cast(float, m), cast(float, y), cast(float, k), ) return def do_SCN(self) -> None: """Set color for stroking operations.""" if self.scs: n = self.scs.ncomponents else: if settings.STRICT: raise PDFInterpreterError("No colorspace specified!") n = 1 self.graphicstate.scolor = cast(Color, self.pop(n)) return def do_scn(self) -> None: """Set color for nonstroking operations""" if self.ncs: n = self.ncs.ncomponents else: if settings.STRICT: raise PDFInterpreterError("No colorspace specified!") n = 1 self.graphicstate.ncolor = cast(Color, self.pop(n)) return def do_SC(self) -> None: """Set color for stroking operations""" self.do_SCN() return def do_sc(self) -> None: """Set color for nonstroking operations""" self.do_scn() return def do_sh(self, name: object) -> None: """Paint area defined by shading pattern""" return def do_BT(self) -> None: """Begin text object Initializing the text matrix, Tm, and the text line matrix, Tlm, to the identity matrix. Text objects cannot be nested; a second BT cannot appear before an ET. """ self.textstate.reset() return def do_ET(self) -> None: """End a text object""" return def do_BX(self) -> None: """Begin compatibility section""" return def do_EX(self) -> None: """End compatibility section""" return def do_MP(self, tag: PDFStackT) -> None: """Define marked-content point""" self.device.do_tag(cast(PSLiteral, tag)) return def do_DP(self, tag: PDFStackT, props: PDFStackT) -> None: """Define marked-content point with property list""" self.device.do_tag(cast(PSLiteral, tag), props) return def do_BMC(self, tag: PDFStackT) -> None: """Begin marked-content sequence""" self.device.begin_tag(cast(PSLiteral, tag)) return def do_BDC(self, tag: PDFStackT, props: PDFStackT) -> None: """Begin marked-content sequence with property list""" self.device.begin_tag(cast(PSLiteral, tag), props) return def do_EMC(self) -> None: """End marked-content sequence""" self.device.end_tag() return def do_Tc(self, space: PDFStackT) -> None: """Set character spacing. Character spacing is used by the Tj, TJ, and ' operators. :param space: a number expressed in unscaled text space units. """ self.textstate.charspace = cast(float, space) return def do_Tw(self, space: PDFStackT) -> None: """Set the word spacing. Word spacing is used by the Tj, TJ, and ' operators. :param space: a number expressed in unscaled text space units """ self.textstate.wordspace = cast(float, space) return def do_Tz(self, scale: PDFStackT) -> None: """Set the horizontal scaling. :param scale: is a number specifying the percentage of the normal width """ self.textstate.scaling = cast(float, scale) return def do_TL(self, leading: PDFStackT) -> None: """Set the text leading. Text leading is used only by the T*, ', and " operators. :param leading: a number expressed in unscaled text space units """ self.textstate.leading = -cast(float, leading) return def do_Tf(self, fontid: PDFStackT, fontsize: PDFStackT) -> None: """Set the text font :param fontid: the name of a font resource in the Font subdictionary of the current resource dictionary :param fontsize: size is a number representing a scale factor. """ try: self.textstate.font = self.fontmap[literal_name(fontid)] except KeyError: if settings.STRICT: raise PDFInterpreterError("Undefined Font id: %r" % fontid) self.textstate.font = self.rsrcmgr.get_font(None, {}) self.textstate.fontsize = cast(float, fontsize) return def do_Tr(self, render: PDFStackT) -> None: """Set the text rendering mode""" self.textstate.render = cast(int, render) return def do_Ts(self, rise: PDFStackT) -> None: """Set the text rise :param rise: a number expressed in unscaled text space units """ self.textstate.rise = cast(float, rise) return def do_Td(self, tx: PDFStackT, ty: PDFStackT) -> None: """Move text position""" tx = cast(float, tx) ty = cast(float, ty) (a, b, c, d, e, f) = self.textstate.matrix self.textstate.matrix = (a, b, c, d, tx * a + ty * c + e, tx * b + ty * d + f) self.textstate.linematrix = (0, 0) return def do_TD(self, tx: PDFStackT, ty: PDFStackT) -> None: """Move text position and set leading""" tx = cast(float, tx) ty = cast(float, ty) (a, b, c, d, e, f) = self.textstate.matrix self.textstate.matrix = (a, b, c, d, tx * a + ty * c + e, tx * b + ty * d + f) self.textstate.leading = ty self.textstate.linematrix = (0, 0) return def do_Tm( self, a: PDFStackT, b: PDFStackT, c: PDFStackT, d: PDFStackT, e: PDFStackT, f: PDFStackT, ) -> None: """Set text matrix and text line matrix""" self.textstate.matrix = cast(Matrix, (a, b, c, d, e, f)) self.textstate.linematrix = (0, 0) return def do_T_a(self) -> None: """Move to start of next text line""" (a, b, c, d, e, f) = self.textstate.matrix self.textstate.matrix = ( a, b, c, d, self.textstate.leading * c + e, self.textstate.leading * d + f, ) self.textstate.linematrix = (0, 0) return def do_TJ(self, seq: PDFStackT) -> None: """Show text, allowing individual glyph positioning""" if self.textstate.font is None: if settings.STRICT: raise PDFInterpreterError("No font specified!") return assert self.ncs is not None self.device.render_string( self.textstate, cast(PDFTextSeq, seq), self.ncs, self.graphicstate.copy() ) return def do_Tj(self, s: PDFStackT) -> None: """Show text""" self.do_TJ([s]) return def do__q(self, s: PDFStackT) -> None: """Move to next line and show text The ' (single quote) operator. """ self.do_T_a() self.do_TJ([s]) return def do__w(self, aw: PDFStackT, ac: PDFStackT, s: PDFStackT) -> None: """Set word and character spacing, move to next line, and show text The " (double quote) operator. """ self.do_Tw(aw) self.do_Tc(ac) self.do_TJ([s]) return def do_BI(self) -> None: """Begin inline image object""" return def do_ID(self) -> None: """Begin inline image data""" return def do_EI(self, obj: PDFStackT) -> None: """End inline image object""" if isinstance(obj, PDFStream) and "W" in obj and "H" in obj: iobjid = str(id(obj)) self.device.begin_figure(iobjid, (0, 0, 1, 1), MATRIX_IDENTITY) self.device.render_image(iobjid, obj) self.device.end_figure(iobjid) return def do_Do(self, xobjid_arg: PDFStackT) -> None: """Invoke named XObject""" xobjid = cast(str, literal_name(xobjid_arg)) try: xobj = stream_value(self.xobjmap[xobjid]) except KeyError: if settings.STRICT: raise PDFInterpreterError("Undefined xobject id: %r" % xobjid) return log.debug("Processing xobj: %r", xobj) subtype = xobj.get("Subtype") if subtype is LITERAL_FORM and "BBox" in xobj: interpreter = self.dup() bbox = cast(Rect, list_value(xobj["BBox"])) matrix = cast(Matrix, list_value(xobj.get("Matrix", MATRIX_IDENTITY))) # According to PDF reference 1.7 section 4.9.1, XObjects in # earlier PDFs (prior to v1.2) use the page's Resources entry # instead of having their own Resources entry. xobjres = xobj.get("Resources") if xobjres: resources = dict_value(xobjres) else: resources = self.resources.copy() self.device.begin_figure(xobjid, bbox, matrix) interpreter.render_contents( resources, [xobj], ctm=mult_matrix(matrix, self.ctm) ) self.device.end_figure(xobjid) elif subtype is LITERAL_IMAGE and "Width" in xobj and "Height" in xobj: self.device.begin_figure(xobjid, (0, 0, 1, 1), MATRIX_IDENTITY) self.device.render_image(xobjid, xobj) self.device.end_figure(xobjid) else: # unsupported xobject type. pass return def process_page(self, page: PDFPage) -> None: log.debug("Processing page: %r", page) (x0, y0, x1, y1) = page.mediabox if page.rotate == 90: ctm = (0, -1, 1, 0, -y0, x1) elif page.rotate == 180: ctm = (-1, 0, 0, -1, x1, y1) elif page.rotate == 270: ctm = (0, 1, -1, 0, y1, -x0) else: ctm = (1, 0, 0, 1, -x0, -y0) self.device.begin_page(page, ctm) self.render_contents(page.resources, page.contents, ctm=ctm) self.device.end_page(page) return def render_contents( self, resources: Dict[object, object], streams: Sequence[object], ctm: Matrix = MATRIX_IDENTITY, ) -> None: """Render the content streams. This method may be called recursively. """ log.debug( "render_contents: resources=%r, streams=%r, ctm=%r", resources, streams, ctm ) self.init_resources(resources) self.init_state(ctm) self.execute(list_value(streams)) return def execute(self, streams: Sequence[object]) -> None: try: parser = PDFContentParser(streams) except PSEOF: # empty page return while 1: try: (_, obj) = parser.nextobject() except PSEOF: break if isinstance(obj, PSKeyword): name = keyword_name(obj) method = "do_%s" % name.replace("*", "_a").replace('"', "_w").replace( "'", "_q" ) if hasattr(self, method): func = getattr(self, method) nargs = func.__code__.co_argcount - 1 if nargs: args = self.pop(nargs) log.debug("exec: %s %r", name, args) if len(args) == nargs: func(*args) else: log.debug("exec: %s", name) func() else: if settings.STRICT: error_msg = "Unknown operator: %r" % name raise PDFInterpreterError(error_msg) else: self.push(obj) return
20220429-pdfminer-jameslp310
/20220429_pdfminer_jameslp310-0.0.2-py3-none-any.whl/pdfminer/pdfinterp.py
pdfinterp.py
import logging from io import BytesIO from typing import BinaryIO, TYPE_CHECKING, Optional, Union from . import settings from .pdftypes import PDFException from .pdftypes import PDFObjRef from .pdftypes import PDFStream from .pdftypes import dict_value from .pdftypes import int_value from .psparser import KWD from .psparser import PSEOF from .psparser import PSKeyword from .psparser import PSStackParser from .psparser import PSSyntaxError if TYPE_CHECKING: from .pdfdocument import PDFDocument log = logging.getLogger(__name__) class PDFSyntaxError(PDFException): pass # PDFParser stack holds all the base types plus PDFStream, PDFObjRef, and None class PDFParser(PSStackParser[Union[PSKeyword, PDFStream, PDFObjRef, None]]): """ PDFParser fetch PDF objects from a file stream. It can handle indirect references by referring to a PDF document set by set_document method. It also reads XRefs at the end of every PDF file. Typical usage: parser = PDFParser(fp) parser.read_xref() parser.read_xref(fallback=True) # optional parser.set_document(doc) parser.seek(offset) parser.nextobject() """ def __init__(self, fp: BinaryIO) -> None: PSStackParser.__init__(self, fp) self.doc: Optional["PDFDocument"] = None self.fallback = False def set_document(self, doc: "PDFDocument") -> None: """Associates the parser with a PDFDocument object.""" self.doc = doc KEYWORD_R = KWD(b"R") KEYWORD_NULL = KWD(b"null") KEYWORD_ENDOBJ = KWD(b"endobj") KEYWORD_STREAM = KWD(b"stream") KEYWORD_XREF = KWD(b"xref") KEYWORD_STARTXREF = KWD(b"startxref") def do_keyword(self, pos: int, token: PSKeyword) -> None: """Handles PDF-related keywords.""" if token in (self.KEYWORD_XREF, self.KEYWORD_STARTXREF): self.add_results(*self.pop(1)) elif token is self.KEYWORD_ENDOBJ: self.add_results(*self.pop(4)) elif token is self.KEYWORD_NULL: # null object self.push((pos, None)) elif token is self.KEYWORD_R: # reference to indirect object if len(self.curstack) >= 2: try: ((_, objid), (_, genno)) = self.pop(2) (objid, genno) = (int(objid), int(genno)) # type: ignore[arg-type] assert self.doc is not None obj = PDFObjRef(self.doc, objid, genno) self.push((pos, obj)) except PSSyntaxError: pass elif token is self.KEYWORD_STREAM: # stream object ((_, dic),) = self.pop(1) dic = dict_value(dic) objlen = 0 if not self.fallback: try: objlen = int_value(dic["Length"]) except KeyError: if settings.STRICT: raise PDFSyntaxError("/Length is undefined: %r" % dic) self.seek(pos) try: (_, line) = self.nextline() # 'stream' except PSEOF: if settings.STRICT: raise PDFSyntaxError("Unexpected EOF") return pos += len(line) self.fp.seek(pos) data = bytearray(self.fp.read(objlen)) self.seek(pos + objlen) while 1: try: (linepos, line) = self.nextline() except PSEOF: if settings.STRICT: raise PDFSyntaxError("Unexpected EOF") break if b"endstream" in line: i = line.index(b"endstream") objlen += i if self.fallback: data += line[:i] break objlen += len(line) if self.fallback: data += line self.seek(pos + objlen) # XXX limit objlen not to exceed object boundary log.debug( "Stream: pos=%d, objlen=%d, dic=%r, data=%r...", pos, objlen, dic, data[:10], ) assert self.doc is not None stream = PDFStream(dic, bytes(data), self.doc.decipher) self.push((pos, stream)) else: # others self.push((pos, token)) class PDFStreamParser(PDFParser): """ PDFStreamParser is used to parse PDF content streams that is contained in each page and has instructions for rendering the page. A reference to a PDF document is needed because a PDF content stream can also have indirect references to other objects in the same document. """ def __init__(self, data: bytes) -> None: PDFParser.__init__(self, BytesIO(data)) def flush(self) -> None: self.add_results(*self.popall()) KEYWORD_OBJ = KWD(b"obj") def do_keyword(self, pos: int, token: PSKeyword) -> None: if token is self.KEYWORD_R: # reference to indirect object try: ((_, objid), (_, genno)) = self.pop(2) (objid, genno) = (int(objid), int(genno)) # type: ignore[arg-type] obj = PDFObjRef(self.doc, objid, genno) self.push((pos, obj)) except PSSyntaxError: pass return elif token in (self.KEYWORD_OBJ, self.KEYWORD_ENDOBJ): if settings.STRICT: # See PDF Spec 3.4.6: Only the object values are stored in the # stream; the obj and endobj keywords are not used. raise PDFSyntaxError("Keyword endobj found in stream") return # others self.push((pos, token))
20220429-pdfminer-jameslp310
/20220429_pdfminer_jameslp310-0.0.2-py3-none-any.whl/pdfminer/pdfparser.py
pdfparser.py
# # RunLength decoder (Adobe version) implementation based on PDF Reference # version 1.4 section 3.3.4. # # * public domain * # def rldecode(data: bytes) -> bytes: """ RunLength decoder (Adobe version) implementation based on PDF Reference version 1.4 section 3.3.4: The RunLengthDecode filter decodes data that has been encoded in a simple byte-oriented format based on run length. The encoded data is a sequence of runs, where each run consists of a length byte followed by 1 to 128 bytes of data. If the length byte is in the range 0 to 127, the following length + 1 (1 to 128) bytes are copied literally during decompression. If length is in the range 129 to 255, the following single byte is to be copied 257 - length (2 to 128) times during decompression. A length value of 128 denotes EOD. """ decoded = b"" i = 0 while i < len(data): length = data[i] if length == 128: break if length >= 0 and length < 128: for j in range(i + 1, (i + 1) + (length + 1)): decoded += bytes((data[j],)) i = (i + 1) + (length + 1) if length > 128: run = bytes((data[i + 1],)) * (257 - length) decoded += run i = (i + 1) + 1 return decoded
20220429-pdfminer-jameslp310
/20220429_pdfminer_jameslp310-0.0.2-py3-none-any.whl/pdfminer/runlength.py
runlength.py
import math import os from struct import pack, unpack, calcsize from typing import BinaryIO, Dict, Iterable, List, Optional, Tuple, Union, cast # segment structure base SEG_STRUCT = [ (">L", "number"), (">B", "flags"), (">B", "retention_flags"), (">B", "page_assoc"), (">L", "data_length"), ] # segment header literals HEADER_FLAG_DEFERRED = 0b10000000 HEADER_FLAG_PAGE_ASSOC_LONG = 0b01000000 SEG_TYPE_MASK = 0b00111111 REF_COUNT_SHORT_MASK = 0b11100000 REF_COUNT_LONG_MASK = 0x1FFFFFFF REF_COUNT_LONG = 7 DATA_LEN_UNKNOWN = 0xFFFFFFFF # segment types SEG_TYPE_IMMEDIATE_GEN_REGION = 38 SEG_TYPE_END_OF_PAGE = 49 SEG_TYPE_END_OF_FILE = 51 # file literals FILE_HEADER_ID = b"\x97\x4A\x42\x32\x0D\x0A\x1A\x0A" FILE_HEAD_FLAG_SEQUENTIAL = 0b00000001 def bit_set(bit_pos: int, value: int) -> bool: return bool((value >> bit_pos) & 1) def check_flag(flag: int, value: int) -> bool: return bool(flag & value) def masked_value(mask: int, value: int) -> int: for bit_pos in range(0, 31): if bit_set(bit_pos, mask): return (value & mask) >> bit_pos raise Exception("Invalid mask or value") def mask_value(mask: int, value: int) -> int: for bit_pos in range(0, 31): if bit_set(bit_pos, mask): return (value & (mask >> bit_pos)) << bit_pos raise Exception("Invalid mask or value") def unpack_int(format: str, buffer: bytes) -> int: assert format in {">B", ">I", ">L"} [result] = cast(Tuple[int], unpack(format, buffer)) return result JBIG2SegmentFlags = Dict[str, Union[int, bool]] JBIG2RetentionFlags = Dict[str, Union[int, List[int], List[bool]]] JBIG2Segment = Dict[ str, Union[bool, int, bytes, JBIG2SegmentFlags, JBIG2RetentionFlags] ] class JBIG2StreamReader: """Read segments from a JBIG2 byte stream""" def __init__(self, stream: BinaryIO) -> None: self.stream = stream def get_segments(self) -> List[JBIG2Segment]: segments: List[JBIG2Segment] = [] while not self.is_eof(): segment: JBIG2Segment = {} for field_format, name in SEG_STRUCT: field_len = calcsize(field_format) field = self.stream.read(field_len) if len(field) < field_len: segment["_error"] = True break value = unpack_int(field_format, field) parser = getattr(self, "parse_%s" % name, None) if callable(parser): value = parser(segment, value, field) segment[name] = value if not segment.get("_error"): segments.append(segment) return segments def is_eof(self) -> bool: if self.stream.read(1) == b"": return True else: self.stream.seek(-1, os.SEEK_CUR) return False def parse_flags( self, segment: JBIG2Segment, flags: int, field: bytes ) -> JBIG2SegmentFlags: return { "deferred": check_flag(HEADER_FLAG_DEFERRED, flags), "page_assoc_long": check_flag(HEADER_FLAG_PAGE_ASSOC_LONG, flags), "type": masked_value(SEG_TYPE_MASK, flags), } def parse_retention_flags( self, segment: JBIG2Segment, flags: int, field: bytes ) -> JBIG2RetentionFlags: ref_count = masked_value(REF_COUNT_SHORT_MASK, flags) retain_segments = [] ref_segments = [] if ref_count < REF_COUNT_LONG: for bit_pos in range(5): retain_segments.append(bit_set(bit_pos, flags)) else: field += self.stream.read(3) ref_count = unpack_int(">L", field) ref_count = masked_value(REF_COUNT_LONG_MASK, ref_count) ret_bytes_count = int(math.ceil((ref_count + 1) / 8)) for ret_byte_index in range(ret_bytes_count): ret_byte = unpack_int(">B", self.stream.read(1)) for bit_pos in range(7): retain_segments.append(bit_set(bit_pos, ret_byte)) seg_num = segment["number"] assert isinstance(seg_num, int) if seg_num <= 256: ref_format = ">B" elif seg_num <= 65536: ref_format = ">I" else: ref_format = ">L" ref_size = calcsize(ref_format) for ref_index in range(ref_count): ref_data = self.stream.read(ref_size) ref = unpack_int(ref_format, ref_data) ref_segments.append(ref) return { "ref_count": ref_count, "retain_segments": retain_segments, "ref_segments": ref_segments, } def parse_page_assoc(self, segment: JBIG2Segment, page: int, field: bytes) -> int: if cast(JBIG2SegmentFlags, segment["flags"])["page_assoc_long"]: field += self.stream.read(3) page = unpack_int(">L", field) return page def parse_data_length( self, segment: JBIG2Segment, length: int, field: bytes ) -> int: if length: if ( cast(JBIG2SegmentFlags, segment["flags"])["type"] == SEG_TYPE_IMMEDIATE_GEN_REGION ) and (length == DATA_LEN_UNKNOWN): raise NotImplementedError( "Working with unknown segment length " "is not implemented yet" ) else: segment["raw_data"] = self.stream.read(length) return length class JBIG2StreamWriter: """Write JBIG2 segments to a file in JBIG2 format""" EMPTY_RETENTION_FLAGS: JBIG2RetentionFlags = { "ref_count": 0, "ref_segments": cast(List[int], []), "retain_segments": cast(List[bool], []), } def __init__(self, stream: BinaryIO) -> None: self.stream = stream def write_segments( self, segments: Iterable[JBIG2Segment], fix_last_page: bool = True ) -> int: data_len = 0 current_page: Optional[int] = None seg_num: Optional[int] = None for segment in segments: data = self.encode_segment(segment) self.stream.write(data) data_len += len(data) seg_num = cast(Optional[int], segment["number"]) if fix_last_page: seg_page = cast(int, segment.get("page_assoc")) if ( cast(JBIG2SegmentFlags, segment["flags"])["type"] == SEG_TYPE_END_OF_PAGE ): current_page = None elif seg_page: current_page = seg_page if fix_last_page and current_page and (seg_num is not None): segment = self.get_eop_segment(seg_num + 1, current_page) data = self.encode_segment(segment) self.stream.write(data) data_len += len(data) return data_len def write_file( self, segments: Iterable[JBIG2Segment], fix_last_page: bool = True ) -> int: header = FILE_HEADER_ID header_flags = FILE_HEAD_FLAG_SEQUENTIAL header += pack(">B", header_flags) # The embedded JBIG2 files in a PDF always # only have one page number_of_pages = pack(">L", 1) header += number_of_pages self.stream.write(header) data_len = len(header) data_len += self.write_segments(segments, fix_last_page) seg_num = 0 for segment in segments: seg_num = cast(int, segment["number"]) if fix_last_page: seg_num_offset = 2 else: seg_num_offset = 1 eof_segment = self.get_eof_segment(seg_num + seg_num_offset) data = self.encode_segment(eof_segment) self.stream.write(data) data_len += len(data) return data_len def encode_segment(self, segment: JBIG2Segment) -> bytes: data = b"" for field_format, name in SEG_STRUCT: value = segment.get(name) encoder = getattr(self, "encode_%s" % name, None) if callable(encoder): field = encoder(value, segment) else: field = pack(field_format, value) data += field return data def encode_flags(self, value: JBIG2SegmentFlags, segment: JBIG2Segment) -> bytes: flags = 0 if value.get("deferred"): flags |= HEADER_FLAG_DEFERRED if "page_assoc_long" in value: flags |= HEADER_FLAG_PAGE_ASSOC_LONG if value["page_assoc_long"] else flags else: flags |= ( HEADER_FLAG_PAGE_ASSOC_LONG if cast(int, segment.get("page", 0)) > 255 else flags ) flags |= mask_value(SEG_TYPE_MASK, value["type"]) return pack(">B", flags) def encode_retention_flags( self, value: JBIG2RetentionFlags, segment: JBIG2Segment ) -> bytes: flags = [] flags_format = ">B" ref_count = value["ref_count"] assert isinstance(ref_count, int) retain_segments = cast(List[bool], value.get("retain_segments", [])) if ref_count <= 4: flags_byte = mask_value(REF_COUNT_SHORT_MASK, ref_count) for ref_index, ref_retain in enumerate(retain_segments): if ref_retain: flags_byte |= 1 << ref_index flags.append(flags_byte) else: bytes_count = math.ceil((ref_count + 1) / 8) flags_format = ">L" + ("B" * bytes_count) flags_dword = mask_value(REF_COUNT_SHORT_MASK, REF_COUNT_LONG) << 24 flags.append(flags_dword) for byte_index in range(bytes_count): ret_byte = 0 ret_part = retain_segments[byte_index * 8 : byte_index * 8 + 8] for bit_pos, ret_seg in enumerate(ret_part): ret_byte |= 1 << bit_pos if ret_seg else ret_byte flags.append(ret_byte) ref_segments = cast(List[int], value.get("ref_segments", [])) seg_num = cast(int, segment["number"]) if seg_num <= 256: ref_format = "B" elif seg_num <= 65536: ref_format = "I" else: ref_format = "L" for ref in ref_segments: flags_format += ref_format flags.append(ref) return pack(flags_format, *flags) def encode_data_length(self, value: int, segment: JBIG2Segment) -> bytes: data = pack(">L", value) data += cast(bytes, segment["raw_data"]) return data def get_eop_segment(self, seg_number: int, page_number: int) -> JBIG2Segment: return { "data_length": 0, "flags": {"deferred": False, "type": SEG_TYPE_END_OF_PAGE}, "number": seg_number, "page_assoc": page_number, "raw_data": b"", "retention_flags": JBIG2StreamWriter.EMPTY_RETENTION_FLAGS, } def get_eof_segment(self, seg_number: int) -> JBIG2Segment: return { "data_length": 0, "flags": {"deferred": False, "type": SEG_TYPE_END_OF_FILE}, "number": seg_number, "page_assoc": 0, "raw_data": b"", "retention_flags": JBIG2StreamWriter.EMPTY_RETENTION_FLAGS, }
20220429-pdfminer-jameslp310
/20220429_pdfminer_jameslp310-0.0.2-py3-none-any.whl/pdfminer/jbig2.py
jbig2.py
""" Mappings from Adobe glyph names to Unicode characters. In some CMap tables, Adobe glyph names are used for specifying Unicode characters instead of using decimal/hex character code. The following data was taken by $ wget https://partners.adobe.com/public/developer/en/opentype/glyphlist.txt $ python tools/conv_glyphlist.py glyphlist.txt > glyphlist.py """ # ################################################################################### # Copyright (c) 1997,1998,2002,2007 Adobe Systems Incorporated # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this documentation file to use, copy, publish, distribute, # sublicense, and/or sell copies of the documentation, and to permit # others to do the same, provided that: # - No modification, editing or other alteration of this document is # allowed; and # - The above copyright notice and this permission notice shall be # included in all copies of the documentation. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this documentation file, to create their own derivative works # from the content of this document to use, copy, publish, distribute, # sublicense, and/or sell the derivative works, and to permit others to do # the same, provided that the derived work is not represented as being a # copy or version of this document. # # Adobe shall not be liable to any party for any loss of revenue or profit # or for indirect, incidental, special, consequential, or other similar # damages, whether based on tort (including without limitation negligence # or strict liability), contract or other legal or equitable grounds even # if Adobe has been advised or had reason to know of the possibility of # such damages. The Adobe materials are provided on an "AS IS" basis. # Adobe specifically disclaims all express, statutory, or implied # warranties relating to the Adobe materials, including but not limited to # those concerning merchantability or fitness for a particular purpose or # non-infringement of any third party rights regarding the Adobe # materials. # ################################################################################### # Name: Adobe Glyph List # Table version: 2.0 # Date: September 20, 2002 # # See http://partners.adobe.com/asn/developer/typeforum/unicodegn.html # # Format: Semicolon-delimited fields: # (1) glyph name # (2) Unicode scalar value glyphname2unicode = { "A": "\u0041", "AE": "\u00C6", "AEacute": "\u01FC", "AEmacron": "\u01E2", "AEsmall": "\uF7E6", "Aacute": "\u00C1", "Aacutesmall": "\uF7E1", "Abreve": "\u0102", "Abreveacute": "\u1EAE", "Abrevecyrillic": "\u04D0", "Abrevedotbelow": "\u1EB6", "Abrevegrave": "\u1EB0", "Abrevehookabove": "\u1EB2", "Abrevetilde": "\u1EB4", "Acaron": "\u01CD", "Acircle": "\u24B6", "Acircumflex": "\u00C2", "Acircumflexacute": "\u1EA4", "Acircumflexdotbelow": "\u1EAC", "Acircumflexgrave": "\u1EA6", "Acircumflexhookabove": "\u1EA8", "Acircumflexsmall": "\uF7E2", "Acircumflextilde": "\u1EAA", "Acute": "\uF6C9", "Acutesmall": "\uF7B4", "Acyrillic": "\u0410", "Adblgrave": "\u0200", "Adieresis": "\u00C4", "Adieresiscyrillic": "\u04D2", "Adieresismacron": "\u01DE", "Adieresissmall": "\uF7E4", "Adotbelow": "\u1EA0", "Adotmacron": "\u01E0", "Agrave": "\u00C0", "Agravesmall": "\uF7E0", "Ahookabove": "\u1EA2", "Aiecyrillic": "\u04D4", "Ainvertedbreve": "\u0202", "Alpha": "\u0391", "Alphatonos": "\u0386", "Amacron": "\u0100", "Amonospace": "\uFF21", "Aogonek": "\u0104", "Aring": "\u00C5", "Aringacute": "\u01FA", "Aringbelow": "\u1E00", "Aringsmall": "\uF7E5", "Asmall": "\uF761", "Atilde": "\u00C3", "Atildesmall": "\uF7E3", "Aybarmenian": "\u0531", "B": "\u0042", "Bcircle": "\u24B7", "Bdotaccent": "\u1E02", "Bdotbelow": "\u1E04", "Becyrillic": "\u0411", "Benarmenian": "\u0532", "Beta": "\u0392", "Bhook": "\u0181", "Blinebelow": "\u1E06", "Bmonospace": "\uFF22", "Brevesmall": "\uF6F4", "Bsmall": "\uF762", "Btopbar": "\u0182", "C": "\u0043", "Caarmenian": "\u053E", "Cacute": "\u0106", "Caron": "\uF6CA", "Caronsmall": "\uF6F5", "Ccaron": "\u010C", "Ccedilla": "\u00C7", "Ccedillaacute": "\u1E08", "Ccedillasmall": "\uF7E7", "Ccircle": "\u24B8", "Ccircumflex": "\u0108", "Cdot": "\u010A", "Cdotaccent": "\u010A", "Cedillasmall": "\uF7B8", "Chaarmenian": "\u0549", "Cheabkhasiancyrillic": "\u04BC", "Checyrillic": "\u0427", "Chedescenderabkhasiancyrillic": "\u04BE", "Chedescendercyrillic": "\u04B6", "Chedieresiscyrillic": "\u04F4", "Cheharmenian": "\u0543", "Chekhakassiancyrillic": "\u04CB", "Cheverticalstrokecyrillic": "\u04B8", "Chi": "\u03A7", "Chook": "\u0187", "Circumflexsmall": "\uF6F6", "Cmonospace": "\uFF23", "Coarmenian": "\u0551", "Csmall": "\uF763", "D": "\u0044", "DZ": "\u01F1", "DZcaron": "\u01C4", "Daarmenian": "\u0534", "Dafrican": "\u0189", "Dcaron": "\u010E", "Dcedilla": "\u1E10", "Dcircle": "\u24B9", "Dcircumflexbelow": "\u1E12", "Dcroat": "\u0110", "Ddotaccent": "\u1E0A", "Ddotbelow": "\u1E0C", "Decyrillic": "\u0414", "Deicoptic": "\u03EE", "Delta": "\u2206", "Deltagreek": "\u0394", "Dhook": "\u018A", "Dieresis": "\uF6CB", "DieresisAcute": "\uF6CC", "DieresisGrave": "\uF6CD", "Dieresissmall": "\uF7A8", "Digammagreek": "\u03DC", "Djecyrillic": "\u0402", "Dlinebelow": "\u1E0E", "Dmonospace": "\uFF24", "Dotaccentsmall": "\uF6F7", "Dslash": "\u0110", "Dsmall": "\uF764", "Dtopbar": "\u018B", "Dz": "\u01F2", "Dzcaron": "\u01C5", "Dzeabkhasiancyrillic": "\u04E0", "Dzecyrillic": "\u0405", "Dzhecyrillic": "\u040F", "E": "\u0045", "Eacute": "\u00C9", "Eacutesmall": "\uF7E9", "Ebreve": "\u0114", "Ecaron": "\u011A", "Ecedillabreve": "\u1E1C", "Echarmenian": "\u0535", "Ecircle": "\u24BA", "Ecircumflex": "\u00CA", "Ecircumflexacute": "\u1EBE", "Ecircumflexbelow": "\u1E18", "Ecircumflexdotbelow": "\u1EC6", "Ecircumflexgrave": "\u1EC0", "Ecircumflexhookabove": "\u1EC2", "Ecircumflexsmall": "\uF7EA", "Ecircumflextilde": "\u1EC4", "Ecyrillic": "\u0404", "Edblgrave": "\u0204", "Edieresis": "\u00CB", "Edieresissmall": "\uF7EB", "Edot": "\u0116", "Edotaccent": "\u0116", "Edotbelow": "\u1EB8", "Efcyrillic": "\u0424", "Egrave": "\u00C8", "Egravesmall": "\uF7E8", "Eharmenian": "\u0537", "Ehookabove": "\u1EBA", "Eightroman": "\u2167", "Einvertedbreve": "\u0206", "Eiotifiedcyrillic": "\u0464", "Elcyrillic": "\u041B", "Elevenroman": "\u216A", "Emacron": "\u0112", "Emacronacute": "\u1E16", "Emacrongrave": "\u1E14", "Emcyrillic": "\u041C", "Emonospace": "\uFF25", "Encyrillic": "\u041D", "Endescendercyrillic": "\u04A2", "Eng": "\u014A", "Enghecyrillic": "\u04A4", "Enhookcyrillic": "\u04C7", "Eogonek": "\u0118", "Eopen": "\u0190", "Epsilon": "\u0395", "Epsilontonos": "\u0388", "Ercyrillic": "\u0420", "Ereversed": "\u018E", "Ereversedcyrillic": "\u042D", "Escyrillic": "\u0421", "Esdescendercyrillic": "\u04AA", "Esh": "\u01A9", "Esmall": "\uF765", "Eta": "\u0397", "Etarmenian": "\u0538", "Etatonos": "\u0389", "Eth": "\u00D0", "Ethsmall": "\uF7F0", "Etilde": "\u1EBC", "Etildebelow": "\u1E1A", "Euro": "\u20AC", "Ezh": "\u01B7", "Ezhcaron": "\u01EE", "Ezhreversed": "\u01B8", "F": "\u0046", "Fcircle": "\u24BB", "Fdotaccent": "\u1E1E", "Feharmenian": "\u0556", "Feicoptic": "\u03E4", "Fhook": "\u0191", "Fitacyrillic": "\u0472", "Fiveroman": "\u2164", "Fmonospace": "\uFF26", "Fourroman": "\u2163", "Fsmall": "\uF766", "G": "\u0047", "GBsquare": "\u3387", "Gacute": "\u01F4", "Gamma": "\u0393", "Gammaafrican": "\u0194", "Gangiacoptic": "\u03EA", "Gbreve": "\u011E", "Gcaron": "\u01E6", "Gcedilla": "\u0122", "Gcircle": "\u24BC", "Gcircumflex": "\u011C", "Gcommaaccent": "\u0122", "Gdot": "\u0120", "Gdotaccent": "\u0120", "Gecyrillic": "\u0413", "Ghadarmenian": "\u0542", "Ghemiddlehookcyrillic": "\u0494", "Ghestrokecyrillic": "\u0492", "Gheupturncyrillic": "\u0490", "Ghook": "\u0193", "Gimarmenian": "\u0533", "Gjecyrillic": "\u0403", "Gmacron": "\u1E20", "Gmonospace": "\uFF27", "Grave": "\uF6CE", "Gravesmall": "\uF760", "Gsmall": "\uF767", "Gsmallhook": "\u029B", "Gstroke": "\u01E4", "H": "\u0048", "H18533": "\u25CF", "H18543": "\u25AA", "H18551": "\u25AB", "H22073": "\u25A1", "HPsquare": "\u33CB", "Haabkhasiancyrillic": "\u04A8", "Hadescendercyrillic": "\u04B2", "Hardsigncyrillic": "\u042A", "Hbar": "\u0126", "Hbrevebelow": "\u1E2A", "Hcedilla": "\u1E28", "Hcircle": "\u24BD", "Hcircumflex": "\u0124", "Hdieresis": "\u1E26", "Hdotaccent": "\u1E22", "Hdotbelow": "\u1E24", "Hmonospace": "\uFF28", "Hoarmenian": "\u0540", "Horicoptic": "\u03E8", "Hsmall": "\uF768", "Hungarumlaut": "\uF6CF", "Hungarumlautsmall": "\uF6F8", "Hzsquare": "\u3390", "I": "\u0049", "IAcyrillic": "\u042F", "IJ": "\u0132", "IUcyrillic": "\u042E", "Iacute": "\u00CD", "Iacutesmall": "\uF7ED", "Ibreve": "\u012C", "Icaron": "\u01CF", "Icircle": "\u24BE", "Icircumflex": "\u00CE", "Icircumflexsmall": "\uF7EE", "Icyrillic": "\u0406", "Idblgrave": "\u0208", "Idieresis": "\u00CF", "Idieresisacute": "\u1E2E", "Idieresiscyrillic": "\u04E4", "Idieresissmall": "\uF7EF", "Idot": "\u0130", "Idotaccent": "\u0130", "Idotbelow": "\u1ECA", "Iebrevecyrillic": "\u04D6", "Iecyrillic": "\u0415", "Ifraktur": "\u2111", "Igrave": "\u00CC", "Igravesmall": "\uF7EC", "Ihookabove": "\u1EC8", "Iicyrillic": "\u0418", "Iinvertedbreve": "\u020A", "Iishortcyrillic": "\u0419", "Imacron": "\u012A", "Imacroncyrillic": "\u04E2", "Imonospace": "\uFF29", "Iniarmenian": "\u053B", "Iocyrillic": "\u0401", "Iogonek": "\u012E", "Iota": "\u0399", "Iotaafrican": "\u0196", "Iotadieresis": "\u03AA", "Iotatonos": "\u038A", "Ismall": "\uF769", "Istroke": "\u0197", "Itilde": "\u0128", "Itildebelow": "\u1E2C", "Izhitsacyrillic": "\u0474", "Izhitsadblgravecyrillic": "\u0476", "J": "\u004A", "Jaarmenian": "\u0541", "Jcircle": "\u24BF", "Jcircumflex": "\u0134", "Jecyrillic": "\u0408", "Jheharmenian": "\u054B", "Jmonospace": "\uFF2A", "Jsmall": "\uF76A", "K": "\u004B", "KBsquare": "\u3385", "KKsquare": "\u33CD", "Kabashkircyrillic": "\u04A0", "Kacute": "\u1E30", "Kacyrillic": "\u041A", "Kadescendercyrillic": "\u049A", "Kahookcyrillic": "\u04C3", "Kappa": "\u039A", "Kastrokecyrillic": "\u049E", "Kaverticalstrokecyrillic": "\u049C", "Kcaron": "\u01E8", "Kcedilla": "\u0136", "Kcircle": "\u24C0", "Kcommaaccent": "\u0136", "Kdotbelow": "\u1E32", "Keharmenian": "\u0554", "Kenarmenian": "\u053F", "Khacyrillic": "\u0425", "Kheicoptic": "\u03E6", "Khook": "\u0198", "Kjecyrillic": "\u040C", "Klinebelow": "\u1E34", "Kmonospace": "\uFF2B", "Koppacyrillic": "\u0480", "Koppagreek": "\u03DE", "Ksicyrillic": "\u046E", "Ksmall": "\uF76B", "L": "\u004C", "LJ": "\u01C7", "LL": "\uF6BF", "Lacute": "\u0139", "Lambda": "\u039B", "Lcaron": "\u013D", "Lcedilla": "\u013B", "Lcircle": "\u24C1", "Lcircumflexbelow": "\u1E3C", "Lcommaaccent": "\u013B", "Ldot": "\u013F", "Ldotaccent": "\u013F", "Ldotbelow": "\u1E36", "Ldotbelowmacron": "\u1E38", "Liwnarmenian": "\u053C", "Lj": "\u01C8", "Ljecyrillic": "\u0409", "Llinebelow": "\u1E3A", "Lmonospace": "\uFF2C", "Lslash": "\u0141", "Lslashsmall": "\uF6F9", "Lsmall": "\uF76C", "M": "\u004D", "MBsquare": "\u3386", "Macron": "\uF6D0", "Macronsmall": "\uF7AF", "Macute": "\u1E3E", "Mcircle": "\u24C2", "Mdotaccent": "\u1E40", "Mdotbelow": "\u1E42", "Menarmenian": "\u0544", "Mmonospace": "\uFF2D", "Msmall": "\uF76D", "Mturned": "\u019C", "Mu": "\u039C", "N": "\u004E", "NJ": "\u01CA", "Nacute": "\u0143", "Ncaron": "\u0147", "Ncedilla": "\u0145", "Ncircle": "\u24C3", "Ncircumflexbelow": "\u1E4A", "Ncommaaccent": "\u0145", "Ndotaccent": "\u1E44", "Ndotbelow": "\u1E46", "Nhookleft": "\u019D", "Nineroman": "\u2168", "Nj": "\u01CB", "Njecyrillic": "\u040A", "Nlinebelow": "\u1E48", "Nmonospace": "\uFF2E", "Nowarmenian": "\u0546", "Nsmall": "\uF76E", "Ntilde": "\u00D1", "Ntildesmall": "\uF7F1", "Nu": "\u039D", "O": "\u004F", "OE": "\u0152", "OEsmall": "\uF6FA", "Oacute": "\u00D3", "Oacutesmall": "\uF7F3", "Obarredcyrillic": "\u04E8", "Obarreddieresiscyrillic": "\u04EA", "Obreve": "\u014E", "Ocaron": "\u01D1", "Ocenteredtilde": "\u019F", "Ocircle": "\u24C4", "Ocircumflex": "\u00D4", "Ocircumflexacute": "\u1ED0", "Ocircumflexdotbelow": "\u1ED8", "Ocircumflexgrave": "\u1ED2", "Ocircumflexhookabove": "\u1ED4", "Ocircumflexsmall": "\uF7F4", "Ocircumflextilde": "\u1ED6", "Ocyrillic": "\u041E", "Odblacute": "\u0150", "Odblgrave": "\u020C", "Odieresis": "\u00D6", "Odieresiscyrillic": "\u04E6", "Odieresissmall": "\uF7F6", "Odotbelow": "\u1ECC", "Ogoneksmall": "\uF6FB", "Ograve": "\u00D2", "Ogravesmall": "\uF7F2", "Oharmenian": "\u0555", "Ohm": "\u2126", "Ohookabove": "\u1ECE", "Ohorn": "\u01A0", "Ohornacute": "\u1EDA", "Ohorndotbelow": "\u1EE2", "Ohorngrave": "\u1EDC", "Ohornhookabove": "\u1EDE", "Ohorntilde": "\u1EE0", "Ohungarumlaut": "\u0150", "Oi": "\u01A2", "Oinvertedbreve": "\u020E", "Omacron": "\u014C", "Omacronacute": "\u1E52", "Omacrongrave": "\u1E50", "Omega": "\u2126", "Omegacyrillic": "\u0460", "Omegagreek": "\u03A9", "Omegaroundcyrillic": "\u047A", "Omegatitlocyrillic": "\u047C", "Omegatonos": "\u038F", "Omicron": "\u039F", "Omicrontonos": "\u038C", "Omonospace": "\uFF2F", "Oneroman": "\u2160", "Oogonek": "\u01EA", "Oogonekmacron": "\u01EC", "Oopen": "\u0186", "Oslash": "\u00D8", "Oslashacute": "\u01FE", "Oslashsmall": "\uF7F8", "Osmall": "\uF76F", "Ostrokeacute": "\u01FE", "Otcyrillic": "\u047E", "Otilde": "\u00D5", "Otildeacute": "\u1E4C", "Otildedieresis": "\u1E4E", "Otildesmall": "\uF7F5", "P": "\u0050", "Pacute": "\u1E54", "Pcircle": "\u24C5", "Pdotaccent": "\u1E56", "Pecyrillic": "\u041F", "Peharmenian": "\u054A", "Pemiddlehookcyrillic": "\u04A6", "Phi": "\u03A6", "Phook": "\u01A4", "Pi": "\u03A0", "Piwrarmenian": "\u0553", "Pmonospace": "\uFF30", "Psi": "\u03A8", "Psicyrillic": "\u0470", "Psmall": "\uF770", "Q": "\u0051", "Qcircle": "\u24C6", "Qmonospace": "\uFF31", "Qsmall": "\uF771", "R": "\u0052", "Raarmenian": "\u054C", "Racute": "\u0154", "Rcaron": "\u0158", "Rcedilla": "\u0156", "Rcircle": "\u24C7", "Rcommaaccent": "\u0156", "Rdblgrave": "\u0210", "Rdotaccent": "\u1E58", "Rdotbelow": "\u1E5A", "Rdotbelowmacron": "\u1E5C", "Reharmenian": "\u0550", "Rfraktur": "\u211C", "Rho": "\u03A1", "Ringsmall": "\uF6FC", "Rinvertedbreve": "\u0212", "Rlinebelow": "\u1E5E", "Rmonospace": "\uFF32", "Rsmall": "\uF772", "Rsmallinverted": "\u0281", "Rsmallinvertedsuperior": "\u02B6", "S": "\u0053", "SF010000": "\u250C", "SF020000": "\u2514", "SF030000": "\u2510", "SF040000": "\u2518", "SF050000": "\u253C", "SF060000": "\u252C", "SF070000": "\u2534", "SF080000": "\u251C", "SF090000": "\u2524", "SF100000": "\u2500", "SF110000": "\u2502", "SF190000": "\u2561", "SF200000": "\u2562", "SF210000": "\u2556", "SF220000": "\u2555", "SF230000": "\u2563", "SF240000": "\u2551", "SF250000": "\u2557", "SF260000": "\u255D", "SF270000": "\u255C", "SF280000": "\u255B", "SF360000": "\u255E", "SF370000": "\u255F", "SF380000": "\u255A", "SF390000": "\u2554", "SF400000": "\u2569", "SF410000": "\u2566", "SF420000": "\u2560", "SF430000": "\u2550", "SF440000": "\u256C", "SF450000": "\u2567", "SF460000": "\u2568", "SF470000": "\u2564", "SF480000": "\u2565", "SF490000": "\u2559", "SF500000": "\u2558", "SF510000": "\u2552", "SF520000": "\u2553", "SF530000": "\u256B", "SF540000": "\u256A", "Sacute": "\u015A", "Sacutedotaccent": "\u1E64", "Sampigreek": "\u03E0", "Scaron": "\u0160", "Scarondotaccent": "\u1E66", "Scaronsmall": "\uF6FD", "Scedilla": "\u015E", "Schwa": "\u018F", "Schwacyrillic": "\u04D8", "Schwadieresiscyrillic": "\u04DA", "Scircle": "\u24C8", "Scircumflex": "\u015C", "Scommaaccent": "\u0218", "Sdotaccent": "\u1E60", "Sdotbelow": "\u1E62", "Sdotbelowdotaccent": "\u1E68", "Seharmenian": "\u054D", "Sevenroman": "\u2166", "Shaarmenian": "\u0547", "Shacyrillic": "\u0428", "Shchacyrillic": "\u0429", "Sheicoptic": "\u03E2", "Shhacyrillic": "\u04BA", "Shimacoptic": "\u03EC", "Sigma": "\u03A3", "Sixroman": "\u2165", "Smonospace": "\uFF33", "Softsigncyrillic": "\u042C", "Ssmall": "\uF773", "Stigmagreek": "\u03DA", "T": "\u0054", "Tau": "\u03A4", "Tbar": "\u0166", "Tcaron": "\u0164", "Tcedilla": "\u0162", "Tcircle": "\u24C9", "Tcircumflexbelow": "\u1E70", "Tcommaaccent": "\u0162", "Tdotaccent": "\u1E6A", "Tdotbelow": "\u1E6C", "Tecyrillic": "\u0422", "Tedescendercyrillic": "\u04AC", "Tenroman": "\u2169", "Tetsecyrillic": "\u04B4", "Theta": "\u0398", "Thook": "\u01AC", "Thorn": "\u00DE", "Thornsmall": "\uF7FE", "Threeroman": "\u2162", "Tildesmall": "\uF6FE", "Tiwnarmenian": "\u054F", "Tlinebelow": "\u1E6E", "Tmonospace": "\uFF34", "Toarmenian": "\u0539", "Tonefive": "\u01BC", "Tonesix": "\u0184", "Tonetwo": "\u01A7", "Tretroflexhook": "\u01AE", "Tsecyrillic": "\u0426", "Tshecyrillic": "\u040B", "Tsmall": "\uF774", "Twelveroman": "\u216B", "Tworoman": "\u2161", "U": "\u0055", "Uacute": "\u00DA", "Uacutesmall": "\uF7FA", "Ubreve": "\u016C", "Ucaron": "\u01D3", "Ucircle": "\u24CA", "Ucircumflex": "\u00DB", "Ucircumflexbelow": "\u1E76", "Ucircumflexsmall": "\uF7FB", "Ucyrillic": "\u0423", "Udblacute": "\u0170", "Udblgrave": "\u0214", "Udieresis": "\u00DC", "Udieresisacute": "\u01D7", "Udieresisbelow": "\u1E72", "Udieresiscaron": "\u01D9", "Udieresiscyrillic": "\u04F0", "Udieresisgrave": "\u01DB", "Udieresismacron": "\u01D5", "Udieresissmall": "\uF7FC", "Udotbelow": "\u1EE4", "Ugrave": "\u00D9", "Ugravesmall": "\uF7F9", "Uhookabove": "\u1EE6", "Uhorn": "\u01AF", "Uhornacute": "\u1EE8", "Uhorndotbelow": "\u1EF0", "Uhorngrave": "\u1EEA", "Uhornhookabove": "\u1EEC", "Uhorntilde": "\u1EEE", "Uhungarumlaut": "\u0170", "Uhungarumlautcyrillic": "\u04F2", "Uinvertedbreve": "\u0216", "Ukcyrillic": "\u0478", "Umacron": "\u016A", "Umacroncyrillic": "\u04EE", "Umacrondieresis": "\u1E7A", "Umonospace": "\uFF35", "Uogonek": "\u0172", "Upsilon": "\u03A5", "Upsilon1": "\u03D2", "Upsilonacutehooksymbolgreek": "\u03D3", "Upsilonafrican": "\u01B1", "Upsilondieresis": "\u03AB", "Upsilondieresishooksymbolgreek": "\u03D4", "Upsilonhooksymbol": "\u03D2", "Upsilontonos": "\u038E", "Uring": "\u016E", "Ushortcyrillic": "\u040E", "Usmall": "\uF775", "Ustraightcyrillic": "\u04AE", "Ustraightstrokecyrillic": "\u04B0", "Utilde": "\u0168", "Utildeacute": "\u1E78", "Utildebelow": "\u1E74", "V": "\u0056", "Vcircle": "\u24CB", "Vdotbelow": "\u1E7E", "Vecyrillic": "\u0412", "Vewarmenian": "\u054E", "Vhook": "\u01B2", "Vmonospace": "\uFF36", "Voarmenian": "\u0548", "Vsmall": "\uF776", "Vtilde": "\u1E7C", "W": "\u0057", "Wacute": "\u1E82", "Wcircle": "\u24CC", "Wcircumflex": "\u0174", "Wdieresis": "\u1E84", "Wdotaccent": "\u1E86", "Wdotbelow": "\u1E88", "Wgrave": "\u1E80", "Wmonospace": "\uFF37", "Wsmall": "\uF777", "X": "\u0058", "Xcircle": "\u24CD", "Xdieresis": "\u1E8C", "Xdotaccent": "\u1E8A", "Xeharmenian": "\u053D", "Xi": "\u039E", "Xmonospace": "\uFF38", "Xsmall": "\uF778", "Y": "\u0059", "Yacute": "\u00DD", "Yacutesmall": "\uF7FD", "Yatcyrillic": "\u0462", "Ycircle": "\u24CE", "Ycircumflex": "\u0176", "Ydieresis": "\u0178", "Ydieresissmall": "\uF7FF", "Ydotaccent": "\u1E8E", "Ydotbelow": "\u1EF4", "Yericyrillic": "\u042B", "Yerudieresiscyrillic": "\u04F8", "Ygrave": "\u1EF2", "Yhook": "\u01B3", "Yhookabove": "\u1EF6", "Yiarmenian": "\u0545", "Yicyrillic": "\u0407", "Yiwnarmenian": "\u0552", "Ymonospace": "\uFF39", "Ysmall": "\uF779", "Ytilde": "\u1EF8", "Yusbigcyrillic": "\u046A", "Yusbigiotifiedcyrillic": "\u046C", "Yuslittlecyrillic": "\u0466", "Yuslittleiotifiedcyrillic": "\u0468", "Z": "\u005A", "Zaarmenian": "\u0536", "Zacute": "\u0179", "Zcaron": "\u017D", "Zcaronsmall": "\uF6FF", "Zcircle": "\u24CF", "Zcircumflex": "\u1E90", "Zdot": "\u017B", "Zdotaccent": "\u017B", "Zdotbelow": "\u1E92", "Zecyrillic": "\u0417", "Zedescendercyrillic": "\u0498", "Zedieresiscyrillic": "\u04DE", "Zeta": "\u0396", "Zhearmenian": "\u053A", "Zhebrevecyrillic": "\u04C1", "Zhecyrillic": "\u0416", "Zhedescendercyrillic": "\u0496", "Zhedieresiscyrillic": "\u04DC", "Zlinebelow": "\u1E94", "Zmonospace": "\uFF3A", "Zsmall": "\uF77A", "Zstroke": "\u01B5", "a": "\u0061", "aabengali": "\u0986", "aacute": "\u00E1", "aadeva": "\u0906", "aagujarati": "\u0A86", "aagurmukhi": "\u0A06", "aamatragurmukhi": "\u0A3E", "aarusquare": "\u3303", "aavowelsignbengali": "\u09BE", "aavowelsigndeva": "\u093E", "aavowelsigngujarati": "\u0ABE", "abbreviationmarkarmenian": "\u055F", "abbreviationsigndeva": "\u0970", "abengali": "\u0985", "abopomofo": "\u311A", "abreve": "\u0103", "abreveacute": "\u1EAF", "abrevecyrillic": "\u04D1", "abrevedotbelow": "\u1EB7", "abrevegrave": "\u1EB1", "abrevehookabove": "\u1EB3", "abrevetilde": "\u1EB5", "acaron": "\u01CE", "acircle": "\u24D0", "acircumflex": "\u00E2", "acircumflexacute": "\u1EA5", "acircumflexdotbelow": "\u1EAD", "acircumflexgrave": "\u1EA7", "acircumflexhookabove": "\u1EA9", "acircumflextilde": "\u1EAB", "acute": "\u00B4", "acutebelowcmb": "\u0317", "acutecmb": "\u0301", "acutecomb": "\u0301", "acutedeva": "\u0954", "acutelowmod": "\u02CF", "acutetonecmb": "\u0341", "acyrillic": "\u0430", "adblgrave": "\u0201", "addakgurmukhi": "\u0A71", "adeva": "\u0905", "adieresis": "\u00E4", "adieresiscyrillic": "\u04D3", "adieresismacron": "\u01DF", "adotbelow": "\u1EA1", "adotmacron": "\u01E1", "ae": "\u00E6", "aeacute": "\u01FD", "aekorean": "\u3150", "aemacron": "\u01E3", "afii00208": "\u2015", "afii08941": "\u20A4", "afii10017": "\u0410", "afii10018": "\u0411", "afii10019": "\u0412", "afii10020": "\u0413", "afii10021": "\u0414", "afii10022": "\u0415", "afii10023": "\u0401", "afii10024": "\u0416", "afii10025": "\u0417", "afii10026": "\u0418", "afii10027": "\u0419", "afii10028": "\u041A", "afii10029": "\u041B", "afii10030": "\u041C", "afii10031": "\u041D", "afii10032": "\u041E", "afii10033": "\u041F", "afii10034": "\u0420", "afii10035": "\u0421", "afii10036": "\u0422", "afii10037": "\u0423", "afii10038": "\u0424", "afii10039": "\u0425", "afii10040": "\u0426", "afii10041": "\u0427", "afii10042": "\u0428", "afii10043": "\u0429", "afii10044": "\u042A", "afii10045": "\u042B", "afii10046": "\u042C", "afii10047": "\u042D", "afii10048": "\u042E", "afii10049": "\u042F", "afii10050": "\u0490", "afii10051": "\u0402", "afii10052": "\u0403", "afii10053": "\u0404", "afii10054": "\u0405", "afii10055": "\u0406", "afii10056": "\u0407", "afii10057": "\u0408", "afii10058": "\u0409", "afii10059": "\u040A", "afii10060": "\u040B", "afii10061": "\u040C", "afii10062": "\u040E", "afii10063": "\uF6C4", "afii10064": "\uF6C5", "afii10065": "\u0430", "afii10066": "\u0431", "afii10067": "\u0432", "afii10068": "\u0433", "afii10069": "\u0434", "afii10070": "\u0435", "afii10071": "\u0451", "afii10072": "\u0436", "afii10073": "\u0437", "afii10074": "\u0438", "afii10075": "\u0439", "afii10076": "\u043A", "afii10077": "\u043B", "afii10078": "\u043C", "afii10079": "\u043D", "afii10080": "\u043E", "afii10081": "\u043F", "afii10082": "\u0440", "afii10083": "\u0441", "afii10084": "\u0442", "afii10085": "\u0443", "afii10086": "\u0444", "afii10087": "\u0445", "afii10088": "\u0446", "afii10089": "\u0447", "afii10090": "\u0448", "afii10091": "\u0449", "afii10092": "\u044A", "afii10093": "\u044B", "afii10094": "\u044C", "afii10095": "\u044D", "afii10096": "\u044E", "afii10097": "\u044F", "afii10098": "\u0491", "afii10099": "\u0452", "afii10100": "\u0453", "afii10101": "\u0454", "afii10102": "\u0455", "afii10103": "\u0456", "afii10104": "\u0457", "afii10105": "\u0458", "afii10106": "\u0459", "afii10107": "\u045A", "afii10108": "\u045B", "afii10109": "\u045C", "afii10110": "\u045E", "afii10145": "\u040F", "afii10146": "\u0462", "afii10147": "\u0472", "afii10148": "\u0474", "afii10192": "\uF6C6", "afii10193": "\u045F", "afii10194": "\u0463", "afii10195": "\u0473", "afii10196": "\u0475", "afii10831": "\uF6C7", "afii10832": "\uF6C8", "afii10846": "\u04D9", "afii299": "\u200E", "afii300": "\u200F", "afii301": "\u200D", "afii57381": "\u066A", "afii57388": "\u060C", "afii57392": "\u0660", "afii57393": "\u0661", "afii57394": "\u0662", "afii57395": "\u0663", "afii57396": "\u0664", "afii57397": "\u0665", "afii57398": "\u0666", "afii57399": "\u0667", "afii57400": "\u0668", "afii57401": "\u0669", "afii57403": "\u061B", "afii57407": "\u061F", "afii57409": "\u0621", "afii57410": "\u0622", "afii57411": "\u0623", "afii57412": "\u0624", "afii57413": "\u0625", "afii57414": "\u0626", "afii57415": "\u0627", "afii57416": "\u0628", "afii57417": "\u0629", "afii57418": "\u062A", "afii57419": "\u062B", "afii57420": "\u062C", "afii57421": "\u062D", "afii57422": "\u062E", "afii57423": "\u062F", "afii57424": "\u0630", "afii57425": "\u0631", "afii57426": "\u0632", "afii57427": "\u0633", "afii57428": "\u0634", "afii57429": "\u0635", "afii57430": "\u0636", "afii57431": "\u0637", "afii57432": "\u0638", "afii57433": "\u0639", "afii57434": "\u063A", "afii57440": "\u0640", "afii57441": "\u0641", "afii57442": "\u0642", "afii57443": "\u0643", "afii57444": "\u0644", "afii57445": "\u0645", "afii57446": "\u0646", "afii57448": "\u0648", "afii57449": "\u0649", "afii57450": "\u064A", "afii57451": "\u064B", "afii57452": "\u064C", "afii57453": "\u064D", "afii57454": "\u064E", "afii57455": "\u064F", "afii57456": "\u0650", "afii57457": "\u0651", "afii57458": "\u0652", "afii57470": "\u0647", "afii57505": "\u06A4", "afii57506": "\u067E", "afii57507": "\u0686", "afii57508": "\u0698", "afii57509": "\u06AF", "afii57511": "\u0679", "afii57512": "\u0688", "afii57513": "\u0691", "afii57514": "\u06BA", "afii57519": "\u06D2", "afii57534": "\u06D5", "afii57636": "\u20AA", "afii57645": "\u05BE", "afii57658": "\u05C3", "afii57664": "\u05D0", "afii57665": "\u05D1", "afii57666": "\u05D2", "afii57667": "\u05D3", "afii57668": "\u05D4", "afii57669": "\u05D5", "afii57670": "\u05D6", "afii57671": "\u05D7", "afii57672": "\u05D8", "afii57673": "\u05D9", "afii57674": "\u05DA", "afii57675": "\u05DB", "afii57676": "\u05DC", "afii57677": "\u05DD", "afii57678": "\u05DE", "afii57679": "\u05DF", "afii57680": "\u05E0", "afii57681": "\u05E1", "afii57682": "\u05E2", "afii57683": "\u05E3", "afii57684": "\u05E4", "afii57685": "\u05E5", "afii57686": "\u05E6", "afii57687": "\u05E7", "afii57688": "\u05E8", "afii57689": "\u05E9", "afii57690": "\u05EA", "afii57694": "\uFB2A", "afii57695": "\uFB2B", "afii57700": "\uFB4B", "afii57705": "\uFB1F", "afii57716": "\u05F0", "afii57717": "\u05F1", "afii57718": "\u05F2", "afii57723": "\uFB35", "afii57793": "\u05B4", "afii57794": "\u05B5", "afii57795": "\u05B6", "afii57796": "\u05BB", "afii57797": "\u05B8", "afii57798": "\u05B7", "afii57799": "\u05B0", "afii57800": "\u05B2", "afii57801": "\u05B1", "afii57802": "\u05B3", "afii57803": "\u05C2", "afii57804": "\u05C1", "afii57806": "\u05B9", "afii57807": "\u05BC", "afii57839": "\u05BD", "afii57841": "\u05BF", "afii57842": "\u05C0", "afii57929": "\u02BC", "afii61248": "\u2105", "afii61289": "\u2113", "afii61352": "\u2116", "afii61573": "\u202C", "afii61574": "\u202D", "afii61575": "\u202E", "afii61664": "\u200C", "afii63167": "\u066D", "afii64937": "\u02BD", "agrave": "\u00E0", "agujarati": "\u0A85", "agurmukhi": "\u0A05", "ahiragana": "\u3042", "ahookabove": "\u1EA3", "aibengali": "\u0990", "aibopomofo": "\u311E", "aideva": "\u0910", "aiecyrillic": "\u04D5", "aigujarati": "\u0A90", "aigurmukhi": "\u0A10", "aimatragurmukhi": "\u0A48", "ainarabic": "\u0639", "ainfinalarabic": "\uFECA", "aininitialarabic": "\uFECB", "ainmedialarabic": "\uFECC", "ainvertedbreve": "\u0203", "aivowelsignbengali": "\u09C8", "aivowelsigndeva": "\u0948", "aivowelsigngujarati": "\u0AC8", "akatakana": "\u30A2", "akatakanahalfwidth": "\uFF71", "akorean": "\u314F", "alef": "\u05D0", "alefarabic": "\u0627", "alefdageshhebrew": "\uFB30", "aleffinalarabic": "\uFE8E", "alefhamzaabovearabic": "\u0623", "alefhamzaabovefinalarabic": "\uFE84", "alefhamzabelowarabic": "\u0625", "alefhamzabelowfinalarabic": "\uFE88", "alefhebrew": "\u05D0", "aleflamedhebrew": "\uFB4F", "alefmaddaabovearabic": "\u0622", "alefmaddaabovefinalarabic": "\uFE82", "alefmaksuraarabic": "\u0649", "alefmaksurafinalarabic": "\uFEF0", "alefmaksurainitialarabic": "\uFEF3", "alefmaksuramedialarabic": "\uFEF4", "alefpatahhebrew": "\uFB2E", "alefqamatshebrew": "\uFB2F", "aleph": "\u2135", "allequal": "\u224C", "alpha": "\u03B1", "alphatonos": "\u03AC", "amacron": "\u0101", "amonospace": "\uFF41", "ampersand": "\u0026", "ampersandmonospace": "\uFF06", "ampersandsmall": "\uF726", "amsquare": "\u33C2", "anbopomofo": "\u3122", "angbopomofo": "\u3124", "angkhankhuthai": "\u0E5A", "angle": "\u2220", "anglebracketleft": "\u3008", "anglebracketleftvertical": "\uFE3F", "anglebracketright": "\u3009", "anglebracketrightvertical": "\uFE40", "angleleft": "\u2329", "angleright": "\u232A", "angstrom": "\u212B", "anoteleia": "\u0387", "anudattadeva": "\u0952", "anusvarabengali": "\u0982", "anusvaradeva": "\u0902", "anusvaragujarati": "\u0A82", "aogonek": "\u0105", "apaatosquare": "\u3300", "aparen": "\u249C", "apostrophearmenian": "\u055A", "apostrophemod": "\u02BC", "apple": "\uF8FF", "approaches": "\u2250", "approxequal": "\u2248", "approxequalorimage": "\u2252", "approximatelyequal": "\u2245", "araeaekorean": "\u318E", "araeakorean": "\u318D", "arc": "\u2312", "arighthalfring": "\u1E9A", "aring": "\u00E5", "aringacute": "\u01FB", "aringbelow": "\u1E01", "arrowboth": "\u2194", "arrowdashdown": "\u21E3", "arrowdashleft": "\u21E0", "arrowdashright": "\u21E2", "arrowdashup": "\u21E1", "arrowdblboth": "\u21D4", "arrowdbldown": "\u21D3", "arrowdblleft": "\u21D0", "arrowdblright": "\u21D2", "arrowdblup": "\u21D1", "arrowdown": "\u2193", "arrowdownleft": "\u2199", "arrowdownright": "\u2198", "arrowdownwhite": "\u21E9", "arrowheaddownmod": "\u02C5", "arrowheadleftmod": "\u02C2", "arrowheadrightmod": "\u02C3", "arrowheadupmod": "\u02C4", "arrowhorizex": "\uF8E7", "arrowleft": "\u2190", "arrowleftdbl": "\u21D0", "arrowleftdblstroke": "\u21CD", "arrowleftoverright": "\u21C6", "arrowleftwhite": "\u21E6", "arrowright": "\u2192", "arrowrightdblstroke": "\u21CF", "arrowrightheavy": "\u279E", "arrowrightoverleft": "\u21C4", "arrowrightwhite": "\u21E8", "arrowtableft": "\u21E4", "arrowtabright": "\u21E5", "arrowup": "\u2191", "arrowupdn": "\u2195", "arrowupdnbse": "\u21A8", "arrowupdownbase": "\u21A8", "arrowupleft": "\u2196", "arrowupleftofdown": "\u21C5", "arrowupright": "\u2197", "arrowupwhite": "\u21E7", "arrowvertex": "\uF8E6", "asciicircum": "\u005E", "asciicircummonospace": "\uFF3E", "asciitilde": "\u007E", "asciitildemonospace": "\uFF5E", "ascript": "\u0251", "ascriptturned": "\u0252", "asmallhiragana": "\u3041", "asmallkatakana": "\u30A1", "asmallkatakanahalfwidth": "\uFF67", "asterisk": "\u002A", "asteriskaltonearabic": "\u066D", "asteriskarabic": "\u066D", "asteriskmath": "\u2217", "asteriskmonospace": "\uFF0A", "asterisksmall": "\uFE61", "asterism": "\u2042", "asuperior": "\uF6E9", "asymptoticallyequal": "\u2243", "at": "\u0040", "atilde": "\u00E3", "atmonospace": "\uFF20", "atsmall": "\uFE6B", "aturned": "\u0250", "aubengali": "\u0994", "aubopomofo": "\u3120", "audeva": "\u0914", "augujarati": "\u0A94", "augurmukhi": "\u0A14", "aulengthmarkbengali": "\u09D7", "aumatragurmukhi": "\u0A4C", "auvowelsignbengali": "\u09CC", "auvowelsigndeva": "\u094C", "auvowelsigngujarati": "\u0ACC", "avagrahadeva": "\u093D", "aybarmenian": "\u0561", "ayin": "\u05E2", "ayinaltonehebrew": "\uFB20", "ayinhebrew": "\u05E2", "b": "\u0062", "babengali": "\u09AC", "backslash": "\u005C", "backslashmonospace": "\uFF3C", "badeva": "\u092C", "bagujarati": "\u0AAC", "bagurmukhi": "\u0A2C", "bahiragana": "\u3070", "bahtthai": "\u0E3F", "bakatakana": "\u30D0", "bar": "\u007C", "barmonospace": "\uFF5C", "bbopomofo": "\u3105", "bcircle": "\u24D1", "bdotaccent": "\u1E03", "bdotbelow": "\u1E05", "beamedsixteenthnotes": "\u266C", "because": "\u2235", "becyrillic": "\u0431", "beharabic": "\u0628", "behfinalarabic": "\uFE90", "behinitialarabic": "\uFE91", "behiragana": "\u3079", "behmedialarabic": "\uFE92", "behmeeminitialarabic": "\uFC9F", "behmeemisolatedarabic": "\uFC08", "behnoonfinalarabic": "\uFC6D", "bekatakana": "\u30D9", "benarmenian": "\u0562", "bet": "\u05D1", "beta": "\u03B2", "betasymbolgreek": "\u03D0", "betdagesh": "\uFB31", "betdageshhebrew": "\uFB31", "bethebrew": "\u05D1", "betrafehebrew": "\uFB4C", "bhabengali": "\u09AD", "bhadeva": "\u092D", "bhagujarati": "\u0AAD", "bhagurmukhi": "\u0A2D", "bhook": "\u0253", "bihiragana": "\u3073", "bikatakana": "\u30D3", "bilabialclick": "\u0298", "bindigurmukhi": "\u0A02", "birusquare": "\u3331", "blackcircle": "\u25CF", "blackdiamond": "\u25C6", "blackdownpointingtriangle": "\u25BC", "blackleftpointingpointer": "\u25C4", "blackleftpointingtriangle": "\u25C0", "blacklenticularbracketleft": "\u3010", "blacklenticularbracketleftvertical": "\uFE3B", "blacklenticularbracketright": "\u3011", "blacklenticularbracketrightvertical": "\uFE3C", "blacklowerlefttriangle": "\u25E3", "blacklowerrighttriangle": "\u25E2", "blackrectangle": "\u25AC", "blackrightpointingpointer": "\u25BA", "blackrightpointingtriangle": "\u25B6", "blacksmallsquare": "\u25AA", "blacksmilingface": "\u263B", "blacksquare": "\u25A0", "blackstar": "\u2605", "blackupperlefttriangle": "\u25E4", "blackupperrighttriangle": "\u25E5", "blackuppointingsmalltriangle": "\u25B4", "blackuppointingtriangle": "\u25B2", "blank": "\u2423", "blinebelow": "\u1E07", "block": "\u2588", "bmonospace": "\uFF42", "bobaimaithai": "\u0E1A", "bohiragana": "\u307C", "bokatakana": "\u30DC", "bparen": "\u249D", "bqsquare": "\u33C3", "braceex": "\uF8F4", "braceleft": "\u007B", "braceleftbt": "\uF8F3", "braceleftmid": "\uF8F2", "braceleftmonospace": "\uFF5B", "braceleftsmall": "\uFE5B", "bracelefttp": "\uF8F1", "braceleftvertical": "\uFE37", "braceright": "\u007D", "bracerightbt": "\uF8FE", "bracerightmid": "\uF8FD", "bracerightmonospace": "\uFF5D", "bracerightsmall": "\uFE5C", "bracerighttp": "\uF8FC", "bracerightvertical": "\uFE38", "bracketleft": "\u005B", "bracketleftbt": "\uF8F0", "bracketleftex": "\uF8EF", "bracketleftmonospace": "\uFF3B", "bracketlefttp": "\uF8EE", "bracketright": "\u005D", "bracketrightbt": "\uF8FB", "bracketrightex": "\uF8FA", "bracketrightmonospace": "\uFF3D", "bracketrighttp": "\uF8F9", "breve": "\u02D8", "brevebelowcmb": "\u032E", "brevecmb": "\u0306", "breveinvertedbelowcmb": "\u032F", "breveinvertedcmb": "\u0311", "breveinverteddoublecmb": "\u0361", "bridgebelowcmb": "\u032A", "bridgeinvertedbelowcmb": "\u033A", "brokenbar": "\u00A6", "bstroke": "\u0180", "bsuperior": "\uF6EA", "btopbar": "\u0183", "buhiragana": "\u3076", "bukatakana": "\u30D6", "bullet": "\u2022", "bulletinverse": "\u25D8", "bulletoperator": "\u2219", "bullseye": "\u25CE", "c": "\u0063", "caarmenian": "\u056E", "cabengali": "\u099A", "cacute": "\u0107", "cadeva": "\u091A", "cagujarati": "\u0A9A", "cagurmukhi": "\u0A1A", "calsquare": "\u3388", "candrabindubengali": "\u0981", "candrabinducmb": "\u0310", "candrabindudeva": "\u0901", "candrabindugujarati": "\u0A81", "capslock": "\u21EA", "careof": "\u2105", "caron": "\u02C7", "caronbelowcmb": "\u032C", "caroncmb": "\u030C", "carriagereturn": "\u21B5", "cbopomofo": "\u3118", "ccaron": "\u010D", "ccedilla": "\u00E7", "ccedillaacute": "\u1E09", "ccircle": "\u24D2", "ccircumflex": "\u0109", "ccurl": "\u0255", "cdot": "\u010B", "cdotaccent": "\u010B", "cdsquare": "\u33C5", "cedilla": "\u00B8", "cedillacmb": "\u0327", "cent": "\u00A2", "centigrade": "\u2103", "centinferior": "\uF6DF", "centmonospace": "\uFFE0", "centoldstyle": "\uF7A2", "centsuperior": "\uF6E0", "chaarmenian": "\u0579", "chabengali": "\u099B", "chadeva": "\u091B", "chagujarati": "\u0A9B", "chagurmukhi": "\u0A1B", "chbopomofo": "\u3114", "cheabkhasiancyrillic": "\u04BD", "checkmark": "\u2713", "checyrillic": "\u0447", "chedescenderabkhasiancyrillic": "\u04BF", "chedescendercyrillic": "\u04B7", "chedieresiscyrillic": "\u04F5", "cheharmenian": "\u0573", "chekhakassiancyrillic": "\u04CC", "cheverticalstrokecyrillic": "\u04B9", "chi": "\u03C7", "chieuchacirclekorean": "\u3277", "chieuchaparenkorean": "\u3217", "chieuchcirclekorean": "\u3269", "chieuchkorean": "\u314A", "chieuchparenkorean": "\u3209", "chochangthai": "\u0E0A", "chochanthai": "\u0E08", "chochingthai": "\u0E09", "chochoethai": "\u0E0C", "chook": "\u0188", "cieucacirclekorean": "\u3276", "cieucaparenkorean": "\u3216", "cieuccirclekorean": "\u3268", "cieuckorean": "\u3148", "cieucparenkorean": "\u3208", "cieucuparenkorean": "\u321C", "circle": "\u25CB", "circlemultiply": "\u2297", "circleot": "\u2299", "circleplus": "\u2295", "circlepostalmark": "\u3036", "circlewithlefthalfblack": "\u25D0", "circlewithrighthalfblack": "\u25D1", "circumflex": "\u02C6", "circumflexbelowcmb": "\u032D", "circumflexcmb": "\u0302", "clear": "\u2327", "clickalveolar": "\u01C2", "clickdental": "\u01C0", "clicklateral": "\u01C1", "clickretroflex": "\u01C3", "club": "\u2663", "clubsuitblack": "\u2663", "clubsuitwhite": "\u2667", "cmcubedsquare": "\u33A4", "cmonospace": "\uFF43", "cmsquaredsquare": "\u33A0", "coarmenian": "\u0581", "colon": "\u003A", "colonmonetary": "\u20A1", "colonmonospace": "\uFF1A", "colonsign": "\u20A1", "colonsmall": "\uFE55", "colontriangularhalfmod": "\u02D1", "colontriangularmod": "\u02D0", "comma": "\u002C", "commaabovecmb": "\u0313", "commaaboverightcmb": "\u0315", "commaaccent": "\uF6C3", "commaarabic": "\u060C", "commaarmenian": "\u055D", "commainferior": "\uF6E1", "commamonospace": "\uFF0C", "commareversedabovecmb": "\u0314", "commareversedmod": "\u02BD", "commasmall": "\uFE50", "commasuperior": "\uF6E2", "commaturnedabovecmb": "\u0312", "commaturnedmod": "\u02BB", "compass": "\u263C", "congruent": "\u2245", "contourintegral": "\u222E", "control": "\u2303", "controlACK": "\u0006", "controlBEL": "\u0007", "controlBS": "\u0008", "controlCAN": "\u0018", "controlCR": "\u000D", "controlDC1": "\u0011", "controlDC2": "\u0012", "controlDC3": "\u0013", "controlDC4": "\u0014", "controlDEL": "\u007F", "controlDLE": "\u0010", "controlEM": "\u0019", "controlENQ": "\u0005", "controlEOT": "\u0004", "controlESC": "\u001B", "controlETB": "\u0017", "controlETX": "\u0003", "controlFF": "\u000C", "controlFS": "\u001C", "controlGS": "\u001D", "controlHT": "\u0009", "controlLF": "\u000A", "controlNAK": "\u0015", "controlRS": "\u001E", "controlSI": "\u000F", "controlSO": "\u000E", "controlSOT": "\u0002", "controlSTX": "\u0001", "controlSUB": "\u001A", "controlSYN": "\u0016", "controlUS": "\u001F", "controlVT": "\u000B", "copyright": "\u00A9", "copyrightsans": "\uF8E9", "copyrightserif": "\uF6D9", "cornerbracketleft": "\u300C", "cornerbracketlefthalfwidth": "\uFF62", "cornerbracketleftvertical": "\uFE41", "cornerbracketright": "\u300D", "cornerbracketrighthalfwidth": "\uFF63", "cornerbracketrightvertical": "\uFE42", "corporationsquare": "\u337F", "cosquare": "\u33C7", "coverkgsquare": "\u33C6", "cparen": "\u249E", "cruzeiro": "\u20A2", "cstretched": "\u0297", "curlyand": "\u22CF", "curlyor": "\u22CE", "currency": "\u00A4", "cyrBreve": "\uF6D1", "cyrFlex": "\uF6D2", "cyrbreve": "\uF6D4", "cyrflex": "\uF6D5", "d": "\u0064", "daarmenian": "\u0564", "dabengali": "\u09A6", "dadarabic": "\u0636", "dadeva": "\u0926", "dadfinalarabic": "\uFEBE", "dadinitialarabic": "\uFEBF", "dadmedialarabic": "\uFEC0", "dagesh": "\u05BC", "dageshhebrew": "\u05BC", "dagger": "\u2020", "daggerdbl": "\u2021", "dagujarati": "\u0AA6", "dagurmukhi": "\u0A26", "dahiragana": "\u3060", "dakatakana": "\u30C0", "dalarabic": "\u062F", "dalet": "\u05D3", "daletdagesh": "\uFB33", "daletdageshhebrew": "\uFB33", "dalethatafpatah": "\u05D3\u05B2", "dalethatafpatahhebrew": "\u05D3\u05B2", "dalethatafsegol": "\u05D3\u05B1", "dalethatafsegolhebrew": "\u05D3\u05B1", "dalethebrew": "\u05D3", "dalethiriq": "\u05D3\u05B4", "dalethiriqhebrew": "\u05D3\u05B4", "daletholam": "\u05D3\u05B9", "daletholamhebrew": "\u05D3\u05B9", "daletpatah": "\u05D3\u05B7", "daletpatahhebrew": "\u05D3\u05B7", "daletqamats": "\u05D3\u05B8", "daletqamatshebrew": "\u05D3\u05B8", "daletqubuts": "\u05D3\u05BB", "daletqubutshebrew": "\u05D3\u05BB", "daletsegol": "\u05D3\u05B6", "daletsegolhebrew": "\u05D3\u05B6", "daletsheva": "\u05D3\u05B0", "daletshevahebrew": "\u05D3\u05B0", "dalettsere": "\u05D3\u05B5", "dalettserehebrew": "\u05D3\u05B5", "dalfinalarabic": "\uFEAA", "dammaarabic": "\u064F", "dammalowarabic": "\u064F", "dammatanaltonearabic": "\u064C", "dammatanarabic": "\u064C", "danda": "\u0964", "dargahebrew": "\u05A7", "dargalefthebrew": "\u05A7", "dasiapneumatacyrilliccmb": "\u0485", "dblGrave": "\uF6D3", "dblanglebracketleft": "\u300A", "dblanglebracketleftvertical": "\uFE3D", "dblanglebracketright": "\u300B", "dblanglebracketrightvertical": "\uFE3E", "dblarchinvertedbelowcmb": "\u032B", "dblarrowleft": "\u21D4", "dblarrowright": "\u21D2", "dbldanda": "\u0965", "dblgrave": "\uF6D6", "dblgravecmb": "\u030F", "dblintegral": "\u222C", "dbllowline": "\u2017", "dbllowlinecmb": "\u0333", "dbloverlinecmb": "\u033F", "dblprimemod": "\u02BA", "dblverticalbar": "\u2016", "dblverticallineabovecmb": "\u030E", "dbopomofo": "\u3109", "dbsquare": "\u33C8", "dcaron": "\u010F", "dcedilla": "\u1E11", "dcircle": "\u24D3", "dcircumflexbelow": "\u1E13", "dcroat": "\u0111", "ddabengali": "\u09A1", "ddadeva": "\u0921", "ddagujarati": "\u0AA1", "ddagurmukhi": "\u0A21", "ddalarabic": "\u0688", "ddalfinalarabic": "\uFB89", "dddhadeva": "\u095C", "ddhabengali": "\u09A2", "ddhadeva": "\u0922", "ddhagujarati": "\u0AA2", "ddhagurmukhi": "\u0A22", "ddotaccent": "\u1E0B", "ddotbelow": "\u1E0D", "decimalseparatorarabic": "\u066B", "decimalseparatorpersian": "\u066B", "decyrillic": "\u0434", "degree": "\u00B0", "dehihebrew": "\u05AD", "dehiragana": "\u3067", "deicoptic": "\u03EF", "dekatakana": "\u30C7", "deleteleft": "\u232B", "deleteright": "\u2326", "delta": "\u03B4", "deltaturned": "\u018D", "denominatorminusonenumeratorbengali": "\u09F8", "dezh": "\u02A4", "dhabengali": "\u09A7", "dhadeva": "\u0927", "dhagujarati": "\u0AA7", "dhagurmukhi": "\u0A27", "dhook": "\u0257", "dialytikatonos": "\u0385", "dialytikatonoscmb": "\u0344", "diamond": "\u2666", "diamondsuitwhite": "\u2662", "dieresis": "\u00A8", "dieresisacute": "\uF6D7", "dieresisbelowcmb": "\u0324", "dieresiscmb": "\u0308", "dieresisgrave": "\uF6D8", "dieresistonos": "\u0385", "dihiragana": "\u3062", "dikatakana": "\u30C2", "dittomark": "\u3003", "divide": "\u00F7", "divides": "\u2223", "divisionslash": "\u2215", "djecyrillic": "\u0452", "dkshade": "\u2593", "dlinebelow": "\u1E0F", "dlsquare": "\u3397", "dmacron": "\u0111", "dmonospace": "\uFF44", "dnblock": "\u2584", "dochadathai": "\u0E0E", "dodekthai": "\u0E14", "dohiragana": "\u3069", "dokatakana": "\u30C9", "dollar": "\u0024", "dollarinferior": "\uF6E3", "dollarmonospace": "\uFF04", "dollaroldstyle": "\uF724", "dollarsmall": "\uFE69", "dollarsuperior": "\uF6E4", "dong": "\u20AB", "dorusquare": "\u3326", "dotaccent": "\u02D9", "dotaccentcmb": "\u0307", "dotbelowcmb": "\u0323", "dotbelowcomb": "\u0323", "dotkatakana": "\u30FB", "dotlessi": "\u0131", "dotlessj": "\uF6BE", "dotlessjstrokehook": "\u0284", "dotmath": "\u22C5", "dottedcircle": "\u25CC", "doubleyodpatah": "\uFB1F", "doubleyodpatahhebrew": "\uFB1F", "downtackbelowcmb": "\u031E", "downtackmod": "\u02D5", "dparen": "\u249F", "dsuperior": "\uF6EB", "dtail": "\u0256", "dtopbar": "\u018C", "duhiragana": "\u3065", "dukatakana": "\u30C5", "dz": "\u01F3", "dzaltone": "\u02A3", "dzcaron": "\u01C6", "dzcurl": "\u02A5", "dzeabkhasiancyrillic": "\u04E1", "dzecyrillic": "\u0455", "dzhecyrillic": "\u045F", "e": "\u0065", "eacute": "\u00E9", "earth": "\u2641", "ebengali": "\u098F", "ebopomofo": "\u311C", "ebreve": "\u0115", "ecandradeva": "\u090D", "ecandragujarati": "\u0A8D", "ecandravowelsigndeva": "\u0945", "ecandravowelsigngujarati": "\u0AC5", "ecaron": "\u011B", "ecedillabreve": "\u1E1D", "echarmenian": "\u0565", "echyiwnarmenian": "\u0587", "ecircle": "\u24D4", "ecircumflex": "\u00EA", "ecircumflexacute": "\u1EBF", "ecircumflexbelow": "\u1E19", "ecircumflexdotbelow": "\u1EC7", "ecircumflexgrave": "\u1EC1", "ecircumflexhookabove": "\u1EC3", "ecircumflextilde": "\u1EC5", "ecyrillic": "\u0454", "edblgrave": "\u0205", "edeva": "\u090F", "edieresis": "\u00EB", "edot": "\u0117", "edotaccent": "\u0117", "edotbelow": "\u1EB9", "eegurmukhi": "\u0A0F", "eematragurmukhi": "\u0A47", "efcyrillic": "\u0444", "egrave": "\u00E8", "egujarati": "\u0A8F", "eharmenian": "\u0567", "ehbopomofo": "\u311D", "ehiragana": "\u3048", "ehookabove": "\u1EBB", "eibopomofo": "\u311F", "eight": "\u0038", "eightarabic": "\u0668", "eightbengali": "\u09EE", "eightcircle": "\u2467", "eightcircleinversesansserif": "\u2791", "eightdeva": "\u096E", "eighteencircle": "\u2471", "eighteenparen": "\u2485", "eighteenperiod": "\u2499", "eightgujarati": "\u0AEE", "eightgurmukhi": "\u0A6E", "eighthackarabic": "\u0668", "eighthangzhou": "\u3028", "eighthnotebeamed": "\u266B", "eightideographicparen": "\u3227", "eightinferior": "\u2088", "eightmonospace": "\uFF18", "eightoldstyle": "\uF738", "eightparen": "\u247B", "eightperiod": "\u248F", "eightpersian": "\u06F8", "eightroman": "\u2177", "eightsuperior": "\u2078", "eightthai": "\u0E58", "einvertedbreve": "\u0207", "eiotifiedcyrillic": "\u0465", "ekatakana": "\u30A8", "ekatakanahalfwidth": "\uFF74", "ekonkargurmukhi": "\u0A74", "ekorean": "\u3154", "elcyrillic": "\u043B", "element": "\u2208", "elevencircle": "\u246A", "elevenparen": "\u247E", "elevenperiod": "\u2492", "elevenroman": "\u217A", "ellipsis": "\u2026", "ellipsisvertical": "\u22EE", "emacron": "\u0113", "emacronacute": "\u1E17", "emacrongrave": "\u1E15", "emcyrillic": "\u043C", "emdash": "\u2014", "emdashvertical": "\uFE31", "emonospace": "\uFF45", "emphasismarkarmenian": "\u055B", "emptyset": "\u2205", "enbopomofo": "\u3123", "encyrillic": "\u043D", "endash": "\u2013", "endashvertical": "\uFE32", "endescendercyrillic": "\u04A3", "eng": "\u014B", "engbopomofo": "\u3125", "enghecyrillic": "\u04A5", "enhookcyrillic": "\u04C8", "enspace": "\u2002", "eogonek": "\u0119", "eokorean": "\u3153", "eopen": "\u025B", "eopenclosed": "\u029A", "eopenreversed": "\u025C", "eopenreversedclosed": "\u025E", "eopenreversedhook": "\u025D", "eparen": "\u24A0", "epsilon": "\u03B5", "epsilontonos": "\u03AD", "equal": "\u003D", "equalmonospace": "\uFF1D", "equalsmall": "\uFE66", "equalsuperior": "\u207C", "equivalence": "\u2261", "erbopomofo": "\u3126", "ercyrillic": "\u0440", "ereversed": "\u0258", "ereversedcyrillic": "\u044D", "escyrillic": "\u0441", "esdescendercyrillic": "\u04AB", "esh": "\u0283", "eshcurl": "\u0286", "eshortdeva": "\u090E", "eshortvowelsigndeva": "\u0946", "eshreversedloop": "\u01AA", "eshsquatreversed": "\u0285", "esmallhiragana": "\u3047", "esmallkatakana": "\u30A7", "esmallkatakanahalfwidth": "\uFF6A", "estimated": "\u212E", "esuperior": "\uF6EC", "eta": "\u03B7", "etarmenian": "\u0568", "etatonos": "\u03AE", "eth": "\u00F0", "etilde": "\u1EBD", "etildebelow": "\u1E1B", "etnahtafoukhhebrew": "\u0591", "etnahtafoukhlefthebrew": "\u0591", "etnahtahebrew": "\u0591", "etnahtalefthebrew": "\u0591", "eturned": "\u01DD", "eukorean": "\u3161", "euro": "\u20AC", "evowelsignbengali": "\u09C7", "evowelsigndeva": "\u0947", "evowelsigngujarati": "\u0AC7", "exclam": "\u0021", "exclamarmenian": "\u055C", "exclamdbl": "\u203C", "exclamdown": "\u00A1", "exclamdownsmall": "\uF7A1", "exclammonospace": "\uFF01", "exclamsmall": "\uF721", "existential": "\u2203", "ezh": "\u0292", "ezhcaron": "\u01EF", "ezhcurl": "\u0293", "ezhreversed": "\u01B9", "ezhtail": "\u01BA", "f": "\u0066", "fadeva": "\u095E", "fagurmukhi": "\u0A5E", "fahrenheit": "\u2109", "fathaarabic": "\u064E", "fathalowarabic": "\u064E", "fathatanarabic": "\u064B", "fbopomofo": "\u3108", "fcircle": "\u24D5", "fdotaccent": "\u1E1F", "feharabic": "\u0641", "feharmenian": "\u0586", "fehfinalarabic": "\uFED2", "fehinitialarabic": "\uFED3", "fehmedialarabic": "\uFED4", "feicoptic": "\u03E5", "female": "\u2640", "ff": "\uFB00", "ffi": "\uFB03", "ffl": "\uFB04", "fi": "\uFB01", "fifteencircle": "\u246E", "fifteenparen": "\u2482", "fifteenperiod": "\u2496", "figuredash": "\u2012", "filledbox": "\u25A0", "filledrect": "\u25AC", "finalkaf": "\u05DA", "finalkafdagesh": "\uFB3A", "finalkafdageshhebrew": "\uFB3A", "finalkafhebrew": "\u05DA", "finalkafqamats": "\u05DA\u05B8", "finalkafqamatshebrew": "\u05DA\u05B8", "finalkafsheva": "\u05DA\u05B0", "finalkafshevahebrew": "\u05DA\u05B0", "finalmem": "\u05DD", "finalmemhebrew": "\u05DD", "finalnun": "\u05DF", "finalnunhebrew": "\u05DF", "finalpe": "\u05E3", "finalpehebrew": "\u05E3", "finaltsadi": "\u05E5", "finaltsadihebrew": "\u05E5", "firsttonechinese": "\u02C9", "fisheye": "\u25C9", "fitacyrillic": "\u0473", "five": "\u0035", "fivearabic": "\u0665", "fivebengali": "\u09EB", "fivecircle": "\u2464", "fivecircleinversesansserif": "\u278E", "fivedeva": "\u096B", "fiveeighths": "\u215D", "fivegujarati": "\u0AEB", "fivegurmukhi": "\u0A6B", "fivehackarabic": "\u0665", "fivehangzhou": "\u3025", "fiveideographicparen": "\u3224", "fiveinferior": "\u2085", "fivemonospace": "\uFF15", "fiveoldstyle": "\uF735", "fiveparen": "\u2478", "fiveperiod": "\u248C", "fivepersian": "\u06F5", "fiveroman": "\u2174", "fivesuperior": "\u2075", "fivethai": "\u0E55", "fl": "\uFB02", "florin": "\u0192", "fmonospace": "\uFF46", "fmsquare": "\u3399", "fofanthai": "\u0E1F", "fofathai": "\u0E1D", "fongmanthai": "\u0E4F", "forall": "\u2200", "four": "\u0034", "fourarabic": "\u0664", "fourbengali": "\u09EA", "fourcircle": "\u2463", "fourcircleinversesansserif": "\u278D", "fourdeva": "\u096A", "fourgujarati": "\u0AEA", "fourgurmukhi": "\u0A6A", "fourhackarabic": "\u0664", "fourhangzhou": "\u3024", "fourideographicparen": "\u3223", "fourinferior": "\u2084", "fourmonospace": "\uFF14", "fournumeratorbengali": "\u09F7", "fouroldstyle": "\uF734", "fourparen": "\u2477", "fourperiod": "\u248B", "fourpersian": "\u06F4", "fourroman": "\u2173", "foursuperior": "\u2074", "fourteencircle": "\u246D", "fourteenparen": "\u2481", "fourteenperiod": "\u2495", "fourthai": "\u0E54", "fourthtonechinese": "\u02CB", "fparen": "\u24A1", "fraction": "\u2044", "franc": "\u20A3", "g": "\u0067", "gabengali": "\u0997", "gacute": "\u01F5", "gadeva": "\u0917", "gafarabic": "\u06AF", "gaffinalarabic": "\uFB93", "gafinitialarabic": "\uFB94", "gafmedialarabic": "\uFB95", "gagujarati": "\u0A97", "gagurmukhi": "\u0A17", "gahiragana": "\u304C", "gakatakana": "\u30AC", "gamma": "\u03B3", "gammalatinsmall": "\u0263", "gammasuperior": "\u02E0", "gangiacoptic": "\u03EB", "gbopomofo": "\u310D", "gbreve": "\u011F", "gcaron": "\u01E7", "gcedilla": "\u0123", "gcircle": "\u24D6", "gcircumflex": "\u011D", "gcommaaccent": "\u0123", "gdot": "\u0121", "gdotaccent": "\u0121", "gecyrillic": "\u0433", "gehiragana": "\u3052", "gekatakana": "\u30B2", "geometricallyequal": "\u2251", "gereshaccenthebrew": "\u059C", "gereshhebrew": "\u05F3", "gereshmuqdamhebrew": "\u059D", "germandbls": "\u00DF", "gershayimaccenthebrew": "\u059E", "gershayimhebrew": "\u05F4", "getamark": "\u3013", "ghabengali": "\u0998", "ghadarmenian": "\u0572", "ghadeva": "\u0918", "ghagujarati": "\u0A98", "ghagurmukhi": "\u0A18", "ghainarabic": "\u063A", "ghainfinalarabic": "\uFECE", "ghaininitialarabic": "\uFECF", "ghainmedialarabic": "\uFED0", "ghemiddlehookcyrillic": "\u0495", "ghestrokecyrillic": "\u0493", "gheupturncyrillic": "\u0491", "ghhadeva": "\u095A", "ghhagurmukhi": "\u0A5A", "ghook": "\u0260", "ghzsquare": "\u3393", "gihiragana": "\u304E", "gikatakana": "\u30AE", "gimarmenian": "\u0563", "gimel": "\u05D2", "gimeldagesh": "\uFB32", "gimeldageshhebrew": "\uFB32", "gimelhebrew": "\u05D2", "gjecyrillic": "\u0453", "glottalinvertedstroke": "\u01BE", "glottalstop": "\u0294", "glottalstopinverted": "\u0296", "glottalstopmod": "\u02C0", "glottalstopreversed": "\u0295", "glottalstopreversedmod": "\u02C1", "glottalstopreversedsuperior": "\u02E4", "glottalstopstroke": "\u02A1", "glottalstopstrokereversed": "\u02A2", "gmacron": "\u1E21", "gmonospace": "\uFF47", "gohiragana": "\u3054", "gokatakana": "\u30B4", "gparen": "\u24A2", "gpasquare": "\u33AC", "gradient": "\u2207", "grave": "\u0060", "gravebelowcmb": "\u0316", "gravecmb": "\u0300", "gravecomb": "\u0300", "gravedeva": "\u0953", "gravelowmod": "\u02CE", "gravemonospace": "\uFF40", "gravetonecmb": "\u0340", "greater": "\u003E", "greaterequal": "\u2265", "greaterequalorless": "\u22DB", "greatermonospace": "\uFF1E", "greaterorequivalent": "\u2273", "greaterorless": "\u2277", "greateroverequal": "\u2267", "greatersmall": "\uFE65", "gscript": "\u0261", "gstroke": "\u01E5", "guhiragana": "\u3050", "guillemotleft": "\u00AB", "guillemotright": "\u00BB", "guilsinglleft": "\u2039", "guilsinglright": "\u203A", "gukatakana": "\u30B0", "guramusquare": "\u3318", "gysquare": "\u33C9", "h": "\u0068", "haabkhasiancyrillic": "\u04A9", "haaltonearabic": "\u06C1", "habengali": "\u09B9", "hadescendercyrillic": "\u04B3", "hadeva": "\u0939", "hagujarati": "\u0AB9", "hagurmukhi": "\u0A39", "haharabic": "\u062D", "hahfinalarabic": "\uFEA2", "hahinitialarabic": "\uFEA3", "hahiragana": "\u306F", "hahmedialarabic": "\uFEA4", "haitusquare": "\u332A", "hakatakana": "\u30CF", "hakatakanahalfwidth": "\uFF8A", "halantgurmukhi": "\u0A4D", "hamzaarabic": "\u0621", "hamzadammaarabic": "\u0621\u064F", "hamzadammatanarabic": "\u0621\u064C", "hamzafathaarabic": "\u0621\u064E", "hamzafathatanarabic": "\u0621\u064B", "hamzalowarabic": "\u0621", "hamzalowkasraarabic": "\u0621\u0650", "hamzalowkasratanarabic": "\u0621\u064D", "hamzasukunarabic": "\u0621\u0652", "hangulfiller": "\u3164", "hardsigncyrillic": "\u044A", "harpoonleftbarbup": "\u21BC", "harpoonrightbarbup": "\u21C0", "hasquare": "\u33CA", "hatafpatah": "\u05B2", "hatafpatah16": "\u05B2", "hatafpatah23": "\u05B2", "hatafpatah2f": "\u05B2", "hatafpatahhebrew": "\u05B2", "hatafpatahnarrowhebrew": "\u05B2", "hatafpatahquarterhebrew": "\u05B2", "hatafpatahwidehebrew": "\u05B2", "hatafqamats": "\u05B3", "hatafqamats1b": "\u05B3", "hatafqamats28": "\u05B3", "hatafqamats34": "\u05B3", "hatafqamatshebrew": "\u05B3", "hatafqamatsnarrowhebrew": "\u05B3", "hatafqamatsquarterhebrew": "\u05B3", "hatafqamatswidehebrew": "\u05B3", "hatafsegol": "\u05B1", "hatafsegol17": "\u05B1", "hatafsegol24": "\u05B1", "hatafsegol30": "\u05B1", "hatafsegolhebrew": "\u05B1", "hatafsegolnarrowhebrew": "\u05B1", "hatafsegolquarterhebrew": "\u05B1", "hatafsegolwidehebrew": "\u05B1", "hbar": "\u0127", "hbopomofo": "\u310F", "hbrevebelow": "\u1E2B", "hcedilla": "\u1E29", "hcircle": "\u24D7", "hcircumflex": "\u0125", "hdieresis": "\u1E27", "hdotaccent": "\u1E23", "hdotbelow": "\u1E25", "he": "\u05D4", "heart": "\u2665", "heartsuitblack": "\u2665", "heartsuitwhite": "\u2661", "hedagesh": "\uFB34", "hedageshhebrew": "\uFB34", "hehaltonearabic": "\u06C1", "heharabic": "\u0647", "hehebrew": "\u05D4", "hehfinalaltonearabic": "\uFBA7", "hehfinalalttwoarabic": "\uFEEA", "hehfinalarabic": "\uFEEA", "hehhamzaabovefinalarabic": "\uFBA5", "hehhamzaaboveisolatedarabic": "\uFBA4", "hehinitialaltonearabic": "\uFBA8", "hehinitialarabic": "\uFEEB", "hehiragana": "\u3078", "hehmedialaltonearabic": "\uFBA9", "hehmedialarabic": "\uFEEC", "heiseierasquare": "\u337B", "hekatakana": "\u30D8", "hekatakanahalfwidth": "\uFF8D", "hekutaarusquare": "\u3336", "henghook": "\u0267", "herutusquare": "\u3339", "het": "\u05D7", "hethebrew": "\u05D7", "hhook": "\u0266", "hhooksuperior": "\u02B1", "hieuhacirclekorean": "\u327B", "hieuhaparenkorean": "\u321B", "hieuhcirclekorean": "\u326D", "hieuhkorean": "\u314E", "hieuhparenkorean": "\u320D", "hihiragana": "\u3072", "hikatakana": "\u30D2", "hikatakanahalfwidth": "\uFF8B", "hiriq": "\u05B4", "hiriq14": "\u05B4", "hiriq21": "\u05B4", "hiriq2d": "\u05B4", "hiriqhebrew": "\u05B4", "hiriqnarrowhebrew": "\u05B4", "hiriqquarterhebrew": "\u05B4", "hiriqwidehebrew": "\u05B4", "hlinebelow": "\u1E96", "hmonospace": "\uFF48", "hoarmenian": "\u0570", "hohipthai": "\u0E2B", "hohiragana": "\u307B", "hokatakana": "\u30DB", "hokatakanahalfwidth": "\uFF8E", "holam": "\u05B9", "holam19": "\u05B9", "holam26": "\u05B9", "holam32": "\u05B9", "holamhebrew": "\u05B9", "holamnarrowhebrew": "\u05B9", "holamquarterhebrew": "\u05B9", "holamwidehebrew": "\u05B9", "honokhukthai": "\u0E2E", "hookabovecomb": "\u0309", "hookcmb": "\u0309", "hookpalatalizedbelowcmb": "\u0321", "hookretroflexbelowcmb": "\u0322", "hoonsquare": "\u3342", "horicoptic": "\u03E9", "horizontalbar": "\u2015", "horncmb": "\u031B", "hotsprings": "\u2668", "house": "\u2302", "hparen": "\u24A3", "hsuperior": "\u02B0", "hturned": "\u0265", "huhiragana": "\u3075", "huiitosquare": "\u3333", "hukatakana": "\u30D5", "hukatakanahalfwidth": "\uFF8C", "hungarumlaut": "\u02DD", "hungarumlautcmb": "\u030B", "hv": "\u0195", "hyphen": "\u002D", "hypheninferior": "\uF6E5", "hyphenmonospace": "\uFF0D", "hyphensmall": "\uFE63", "hyphensuperior": "\uF6E6", "hyphentwo": "\u2010", "i": "\u0069", "iacute": "\u00ED", "iacyrillic": "\u044F", "ibengali": "\u0987", "ibopomofo": "\u3127", "ibreve": "\u012D", "icaron": "\u01D0", "icircle": "\u24D8", "icircumflex": "\u00EE", "icyrillic": "\u0456", "idblgrave": "\u0209", "ideographearthcircle": "\u328F", "ideographfirecircle": "\u328B", "ideographicallianceparen": "\u323F", "ideographiccallparen": "\u323A", "ideographiccentrecircle": "\u32A5", "ideographicclose": "\u3006", "ideographiccomma": "\u3001", "ideographiccommaleft": "\uFF64", "ideographiccongratulationparen": "\u3237", "ideographiccorrectcircle": "\u32A3", "ideographicearthparen": "\u322F", "ideographicenterpriseparen": "\u323D", "ideographicexcellentcircle": "\u329D", "ideographicfestivalparen": "\u3240", "ideographicfinancialcircle": "\u3296", "ideographicfinancialparen": "\u3236", "ideographicfireparen": "\u322B", "ideographichaveparen": "\u3232", "ideographichighcircle": "\u32A4", "ideographiciterationmark": "\u3005", "ideographiclaborcircle": "\u3298", "ideographiclaborparen": "\u3238", "ideographicleftcircle": "\u32A7", "ideographiclowcircle": "\u32A6", "ideographicmedicinecircle": "\u32A9", "ideographicmetalparen": "\u322E", "ideographicmoonparen": "\u322A", "ideographicnameparen": "\u3234", "ideographicperiod": "\u3002", "ideographicprintcircle": "\u329E", "ideographicreachparen": "\u3243", "ideographicrepresentparen": "\u3239", "ideographicresourceparen": "\u323E", "ideographicrightcircle": "\u32A8", "ideographicsecretcircle": "\u3299", "ideographicselfparen": "\u3242", "ideographicsocietyparen": "\u3233", "ideographicspace": "\u3000", "ideographicspecialparen": "\u3235", "ideographicstockparen": "\u3231", "ideographicstudyparen": "\u323B", "ideographicsunparen": "\u3230", "ideographicsuperviseparen": "\u323C", "ideographicwaterparen": "\u322C", "ideographicwoodparen": "\u322D", "ideographiczero": "\u3007", "ideographmetalcircle": "\u328E", "ideographmooncircle": "\u328A", "ideographnamecircle": "\u3294", "ideographsuncircle": "\u3290", "ideographwatercircle": "\u328C", "ideographwoodcircle": "\u328D", "ideva": "\u0907", "idieresis": "\u00EF", "idieresisacute": "\u1E2F", "idieresiscyrillic": "\u04E5", "idotbelow": "\u1ECB", "iebrevecyrillic": "\u04D7", "iecyrillic": "\u0435", "ieungacirclekorean": "\u3275", "ieungaparenkorean": "\u3215", "ieungcirclekorean": "\u3267", "ieungkorean": "\u3147", "ieungparenkorean": "\u3207", "igrave": "\u00EC", "igujarati": "\u0A87", "igurmukhi": "\u0A07", "ihiragana": "\u3044", "ihookabove": "\u1EC9", "iibengali": "\u0988", "iicyrillic": "\u0438", "iideva": "\u0908", "iigujarati": "\u0A88", "iigurmukhi": "\u0A08", "iimatragurmukhi": "\u0A40", "iinvertedbreve": "\u020B", "iishortcyrillic": "\u0439", "iivowelsignbengali": "\u09C0", "iivowelsigndeva": "\u0940", "iivowelsigngujarati": "\u0AC0", "ij": "\u0133", "ikatakana": "\u30A4", "ikatakanahalfwidth": "\uFF72", "ikorean": "\u3163", "ilde": "\u02DC", "iluyhebrew": "\u05AC", "imacron": "\u012B", "imacroncyrillic": "\u04E3", "imageorapproximatelyequal": "\u2253", "imatragurmukhi": "\u0A3F", "imonospace": "\uFF49", "increment": "\u2206", "infinity": "\u221E", "iniarmenian": "\u056B", "integral": "\u222B", "integralbottom": "\u2321", "integralbt": "\u2321", "integralex": "\uF8F5", "integraltop": "\u2320", "integraltp": "\u2320", "intersection": "\u2229", "intisquare": "\u3305", "invbullet": "\u25D8", "invcircle": "\u25D9", "invsmileface": "\u263B", "iocyrillic": "\u0451", "iogonek": "\u012F", "iota": "\u03B9", "iotadieresis": "\u03CA", "iotadieresistonos": "\u0390", "iotalatin": "\u0269", "iotatonos": "\u03AF", "iparen": "\u24A4", "irigurmukhi": "\u0A72", "ismallhiragana": "\u3043", "ismallkatakana": "\u30A3", "ismallkatakanahalfwidth": "\uFF68", "issharbengali": "\u09FA", "istroke": "\u0268", "isuperior": "\uF6ED", "iterationhiragana": "\u309D", "iterationkatakana": "\u30FD", "itilde": "\u0129", "itildebelow": "\u1E2D", "iubopomofo": "\u3129", "iucyrillic": "\u044E", "ivowelsignbengali": "\u09BF", "ivowelsigndeva": "\u093F", "ivowelsigngujarati": "\u0ABF", "izhitsacyrillic": "\u0475", "izhitsadblgravecyrillic": "\u0477", "j": "\u006A", "jaarmenian": "\u0571", "jabengali": "\u099C", "jadeva": "\u091C", "jagujarati": "\u0A9C", "jagurmukhi": "\u0A1C", "jbopomofo": "\u3110", "jcaron": "\u01F0", "jcircle": "\u24D9", "jcircumflex": "\u0135", "jcrossedtail": "\u029D", "jdotlessstroke": "\u025F", "jecyrillic": "\u0458", "jeemarabic": "\u062C", "jeemfinalarabic": "\uFE9E", "jeeminitialarabic": "\uFE9F", "jeemmedialarabic": "\uFEA0", "jeharabic": "\u0698", "jehfinalarabic": "\uFB8B", "jhabengali": "\u099D", "jhadeva": "\u091D", "jhagujarati": "\u0A9D", "jhagurmukhi": "\u0A1D", "jheharmenian": "\u057B", "jis": "\u3004", "jmonospace": "\uFF4A", "jparen": "\u24A5", "jsuperior": "\u02B2", "k": "\u006B", "kabashkircyrillic": "\u04A1", "kabengali": "\u0995", "kacute": "\u1E31", "kacyrillic": "\u043A", "kadescendercyrillic": "\u049B", "kadeva": "\u0915", "kaf": "\u05DB", "kafarabic": "\u0643", "kafdagesh": "\uFB3B", "kafdageshhebrew": "\uFB3B", "kaffinalarabic": "\uFEDA", "kafhebrew": "\u05DB", "kafinitialarabic": "\uFEDB", "kafmedialarabic": "\uFEDC", "kafrafehebrew": "\uFB4D", "kagujarati": "\u0A95", "kagurmukhi": "\u0A15", "kahiragana": "\u304B", "kahookcyrillic": "\u04C4", "kakatakana": "\u30AB", "kakatakanahalfwidth": "\uFF76", "kappa": "\u03BA", "kappasymbolgreek": "\u03F0", "kapyeounmieumkorean": "\u3171", "kapyeounphieuphkorean": "\u3184", "kapyeounpieupkorean": "\u3178", "kapyeounssangpieupkorean": "\u3179", "karoriisquare": "\u330D", "kashidaautoarabic": "\u0640", "kashidaautonosidebearingarabic": "\u0640", "kasmallkatakana": "\u30F5", "kasquare": "\u3384", "kasraarabic": "\u0650", "kasratanarabic": "\u064D", "kastrokecyrillic": "\u049F", "katahiraprolongmarkhalfwidth": "\uFF70", "kaverticalstrokecyrillic": "\u049D", "kbopomofo": "\u310E", "kcalsquare": "\u3389", "kcaron": "\u01E9", "kcedilla": "\u0137", "kcircle": "\u24DA", "kcommaaccent": "\u0137", "kdotbelow": "\u1E33", "keharmenian": "\u0584", "kehiragana": "\u3051", "kekatakana": "\u30B1", "kekatakanahalfwidth": "\uFF79", "kenarmenian": "\u056F", "kesmallkatakana": "\u30F6", "kgreenlandic": "\u0138", "khabengali": "\u0996", "khacyrillic": "\u0445", "khadeva": "\u0916", "khagujarati": "\u0A96", "khagurmukhi": "\u0A16", "khaharabic": "\u062E", "khahfinalarabic": "\uFEA6", "khahinitialarabic": "\uFEA7", "khahmedialarabic": "\uFEA8", "kheicoptic": "\u03E7", "khhadeva": "\u0959", "khhagurmukhi": "\u0A59", "khieukhacirclekorean": "\u3278", "khieukhaparenkorean": "\u3218", "khieukhcirclekorean": "\u326A", "khieukhkorean": "\u314B", "khieukhparenkorean": "\u320A", "khokhaithai": "\u0E02", "khokhonthai": "\u0E05", "khokhuatthai": "\u0E03", "khokhwaithai": "\u0E04", "khomutthai": "\u0E5B", "khook": "\u0199", "khorakhangthai": "\u0E06", "khzsquare": "\u3391", "kihiragana": "\u304D", "kikatakana": "\u30AD", "kikatakanahalfwidth": "\uFF77", "kiroguramusquare": "\u3315", "kiromeetorusquare": "\u3316", "kirosquare": "\u3314", "kiyeokacirclekorean": "\u326E", "kiyeokaparenkorean": "\u320E", "kiyeokcirclekorean": "\u3260", "kiyeokkorean": "\u3131", "kiyeokparenkorean": "\u3200", "kiyeoksioskorean": "\u3133", "kjecyrillic": "\u045C", "klinebelow": "\u1E35", "klsquare": "\u3398", "kmcubedsquare": "\u33A6", "kmonospace": "\uFF4B", "kmsquaredsquare": "\u33A2", "kohiragana": "\u3053", "kohmsquare": "\u33C0", "kokaithai": "\u0E01", "kokatakana": "\u30B3", "kokatakanahalfwidth": "\uFF7A", "kooposquare": "\u331E", "koppacyrillic": "\u0481", "koreanstandardsymbol": "\u327F", "koroniscmb": "\u0343", "kparen": "\u24A6", "kpasquare": "\u33AA", "ksicyrillic": "\u046F", "ktsquare": "\u33CF", "kturned": "\u029E", "kuhiragana": "\u304F", "kukatakana": "\u30AF", "kukatakanahalfwidth": "\uFF78", "kvsquare": "\u33B8", "kwsquare": "\u33BE", "l": "\u006C", "labengali": "\u09B2", "lacute": "\u013A", "ladeva": "\u0932", "lagujarati": "\u0AB2", "lagurmukhi": "\u0A32", "lakkhangyaothai": "\u0E45", "lamaleffinalarabic": "\uFEFC", "lamalefhamzaabovefinalarabic": "\uFEF8", "lamalefhamzaaboveisolatedarabic": "\uFEF7", "lamalefhamzabelowfinalarabic": "\uFEFA", "lamalefhamzabelowisolatedarabic": "\uFEF9", "lamalefisolatedarabic": "\uFEFB", "lamalefmaddaabovefinalarabic": "\uFEF6", "lamalefmaddaaboveisolatedarabic": "\uFEF5", "lamarabic": "\u0644", "lambda": "\u03BB", "lambdastroke": "\u019B", "lamed": "\u05DC", "lameddagesh": "\uFB3C", "lameddageshhebrew": "\uFB3C", "lamedhebrew": "\u05DC", "lamedholam": "\u05DC\u05B9", "lamedholamdagesh": "\u05DC\u05B9\u05BC", "lamedholamdageshhebrew": "\u05DC\u05B9\u05BC", "lamedholamhebrew": "\u05DC\u05B9", "lamfinalarabic": "\uFEDE", "lamhahinitialarabic": "\uFCCA", "laminitialarabic": "\uFEDF", "lamjeeminitialarabic": "\uFCC9", "lamkhahinitialarabic": "\uFCCB", "lamlamhehisolatedarabic": "\uFDF2", "lammedialarabic": "\uFEE0", "lammeemhahinitialarabic": "\uFD88", "lammeeminitialarabic": "\uFCCC", "lammeemjeeminitialarabic": "\uFEDF\uFEE4\uFEA0", "lammeemkhahinitialarabic": "\uFEDF\uFEE4\uFEA8", "largecircle": "\u25EF", "lbar": "\u019A", "lbelt": "\u026C", "lbopomofo": "\u310C", "lcaron": "\u013E", "lcedilla": "\u013C", "lcircle": "\u24DB", "lcircumflexbelow": "\u1E3D", "lcommaaccent": "\u013C", "ldot": "\u0140", "ldotaccent": "\u0140", "ldotbelow": "\u1E37", "ldotbelowmacron": "\u1E39", "leftangleabovecmb": "\u031A", "lefttackbelowcmb": "\u0318", "less": "\u003C", "lessequal": "\u2264", "lessequalorgreater": "\u22DA", "lessmonospace": "\uFF1C", "lessorequivalent": "\u2272", "lessorgreater": "\u2276", "lessoverequal": "\u2266", "lesssmall": "\uFE64", "lezh": "\u026E", "lfblock": "\u258C", "lhookretroflex": "\u026D", "lira": "\u20A4", "liwnarmenian": "\u056C", "lj": "\u01C9", "ljecyrillic": "\u0459", "ll": "\uF6C0", "lladeva": "\u0933", "llagujarati": "\u0AB3", "llinebelow": "\u1E3B", "llladeva": "\u0934", "llvocalicbengali": "\u09E1", "llvocalicdeva": "\u0961", "llvocalicvowelsignbengali": "\u09E3", "llvocalicvowelsigndeva": "\u0963", "lmiddletilde": "\u026B", "lmonospace": "\uFF4C", "lmsquare": "\u33D0", "lochulathai": "\u0E2C", "logicaland": "\u2227", "logicalnot": "\u00AC", "logicalnotreversed": "\u2310", "logicalor": "\u2228", "lolingthai": "\u0E25", "longs": "\u017F", "lowlinecenterline": "\uFE4E", "lowlinecmb": "\u0332", "lowlinedashed": "\uFE4D", "lozenge": "\u25CA", "lparen": "\u24A7", "lslash": "\u0142", "lsquare": "\u2113", "lsuperior": "\uF6EE", "ltshade": "\u2591", "luthai": "\u0E26", "lvocalicbengali": "\u098C", "lvocalicdeva": "\u090C", "lvocalicvowelsignbengali": "\u09E2", "lvocalicvowelsigndeva": "\u0962", "lxsquare": "\u33D3", "m": "\u006D", "mabengali": "\u09AE", "macron": "\u00AF", "macronbelowcmb": "\u0331", "macroncmb": "\u0304", "macronlowmod": "\u02CD", "macronmonospace": "\uFFE3", "macute": "\u1E3F", "madeva": "\u092E", "magujarati": "\u0AAE", "magurmukhi": "\u0A2E", "mahapakhhebrew": "\u05A4", "mahapakhlefthebrew": "\u05A4", "mahiragana": "\u307E", "maichattawalowleftthai": "\uF895", "maichattawalowrightthai": "\uF894", "maichattawathai": "\u0E4B", "maichattawaupperleftthai": "\uF893", "maieklowleftthai": "\uF88C", "maieklowrightthai": "\uF88B", "maiekthai": "\u0E48", "maiekupperleftthai": "\uF88A", "maihanakatleftthai": "\uF884", "maihanakatthai": "\u0E31", "maitaikhuleftthai": "\uF889", "maitaikhuthai": "\u0E47", "maitholowleftthai": "\uF88F", "maitholowrightthai": "\uF88E", "maithothai": "\u0E49", "maithoupperleftthai": "\uF88D", "maitrilowleftthai": "\uF892", "maitrilowrightthai": "\uF891", "maitrithai": "\u0E4A", "maitriupperleftthai": "\uF890", "maiyamokthai": "\u0E46", "makatakana": "\u30DE", "makatakanahalfwidth": "\uFF8F", "male": "\u2642", "mansyonsquare": "\u3347", "maqafhebrew": "\u05BE", "mars": "\u2642", "masoracirclehebrew": "\u05AF", "masquare": "\u3383", "mbopomofo": "\u3107", "mbsquare": "\u33D4", "mcircle": "\u24DC", "mcubedsquare": "\u33A5", "mdotaccent": "\u1E41", "mdotbelow": "\u1E43", "meemarabic": "\u0645", "meemfinalarabic": "\uFEE2", "meeminitialarabic": "\uFEE3", "meemmedialarabic": "\uFEE4", "meemmeeminitialarabic": "\uFCD1", "meemmeemisolatedarabic": "\uFC48", "meetorusquare": "\u334D", "mehiragana": "\u3081", "meizierasquare": "\u337E", "mekatakana": "\u30E1", "mekatakanahalfwidth": "\uFF92", "mem": "\u05DE", "memdagesh": "\uFB3E", "memdageshhebrew": "\uFB3E", "memhebrew": "\u05DE", "menarmenian": "\u0574", "merkhahebrew": "\u05A5", "merkhakefulahebrew": "\u05A6", "merkhakefulalefthebrew": "\u05A6", "merkhalefthebrew": "\u05A5", "mhook": "\u0271", "mhzsquare": "\u3392", "middledotkatakanahalfwidth": "\uFF65", "middot": "\u00B7", "mieumacirclekorean": "\u3272", "mieumaparenkorean": "\u3212", "mieumcirclekorean": "\u3264", "mieumkorean": "\u3141", "mieumpansioskorean": "\u3170", "mieumparenkorean": "\u3204", "mieumpieupkorean": "\u316E", "mieumsioskorean": "\u316F", "mihiragana": "\u307F", "mikatakana": "\u30DF", "mikatakanahalfwidth": "\uFF90", "minus": "\u2212", "minusbelowcmb": "\u0320", "minuscircle": "\u2296", "minusmod": "\u02D7", "minusplus": "\u2213", "minute": "\u2032", "miribaarusquare": "\u334A", "mirisquare": "\u3349", "mlonglegturned": "\u0270", "mlsquare": "\u3396", "mmcubedsquare": "\u33A3", "mmonospace": "\uFF4D", "mmsquaredsquare": "\u339F", "mohiragana": "\u3082", "mohmsquare": "\u33C1", "mokatakana": "\u30E2", "mokatakanahalfwidth": "\uFF93", "molsquare": "\u33D6", "momathai": "\u0E21", "moverssquare": "\u33A7", "moverssquaredsquare": "\u33A8", "mparen": "\u24A8", "mpasquare": "\u33AB", "mssquare": "\u33B3", "msuperior": "\uF6EF", "mturned": "\u026F", "mu": "\u00B5", "mu1": "\u00B5", "muasquare": "\u3382", "muchgreater": "\u226B", "muchless": "\u226A", "mufsquare": "\u338C", "mugreek": "\u03BC", "mugsquare": "\u338D", "muhiragana": "\u3080", "mukatakana": "\u30E0", "mukatakanahalfwidth": "\uFF91", "mulsquare": "\u3395", "multiply": "\u00D7", "mumsquare": "\u339B", "munahhebrew": "\u05A3", "munahlefthebrew": "\u05A3", "musicalnote": "\u266A", "musicalnotedbl": "\u266B", "musicflatsign": "\u266D", "musicsharpsign": "\u266F", "mussquare": "\u33B2", "muvsquare": "\u33B6", "muwsquare": "\u33BC", "mvmegasquare": "\u33B9", "mvsquare": "\u33B7", "mwmegasquare": "\u33BF", "mwsquare": "\u33BD", "n": "\u006E", "nabengali": "\u09A8", "nabla": "\u2207", "nacute": "\u0144", "nadeva": "\u0928", "nagujarati": "\u0AA8", "nagurmukhi": "\u0A28", "nahiragana": "\u306A", "nakatakana": "\u30CA", "nakatakanahalfwidth": "\uFF85", "napostrophe": "\u0149", "nasquare": "\u3381", "nbopomofo": "\u310B", "nbspace": "\u00A0", "ncaron": "\u0148", "ncedilla": "\u0146", "ncircle": "\u24DD", "ncircumflexbelow": "\u1E4B", "ncommaaccent": "\u0146", "ndotaccent": "\u1E45", "ndotbelow": "\u1E47", "nehiragana": "\u306D", "nekatakana": "\u30CD", "nekatakanahalfwidth": "\uFF88", "newsheqelsign": "\u20AA", "nfsquare": "\u338B", "ngabengali": "\u0999", "ngadeva": "\u0919", "ngagujarati": "\u0A99", "ngagurmukhi": "\u0A19", "ngonguthai": "\u0E07", "nhiragana": "\u3093", "nhookleft": "\u0272", "nhookretroflex": "\u0273", "nieunacirclekorean": "\u326F", "nieunaparenkorean": "\u320F", "nieuncieuckorean": "\u3135", "nieuncirclekorean": "\u3261", "nieunhieuhkorean": "\u3136", "nieunkorean": "\u3134", "nieunpansioskorean": "\u3168", "nieunparenkorean": "\u3201", "nieunsioskorean": "\u3167", "nieuntikeutkorean": "\u3166", "nihiragana": "\u306B", "nikatakana": "\u30CB", "nikatakanahalfwidth": "\uFF86", "nikhahitleftthai": "\uF899", "nikhahitthai": "\u0E4D", "nine": "\u0039", "ninearabic": "\u0669", "ninebengali": "\u09EF", "ninecircle": "\u2468", "ninecircleinversesansserif": "\u2792", "ninedeva": "\u096F", "ninegujarati": "\u0AEF", "ninegurmukhi": "\u0A6F", "ninehackarabic": "\u0669", "ninehangzhou": "\u3029", "nineideographicparen": "\u3228", "nineinferior": "\u2089", "ninemonospace": "\uFF19", "nineoldstyle": "\uF739", "nineparen": "\u247C", "nineperiod": "\u2490", "ninepersian": "\u06F9", "nineroman": "\u2178", "ninesuperior": "\u2079", "nineteencircle": "\u2472", "nineteenparen": "\u2486", "nineteenperiod": "\u249A", "ninethai": "\u0E59", "nj": "\u01CC", "njecyrillic": "\u045A", "nkatakana": "\u30F3", "nkatakanahalfwidth": "\uFF9D", "nlegrightlong": "\u019E", "nlinebelow": "\u1E49", "nmonospace": "\uFF4E", "nmsquare": "\u339A", "nnabengali": "\u09A3", "nnadeva": "\u0923", "nnagujarati": "\u0AA3", "nnagurmukhi": "\u0A23", "nnnadeva": "\u0929", "nohiragana": "\u306E", "nokatakana": "\u30CE", "nokatakanahalfwidth": "\uFF89", "nonbreakingspace": "\u00A0", "nonenthai": "\u0E13", "nonuthai": "\u0E19", "noonarabic": "\u0646", "noonfinalarabic": "\uFEE6", "noonghunnaarabic": "\u06BA", "noonghunnafinalarabic": "\uFB9F", "noonhehinitialarabic": "\uFEE7\uFEEC", "nooninitialarabic": "\uFEE7", "noonjeeminitialarabic": "\uFCD2", "noonjeemisolatedarabic": "\uFC4B", "noonmedialarabic": "\uFEE8", "noonmeeminitialarabic": "\uFCD5", "noonmeemisolatedarabic": "\uFC4E", "noonnoonfinalarabic": "\uFC8D", "notcontains": "\u220C", "notelement": "\u2209", "notelementof": "\u2209", "notequal": "\u2260", "notgreater": "\u226F", "notgreaternorequal": "\u2271", "notgreaternorless": "\u2279", "notidentical": "\u2262", "notless": "\u226E", "notlessnorequal": "\u2270", "notparallel": "\u2226", "notprecedes": "\u2280", "notsubset": "\u2284", "notsucceeds": "\u2281", "notsuperset": "\u2285", "nowarmenian": "\u0576", "nparen": "\u24A9", "nssquare": "\u33B1", "nsuperior": "\u207F", "ntilde": "\u00F1", "nu": "\u03BD", "nuhiragana": "\u306C", "nukatakana": "\u30CC", "nukatakanahalfwidth": "\uFF87", "nuktabengali": "\u09BC", "nuktadeva": "\u093C", "nuktagujarati": "\u0ABC", "nuktagurmukhi": "\u0A3C", "numbersign": "\u0023", "numbersignmonospace": "\uFF03", "numbersignsmall": "\uFE5F", "numeralsigngreek": "\u0374", "numeralsignlowergreek": "\u0375", "numero": "\u2116", "nun": "\u05E0", "nundagesh": "\uFB40", "nundageshhebrew": "\uFB40", "nunhebrew": "\u05E0", "nvsquare": "\u33B5", "nwsquare": "\u33BB", "nyabengali": "\u099E", "nyadeva": "\u091E", "nyagujarati": "\u0A9E", "nyagurmukhi": "\u0A1E", "o": "\u006F", "oacute": "\u00F3", "oangthai": "\u0E2D", "obarred": "\u0275", "obarredcyrillic": "\u04E9", "obarreddieresiscyrillic": "\u04EB", "obengali": "\u0993", "obopomofo": "\u311B", "obreve": "\u014F", "ocandradeva": "\u0911", "ocandragujarati": "\u0A91", "ocandravowelsigndeva": "\u0949", "ocandravowelsigngujarati": "\u0AC9", "ocaron": "\u01D2", "ocircle": "\u24DE", "ocircumflex": "\u00F4", "ocircumflexacute": "\u1ED1", "ocircumflexdotbelow": "\u1ED9", "ocircumflexgrave": "\u1ED3", "ocircumflexhookabove": "\u1ED5", "ocircumflextilde": "\u1ED7", "ocyrillic": "\u043E", "odblacute": "\u0151", "odblgrave": "\u020D", "odeva": "\u0913", "odieresis": "\u00F6", "odieresiscyrillic": "\u04E7", "odotbelow": "\u1ECD", "oe": "\u0153", "oekorean": "\u315A", "ogonek": "\u02DB", "ogonekcmb": "\u0328", "ograve": "\u00F2", "ogujarati": "\u0A93", "oharmenian": "\u0585", "ohiragana": "\u304A", "ohookabove": "\u1ECF", "ohorn": "\u01A1", "ohornacute": "\u1EDB", "ohorndotbelow": "\u1EE3", "ohorngrave": "\u1EDD", "ohornhookabove": "\u1EDF", "ohorntilde": "\u1EE1", "ohungarumlaut": "\u0151", "oi": "\u01A3", "oinvertedbreve": "\u020F", "okatakana": "\u30AA", "okatakanahalfwidth": "\uFF75", "okorean": "\u3157", "olehebrew": "\u05AB", "omacron": "\u014D", "omacronacute": "\u1E53", "omacrongrave": "\u1E51", "omdeva": "\u0950", "omega": "\u03C9", "omega1": "\u03D6", "omegacyrillic": "\u0461", "omegalatinclosed": "\u0277", "omegaroundcyrillic": "\u047B", "omegatitlocyrillic": "\u047D", "omegatonos": "\u03CE", "omgujarati": "\u0AD0", "omicron": "\u03BF", "omicrontonos": "\u03CC", "omonospace": "\uFF4F", "one": "\u0031", "onearabic": "\u0661", "onebengali": "\u09E7", "onecircle": "\u2460", "onecircleinversesansserif": "\u278A", "onedeva": "\u0967", "onedotenleader": "\u2024", "oneeighth": "\u215B", "onefitted": "\uF6DC", "onegujarati": "\u0AE7", "onegurmukhi": "\u0A67", "onehackarabic": "\u0661", "onehalf": "\u00BD", "onehangzhou": "\u3021", "oneideographicparen": "\u3220", "oneinferior": "\u2081", "onemonospace": "\uFF11", "onenumeratorbengali": "\u09F4", "oneoldstyle": "\uF731", "oneparen": "\u2474", "oneperiod": "\u2488", "onepersian": "\u06F1", "onequarter": "\u00BC", "oneroman": "\u2170", "onesuperior": "\u00B9", "onethai": "\u0E51", "onethird": "\u2153", "oogonek": "\u01EB", "oogonekmacron": "\u01ED", "oogurmukhi": "\u0A13", "oomatragurmukhi": "\u0A4B", "oopen": "\u0254", "oparen": "\u24AA", "openbullet": "\u25E6", "option": "\u2325", "ordfeminine": "\u00AA", "ordmasculine": "\u00BA", "orthogonal": "\u221F", "oshortdeva": "\u0912", "oshortvowelsigndeva": "\u094A", "oslash": "\u00F8", "oslashacute": "\u01FF", "osmallhiragana": "\u3049", "osmallkatakana": "\u30A9", "osmallkatakanahalfwidth": "\uFF6B", "ostrokeacute": "\u01FF", "osuperior": "\uF6F0", "otcyrillic": "\u047F", "otilde": "\u00F5", "otildeacute": "\u1E4D", "otildedieresis": "\u1E4F", "oubopomofo": "\u3121", "overline": "\u203E", "overlinecenterline": "\uFE4A", "overlinecmb": "\u0305", "overlinedashed": "\uFE49", "overlinedblwavy": "\uFE4C", "overlinewavy": "\uFE4B", "overscore": "\u00AF", "ovowelsignbengali": "\u09CB", "ovowelsigndeva": "\u094B", "ovowelsigngujarati": "\u0ACB", "p": "\u0070", "paampssquare": "\u3380", "paasentosquare": "\u332B", "pabengali": "\u09AA", "pacute": "\u1E55", "padeva": "\u092A", "pagedown": "\u21DF", "pageup": "\u21DE", "pagujarati": "\u0AAA", "pagurmukhi": "\u0A2A", "pahiragana": "\u3071", "paiyannoithai": "\u0E2F", "pakatakana": "\u30D1", "palatalizationcyrilliccmb": "\u0484", "palochkacyrillic": "\u04C0", "pansioskorean": "\u317F", "paragraph": "\u00B6", "parallel": "\u2225", "parenleft": "\u0028", "parenleftaltonearabic": "\uFD3E", "parenleftbt": "\uF8ED", "parenleftex": "\uF8EC", "parenleftinferior": "\u208D", "parenleftmonospace": "\uFF08", "parenleftsmall": "\uFE59", "parenleftsuperior": "\u207D", "parenlefttp": "\uF8EB", "parenleftvertical": "\uFE35", "parenright": "\u0029", "parenrightaltonearabic": "\uFD3F", "parenrightbt": "\uF8F8", "parenrightex": "\uF8F7", "parenrightinferior": "\u208E", "parenrightmonospace": "\uFF09", "parenrightsmall": "\uFE5A", "parenrightsuperior": "\u207E", "parenrighttp": "\uF8F6", "parenrightvertical": "\uFE36", "partialdiff": "\u2202", "paseqhebrew": "\u05C0", "pashtahebrew": "\u0599", "pasquare": "\u33A9", "patah": "\u05B7", "patah11": "\u05B7", "patah1d": "\u05B7", "patah2a": "\u05B7", "patahhebrew": "\u05B7", "patahnarrowhebrew": "\u05B7", "patahquarterhebrew": "\u05B7", "patahwidehebrew": "\u05B7", "pazerhebrew": "\u05A1", "pbopomofo": "\u3106", "pcircle": "\u24DF", "pdotaccent": "\u1E57", "pe": "\u05E4", "pecyrillic": "\u043F", "pedagesh": "\uFB44", "pedageshhebrew": "\uFB44", "peezisquare": "\u333B", "pefinaldageshhebrew": "\uFB43", "peharabic": "\u067E", "peharmenian": "\u057A", "pehebrew": "\u05E4", "pehfinalarabic": "\uFB57", "pehinitialarabic": "\uFB58", "pehiragana": "\u307A", "pehmedialarabic": "\uFB59", "pekatakana": "\u30DA", "pemiddlehookcyrillic": "\u04A7", "perafehebrew": "\uFB4E", "percent": "\u0025", "percentarabic": "\u066A", "percentmonospace": "\uFF05", "percentsmall": "\uFE6A", "period": "\u002E", "periodarmenian": "\u0589", "periodcentered": "\u00B7", "periodhalfwidth": "\uFF61", "periodinferior": "\uF6E7", "periodmonospace": "\uFF0E", "periodsmall": "\uFE52", "periodsuperior": "\uF6E8", "perispomenigreekcmb": "\u0342", "perpendicular": "\u22A5", "perthousand": "\u2030", "peseta": "\u20A7", "pfsquare": "\u338A", "phabengali": "\u09AB", "phadeva": "\u092B", "phagujarati": "\u0AAB", "phagurmukhi": "\u0A2B", "phi": "\u03C6", "phi1": "\u03D5", "phieuphacirclekorean": "\u327A", "phieuphaparenkorean": "\u321A", "phieuphcirclekorean": "\u326C", "phieuphkorean": "\u314D", "phieuphparenkorean": "\u320C", "philatin": "\u0278", "phinthuthai": "\u0E3A", "phisymbolgreek": "\u03D5", "phook": "\u01A5", "phophanthai": "\u0E1E", "phophungthai": "\u0E1C", "phosamphaothai": "\u0E20", "pi": "\u03C0", "pieupacirclekorean": "\u3273", "pieupaparenkorean": "\u3213", "pieupcieuckorean": "\u3176", "pieupcirclekorean": "\u3265", "pieupkiyeokkorean": "\u3172", "pieupkorean": "\u3142", "pieupparenkorean": "\u3205", "pieupsioskiyeokkorean": "\u3174", "pieupsioskorean": "\u3144", "pieupsiostikeutkorean": "\u3175", "pieupthieuthkorean": "\u3177", "pieuptikeutkorean": "\u3173", "pihiragana": "\u3074", "pikatakana": "\u30D4", "pisymbolgreek": "\u03D6", "piwrarmenian": "\u0583", "plus": "\u002B", "plusbelowcmb": "\u031F", "pluscircle": "\u2295", "plusminus": "\u00B1", "plusmod": "\u02D6", "plusmonospace": "\uFF0B", "plussmall": "\uFE62", "plussuperior": "\u207A", "pmonospace": "\uFF50", "pmsquare": "\u33D8", "pohiragana": "\u307D", "pointingindexdownwhite": "\u261F", "pointingindexleftwhite": "\u261C", "pointingindexrightwhite": "\u261E", "pointingindexupwhite": "\u261D", "pokatakana": "\u30DD", "poplathai": "\u0E1B", "postalmark": "\u3012", "postalmarkface": "\u3020", "pparen": "\u24AB", "precedes": "\u227A", "prescription": "\u211E", "primemod": "\u02B9", "primereversed": "\u2035", "product": "\u220F", "projective": "\u2305", "prolongedkana": "\u30FC", "propellor": "\u2318", "propersubset": "\u2282", "propersuperset": "\u2283", "proportion": "\u2237", "proportional": "\u221D", "psi": "\u03C8", "psicyrillic": "\u0471", "psilipneumatacyrilliccmb": "\u0486", "pssquare": "\u33B0", "puhiragana": "\u3077", "pukatakana": "\u30D7", "pvsquare": "\u33B4", "pwsquare": "\u33BA", "q": "\u0071", "qadeva": "\u0958", "qadmahebrew": "\u05A8", "qafarabic": "\u0642", "qaffinalarabic": "\uFED6", "qafinitialarabic": "\uFED7", "qafmedialarabic": "\uFED8", "qamats": "\u05B8", "qamats10": "\u05B8", "qamats1a": "\u05B8", "qamats1c": "\u05B8", "qamats27": "\u05B8", "qamats29": "\u05B8", "qamats33": "\u05B8", "qamatsde": "\u05B8", "qamatshebrew": "\u05B8", "qamatsnarrowhebrew": "\u05B8", "qamatsqatanhebrew": "\u05B8", "qamatsqatannarrowhebrew": "\u05B8", "qamatsqatanquarterhebrew": "\u05B8", "qamatsqatanwidehebrew": "\u05B8", "qamatsquarterhebrew": "\u05B8", "qamatswidehebrew": "\u05B8", "qarneyparahebrew": "\u059F", "qbopomofo": "\u3111", "qcircle": "\u24E0", "qhook": "\u02A0", "qmonospace": "\uFF51", "qof": "\u05E7", "qofdagesh": "\uFB47", "qofdageshhebrew": "\uFB47", "qofhatafpatah": "\u05E7\u05B2", "qofhatafpatahhebrew": "\u05E7\u05B2", "qofhatafsegol": "\u05E7\u05B1", "qofhatafsegolhebrew": "\u05E7\u05B1", "qofhebrew": "\u05E7", "qofhiriq": "\u05E7\u05B4", "qofhiriqhebrew": "\u05E7\u05B4", "qofholam": "\u05E7\u05B9", "qofholamhebrew": "\u05E7\u05B9", "qofpatah": "\u05E7\u05B7", "qofpatahhebrew": "\u05E7\u05B7", "qofqamats": "\u05E7\u05B8", "qofqamatshebrew": "\u05E7\u05B8", "qofqubuts": "\u05E7\u05BB", "qofqubutshebrew": "\u05E7\u05BB", "qofsegol": "\u05E7\u05B6", "qofsegolhebrew": "\u05E7\u05B6", "qofsheva": "\u05E7\u05B0", "qofshevahebrew": "\u05E7\u05B0", "qoftsere": "\u05E7\u05B5", "qoftserehebrew": "\u05E7\u05B5", "qparen": "\u24AC", "quarternote": "\u2669", "qubuts": "\u05BB", "qubuts18": "\u05BB", "qubuts25": "\u05BB", "qubuts31": "\u05BB", "qubutshebrew": "\u05BB", "qubutsnarrowhebrew": "\u05BB", "qubutsquarterhebrew": "\u05BB", "qubutswidehebrew": "\u05BB", "question": "\u003F", "questionarabic": "\u061F", "questionarmenian": "\u055E", "questiondown": "\u00BF", "questiondownsmall": "\uF7BF", "questiongreek": "\u037E", "questionmonospace": "\uFF1F", "questionsmall": "\uF73F", "quotedbl": "\u0022", "quotedblbase": "\u201E", "quotedblleft": "\u201C", "quotedblmonospace": "\uFF02", "quotedblprime": "\u301E", "quotedblprimereversed": "\u301D", "quotedblright": "\u201D", "quoteleft": "\u2018", "quoteleftreversed": "\u201B", "quotereversed": "\u201B", "quoteright": "\u2019", "quoterightn": "\u0149", "quotesinglbase": "\u201A", "quotesingle": "\u0027", "quotesinglemonospace": "\uFF07", "r": "\u0072", "raarmenian": "\u057C", "rabengali": "\u09B0", "racute": "\u0155", "radeva": "\u0930", "radical": "\u221A", "radicalex": "\uF8E5", "radoverssquare": "\u33AE", "radoverssquaredsquare": "\u33AF", "radsquare": "\u33AD", "rafe": "\u05BF", "rafehebrew": "\u05BF", "ragujarati": "\u0AB0", "ragurmukhi": "\u0A30", "rahiragana": "\u3089", "rakatakana": "\u30E9", "rakatakanahalfwidth": "\uFF97", "ralowerdiagonalbengali": "\u09F1", "ramiddlediagonalbengali": "\u09F0", "ramshorn": "\u0264", "ratio": "\u2236", "rbopomofo": "\u3116", "rcaron": "\u0159", "rcedilla": "\u0157", "rcircle": "\u24E1", "rcommaaccent": "\u0157", "rdblgrave": "\u0211", "rdotaccent": "\u1E59", "rdotbelow": "\u1E5B", "rdotbelowmacron": "\u1E5D", "referencemark": "\u203B", "reflexsubset": "\u2286", "reflexsuperset": "\u2287", "registered": "\u00AE", "registersans": "\uF8E8", "registerserif": "\uF6DA", "reharabic": "\u0631", "reharmenian": "\u0580", "rehfinalarabic": "\uFEAE", "rehiragana": "\u308C", "rehyehaleflamarabic": "\u0631\uFEF3\uFE8E\u0644", "rekatakana": "\u30EC", "rekatakanahalfwidth": "\uFF9A", "resh": "\u05E8", "reshdageshhebrew": "\uFB48", "reshhatafpatah": "\u05E8\u05B2", "reshhatafpatahhebrew": "\u05E8\u05B2", "reshhatafsegol": "\u05E8\u05B1", "reshhatafsegolhebrew": "\u05E8\u05B1", "reshhebrew": "\u05E8", "reshhiriq": "\u05E8\u05B4", "reshhiriqhebrew": "\u05E8\u05B4", "reshholam": "\u05E8\u05B9", "reshholamhebrew": "\u05E8\u05B9", "reshpatah": "\u05E8\u05B7", "reshpatahhebrew": "\u05E8\u05B7", "reshqamats": "\u05E8\u05B8", "reshqamatshebrew": "\u05E8\u05B8", "reshqubuts": "\u05E8\u05BB", "reshqubutshebrew": "\u05E8\u05BB", "reshsegol": "\u05E8\u05B6", "reshsegolhebrew": "\u05E8\u05B6", "reshsheva": "\u05E8\u05B0", "reshshevahebrew": "\u05E8\u05B0", "reshtsere": "\u05E8\u05B5", "reshtserehebrew": "\u05E8\u05B5", "reversedtilde": "\u223D", "reviahebrew": "\u0597", "reviamugrashhebrew": "\u0597", "revlogicalnot": "\u2310", "rfishhook": "\u027E", "rfishhookreversed": "\u027F", "rhabengali": "\u09DD", "rhadeva": "\u095D", "rho": "\u03C1", "rhook": "\u027D", "rhookturned": "\u027B", "rhookturnedsuperior": "\u02B5", "rhosymbolgreek": "\u03F1", "rhotichookmod": "\u02DE", "rieulacirclekorean": "\u3271", "rieulaparenkorean": "\u3211", "rieulcirclekorean": "\u3263", "rieulhieuhkorean": "\u3140", "rieulkiyeokkorean": "\u313A", "rieulkiyeoksioskorean": "\u3169", "rieulkorean": "\u3139", "rieulmieumkorean": "\u313B", "rieulpansioskorean": "\u316C", "rieulparenkorean": "\u3203", "rieulphieuphkorean": "\u313F", "rieulpieupkorean": "\u313C", "rieulpieupsioskorean": "\u316B", "rieulsioskorean": "\u313D", "rieulthieuthkorean": "\u313E", "rieultikeutkorean": "\u316A", "rieulyeorinhieuhkorean": "\u316D", "rightangle": "\u221F", "righttackbelowcmb": "\u0319", "righttriangle": "\u22BF", "rihiragana": "\u308A", "rikatakana": "\u30EA", "rikatakanahalfwidth": "\uFF98", "ring": "\u02DA", "ringbelowcmb": "\u0325", "ringcmb": "\u030A", "ringhalfleft": "\u02BF", "ringhalfleftarmenian": "\u0559", "ringhalfleftbelowcmb": "\u031C", "ringhalfleftcentered": "\u02D3", "ringhalfright": "\u02BE", "ringhalfrightbelowcmb": "\u0339", "ringhalfrightcentered": "\u02D2", "rinvertedbreve": "\u0213", "rittorusquare": "\u3351", "rlinebelow": "\u1E5F", "rlongleg": "\u027C", "rlonglegturned": "\u027A", "rmonospace": "\uFF52", "rohiragana": "\u308D", "rokatakana": "\u30ED", "rokatakanahalfwidth": "\uFF9B", "roruathai": "\u0E23", "rparen": "\u24AD", "rrabengali": "\u09DC", "rradeva": "\u0931", "rragurmukhi": "\u0A5C", "rreharabic": "\u0691", "rrehfinalarabic": "\uFB8D", "rrvocalicbengali": "\u09E0", "rrvocalicdeva": "\u0960", "rrvocalicgujarati": "\u0AE0", "rrvocalicvowelsignbengali": "\u09C4", "rrvocalicvowelsigndeva": "\u0944", "rrvocalicvowelsigngujarati": "\u0AC4", "rsuperior": "\uF6F1", "rtblock": "\u2590", "rturned": "\u0279", "rturnedsuperior": "\u02B4", "ruhiragana": "\u308B", "rukatakana": "\u30EB", "rukatakanahalfwidth": "\uFF99", "rupeemarkbengali": "\u09F2", "rupeesignbengali": "\u09F3", "rupiah": "\uF6DD", "ruthai": "\u0E24", "rvocalicbengali": "\u098B", "rvocalicdeva": "\u090B", "rvocalicgujarati": "\u0A8B", "rvocalicvowelsignbengali": "\u09C3", "rvocalicvowelsigndeva": "\u0943", "rvocalicvowelsigngujarati": "\u0AC3", "s": "\u0073", "sabengali": "\u09B8", "sacute": "\u015B", "sacutedotaccent": "\u1E65", "sadarabic": "\u0635", "sadeva": "\u0938", "sadfinalarabic": "\uFEBA", "sadinitialarabic": "\uFEBB", "sadmedialarabic": "\uFEBC", "sagujarati": "\u0AB8", "sagurmukhi": "\u0A38", "sahiragana": "\u3055", "sakatakana": "\u30B5", "sakatakanahalfwidth": "\uFF7B", "sallallahoualayhewasallamarabic": "\uFDFA", "samekh": "\u05E1", "samekhdagesh": "\uFB41", "samekhdageshhebrew": "\uFB41", "samekhhebrew": "\u05E1", "saraaathai": "\u0E32", "saraaethai": "\u0E41", "saraaimaimalaithai": "\u0E44", "saraaimaimuanthai": "\u0E43", "saraamthai": "\u0E33", "saraathai": "\u0E30", "saraethai": "\u0E40", "saraiileftthai": "\uF886", "saraiithai": "\u0E35", "saraileftthai": "\uF885", "saraithai": "\u0E34", "saraothai": "\u0E42", "saraueeleftthai": "\uF888", "saraueethai": "\u0E37", "saraueleftthai": "\uF887", "sarauethai": "\u0E36", "sarauthai": "\u0E38", "sarauuthai": "\u0E39", "sbopomofo": "\u3119", "scaron": "\u0161", "scarondotaccent": "\u1E67", "scedilla": "\u015F", "schwa": "\u0259", "schwacyrillic": "\u04D9", "schwadieresiscyrillic": "\u04DB", "schwahook": "\u025A", "scircle": "\u24E2", "scircumflex": "\u015D", "scommaaccent": "\u0219", "sdotaccent": "\u1E61", "sdotbelow": "\u1E63", "sdotbelowdotaccent": "\u1E69", "seagullbelowcmb": "\u033C", "second": "\u2033", "secondtonechinese": "\u02CA", "section": "\u00A7", "seenarabic": "\u0633", "seenfinalarabic": "\uFEB2", "seeninitialarabic": "\uFEB3", "seenmedialarabic": "\uFEB4", "segol": "\u05B6", "segol13": "\u05B6", "segol1f": "\u05B6", "segol2c": "\u05B6", "segolhebrew": "\u05B6", "segolnarrowhebrew": "\u05B6", "segolquarterhebrew": "\u05B6", "segoltahebrew": "\u0592", "segolwidehebrew": "\u05B6", "seharmenian": "\u057D", "sehiragana": "\u305B", "sekatakana": "\u30BB", "sekatakanahalfwidth": "\uFF7E", "semicolon": "\u003B", "semicolonarabic": "\u061B", "semicolonmonospace": "\uFF1B", "semicolonsmall": "\uFE54", "semivoicedmarkkana": "\u309C", "semivoicedmarkkanahalfwidth": "\uFF9F", "sentisquare": "\u3322", "sentosquare": "\u3323", "seven": "\u0037", "sevenarabic": "\u0667", "sevenbengali": "\u09ED", "sevencircle": "\u2466", "sevencircleinversesansserif": "\u2790", "sevendeva": "\u096D", "seveneighths": "\u215E", "sevengujarati": "\u0AED", "sevengurmukhi": "\u0A6D", "sevenhackarabic": "\u0667", "sevenhangzhou": "\u3027", "sevenideographicparen": "\u3226", "seveninferior": "\u2087", "sevenmonospace": "\uFF17", "sevenoldstyle": "\uF737", "sevenparen": "\u247A", "sevenperiod": "\u248E", "sevenpersian": "\u06F7", "sevenroman": "\u2176", "sevensuperior": "\u2077", "seventeencircle": "\u2470", "seventeenparen": "\u2484", "seventeenperiod": "\u2498", "seventhai": "\u0E57", "sfthyphen": "\u00AD", "shaarmenian": "\u0577", "shabengali": "\u09B6", "shacyrillic": "\u0448", "shaddaarabic": "\u0651", "shaddadammaarabic": "\uFC61", "shaddadammatanarabic": "\uFC5E", "shaddafathaarabic": "\uFC60", "shaddafathatanarabic": "\u0651\u064B", "shaddakasraarabic": "\uFC62", "shaddakasratanarabic": "\uFC5F", "shade": "\u2592", "shadedark": "\u2593", "shadelight": "\u2591", "shademedium": "\u2592", "shadeva": "\u0936", "shagujarati": "\u0AB6", "shagurmukhi": "\u0A36", "shalshelethebrew": "\u0593", "shbopomofo": "\u3115", "shchacyrillic": "\u0449", "sheenarabic": "\u0634", "sheenfinalarabic": "\uFEB6", "sheeninitialarabic": "\uFEB7", "sheenmedialarabic": "\uFEB8", "sheicoptic": "\u03E3", "sheqel": "\u20AA", "sheqelhebrew": "\u20AA", "sheva": "\u05B0", "sheva115": "\u05B0", "sheva15": "\u05B0", "sheva22": "\u05B0", "sheva2e": "\u05B0", "shevahebrew": "\u05B0", "shevanarrowhebrew": "\u05B0", "shevaquarterhebrew": "\u05B0", "shevawidehebrew": "\u05B0", "shhacyrillic": "\u04BB", "shimacoptic": "\u03ED", "shin": "\u05E9", "shindagesh": "\uFB49", "shindageshhebrew": "\uFB49", "shindageshshindot": "\uFB2C", "shindageshshindothebrew": "\uFB2C", "shindageshsindot": "\uFB2D", "shindageshsindothebrew": "\uFB2D", "shindothebrew": "\u05C1", "shinhebrew": "\u05E9", "shinshindot": "\uFB2A", "shinshindothebrew": "\uFB2A", "shinsindot": "\uFB2B", "shinsindothebrew": "\uFB2B", "shook": "\u0282", "sigma": "\u03C3", "sigma1": "\u03C2", "sigmafinal": "\u03C2", "sigmalunatesymbolgreek": "\u03F2", "sihiragana": "\u3057", "sikatakana": "\u30B7", "sikatakanahalfwidth": "\uFF7C", "siluqhebrew": "\u05BD", "siluqlefthebrew": "\u05BD", "similar": "\u223C", "sindothebrew": "\u05C2", "siosacirclekorean": "\u3274", "siosaparenkorean": "\u3214", "sioscieuckorean": "\u317E", "sioscirclekorean": "\u3266", "sioskiyeokkorean": "\u317A", "sioskorean": "\u3145", "siosnieunkorean": "\u317B", "siosparenkorean": "\u3206", "siospieupkorean": "\u317D", "siostikeutkorean": "\u317C", "six": "\u0036", "sixarabic": "\u0666", "sixbengali": "\u09EC", "sixcircle": "\u2465", "sixcircleinversesansserif": "\u278F", "sixdeva": "\u096C", "sixgujarati": "\u0AEC", "sixgurmukhi": "\u0A6C", "sixhackarabic": "\u0666", "sixhangzhou": "\u3026", "sixideographicparen": "\u3225", "sixinferior": "\u2086", "sixmonospace": "\uFF16", "sixoldstyle": "\uF736", "sixparen": "\u2479", "sixperiod": "\u248D", "sixpersian": "\u06F6", "sixroman": "\u2175", "sixsuperior": "\u2076", "sixteencircle": "\u246F", "sixteencurrencydenominatorbengali": "\u09F9", "sixteenparen": "\u2483", "sixteenperiod": "\u2497", "sixthai": "\u0E56", "slash": "\u002F", "slashmonospace": "\uFF0F", "slong": "\u017F", "slongdotaccent": "\u1E9B", "smileface": "\u263A", "smonospace": "\uFF53", "sofpasuqhebrew": "\u05C3", "softhyphen": "\u00AD", "softsigncyrillic": "\u044C", "sohiragana": "\u305D", "sokatakana": "\u30BD", "sokatakanahalfwidth": "\uFF7F", "soliduslongoverlaycmb": "\u0338", "solidusshortoverlaycmb": "\u0337", "sorusithai": "\u0E29", "sosalathai": "\u0E28", "sosothai": "\u0E0B", "sosuathai": "\u0E2A", "space": "\u0020", "spacehackarabic": "\u0020", "spade": "\u2660", "spadesuitblack": "\u2660", "spadesuitwhite": "\u2664", "sparen": "\u24AE", "squarebelowcmb": "\u033B", "squarecc": "\u33C4", "squarecm": "\u339D", "squarediagonalcrosshatchfill": "\u25A9", "squarehorizontalfill": "\u25A4", "squarekg": "\u338F", "squarekm": "\u339E", "squarekmcapital": "\u33CE", "squareln": "\u33D1", "squarelog": "\u33D2", "squaremg": "\u338E", "squaremil": "\u33D5", "squaremm": "\u339C", "squaremsquared": "\u33A1", "squareorthogonalcrosshatchfill": "\u25A6", "squareupperlefttolowerrightfill": "\u25A7", "squareupperrighttolowerleftfill": "\u25A8", "squareverticalfill": "\u25A5", "squarewhitewithsmallblack": "\u25A3", "srsquare": "\u33DB", "ssabengali": "\u09B7", "ssadeva": "\u0937", "ssagujarati": "\u0AB7", "ssangcieuckorean": "\u3149", "ssanghieuhkorean": "\u3185", "ssangieungkorean": "\u3180", "ssangkiyeokkorean": "\u3132", "ssangnieunkorean": "\u3165", "ssangpieupkorean": "\u3143", "ssangsioskorean": "\u3146", "ssangtikeutkorean": "\u3138", "ssuperior": "\uF6F2", "sterling": "\u00A3", "sterlingmonospace": "\uFFE1", "strokelongoverlaycmb": "\u0336", "strokeshortoverlaycmb": "\u0335", "subset": "\u2282", "subsetnotequal": "\u228A", "subsetorequal": "\u2286", "succeeds": "\u227B", "suchthat": "\u220B", "suhiragana": "\u3059", "sukatakana": "\u30B9", "sukatakanahalfwidth": "\uFF7D", "sukunarabic": "\u0652", "summation": "\u2211", "sun": "\u263C", "superset": "\u2283", "supersetnotequal": "\u228B", "supersetorequal": "\u2287", "svsquare": "\u33DC", "syouwaerasquare": "\u337C", "t": "\u0074", "tabengali": "\u09A4", "tackdown": "\u22A4", "tackleft": "\u22A3", "tadeva": "\u0924", "tagujarati": "\u0AA4", "tagurmukhi": "\u0A24", "taharabic": "\u0637", "tahfinalarabic": "\uFEC2", "tahinitialarabic": "\uFEC3", "tahiragana": "\u305F", "tahmedialarabic": "\uFEC4", "taisyouerasquare": "\u337D", "takatakana": "\u30BF", "takatakanahalfwidth": "\uFF80", "tatweelarabic": "\u0640", "tau": "\u03C4", "tav": "\u05EA", "tavdages": "\uFB4A", "tavdagesh": "\uFB4A", "tavdageshhebrew": "\uFB4A", "tavhebrew": "\u05EA", "tbar": "\u0167", "tbopomofo": "\u310A", "tcaron": "\u0165", "tccurl": "\u02A8", "tcedilla": "\u0163", "tcheharabic": "\u0686", "tchehfinalarabic": "\uFB7B", "tchehinitialarabic": "\uFB7C", "tchehmedialarabic": "\uFB7D", "tchehmeeminitialarabic": "\uFB7C\uFEE4", "tcircle": "\u24E3", "tcircumflexbelow": "\u1E71", "tcommaaccent": "\u0163", "tdieresis": "\u1E97", "tdotaccent": "\u1E6B", "tdotbelow": "\u1E6D", "tecyrillic": "\u0442", "tedescendercyrillic": "\u04AD", "teharabic": "\u062A", "tehfinalarabic": "\uFE96", "tehhahinitialarabic": "\uFCA2", "tehhahisolatedarabic": "\uFC0C", "tehinitialarabic": "\uFE97", "tehiragana": "\u3066", "tehjeeminitialarabic": "\uFCA1", "tehjeemisolatedarabic": "\uFC0B", "tehmarbutaarabic": "\u0629", "tehmarbutafinalarabic": "\uFE94", "tehmedialarabic": "\uFE98", "tehmeeminitialarabic": "\uFCA4", "tehmeemisolatedarabic": "\uFC0E", "tehnoonfinalarabic": "\uFC73", "tekatakana": "\u30C6", "tekatakanahalfwidth": "\uFF83", "telephone": "\u2121", "telephoneblack": "\u260E", "telishagedolahebrew": "\u05A0", "telishaqetanahebrew": "\u05A9", "tencircle": "\u2469", "tenideographicparen": "\u3229", "tenparen": "\u247D", "tenperiod": "\u2491", "tenroman": "\u2179", "tesh": "\u02A7", "tet": "\u05D8", "tetdagesh": "\uFB38", "tetdageshhebrew": "\uFB38", "tethebrew": "\u05D8", "tetsecyrillic": "\u04B5", "tevirhebrew": "\u059B", "tevirlefthebrew": "\u059B", "thabengali": "\u09A5", "thadeva": "\u0925", "thagujarati": "\u0AA5", "thagurmukhi": "\u0A25", "thalarabic": "\u0630", "thalfinalarabic": "\uFEAC", "thanthakhatlowleftthai": "\uF898", "thanthakhatlowrightthai": "\uF897", "thanthakhatthai": "\u0E4C", "thanthakhatupperleftthai": "\uF896", "theharabic": "\u062B", "thehfinalarabic": "\uFE9A", "thehinitialarabic": "\uFE9B", "thehmedialarabic": "\uFE9C", "thereexists": "\u2203", "therefore": "\u2234", "theta": "\u03B8", "theta1": "\u03D1", "thetasymbolgreek": "\u03D1", "thieuthacirclekorean": "\u3279", "thieuthaparenkorean": "\u3219", "thieuthcirclekorean": "\u326B", "thieuthkorean": "\u314C", "thieuthparenkorean": "\u320B", "thirteencircle": "\u246C", "thirteenparen": "\u2480", "thirteenperiod": "\u2494", "thonangmonthothai": "\u0E11", "thook": "\u01AD", "thophuthaothai": "\u0E12", "thorn": "\u00FE", "thothahanthai": "\u0E17", "thothanthai": "\u0E10", "thothongthai": "\u0E18", "thothungthai": "\u0E16", "thousandcyrillic": "\u0482", "thousandsseparatorarabic": "\u066C", "thousandsseparatorpersian": "\u066C", "three": "\u0033", "threearabic": "\u0663", "threebengali": "\u09E9", "threecircle": "\u2462", "threecircleinversesansserif": "\u278C", "threedeva": "\u0969", "threeeighths": "\u215C", "threegujarati": "\u0AE9", "threegurmukhi": "\u0A69", "threehackarabic": "\u0663", "threehangzhou": "\u3023", "threeideographicparen": "\u3222", "threeinferior": "\u2083", "threemonospace": "\uFF13", "threenumeratorbengali": "\u09F6", "threeoldstyle": "\uF733", "threeparen": "\u2476", "threeperiod": "\u248A", "threepersian": "\u06F3", "threequarters": "\u00BE", "threequartersemdash": "\uF6DE", "threeroman": "\u2172", "threesuperior": "\u00B3", "threethai": "\u0E53", "thzsquare": "\u3394", "tihiragana": "\u3061", "tikatakana": "\u30C1", "tikatakanahalfwidth": "\uFF81", "tikeutacirclekorean": "\u3270", "tikeutaparenkorean": "\u3210", "tikeutcirclekorean": "\u3262", "tikeutkorean": "\u3137", "tikeutparenkorean": "\u3202", "tilde": "\u02DC", "tildebelowcmb": "\u0330", "tildecmb": "\u0303", "tildecomb": "\u0303", "tildedoublecmb": "\u0360", "tildeoperator": "\u223C", "tildeoverlaycmb": "\u0334", "tildeverticalcmb": "\u033E", "timescircle": "\u2297", "tipehahebrew": "\u0596", "tipehalefthebrew": "\u0596", "tippigurmukhi": "\u0A70", "titlocyrilliccmb": "\u0483", "tiwnarmenian": "\u057F", "tlinebelow": "\u1E6F", "tmonospace": "\uFF54", "toarmenian": "\u0569", "tohiragana": "\u3068", "tokatakana": "\u30C8", "tokatakanahalfwidth": "\uFF84", "tonebarextrahighmod": "\u02E5", "tonebarextralowmod": "\u02E9", "tonebarhighmod": "\u02E6", "tonebarlowmod": "\u02E8", "tonebarmidmod": "\u02E7", "tonefive": "\u01BD", "tonesix": "\u0185", "tonetwo": "\u01A8", "tonos": "\u0384", "tonsquare": "\u3327", "topatakthai": "\u0E0F", "tortoiseshellbracketleft": "\u3014", "tortoiseshellbracketleftsmall": "\uFE5D", "tortoiseshellbracketleftvertical": "\uFE39", "tortoiseshellbracketright": "\u3015", "tortoiseshellbracketrightsmall": "\uFE5E", "tortoiseshellbracketrightvertical": "\uFE3A", "totaothai": "\u0E15", "tpalatalhook": "\u01AB", "tparen": "\u24AF", "trademark": "\u2122", "trademarksans": "\uF8EA", "trademarkserif": "\uF6DB", "tretroflexhook": "\u0288", "triagdn": "\u25BC", "triaglf": "\u25C4", "triagrt": "\u25BA", "triagup": "\u25B2", "ts": "\u02A6", "tsadi": "\u05E6", "tsadidagesh": "\uFB46", "tsadidageshhebrew": "\uFB46", "tsadihebrew": "\u05E6", "tsecyrillic": "\u0446", "tsere": "\u05B5", "tsere12": "\u05B5", "tsere1e": "\u05B5", "tsere2b": "\u05B5", "tserehebrew": "\u05B5", "tserenarrowhebrew": "\u05B5", "tserequarterhebrew": "\u05B5", "tserewidehebrew": "\u05B5", "tshecyrillic": "\u045B", "tsuperior": "\uF6F3", "ttabengali": "\u099F", "ttadeva": "\u091F", "ttagujarati": "\u0A9F", "ttagurmukhi": "\u0A1F", "tteharabic": "\u0679", "ttehfinalarabic": "\uFB67", "ttehinitialarabic": "\uFB68", "ttehmedialarabic": "\uFB69", "tthabengali": "\u09A0", "tthadeva": "\u0920", "tthagujarati": "\u0AA0", "tthagurmukhi": "\u0A20", "tturned": "\u0287", "tuhiragana": "\u3064", "tukatakana": "\u30C4", "tukatakanahalfwidth": "\uFF82", "tusmallhiragana": "\u3063", "tusmallkatakana": "\u30C3", "tusmallkatakanahalfwidth": "\uFF6F", "twelvecircle": "\u246B", "twelveparen": "\u247F", "twelveperiod": "\u2493", "twelveroman": "\u217B", "twentycircle": "\u2473", "twentyhangzhou": "\u5344", "twentyparen": "\u2487", "twentyperiod": "\u249B", "two": "\u0032", "twoarabic": "\u0662", "twobengali": "\u09E8", "twocircle": "\u2461", "twocircleinversesansserif": "\u278B", "twodeva": "\u0968", "twodotenleader": "\u2025", "twodotleader": "\u2025", "twodotleadervertical": "\uFE30", "twogujarati": "\u0AE8", "twogurmukhi": "\u0A68", "twohackarabic": "\u0662", "twohangzhou": "\u3022", "twoideographicparen": "\u3221", "twoinferior": "\u2082", "twomonospace": "\uFF12", "twonumeratorbengali": "\u09F5", "twooldstyle": "\uF732", "twoparen": "\u2475", "twoperiod": "\u2489", "twopersian": "\u06F2", "tworoman": "\u2171", "twostroke": "\u01BB", "twosuperior": "\u00B2", "twothai": "\u0E52", "twothirds": "\u2154", "u": "\u0075", "uacute": "\u00FA", "ubar": "\u0289", "ubengali": "\u0989", "ubopomofo": "\u3128", "ubreve": "\u016D", "ucaron": "\u01D4", "ucircle": "\u24E4", "ucircumflex": "\u00FB", "ucircumflexbelow": "\u1E77", "ucyrillic": "\u0443", "udattadeva": "\u0951", "udblacute": "\u0171", "udblgrave": "\u0215", "udeva": "\u0909", "udieresis": "\u00FC", "udieresisacute": "\u01D8", "udieresisbelow": "\u1E73", "udieresiscaron": "\u01DA", "udieresiscyrillic": "\u04F1", "udieresisgrave": "\u01DC", "udieresismacron": "\u01D6", "udotbelow": "\u1EE5", "ugrave": "\u00F9", "ugujarati": "\u0A89", "ugurmukhi": "\u0A09", "uhiragana": "\u3046", "uhookabove": "\u1EE7", "uhorn": "\u01B0", "uhornacute": "\u1EE9", "uhorndotbelow": "\u1EF1", "uhorngrave": "\u1EEB", "uhornhookabove": "\u1EED", "uhorntilde": "\u1EEF", "uhungarumlaut": "\u0171", "uhungarumlautcyrillic": "\u04F3", "uinvertedbreve": "\u0217", "ukatakana": "\u30A6", "ukatakanahalfwidth": "\uFF73", "ukcyrillic": "\u0479", "ukorean": "\u315C", "umacron": "\u016B", "umacroncyrillic": "\u04EF", "umacrondieresis": "\u1E7B", "umatragurmukhi": "\u0A41", "umonospace": "\uFF55", "underscore": "\u005F", "underscoredbl": "\u2017", "underscoremonospace": "\uFF3F", "underscorevertical": "\uFE33", "underscorewavy": "\uFE4F", "union": "\u222A", "universal": "\u2200", "uogonek": "\u0173", "uparen": "\u24B0", "upblock": "\u2580", "upperdothebrew": "\u05C4", "upsilon": "\u03C5", "upsilondieresis": "\u03CB", "upsilondieresistonos": "\u03B0", "upsilonlatin": "\u028A", "upsilontonos": "\u03CD", "uptackbelowcmb": "\u031D", "uptackmod": "\u02D4", "uragurmukhi": "\u0A73", "uring": "\u016F", "ushortcyrillic": "\u045E", "usmallhiragana": "\u3045", "usmallkatakana": "\u30A5", "usmallkatakanahalfwidth": "\uFF69", "ustraightcyrillic": "\u04AF", "ustraightstrokecyrillic": "\u04B1", "utilde": "\u0169", "utildeacute": "\u1E79", "utildebelow": "\u1E75", "uubengali": "\u098A", "uudeva": "\u090A", "uugujarati": "\u0A8A", "uugurmukhi": "\u0A0A", "uumatragurmukhi": "\u0A42", "uuvowelsignbengali": "\u09C2", "uuvowelsigndeva": "\u0942", "uuvowelsigngujarati": "\u0AC2", "uvowelsignbengali": "\u09C1", "uvowelsigndeva": "\u0941", "uvowelsigngujarati": "\u0AC1", "v": "\u0076", "vadeva": "\u0935", "vagujarati": "\u0AB5", "vagurmukhi": "\u0A35", "vakatakana": "\u30F7", "vav": "\u05D5", "vavdagesh": "\uFB35", "vavdagesh65": "\uFB35", "vavdageshhebrew": "\uFB35", "vavhebrew": "\u05D5", "vavholam": "\uFB4B", "vavholamhebrew": "\uFB4B", "vavvavhebrew": "\u05F0", "vavyodhebrew": "\u05F1", "vcircle": "\u24E5", "vdotbelow": "\u1E7F", "vecyrillic": "\u0432", "veharabic": "\u06A4", "vehfinalarabic": "\uFB6B", "vehinitialarabic": "\uFB6C", "vehmedialarabic": "\uFB6D", "vekatakana": "\u30F9", "venus": "\u2640", "verticalbar": "\u007C", "verticallineabovecmb": "\u030D", "verticallinebelowcmb": "\u0329", "verticallinelowmod": "\u02CC", "verticallinemod": "\u02C8", "vewarmenian": "\u057E", "vhook": "\u028B", "vikatakana": "\u30F8", "viramabengali": "\u09CD", "viramadeva": "\u094D", "viramagujarati": "\u0ACD", "visargabengali": "\u0983", "visargadeva": "\u0903", "visargagujarati": "\u0A83", "vmonospace": "\uFF56", "voarmenian": "\u0578", "voicediterationhiragana": "\u309E", "voicediterationkatakana": "\u30FE", "voicedmarkkana": "\u309B", "voicedmarkkanahalfwidth": "\uFF9E", "vokatakana": "\u30FA", "vparen": "\u24B1", "vtilde": "\u1E7D", "vturned": "\u028C", "vuhiragana": "\u3094", "vukatakana": "\u30F4", "w": "\u0077", "wacute": "\u1E83", "waekorean": "\u3159", "wahiragana": "\u308F", "wakatakana": "\u30EF", "wakatakanahalfwidth": "\uFF9C", "wakorean": "\u3158", "wasmallhiragana": "\u308E", "wasmallkatakana": "\u30EE", "wattosquare": "\u3357", "wavedash": "\u301C", "wavyunderscorevertical": "\uFE34", "wawarabic": "\u0648", "wawfinalarabic": "\uFEEE", "wawhamzaabovearabic": "\u0624", "wawhamzaabovefinalarabic": "\uFE86", "wbsquare": "\u33DD", "wcircle": "\u24E6", "wcircumflex": "\u0175", "wdieresis": "\u1E85", "wdotaccent": "\u1E87", "wdotbelow": "\u1E89", "wehiragana": "\u3091", "weierstrass": "\u2118", "wekatakana": "\u30F1", "wekorean": "\u315E", "weokorean": "\u315D", "wgrave": "\u1E81", "whitebullet": "\u25E6", "whitecircle": "\u25CB", "whitecircleinverse": "\u25D9", "whitecornerbracketleft": "\u300E", "whitecornerbracketleftvertical": "\uFE43", "whitecornerbracketright": "\u300F", "whitecornerbracketrightvertical": "\uFE44", "whitediamond": "\u25C7", "whitediamondcontainingblacksmalldiamond": "\u25C8", "whitedownpointingsmalltriangle": "\u25BF", "whitedownpointingtriangle": "\u25BD", "whiteleftpointingsmalltriangle": "\u25C3", "whiteleftpointingtriangle": "\u25C1", "whitelenticularbracketleft": "\u3016", "whitelenticularbracketright": "\u3017", "whiterightpointingsmalltriangle": "\u25B9", "whiterightpointingtriangle": "\u25B7", "whitesmallsquare": "\u25AB", "whitesmilingface": "\u263A", "whitesquare": "\u25A1", "whitestar": "\u2606", "whitetelephone": "\u260F", "whitetortoiseshellbracketleft": "\u3018", "whitetortoiseshellbracketright": "\u3019", "whiteuppointingsmalltriangle": "\u25B5", "whiteuppointingtriangle": "\u25B3", "wihiragana": "\u3090", "wikatakana": "\u30F0", "wikorean": "\u315F", "wmonospace": "\uFF57", "wohiragana": "\u3092", "wokatakana": "\u30F2", "wokatakanahalfwidth": "\uFF66", "won": "\u20A9", "wonmonospace": "\uFFE6", "wowaenthai": "\u0E27", "wparen": "\u24B2", "wring": "\u1E98", "wsuperior": "\u02B7", "wturned": "\u028D", "wynn": "\u01BF", "x": "\u0078", "xabovecmb": "\u033D", "xbopomofo": "\u3112", "xcircle": "\u24E7", "xdieresis": "\u1E8D", "xdotaccent": "\u1E8B", "xeharmenian": "\u056D", "xi": "\u03BE", "xmonospace": "\uFF58", "xparen": "\u24B3", "xsuperior": "\u02E3", "y": "\u0079", "yaadosquare": "\u334E", "yabengali": "\u09AF", "yacute": "\u00FD", "yadeva": "\u092F", "yaekorean": "\u3152", "yagujarati": "\u0AAF", "yagurmukhi": "\u0A2F", "yahiragana": "\u3084", "yakatakana": "\u30E4", "yakatakanahalfwidth": "\uFF94", "yakorean": "\u3151", "yamakkanthai": "\u0E4E", "yasmallhiragana": "\u3083", "yasmallkatakana": "\u30E3", "yasmallkatakanahalfwidth": "\uFF6C", "yatcyrillic": "\u0463", "ycircle": "\u24E8", "ycircumflex": "\u0177", "ydieresis": "\u00FF", "ydotaccent": "\u1E8F", "ydotbelow": "\u1EF5", "yeharabic": "\u064A", "yehbarreearabic": "\u06D2", "yehbarreefinalarabic": "\uFBAF", "yehfinalarabic": "\uFEF2", "yehhamzaabovearabic": "\u0626", "yehhamzaabovefinalarabic": "\uFE8A", "yehhamzaaboveinitialarabic": "\uFE8B", "yehhamzaabovemedialarabic": "\uFE8C", "yehinitialarabic": "\uFEF3", "yehmedialarabic": "\uFEF4", "yehmeeminitialarabic": "\uFCDD", "yehmeemisolatedarabic": "\uFC58", "yehnoonfinalarabic": "\uFC94", "yehthreedotsbelowarabic": "\u06D1", "yekorean": "\u3156", "yen": "\u00A5", "yenmonospace": "\uFFE5", "yeokorean": "\u3155", "yeorinhieuhkorean": "\u3186", "yerahbenyomohebrew": "\u05AA", "yerahbenyomolefthebrew": "\u05AA", "yericyrillic": "\u044B", "yerudieresiscyrillic": "\u04F9", "yesieungkorean": "\u3181", "yesieungpansioskorean": "\u3183", "yesieungsioskorean": "\u3182", "yetivhebrew": "\u059A", "ygrave": "\u1EF3", "yhook": "\u01B4", "yhookabove": "\u1EF7", "yiarmenian": "\u0575", "yicyrillic": "\u0457", "yikorean": "\u3162", "yinyang": "\u262F", "yiwnarmenian": "\u0582", "ymonospace": "\uFF59", "yod": "\u05D9", "yoddagesh": "\uFB39", "yoddageshhebrew": "\uFB39", "yodhebrew": "\u05D9", "yodyodhebrew": "\u05F2", "yodyodpatahhebrew": "\uFB1F", "yohiragana": "\u3088", "yoikorean": "\u3189", "yokatakana": "\u30E8", "yokatakanahalfwidth": "\uFF96", "yokorean": "\u315B", "yosmallhiragana": "\u3087", "yosmallkatakana": "\u30E7", "yosmallkatakanahalfwidth": "\uFF6E", "yotgreek": "\u03F3", "yoyaekorean": "\u3188", "yoyakorean": "\u3187", "yoyakthai": "\u0E22", "yoyingthai": "\u0E0D", "yparen": "\u24B4", "ypogegrammeni": "\u037A", "ypogegrammenigreekcmb": "\u0345", "yr": "\u01A6", "yring": "\u1E99", "ysuperior": "\u02B8", "ytilde": "\u1EF9", "yturned": "\u028E", "yuhiragana": "\u3086", "yuikorean": "\u318C", "yukatakana": "\u30E6", "yukatakanahalfwidth": "\uFF95", "yukorean": "\u3160", "yusbigcyrillic": "\u046B", "yusbigiotifiedcyrillic": "\u046D", "yuslittlecyrillic": "\u0467", "yuslittleiotifiedcyrillic": "\u0469", "yusmallhiragana": "\u3085", "yusmallkatakana": "\u30E5", "yusmallkatakanahalfwidth": "\uFF6D", "yuyekorean": "\u318B", "yuyeokorean": "\u318A", "yyabengali": "\u09DF", "yyadeva": "\u095F", "z": "\u007A", "zaarmenian": "\u0566", "zacute": "\u017A", "zadeva": "\u095B", "zagurmukhi": "\u0A5B", "zaharabic": "\u0638", "zahfinalarabic": "\uFEC6", "zahinitialarabic": "\uFEC7", "zahiragana": "\u3056", "zahmedialarabic": "\uFEC8", "zainarabic": "\u0632", "zainfinalarabic": "\uFEB0", "zakatakana": "\u30B6", "zaqefgadolhebrew": "\u0595", "zaqefqatanhebrew": "\u0594", "zarqahebrew": "\u0598", "zayin": "\u05D6", "zayindagesh": "\uFB36", "zayindageshhebrew": "\uFB36", "zayinhebrew": "\u05D6", "zbopomofo": "\u3117", "zcaron": "\u017E", "zcircle": "\u24E9", "zcircumflex": "\u1E91", "zcurl": "\u0291", "zdot": "\u017C", "zdotaccent": "\u017C", "zdotbelow": "\u1E93", "zecyrillic": "\u0437", "zedescendercyrillic": "\u0499", "zedieresiscyrillic": "\u04DF", "zehiragana": "\u305C", "zekatakana": "\u30BC", "zero": "\u0030", "zeroarabic": "\u0660", "zerobengali": "\u09E6", "zerodeva": "\u0966", "zerogujarati": "\u0AE6", "zerogurmukhi": "\u0A66", "zerohackarabic": "\u0660", "zeroinferior": "\u2080", "zeromonospace": "\uFF10", "zerooldstyle": "\uF730", "zeropersian": "\u06F0", "zerosuperior": "\u2070", "zerothai": "\u0E50", "zerowidthjoiner": "\uFEFF", "zerowidthnonjoiner": "\u200C", "zerowidthspace": "\u200B", "zeta": "\u03B6", "zhbopomofo": "\u3113", "zhearmenian": "\u056A", "zhebrevecyrillic": "\u04C2", "zhecyrillic": "\u0436", "zhedescendercyrillic": "\u0497", "zhedieresiscyrillic": "\u04DD", "zihiragana": "\u3058", "zikatakana": "\u30B8", "zinorhebrew": "\u05AE", "zlinebelow": "\u1E95", "zmonospace": "\uFF5A", "zohiragana": "\u305E", "zokatakana": "\u30BE", "zparen": "\u24B5", "zretroflexhook": "\u0290", "zstroke": "\u01B6", "zuhiragana": "\u305A", "zukatakana": "\u30BA", } # --end
20220429-pdfminer-jameslp310
/20220429_pdfminer_jameslp310-0.0.2-py3-none-any.whl/pdfminer/glyphlist.py
glyphlist.py
"""Functions that can be used for the most common use-cases for pdfminer.six""" import logging import sys from io import StringIO from typing import Any, BinaryIO, Container, Iterator, Optional, cast from .converter import XMLConverter, HTMLConverter, TextConverter, PDFPageAggregator from .image import ImageWriter from .layout import LAParams, LTPage from .pdfdevice import PDFDevice, TagExtractor from .pdfinterp import PDFResourceManager, PDFPageInterpreter from .pdfpage import PDFPage from .utils import open_filename, FileOrName, AnyIO def extract_text_to_fp( inf: BinaryIO, outfp: AnyIO, output_type: str = "text", codec: str = "utf-8", laparams: Optional[LAParams] = None, maxpages: int = 0, page_numbers: Optional[Container[int]] = None, password: str = "", scale: float = 1.0, rotation: int = 0, layoutmode: str = "normal", output_dir: Optional[str] = None, strip_control: bool = False, debug: bool = False, disable_caching: bool = False, **kwargs: Any, ) -> None: """Parses text from inf-file and writes to outfp file-like object. Takes loads of optional arguments but the defaults are somewhat sane. Beware laparams: Including an empty LAParams is not the same as passing None! :param inf: a file-like object to read PDF structure from, such as a file handler (using the builtin `open()` function) or a `BytesIO`. :param outfp: a file-like object to write the text to. :param output_type: May be 'text', 'xml', 'html', 'tag'. Only 'text' works properly. :param codec: Text decoding codec :param laparams: An LAParams object from pdfminer.layout. Default is None but may not layout correctly. :param maxpages: How many pages to stop parsing after :param page_numbers: zero-indexed page numbers to operate on. :param password: For encrypted PDFs, the password to decrypt. :param scale: Scale factor :param rotation: Rotation factor :param layoutmode: Default is 'normal', see pdfminer.converter.HTMLConverter :param output_dir: If given, creates an ImageWriter for extracted images. :param strip_control: Does what it says on the tin :param debug: Output more logging data :param disable_caching: Does what it says on the tin :param other: :return: nothing, acting as it does on two streams. Use StringIO to get strings. """ if debug: logging.getLogger().setLevel(logging.DEBUG) imagewriter = None if output_dir: imagewriter = ImageWriter(output_dir) rsrcmgr = PDFResourceManager(caching=not disable_caching) device: Optional[PDFDevice] = None if output_type != "text" and outfp == sys.stdout: outfp = sys.stdout.buffer if output_type == "text": device = TextConverter( rsrcmgr, outfp, codec=codec, laparams=laparams, imagewriter=imagewriter ) elif output_type == "xml": device = XMLConverter( rsrcmgr, outfp, codec=codec, laparams=laparams, imagewriter=imagewriter, stripcontrol=strip_control, ) elif output_type == "html": device = HTMLConverter( rsrcmgr, outfp, codec=codec, scale=scale, layoutmode=layoutmode, laparams=laparams, imagewriter=imagewriter, ) elif output_type == "tag": # Binary I/O is required, but we have no good way to test it here. device = TagExtractor(rsrcmgr, cast(BinaryIO, outfp), codec=codec) else: msg = f"Output type can be text, html, xml or tag but is " f"{output_type}" raise ValueError(msg) assert device is not None interpreter = PDFPageInterpreter(rsrcmgr, device) for page in PDFPage.get_pages( inf, page_numbers, maxpages=maxpages, password=password, caching=not disable_caching, ): page.rotate = (page.rotate + rotation) % 360 interpreter.process_page(page) device.close() def extract_text( pdf_file: FileOrName, password: str = "", page_numbers: Optional[Container[int]] = None, maxpages: int = 0, caching: bool = True, codec: str = "utf-8", laparams: Optional[LAParams] = None, ) -> str: """Parse and return the text contained in a PDF file. :param pdf_file: Either a file path or a file-like object for the PDF file to be worked on. :param password: For encrypted PDFs, the password to decrypt. :param page_numbers: List of zero-indexed page numbers to extract. :param maxpages: The maximum number of pages to parse :param caching: If resources should be cached :param codec: Text decoding codec :param laparams: An LAParams object from pdfminer.layout. If None, uses some default settings that often work well. :return: a string containing all of the text extracted. """ if laparams is None: laparams = LAParams() with open_filename(pdf_file, "rb") as fp, StringIO() as output_string: fp = cast(BinaryIO, fp) # we opened in binary mode rsrcmgr = PDFResourceManager(caching=caching) device = TextConverter(rsrcmgr, output_string, codec=codec, laparams=laparams) interpreter = PDFPageInterpreter(rsrcmgr, device) for page in PDFPage.get_pages( fp, page_numbers, maxpages=maxpages, password=password, caching=caching, ): interpreter.process_page(page) return output_string.getvalue() def extract_pages( pdf_file: FileOrName, password: str = "", page_numbers: Optional[Container[int]] = None, maxpages: int = 0, caching: bool = True, laparams: Optional[LAParams] = None, ) -> Iterator[LTPage]: """Extract and yield LTPage objects :param pdf_file: Either a file path or a file-like object for the PDF file to be worked on. :param password: For encrypted PDFs, the password to decrypt. :param page_numbers: List of zero-indexed page numbers to extract. :param maxpages: The maximum number of pages to parse :param caching: If resources should be cached :param laparams: An LAParams object from pdfminer.layout. If None, uses some default settings that often work well. :return: """ if laparams is None: laparams = LAParams() with open_filename(pdf_file, "rb") as fp: fp = cast(BinaryIO, fp) # we opened in binary mode resource_manager = PDFResourceManager(caching=caching) device = PDFPageAggregator(resource_manager, laparams=laparams) interpreter = PDFPageInterpreter(resource_manager, device) for page in PDFPage.get_pages( fp, page_numbers, maxpages=maxpages, password=password, caching=caching ): interpreter.process_page(page) layout = device.get_result() yield layout
20220429-pdfminer-jameslp310
/20220429_pdfminer_jameslp310-0.0.2-py3-none-any.whl/pdfminer/high_level.py
high_level.py
""" Python implementation of Arcfour encryption algorithm. See https://en.wikipedia.org/wiki/RC4 This code is in the public domain. """ from typing import Sequence class Arcfour: def __init__(self, key: Sequence[int]) -> None: # because Py3 range is not indexable s = [i for i in range(256)] j = 0 klen = len(key) for i in range(256): j = (j + s[i] + key[i % klen]) % 256 (s[i], s[j]) = (s[j], s[i]) self.s = s (self.i, self.j) = (0, 0) def process(self, data: bytes) -> bytes: (i, j) = (self.i, self.j) s = self.s r = b"" for c in iter(data): i = (i + 1) % 256 j = (j + s[i]) % 256 (s[i], s[j]) = (s[j], s[i]) k = s[(s[i] + s[j]) % 256] r += bytes((c ^ k,)) (self.i, self.j) = (i, j) return r encrypt = decrypt = process
20220429-pdfminer-jameslp310
/20220429_pdfminer_jameslp310-0.0.2-py3-none-any.whl/pdfminer/arcfour.py
arcfour.py
import collections from typing import Dict from .psparser import LIT LITERAL_DEVICE_GRAY = LIT("DeviceGray") LITERAL_DEVICE_RGB = LIT("DeviceRGB") LITERAL_DEVICE_CMYK = LIT("DeviceCMYK") class PDFColorSpace: def __init__(self, name: str, ncomponents: int) -> None: self.name = name self.ncomponents = ncomponents def __repr__(self) -> str: return "<PDFColorSpace: %s, ncomponents=%d>" % (self.name, self.ncomponents) PREDEFINED_COLORSPACE: Dict[str, PDFColorSpace] = collections.OrderedDict() for (name, n) in [ ("DeviceGray", 1), # default value first ("CalRGB", 3), ("CalGray", 1), ("Lab", 3), ("DeviceRGB", 3), ("DeviceCMYK", 4), ("Separation", 1), ("Indexed", 1), ("Pattern", 1), ]: PREDEFINED_COLORSPACE[name] = PDFColorSpace(name, n)
20220429-pdfminer-jameslp310
/20220429_pdfminer_jameslp310-0.0.2-py3-none-any.whl/pdfminer/pdfcolor.py
pdfcolor.py
# CCITT Fax decoder # # Bugs: uncompressed mode untested. # # cf. # ITU-T Recommendation T.4 # "Standardization of Group 3 facsimile terminals # for document transmission" # ITU-T Recommendation T.6 # "FACSIMILE CODING SCHEMES AND CODING CONTROL FUNCTIONS # FOR GROUP 4 FACSIMILE APPARATUS" import array from typing import ( Any, Callable, Dict, Iterator, List, MutableSequence, Optional, Sequence, Union, cast, ) def get_bytes(data: bytes) -> Iterator[int]: yield from data # Workaround https://github.com/python/mypy/issues/731 BitParserState = MutableSequence[Any] # A better definition (not supported by mypy) would be: # BitParserState = MutableSequence[Union["BitParserState", int, str, None]] class BitParser: _state: BitParserState # _accept is declared Optional solely as a workaround for # https://github.com/python/mypy/issues/708 _accept: Optional[Callable[[Any], BitParserState]] def __init__(self) -> None: self._pos = 0 @classmethod def add(cls, root: BitParserState, v: Union[int, str], bits: str) -> None: p: BitParserState = root b = None for i in range(len(bits)): if 0 < i: assert b is not None if p[b] is None: p[b] = [None, None] p = p[b] if bits[i] == "1": b = 1 else: b = 0 assert b is not None p[b] = v def feedbytes(self, data: bytes) -> None: for byte in get_bytes(data): for m in (128, 64, 32, 16, 8, 4, 2, 1): self._parse_bit(byte & m) def _parse_bit(self, x: object) -> None: if x: v = self._state[1] else: v = self._state[0] self._pos += 1 if isinstance(v, list): self._state = v else: assert self._accept is not None self._state = self._accept(v) class CCITTG4Parser(BitParser): MODE = [None, None] BitParser.add(MODE, 0, "1") BitParser.add(MODE, +1, "011") BitParser.add(MODE, -1, "010") BitParser.add(MODE, "h", "001") BitParser.add(MODE, "p", "0001") BitParser.add(MODE, +2, "000011") BitParser.add(MODE, -2, "000010") BitParser.add(MODE, +3, "0000011") BitParser.add(MODE, -3, "0000010") BitParser.add(MODE, "u", "0000001111") BitParser.add(MODE, "x1", "0000001000") BitParser.add(MODE, "x2", "0000001001") BitParser.add(MODE, "x3", "0000001010") BitParser.add(MODE, "x4", "0000001011") BitParser.add(MODE, "x5", "0000001100") BitParser.add(MODE, "x6", "0000001101") BitParser.add(MODE, "x7", "0000001110") BitParser.add(MODE, "e", "000000000001000000000001") WHITE = [None, None] BitParser.add(WHITE, 0, "00110101") BitParser.add(WHITE, 1, "000111") BitParser.add(WHITE, 2, "0111") BitParser.add(WHITE, 3, "1000") BitParser.add(WHITE, 4, "1011") BitParser.add(WHITE, 5, "1100") BitParser.add(WHITE, 6, "1110") BitParser.add(WHITE, 7, "1111") BitParser.add(WHITE, 8, "10011") BitParser.add(WHITE, 9, "10100") BitParser.add(WHITE, 10, "00111") BitParser.add(WHITE, 11, "01000") BitParser.add(WHITE, 12, "001000") BitParser.add(WHITE, 13, "000011") BitParser.add(WHITE, 14, "110100") BitParser.add(WHITE, 15, "110101") BitParser.add(WHITE, 16, "101010") BitParser.add(WHITE, 17, "101011") BitParser.add(WHITE, 18, "0100111") BitParser.add(WHITE, 19, "0001100") BitParser.add(WHITE, 20, "0001000") BitParser.add(WHITE, 21, "0010111") BitParser.add(WHITE, 22, "0000011") BitParser.add(WHITE, 23, "0000100") BitParser.add(WHITE, 24, "0101000") BitParser.add(WHITE, 25, "0101011") BitParser.add(WHITE, 26, "0010011") BitParser.add(WHITE, 27, "0100100") BitParser.add(WHITE, 28, "0011000") BitParser.add(WHITE, 29, "00000010") BitParser.add(WHITE, 30, "00000011") BitParser.add(WHITE, 31, "00011010") BitParser.add(WHITE, 32, "00011011") BitParser.add(WHITE, 33, "00010010") BitParser.add(WHITE, 34, "00010011") BitParser.add(WHITE, 35, "00010100") BitParser.add(WHITE, 36, "00010101") BitParser.add(WHITE, 37, "00010110") BitParser.add(WHITE, 38, "00010111") BitParser.add(WHITE, 39, "00101000") BitParser.add(WHITE, 40, "00101001") BitParser.add(WHITE, 41, "00101010") BitParser.add(WHITE, 42, "00101011") BitParser.add(WHITE, 43, "00101100") BitParser.add(WHITE, 44, "00101101") BitParser.add(WHITE, 45, "00000100") BitParser.add(WHITE, 46, "00000101") BitParser.add(WHITE, 47, "00001010") BitParser.add(WHITE, 48, "00001011") BitParser.add(WHITE, 49, "01010010") BitParser.add(WHITE, 50, "01010011") BitParser.add(WHITE, 51, "01010100") BitParser.add(WHITE, 52, "01010101") BitParser.add(WHITE, 53, "00100100") BitParser.add(WHITE, 54, "00100101") BitParser.add(WHITE, 55, "01011000") BitParser.add(WHITE, 56, "01011001") BitParser.add(WHITE, 57, "01011010") BitParser.add(WHITE, 58, "01011011") BitParser.add(WHITE, 59, "01001010") BitParser.add(WHITE, 60, "01001011") BitParser.add(WHITE, 61, "00110010") BitParser.add(WHITE, 62, "00110011") BitParser.add(WHITE, 63, "00110100") BitParser.add(WHITE, 64, "11011") BitParser.add(WHITE, 128, "10010") BitParser.add(WHITE, 192, "010111") BitParser.add(WHITE, 256, "0110111") BitParser.add(WHITE, 320, "00110110") BitParser.add(WHITE, 384, "00110111") BitParser.add(WHITE, 448, "01100100") BitParser.add(WHITE, 512, "01100101") BitParser.add(WHITE, 576, "01101000") BitParser.add(WHITE, 640, "01100111") BitParser.add(WHITE, 704, "011001100") BitParser.add(WHITE, 768, "011001101") BitParser.add(WHITE, 832, "011010010") BitParser.add(WHITE, 896, "011010011") BitParser.add(WHITE, 960, "011010100") BitParser.add(WHITE, 1024, "011010101") BitParser.add(WHITE, 1088, "011010110") BitParser.add(WHITE, 1152, "011010111") BitParser.add(WHITE, 1216, "011011000") BitParser.add(WHITE, 1280, "011011001") BitParser.add(WHITE, 1344, "011011010") BitParser.add(WHITE, 1408, "011011011") BitParser.add(WHITE, 1472, "010011000") BitParser.add(WHITE, 1536, "010011001") BitParser.add(WHITE, 1600, "010011010") BitParser.add(WHITE, 1664, "011000") BitParser.add(WHITE, 1728, "010011011") BitParser.add(WHITE, 1792, "00000001000") BitParser.add(WHITE, 1856, "00000001100") BitParser.add(WHITE, 1920, "00000001101") BitParser.add(WHITE, 1984, "000000010010") BitParser.add(WHITE, 2048, "000000010011") BitParser.add(WHITE, 2112, "000000010100") BitParser.add(WHITE, 2176, "000000010101") BitParser.add(WHITE, 2240, "000000010110") BitParser.add(WHITE, 2304, "000000010111") BitParser.add(WHITE, 2368, "000000011100") BitParser.add(WHITE, 2432, "000000011101") BitParser.add(WHITE, 2496, "000000011110") BitParser.add(WHITE, 2560, "000000011111") BLACK = [None, None] BitParser.add(BLACK, 0, "0000110111") BitParser.add(BLACK, 1, "010") BitParser.add(BLACK, 2, "11") BitParser.add(BLACK, 3, "10") BitParser.add(BLACK, 4, "011") BitParser.add(BLACK, 5, "0011") BitParser.add(BLACK, 6, "0010") BitParser.add(BLACK, 7, "00011") BitParser.add(BLACK, 8, "000101") BitParser.add(BLACK, 9, "000100") BitParser.add(BLACK, 10, "0000100") BitParser.add(BLACK, 11, "0000101") BitParser.add(BLACK, 12, "0000111") BitParser.add(BLACK, 13, "00000100") BitParser.add(BLACK, 14, "00000111") BitParser.add(BLACK, 15, "000011000") BitParser.add(BLACK, 16, "0000010111") BitParser.add(BLACK, 17, "0000011000") BitParser.add(BLACK, 18, "0000001000") BitParser.add(BLACK, 19, "00001100111") BitParser.add(BLACK, 20, "00001101000") BitParser.add(BLACK, 21, "00001101100") BitParser.add(BLACK, 22, "00000110111") BitParser.add(BLACK, 23, "00000101000") BitParser.add(BLACK, 24, "00000010111") BitParser.add(BLACK, 25, "00000011000") BitParser.add(BLACK, 26, "000011001010") BitParser.add(BLACK, 27, "000011001011") BitParser.add(BLACK, 28, "000011001100") BitParser.add(BLACK, 29, "000011001101") BitParser.add(BLACK, 30, "000001101000") BitParser.add(BLACK, 31, "000001101001") BitParser.add(BLACK, 32, "000001101010") BitParser.add(BLACK, 33, "000001101011") BitParser.add(BLACK, 34, "000011010010") BitParser.add(BLACK, 35, "000011010011") BitParser.add(BLACK, 36, "000011010100") BitParser.add(BLACK, 37, "000011010101") BitParser.add(BLACK, 38, "000011010110") BitParser.add(BLACK, 39, "000011010111") BitParser.add(BLACK, 40, "000001101100") BitParser.add(BLACK, 41, "000001101101") BitParser.add(BLACK, 42, "000011011010") BitParser.add(BLACK, 43, "000011011011") BitParser.add(BLACK, 44, "000001010100") BitParser.add(BLACK, 45, "000001010101") BitParser.add(BLACK, 46, "000001010110") BitParser.add(BLACK, 47, "000001010111") BitParser.add(BLACK, 48, "000001100100") BitParser.add(BLACK, 49, "000001100101") BitParser.add(BLACK, 50, "000001010010") BitParser.add(BLACK, 51, "000001010011") BitParser.add(BLACK, 52, "000000100100") BitParser.add(BLACK, 53, "000000110111") BitParser.add(BLACK, 54, "000000111000") BitParser.add(BLACK, 55, "000000100111") BitParser.add(BLACK, 56, "000000101000") BitParser.add(BLACK, 57, "000001011000") BitParser.add(BLACK, 58, "000001011001") BitParser.add(BLACK, 59, "000000101011") BitParser.add(BLACK, 60, "000000101100") BitParser.add(BLACK, 61, "000001011010") BitParser.add(BLACK, 62, "000001100110") BitParser.add(BLACK, 63, "000001100111") BitParser.add(BLACK, 64, "0000001111") BitParser.add(BLACK, 128, "000011001000") BitParser.add(BLACK, 192, "000011001001") BitParser.add(BLACK, 256, "000001011011") BitParser.add(BLACK, 320, "000000110011") BitParser.add(BLACK, 384, "000000110100") BitParser.add(BLACK, 448, "000000110101") BitParser.add(BLACK, 512, "0000001101100") BitParser.add(BLACK, 576, "0000001101101") BitParser.add(BLACK, 640, "0000001001010") BitParser.add(BLACK, 704, "0000001001011") BitParser.add(BLACK, 768, "0000001001100") BitParser.add(BLACK, 832, "0000001001101") BitParser.add(BLACK, 896, "0000001110010") BitParser.add(BLACK, 960, "0000001110011") BitParser.add(BLACK, 1024, "0000001110100") BitParser.add(BLACK, 1088, "0000001110101") BitParser.add(BLACK, 1152, "0000001110110") BitParser.add(BLACK, 1216, "0000001110111") BitParser.add(BLACK, 1280, "0000001010010") BitParser.add(BLACK, 1344, "0000001010011") BitParser.add(BLACK, 1408, "0000001010100") BitParser.add(BLACK, 1472, "0000001010101") BitParser.add(BLACK, 1536, "0000001011010") BitParser.add(BLACK, 1600, "0000001011011") BitParser.add(BLACK, 1664, "0000001100100") BitParser.add(BLACK, 1728, "0000001100101") BitParser.add(BLACK, 1792, "00000001000") BitParser.add(BLACK, 1856, "00000001100") BitParser.add(BLACK, 1920, "00000001101") BitParser.add(BLACK, 1984, "000000010010") BitParser.add(BLACK, 2048, "000000010011") BitParser.add(BLACK, 2112, "000000010100") BitParser.add(BLACK, 2176, "000000010101") BitParser.add(BLACK, 2240, "000000010110") BitParser.add(BLACK, 2304, "000000010111") BitParser.add(BLACK, 2368, "000000011100") BitParser.add(BLACK, 2432, "000000011101") BitParser.add(BLACK, 2496, "000000011110") BitParser.add(BLACK, 2560, "000000011111") UNCOMPRESSED = [None, None] BitParser.add(UNCOMPRESSED, "1", "1") BitParser.add(UNCOMPRESSED, "01", "01") BitParser.add(UNCOMPRESSED, "001", "001") BitParser.add(UNCOMPRESSED, "0001", "0001") BitParser.add(UNCOMPRESSED, "00001", "00001") BitParser.add(UNCOMPRESSED, "00000", "000001") BitParser.add(UNCOMPRESSED, "T00", "00000011") BitParser.add(UNCOMPRESSED, "T10", "00000010") BitParser.add(UNCOMPRESSED, "T000", "000000011") BitParser.add(UNCOMPRESSED, "T100", "000000010") BitParser.add(UNCOMPRESSED, "T0000", "0000000011") BitParser.add(UNCOMPRESSED, "T1000", "0000000010") BitParser.add(UNCOMPRESSED, "T00000", "00000000011") BitParser.add(UNCOMPRESSED, "T10000", "00000000010") class EOFB(Exception): pass class InvalidData(Exception): pass class ByteSkip(Exception): pass _color: int def __init__(self, width: int, bytealign: bool = False) -> None: BitParser.__init__(self) self.width = width self.bytealign = bytealign self.reset() return def feedbytes(self, data: bytes) -> None: for byte in get_bytes(data): try: for m in (128, 64, 32, 16, 8, 4, 2, 1): self._parse_bit(byte & m) except self.ByteSkip: self._accept = self._parse_mode self._state = self.MODE except self.EOFB: break return def _parse_mode(self, mode: object) -> BitParserState: if mode == "p": self._do_pass() self._flush_line() return self.MODE elif mode == "h": self._n1 = 0 self._accept = self._parse_horiz1 if self._color: return self.WHITE else: return self.BLACK elif mode == "u": self._accept = self._parse_uncompressed return self.UNCOMPRESSED elif mode == "e": raise self.EOFB elif isinstance(mode, int): self._do_vertical(mode) self._flush_line() return self.MODE else: raise self.InvalidData(mode) def _parse_horiz1(self, n: Any) -> BitParserState: if n is None: raise self.InvalidData self._n1 += n if n < 64: self._n2 = 0 self._color = 1 - self._color self._accept = self._parse_horiz2 if self._color: return self.WHITE else: return self.BLACK def _parse_horiz2(self, n: Any) -> BitParserState: if n is None: raise self.InvalidData self._n2 += n if n < 64: self._color = 1 - self._color self._accept = self._parse_mode self._do_horizontal(self._n1, self._n2) self._flush_line() return self.MODE elif self._color: return self.WHITE else: return self.BLACK def _parse_uncompressed(self, bits: Optional[str]) -> BitParserState: if not bits: raise self.InvalidData if bits.startswith("T"): self._accept = self._parse_mode self._color = int(bits[1]) self._do_uncompressed(bits[2:]) return self.MODE else: self._do_uncompressed(bits) return self.UNCOMPRESSED def _get_bits(self) -> str: return "".join(str(b) for b in self._curline[: self._curpos]) def _get_refline(self, i: int) -> str: if i < 0: return "[]" + "".join(str(b) for b in self._refline) elif len(self._refline) <= i: return "".join(str(b) for b in self._refline) + "[]" else: return ( "".join(str(b) for b in self._refline[:i]) + "[" + str(self._refline[i]) + "]" + "".join(str(b) for b in self._refline[i + 1 :]) ) def reset(self) -> None: self._y = 0 self._curline = array.array("b", [1] * self.width) self._reset_line() self._accept = self._parse_mode self._state = self.MODE return def output_line(self, y: int, bits: Sequence[int]) -> None: print(y, "".join(str(b) for b in bits)) return def _reset_line(self) -> None: self._refline = self._curline self._curline = array.array("b", [1] * self.width) self._curpos = -1 self._color = 1 return def _flush_line(self) -> None: if self.width <= self._curpos: self.output_line(self._y, self._curline) self._y += 1 self._reset_line() if self.bytealign: raise self.ByteSkip return def _do_vertical(self, dx: int) -> None: x1 = self._curpos + 1 while 1: if x1 == 0: if self._color == 1 and self._refline[x1] != self._color: break elif x1 == len(self._refline): break elif ( self._refline[x1 - 1] == self._color and self._refline[x1] != self._color ): break x1 += 1 x1 += dx x0 = max(0, self._curpos) x1 = max(0, min(self.width, x1)) if x1 < x0: for x in range(x1, x0): self._curline[x] = self._color elif x0 < x1: for x in range(x0, x1): self._curline[x] = self._color self._curpos = x1 self._color = 1 - self._color return def _do_pass(self) -> None: x1 = self._curpos + 1 while 1: if x1 == 0: if self._color == 1 and self._refline[x1] != self._color: break elif x1 == len(self._refline): break elif ( self._refline[x1 - 1] == self._color and self._refline[x1] != self._color ): break x1 += 1 while 1: if x1 == 0: if self._color == 0 and self._refline[x1] == self._color: break elif x1 == len(self._refline): break elif ( self._refline[x1 - 1] != self._color and self._refline[x1] == self._color ): break x1 += 1 for x in range(self._curpos, x1): self._curline[x] = self._color self._curpos = x1 return def _do_horizontal(self, n1: int, n2: int) -> None: if self._curpos < 0: self._curpos = 0 x = self._curpos for _ in range(n1): if len(self._curline) <= x: break self._curline[x] = self._color x += 1 for _ in range(n2): if len(self._curline) <= x: break self._curline[x] = 1 - self._color x += 1 self._curpos = x return def _do_uncompressed(self, bits: str) -> None: for c in bits: self._curline[self._curpos] = int(c) self._curpos += 1 self._flush_line() return class CCITTFaxDecoder(CCITTG4Parser): def __init__( self, width: int, bytealign: bool = False, reversed: bool = False ) -> None: CCITTG4Parser.__init__(self, width, bytealign=bytealign) self.reversed = reversed self._buf = b"" return def close(self) -> bytes: return self._buf def output_line(self, y: int, bits: Sequence[int]) -> None: arr = array.array("B", [0] * ((len(bits) + 7) // 8)) if self.reversed: bits = [1 - b for b in bits] for (i, b) in enumerate(bits): if b: arr[i // 8] += (128, 64, 32, 16, 8, 4, 2, 1)[i % 8] self._buf += arr.tobytes() return def ccittfaxdecode(data: bytes, params: Dict[str, object]) -> bytes: K = params.get("K") if K == -1: cols = cast(int, params.get("Columns")) bytealign = cast(bool, params.get("EncodedByteAlign")) reversed = cast(bool, params.get("BlackIs1")) parser = CCITTFaxDecoder(cols, bytealign=bytealign, reversed=reversed) else: raise ValueError(K) parser.feedbytes(data) return parser.close() # test def main(argv: List[str]) -> None: if not argv[1:]: import unittest unittest.main() return class Parser(CCITTG4Parser): def __init__(self, width: int, bytealign: bool = False) -> None: import pygame # type: ignore[import] CCITTG4Parser.__init__(self, width, bytealign=bytealign) self.img = pygame.Surface((self.width, 1000)) return def output_line(self, y: int, bits: Sequence[int]) -> None: for (x, b) in enumerate(bits): if b: self.img.set_at((x, y), (255, 255, 255)) else: self.img.set_at((x, y), (0, 0, 0)) return def close(self) -> None: import pygame pygame.image.save(self.img, "out.bmp") return for path in argv[1:]: fp = open(path, "rb") (_, _, k, w, h, _) = path.split(".") parser = Parser(int(w)) parser.feedbytes(fp.read()) parser.close() fp.close() return
20220429-pdfminer-jameslp310
/20220429_pdfminer_jameslp310-0.0.2-py3-none-any.whl/pdfminer/ccitt.py
ccitt.py
""" Miscellaneous Routines. """ import io import pathlib import string import struct from html import escape from typing import ( Any, BinaryIO, Callable, Dict, Generic, Iterable, Iterator, List, Optional, Set, TextIO, Tuple, TypeVar, Union, TYPE_CHECKING, cast, ) if TYPE_CHECKING: from .layout import LTComponent import charset_normalizer # For str encoding detection # from sys import maxint as INF doesn't work anymore under Python3, but PDF # still uses 32 bits ints INF = (1 << 31) - 1 FileOrName = Union[pathlib.PurePath, str, io.IOBase] AnyIO = Union[TextIO, BinaryIO] class open_filename(object): """ Context manager that allows opening a filename (str or pathlib.PurePath type is supported) and closes it on exit, (just like `open`), but does nothing for file-like objects. """ def __init__(self, filename: FileOrName, *args: Any, **kwargs: Any) -> None: if isinstance(filename, pathlib.PurePath): filename = str(filename) if isinstance(filename, str): self.file_handler: AnyIO = open(filename, *args, **kwargs) self.closing = True elif isinstance(filename, io.IOBase): self.file_handler = cast(AnyIO, filename) self.closing = False else: raise TypeError("Unsupported input type: %s" % type(filename)) def __enter__(self) -> AnyIO: return self.file_handler def __exit__(self, exc_type: object, exc_val: object, exc_tb: object) -> None: if self.closing: self.file_handler.close() def make_compat_bytes(in_str: str) -> bytes: "Converts to bytes, encoding to unicode." assert isinstance(in_str, str), str(type(in_str)) return in_str.encode() def make_compat_str(o: object) -> str: """Converts everything to string, if bytes guessing the encoding.""" if isinstance(o, bytes): enc = charset_normalizer.detect(o) try: return o.decode(enc["encoding"]) except UnicodeDecodeError: return str(o) else: return str(o) def shorten_str(s: str, size: int) -> str: if size < 7: return s[:size] if len(s) > size: length = (size - 5) // 2 return "{} ... {}".format(s[:length], s[-length:]) else: return s def compatible_encode_method( bytesorstring: Union[bytes, str], encoding: str = "utf-8", erraction: str = "ignore" ) -> str: """When Py2 str.encode is called, it often means bytes.encode in Py3. This does either. """ if isinstance(bytesorstring, str): return bytesorstring assert isinstance(bytesorstring, bytes), str(type(bytesorstring)) return bytesorstring.decode(encoding, erraction) def paeth_predictor(left: int, above: int, upper_left: int) -> int: # From http://www.libpng.org/pub/png/spec/1.2/PNG-Filters.html # Initial estimate p = left + above - upper_left # Distances to a,b,c pa = abs(p - left) pb = abs(p - above) pc = abs(p - upper_left) # Return nearest of a,b,c breaking ties in order a,b,c if pa <= pb and pa <= pc: return left elif pb <= pc: return above else: return upper_left def apply_png_predictor( pred: int, colors: int, columns: int, bitspercomponent: int, data: bytes ) -> bytes: """Reverse the effect of the PNG predictor Documentation: http://www.libpng.org/pub/png/spec/1.2/PNG-Filters.html """ if bitspercomponent != 8: msg = "Unsupported `bitspercomponent': %d" % bitspercomponent raise ValueError(msg) nbytes = colors * columns * bitspercomponent // 8 bpp = colors * bitspercomponent // 8 # number of bytes per complete pixel buf = b"" line_above = b"\x00" * columns for scanline_i in range(0, len(data), nbytes + 1): filter_type = data[scanline_i] line_encoded = data[scanline_i + 1 : scanline_i + 1 + nbytes] raw = b"" if filter_type == 0: # Filter type 0: None raw += line_encoded elif filter_type == 1: # Filter type 1: Sub # To reverse the effect of the Sub() filter after decompression, # output the following value: # Raw(x) = Sub(x) + Raw(x - bpp) # (computed mod 256), where Raw() refers to the bytes already # decoded. for j, sub_x in enumerate(line_encoded): if j - bpp < 0: raw_x_bpp = 0 else: raw_x_bpp = int(raw[j - bpp]) raw_x = (sub_x + raw_x_bpp) & 255 raw += bytes((raw_x,)) elif filter_type == 2: # Filter type 2: Up # To reverse the effect of the Up() filter after decompression, # output the following value: # Raw(x) = Up(x) + Prior(x) # (computed mod 256), where Prior() refers to the decoded bytes of # the prior scanline. for (up_x, prior_x) in zip(line_encoded, line_above): raw_x = (up_x + prior_x) & 255 raw += bytes((raw_x,)) elif filter_type == 3: # Filter type 3: Average # To reverse the effect of the Average() filter after # decompression, output the following value: # Raw(x) = Average(x) + floor((Raw(x-bpp)+Prior(x))/2) # where the result is computed mod 256, but the prediction is # calculated in the same way as for encoding. Raw() refers to the # bytes already decoded, and Prior() refers to the decoded bytes of # the prior scanline. for j, average_x in enumerate(line_encoded): if j - bpp < 0: raw_x_bpp = 0 else: raw_x_bpp = int(raw[j - bpp]) prior_x = int(line_above[j]) raw_x = (average_x + (raw_x_bpp + prior_x) // 2) & 255 raw += bytes((raw_x,)) elif filter_type == 4: # Filter type 4: Paeth # To reverse the effect of the Paeth() filter after decompression, # output the following value: # Raw(x) = Paeth(x) # + PaethPredictor(Raw(x-bpp), Prior(x), Prior(x-bpp)) # (computed mod 256), where Raw() and Prior() refer to bytes # already decoded. Exactly the same PaethPredictor() function is # used by both encoder and decoder. for j, paeth_x in enumerate(line_encoded): if j - bpp < 0: raw_x_bpp = 0 prior_x_bpp = 0 else: raw_x_bpp = int(raw[j - bpp]) prior_x_bpp = int(line_above[j - bpp]) prior_x = int(line_above[j]) paeth = paeth_predictor(raw_x_bpp, prior_x, prior_x_bpp) raw_x = (paeth_x + paeth) & 255 raw += bytes((raw_x,)) else: raise ValueError("Unsupported predictor value: %d" % filter_type) buf += raw line_above = raw return buf Point = Tuple[float, float] Rect = Tuple[float, float, float, float] Matrix = Tuple[float, float, float, float, float, float] PathSegment = Union[ Tuple[str], # Literal['h'] Tuple[str, float, float], # Literal['m', 'l'] Tuple[str, float, float, float, float], # Literal['v', 'y'] Tuple[str, float, float, float, float, float, float], ] # Literal['c'] # Matrix operations MATRIX_IDENTITY: Matrix = (1, 0, 0, 1, 0, 0) def mult_matrix(m1: Matrix, m0: Matrix) -> Matrix: (a1, b1, c1, d1, e1, f1) = m1 (a0, b0, c0, d0, e0, f0) = m0 """Returns the multiplication of two matrices.""" return ( a0 * a1 + c0 * b1, b0 * a1 + d0 * b1, a0 * c1 + c0 * d1, b0 * c1 + d0 * d1, a0 * e1 + c0 * f1 + e0, b0 * e1 + d0 * f1 + f0, ) def translate_matrix(m: Matrix, v: Point) -> Matrix: """Translates a matrix by (x, y).""" (a, b, c, d, e, f) = m (x, y) = v return a, b, c, d, x * a + y * c + e, x * b + y * d + f def apply_matrix_pt(m: Matrix, v: Point) -> Point: (a, b, c, d, e, f) = m (x, y) = v """Applies a matrix to a point.""" return a * x + c * y + e, b * x + d * y + f def apply_matrix_norm(m: Matrix, v: Point) -> Point: """Equivalent to apply_matrix_pt(M, (p,q)) - apply_matrix_pt(M, (0,0))""" (a, b, c, d, e, f) = m (p, q) = v return a * p + c * q, b * p + d * q # Utility functions def isnumber(x: object) -> bool: return isinstance(x, (int, float)) _T = TypeVar("_T") def uniq(objs: Iterable[_T]) -> Iterator[_T]: """Eliminates duplicated elements.""" done = set() for obj in objs: if obj in done: continue done.add(obj) yield obj return def fsplit(pred: Callable[[_T], bool], objs: Iterable[_T]) -> Tuple[List[_T], List[_T]]: """Split a list into two classes according to the predicate.""" t = [] f = [] for obj in objs: if pred(obj): t.append(obj) else: f.append(obj) return t, f def drange(v0: float, v1: float, d: int) -> range: """Returns a discrete range.""" return range(int(v0) // d, int(v1 + d) // d) def get_bound(pts: Iterable[Point]) -> Rect: """Compute a minimal rectangle that covers all the points.""" limit: Rect = (INF, INF, -INF, -INF) (x0, y0, x1, y1) = limit for (x, y) in pts: x0 = min(x0, x) y0 = min(y0, y) x1 = max(x1, x) y1 = max(y1, y) return x0, y0, x1, y1 def pick( seq: Iterable[_T], func: Callable[[_T], float], maxobj: Optional[_T] = None ) -> Optional[_T]: """Picks the object obj where func(obj) has the highest value.""" maxscore = None for obj in seq: score = func(obj) if maxscore is None or maxscore < score: (maxscore, maxobj) = (score, obj) return maxobj def choplist(n: int, seq: Iterable[_T]) -> Iterator[Tuple[_T, ...]]: """Groups every n elements of the list.""" r = [] for x in seq: r.append(x) if len(r) == n: yield tuple(r) r = [] return def nunpack(s: bytes, default: int = 0) -> int: """Unpacks 1 to 4 or 8 byte integers (big endian).""" length = len(s) if not length: return default elif length == 1: return ord(s) elif length == 2: return cast(int, struct.unpack(">H", s)[0]) elif length == 3: return cast(int, struct.unpack(">L", b"\x00" + s)[0]) elif length == 4: return cast(int, struct.unpack(">L", s)[0]) elif length == 8: return cast(int, struct.unpack(">Q", s)[0]) else: raise TypeError("invalid length: %d" % length) PDFDocEncoding = "".join( chr(x) for x in ( 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F, 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0017, 0x0017, 0x02D8, 0x02C7, 0x02C6, 0x02D9, 0x02DD, 0x02DB, 0x02DA, 0x02DC, 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F, 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F, 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F, 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F, 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F, 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x0000, 0x2022, 0x2020, 0x2021, 0x2026, 0x2014, 0x2013, 0x0192, 0x2044, 0x2039, 0x203A, 0x2212, 0x2030, 0x201E, 0x201C, 0x201D, 0x2018, 0x2019, 0x201A, 0x2122, 0xFB01, 0xFB02, 0x0141, 0x0152, 0x0160, 0x0178, 0x017D, 0x0131, 0x0142, 0x0153, 0x0161, 0x017E, 0x0000, 0x20AC, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x0000, 0x00AE, 0x00AF, 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF, 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF, 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF, 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF, 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF, ) ) def decode_text(s: bytes) -> str: """Decodes a PDFDocEncoding string to Unicode.""" if s.startswith(b"\xfe\xff"): return str(s[2:], "utf-16be", "ignore") else: return "".join(PDFDocEncoding[c] for c in s) def enc(x: str) -> str: """Encodes a string for SGML/XML/HTML""" if isinstance(x, bytes): return "" return escape(x) def bbox2str(bbox: Rect) -> str: (x0, y0, x1, y1) = bbox return "{:.3f},{:.3f},{:.3f},{:.3f}".format(x0, y0, x1, y1) def matrix2str(m: Matrix) -> str: (a, b, c, d, e, f) = m return "[{:.2f},{:.2f},{:.2f},{:.2f}, ({:.2f},{:.2f})]".format(a, b, c, d, e, f) def vecBetweenBoxes(obj1: "LTComponent", obj2: "LTComponent") -> Point: """A distance function between two TextBoxes. Consider the bounding rectangle for obj1 and obj2. Return vector between 2 boxes boundaries if they don't overlap, otherwise returns vector betweeen boxes centers +------+..........+ (x1, y1) | obj1 | : +------+www+------+ : | obj2 | (x0, y0) +..........+------+ """ (x0, y0) = (min(obj1.x0, obj2.x0), min(obj1.y0, obj2.y0)) (x1, y1) = (max(obj1.x1, obj2.x1), max(obj1.y1, obj2.y1)) (ow, oh) = (x1 - x0, y1 - y0) (iw, ih) = (ow - obj1.width - obj2.width, oh - obj1.height - obj2.height) if iw < 0 and ih < 0: # if one is inside another we compute euclidean distance (xc1, yc1) = ((obj1.x0 + obj1.x1) / 2, (obj1.y0 + obj1.y1) / 2) (xc2, yc2) = ((obj2.x0 + obj2.x1) / 2, (obj2.y0 + obj2.y1) / 2) return xc1 - xc2, yc1 - yc2 else: return max(0, iw), max(0, ih) LTComponentT = TypeVar("LTComponentT", bound="LTComponent") class Plane(Generic[LTComponentT]): """A set-like data structure for objects placed on a plane. Can efficiently find objects in a certain rectangular area. It maintains two parallel lists of objects, each of which is sorted by its x or y coordinate. """ def __init__(self, bbox: Rect, gridsize: int = 50) -> None: self._seq: List[LTComponentT] = [] # preserve the object order. self._objs: Set[LTComponentT] = set() self._grid: Dict[Point, List[LTComponentT]] = {} self.gridsize = gridsize (self.x0, self.y0, self.x1, self.y1) = bbox def __repr__(self) -> str: return "<Plane objs=%r>" % list(self) def __iter__(self) -> Iterator[LTComponentT]: return (obj for obj in self._seq if obj in self._objs) def __len__(self) -> int: return len(self._objs) def __contains__(self, obj: object) -> bool: return obj in self._objs def _getrange(self, bbox: Rect) -> Iterator[Point]: (x0, y0, x1, y1) = bbox if x1 <= self.x0 or self.x1 <= x0 or y1 <= self.y0 or self.y1 <= y0: return x0 = max(self.x0, x0) y0 = max(self.y0, y0) x1 = min(self.x1, x1) y1 = min(self.y1, y1) for grid_y in drange(y0, y1, self.gridsize): for grid_x in drange(x0, x1, self.gridsize): yield (grid_x, grid_y) def extend(self, objs: Iterable[LTComponentT]) -> None: for obj in objs: self.add(obj) def add(self, obj: LTComponentT) -> None: """place an object.""" for k in self._getrange((obj.x0, obj.y0, obj.x1, obj.y1)): if k not in self._grid: r: List[LTComponentT] = [] self._grid[k] = r else: r = self._grid[k] r.append(obj) self._seq.append(obj) self._objs.add(obj) def remove(self, obj: LTComponentT) -> None: """displace an object.""" for k in self._getrange((obj.x0, obj.y0, obj.x1, obj.y1)): try: self._grid[k].remove(obj) except (KeyError, ValueError): pass self._objs.remove(obj) def find(self, bbox: Rect) -> Iterator[LTComponentT]: """finds objects that are in a certain area.""" (x0, y0, x1, y1) = bbox done = set() for k in self._getrange(bbox): if k not in self._grid: continue for obj in self._grid[k]: if obj in done: continue done.add(obj) if obj.x1 <= x0 or x1 <= obj.x0 or obj.y1 <= y0 or y1 <= obj.y0: continue yield obj ROMAN_ONES = ["i", "x", "c", "m"] ROMAN_FIVES = ["v", "l", "d"] def format_int_roman(value: int) -> str: """Format a number as lowercase Roman numerals.""" assert 0 < value < 4000 result: List[str] = [] index = 0 while value != 0: value, remainder = divmod(value, 10) if remainder == 9: result.insert(0, ROMAN_ONES[index]) result.insert(1, ROMAN_ONES[index + 1]) elif remainder == 4: result.insert(0, ROMAN_ONES[index]) result.insert(1, ROMAN_FIVES[index]) else: over_five = remainder >= 5 if over_five: result.insert(0, ROMAN_FIVES[index]) remainder -= 5 result.insert(1 if over_five else 0, ROMAN_ONES[index] * remainder) index += 1 return "".join(result) def format_int_alpha(value: int) -> str: """Format a number as lowercase letters a-z, aa-zz, etc.""" assert value > 0 result: List[str] = [] while value != 0: value, remainder = divmod(value - 1, len(string.ascii_lowercase)) result.append(string.ascii_lowercase[remainder]) result.reverse() return "".join(result)
20220429-pdfminer-jameslp310
/20220429_pdfminer_jameslp310-0.0.2-py3-none-any.whl/pdfminer/utils.py
utils.py
from typing import Any, Iterable, List, Optional, Tuple from pdfminer import settings from pdfminer.pdfparser import PDFSyntaxError from pdfminer.pdftypes import list_value, int_value, dict_value from pdfminer.utils import choplist class NumberTree: """A PDF number tree. See Section 3.8.6 of the PDF Reference. """ def __init__(self, obj: Any): self._obj = dict_value(obj) self.nums: Optional[Iterable[Any]] = None self.kids: Optional[Iterable[Any]] = None self.limits: Optional[Iterable[Any]] = None if "Nums" in self._obj: self.nums = list_value(self._obj["Nums"]) if "Kids" in self._obj: self.kids = list_value(self._obj["Kids"]) if "Limits" in self._obj: self.limits = list_value(self._obj["Limits"]) def _parse(self) -> List[Tuple[int, Any]]: items = [] if self.nums: # Leaf node for k, v in choplist(2, self.nums): items.append((int_value(k), v)) if self.kids: # Root or intermediate node for child_ref in self.kids: items += NumberTree(child_ref)._parse() return items values: List[Tuple[int, Any]] # workaround decorators unsupported by mypy @property # type: ignore[no-redef,misc] def values(self) -> List[Tuple[int, Any]]: values = self._parse() if settings.STRICT: if not all(a[0] <= b[0] for a, b in zip(values, values[1:])): raise PDFSyntaxError("Number tree elements are out of order") else: values.sort(key=lambda t: t[0]) return values
20220429-pdfminer-jameslp310
/20220429_pdfminer_jameslp310-0.0.2-py3-none-any.whl/pdfminer/data_structures.py
data_structures.py
import logging import struct import sys from io import BytesIO from typing import ( Any, BinaryIO, Dict, Iterable, Iterator, List, Mapping, Optional, Tuple, Union, cast, TYPE_CHECKING, ) from . import settings from .cmapdb import CMap from .cmapdb import IdentityUnicodeMap from .cmapdb import CMapBase from .cmapdb import CMapDB from .cmapdb import CMapParser from .cmapdb import UnicodeMap from .cmapdb import FileUnicodeMap from .encodingdb import EncodingDB from .encodingdb import name2unicode from .fontmetrics import FONT_METRICS from .pdftypes import PDFException from .pdftypes import PDFStream from .pdftypes import dict_value from .pdftypes import int_value from .pdftypes import list_value from .pdftypes import num_value from .pdftypes import resolve1, resolve_all from .pdftypes import stream_value from .psparser import KWD from .psparser import LIT from .psparser import PSEOF from .psparser import PSKeyword from .psparser import PSLiteral from .psparser import PSStackParser from .psparser import literal_name from .utils import Matrix, Point from .utils import Rect from .utils import apply_matrix_norm from .utils import choplist from .utils import nunpack if TYPE_CHECKING: from .pdfinterp import PDFResourceManager log = logging.getLogger(__name__) def get_widths(seq: Iterable[object]) -> Dict[int, float]: """Build a mapping of character widths for horizontal writing.""" widths: Dict[int, float] = {} r: List[float] = [] for v in seq: if isinstance(v, list): if r: char1 = r[-1] for (i, w) in enumerate(v): widths[cast(int, char1) + i] = w r = [] elif isinstance(v, (int, float)): # == utils.isnumber(v) r.append(v) if len(r) == 3: (char1, char2, w) = r for i in range(cast(int, char1), cast(int, char2) + 1): widths[i] = w r = [] return widths def get_widths2(seq: Iterable[object]) -> Dict[int, Tuple[float, Point]]: """Build a mapping of character widths for vertical writing.""" widths: Dict[int, Tuple[float, Point]] = {} r: List[float] = [] for v in seq: if isinstance(v, list): if r: char1 = r[-1] for (i, (w, vx, vy)) in enumerate(choplist(3, v)): widths[cast(int, char1) + i] = (w, (vx, vy)) r = [] elif isinstance(v, (int, float)): # == utils.isnumber(v) r.append(v) if len(r) == 5: (char1, char2, w, vx, vy) = r for i in range(cast(int, char1), cast(int, char2) + 1): widths[i] = (w, (vx, vy)) r = [] return widths class FontMetricsDB: @classmethod def get_metrics(cls, fontname: str) -> Tuple[Dict[str, object], Dict[str, int]]: return FONT_METRICS[fontname] # int here means that we're not extending PSStackParser with additional types. class Type1FontHeaderParser(PSStackParser[int]): KEYWORD_BEGIN = KWD(b"begin") KEYWORD_END = KWD(b"end") KEYWORD_DEF = KWD(b"def") KEYWORD_PUT = KWD(b"put") KEYWORD_DICT = KWD(b"dict") KEYWORD_ARRAY = KWD(b"array") KEYWORD_READONLY = KWD(b"readonly") KEYWORD_FOR = KWD(b"for") def __init__(self, data: BinaryIO) -> None: PSStackParser.__init__(self, data) self._cid2unicode: Dict[int, str] = {} return def get_encoding(self) -> Dict[int, str]: """Parse the font encoding. The Type1 font encoding maps character codes to character names. These character names could either be standard Adobe glyph names, or character names associated with custom CharStrings for this font. A CharString is a sequence of operations that describe how the character should be drawn. Currently, this function returns '' (empty string) for character names that are associated with a CharStrings. Reference: Adobe Systems Incorporated, Adobe Type 1 Font Format :returns mapping of character identifiers (cid's) to unicode characters """ while 1: try: (cid, name) = self.nextobject() except PSEOF: break try: self._cid2unicode[cid] = name2unicode(cast(str, name)) except KeyError as e: log.debug(str(e)) return self._cid2unicode def do_keyword(self, pos: int, token: PSKeyword) -> None: if token is self.KEYWORD_PUT: ((_, key), (_, value)) = self.pop(2) if isinstance(key, int) and isinstance(value, PSLiteral): self.add_results((key, literal_name(value))) return NIBBLES = ("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "e", "e-", None, "-") # Mapping of cmap names. Original cmap name is kept if not in the mapping. # (missing reference for why DLIdent is mapped to Identity) IDENTITY_ENCODER = { "DLIdent-H": "Identity-H", "DLIdent-V": "Identity-V", } def getdict(data: bytes) -> Dict[int, List[Union[float, int]]]: d: Dict[int, List[Union[float, int]]] = {} fp = BytesIO(data) stack: List[Union[float, int]] = [] while 1: c = fp.read(1) if not c: break b0 = ord(c) if b0 <= 21: d[b0] = stack stack = [] continue if b0 == 30: s = "" loop = True while loop: b = ord(fp.read(1)) for n in (b >> 4, b & 15): if n == 15: loop = False else: nibble = NIBBLES[n] assert nibble is not None s += nibble value = float(s) elif 32 <= b0 and b0 <= 246: value = b0 - 139 else: b1 = ord(fp.read(1)) if 247 <= b0 and b0 <= 250: value = ((b0 - 247) << 8) + b1 + 108 elif 251 <= b0 and b0 <= 254: value = -((b0 - 251) << 8) - b1 - 108 else: b2 = ord(fp.read(1)) if 128 <= b1: b1 -= 256 if b0 == 28: value = b1 << 8 | b2 else: value = b1 << 24 | b2 << 16 | struct.unpack(">H", fp.read(2))[0] stack.append(value) return d class CFFFont: STANDARD_STRINGS = ( ".notdef", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quoteright", "parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "at", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "quoteleft", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "braceleft", "bar", "braceright", "asciitilde", "exclamdown", "cent", "sterling", "fraction", "yen", "florin", "section", "currency", "quotesingle", "quotedblleft", "guillemotleft", "guilsinglleft", "guilsinglright", "fi", "fl", "endash", "dagger", "daggerdbl", "periodcentered", "paragraph", "bullet", "quotesinglbase", "quotedblbase", "quotedblright", "guillemotright", "ellipsis", "perthousand", "questiondown", "grave", "acute", "circumflex", "tilde", "macron", "breve", "dotaccent", "dieresis", "ring", "cedilla", "hungarumlaut", "ogonek", "caron", "emdash", "AE", "ordfeminine", "Lslash", "Oslash", "OE", "ordmasculine", "ae", "dotlessi", "lslash", "oslash", "oe", "germandbls", "onesuperior", "logicalnot", "mu", "trademark", "Eth", "onehalf", "plusminus", "Thorn", "onequarter", "divide", "brokenbar", "degree", "thorn", "threequarters", "twosuperior", "registered", "minus", "eth", "multiply", "threesuperior", "copyright", "Aacute", "Acircumflex", "Adieresis", "Agrave", "Aring", "Atilde", "Ccedilla", "Eacute", "Ecircumflex", "Edieresis", "Egrave", "Iacute", "Icircumflex", "Idieresis", "Igrave", "Ntilde", "Oacute", "Ocircumflex", "Odieresis", "Ograve", "Otilde", "Scaron", "Uacute", "Ucircumflex", "Udieresis", "Ugrave", "Yacute", "Ydieresis", "Zcaron", "aacute", "acircumflex", "adieresis", "agrave", "aring", "atilde", "ccedilla", "eacute", "ecircumflex", "edieresis", "egrave", "iacute", "icircumflex", "idieresis", "igrave", "ntilde", "oacute", "ocircumflex", "odieresis", "ograve", "otilde", "scaron", "uacute", "ucircumflex", "udieresis", "ugrave", "yacute", "ydieresis", "zcaron", "exclamsmall", "Hungarumlautsmall", "dollaroldstyle", "dollarsuperior", "ampersandsmall", "Acutesmall", "parenleftsuperior", "parenrightsuperior", "twodotenleader", "onedotenleader", "zerooldstyle", "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle", "fiveoldstyle", "sixoldstyle", "sevenoldstyle", "eightoldstyle", "nineoldstyle", "commasuperior", "threequartersemdash", "periodsuperior", "questionsmall", "asuperior", "bsuperior", "centsuperior", "dsuperior", "esuperior", "isuperior", "lsuperior", "msuperior", "nsuperior", "osuperior", "rsuperior", "ssuperior", "tsuperior", "ff", "ffi", "ffl", "parenleftinferior", "parenrightinferior", "Circumflexsmall", "hyphensuperior", "Gravesmall", "Asmall", "Bsmall", "Csmall", "Dsmall", "Esmall", "Fsmall", "Gsmall", "Hsmall", "Ismall", "Jsmall", "Ksmall", "Lsmall", "Msmall", "Nsmall", "Osmall", "Psmall", "Qsmall", "Rsmall", "Ssmall", "Tsmall", "Usmall", "Vsmall", "Wsmall", "Xsmall", "Ysmall", "Zsmall", "colonmonetary", "onefitted", "rupiah", "Tildesmall", "exclamdownsmall", "centoldstyle", "Lslashsmall", "Scaronsmall", "Zcaronsmall", "Dieresissmall", "Brevesmall", "Caronsmall", "Dotaccentsmall", "Macronsmall", "figuredash", "hypheninferior", "Ogoneksmall", "Ringsmall", "Cedillasmall", "questiondownsmall", "oneeighth", "threeeighths", "fiveeighths", "seveneighths", "onethird", "twothirds", "zerosuperior", "foursuperior", "fivesuperior", "sixsuperior", "sevensuperior", "eightsuperior", "ninesuperior", "zeroinferior", "oneinferior", "twoinferior", "threeinferior", "fourinferior", "fiveinferior", "sixinferior", "seveninferior", "eightinferior", "nineinferior", "centinferior", "dollarinferior", "periodinferior", "commainferior", "Agravesmall", "Aacutesmall", "Acircumflexsmall", "Atildesmall", "Adieresissmall", "Aringsmall", "AEsmall", "Ccedillasmall", "Egravesmall", "Eacutesmall", "Ecircumflexsmall", "Edieresissmall", "Igravesmall", "Iacutesmall", "Icircumflexsmall", "Idieresissmall", "Ethsmall", "Ntildesmall", "Ogravesmall", "Oacutesmall", "Ocircumflexsmall", "Otildesmall", "Odieresissmall", "OEsmall", "Oslashsmall", "Ugravesmall", "Uacutesmall", "Ucircumflexsmall", "Udieresissmall", "Yacutesmall", "Thornsmall", "Ydieresissmall", "001.000", "001.001", "001.002", "001.003", "Black", "Bold", "Book", "Light", "Medium", "Regular", "Roman", "Semibold", ) class INDEX: def __init__(self, fp: BinaryIO) -> None: self.fp = fp self.offsets: List[int] = [] (count, offsize) = struct.unpack(">HB", self.fp.read(3)) for i in range(count + 1): self.offsets.append(nunpack(self.fp.read(offsize))) self.base = self.fp.tell() - 1 self.fp.seek(self.base + self.offsets[-1]) return def __repr__(self) -> str: return "<INDEX: size=%d>" % len(self) def __len__(self) -> int: return len(self.offsets) - 1 def __getitem__(self, i: int) -> bytes: self.fp.seek(self.base + self.offsets[i]) return self.fp.read(self.offsets[i + 1] - self.offsets[i]) def __iter__(self) -> Iterator[bytes]: return iter(self[i] for i in range(len(self))) def __init__(self, name: str, fp: BinaryIO) -> None: self.name = name self.fp = fp # Header (_major, _minor, hdrsize, offsize) = struct.unpack("BBBB", self.fp.read(4)) self.fp.read(hdrsize - 4) # Name INDEX self.name_index = self.INDEX(self.fp) # Top DICT INDEX self.dict_index = self.INDEX(self.fp) # String INDEX self.string_index = self.INDEX(self.fp) # Global Subr INDEX self.subr_index = self.INDEX(self.fp) # Top DICT DATA self.top_dict = getdict(self.dict_index[0]) (charset_pos,) = self.top_dict.get(15, [0]) (encoding_pos,) = self.top_dict.get(16, [0]) (charstring_pos,) = self.top_dict.get(17, [0]) # CharStrings self.fp.seek(cast(int, charstring_pos)) self.charstring = self.INDEX(self.fp) self.nglyphs = len(self.charstring) # Encodings self.code2gid = {} self.gid2code = {} self.fp.seek(cast(int, encoding_pos)) format = self.fp.read(1) if format == b"\x00": # Format 0 (n,) = struct.unpack("B", self.fp.read(1)) for (code, gid) in enumerate(struct.unpack("B" * n, self.fp.read(n))): self.code2gid[code] = gid self.gid2code[gid] = code elif format == b"\x01": # Format 1 (n,) = struct.unpack("B", self.fp.read(1)) code = 0 for i in range(n): (first, nleft) = struct.unpack("BB", self.fp.read(2)) for gid in range(first, first + nleft + 1): self.code2gid[code] = gid self.gid2code[gid] = code code += 1 else: raise ValueError("unsupported encoding format: %r" % format) # Charsets self.name2gid = {} self.gid2name = {} self.fp.seek(cast(int, charset_pos)) format = self.fp.read(1) if format == b"\x00": # Format 0 n = self.nglyphs - 1 for (gid, sid) in enumerate( cast(Tuple[int, ...], struct.unpack(">" + "H" * n, self.fp.read(2 * n))) ): gid += 1 sidname = self.getstr(sid) self.name2gid[sidname] = gid self.gid2name[gid] = sidname elif format == b"\x01": # Format 1 (n,) = struct.unpack("B", self.fp.read(1)) sid = 0 for i in range(n): (first, nleft) = struct.unpack("BB", self.fp.read(2)) for gid in range(first, first + nleft + 1): sidname = self.getstr(sid) self.name2gid[sidname] = gid self.gid2name[gid] = sidname sid += 1 elif format == b"\x02": # Format 2 assert False, str(("Unhandled", format)) else: raise ValueError("unsupported charset format: %r" % format) return def getstr(self, sid: int) -> Union[str, bytes]: # This returns str for one of the STANDARD_STRINGS but bytes otherwise, # and appears to be a needless source of type complexity. if sid < len(self.STANDARD_STRINGS): return self.STANDARD_STRINGS[sid] return self.string_index[sid - len(self.STANDARD_STRINGS)] class TrueTypeFont: class CMapNotFound(Exception): pass def __init__(self, name: str, fp: BinaryIO) -> None: self.name = name self.fp = fp self.tables: Dict[bytes, Tuple[int, int]] = {} self.fonttype = fp.read(4) try: (ntables, _1, _2, _3) = cast( Tuple[int, int, int, int], struct.unpack(">HHHH", fp.read(8)) ) for _ in range(ntables): (name_bytes, tsum, offset, length) = cast( Tuple[bytes, int, int, int], struct.unpack(">4sLLL", fp.read(16)) ) self.tables[name_bytes] = (offset, length) except struct.error: # Do not fail if there are not enough bytes to read. Even for # corrupted PDFs we would like to get as much information as # possible, so continue. pass return def create_unicode_map(self) -> FileUnicodeMap: if b"cmap" not in self.tables: raise TrueTypeFont.CMapNotFound (base_offset, length) = self.tables[b"cmap"] fp = self.fp fp.seek(base_offset) (version, nsubtables) = cast(Tuple[int, int], struct.unpack(">HH", fp.read(4))) subtables: List[Tuple[int, int, int]] = [] for i in range(nsubtables): subtables.append( cast(Tuple[int, int, int], struct.unpack(">HHL", fp.read(8))) ) char2gid: Dict[int, int] = {} # Only supports subtable type 0, 2 and 4. for (_1, _2, st_offset) in subtables: fp.seek(base_offset + st_offset) (fmttype, fmtlen, fmtlang) = cast( Tuple[int, int, int], struct.unpack(">HHH", fp.read(6)) ) if fmttype == 0: char2gid.update( enumerate( cast(Tuple[int, ...], struct.unpack(">256B", fp.read(256))) ) ) elif fmttype == 2: subheaderkeys = cast( Tuple[int, ...], struct.unpack(">256H", fp.read(512)) ) firstbytes = [0] * 8192 for (i, k) in enumerate(subheaderkeys): firstbytes[k // 8] = i nhdrs = max(subheaderkeys) // 8 + 1 hdrs: List[Tuple[int, int, int, int, int]] = [] for i in range(nhdrs): (firstcode, entcount, delta, offset) = cast( Tuple[int, int, int, int], struct.unpack(">HHhH", fp.read(8)) ) hdrs.append((i, firstcode, entcount, delta, fp.tell() - 2 + offset)) for (i, firstcode, entcount, delta, pos) in hdrs: if not entcount: continue first = firstcode + (firstbytes[i] << 8) fp.seek(pos) for c in range(entcount): gid = cast(Tuple[int], struct.unpack(">H", fp.read(2)))[0] if gid: gid += delta char2gid[first + c] = gid elif fmttype == 4: (segcount, _1, _2, _3) = cast( Tuple[int, int, int, int], struct.unpack(">HHHH", fp.read(8)) ) segcount //= 2 ecs = cast( Tuple[int, ...], struct.unpack(">%dH" % segcount, fp.read(2 * segcount)), ) fp.read(2) scs = cast( Tuple[int, ...], struct.unpack(">%dH" % segcount, fp.read(2 * segcount)), ) idds = cast( Tuple[int, ...], struct.unpack(">%dh" % segcount, fp.read(2 * segcount)), ) pos = fp.tell() idrs = cast( Tuple[int, ...], struct.unpack(">%dH" % segcount, fp.read(2 * segcount)), ) for (ec, sc, idd, idr) in zip(ecs, scs, idds, idrs): if idr: fp.seek(pos + idr) for c in range(sc, ec + 1): b = cast(Tuple[int], struct.unpack(">H", fp.read(2)))[0] char2gid[c] = (b + idd) & 0xFFFF else: for c in range(sc, ec + 1): char2gid[c] = (c + idd) & 0xFFFF else: assert False, str(("Unhandled", fmttype)) # create unicode map unicode_map = FileUnicodeMap() for (char, gid) in char2gid.items(): unicode_map.add_cid2unichr(gid, char) return unicode_map class PDFFontError(PDFException): pass class PDFUnicodeNotDefined(PDFFontError): pass LITERAL_STANDARD_ENCODING = LIT("StandardEncoding") LITERAL_TYPE1C = LIT("Type1C") # Font widths are maintained in a dict type that maps from *either* unicode # chars or integer character IDs. FontWidthDict = Union[Dict[int, float], Dict[str, float]] class PDFFont: def __init__( self, descriptor: Mapping[str, Any], widths: FontWidthDict, default_width: Optional[float] = None, ) -> None: self.descriptor = descriptor self.widths: FontWidthDict = resolve_all(widths) self.fontname = resolve1(descriptor.get("FontName", "unknown")) if isinstance(self.fontname, PSLiteral): self.fontname = literal_name(self.fontname) self.flags = int_value(descriptor.get("Flags", 0)) self.ascent = num_value(descriptor.get("Ascent", 0)) self.descent = num_value(descriptor.get("Descent", 0)) self.italic_angle = num_value(descriptor.get("ItalicAngle", 0)) if default_width is None: self.default_width = num_value(descriptor.get("MissingWidth", 0)) else: self.default_width = default_width self.leading = num_value(descriptor.get("Leading", 0)) self.bbox = cast( Rect, list_value(resolve_all(descriptor.get("FontBBox", (0, 0, 0, 0)))) ) self.hscale = self.vscale = 0.001 # PDF RM 9.8.1 specifies /Descent should always be a negative number. # PScript5.dll seems to produce Descent with a positive number, but # text analysis will be wrong if this is taken as correct. So force # descent to negative. if self.descent > 0: self.descent = -self.descent return def __repr__(self) -> str: return "<PDFFont>" def is_vertical(self) -> bool: return False def is_multibyte(self) -> bool: return False def decode(self, bytes: bytes) -> Iterable[int]: return bytearray(bytes) # map(ord, bytes) def get_ascent(self) -> float: """Ascent above the baseline, in text space units""" return self.ascent * self.vscale def get_descent(self) -> float: """Descent below the baseline, in text space units; always negative""" return self.descent * self.vscale def get_width(self) -> float: w = self.bbox[2] - self.bbox[0] if w == 0: w = -self.default_width return w * self.hscale def get_height(self) -> float: h = self.bbox[3] - self.bbox[1] if h == 0: h = self.ascent - self.descent return h * self.vscale def char_width(self, cid: int) -> float: # Because character widths may be mapping either IDs or strings, # we try to lookup the character ID first, then its str equivalent. try: return cast(Dict[int, float], self.widths)[cid] * self.hscale except KeyError: str_widths = cast(Dict[str, float], self.widths) try: return str_widths[self.to_unichr(cid)] * self.hscale except (KeyError, PDFUnicodeNotDefined): return self.default_width * self.hscale def char_disp(self, cid: int) -> Union[float, Tuple[Optional[float], float]]: "Returns an integer for horizontal fonts, a tuple for vertical fonts." return 0 def string_width(self, s: bytes) -> float: return sum(self.char_width(cid) for cid in self.decode(s)) def to_unichr(self, cid: int) -> str: raise NotImplementedError class PDFSimpleFont(PDFFont): def __init__( self, descriptor: Mapping[str, Any], widths: FontWidthDict, spec: Mapping[str, Any], ) -> None: # Font encoding is specified either by a name of # built-in encoding or a dictionary that describes # the differences. if "Encoding" in spec: encoding = resolve1(spec["Encoding"]) else: encoding = LITERAL_STANDARD_ENCODING if isinstance(encoding, dict): name = literal_name(encoding.get("BaseEncoding", LITERAL_STANDARD_ENCODING)) diff = list_value(encoding.get("Differences", [])) self.cid2unicode = EncodingDB.get_encoding(name, diff) else: self.cid2unicode = EncodingDB.get_encoding(literal_name(encoding)) self.unicode_map: Optional[UnicodeMap] = None if "ToUnicode" in spec: strm = stream_value(spec["ToUnicode"]) self.unicode_map = FileUnicodeMap() CMapParser(self.unicode_map, BytesIO(strm.get_data())).run() PDFFont.__init__(self, descriptor, widths) return def to_unichr(self, cid: int) -> str: if self.unicode_map: try: return self.unicode_map.get_unichr(cid) except KeyError: pass try: return self.cid2unicode[cid] except KeyError: raise PDFUnicodeNotDefined(None, cid) class PDFType1Font(PDFSimpleFont): def __init__(self, rsrcmgr: "PDFResourceManager", spec: Mapping[str, Any]) -> None: try: self.basefont = literal_name(spec["BaseFont"]) except KeyError: if settings.STRICT: raise PDFFontError("BaseFont is missing") self.basefont = "unknown" widths: FontWidthDict try: (descriptor, int_widths) = FontMetricsDB.get_metrics(self.basefont) widths = cast(Dict[str, float], int_widths) # implicit int->float except KeyError: descriptor = dict_value(spec.get("FontDescriptor", {})) firstchar = int_value(spec.get("FirstChar", 0)) # lastchar = int_value(spec.get('LastChar', 255)) width_list = list_value(spec.get("Widths", [0] * 256)) widths = {i + firstchar: w for (i, w) in enumerate(width_list)} PDFSimpleFont.__init__(self, descriptor, widths, spec) if "Encoding" not in spec and "FontFile" in descriptor: # try to recover the missing encoding info from the font file. self.fontfile = stream_value(descriptor.get("FontFile")) length1 = int_value(self.fontfile["Length1"]) data = self.fontfile.get_data()[:length1] parser = Type1FontHeaderParser(BytesIO(data)) self.cid2unicode = parser.get_encoding() return def __repr__(self) -> str: return "<PDFType1Font: basefont=%r>" % self.basefont class PDFTrueTypeFont(PDFType1Font): def __repr__(self) -> str: return "<PDFTrueTypeFont: basefont=%r>" % self.basefont class PDFType3Font(PDFSimpleFont): def __init__(self, rsrcmgr: "PDFResourceManager", spec: Mapping[str, Any]) -> None: firstchar = int_value(spec.get("FirstChar", 0)) # lastchar = int_value(spec.get('LastChar', 0)) width_list = list_value(spec.get("Widths", [0] * 256)) widths = {i + firstchar: w for (i, w) in enumerate(width_list)} if "FontDescriptor" in spec: descriptor = dict_value(spec["FontDescriptor"]) else: descriptor = {"Ascent": 0, "Descent": 0, "FontBBox": spec["FontBBox"]} PDFSimpleFont.__init__(self, descriptor, widths, spec) self.matrix = cast(Matrix, tuple(list_value(spec.get("FontMatrix")))) (_, self.descent, _, self.ascent) = self.bbox (self.hscale, self.vscale) = apply_matrix_norm(self.matrix, (1, 1)) return def __repr__(self) -> str: return "<PDFType3Font>" class PDFCIDFont(PDFFont): default_disp: Union[float, Tuple[Optional[float], float]] def __init__( self, rsrcmgr: "PDFResourceManager", spec: Mapping[str, Any], strict: bool = settings.STRICT, ) -> None: try: self.basefont = literal_name(spec["BaseFont"]) except KeyError: if strict: raise PDFFontError("BaseFont is missing") self.basefont = "unknown" self.cidsysteminfo = dict_value(spec.get("CIDSystemInfo", {})) cid_registry = resolve1(self.cidsysteminfo.get("Registry", b"unknown")).decode( "latin1" ) cid_ordering = resolve1(self.cidsysteminfo.get("Ordering", b"unknown")).decode( "latin1" ) self.cidcoding = "{}-{}".format(cid_registry, cid_ordering) self.cmap: CMapBase = self.get_cmap_from_spec(spec, strict) try: descriptor = dict_value(spec["FontDescriptor"]) except KeyError: if strict: raise PDFFontError("FontDescriptor is missing") descriptor = {} ttf = None if "FontFile2" in descriptor: self.fontfile = stream_value(descriptor.get("FontFile2")) ttf = TrueTypeFont(self.basefont, BytesIO(self.fontfile.get_data())) self.unicode_map: Optional[UnicodeMap] = None if "ToUnicode" in spec: if isinstance(spec["ToUnicode"], PDFStream): strm = stream_value(spec["ToUnicode"]) self.unicode_map = FileUnicodeMap() CMapParser(self.unicode_map, BytesIO(strm.get_data())).run() else: cmap_name = literal_name(spec["ToUnicode"]) encoding = literal_name(spec["Encoding"]) if ( "Identity" in cid_ordering or "Identity" in cmap_name or "Identity" in encoding ): self.unicode_map = IdentityUnicodeMap() elif self.cidcoding in ("Adobe-Identity", "Adobe-UCS"): if ttf: try: self.unicode_map = ttf.create_unicode_map() except TrueTypeFont.CMapNotFound: pass else: try: self.unicode_map = CMapDB.get_unicode_map( self.cidcoding, self.cmap.is_vertical() ) except CMapDB.CMapNotFound: pass self.vertical = self.cmap.is_vertical() if self.vertical: # writing mode: vertical widths2 = get_widths2(list_value(spec.get("W2", []))) self.disps = {cid: (vx, vy) for (cid, (_, (vx, vy))) in widths2.items()} (vy, w) = resolve1(spec.get("DW2", [880, -1000])) self.default_disp = (None, vy) widths = {cid: w for (cid, (w, _)) in widths2.items()} default_width = w else: # writing mode: horizontal self.disps = {} self.default_disp = 0 widths = get_widths(list_value(spec.get("W", []))) default_width = spec.get("DW", 1000) PDFFont.__init__(self, descriptor, widths, default_width=default_width) return def get_cmap_from_spec(self, spec: Mapping[str, Any], strict: bool) -> CMapBase: """Get cmap from font specification For certain PDFs, Encoding Type isn't mentioned as an attribute of Encoding but as an attribute of CMapName, where CMapName is an attribute of spec['Encoding']. The horizontal/vertical modes are mentioned with different name such as 'DLIdent-H/V','OneByteIdentityH/V','Identity-H/V'. """ cmap_name = self._get_cmap_name(spec, strict) try: return CMapDB.get_cmap(cmap_name) except CMapDB.CMapNotFound as e: if strict: raise PDFFontError(e) return CMap() @staticmethod def _get_cmap_name(spec: Mapping[str, Any], strict: bool) -> str: """Get cmap name from font specification""" cmap_name = "unknown" # default value try: spec_encoding = spec["Encoding"] if hasattr(spec_encoding, "name"): cmap_name = literal_name(spec["Encoding"]) else: cmap_name = literal_name(spec_encoding["CMapName"]) except KeyError: if strict: raise PDFFontError("Encoding is unspecified") if type(cmap_name) is PDFStream: # type: ignore[comparison-overlap] cmap_name_stream: PDFStream = cast(PDFStream, cmap_name) if "CMapName" in cmap_name_stream: cmap_name = cmap_name_stream.get("CMapName").name else: if strict: raise PDFFontError("CMapName unspecified for encoding") return IDENTITY_ENCODER.get(cmap_name, cmap_name) def __repr__(self) -> str: return "<PDFCIDFont: basefont={!r}, cidcoding={!r}>".format( self.basefont, self.cidcoding ) def is_vertical(self) -> bool: return self.vertical def is_multibyte(self) -> bool: return True def decode(self, bytes: bytes) -> Iterable[int]: return self.cmap.decode(bytes) def char_disp(self, cid: int) -> Union[float, Tuple[Optional[float], float]]: "Returns an integer for horizontal fonts, a tuple for vertical fonts." return self.disps.get(cid, self.default_disp) def to_unichr(self, cid: int) -> str: try: if not self.unicode_map: raise KeyError(cid) return self.unicode_map.get_unichr(cid) except KeyError: raise PDFUnicodeNotDefined(self.cidcoding, cid) def main(argv: List[str]) -> None: for fname in argv[1:]: fp = open(fname, "rb") font = CFFFont(fname, fp) print(font) fp.close() return if __name__ == "__main__": main(sys.argv)
20220429-pdfminer-jameslp310
/20220429_pdfminer_jameslp310-0.0.2-py3-none-any.whl/pdfminer/pdffont.py
pdffont.py
""" Adobe character mapping (CMap) support. CMaps provide the mapping between character codes and Unicode code-points to character ids (CIDs). More information is available on the Adobe website: http://opensource.adobe.com/wiki/display/cmap/CMap+Resources """ import gzip import logging import os import os.path import pickle as pickle import struct import sys from typing import ( Any, BinaryIO, Dict, Iterable, Iterator, List, MutableMapping, Optional, TextIO, Tuple, Union, cast, Set, ) from .encodingdb import name2unicode from .psparser import KWD from .psparser import PSEOF from .psparser import PSKeyword from .psparser import PSLiteral from .psparser import PSStackParser from .psparser import PSSyntaxError from .psparser import literal_name from .utils import choplist from .utils import nunpack log = logging.getLogger(__name__) class CMapError(Exception): pass class CMapBase: debug = 0 def __init__(self, **kwargs: object) -> None: self.attrs: MutableMapping[str, object] = kwargs.copy() def is_vertical(self) -> bool: return self.attrs.get("WMode", 0) != 0 def set_attr(self, k: str, v: object) -> None: self.attrs[k] = v def add_code2cid(self, code: str, cid: int) -> None: pass def add_cid2unichr(self, cid: int, code: Union[PSLiteral, bytes, int]) -> None: pass def use_cmap(self, cmap: "CMapBase") -> None: pass def decode(self, code: bytes) -> Iterable[int]: raise NotImplementedError class CMap(CMapBase): def __init__(self, **kwargs: Union[str, int]) -> None: CMapBase.__init__(self, **kwargs) self.code2cid: Dict[int, object] = {} def __repr__(self) -> str: return "<CMap: %s>" % self.attrs.get("CMapName") def use_cmap(self, cmap: CMapBase) -> None: assert isinstance(cmap, CMap), str(type(cmap)) def copy(dst: Dict[int, object], src: Dict[int, object]) -> None: for (k, v) in src.items(): if isinstance(v, dict): d: Dict[int, object] = {} dst[k] = d copy(d, v) else: dst[k] = v copy(self.code2cid, cmap.code2cid) def decode(self, code: bytes) -> Iterator[int]: log.debug("decode: %r, %r", self, code) d = self.code2cid for i in iter(code): if i in d: x = d[i] if isinstance(x, int): yield x d = self.code2cid else: d = cast(Dict[int, object], x) else: d = self.code2cid def dump( self, out: TextIO = sys.stdout, code2cid: Optional[Dict[int, object]] = None, code: Tuple[int, ...] = (), ) -> None: if code2cid is None: code2cid = self.code2cid code = () for (k, v) in sorted(code2cid.items()): c = code + (k,) if isinstance(v, int): out.write("code %r = cid %d\n" % (c, v)) else: self.dump(out=out, code2cid=cast(Dict[int, object], v), code=c) class IdentityCMap(CMapBase): def decode(self, code: bytes) -> Tuple[int, ...]: n = len(code) // 2 if n: return struct.unpack(">%dH" % n, code) else: return () class IdentityCMapByte(IdentityCMap): def decode(self, code: bytes) -> Tuple[int, ...]: n = len(code) if n: return struct.unpack(">%dB" % n, code) else: return () class UnicodeMap(CMapBase): def __init__(self, **kwargs: Union[str, int]) -> None: CMapBase.__init__(self, **kwargs) self.cid2unichr: Dict[int, str] = {} def __repr__(self) -> str: return "<UnicodeMap: %s>" % self.attrs.get("CMapName") def get_unichr(self, cid: int) -> str: log.debug("get_unichr: %r, %r", self, cid) return self.cid2unichr[cid] def dump(self, out: TextIO = sys.stdout) -> None: for (k, v) in sorted(self.cid2unichr.items()): out.write("cid %d = unicode %r\n" % (k, v)) class IdentityUnicodeMap(UnicodeMap): def get_unichr(self, cid: int) -> str: """Interpret character id as unicode codepoint""" log.debug("get_unichr: %r, %r", self, cid) return chr(cid) class FileCMap(CMap): def add_code2cid(self, code: str, cid: int) -> None: assert isinstance(code, str) and isinstance(cid, int), str( (type(code), type(cid)) ) d = self.code2cid for c in code[:-1]: ci = ord(c) if ci in d: d = cast(Dict[int, object], d[ci]) else: t: Dict[int, object] = {} d[ci] = t d = t ci = ord(code[-1]) d[ci] = cid class FileUnicodeMap(UnicodeMap): def add_cid2unichr(self, cid: int, code: Union[PSLiteral, bytes, int]) -> None: assert isinstance(cid, int), str(type(cid)) if isinstance(code, PSLiteral): # Interpret as an Adobe glyph name. assert isinstance(code.name, str) self.cid2unichr[cid] = name2unicode(code.name) elif isinstance(code, bytes): # Interpret as UTF-16BE. self.cid2unichr[cid] = code.decode("UTF-16BE", "ignore") elif isinstance(code, int): self.cid2unichr[cid] = chr(code) else: raise TypeError(code) class PyCMap(CMap): def __init__(self, name: str, module: Any) -> None: super().__init__(CMapName=name) self.code2cid = module.CODE2CID if module.IS_VERTICAL: self.attrs["WMode"] = 1 class PyUnicodeMap(UnicodeMap): def __init__(self, name: str, module: Any, vertical: bool) -> None: super().__init__(CMapName=name) if vertical: self.cid2unichr = module.CID2UNICHR_V self.attrs["WMode"] = 1 else: self.cid2unichr = module.CID2UNICHR_H class CMapDB: _cmap_cache: Dict[str, PyCMap] = {} _umap_cache: Dict[str, List[PyUnicodeMap]] = {} class CMapNotFound(CMapError): pass @classmethod def _load_data(cls, name: str) -> Any: name = name.replace("\0", "") filename = "%s.pickle.gz" % name log.debug("loading: %r", name) cmap_paths = ( os.environ.get("CMAP_PATH", "/usr/share/pdfminer/"), os.path.join(os.path.dirname(__file__), "cmap"), ) for directory in cmap_paths: path = os.path.join(directory, filename) if os.path.exists(path): gzfile = gzip.open(path) try: return type(str(name), (), pickle.loads(gzfile.read())) finally: gzfile.close() else: raise CMapDB.CMapNotFound(name) @classmethod def get_cmap(cls, name: str) -> CMapBase: if name == "Identity-H": return IdentityCMap(WMode=0) elif name == "Identity-V": return IdentityCMap(WMode=1) elif name == "OneByteIdentityH": return IdentityCMapByte(WMode=0) elif name == "OneByteIdentityV": return IdentityCMapByte(WMode=1) try: return cls._cmap_cache[name] except KeyError: pass data = cls._load_data(name) cls._cmap_cache[name] = cmap = PyCMap(name, data) return cmap @classmethod def get_unicode_map(cls, name: str, vertical: bool = False) -> UnicodeMap: try: return cls._umap_cache[name][vertical] except KeyError: pass data = cls._load_data("to-unicode-%s" % name) cls._umap_cache[name] = [PyUnicodeMap(name, data, v) for v in (False, True)] return cls._umap_cache[name][vertical] class CMapParser(PSStackParser[PSKeyword]): def __init__(self, cmap: CMapBase, fp: BinaryIO) -> None: PSStackParser.__init__(self, fp) self.cmap = cmap # some ToUnicode maps don't have "begincmap" keyword. self._in_cmap = True self._warnings: Set[str] = set() return def run(self) -> None: try: self.nextobject() except PSEOF: pass return KEYWORD_BEGINCMAP = KWD(b"begincmap") KEYWORD_ENDCMAP = KWD(b"endcmap") KEYWORD_USECMAP = KWD(b"usecmap") KEYWORD_DEF = KWD(b"def") KEYWORD_BEGINCODESPACERANGE = KWD(b"begincodespacerange") KEYWORD_ENDCODESPACERANGE = KWD(b"endcodespacerange") KEYWORD_BEGINCIDRANGE = KWD(b"begincidrange") KEYWORD_ENDCIDRANGE = KWD(b"endcidrange") KEYWORD_BEGINCIDCHAR = KWD(b"begincidchar") KEYWORD_ENDCIDCHAR = KWD(b"endcidchar") KEYWORD_BEGINBFRANGE = KWD(b"beginbfrange") KEYWORD_ENDBFRANGE = KWD(b"endbfrange") KEYWORD_BEGINBFCHAR = KWD(b"beginbfchar") KEYWORD_ENDBFCHAR = KWD(b"endbfchar") KEYWORD_BEGINNOTDEFRANGE = KWD(b"beginnotdefrange") KEYWORD_ENDNOTDEFRANGE = KWD(b"endnotdefrange") def do_keyword(self, pos: int, token: PSKeyword) -> None: """ToUnicode CMaps See Section 5.9.2 - ToUnicode CMaps of the PDF Reference. """ if token is self.KEYWORD_BEGINCMAP: self._in_cmap = True self.popall() return elif token is self.KEYWORD_ENDCMAP: self._in_cmap = False return if not self._in_cmap: return if token is self.KEYWORD_DEF: try: ((_, k), (_, v)) = self.pop(2) self.cmap.set_attr(literal_name(k), v) except PSSyntaxError: pass return if token is self.KEYWORD_USECMAP: try: ((_, cmapname),) = self.pop(1) self.cmap.use_cmap(CMapDB.get_cmap(literal_name(cmapname))) except PSSyntaxError: pass except CMapDB.CMapNotFound: pass return if token is self.KEYWORD_BEGINCODESPACERANGE: self.popall() return if token is self.KEYWORD_ENDCODESPACERANGE: self.popall() return if token is self.KEYWORD_BEGINCIDRANGE: self.popall() return if token is self.KEYWORD_ENDCIDRANGE: objs = [obj for (__, obj) in self.popall()] for (start_byte, end_byte, cid) in choplist(3, objs): if not isinstance(start_byte, bytes): self._warn_once("The start object of begincidrange is not a byte.") continue if not isinstance(end_byte, bytes): self._warn_once("The end object of begincidrange is not a byte.") continue if not isinstance(cid, int): self._warn_once("The cid object of begincidrange is not a byte.") continue if len(start_byte) != len(end_byte): self._warn_once( "The start and end byte of begincidrange have " "different lengths." ) continue start_prefix = start_byte[:-4] end_prefix = end_byte[:-4] if start_prefix != end_prefix: self._warn_once( "The prefix of the start and end byte of " "begincidrange are not the same." ) continue svar = start_byte[-4:] evar = end_byte[-4:] start = nunpack(svar) end = nunpack(evar) vlen = len(svar) for i in range(end - start + 1): x = start_prefix + struct.pack(">L", start + i)[-vlen:] self.cmap.add_cid2unichr(cid + i, x) return if token is self.KEYWORD_BEGINCIDCHAR: self.popall() return if token is self.KEYWORD_ENDCIDCHAR: objs = [obj for (__, obj) in self.popall()] for (cid, code) in choplist(2, objs): if isinstance(code, bytes) and isinstance(cid, int): self.cmap.add_cid2unichr(cid, code) return if token is self.KEYWORD_BEGINBFRANGE: self.popall() return if token is self.KEYWORD_ENDBFRANGE: objs = [obj for (__, obj) in self.popall()] for (start_byte, end_byte, code) in choplist(3, objs): if not isinstance(start_byte, bytes): self._warn_once("The start object is not a byte.") continue if not isinstance(end_byte, bytes): self._warn_once("The end object is not a byte.") continue if len(start_byte) != len(end_byte): self._warn_once("The start and end byte have different lengths.") continue start = nunpack(start_byte) end = nunpack(end_byte) if isinstance(code, list): if len(code) != end - start + 1: self._warn_once( "The difference between the start and end " "offsets does not match the code length." ) for cid, unicode_value in zip(range(start, end + 1), code): self.cmap.add_cid2unichr(cid, unicode_value) else: assert isinstance(code, bytes) var = code[-4:] base = nunpack(var) prefix = code[:-4] vlen = len(var) for i in range(end - start + 1): x = prefix + struct.pack(">L", base + i)[-vlen:] self.cmap.add_cid2unichr(start + i, x) return if token is self.KEYWORD_BEGINBFCHAR: self.popall() return if token is self.KEYWORD_ENDBFCHAR: objs = [obj for (__, obj) in self.popall()] for (cid, code) in choplist(2, objs): if isinstance(cid, bytes) and isinstance(code, bytes): self.cmap.add_cid2unichr(nunpack(cid), code) return if token is self.KEYWORD_BEGINNOTDEFRANGE: self.popall() return if token is self.KEYWORD_ENDNOTDEFRANGE: self.popall() return self.push((pos, token)) def _warn_once(self, msg: str) -> None: """Warn once for each unique message""" if msg not in self._warnings: self._warnings.add(msg) base_msg = ( "Ignoring (part of) ToUnicode map because the PDF data " "does not conform to the format. This could result in " "(cid) values in the output. " ) log.warning(base_msg + msg) def main(argv: List[str]) -> None: args = argv[1:] for fname in args: fp = open(fname, "rb") cmap = FileUnicodeMap() CMapParser(cmap, fp).run() fp.close() cmap.dump() return if __name__ == "__main__": main(sys.argv)
20220429-pdfminer-jameslp310
/20220429_pdfminer_jameslp310-0.0.2-py3-none-any.whl/pdfminer/cmapdb.py
cmapdb.py
from typing import ( BinaryIO, Iterable, List, Optional, Sequence, TYPE_CHECKING, Union, cast, ) from pdfminer.psparser import PSLiteral from . import utils from .pdfcolor import PDFColorSpace from .pdffont import PDFFont from .pdffont import PDFUnicodeNotDefined from .pdfpage import PDFPage from .pdftypes import PDFStream from .utils import Matrix, Point, Rect, PathSegment if TYPE_CHECKING: from .pdfinterp import PDFGraphicState from .pdfinterp import PDFResourceManager from .pdfinterp import PDFTextState from .pdfinterp import PDFStackT PDFTextSeq = Iterable[Union[int, float, bytes]] class PDFDevice: """Translate the output of PDFPageInterpreter to the output that is needed""" def __init__(self, rsrcmgr: "PDFResourceManager") -> None: self.rsrcmgr = rsrcmgr self.ctm: Optional[Matrix] = None def __repr__(self) -> str: return "<PDFDevice>" def __enter__(self) -> "PDFDevice": return self def __exit__(self, exc_type: object, exc_val: object, exc_tb: object) -> None: self.close() def close(self) -> None: pass def set_ctm(self, ctm: Matrix) -> None: self.ctm = ctm def begin_tag(self, tag: PSLiteral, props: Optional["PDFStackT"] = None) -> None: pass def end_tag(self) -> None: pass def do_tag(self, tag: PSLiteral, props: Optional["PDFStackT"] = None) -> None: pass def begin_page(self, page: PDFPage, ctm: Matrix) -> None: pass def end_page(self, page: PDFPage) -> None: pass def begin_figure(self, name: str, bbox: Rect, matrix: Matrix) -> None: pass def end_figure(self, name: str) -> None: pass def paint_path( self, graphicstate: "PDFGraphicState", stroke: bool, fill: bool, evenodd: bool, path: Sequence[PathSegment], ) -> None: pass def render_image(self, name: str, stream: PDFStream) -> None: pass def render_string( self, textstate: "PDFTextState", seq: PDFTextSeq, ncs: PDFColorSpace, graphicstate: "PDFGraphicState", ) -> None: pass class PDFTextDevice(PDFDevice): def render_string( self, textstate: "PDFTextState", seq: PDFTextSeq, ncs: PDFColorSpace, graphicstate: "PDFGraphicState", ) -> None: assert self.ctm is not None matrix = utils.mult_matrix(textstate.matrix, self.ctm) font = textstate.font fontsize = textstate.fontsize scaling = textstate.scaling * 0.01 charspace = textstate.charspace * scaling wordspace = textstate.wordspace * scaling rise = textstate.rise assert font is not None if font.is_multibyte(): wordspace = 0 dxscale = 0.001 * fontsize * scaling if font.is_vertical(): textstate.linematrix = self.render_string_vertical( seq, matrix, textstate.linematrix, font, fontsize, scaling, charspace, wordspace, rise, dxscale, ncs, graphicstate, ) else: textstate.linematrix = self.render_string_horizontal( seq, matrix, textstate.linematrix, font, fontsize, scaling, charspace, wordspace, rise, dxscale, ncs, graphicstate, ) def render_string_horizontal( self, seq: PDFTextSeq, matrix: Matrix, pos: Point, font: PDFFont, fontsize: float, scaling: float, charspace: float, wordspace: float, rise: float, dxscale: float, ncs: PDFColorSpace, graphicstate: "PDFGraphicState", ) -> Point: (x, y) = pos needcharspace = False for obj in seq: if isinstance(obj, (int, float)): x -= obj * dxscale needcharspace = True else: for cid in font.decode(obj): if needcharspace: x += charspace x += self.render_char( utils.translate_matrix(matrix, (x, y)), font, fontsize, scaling, rise, cid, ncs, graphicstate, ) if cid == 32 and wordspace: x += wordspace needcharspace = True return (x, y) def render_string_vertical( self, seq: PDFTextSeq, matrix: Matrix, pos: Point, font: PDFFont, fontsize: float, scaling: float, charspace: float, wordspace: float, rise: float, dxscale: float, ncs: PDFColorSpace, graphicstate: "PDFGraphicState", ) -> Point: (x, y) = pos needcharspace = False for obj in seq: if isinstance(obj, (int, float)): y -= obj * dxscale needcharspace = True else: for cid in font.decode(obj): if needcharspace: y += charspace y += self.render_char( utils.translate_matrix(matrix, (x, y)), font, fontsize, scaling, rise, cid, ncs, graphicstate, ) if cid == 32 and wordspace: y += wordspace needcharspace = True return (x, y) def render_char( self, matrix: Matrix, font: PDFFont, fontsize: float, scaling: float, rise: float, cid: int, ncs: PDFColorSpace, graphicstate: "PDFGraphicState", ) -> float: return 0 class TagExtractor(PDFDevice): def __init__( self, rsrcmgr: "PDFResourceManager", outfp: BinaryIO, codec: str = "utf-8" ) -> None: PDFDevice.__init__(self, rsrcmgr) self.outfp = outfp self.codec = codec self.pageno = 0 self._stack: List[PSLiteral] = [] def render_string( self, textstate: "PDFTextState", seq: PDFTextSeq, ncs: PDFColorSpace, graphicstate: "PDFGraphicState", ) -> None: font = textstate.font assert font is not None text = "" for obj in seq: if isinstance(obj, str): obj = utils.make_compat_bytes(obj) if not isinstance(obj, bytes): continue chars = font.decode(obj) for cid in chars: try: char = font.to_unichr(cid) text += char except PDFUnicodeNotDefined: pass self._write(utils.enc(text)) def begin_page(self, page: PDFPage, ctm: Matrix) -> None: output = '<page id="%s" bbox="%s" rotate="%d">' % ( self.pageno, utils.bbox2str(page.mediabox), page.rotate, ) self._write(output) return def end_page(self, page: PDFPage) -> None: self._write("</page>\n") self.pageno += 1 return def begin_tag(self, tag: PSLiteral, props: Optional["PDFStackT"] = None) -> None: s = "" if isinstance(props, dict): s = "".join( [ ' {}="{}"'.format(utils.enc(k), utils.make_compat_str(v)) for (k, v) in sorted(props.items()) ] ) out_s = "<{}{}>".format(utils.enc(cast(str, tag.name)), s) self._write(out_s) self._stack.append(tag) return def end_tag(self) -> None: assert self._stack, str(self.pageno) tag = self._stack.pop(-1) out_s = "</%s>" % utils.enc(cast(str, tag.name)) self._write(out_s) return def do_tag(self, tag: PSLiteral, props: Optional["PDFStackT"] = None) -> None: self.begin_tag(tag, props) self._stack.pop(-1) return def _write(self, s: str) -> None: self.outfp.write(s.encode(self.codec))
20220429-pdfminer-jameslp310
/20220429_pdfminer_jameslp310-0.0.2-py3-none-any.whl/pdfminer/pdfdevice.py
pdfdevice.py
import os import os.path import struct from io import BytesIO from typing import BinaryIO, Tuple try: from typing import Literal except ImportError: from typing_extensions import Literal # type: ignore[misc] from .jbig2 import JBIG2StreamReader, JBIG2StreamWriter from .layout import LTImage from .pdfcolor import LITERAL_DEVICE_CMYK from .pdfcolor import LITERAL_DEVICE_GRAY from .pdfcolor import LITERAL_DEVICE_RGB from .pdftypes import ( LITERALS_DCT_DECODE, LITERALS_JBIG2_DECODE, LITERALS_JPX_DECODE, LITERALS_FLATE_DECODE, ) PIL_ERROR_MESSAGE = ( "Could not import Pillow. This dependency of pdfminer.six is not " "installed by default. You need it to to save jpg images to a file. Install it " "with `pip install 'pdfminer.six[image]'`" ) def align32(x: int) -> int: return ((x + 3) // 4) * 4 class BMPWriter: def __init__(self, fp: BinaryIO, bits: int, width: int, height: int) -> None: self.fp = fp self.bits = bits self.width = width self.height = height if bits == 1: ncols = 2 elif bits == 8: ncols = 256 elif bits == 24: ncols = 0 else: raise ValueError(bits) self.linesize = align32((self.width * self.bits + 7) // 8) self.datasize = self.linesize * self.height headersize = 14 + 40 + ncols * 4 info = struct.pack( "<IiiHHIIIIII", 40, self.width, self.height, 1, self.bits, 0, self.datasize, 0, 0, ncols, 0, ) assert len(info) == 40, str(len(info)) header = struct.pack( "<ccIHHI", b"B", b"M", headersize + self.datasize, 0, 0, headersize ) assert len(header) == 14, str(len(header)) self.fp.write(header) self.fp.write(info) if ncols == 2: # B&W color table for i in (0, 255): self.fp.write(struct.pack("BBBx", i, i, i)) elif ncols == 256: # grayscale color table for i in range(256): self.fp.write(struct.pack("BBBx", i, i, i)) self.pos0 = self.fp.tell() self.pos1 = self.pos0 + self.datasize def write_line(self, y: int, data: bytes) -> None: self.fp.seek(self.pos1 - (y + 1) * self.linesize) self.fp.write(data) class ImageWriter: """Write image to a file Supports various image types: JPEG, JBIG2 and bitmaps """ def __init__(self, outdir: str) -> None: self.outdir = outdir if not os.path.exists(self.outdir): os.makedirs(self.outdir) def export_image(self, image: LTImage) -> str: """Save an LTImage to disk""" (width, height) = image.srcsize filters = image.stream.get_filters() if len(filters) == 1 and filters[0][0] in LITERALS_DCT_DECODE: name = self._save_jpeg(image) elif len(filters) == 1 and filters[0][0] in LITERALS_JPX_DECODE: name = self._save_jpeg2000(image) elif self._is_jbig2_iamge(image): name = self._save_jbig2(image) elif image.bits == 1: name = self._save_bmp(image, width, height, (width + 7) // 8, image.bits) elif image.bits == 8 and LITERAL_DEVICE_RGB in image.colorspace: name = self._save_bmp(image, width, height, width * 3, image.bits * 3) elif image.bits == 8 and LITERAL_DEVICE_GRAY in image.colorspace: name = self._save_bmp(image, width, height, width, image.bits) elif len(filters) == 1 and filters[0][0] in LITERALS_FLATE_DECODE: name = self._save_bytes(image) else: name = self._save_raw(image) return name def _save_jpeg(self, image: LTImage) -> str: """Save a JPEG encoded image""" raw_data = image.stream.get_rawdata() assert raw_data is not None name, path = self._create_unique_image_name(image, ".jpg") with open(path, "wb") as fp: if LITERAL_DEVICE_CMYK in image.colorspace: try: from PIL import Image, ImageChops # type: ignore[import] except ImportError: raise ImportError(PIL_ERROR_MESSAGE) ifp = BytesIO(raw_data) i = Image.open(ifp) i = ImageChops.invert(i) i = i.convert("RGB") i.save(fp, "JPEG") else: fp.write(raw_data) return name def _save_jpeg2000(self, image: LTImage) -> str: """Save a JPEG 2000 encoded image""" raw_data = image.stream.get_rawdata() assert raw_data is not None name, path = self._create_unique_image_name(image, ".jp2") with open(path, "wb") as fp: try: from PIL import Image # type: ignore[import] except ImportError: raise ImportError(PIL_ERROR_MESSAGE) # if we just write the raw data, most image programs # that I have tried cannot open the file. However, # open and saving with PIL produces a file that # seems to be easily opened by other programs ifp = BytesIO(raw_data) i = Image.open(ifp) i.save(fp, "JPEG2000") return name def _save_jbig2(self, image: LTImage) -> str: """Save a JBIG2 encoded image""" name, path = self._create_unique_image_name(image, ".jb2") with open(path, "wb") as fp: input_stream = BytesIO() global_streams = [] filters = image.stream.get_filters() for filter_name, params in filters: if filter_name in LITERALS_JBIG2_DECODE: global_streams.append(params["JBIG2Globals"].resolve()) if len(global_streams) > 1: msg = ( "There should never be more than one JBIG2Globals " "associated with a JBIG2 embedded image" ) raise ValueError(msg) if len(global_streams) == 1: input_stream.write(global_streams[0].get_data().rstrip(b"\n")) input_stream.write(image.stream.get_data()) input_stream.seek(0) reader = JBIG2StreamReader(input_stream) segments = reader.get_segments() writer = JBIG2StreamWriter(fp) writer.write_file(segments) return name def _save_bmp( self, image: LTImage, width: int, height: int, bytes_per_line: int, bits: int ) -> str: """Save a BMP encoded image""" name, path = self._create_unique_image_name(image, ".bmp") with open(path, "wb") as fp: bmp = BMPWriter(fp, bits, width, height) data = image.stream.get_data() i = 0 for y in range(height): bmp.write_line(y, data[i : i + bytes_per_line]) i += bytes_per_line return name def _save_bytes(self, image: LTImage) -> str: """Save an image without encoding, just bytes""" name, path = self._create_unique_image_name(image, ".jpg") width, height = image.srcsize channels = len(image.stream.get_data()) / width / height / (image.bits / 8) with open(path, "wb") as fp: try: from PIL import Image # type: ignore[import] except ImportError: raise ImportError(PIL_ERROR_MESSAGE) mode: Literal["1", "8", "RGB", "CMYK"] if image.bits == 1: mode = "1" elif image.bits == 8 and channels == 1: mode = "8" elif image.bits == 8 and channels == 3: mode = "RGB" elif image.bits == 8 and channels == 4: mode = "CMYK" img = Image.frombytes(mode, image.srcsize, image.stream.get_data(), "raw") img.save(fp) return name def _save_raw(self, image: LTImage) -> str: """Save an image with unknown encoding""" ext = ".%d.%dx%d.img" % (image.bits, image.srcsize[0], image.srcsize[1]) name, path = self._create_unique_image_name(image, ext) with open(path, "wb") as fp: fp.write(image.stream.get_data()) return name @staticmethod def _is_jbig2_iamge(image: LTImage) -> bool: filters = image.stream.get_filters() for filter_name, params in filters: if filter_name in LITERALS_JBIG2_DECODE: return True return False def _create_unique_image_name(self, image: LTImage, ext: str) -> Tuple[str, str]: name = image.name + ext path = os.path.join(self.outdir, name) img_index = 0 while os.path.exists(path): name = "%s.%d%s" % (image.name, img_index, ext) path = os.path.join(self.outdir, name) img_index += 1 return name, path
20220429-pdfminer-jameslp310
/20220429_pdfminer_jameslp310-0.0.2-py3-none-any.whl/pdfminer/image.py
image.py
# Copyright 2016-present MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Some changes copyright 2021-present Matthias Valvekens, # licensed under the license of the pyHanko project (see LICENSE file). """An implementation of RFC4013 SASLprep.""" __all__ = ["saslprep"] import stringprep from typing import Callable, Tuple import unicodedata # RFC4013 section 2.3 prohibited output. _PROHIBITED: Tuple[Callable[[str], bool], ...] = ( # A strict reading of RFC 4013 requires table c12 here, but # characters from it are mapped to SPACE in the Map step. Can # normalization reintroduce them somehow? stringprep.in_table_c12, stringprep.in_table_c21_c22, stringprep.in_table_c3, stringprep.in_table_c4, stringprep.in_table_c5, stringprep.in_table_c6, stringprep.in_table_c7, stringprep.in_table_c8, stringprep.in_table_c9, ) def saslprep(data: str, prohibit_unassigned_code_points: bool = True) -> str: """An implementation of RFC4013 SASLprep. :param data: The string to SASLprep. :param prohibit_unassigned_code_points: RFC 3454 and RFCs for various SASL mechanisms distinguish between `queries` (unassigned code points allowed) and `stored strings` (unassigned code points prohibited). Defaults to ``True`` (unassigned code points are prohibited). :return: The SASLprep'ed version of `data`. """ if prohibit_unassigned_code_points: prohibited = _PROHIBITED + (stringprep.in_table_a1,) else: prohibited = _PROHIBITED # RFC3454 section 2, step 1 - Map # RFC4013 section 2.1 mappings # Map Non-ASCII space characters to SPACE (U+0020). Map # commonly mapped to nothing characters to, well, nothing. in_table_c12 = stringprep.in_table_c12 in_table_b1 = stringprep.in_table_b1 data = "".join( ["\u0020" if in_table_c12(elt) else elt for elt in data if not in_table_b1(elt)] ) # RFC3454 section 2, step 2 - Normalize # RFC4013 section 2.2 normalization data = unicodedata.ucd_3_2_0.normalize("NFKC", data) in_table_d1 = stringprep.in_table_d1 if in_table_d1(data[0]): if not in_table_d1(data[-1]): # RFC3454, Section 6, #3. If a string contains any # RandALCat character, the first and last characters # MUST be RandALCat characters. raise ValueError("SASLprep: failed bidirectional check") # RFC3454, Section 6, #2. If a string contains any RandALCat # character, it MUST NOT contain any LCat character. prohibited = prohibited + (stringprep.in_table_d2,) else: # RFC3454, Section 6, #3. Following the logic of #3, if # the first character is not a RandALCat, no other character # can be either. prohibited = prohibited + (in_table_d1,) # RFC3454 section 2, step 3 and 4 - Prohibit and check bidi for char in data: if any(in_table(char) for in_table in prohibited): raise ValueError("SASLprep: failed prohibited character check") return data
20220429-pdfminer-jameslp310
/20220429_pdfminer_jameslp310-0.0.2-py3-none-any.whl/pdfminer/_saslprep.py
_saslprep.py
__version__ = "__VERSION__" # auto replaced with tag in github actions if __name__ == "__main__": print(__version__)
20220429-pdfminer-jameslp310
/20220429_pdfminer_jameslp310-0.0.2-py3-none-any.whl/pdfminer/__init__.py
__init__.py